From 0c100f6c702db0dd8cf696c595e83fb3fead0232 Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期六, 03 八月 2024 14:17:54 +0800 Subject: [PATCH] add 分享 --- pages/home/home.vue | 55 ++++++++++++++++++++++++++++--------------------------- 1 files changed, 28 insertions(+), 27 deletions(-) diff --git a/pages/home/home.vue b/pages/home/home.vue index 900bce8..a01f944 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -22,9 +22,9 @@ <view class="search-container m-t-12 flex" @click="goto('/pages/home/components/home-search',false)"> <view class="flex1 input"> <u-input placeholder="请输入花名" disabled v-model="search_flow"> - <template slot="suffix"> + <template slot="suffix"> <!-- @click="buttonSearchFlow" --> - <uni-icons color="#20613D" type="search" size="24" ></uni-icons> + <uni-icons color="#20613D" type="search" size="24"></uni-icons> </template> </u-input> </view> @@ -165,32 +165,33 @@ currentNotice: {} }; }, - // onShareAppMessage() { - // let that = this; - // var url = - // `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${this.currentInfo&&this.currentInfo.nickName||''}`; //你的转发页面路径拼接参数 - // return { - // title: "校购GO小狗狗", - // path: url, - // } - // }, - // onShareTimeline() { - // let that = this; - // var url = "/pages/home/home" //你的分享页面路径 - // return { - // title: '校购GO小狗狗', - // path: url, - // query: `shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${this.currentInfo&&this.currentInfo.nickName||''}`, //你的参数拼接,注意:不需要加? - // // imageUrl: 'https://cdn.uviewui.com/uview/swiper/1.jpg' //你分享的封面 - // }; - // }, + 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, + } + }, - onLoad(options) { - // if(options.partnerUserId){ - // //需要前往注册了 - // uni.navigateTo({ - // url: '/pages/login/supplier-login' - // }) + onLoad(options) { + // if(options.partnerUserId){ + // //需要前往注册了 + // uni.navigateTo({ + // url: '/pages/login/supplier-login' + // }) // } // console.log('home created') //这里进行一次初始化即可 -- Gitblit v1.9.3