Commit f6b21591 authored by zhangjianguo's avatar zhangjianguo
parents 019ee4fd 9b924507
......@@ -34,6 +34,9 @@
.w100{
width:100px!important;
}
.w200{
width:200px!important;
}
.el-icon-search{
cursor: pointer;
}
......
......@@ -23,6 +23,9 @@ input, textarea, select{
.w400{
width:400px;
}
.w200{
width:200px;
}
.CommonHeader{
padding: 18px 20px;
-webkit-box-sizing: border-box;
......@@ -32,3 +35,11 @@ input, textarea, select{
border-top-right-radius: 4px;
color:#303133;
}
.vue-line-clamp{
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
-webkit-line-clamp: 1;
}
<style>
.Fsetting {
height: 100%;
display: flex;
-webkit-box-orient: horizontal;
-ms-flex-direction: row;
flex-direction: row;
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
-ms-flex-preferred-size: auto;
flex-basis: auto;
-webkit-box-sizing: border-box;
box-sizing: border-box;
min-width: 0;
font-size: 14px;
}
.Fsetting .mainLeftMenu {
position: relative;
display: flex;
flex-direction: row;
color: #fff;
}
.Fsetting .leftMenu1 {
background: #444444;
cursor: pointer;
width: 200px;
height: 100%;
overflow-y: auto;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.Fsetting .asideInner {
background: rgba(0, 0, 0, 0.15);
padding: 6px 6px;
width: 100%;
border-radius: 3px;
font-weight: bold;
}
.Fsetting .F_Logo {
height: 60px;
background: #464d54;
color: #f2f2f2;
cursor: pointer;
font-weight: bold;
text-align: center;
padding: 0 15px;
display: flex;
align-items: center;
}
.Fsetting .mainRightContent {
width: 100%;
height: 100%;
background-color: #f3f3f3;
}
.Fsetting .mainRightTop {
width: 100%;
height: 60px;
background: #fff;
display: flex;
justify-content: space-between;
color: #909399;
}
.Fsetting .mainRightLeft {
width: 110px;
height: 60px;
line-height: 62px;
text-align: center;
margin-left: 30px;
cursor: pointer;
position: relative;
top: -2px;
}
.Fsetting .marinRightList {
display: flex;
flex-wrap: wrap;
align-items: center;
width: 300px;
float: right;
}
.Fsetting .marinRightList ul {
display: flex;
width: 100%;
justify-content: space-around;
}
.Fsetting .marinRightList ul li {
display: block;
list-style-type: none;
cursor: pointer;
color: #909399;
outline: none;
border: none;
}
.Fsetting .main_routerPage {
padding: 20px;
overflow-y: scroll;
}
.Fsetting .FsettingUU{
position: fixed;
width: 200px;
height: 100%;
position: fixed;
top: 60px;
left: 0;
overflow: auto;
z-index: 5;
background-color: rgb(84, 92, 100);
}
.Fsetting .FsettingUU .menu_item{
font-size: 14px;
color: #303133;
padding: 0 20px;
cursor: pointer;
-webkit-transition: border-color .3s,background-color .3s,color .3s;
transition: border-color .3s,background-color .3s,color .3s;
box-sizing: border-box;
height:56px;
line-height: 56px;
list-style: none;
white-space: nowrap;
color:#fff;
display: flex;
align-items: center;
}
.Fsetting .FsettingUU .menu_item i {
margin-right: 5px;
width: 24px;
text-align: center;
font-size: 18px;
vertical-align: middle;
color:#909399;
}
.Fsetting .menu_item:hover{
background-color: rgba(67,74,80);
}
.Fsetting .F_Logo:hover{
background-color: #30353a;
color:#fff;
}
.Fsetting .Fchecked{
color:rgb(255, 208, 75)!important;
}
.Fsetting .Fchecked i{
color:rgb(255, 208, 75)!important;
}
</style>
<template>
<div class="Fsetting">
<div class="mainLeftMenu">
<div class="leftMenu1">
<div class="F_Logo">
<div class="asideInner">{{currentUser.MallName}}
</div>
</div>
<ul class="FsettingUU">
<li class="menu_item" :class="{'Fchecked':isChecked==1}" @click="isChecked=1,CommonJump('wexinappconfig')">
<i class="el-icon-menu"></i><span>基础配置</span>
</li>
<li class="menu_item" :class="{'Fchecked':isChecked==2}" @click="isChecked=2,CommonJump('wexinappmsg')">
<i class="el-icon-menu"></i><span>消息通知</span>
</li>
<li class="menu_item" :class="{'Fchecked':isChecked==3}" @click="isChecked=3">
<i class="el-icon-menu"></i><span>小程序发布</span>
</li>
<li class="menu_item" :class="{'Fchecked':isChecked==4}" @click="isChecked=4">
<i class="el-icon-menu"></i><span>单客户小程序</span>
</li>
</ul>
</div>
</div>
<div class="mainRightContent">
<div class="mainRightTop">
<div class="mainRightLeft">微信小程序</div>
<div class="marinRightList">
<ul>
<li>缓存</li>
<li title="教程管理">
<el-dropdown trigger="click">
<span class="el-dropdown-link">
教程管理<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>操作教程</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</li>
<li :title="currentUser.MallName">
<el-dropdown trigger="click">
<span class="el-dropdown-link">
{{currentUser.MallName}}<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item disabled>{{currentUser.MallName}}</el-dropdown-item>
<el-dropdown-item disabled>{{currentUser.Account}}({{currentUser.MobilePhone}})</el-dropdown-item>
<el-dropdown-item @click.native="CommonJump('index')">返回系统</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</li>
</ul>
</div>
</div>
<div class="main_routerPage" :style="{height: Height+'px'}">
<router-view />
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
currentUser: {},
isChecked:1,
Height:0
};
},
created() {
this.currentUser = this.getLocalStorage();
},
methods: {
//跳转微信小程序
goLittlePrograme(){
let routeData = this.$router.resolve({
name: 'Fsetting',
query: {}
});
window.open(routeData.href, "_blank");
},
},
mounted() {
this.CommonJump('wexinappconfig');
this.Height = document.documentElement.clientHeight - 60;
//监听浏览器窗口变化 
window.onresize = () => {
this.Height = document.documentElement.clientHeight - 60
}
}
};
</script>
<style>
.copyrightset .mimitBody {
padding: 20px;
background-color: #fff;
margin: 10px 0 20px 0;
display: table;
width: 100%;
}
.copyrightset .mimitList {
margin-bottom: 15px;
display: flex;
flex-direction: row;
}
.copyrightset .mimitBody .el-tag {
min-width: 120px;
padding-right: 50px;
}
.copyrightset .el-button--small {
padding: 9px 25px;
}
</style>
<template>
<div class="copyrightset">
<div class="CommonHeader">版权设置</div>
<div class="mimitBody">
<el-form :model="copyRightMsg" ref="copyRightMsg" label-width="150px">
<el-form-item label="版权开关">
<el-switch v-model="copyRightMsg.IsOpenCopyRight" :active-value="0" :inactive-value="1"></el-switch>
</el-form-item>
<el-form-item label="底部版权文字">
<el-input type="text" style="width:250px" size="small" maxlength="100" v-model="copyRightMsg.CopyRightWord">
</el-input>
</el-form-item>
<el-form-item label="底部版权图标">
<div>
<el-tooltip class="item" effect="dark" content="建议尺寸:160*50" placement="top-start">
<el-upload class="avatar-uploader" action="" accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" :http-request="UploadImage">
<el-button size="small">选择图片</el-button>
</el-upload>
</el-tooltip>
</div>
<div class="indexApp_image">
<img v-if="copyRightMsg.CopyRightImg" :src="copyRightMsg.CopyRightImg" alt="" />
</div>
</el-form-item>
<el-form-item label="底部版权链接">
<el-input style="width:250px" size="small" maxlength="200" :disabled="true"
v-model="copyRightMsg.CopyRightLink" />
<el-button plain size="small" @click="isShowLink=true">选择链接</el-button>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="UpdateCopyRight()">确 定</el-button>
</span>
</div>
<el-dialog title="选择链接" :visible.sync="isShowLink" width="800px">
<chooseMeun ref="chooseMeun">
</chooseMeun>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="isShowLink=false">取 消</el-button>
<el-button size="small" type="danger" @click="getMenu()">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import chooseMeun from "../common/chooseMeun.vue";
export default {
data() {
return {
//是否线下链接弹窗
isShowLink: false,
//修改版权MSG
copyRightMsg: {
MallBaseId: 0, //小程序Id
CopyRightWord: '', //版权文字
CopyRightImg: '', //版权图片
CopyRightLink: '', //版权链接
IsOpenCopyRight: 0, //是否开启版权设置(0-开启,1-关闭)
},
};
},
components: {
chooseMeun
},
created() {
},
methods: {
getMenu() {
//调用子组件方法
var obj = this.$refs.chooseMeun.getChooseMenu();
this.copyRightMsg.CopyRightLink = obj.PageUrl;
this.isShowLink = false;
},
//选择图片
UploadImage(file) {
this.UploadFileToTencent(this.FileType().UserImg, file.file, res => {
if (res.resultCode == 1) {
this.copyRightMsg.CopyRightImg = res.FileUrl;
}
})
},
//版权信息
GetCopyRight() {
this.copyRightMsg.MallBaseId = this.getLocalStorage().MallBaseId;
this.apipost("/api/Tenant/GetMiniPrograme", {
MallBaseId: this.copyRightMsg.MallBaseId,
}, res => {
if (res.data.resultCode == 1) {
this.copyRightMsg.CopyRightWord = res.data.data.CopyRightWord;
this.copyRightMsg.CopyRightImg = res.data.data.CopyRightImg;
this.copyRightMsg.CopyRightLink = res.data.data.CopyRightLink;
this.copyRightMsg.IsOpenCopyRight = res.data.data.IsOpenCopyRight;
} else {
this.Info(res.data.message);
}
})
},
//修改版权
UpdateCopyRight() {
this.apipost("/api/Tenant/SetMiniProgrameCopyRight", this.copyRightMsg, res => {
if (res.data.resultCode == 1) {
this.GetCopyRight();
this.Success("操作成功!");
} else {
this.Info(res.data.message);
}
})
},
},
mounted() {
this.GetCopyRight();
}
};
</script>
This diff is collapsed.
<style>
.mimipage .el-tabs__header{
padding: 0 20px;
height: 56px;
line-height: 56px;
background-color: #fff;
margin-bottom:15px;
}
.mimipage .panelDiv{
display: flex;
flex-wrap: wrap;
}
.mimipage .panel_item{
background-color: #fff;
width: 33%;
min-height: 185px;
margin-bottom: 10px;
position: relative;
padding: 20px;
margin-right: 0.33%;
}
.mimipage .panel_name{
background-color: #F4F4F5;
color: #909399;
width: auto;
display: inline-block;
padding: 0 10px;
height: 32px;
line-height: 32px;
text-align: center;
font-size: 12px;
border-radius: 3px;
border: 1px solid #E0E0E3;
margin-bottom: 5px;
}
.mimipage .el-form-item{
margin-bottom:0;
}
</style>
<template>
<div class="mimipage">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="(item,index) in dataList" :label="item.PageTypeName" :name="item.PageTypeId+''" :key="index">
<template v-for="(subItem,subIndex) in item.SubMenuList">
<div :key="subIndex">
<span v-if="subItem.SelfPageName">{{subItem.SelfPageName}}</span>
<span v-else>{{subItem.PageName}} </span>
{{subItem.PageUrl}} <br />
<span v-if="subItem.IsParameter==1">
<el-input v-model="subItem.ParameterValue"></el-input>
</span>
</div>
</template>
<div class="panelDiv">
<div class="panel_item" v-for="(subItem,subIndex) in item.SubMenuList" :key="subIndex">
<div class="panel_name">
<span v-if="subItem.SelfPageName">{{subItem.SelfPageName}}</span>
<span v-else>{{subItem.PageName}} </span>
</div>
<el-form label-width="50px">
<el-form-item label="路径">
<span>{{subItem.PageUrl}}</span>
</el-form-item>
<el-form-item label="参数1" v-if="subItem.IsParameter==1">
<el-input size="small" v-model="subItem.ParameterValue"></el-input>
</el-form-item>
</el-form>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
......@@ -46,51 +91,4 @@
this.getList();
}
};
</script>
<style>
.navNavIconImg {
width: 80px;
height: 80px;
}
.navNavIconImg NavIconImg {
width: 100%;
height: 100%;
}
.mimipage .blue {
color: #409EFF;
}
.mimipage .content .searchInput {
border: 1px solid #DCDFE6;
border-radius: 4px;
}
.mimipage .content .searchInput .el-input__inner {
border: none;
outline: none;
height: 30px;
line-height: 30px;
}
.mimipage .content .searchInput {
line-height: normal;
display: inline-table;
width: 100%;
border-collapse: separate;
border-spacing: 0;
width: 250px;
margin-right: 20px;
}
.mimipage .content {
background: #fff;
margin-top: 10px;
padding: 20px;
box-sizing: border-box;
}
</style>
......@@ -13,26 +13,27 @@
<el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入搜索内容"
v-model="msg.NavIconName" size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
</el-input>
<span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px" @click="msg.pageIndex=1,getList()"> </span>
<span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"
@click="msg.pageIndex=1,getList()"> </span>
</div>
</div>
<el-table :data="dataList" v-loading="loading" border style="width: 100%;margin:20px 0">
<el-table-column prop="NavIconId" label="编号" width="100">
<el-table-column prop="NavIconId" label="编号" width="150">
</el-table-column>
<el-table-column prop="NavIconName" width="120" label="名称">
<el-table-column prop="NavIconName" width="200" label="名称">
</el-table-column>
<el-table-column label="导航图标" width="80">
<el-table-column label="导航图标" width="300">
<template slot-scope="scope">
<img :src="scope.row.NavIconImg">
<img :src="scope.row.NavIconImg" style="width:270px;height:60px;">
</template>
</el-table-column>
<el-table-column prop="NavIconUrl" label="导航链接">
<el-table-column prop="NavIconUrl" label="导航链接" width="250">
</el-table-column>
<el-table-column prop="NavIconSort" label="排序" width="180">
<el-table-column prop="NavIconSort" label="排序" width="120">
</el-table-column>
<el-table-column prop="NavIconIsShowStr" label="是否显示" width="120">
</el-table-column>
<el-table-column width="220" label="操作">
<el-table-column label="操作">
<template slot-scope="scope">
<el-button size="mini" type="info" plain @click="EditNavIcon(scope.row)">编辑 </el-button>
<el-button size="mini" type="info" plain @click="RemmoveNavIcon(scope.row)">删除</el-button>
......@@ -73,8 +74,8 @@
</div>
</el-form-item>
<el-form-item label="导航链接" prop="NavIconUrl">
<el-input v-model="addMsg.NavIconUrl" class="w400" size="small" maxlength="100" />
<el-button plain size="small">选择链接</el-button>
<el-input v-model="addMsg.NavIconUrl" class="w400" size="small" maxlength="100" :disabled="true" />
<el-button plain size="small" @click="isShowLink=true">选择链接</el-button>
</el-form-item>
<el-form-item label="是否显示">
<el-switch v-model="addMsg.NavIconIsShow" :active-value="1" :inactive-value="0"></el-switch>
......@@ -84,9 +85,18 @@
<el-button size="small" style="margin-top:20px;padding:9px 25px;" type="primary" @click="submitform('addMsg')">保存
</el-button>
</template>
<el-dialog title="选择链接" :visible.sync="isShowLink" width="800px">
<chooseMeun ref="chooseMeun">
</chooseMeun>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="isShowLink=false">取 消</el-button>
<el-button size="small" type="danger" @click="getMenu()">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import chooseMeun from "../common/chooseMeun.vue";
export default {
data() {
let validataNavIconImg = (rule, value, callback) => {
......@@ -97,6 +107,8 @@
}
}
return {
//是否线下链接弹窗
isShowLink: false,
loading: false,
dataList: [],
msg: {
......@@ -140,10 +152,19 @@
},
};
},
components: {
chooseMeun
},
created() {
},
methods: {
getMenu() {
//调用子组件方法
var obj = this.$refs.chooseMeun.getChooseMenu();
this.addMsg.NavIconUrl = obj.PageUrl;
this.isShowLink = false;
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
......
This diff is collapsed.
<style>
.wexinappconfig .mimitBody {
padding: 20px;
background-color: #fff;
margin: 10px 0 20px 0;
display: table;
width: 100%;
}
.wexinappconfig .mimitList {
margin-bottom: 15px;
display: flex;
flex-direction: row;
}
.wexinappconfig .mimitBody .el-tag {
min-width: 120px;
padding-right: 50px;
}
.wexinappconfig .el-button--small {
padding: 9px 25px;
}
</style>
<template>
<div class="wexinappconfig">
<div class="CommonHeader">微信小程序配置</div>
<div class="mimitBody">
<div class="el-col el-col-12">
<el-form :model="appConfig" :rules="rules" ref="appConfig" label-width="150px">
<el-form-item label="小程序AppId" prop="MiniAppId" size="small">
<el-input type="text" size="small" maxlength="200" v-model="appConfig.MiniAppId">
</el-input>
</el-form-item>
<el-form-item label="小程序appSecret" prop="MiniAppSecret" size="small">
<el-input v-if="isShowAppSecret" type="text" @focus="isShowAppSecret=false" size="small" placeholder="已隐藏内容,点击查看或编辑">
</el-input>
<el-input v-else type="text" size="small" maxlength="200" v-model="appConfig.MiniAppSecret">
</el-input>
</el-form-item>
<el-form-item label="微信支付商户号" prop="WeChatPayMerchants" size="small">
<el-input type="text" size="small" maxlength="200" v-model="appConfig.WeChatPayMerchants">
</el-input>
</el-form-item>
<el-form-item label="微信支付Api密钥" prop="WeChatApiSecret" size="small">
<el-input v-if="isShowApi" type="text" @focus="isShowApi=false" size="small" placeholder="已隐藏内容,点击查看或编辑">
</el-input>
<el-input v-else type="text" size="small" maxlength="200" v-model="appConfig.WeChatApiSecret">
</el-input>
</el-form-item>
<el-form-item label="微信支付apiclient_cert.pem" size="small">
<el-input v-if="isShowClientOne" type="textarea" @focus="isShowClientOne=false" :rows="5" size="small" placeholder="已隐藏内容,点击查看或编辑">
</el-input>
<el-input v-else type="textarea" :rows="5" size="small" maxlength="1000"
v-model="appConfig.WeChatPayCertificate">
</el-input>
</el-form-item>
<el-form-item label="微信支付apiclient_key.pem" size="small">
<el-input v-if="isShowClientTwo" type="textarea" @focus="isShowClientTwo=false" :rows="5" size="small" placeholder="已隐藏内容,点击查看或编辑">
</el-input>
<el-input v-else type="textarea" :rows="5" size="small" maxlength="1000"
v-model="appConfig.WeChatPayPrivateKey">
</el-input>
</el-form-item>
</el-form>
</div>
</div>
<el-button size="small" type="primary" @click="submitForm('appConfig')">保存</el-button>
</div>
</template>
<script>
export default {
data() {
return {
//是否显示小程序appSecret
isShowAppSecret:true,
//是否显示微信支付Api密钥
isShowApi:true,
//是否显示微信支付
isShowClientOne:true,
isShowClientTwo:true,
//修改配置MSG
appConfig: {
MallBaseId: 0, //小程序Id
MiniAppId: "", //小程序AppId
MiniAppSecret: "", //小程序AppSecret
WeChatPayMerchants: "", //微信支付商户号
WeChatApiSecret: "", //微信支付Api密钥
WeChatPayCertificate: "", //微信支付证书
WeChatPayPrivateKey: "", //微信支付私钥
},
rules: {
MiniAppId: [{
required: true,
message: "请输入appid",
trigger: "blur"
}],
MiniAppSecret: [{
required: true,
message: "请输入appsecret",
trigger: "blur"
}],
WeChatPayMerchants: [{
required: true,
message: "请输入mchid",
trigger: "blur"
}],
WeChatApiSecret: [{
required: true,
message: "请输入key",
trigger: "blur"
}]
}
};
},
created() {
},
methods: {
//版权信息
GetWeiXinAppConfig() {
this.appConfig.MallBaseId = this.getLocalStorage().MallBaseId;
this.apipost("/api/Tenant/GetMiniPrograme", {
MallBaseId: this.appConfig.MallBaseId,
}, res => {
if (res.data.resultCode == 1) {
this.appConfig.MiniAppId = res.data.data.MiniAppId;
this.appConfig.MiniAppId = res.data.data.MiniAppId;
this.appConfig.MiniAppSecret = res.data.data.MiniAppSecret;
this.appConfig.WeChatPayMerchants = res.data.data.WeChatPayMerchants;
this.appConfig.WeChatApiSecret = res.data.data.WeChatApiSecret;
this.appConfig.WeChatPayCertificate = res.data.data.WeChatPayCertificate;
this.appConfig.WeChatPayPrivateKey = res.data.data.WeChatPayPrivateKey;
} else {
this.Info(res.data.message);
}
})
},
submitForm(msg) {
//提交创建、修改表单
this.$refs[msg].validate(valid => {
if (valid) {
this.UpdateAppConfig();
} else {
return false;
}
});
},
//修改版权
UpdateAppConfig() {
this.apipost("/api/Tenant/SetMiniProgramAppConfig", this.appConfig, res => {
if (res.data.resultCode == 1) {
this.GetWeiXinAppConfig();
this.Success("操作成功!");
} else {
this.Info(res.data.message);
}
})
},
},
mounted() {
this.GetWeiXinAppConfig();
}
};
</script>
<style>
.weixinappmsg{
position: relative;
}
.weixinappmsg .mimitBody {
padding: 20px;
background-color: #fff;
margin: 10px 0 20px 0;
display: table;
width: 100%;
}
.weixinappmsg .mimitList {
margin-bottom: 15px;
display: flex;
flex-direction: row;
}
.weixinappmsg .mimitBody .el-tag {
min-width: 120px;
padding-right: 50px;
}
.weixinappmsg .el-button--small {
padding: 9px 15px;
}
.wexin_Header{
padding: 0 20px;
height: 56px;
line-height: 56px;
background-color: #fff;
margin-bottom: 10px;
}
.weixinTopBtn{
position: absolute;
top: 10px;
right: 10px;
z-index: 2;
}
.weixin_warmTips{
margin: 0px 20px 20px;
background-color: rgb(244, 244, 245);
padding: 10px 15px;
color: rgb(144, 147, 153);
display: inline-block;
font-size: 15px;
}
</style>
<template>
<div class="weixinappmsg">
<el-button class="weixinTopBtn" type="primary" size="small">一键添加订阅信息</el-button>
<div class="wexin_Header">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="商城订阅信息" name="1"></el-tab-pane>
<el-tab-pane label="分销订阅信息" name="2"></el-tab-pane>
</el-tabs>
</div>
<template v-if="checkIndex==1">
<div class="mimitBody">
<div class="el-col el-col-24">
<div class="weixin_warmTips">温馨提示:获取前请先确认您已获得订阅消息的使用权限,并且订阅消息中没有任何数据。获取后请不要到小程序后台 删除相应的订阅消息,否则会影响订阅消息正常使用。</div>
<el-form :model="appMallSubscribeMsg" ref="appMallSubscribeMsg" label-width="300px">
<el-form-item label="下单成功提醒(类目: 服装/鞋/箱包)">
<el-input type="text" style="width:30%" size="small" maxlength="200" v-model="appMallSubscribeMsg.OrderSuccessTpl">
</el-input>
<el-button plain size="small">查看订阅消息示例</el-button>
</el-form-item>
<el-form-item label="订单取消通知(类目: 服装/鞋/箱包)">
<el-input type="text" style="width:30%" size="small" maxlength="200" v-model="appMallSubscribeMsg.OrderCancelTpl">
</el-input>
<el-button plain size="small">查看订阅消息示例</el-button>
</el-form-item>
<el-form-item label="订单发货通知(类目: 服装/鞋/箱包)">
<el-input type="text" style="width:30%" size="small" maxlength="200" v-model="appMallSubscribeMsg.OrderDeliverGoodsTpl">
</el-input>
<el-button plain size="small">查看订阅消息示例</el-button>
</el-form-item>
<el-form-item label="退款通知(类目: 服装/鞋/箱包)">
<el-input type="text" style="width:30%" size="small" maxlength="200" v-model="appMallSubscribeMsg.RefundTpl">
</el-input>
<el-button plain size="small">查看订阅消息示例</el-button>
</el-form-item>
<el-form-item label="活动状态通知(类目: 服装/鞋/箱包)">
<el-input type="text" style="width:30%" size="small" maxlength="200" v-model="appMallSubscribeMsg.ActiveStateTpl">
</el-input>
<el-button plain size="small">查看订阅消息示例</el-button>
</el-form-item>
<el-form-item label="审核结果通知(类目: 服装/鞋/箱包)">
<el-input type="text" style="width:30%" size="small" maxlength="200" v-model="appMallSubscribeMsg.AuditResultTpl">
</el-input>
<el-button plain size="small">查看订阅消息示例</el-button>
</el-form-item>
</el-form>
</div>
</div>
<el-button size="small" type="primary" @click="UpdateMallSubscribeMsg()">保 存</el-button>
<el-button size="small" type="primary">生成测试二维码</el-button>
</template>
<template v-else>
<div class="mimitBody">
<div class="el-col el-col-24">
<div class="weixin_warmTips">温馨提示:获取前请先确认您已获得订阅消息的使用权限,并且订阅消息中没有任何数据。获取后请不要到小程序后台 删除相应的订阅消息,否则会影响订阅消息正常使用。</div>
<el-form :model="appMallDistributionMsg" ref="appMallDistributionMsg" label-width="300px">
<el-form-item label="提现成功通知(类目: 服装/鞋/箱包)">
<el-input type="text" style="width:30%" size="small" maxlength="200" v-model="appMallDistributionMsg.ReflectSuccessTpl">
</el-input>
<el-button plain size="small">查看订阅消息示例</el-button>
</el-form-item>
<el-form-item label="提现失败通知(类目: 服装/鞋/箱包)">
<el-input type="text" style="width:30%" size="small" maxlength="200" v-model="appMallDistributionMsg.ReflectFailTpl">
</el-input>
<el-button plain size="small">查看订阅消息示例</el-button>
</el-form-item>
<el-form-item label="会员等级变更通知(类目: 服装/鞋/箱包)">
<el-input type="text" style="width:30%" size="small" maxlength="200" v-model="appMallDistributionMsg.MembersLevelChangeTpl">
</el-input>
<el-button plain size="small">查看订阅消息示例</el-button>
</el-form-item>
</el-form>
</div>
</div>
<el-button size="small" type="primary" @click="UpdateMallDistributionMsg()">保 存</el-button>
<el-button size="small" type="primary">生成测试二维码</el-button>
</template>
</div>
</template>
<script>
export default {
data() {
return {
//商城订阅消息
appMallSubscribeMsg: {
MallBaseId: 0, //小程序Id
OrderSuccessTpl: "", //下单成功提醒(类目:服装/鞋/箱包)
OrderCancelTpl: "", //订单取消提醒(类目:服装/鞋/箱包)
OrderDeliverGoodsTpl: "", //订单发货提醒(类目:服装/鞋/箱包)
RefundTpl: "", //退款提醒(类目:服装/鞋/箱包)
ActiveStateTpl: "", //活动状态提醒(类目:服装/鞋/箱包)
AuditResultTpl: "", //审核结果提醒(类目:服装/鞋/箱包)
},
//分销订阅消息
appMallDistributionMsg: {
MallBaseId: 0, //小程序Id
ReflectSuccessTpl: "", //提现成功通知(类目: 服装/鞋/箱包 )
ReflectFailTpl: "", //提现失败通知(类目: 服装/鞋/箱包 )
MembersLevelChangeTpl: "", //会员等级变更通知(类目: 服装/鞋/箱包 )
},
activeName:'1',
checkIndex:1,
};
},
created() {
},
methods: {
//版权信息
GetWeiXinAppConfig() {
this.appMallSubscribeMsg.MallBaseId = this.getLocalStorage().MallBaseId;
this.appMallDistributionMsg.MallBaseId = this.getLocalStorage().MallBaseId;
this.apipost("/api/Tenant/GetMiniPrograme", {
MallBaseId: this.getLocalStorage().MallBaseId,
}, res => {
if (res.data.resultCode == 1) {
//商城订阅消息
this.appMallSubscribeMsg.OrderSuccessTpl = res.data.data.OrderSuccessTpl;
this.appMallSubscribeMsg.OrderCancelTpl = res.data.data.OrderCancelTpl;
this.appMallSubscribeMsg.OrderDeliverGoodsTpl = res.data.data.OrderDeliverGoodsTpl;
this.appMallSubscribeMsg.RefundTpl = res.data.data.RefundTpl;
this.appMallSubscribeMsg.ActiveStateTpl = res.data.data.ActiveStateTpl;
this.appMallSubscribeMsg.AuditResultTpl = res.data.data.AuditResultTpl;
//分销订阅消息
this.appMallDistributionMsg.ReflectSuccessTpl = res.data.data.ReflectSuccessTpl;
this.appMallDistributionMsg.ReflectFailTpl = res.data.data.ReflectFailTpl;
this.appMallDistributionMsg.MembersLevelChangeTpl = res.data.data.MembersLevelChangeTpl;
} else {
this.Info(res.data.message);
}
})
},
//修改商城订阅消息
UpdateMallSubscribeMsg() {
this.apipost("/api/Tenant/SetMiniProgramMallSubscribe", this.appMallSubscribeMsg, res => {
if (res.data.resultCode == 1) {
this.GetWeiXinAppConfig();
this.Success("操作成功!");
} else {
this.Info(res.data.message);
}
})
},
//修改分销订阅配置信息
UpdateMallDistributionMsg() {
this.apipost("/api/Tenant/SetMiniProgramMallDistribution", this.appMallDistributionMsg, res => {
if (res.data.resultCode == 1) {
this.GetWeiXinAppConfig();
this.Success("操作成功!");
} else {
this.Info(res.data.message);
}
})
},
//切换
handleClick(tab){
this.checkIndex = tab.name;
}
},
mounted() {
this.GetWeiXinAppConfig();
}
};
</script>
......@@ -379,13 +379,15 @@
<div flex="dir:left cross:center" style="background: rgb(255, 255, 255); color: rgb(102, 102, 102); height: 80px; padding: 0px 12px; font-size: 13pt; border-top: 1px solid rgb(226, 226, 226); border-bottom: 1px solid rgb(226, 226, 226);">
<div style="color: rgb(255, 69, 68); font-size: 30pt;"></div>
<div style="padding-left: 20px; color: rgb(205, 205, 205); font-size: 19pt;">
请输入100
请输入{{addMsg.WithdrawalAmountName}}
</div>
</div>
<div flex="dir:top main:center" style="padding: 10px 12px; color: rgb(102, 102, 102); font-size: 12pt;">
<div>说明: 100必须不能大于¥80</div>
<div>说明: {{addMsg.WithdrawalAmountName}}必须不能大于¥80</div>
</div>
<div style="background: rgb(255, 255, 255); padding: 16px 12px;">
{{addMsg.WithdrawalWayName}}
</div>
<div style="background: rgb(255, 255, 255); padding: 16px 12px;"></div>
<div flex="dir:left cross:center" style="margin-bottom: 10px; padding-left: 8px; padding-bottom: 10px; background: rgb(255, 255, 255);">
<div flex="dir:left cross:center" style="margin-left: 10px; padding: 0px 16px; height: 34px; border: 1px solid rgb(255, 69, 68); border-radius: 19px;">
<img src="../../assets/img/userman/wx.png" style="width:20px;height:20px" alt="">
......@@ -420,14 +422,14 @@
<div flex="dir:left cross:center" class="share-text">
<div class="default">提现金额</div>
<img style="width:12px;height:12px;margin-right:8px" src="../../assets/img/userman/customize_jp.png" alt="">
<el-input v-model="addMsg.val" style="width:40%" size="small" placeholder="请输入内容"></el-input>
<el-input v-model="addMsg.WithdrawalAmountName" style="width:40%" size="small" placeholder="请输入内容"></el-input>
</div>
</el-form-item>
<el-form-item label="">
<div flex="dir:left cross:center" class="share-text">
<div class="default">提现方式</div>
<img style="width:12px;height:12px;margin-right:8px" src="../../assets/img/userman/customize_jp.png" alt="">
<el-input v-model="addMsg.val" style="width:40%" size="small" placeholder="请输入内容"></el-input>
<el-input v-model="addMsg.WithdrawalWayName" style="width:40%" size="small" placeholder="请输入内容"></el-input>
</div>
</el-form-item>
</el-form>
......@@ -446,14 +448,14 @@
<div flex="dir:left box:mean cross:center" style="height: 50px; border: 1px solid rgb(226, 226, 226); background: rgb(255, 255, 255);">
<div flex="main:center">
<div flex="cross:center" style="height: 50px; border-bottom: 1px solid rgb(255, 69, 68); color: rgb(255, 69, 68);">
一级分销名称(0)
{{addMsg.OneDistributionName}}(0)
</div>
</div>
<div flex="main:center">
<div>二级分销名称(10)</div>
<div>{{addMsg.TwoDistributionName}}(10)</div>
</div>
<div flex="main:center">
<div>三级分销名称(0)</div>
<div>{{addMsg.ThreeDistributionName}}(0)</div>
</div>
</div>
<div flex="dir:top" style="margin-bottom: 10px;">
......@@ -506,21 +508,21 @@
<div flex="dir:left cross:center" class="share-text">
<div class="default">一级分销名称</div>
<img style="width:12px;height:12px;margin-right:8px" src="../../assets/img/userman/customize_jp.png" alt="">
<el-input v-model="addMsg.val" style="width:40%" size="small" placeholder="请输入内容"></el-input>
<el-input v-model="addMsg.OneDistributionName" style="width:40%" size="small" placeholder="请输入内容"></el-input>
</div>
</el-form-item>
<el-form-item label="">
<div flex="dir:left cross:center" class="share-text">
<div class="default">二级分销名称</div>
<img style="width:12px;height:12px;margin-right:8px" src="../../assets/img/userman/customize_jp.png" alt="">
<el-input v-model="addMsg.val" style="width:40%" size="small" placeholder="请输入内容"></el-input>
<el-input v-model="addMsg.TwoDistributionName" style="width:40%" size="small" placeholder="请输入内容"></el-input>
</div>
</el-form-item>
<el-form-item label="">
<div flex="dir:left cross:center" class="share-text">
<div class="default">三级分销名称</div>
<img style="width:12px;height:12px;margin-right:8px" src="../../assets/img/userman/customize_jp.png" alt="">
<el-input v-model="addMsg.val" style="width:40%" size="small" placeholder="请输入内容"></el-input>
<el-input v-model="addMsg.ThreeDistributionName" style="width:40%" size="small" placeholder="请输入内容"></el-input>
</div>
</el-form-item>
</el-form>
......@@ -566,7 +568,7 @@ export default {
},
data(){
return{
activeName:'second',
activeName:'five',
addMsg:{},
HeadImagePath:'',
BottomImagePath:'',
......
<template>
<div class="usersList">
<div class="head-title">
分销商等级
<el-button @click="EditgoUrl" style="float:right;margin-top: -5px;" size="small" type="primary">
添加分销商等级
</el-button>
</div>
<div class="content">
<div>
<!-- <el-select class="w100" @change="getList" style="margin-right: 10px;" v-model="msg.Source" size="small" placeholder="请选择">
<el-option label="全部平台" :value="0"></el-option>
<el-option
v-for="item in platList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select> -->
<div class="searchInput" style="width:230px">
<el-input style="display:inline-block;width:205px;height:30px"
placeholder="请输入分销商等级名称查询"
v-model="msg.Name"
size="small"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
</div>
<el-table
:data="tableData"
v-loading="loading"
border
style="width: 100%;margin:20px 0">
<el-table-column
prop="Id"
label="ID">
</el-table-column>
<el-table-column
prop="address"
label="分销商等级">
<template slot-scope="scope">
等级{{scope.row.Grade}}
</template>
</el-table-column>
<el-table-column
prop="Name"
label="分销商等级名称">
</el-table-column>
<el-table-column
prop="UpGradeCondition"
label="升级条件">
<template slot-scope="scope">
<el-tag v-if="scope.row.IsAutoUpGrade==2" type="warning">不可自动升级</el-tag>
<el-tag v-if="scope.row.IsAutoUpGrade==1" type="success">可自动升级</el-tag>
</template>
</el-table-column>
<el-table-column
prop="OneCommission"
label="一级佣金">
<template slot-scope="scope">
<span v-if="scope.row.DistributionCommissionType==1">{{scope.row.OneCommission}}%</span>
<span v-if="scope.row.DistributionCommissionType==2">{{scope.row.OneCommission}}</span>
</template>
</el-table-column>
<el-table-column
prop="name"
label="二级佣金">
<template slot-scope="scope">
<span v-if="tierInfo.DistributorTier==2 || tierInfo.DistributorTier==3">
<span v-if="scope.row.DistributionCommissionType==1">{{scope.row.TwoCommission}}%</span>
<span v-if="scope.row.DistributionCommissionType==2">{{scope.row.TwoCommission}}</span>
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column
prop="name"
label="三级佣金">
<template slot-scope="scope">
<span v-if="tierInfo.DistributorTier==3">
<span v-if="scope.row.DistributionCommissionType==1">{{scope.row.ThreeCommission}}%</span>
<span v-if="scope.row.DistributionCommissionType==2">{{scope.row.ThreeCommission}}</span>
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column
prop="name"
label="启用状态">
<template slot-scope="scope">
<el-switch
@change="SetEnabled(scope.row)"
v-model="scope.row.Enabled"
active-color="#409EFF"
:active-value="1"
:inactive-value="2">
</el-switch>
</template>
</el-table-column>
<el-table-column
prop="address"
width="150"
label="操作">
<template slot-scope="scope">
<img @click="EditgoUrl(scope.row)" style="width:32px;height:32px" src="../../assets/img/userman/edit.png" alt="">
<img v-if="scope.row.Enabled==2" @click="Delete(scope.row,1)" style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/del.png" alt="">
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:total="total">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
data() {
return {
czType:1,
czjfDig:false,
changeState:false,
loading:false,
isIndeterminate: true,
addMsg:{},
dialogVisible:false,
value:'',
options:[],
tableData:[],
msg:{
pageIndex:1,
pageSize:15,
Name:'',
Grade:0,
MemberGrade:0,
Enabled:0,
},
total:0,
addMsg:{
MallBaseId:0,
Type:1,
UserId:0,
Integral:0,
Image:'',
Description:'',
},
tierInfo:{},
};
},
created() {
this.getList();
this.GetTierInfo();
this.addMsg.MallBaseId=this.getLocalStorage().MallBaseId;
},
methods: {
SetEnabled(row){
let that=this;
that.apipost(
"/api/user/SetDistributorGradeEnabledStatus",
{GradeId:row.Id},
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
} else {
that.Error(res.data.message);
}
},
null
);
},
Delete(row){
let that=this;
that.Confirm("是否删除?", function () {
that.apipost(
"/api/user/DelDistributorGradeInfo",
{GradeId:row.Id},
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList();
} else {
that.Error(res.data.message);
}
},
null
);
});
},
EditgoUrl(row){
if(row){
this.$router.push({
name: 'setDistributorLevel',
query: {
UserId:row.Id
}
});
}else{
this.$router.push({
name: 'setDistributorLevel',
});
}
},
getList(){
this.loading=true;
this.apipost("/api/user/GetDistributorGradePageList", this.msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.total=res.data.data.count;
let pageData=res.data.data.pageData;
this.tableData=pageData;
}
})
},
GetTierInfo(){
this.apipost("/api/user/GetDistributorTierInfo",{}, res => {
this.tierInfo=res.data.data;
})
},
handleCheckAllChange(val) {
this.checkedCities = val ? this.cityOptions : [];
this.isIndeterminate = false;
},
handleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.cities.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
},
mounted() {
}
};
</script>
<style>
.usersList .remark_name {
color: #888888;
font-size: 12px;
margin-left: 10px;
float: right;
}
.usersList .app-image{
background-position: center center;
width: 50px;
height: 50px;
border-radius:0%;
float: left;
margin-right: 8px;
}
.usersList .blue{
color:#409EFF;
}
.usersList .content .searchInput{
border: 1px solid #DCDFE6;
border-radius: 4px;
}
.usersList .content .searchInput .el-input__inner{
border:none;outline:none;
height: 30px;
line-height: 30px;
}
.usersList .content .searchInput{
line-height: normal;
display: inline-table;
width: 100%;
border-collapse: separate;
border-spacing: 0;
width:250px;
margin-right: 20px;
}
.usersList .content{
background: #fff;
margin-top:10px;
padding: 20px;
box-sizing: border-box;
}
</style>
This diff is collapsed.
<template>
<div v-loading="loading" class="setMember usersList usersListEdit">
<div class="head-title">
<span @click="goUrl" class="blue point">分销商等级</span> / 编辑分销商等级
</div>
<div class="content">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px">
<el-form-item label="分销商等级选择" prop="Grade">
<el-select style="width:500px;" size="small" v-model="addMsg.Grade" placeholder="请选择">
<el-option
v-for="(item,index) in 10"
:key="index"
:label="`等级${index+1}`"
:value="index+1">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="分销商等级名称" prop="Name">
<el-input v-model="addMsg.Name" style="width:500px" size="small"></el-input>
</el-form-item>
<el-form-item label="是否启用自动升级">
{{addMsg.IsAutoUpGrade}}
<el-switch
v-model="addMsg.IsAutoUpGrade"
active-color="#409EFF"
:active-value="1"
:inactive-value="2">
</el-switch>
</el-form-item>
<el-form-item v-if="addMsg.IsAutoUpGrade==1" label="升级条件">
<el-radio v-for="(item,index) in gradeList" v-model="addMsg.UpGradeCondition" :key="index" :label="item.Id">{{item.Name}}</el-radio>
</el-form-item>
<el-form-item prop="ReferralsNumber" v-if="addMsg.IsAutoUpGrade==1 && addMsg.UpGradeCondition==1" class="commonLabel" label="下线用户数">
<el-input v-model="addMsg.ReferralsNumber" style="width:500px;" type="number" min="1" size="small" placeholder="请输入内容" class="input-with-select">
<el-button slot="append">%</el-button>
</el-input>
</el-form-item>
<el-form-item prop="TotalCommission" v-if="addMsg.IsAutoUpGrade==1 && addMsg.UpGradeCondition==2" class="commonLabel" label="累积佣金">
<el-input v-model="addMsg.TotalCommission" style="width:500px;" type="number" min="1" size="small" placeholder="请输入内容" class="input-with-select">
<el-button slot="append">%</el-button>
</el-input>
</el-form-item>
<el-form-item prop="CommissionWithdrawn" v-if="addMsg.IsAutoUpGrade==1 && addMsg.UpGradeCondition==3" class="commonLabel" label="已提现佣金">
<el-input v-model="addMsg.CommissionWithdrawn" style="width:500px;" type="number" min="1" size="small" placeholder="请输入内容" class="input-with-select">
<el-button slot="append">%</el-button>
</el-input>
</el-form-item>
<el-form-item label="分销佣金类型">
<el-radio v-model="addMsg.DistributionCommissionType" :label="1">百分比</el-radio>
<el-radio v-model="addMsg.DistributionCommissionType" :label="2">固定金额</el-radio>
</el-form-item>
<el-form-item class="commonLabel" label="一级佣金">
<el-input v-model="addMsg.OneCommission" style="width:500px;" type="number" min="1" size="small" placeholder="请输入内容" class="input-with-select">
<el-button slot="append">%</el-button>
</el-input>
</el-form-item>
<el-form-item v-if="tierInfo.DistributorTier==2 || tierInfo.DistributorTier==3" class="commonLabel" label="二级佣金">
<el-input v-model="addMsg.TwoCommission" style="width:500px;" type="number" min="1" size="small" placeholder="请输入内容" class="input-with-select">
<el-button slot="append">%</el-button>
</el-input>
</el-form-item>
<el-form-item v-if="tierInfo.DistributorTier==3" class="commonLabel" label="三级佣金">
<el-input v-model="addMsg.ThreeCommission" style="width:500px;" type="number" min="1" size="small" placeholder="请输入内容" class="input-with-select">
<el-button slot="append">%</el-button>
</el-input>
</el-form-item>
<el-form-item label="是否启用" prop="Enabled">
<el-switch
v-model="addMsg.Enabled"
active-color="#409EFF"
:active-value="1"
:inactive-value="2">
</el-switch>
</el-form-item>
<el-form-item label="等级说明" prop="GradeExplain">
<el-input type="textarea" row="2" v-model="addMsg.GradeExplain" style="width:500px" maxlength="80" show-word-limit></el-input>
</el-form-item>
</el-form>
</div>
<div style="margin-top:20px">
<el-button size="small" type="primary" @click="Save('addMsg')">保存</el-button>
</div>
</div>
</template>
<script>
export default {
data() {
return {
addMsg:{
Id:'',
Grade:1,
Name:'',
IsAutoUpGrade:1,
UpGradeCondition:1,
ReferralsNumber:0,
TotalCommission:0,
CommissionWithdrawn:0,
DistributionCommissionType:1,
OneCommission:0,
TwoCommission:0,
ThreeCommission:0,
Enabled:1,
GradeExplain:'',
},
val:'',
value:'',
total:0,
rules: {
Grade: [
{ required: true, message: '请选择分销商等级', trigger: 'change' }
],
Name: [
{ required: true, message: '请输入分销商等级名称', trigger: 'blur' }
],
GradeExplain: [
{ required: true, message: '请输入等级说明', trigger: 'blur' }
],
ReferralsNumber: [
{ required: true, message: '请输入下线用户数', trigger: 'blur' }
],
TotalCommission: [
{ required: true, message: '请输入累积佣金', trigger: 'blur' }
],
CommissionWithdrawn: [
{ required: true, message: '请输入已提现佣金', trigger: 'blur' }
],
Enabled:[
{ required: true, message: '请选择是否启用', trigger: 'change' }
],
},
GradeId:'',
loading:false,
tierInfo:{},
gradeList:[],
};
},
created() {
if(this.$route.query.UserId){
this.GradeId=this.$route.query.UserId;
this.getData()
}
this.GetTierInfo();
this.getgradeList();
},
methods: {
Save(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost("/api/user/SetDistributorGradeInfo",this.addMsg, res => {
if(res.data.resultCode==1){
this.goUrl();
}else {
this.Error(res.data.message);
}
})
} else {
return false;
}
});
},
openChangeDig(){
this.changeState=true;
},
goUrl(){
this.$router.push({
name: 'distributorLevel',
query: {
blank: "y"
}
});
},
GetTierInfo(){
this.apipost("/api/user/GetDistributorTierInfo",{}, res => {
this.tierInfo=res.data.data;
})
},
getData(){
this.loading=true;
this.apipost("/api/user/GetDistributorGradeInfo",{GradeId:this.GradeId}, res => {
this.loading=false;
this.addMsg=res.data.data;
})
},
getgradeList(){
this.apipost("/api/user/GetDistrbutorGradeUpdateEnumList",{}, res => {
this.gradeList=res.data.data;
console.log("this.gradeList",this.gradeList)
})
},
},
mounted() {
}
};
</script>
<style>
.usersListEdit .tip {
margin-left: 10px;
display: inline-block;
height: 30px;
line-height: 30px;
color: #ff4544;
background-color: #FEF0F0;
padding: 0 20px;
border-radius: 5px;
}
.usersListEdit .app-image{
background-size: cover; background-position: center center; width: 80px; height: 80px; border-radius: 0%;
}
.setMember .setTable .el-table__body .cell{
display: flex;
align-items: center;
}
.setMember .commonLabel .el-form-item__label{
margin-top: -4px;
}
.setMember .discount .el-form-item__label{
padding-right: 30px;
margin-top: -4px;
}
.setMember .el-form-item .elzk{
position: absolute;
left: -25px;
top:8px;
}
.setMember .el-form-item{
position: relative;
}
.usersList .blue{
color:#409EFF;
}
.usersList .content{
background: #fff;
margin-top:10px;
padding: 20px;
box-sizing: border-box;
}
</style>
<template>
<div class="chooseMeun">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="(item,index) in dataList" :label="item.PageTypeName" :name="item.PageTypeId+''" :key="index">
<template v-for="(subItem,subIndex) in item.SubMenuList">
<div :key="subIndex">
<el-checkbox v-model="subItem.IsChecked" :key="subIndex" @change="checkMenuChange(subItem)">
<span v-if="subItem.SelfPageName">{{subItem.SelfPageName}}</span>
<span v-else>{{subItem.PageName}} </span>
</el-checkbox>
</div>
</template>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
export default {
data() {
return {
dataList: [],
activeName: "1"
};
},
created() {},
methods: {
//复选框选择
checkMenuChange(subItem) {
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(item => {
if (item.SubMenuList && item.SubMenuList.length > 0) {
item.SubMenuList.forEach(subItem => {
subItem.IsChecked = false;
})
}
});
}
subItem.IsChecked = !subItem.IsChecked;
},
//获取选择的菜单
getChooseMenu() {
var obj = {
PageUrl: "",
IsParameter: 0,
ParameterValue: ""
};
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(item => {
if (item.SubMenuList && item.SubMenuList.length > 0) {
item.SubMenuList.forEach(subItem => {
if (subItem.IsChecked) {
obj.PageUrl = subItem.PageUrl;
obj.IsParameter = subItem.IsParameter;
obj.ParameterValue = subItem.ParameterValue;
}
})
}
});
}
return obj;
},
handleClick(tab, event) {},
//获取所有菜单
getList() {
this.apipost("/api/Tenant/GetMiniprogramPageListExt", {}, res => {
if (res.data.resultCode == 1) {
var dataArray = res.data.data;
if (dataArray && dataArray.length > 0) {
dataArray.forEach(item => {
if (item.SubMenuList && item.SubMenuList.length > 0) {
item.SubMenuList.forEach(subItem => {
subItem.IsChecked = false;
})
}
});
}
this.dataList = dataArray;
} else {
this.Info(res.data.message);
}
})
},
},
mounted() {
this.getList();
}
};
</script>
......@@ -330,7 +330,7 @@
</div>
<div class="mainRightContent">
<div class="mainRightTop">
<div class="mainRightLeft">微信小程序</div>
<div class="mainRightLeft" @click="goLittlePrograme">微信小程序</div>
<div class="marinRightList">
<ul>
<li>缓存</li>
......@@ -456,6 +456,14 @@
});
}
},
//跳转微信小程序
goLittlePrograme(){
let routeData = this.$router.resolve({
name: 'Fsetting',
query: {}
});
window.open(routeData.href, "_blank");
}
},
mounted() {
this.getMenuList();
......
......@@ -44,6 +44,24 @@ export default new Router({
name: 'setminipage',
component: resolve => require(['@/components/system/setminipage'], resolve),
},
{
path: '/Fsetting', //微信小程序设置
name: 'Fsetting',
component: resolve => require(['@/components/Fsetting'], resolve),
children: [
//店铺管理 微信基础设置
{
path: '/wexinappconfig',
name: 'wexinappconfig',
component: resolve => require(['@/components/StoreDesign/wexinappconfig'], resolve),
}, //店铺管理 微信基础设置
{
path: '/wexinappmsg',
name: 'wexinappmsg',
component: resolve => require(['@/components/StoreDesign/wexinappmsg'], resolve),
}
]
},
{
path: '/mall',
name: 'mall',
......@@ -102,6 +120,24 @@ export default new Router({
name: 'customSet',
component: resolve => require(['@/components/UserMan/customSet'], resolve),
},
// 用户管理 分销商管理 分销商等级
{
path: '/distributorLevel',
name: 'distributorLevel',
component: resolve => require(['@/components/UserMan/distributorLevel'], resolve),
},
// 用户管理 分销商管理 新增或编辑分销商等级
{
path: '/setDistributorLevel',
name: 'setDistributorLevel',
component: resolve => require(['@/components/UserMan/setDistributorLevel'], resolve),
},
// 用户管理 分销商管理 分销商
{
path: '/distributors',
name: 'distributors',
component: resolve => require(['@/components/UserMan/distributors'], resolve),
},
// 商品管理 素材管理
{
......@@ -163,6 +199,18 @@ export default new Router({
name: 'minititle',
component: resolve => require(['@/components/StoreDesign/minititle'], resolve),
}
, //店铺管理 版权设置
{
path: '/copyrightset',
name: 'copyrightset',
component: resolve => require(['@/components/StoreDesign/copyrightset'], resolve),
},
//店铺管理 用户中心
{
path: '/userCenter',
name: 'userCenter',
component: resolve => require(['@/components/StoreDesign/userCenter'], resolve),
}
]
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment