|
|
@@ -1,68 +1,88 @@
|
|
|
<template>
|
|
|
<view class="app-content">
|
|
|
- <view class="app-round_bg"></view>
|
|
|
- <!-- 客户信息 -->
|
|
|
- <view class="module-com user-info">
|
|
|
- <view class="user-info_top">
|
|
|
- <view class="user-info_lf">
|
|
|
- <AppAvatarModule class="avatar" :src="userInfo.avatar" :width="100"></AppAvatarModule>
|
|
|
- <view class="dec-bx">
|
|
|
- <view>
|
|
|
- {{userInfo.shopName}}
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- No.{{userInfo.retailShopId}}
|
|
|
+ <templete v-if="!$util.isEmpty(userInfo)">
|
|
|
+ <view class="app-round_bg"></view>
|
|
|
+ <view class="module-com user-info">
|
|
|
+ <view class="user-info_top">
|
|
|
+ <view class="user-info_lf">
|
|
|
+ <AppAvatarModule class="avatar" :src="userInfo.avatar" :width="100"></AppAvatarModule>
|
|
|
+ <view class="dec-bx">
|
|
|
+ <view>
|
|
|
+ {{userInfo.shopName}}
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ No.{{userInfo.retailShopId}}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
+ <button
|
|
|
+ v-if="userInfo.isOpen === 0"
|
|
|
+ class="invite-bt" open-type="share">
|
|
|
+ 邀请开店
|
|
|
+ </button>
|
|
|
+ <view
|
|
|
+ v-else
|
|
|
+ class="already-shop">
|
|
|
+ <i class="iconfont iconweixinlaiyuan"></i>
|
|
|
+ 已开店
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="user-info_data order-wrap">
|
|
|
+ <view class="total-blo">
|
|
|
+ <view
|
|
|
+ class="total-list"
|
|
|
+ v-for="(item, index) in orderData"
|
|
|
+ :key="index"
|
|
|
+ @click="pageTo(item)"
|
|
|
+ >
|
|
|
+ <view class="app-color-3">{{ item.name }}</view>
|
|
|
+ <view :class="['list-num',index===0?'color-blue':'']">{{ item.value }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view
|
|
|
- v-if="userInfo.isOpen === 0"
|
|
|
- class="invite-bt">
|
|
|
- 邀请开店
|
|
|
+ </view>
|
|
|
+ <!-- iconfont iconweixinlaiyuan _i -->
|
|
|
+ </view>
|
|
|
+ <view class="module-com user-address_bx">
|
|
|
+ <view class="address-tit">
|
|
|
+ 门店地址
|
|
|
</view>
|
|
|
- <view
|
|
|
- v-else
|
|
|
- class="already-shop">
|
|
|
- <i class="iconfont iconweixinlaiyuan"></i>
|
|
|
- 已开店
|
|
|
+ <view class="address-des_bx">
|
|
|
+ <view>
|
|
|
+ <view>
|
|
|
+ {{userInfo.userName}} {{userInfo.mobile}}
|
|
|
+ </view>
|
|
|
+ <view class="">
|
|
|
+ {{userInfo.address}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <view
|
|
|
+ @click="pageTo({
|
|
|
+ url:'/admin/shopAdmin/bind'
|
|
|
+ })"
|
|
|
+ class="invite-bt white">
|
|
|
+ 关联微信
|
|
|
+ </view>
|
|
|
+ <i @click="callUp" class="iconfont icondianhua1"></i>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="user-info_data order-wrap">
|
|
|
- <view class="total-blo">
|
|
|
- <view
|
|
|
- class="total-list"
|
|
|
- v-for="(item, index) in orderData"
|
|
|
- :key="index"
|
|
|
- @click="pageTo(item)"
|
|
|
- >
|
|
|
- <view class="app-color-3">{{ item.name }}</view>
|
|
|
- <view :class="['list-num',index===0?'color-blue':'']">{{ item.value }}</view>
|
|
|
- </view>
|
|
|
+ <view class="module-com user-open_bx">
|
|
|
+ <view class="input-line-wrap">
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <div class="tui-title">延期付款</div>
|
|
|
+ <div class="switch_bx">
|
|
|
+ <text>已关闭</text>
|
|
|
+ <switch :checked="form.debt == 0 ? false : true" @change="remindChangeFn" />
|
|
|
+ </div>
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="true">
|
|
|
+ <div class="tui-title">消费记录</div>
|
|
|
+ <!-- <input v-model="form.name" placeholder-class="phcolor" class="tui-input" name="name" placeholder="请输入" maxlength="50" type="text" /> -->
|
|
|
+ </tui-list-cell>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- iconfont iconweixinlaiyuan _i -->
|
|
|
- </view>
|
|
|
- <view class="module-com user-address_bx">
|
|
|
- <view class="address-tit">
|
|
|
- 门店地址
|
|
|
- </view>
|
|
|
- <view class="address-des_bx">
|
|
|
- <view>
|
|
|
- <view>
|
|
|
- 冯宝宝 15280215347
|
|
|
- </view>
|
|
|
- <view class="">
|
|
|
- 中国北京北京市朝阳区还好软件园
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- <view class="invite-bt white">
|
|
|
- 关联微信
|
|
|
- </view>
|
|
|
- <i class="iconfont icondianhua1"></i>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ </templete>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -70,34 +90,41 @@
|
|
|
import { mapGetters } from "vuex";
|
|
|
// import AppVipModule from "@/components/module/app-vip";
|
|
|
import AppAvatarModule from "@/components/module/app-avatar";
|
|
|
-import ModalModule from "@/components/plugin/modal";
|
|
|
+// import ModalModule from "@/components/plugin/modal";
|
|
|
+import TuiListCell from '@/components/plugin/list-cell'
|
|
|
+import { share } from "@/mixins";
|
|
|
import {
|
|
|
getUserDet,
|
|
|
- remarkAdd,
|
|
|
- remarkDel,
|
|
|
- upgrade,
|
|
|
- rechargeB,
|
|
|
- resetPassword
|
|
|
+ debt
|
|
|
+ // remarkAdd,
|
|
|
+ // remarkDel,
|
|
|
+ // upgrade,
|
|
|
+ // rechargeB,
|
|
|
+ // resetPassword
|
|
|
} from "@/api/member";
|
|
|
export default {
|
|
|
name: "member-detail",
|
|
|
components: {
|
|
|
// AppVipModule,
|
|
|
AppAvatarModule,
|
|
|
- ModalModule
|
|
|
+ // ModalModule,
|
|
|
+ TuiListCell
|
|
|
},
|
|
|
+ mixins: [share],
|
|
|
props: {},
|
|
|
data() {
|
|
|
return {
|
|
|
- userInfo: {
|
|
|
- avatar:''
|
|
|
+ userInfo: {},
|
|
|
+ form:{
|
|
|
+ name:'',
|
|
|
+ debt: 0
|
|
|
},
|
|
|
// 订单总览
|
|
|
orderData: [
|
|
|
{
|
|
|
name: "欠款",
|
|
|
value: 0,
|
|
|
- url: "/admin/home/order",
|
|
|
+ url: "",
|
|
|
type: 4,
|
|
|
query: {
|
|
|
|
|
|
@@ -106,7 +133,7 @@ export default {
|
|
|
{
|
|
|
name: "消费次数",
|
|
|
value: 0,
|
|
|
- url: "/admin/home/order",
|
|
|
+ url: "",
|
|
|
type: 4,
|
|
|
query: {
|
|
|
|
|
|
@@ -129,18 +156,43 @@ export default {
|
|
|
},
|
|
|
onLoad() {},
|
|
|
methods: {
|
|
|
- callUp(phone) {
|
|
|
+ async remindChangeFn(e){
|
|
|
+ this.form.debt = e.detail.value ? 1 : 0;
|
|
|
+ try {
|
|
|
+ let res = await debt({
|
|
|
+ debt: this.form.debt,
|
|
|
+ customId: this.userInfo.id
|
|
|
+ })
|
|
|
+ let msg = e.detail.value?'开启延期付款':'关闭延期付款'
|
|
|
+ this.$msg(msg);
|
|
|
+ } catch (err) {
|
|
|
+ console.log(err)
|
|
|
+ // 错误捕获
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ callUp() {
|
|
|
uni.makePhoneCall({
|
|
|
- phoneNumber: phone //仅为示例
|
|
|
+ phoneNumber: this.userInfo.mobile //仅为示例
|
|
|
});
|
|
|
},
|
|
|
init() {
|
|
|
this._getUserDet();
|
|
|
- // getLevel();
|
|
|
},
|
|
|
_getUserDet() {
|
|
|
getUserDet({ id: this.option.id }).then(res => {
|
|
|
this.userInfo = res.data;
|
|
|
+ this.form.debt = this.userInfo.debt
|
|
|
+ this.orderData[0].value = this.userInfo.debtAmount
|
|
|
+ this.orderData[1].value = this.userInfo.buyNum
|
|
|
+ this.orderData[2].value = this.userInfo.buyAmount
|
|
|
+ let params = {
|
|
|
+ title: "更懂您的花卉宝",
|
|
|
+ desc: "",
|
|
|
+ imgUrl: this.constant.imgUrl + "/retail/official/banner-1.png",
|
|
|
+ pagePath: "admin/official/index?introMerchantId=" + res.data.id
|
|
|
+ };
|
|
|
+ this.jweixinFn(params);
|
|
|
});
|
|
|
},
|
|
|
// operate ===========================
|
|
|
@@ -221,6 +273,9 @@ export default {
|
|
|
text-align: center;
|
|
|
border-radius: 25px;
|
|
|
border: 1px solid #DDDDDD;
|
|
|
+ padding: 0;
|
|
|
+ user-select: none;
|
|
|
+ outline: none;
|
|
|
&.white{
|
|
|
background-color: #FFFFFF;
|
|
|
color: #666666;
|
|
|
@@ -289,13 +344,32 @@ export default {
|
|
|
font-size: 28px;
|
|
|
font-weight: 400;
|
|
|
margin-top: 20px;
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
& > view:nth-child(2) {
|
|
|
display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: flex-start;
|
|
|
+ & .icondianhua1 {
|
|
|
+ font-size: 44px;
|
|
|
+ color: #3385FF;
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.user-open_bx {
|
|
|
+ margin-top: 20px;
|
|
|
+ padding: 0;
|
|
|
+ & .switch_bx {
|
|
|
+ flex: 1;
|
|
|
+ text-align:right;
|
|
|
+ & > text {
|
|
|
+ color: #999999;
|
|
|
+ font-size: 28px;
|
|
|
+ display: inline-block;
|
|
|
+ margin-right: 22px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
</style>
|