|
|
@@ -54,7 +54,8 @@ export default {
|
|
|
category: [],
|
|
|
columnStyle: null,
|
|
|
currentTabIndex: 0,
|
|
|
- account: ''
|
|
|
+ account: '',
|
|
|
+ pageTitle: ''
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -70,33 +71,35 @@ export default {
|
|
|
init () {
|
|
|
getOrderShop().then(res => {
|
|
|
})
|
|
|
- this._detail()
|
|
|
- let account = uni.getStorageSync('account')
|
|
|
-
|
|
|
- getShopUser().then(res => {
|
|
|
- // 设置分享
|
|
|
- let shareParams = {
|
|
|
- title: `${res.name}`, // 分享标题
|
|
|
- desc: "", // 分享内容
|
|
|
- imgUrl: '',
|
|
|
- // #ifndef H5
|
|
|
- pagePath: `/pages/home/index?fromUserId=${res.id}&account=${account}`
|
|
|
- // #endif
|
|
|
- }
|
|
|
- this.jweixinFn(shareParams)
|
|
|
- console.log('分享地址',`/pages/home/index?fromUserId=${res.id}&account=${account}`)
|
|
|
+ this._detail().then(res => {
|
|
|
+ let account = uni.getStorageSync('account')
|
|
|
+ console.log(this.pageTitle)
|
|
|
+ getShopUser().then(res => {
|
|
|
+ // 设置分享
|
|
|
+ let shareParams = {
|
|
|
+ title: this.pageTitle, // 分享标题
|
|
|
+ desc: "", // 分享内容
|
|
|
+ imgUrl: '',
|
|
|
+ // #ifndef H5
|
|
|
+ pagePath: `/pages/home/index?fromUserId=${res.id}&account=${account}`
|
|
|
+ // #endif
|
|
|
+ }
|
|
|
+ this.jweixinFn(shareParams)
|
|
|
+ console.log('分享地址',`/pages/home/index?fromUserId=${res.id}&account=${account}`)
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
_detail () {
|
|
|
- getMainIndex().then(res => {
|
|
|
+ return getMainIndex().then(res => {
|
|
|
this.data = res.data;
|
|
|
if (this.$util.isEmpty(res.data)) return false;
|
|
|
this.ad = res.data.ad.map(e => {
|
|
|
e.img = e.adImg;
|
|
|
return e;
|
|
|
});
|
|
|
+ this.pageTitle = res.data.sj.name
|
|
|
uni.setNavigationBarTitle({
|
|
|
- title:res.data.sj.name
|
|
|
+ title: this.pageTitle
|
|
|
})
|
|
|
this.category = res.data.category;
|
|
|
this.columnStyle = res.data.columnStyle;
|