|
|
|
@ -54,22 +54,16 @@ Component({
|
|
|
|
|
let n = this.data.list.findIndex(item => item.pagePath === `${page.route}`);
|
|
|
|
|
if(n === 2) {
|
|
|
|
|
app.globalData.request({
|
|
|
|
|
action: 'getUserMainBrand',
|
|
|
|
|
action: 'logOpenid',
|
|
|
|
|
openid: wx.getStorageSync('openid'),
|
|
|
|
|
token: wx.getStorageSync('token') || 't%2BrswgjvzGM='
|
|
|
|
|
}).then(res => {
|
|
|
|
|
app.globalData.request({
|
|
|
|
|
action: "getUserBrandHome",
|
|
|
|
|
brandname: res
|
|
|
|
|
}).then(data => {
|
|
|
|
|
let brandObj = data[0];
|
|
|
|
|
let arr = this.data.list;
|
|
|
|
|
arr[2].selectedIconPath = brandObj.img;
|
|
|
|
|
arr[2].selectedIconPath = res.brandnImg;
|
|
|
|
|
this.setData({
|
|
|
|
|
list: arr,
|
|
|
|
|
selected: n
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.setData({
|
|
|
|
|