|
@@ -24,11 +24,11 @@
|
|
|
<view class="operator-main">
|
|
|
<view v-if="isEmpty" class="empty-container">
|
|
|
<view class="txt">暂无运营人员</view>
|
|
|
- <view class="login-btn" @click="addAddress('add')">添加运营人员</view>
|
|
|
+ <view class="add-btn" @click="addAddress('add')">添加运营人员</view>
|
|
|
</view>
|
|
|
<view v-else class="operator-list">
|
|
|
<scroll-view scroll-y="true">
|
|
|
- <view class="list" v-for="(item, index) in operatorList" :key="index" @click="checkAddress(item)">
|
|
|
+ <view class="list" v-for="(item, index) in operatorList" :key="index" @click.stop="showOperatorModel(item)">
|
|
|
<view class="list-left">
|
|
|
<view class="list-head"><image :src="item.image" mode=""></image></view>
|
|
|
<view class="list-tel">
|
|
@@ -44,7 +44,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="opea-del">
|
|
|
- <view class="opea-type-cell">
|
|
|
+ <view class="opea-type-cell" @click.stop="deleteOperator(item)">
|
|
|
<text class="iconfont icon-shanchu"></text>
|
|
|
<text>删除</text>
|
|
|
</view>
|
|
@@ -55,19 +55,19 @@
|
|
|
<view class="add-btn" @click="addAddress('add')">添加运营人员</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="operator-model">
|
|
|
+ <view class="operator-model" v-if="isOperatorModel" @click.stop="closeModel">
|
|
|
<view class="operator-alert">
|
|
|
- <text class="iconfont icon-iconfontguanbi"></text>
|
|
|
+ <text class="iconfont icon-iconfontguanbi" @click.stop="closeModel"></text>
|
|
|
<view class="content">
|
|
|
- <view class="ciew-t">姓名:张三</view>
|
|
|
- <view class="ciew-t">手机号:15888888888</view>
|
|
|
- <view class="ciew-t">邀请码:456789<text>(已过期)</text></view>
|
|
|
- <view class="ciew-t">邀请码有效期:5天</view>
|
|
|
- <view class="ciew-t">状态:已绑定</view>
|
|
|
- <view class="ciew-t">添加时间:2020-03-18 17:09:58</view>
|
|
|
- <view class="ciew-t">绑定时间:2020-03-18 17:09:58</view>
|
|
|
+ <view class="ciew-t">姓名:{{modelData.name}}</view>
|
|
|
+ <view class="ciew-t">手机号:{{modelData.mobile}}</view>
|
|
|
+ <view class="ciew-t">邀请码:{{modelData.code ? modelData.code : '无'}}<text :style="{color: rexpStautsColor(modelData.status)}">{{modelStautsText(modelData.status)}}</text></view>
|
|
|
+ <view class="ciew-t">邀请码有效期:{{modelData.time}}</view>
|
|
|
+ <view class="ciew-t">状态:{{modelData.status == '2' ? '已绑定' : '未绑定'}}</view>
|
|
|
+ <view class="ciew-t">添加时间:{{modelData.addtime}}</view>
|
|
|
+ <view class="ciew-t">绑定时间:{{modelData.bindtime}}</view>
|
|
|
</view>
|
|
|
- <view class="btn">更新邀请码</view>
|
|
|
+ <view class="btn" v-if="modelData.status != '2'" @click.stop="updateInvitationCode">更新邀请码</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 删除弹窗 -->
|
|
@@ -104,12 +104,51 @@
|
|
|
deleteAddressId:'',
|
|
|
currPage:'',//当前页面
|
|
|
prevPage:'',//上一个页面
|
|
|
+ isOperatorModel:false,
|
|
|
operatorList:[
|
|
|
- {image:'../../../static/temp/logo@3x.png',name:'张三',mobile:'18888888888',status:'1'},
|
|
|
- {image:'../../../static/temp/logo@3x.png',name:'张三',mobile:'18888888888',status:'2'},
|
|
|
- {image:'../../../static/temp/logo@3x.png',name:'张三',mobile:'18888888888',status:'3'},
|
|
|
- {image:'../../../static/temp/logo@3x.png',name:'张三',mobile:'18888888888',status:'0'},
|
|
|
- ]
|
|
|
+ {
|
|
|
+ image:'../../../static/temp/logo@3x.png',
|
|
|
+ name:'张三',
|
|
|
+ mobile:'18888888888',
|
|
|
+ status:'1',
|
|
|
+ code:'456789',
|
|
|
+ time:'5',
|
|
|
+ static:'1',
|
|
|
+ addtime:'2020-03-18 23:48:56',
|
|
|
+ bindtime:'2020-03-18 23:48:56',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ image:'../../../static/temp/logo@3x.png',
|
|
|
+ name:'张三',
|
|
|
+ mobile:'18888888888',
|
|
|
+ status:'2',
|
|
|
+ code:'456789',
|
|
|
+ time:'5',
|
|
|
+ addtime:'2020-03-18 23:48:56',
|
|
|
+ bindtime:'2020-03-18 23:48:56',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ image:'../../../static/temp/logo@3x.png',
|
|
|
+ name:'张三',
|
|
|
+ mobile:'18888888888',
|
|
|
+ status:'3',
|
|
|
+ code:'456789',
|
|
|
+ time:'5',
|
|
|
+ addtime:'2020-03-18 23:48:56',
|
|
|
+ bindtime:'2020-03-18 23:48:56',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ image:'../../../static/temp/logo@3x.png',
|
|
|
+ name:'张三',
|
|
|
+ mobile:'18888888888',
|
|
|
+ status:'0',
|
|
|
+ code:'',
|
|
|
+ time:'5',
|
|
|
+ addtime:'2020-03-18 23:48:56',
|
|
|
+ bindtime:'2020-03-18 23:48:56',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ modelData:''
|
|
|
}
|
|
|
},
|
|
|
onLoad(option){
|
|
@@ -119,7 +158,7 @@
|
|
|
onReachBottom() {
|
|
|
// console.log('滑动到页面底部')
|
|
|
if(this.isLoadMore) {
|
|
|
- this.initAddressList();
|
|
|
+ // this.initAddressList();
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -159,27 +198,27 @@
|
|
|
}
|
|
|
)
|
|
|
})
|
|
|
+ },
|
|
|
+ showOperatorModel(item){
|
|
|
+ console.log(item)
|
|
|
+ this.isOperatorModel = true
|
|
|
+ this.modelData = item
|
|
|
},
|
|
|
- //选择地址
|
|
|
- checkAddress(item){
|
|
|
- //是否需要返回地址(从订单确认页跳过来选收货地址)
|
|
|
- if(!this.isSelect){return ;}
|
|
|
- uni.setStorageSync('selectAddress',item)
|
|
|
- var pages = getCurrentPages();
|
|
|
- var prevPage = pages[pages.length - 2]; //上一个页面
|
|
|
- prevPage.setData({select:'select'})
|
|
|
- uni.navigateBack();
|
|
|
+ closeModel(){
|
|
|
+ this.isOperatorModel = false
|
|
|
},
|
|
|
- addAddress(type,item){
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pages/user/address/addressManage?type=${type}&data=${JSON.stringify(item)}`
|
|
|
+ deleteOperator(id){//删除运营人员
|
|
|
+ console.log('删除地址的ID',id)
|
|
|
+ this.$util.modal('提示','确定删除运营人员吗?',true,() =>{
|
|
|
+
|
|
|
})
|
|
|
+ // this.isShowDelModal = true;
|
|
|
+ // this.deleteAddressId =id;
|
|
|
},
|
|
|
- //删除收货地址
|
|
|
- deleteAddress(id){
|
|
|
- console.log('删除地址的ID',id)
|
|
|
- this.isShowDelModal = true;
|
|
|
- this.deleteAddressId =id;
|
|
|
+ updateInvitationCode(){ //更新邀请码
|
|
|
+ this.$util.modal('提示','确定更新邀请码并发送给运营人员?',true,() =>{
|
|
|
+
|
|
|
+ })
|
|
|
},
|
|
|
confirmDetele(){
|
|
|
authorize.getCode('weixin').then(wechatcode =>{
|
|
@@ -222,31 +261,46 @@
|
|
|
break
|
|
|
}
|
|
|
return text
|
|
|
- },
|
|
|
- rexpStautsColor(status) {
|
|
|
- let textColor = ''
|
|
|
+ },
|
|
|
+ modelStautsText(status) {
|
|
|
+ let text = ''
|
|
|
switch (status) {
|
|
|
case '1':
|
|
|
- textColor = '#55BB00'
|
|
|
+ text = '(有效)'
|
|
|
break
|
|
|
case '2':
|
|
|
- textColor = '#0056BB'
|
|
|
+ text = '(已使用)'
|
|
|
break
|
|
|
case '3':
|
|
|
- textColor = '#BB0000'
|
|
|
+ text = '(已过期)'
|
|
|
break
|
|
|
}
|
|
|
- return textColor
|
|
|
- },
|
|
|
- iconStautsColor(status) {
|
|
|
- let textColor = ''
|
|
|
- if(status == '2'){
|
|
|
- textColor = '#09BB07'
|
|
|
- }else{
|
|
|
- textColor = '#DDDDDD'
|
|
|
- }
|
|
|
- return textColor
|
|
|
- },
|
|
|
+ return text
|
|
|
+ },
|
|
|
+ rexpStautsColor(status) {
|
|
|
+ let textColor = ''
|
|
|
+ switch (status) {
|
|
|
+ case '1':
|
|
|
+ textColor = '#55BB00'
|
|
|
+ break
|
|
|
+ case '2':
|
|
|
+ textColor = '#0056BB'
|
|
|
+ break
|
|
|
+ case '3':
|
|
|
+ textColor = '#BB0000'
|
|
|
+ break
|
|
|
+ }
|
|
|
+ return textColor
|
|
|
+ },
|
|
|
+ iconStautsColor(status) {
|
|
|
+ let textColor = ''
|
|
|
+ if(status == '2'){
|
|
|
+ textColor = '#09BB07'
|
|
|
+ }else{
|
|
|
+ textColor = '#DDDDDD'
|
|
|
+ }
|
|
|
+ return textColor
|
|
|
+ },
|
|
|
},
|
|
|
onShow() {
|
|
|
this.pageNum = 1;
|
|
@@ -447,7 +501,7 @@
|
|
|
margin: auto;
|
|
|
z-index: 992;
|
|
|
.operator-alert{
|
|
|
- width: 422rpx;
|
|
|
+ width: 430rpx;
|
|
|
height: 376rpx;
|
|
|
padding: 68rpx 32rpx;
|
|
|
background: #FFFFFF;
|
|
@@ -474,7 +528,7 @@
|
|
|
.ciew-t{
|
|
|
font-size: $font-size-base;
|
|
|
color: $text-color;
|
|
|
- line-height: 50rpx;
|
|
|
+ line-height: 48rpx;
|
|
|
}
|
|
|
}
|
|
|
.btn{
|