|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
<template> |
|
|
|
|
<view class="user"> |
|
|
|
|
<view class="order-navbar"> |
|
|
|
|
<u-navbar title="会员管理" :border-bottom="false" :background="background"></u-navbar> |
|
|
|
|
<u-navbar :title="title" :border-bottom="false" :background="background"></u-navbar> |
|
|
|
|
</view> |
|
|
|
|
<view class="user-hd"> |
|
|
|
|
<view class="avater"> |
|
|
|
@ -16,16 +16,16 @@ |
|
|
|
|
</view> |
|
|
|
|
<view class="user-show"> |
|
|
|
|
<view class="a"> |
|
|
|
|
<text>余额(元)</text>¥{{form.expend_money?form.expend_money:0.00}} |
|
|
|
|
<text>余额(元)</text>¥{{form.balance?form.balance:0.00}} |
|
|
|
|
</view> |
|
|
|
|
<view class="a"> |
|
|
|
|
<text>积分(分)</text>{{form.grade?form.grade:0.00}} |
|
|
|
|
<text>积分(分)</text>{{form.points?form.points:0.00}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="user-order"> |
|
|
|
|
<view class="user-order" @click="goJump()"> |
|
|
|
|
<view class="a">关联订单</view> |
|
|
|
|
<view class="b"> |
|
|
|
|
<view class="num">99+</view> |
|
|
|
|
<view class="num" v-show="total>0">{{total}}</view> |
|
|
|
|
<u-icon name="arrow-right"></u-icon> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -34,18 +34,18 @@ |
|
|
|
|
<view class="b">编辑信息</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="user-bd"> |
|
|
|
|
<view class="item"> |
|
|
|
|
<!-- <view class="item"> |
|
|
|
|
<view class="a">登录密码</view> |
|
|
|
|
<view class="b"><view class="select select-on">****</view></view> |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
<view class="item"> |
|
|
|
|
<view class="a">上级推广人</view> |
|
|
|
|
<view class="b"> |
|
|
|
|
<view class="select select-on">张三</view> |
|
|
|
|
<u-icon style="margin-left: 10rpx;" name="arrow-right"></u-icon> |
|
|
|
|
<view class="select select-on">{{form.inviter?form.inviter.nick_name:''}}</view> |
|
|
|
|
<!-- <u-icon style="margin-left: 10rpx;" name="arrow-right"></u-icon> --> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="item"> |
|
|
|
|
<!-- <view class="item"> |
|
|
|
|
<view class="a">用户分组</view> |
|
|
|
|
<view class="b"> |
|
|
|
|
<view class="select">请选择用户分组</view> |
|
|
|
@ -65,10 +65,13 @@ |
|
|
|
|
<view class="b"> |
|
|
|
|
指定分销模式下,开启或关闭用户的推广权限 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> --> |
|
|
|
|
<view class="items"> |
|
|
|
|
<view class="a">推广权限 |
|
|
|
|
<u-switch v-model="checked" active-color="#55BD6A" ></u-switch></view> |
|
|
|
|
<u-switch v-model="form.is_allow_promotion" |
|
|
|
|
:activeValue="1" :inactiveValue="0" |
|
|
|
|
active-color="#55BD6A" ></u-switch> |
|
|
|
|
</view> |
|
|
|
|
<view class="b"> |
|
|
|
|
指定分销模式下,开启或关闭用户的推广权限 |
|
|
|
|
</view> |
|
|
|
@ -76,11 +79,13 @@ |
|
|
|
|
<view class="item"> |
|
|
|
|
<view class="a">用户状态</view> |
|
|
|
|
<view class="b"> |
|
|
|
|
<u-switch v-model="checked" active-color="#55BD6A" ></u-switch> |
|
|
|
|
<u-switch v-model="form.status" |
|
|
|
|
:activeValue="1" :inactiveValue="0" |
|
|
|
|
active-color="#55BD6A" ></u-switch> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="user-fd"> |
|
|
|
|
<view class="user-fd" @click="updateVipHandle"> |
|
|
|
|
<view class="b"> |
|
|
|
|
确认修改 |
|
|
|
|
</view> |
|
|
|
@ -89,6 +94,8 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import * as Vip from '@/api/user/vip' |
|
|
|
|
import * as newFunApi from '@/api/newFun' |
|
|
|
|
// import img from "@/static/news/login-bg.png" |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
@ -107,6 +114,8 @@ |
|
|
|
|
gender: "", |
|
|
|
|
grade: null, |
|
|
|
|
grade_id: null, |
|
|
|
|
inviter:null, |
|
|
|
|
is_allow_promotion:null, |
|
|
|
|
is_delete: null, |
|
|
|
|
last_login_time: null, |
|
|
|
|
mobile: "", |
|
|
|
@ -115,6 +124,7 @@ |
|
|
|
|
platform: "", |
|
|
|
|
points: null, |
|
|
|
|
province: null, |
|
|
|
|
status:null, |
|
|
|
|
store_id: null, |
|
|
|
|
update_time: "", |
|
|
|
|
user_id: null, |
|
|
|
@ -128,6 +138,8 @@ |
|
|
|
|
// background: 'url('+ img+') center top no-repeat', |
|
|
|
|
backgroundSize: '100% auto', |
|
|
|
|
}, |
|
|
|
|
title:'会员管理', |
|
|
|
|
total:0 |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -139,12 +151,55 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
goJump(){ |
|
|
|
|
if(this.title=='会员管理'){ |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url:"/pages/news3/shopOrder?user_id="+this.form.user_id |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url:"/pages/news3/shopDealerOrder?user_id="+this.form.user_id |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
async updateVipHandle(){ |
|
|
|
|
let params={ |
|
|
|
|
"user_id":this.form.user_id, |
|
|
|
|
"status":this.form.status?1:0, |
|
|
|
|
"is_allow_promotion":this.form.is_allow_promotion?1:0, |
|
|
|
|
} |
|
|
|
|
let res = await Vip.updateVip(params) |
|
|
|
|
|
|
|
|
|
if(res.status==200){ |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '修改成功' |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
onLoad(option) { |
|
|
|
|
async onLoad(option) { |
|
|
|
|
console.log(option) |
|
|
|
|
this.form = Object.assign({},this.form,JSON.parse(option.item)) |
|
|
|
|
console.log(this.form) |
|
|
|
|
this.form.is_allow_promotion = this.form.is_allow_promotion==1?true:false |
|
|
|
|
this.form.status = this.form.status==1?true:false; |
|
|
|
|
this.title = option.title; |
|
|
|
|
if(this.title=='会员管理'){ |
|
|
|
|
let { |
|
|
|
|
status, |
|
|
|
|
message, |
|
|
|
|
data |
|
|
|
|
} = await newFunApi.shopOrderList({ |
|
|
|
|
dataType: 'all', |
|
|
|
|
page: 1, |
|
|
|
|
}); |
|
|
|
|
if (status == 200) { |
|
|
|
|
this.total = data.list.total |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
this.total=0 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
@ -188,9 +243,10 @@ |
|
|
|
|
align-items: center; |
|
|
|
|
text{ |
|
|
|
|
display: block; |
|
|
|
|
width: 98rpx; |
|
|
|
|
// width: 98rpx; |
|
|
|
|
border: 1px solid #FFB950; |
|
|
|
|
height: 40rpx; |
|
|
|
|
// height: 40rpx; |
|
|
|
|
padding:0 10rpx; |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
font-weight: 400; |
|
|
|
|
color: #FFB343; |
|
|
|
|