From ba6fe53d97201c2cf577a1fb0906c819ea3cae33 Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期二, 30 七月 2024 00:05:20 +0800 Subject: [PATCH] 1 --- pages/user/supplier-user.vue | 97 +++++++++++++++++++++++++++++++++++++----------- 1 files changed, 74 insertions(+), 23 deletions(-) diff --git a/pages/user/supplier-user.vue b/pages/user/supplier-user.vue index a61e88f..9150b88 100644 --- a/pages/user/supplier-user.vue +++ b/pages/user/supplier-user.vue @@ -30,9 +30,12 @@ <view class="name" v-if="currentInfo.id"> <view class="t1"> {{ - (!!currentInfo.supplierDTO ? (currentInfo.supplierDTO.name) : "") || (!!currentInfo.customerDTO ? (currentInfo.customerDTO.name) : "") || currentInfo.nickName || currentInfo.loginName || '-' - }}<span v-if="currentInfo.supplierDTO&¤tInfo.supplierDTO.status!=='P'"> + (!!currentInfo.partnerDTO ? (currentInfo.partnerDTO.name) : "") || (!!currentInfo.supplierDTO ? (currentInfo.supplierDTO.name) : "") || (!!currentInfo.customerDTO ? (currentInfo.customerDTO.name) : "") || currentInfo.nickName || currentInfo.loginName || '-' + }} + <span v-if="currentInfo.supplierDTO&¤tInfo.supplierDTO.status!=='P'"> ({{ currentInfo.supplierDTO ? currentInfo.supplierDTO.statusStr : '' }})</span> + <span v-if="currentInfo.partnerDTO&¤tInfo.partnerDTO.status!=='P'"> + ({{ currentInfo.partnerDTO ? currentInfo.partnerDTO.statusStr : '' }})</span> </view> <view class="t2">{{ currentInfo.tel || '暂无电话' }}</view> </view> @@ -41,7 +44,8 @@ <!-- getUserProfile --> {{ '点击登陆' }} </view> - <image class="icon-setting" src="../../static/common/icon-setting.png" mode="aspectFit"></image> + <image class="icon-setting" @click="toInfo" + src="../../static/common/icon-setting.png" mode="aspectFit"></image> </view> <!-- #ifdef PUB_CUSTOMER --> <view class="customer-info-records"> @@ -90,7 +94,7 @@ <image src="../../static/images/customer/order/order-type-4.png" class="order-icon dpj"></image> <view>待评价</view> </view> - <view class="order-icons" @click="goto('/pages/order/order?status=COMPLETED',true)"> + <view class="order-icons" @click="goto('/pages/order/order-sale/order-sale',true)"> <image src="../../static/images/customer/order/order-type-5.png" class="order-icon sh"></image> <view>售后</view> </view> @@ -118,26 +122,26 @@ </image> <view>地址管理</view> </view> - <view class="service-icons" @click="goto('/pages/help/content?id=售后规则',false)"> + <view class="service-icons" @click="goto('/pages/help/content?id=售后规则',false)"> <image src="../../static/images/customer/service/service-icon-4.png" class="service-icon "> </image> <view>售后规则</view> </view> </view> <view class="flex service-icons-container"> - <view class="service-icons" @click="goto('/pages/help/content?id=新手帮助',false)"> + <view class="service-icons" @click="goto('/pages/help/content?id=新手帮助',false)"> <image src="../../static/images/customer/service/service-icon-5.png" class="t2 service-icon "> </image> <view>新手帮助</view> </view> - <!-- <view class="service-icons" @click.stop="$meesage.showToast('敬请期待')"> + <!-- <view class="service-icons" @click.stop="$meesage.showToast('敬请期待')"> <image src="../../static/images/customer/service/service-icon-6.png" class="t2 service-icon "> </image> <view>运费详查</view> </view> --> - + <view class="service-icons"></view> - + <view class="service-icons"></view> <view class="service-icons"></view> </view> @@ -145,7 +149,8 @@ </view> <!-- #endif --> <view class="user-utils m-20"> - <view class="user-util m-t-12 flex" @click="goto('/sub_pages/customer/customer-info/customer-info',true)"> + <view class="user-util m-t-12 flex" v-if="selftype==='customer'||!selftype" + @click="goto('/sub_pages/customer/customer-info/customer-info',true)"> <view class="title">个人信息</view> <view class="right-icon"> <uni-icons type="right"></uni-icons> @@ -158,6 +163,15 @@ <uni-icons type="right"></uni-icons> </view> </view> + <!-- #ifdef PUB_PARTNER --> + <view class="user-util m-t-12 flex" v-if="selftype==='partner'" + @click="goto('/sub_pages/partner/partner-info/partner-code',true)"> + <view class="title">推广的注册二维码</view> + <view class="right-icon"> + <uni-icons type="right"></uni-icons> + </view> + </view> + <!-- #endif --> <view class="user-util m-t-12 flex" v-if="selftype==='supplier'" @click="goto('/sub_pages/supplier/supplier-info/supplier-info',true)"> <view class="title">店铺信息</view> @@ -265,25 +279,25 @@ // StatusBar:0, tel: '15974805814', tj: {}, + cacheUserId: '', + }; }, + // watch: { + // currentInfo(nv, ov) { + // if (!cacheUserId) { + // } + // } + // }, + onShow() { + this.getTj() + }, onLoad(options) { // const url = options.q ? decodeURIComponent(options.q) : ''; // const urlcode = options.url && decodeURIComponent(options.url) || '' - // #ifdef PUB_CUSTOMER - if (this.currentInfo.id) { - let that = this - setTimeout(() => { - this.$http.request('get', '/api/customer/center/tj', {}).then(res => { - if (res.code === 0) { - that.tj = res.data || {} - } - }) - }, 200) - } - // #endif + }, created() { @@ -293,7 +307,44 @@ await this.$store.dispatch('getCurrentInfo') uni.stopPullDownRefresh() }, - methods: { + methods: { + toInfo(){ + var url = '' + if(this.currentInfo.id){ + // #ifdef PUB_CUSTOMER + url = '/sub_pages/customer/customer-info/customer-info' + // #endif + // #ifdef PUB_PARTNER + url = '/sub_pages/partner/partner-info/partner-info' + // #endif + // #ifdef PUB_SUPPLIER + url = '/sub_pages/supplier/supplier-info/supplier-info' + // #endif + if(url){ + uni.navigateTo({ + url:url + }) + } + } + }, + getTj() { + // /api/supplier/delivery + + if (this.currentInfo.id && this.currentInfo.id !== this.cacheUserId) { + this.cacheUserId = this.currentInfo.id + let that = this + setTimeout(() => { + // #ifdef PUB_CUSTOMER + this.$http.request('get', '/api/customer/center/tj', {}).then(res => { + if (res.code === 0) { + that.tj = res.data || {} + } + }) + // #endif + }, 200) + } + + }, async clearlogout() { await this.$message.confirm('是否退出登录?') -- Gitblit v1.9.3