From 8b0c13b27b2ea6d98f5769bb4658327bf17afa8e Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期日, 04 八月 2024 12:37:23 +0800 Subject: [PATCH] update 合伙人分享商品的绑定逻辑 --- pages/login/supplier-login.vue | 70 +++++---- sub_pages/customer/trade/list.vue | 104 +++++++++++--- pages/login/supplier-reg.vue | 8 sub_pages/customer/trade/trade.vue | 56 ++++--- App.vue | 6 pages/user/supplier-user.vue | 107 ++++++++------- sub_pages/customer/trade/detail.vue | 57 +++++++- 7 files changed, 266 insertions(+), 142 deletions(-) diff --git a/App.vue b/App.vue index 796812d..e44d83f 100644 --- a/App.vue +++ b/App.vue @@ -5,7 +5,7 @@ import storage from '@/plugins/storage.js' export default { - onLaunch: function(options) { + onLaunch: async function(options) { var query = options.q && decodeURIComponent(options.q) || '' var querydto = {} if (query) { @@ -52,9 +52,9 @@ } }); // #ifdef MP - if (true && storage.getItem('token')) { + if (true && storage.getItem('token')) { + const res = await this.$store.dispatch('getCurrentInfo'); setTimeout(async () => { - const res = await this.$store.dispatch('getCurrentInfo'); // #ifndef PUB_CUSTOMER if (this.currentInfo && this.currentInfo.id && !this.currentInfo.openId) { if (this.currentInfo.type === 'admin') { diff --git a/pages/login/supplier-login.vue b/pages/login/supplier-login.vue index 7bbbf57..f7c1619 100644 --- a/pages/login/supplier-login.vue +++ b/pages/login/supplier-login.vue @@ -58,7 +58,9 @@ <view class="topic-font m-l-a m-r-0" v-if="apitype!=='loginAdmin'" @click="toReg">前往注册</view> <!-- #ifdef PUB_CUSTOMER --> - <view class="topic-font m-l-a m-r-0" @click="toHome">返回首页</view> + <view class="topic-font m-l-a m-r-0" @click="toHome" v-if="!source">返回首页</view> + <view class="topic-font m-l-a m-r-0" @click="backpage" v-if="source==='jump'">返回上一页</view> + <!-- #endif --> <!-- #ifdef PUB_PARTNER --> <view class="topic-font m-l-a m-r-0" @click="()=>{ @@ -85,6 +87,8 @@ <script> export default { async onLoad(options) { + this.source = options.source || '' + this.sharePartnerUserId = options.sharePartnerUserId || '' // #ifdef PUB_CUSTOMER var query = options.q && decodeURIComponent(options.q) || '' var querydto = {} @@ -98,21 +102,21 @@ } catch (e) { console.error('error', e) } - } - try { - if (!querydto.partnerUserId) { - if (options.query && options.query.scene) { - //说明是特殊小程序二维码扫码跳转的 - var keyvalues = decodeURIComponent(options.query.scene).split("&") - for (var item of keyvalues) { - var tarr = item.split("=") - querydto[tarr[0]] = tarr[1] - } - } - } - - } catch (e) { - console.error('error2', e) + } + try { + if (!querydto.partnerUserId) { + if (options.query && options.query.scene) { + //说明是特殊小程序二维码扫码跳转的 + var keyvalues = decodeURIComponent(options.query.scene).split("&") + for (var item of keyvalues) { + var tarr = item.split("=") + querydto[tarr[0]] = tarr[1] + } + } + } + + } catch (e) { + console.error('error2', e) } @@ -248,19 +252,20 @@ //退出登录了,或者失效了 // uni.navigateTo({ // url: `/sub_pages/customer/customer-info/customer-info?source=step&partnerUserId=${querydto.partnerUserId}&partnerUserName=${querydto.partnerUserName}` - // }) - if (!querydto.partnerUserName) { - tmp.$message.showLoading() - const resname = await tmp.$http.request('get', '/api/customer/partner/name', { - params: { - id: querydto.partnerUserId - } - }) - tmp.$message.hideLoading() - if (resname.code == 0) { - querydto.partnerUserName = resname.data || '' - } - + // }) + if (!querydto.partnerUserName) { + tmp.$message.showLoading() + const resname = await tmp.$http.request('get', + '/api/customer/partner/name', { + params: { + id: querydto.partnerUserId + } + }) + tmp.$message.hideLoading() + if (resname.code == 0) { + querydto.partnerUserName = resname.data || '' + } + } uni.navigateTo({ url: `/pages/login/supplier-reg?partnerUserId=${querydto.partnerUserId}&partnerUserName=${querydto.partnerUserName}` @@ -334,6 +339,8 @@ phoneNumber: '', smsCode: '', + source: '', //来源 + sharePartnerUserId: '', //分享跳转登录的id checked: false, loginType: 'pwd', //pwd和code,密码和验证码登录 @@ -446,6 +453,9 @@ uni.redirectTo({ url: '/pages/login/supplier-reg' }) + // todo 如果是有分享id的,可能需要提前进行绑定 + + // #endif }, changeAll(e) { @@ -517,6 +527,8 @@ // uni.navigateBack(); // }, 1000); + //todo 登录后可能需要进行绑定 + } else { // uni.showToast({ // title: '登录失败!', diff --git a/pages/login/supplier-reg.vue b/pages/login/supplier-reg.vue index 135ff49..19649a0 100644 --- a/pages/login/supplier-reg.vue +++ b/pages/login/supplier-reg.vue @@ -79,8 +79,8 @@ </view> <!-- #ifdef PUB_CUSTOMER --> <!-- v-if="source==='step'" --> - <view class="topic-font m-l-0 m-r-a" @click="scanPartnerCode">扫码绑定合伙人 - </view> + <!-- <view class="topic-font m-l-0 m-r-a" @click="scanPartnerCode">扫码绑定合伙人 + </view> --> <!-- #endif --> <view class="topic-font m-l-a m-r-0" @click="toLogin">前往登录</view> @@ -166,6 +166,10 @@ uni.scanCode({ success: async function(res) { console.log('条码内容:' + res.result); + if (!res.result) { + that.$message.showToast('未识别出信息,如果是微信小程序二维码,请微信扫码打开') + return + } var dto = undefined try { if (res.result && (res.result.startsWith('http://') || res.result.startsWith( diff --git a/pages/user/supplier-user.vue b/pages/user/supplier-user.vue index 550037f..510ad92 100644 --- a/pages/user/supplier-user.vue +++ b/pages/user/supplier-user.vue @@ -336,50 +336,54 @@ order_pendding_num: 0, }; - }, - // #ifndef PUB_CUSTOMER - onShareAppMessage() { - let that = this; - var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' - var url = - `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 - return { - title: "花满芫", - path: url, - } - }, - onShareTimeline() { - let that = this; - var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' - var url = - `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 - return { - title: "花满芫", - path: url, - } - }, - // #endif - // #ifdef PUB_CUSTOMER - onShareAppMessage() { - let that = this; - var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' - var url = - `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 - return { - title: "花满芫", - path: url, - } - }, - onShareTimeline() { - let that = this; - var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' - var url = - `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 - return { - title: "花满芫", - path: url, - } - }, + }, + // #ifndef PUB_CUSTOMER + onShareAppMessage() { + let that = this; + var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO && + currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || '' + var url = + `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 + return { + title: "花满芫", + path: url, + } + }, + onShareTimeline() { + let that = this; + var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO && + currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || '' + var url = + `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 + return { + title: "花满芫", + path: url, + } + }, + // #endif + // #ifdef PUB_CUSTOMER + onShareAppMessage() { + let that = this; + var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO && + currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || '' + var url = + `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 + return { + title: "花满芫", + path: url, + } + }, + onShareTimeline() { + let that = this; + var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO && + currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || '' + var url = + `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 + return { + title: "花满芫", + path: url, + } + }, // #endif onShow() { this.getTj() @@ -427,14 +431,19 @@ uni.scanCode({ success: async function(res) { console.log('条码内容:' + res.result); + if (!res.result) { + that.$message.showToast('未识别出合伙人信息,如果是微信小程序二维码,请微信扫码打开') + return + } var dto = undefined try { - if (res.result && (res.result.startsWith('https://')||res.result.startsWith('http://')) && res.result.indexOf( + if (res.result && (res.result.startsWith('https://') || res.result.startsWith( + 'http://')) && res.result.indexOf( 'partnerUserId') >= 0) { - var arr = res.result.split("?")[1].split("&") + var arr = res.result.split("?")[1].split("&") dto = {} for (var item of arr) { - var tarr = item.split("=") + var tarr = item.split("=") // console.log('tarr',tarr) if (tarr[1]) { dto[tarr[0]] = tarr[1] @@ -456,8 +465,8 @@ } else { that.$message.showToast('二维码格式不正确扫码失败') } - } catch (e) { - console.log('e',e) + } catch (e) { + console.log('e', e) that.$message.showToast('二维码扫码错误') } }, diff --git a/sub_pages/customer/trade/detail.vue b/sub_pages/customer/trade/detail.vue index 1748d7e..720249b 100644 --- a/sub_pages/customer/trade/detail.vue +++ b/sub_pages/customer/trade/detail.vue @@ -146,6 +146,7 @@ id: '', dto: {}, shopnum: 0, + sharePartnerUserId: '', } }, onShow() { @@ -155,22 +156,41 @@ this.refreshShopNum() }, onLoad(options) { + console.log('trade detail options', options) this.id = options.id || '' if (this.id) { this.getDetail() } this.refreshShopNum() + if (options.partnerUserId) { + //合伙人绑定的,判断当前用户,是否有登录 + this.sharePartnerUserId = options.partnerUserId + // let tmp = this + // setTimeout(() => { + // if (!tmp.currentInfo.id) { + // //前往登录,,但是带上 + // } + // }, 500) + } }, // #ifdef PUB_CUSTOMER onShareAppMessage() { let that = this; var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO && currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || '' + //如果是合伙人的id,那么分享出去,需要附加id了 + console.log('onShareAppMessage', this.currentInfo) + + var partnerUserId = '' + if (that.currentInfo.partnerDTO && currentInfo.partnerDTO.id) { + partnerUserId = this.currentInfo.id + } var url = - `/sub_pages/customer/trade/detail?id=${this.id}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 + `/sub_pages/customer/trade/detail?partnerUserId=${partnerUserId}&id=${this.id}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 return { - title: this.dto.id ? (this.dto.name + " " + (this.dto.price || '-') + '元/扎 ' + (this.dto.unit || '')) : "花满芫", + title: this.dto.id ? (this.dto.name + " " + (this.dto.price || '-') + '元/扎 ' + (this.dto.unit || '')) : + "花满芫", path: url, } }, @@ -178,10 +198,16 @@ let that = this; var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO && currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || '' + //如果是合伙人的id,那么分享出去,需要附加id了 + var partnerUserId = '' + if (that.currentInfo.partnerDTO && currentInfo.partnerDTO.id) { + partnerUserId = this.currentInfo.id + } var url = - `/sub_pages/customer/trade/detail?id=${this.id}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 + `/sub_pages/customer/trade/detail?partnerUserId=${partnerUserId}&id=${this.id}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 return { - title: this.dto.id ? (this.dto.name + " " + (this.dto.price || '-') + '元/扎 ' + (this.dto.unit || '')) : "花满芫", + title: this.dto.id ? (this.dto.name + " " + (this.dto.price || '-') + '元/扎 ' + (this.dto.unit || '')) : + "花满芫", path: url, } }, @@ -212,9 +238,9 @@ }, async addnum(item, addnum) { if (!this.currentInfo.id) { - await this.$message.confirm('请前往登录') + // await this.$message.confirm('请前往登录') uni.navigateTo({ - url: '/pages/user/supplier-user' + url: `/pages/login/supplier-login?source=jump&sharePartnerUserId=${this.sharePartnerUserId}` }) return } @@ -257,7 +283,10 @@ }, async collectItem(dto) { if (!this.currentInfo.id) { - this.$message.showToast('请先登录') + // this.$message.showToast('请先登录') + uni.navigateTo({ + url: `/pages/login/supplier-login?source=jump&sharePartnerUserId=${this.sharePartnerUserId}` + }) return } await this.$message.confirm(`是否${dto.collection?'移除':'添加到'}收藏`) @@ -285,6 +314,13 @@ async submitShopping(dto) { //提交到购物车中 // this.$message.showLoading() + if (!this.currentInfo.id) { + // this.$message.showToast('请先登录') + uni.navigateTo({ + url: `/pages/login/supplier-login?source=jump&sharePartnerUserId=${this.sharePartnerUserId}` + }) + return + } const { code, data @@ -317,6 +353,13 @@ }, toShopping() { + if (!this.currentInfo.id) { + // this.$message.showToast('请先登录') + uni.navigateTo({ + url: `/pages/login/supplier-login?source=jump&sharePartnerUserId=${this.sharePartnerUserId}` + }) + return + } uni.navigateTo({ url: '/sub_pages/customer/shopping/shopping' }) diff --git a/sub_pages/customer/trade/list.vue b/sub_pages/customer/trade/list.vue index b65b6ef..8b14f74 100644 --- a/sub_pages/customer/trade/list.vue +++ b/sub_pages/customer/trade/list.vue @@ -34,11 +34,12 @@ <view> <!-- 查询条件 --> <view class="component-filter-container"> - <view class="flex1" @click.stop="order_show=true"> + <!-- order_show=true --> + <view class="flex1" @click.stop="$refs.popup_column.open()"> 排序{{ query.columnStr&&('-'+query.columnStr) || '' }} <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image> </view> - <view class="flex1" @click.stop="level_show=true"> + <view class="flex1" @click.stop="$refs.popup_level.open()"> {{ query.levelStr || '级别' }} <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image> </view> @@ -122,6 +123,55 @@ <u-picker :show="order_show" @confirm="select_order" keyName="label" :columns="order_columns" @cancel="order_show=false"></u-picker> + <uni-popup ref="popup_level" type="bottom"> + <view class="component-popup_input_all"> + <view class="text-center m-b-40" style="font-size: 48rpx;font-weight: 600;">点击选择不同级别</view> + <view v-for="(item,i) in level_columns" :key="i" class="m-t-20"> + <view class="m-t-12 flex value-items"> + <view class="value-item" @click="()=>{ + if(each.value!==query.value){ + query.level = each.value + query.levelStr = each.label + refreshList('post') + $refs.popup_level.close() + } + }" :class="[query.level==each.value?'cur':'']" v-for="(each, j) in item" :key="j"> + {{ each.label || '-' }} + </view> + </view> + </view> + <view class="button-space"></view> + <view> + <view class="button-green" @click="$refs.popup_level.close()">关闭 + </view> + </view> + </view> + </uni-popup> + <uni-popup ref="popup_column" type="bottom"> + <view class="component-popup_input_all"> + <view class="text-center m-b-40" style="font-size: 48rpx;font-weight: 600;">点击选择不同排序</view> + <view v-for="(item,i) in order_columns" :key="i" class="m-t-20"> + <view class="m-t-12 flex value-items"> + <view class="value-item" @click="()=>{ + if(each.value!==query.value){ + query.column = each.value + query.columnStr = each.label + refreshList('post') + $refs.popup_column.close() + } + }" :class="[query.column==each.value?'cur':'']" v-for="(each, j) in item" :key="j"> + {{ each.label || '-' }} + </view> + </view> + </view> + <view class="button-space"></view> + <view> + <view class="button-green" @click="$refs.popup_column.close()">关闭 + </view> + </view> + </view> + </uni-popup> + <uni-popup ref="popup_param" type="bottom"> <view class="component-popup_input_all" v-if="params"> <view class="text-center m-b-40" style="font-size: 48rpx;font-weight: 600;">商品参数设置</view> @@ -184,28 +234,30 @@ [] ] } - }, - // #ifdef PUB_CUSTOMER - onShareAppMessage() { - let that = this; - var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' - var url = - `/sub_pages/customer/trade/list?category=${this.query.category}&zoneId=${this.query.zoneId}&name=${this.query.name}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 - return { - title: "花满芫-商品列表", - path: url, - } - }, - onShareTimeline() { - let that = this; - var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' - var url = - `/sub_pages/customer/trade/list?category=${this.query.category}&zoneId=${this.query.zoneId}&name=${this.query.name}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 - return { - title: "花满芫-商品列表", - path: url, - } - }, + }, + // #ifdef PUB_CUSTOMER + onShareAppMessage() { + let that = this; + var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO && + currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || '' + var url = + `/sub_pages/customer/trade/list?category=${this.query.category}&zoneId=${this.query.zoneId}&name=${this.query.name}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 + return { + title: "花满芫-商品列表", + path: url, + } + }, + onShareTimeline() { + let that = this; + var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO && + currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || '' + var url = + `/sub_pages/customer/trade/list?category=${this.query.category}&zoneId=${this.query.zoneId}&name=${this.query.name}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 + return { + title: "花满芫-商品列表", + path: url, + } + }, // #endif async onLoad(options) { // this.list = [{},{}] @@ -375,9 +427,9 @@ // }, async addnum(item, addnum) { if (!this.currentInfo.id) { - await this.$message.confirm('请前往登录') + // await this.$message.confirm('请前往登录') uni.navigateTo({ - url: '/pages/user/supplier-user' + url: '/pages/login/supplier-login?source=jump' }) return } diff --git a/sub_pages/customer/trade/trade.vue b/sub_pages/customer/trade/trade.vue index 0c5ff7f..e0571ed 100644 --- a/sub_pages/customer/trade/trade.vue +++ b/sub_pages/customer/trade/trade.vue @@ -2,9 +2,11 @@ <view class="container-trade" :style="{'min-height':hidefooter?'':'calc(100vh - 20rpx)'}"> <view class="search-container m-t-12 flex" v-if="!hidefooter"> <view class="flex1 input"> - <u-input placeholder="请输入分类名称" v-model="query.name" clearable> + <u-input placeholder="请输入分类名称" v-model="query.name" clearable @confirm="buttonSearchFlow" @clear="()=>{ + $nextTick(()=>{buttonSearchFlow()}) + }"> <template slot="suffix"> - <uni-icons color="#20613D" type="search" size="24" @tap="buttonSearchFlow"></uni-icons> + <uni-icons color="#20613D" type="search" size="24" @click="buttonSearchFlow"></uni-icons> </template> </u-input> </view> @@ -39,8 +41,8 @@ @click.stop="toDetailList(item)"> <view class="m-r-10"> <!-- @click.stop="previewImg(item.imageUrl)" --> - <image :src="item.imageUrl" :class="[!item.stock?'':'']" - mode="scaleToFill" class="cover" :lazy-load="true"> + <image :src="item.imageUrl" :class="[!item.stock?'':'']" mode="scaleToFill" + class="cover" :lazy-load="true"> </image> </view> <view class="cateen_infos list"> @@ -109,28 +111,30 @@ currentCategory: {} } - }, - // #ifdef PUB_CUSTOMER - onShareAppMessage() { - let that = this; - var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' - var url = - `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 - return { - title: "花满芫", - path: url, - } - }, - onShareTimeline() { - let that = this; - var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' - var url = - `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 - return { - title: "花满芫", - path: url, - } - }, + }, + // #ifdef PUB_CUSTOMER + onShareAppMessage() { + let that = this; + var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO && + currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || '' + var url = + `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 + return { + title: "花满芫", + path: url, + } + }, + onShareTimeline() { + let that = this; + var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO && + currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || '' + var url = + `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 + return { + title: "花满芫", + path: url, + } + }, // #endif onPullDownRefresh() { this.$http.request('get', '/api/customer/flower/category/tree', {}).then(res => { -- Gitblit v1.9.3