优化:绑定上下级时 支持错误弹框提示
This commit is contained in:
parent
dcf5974380
commit
05999b15c0
|
|
@ -1,13 +1,25 @@
|
|||
|
||||
import { spread } from '@/api/user.js'
|
||||
import {spread} from '@/api/user.js'
|
||||
import Cache from '@/utils/cache'
|
||||
|
||||
const shareScence = function(spid,islogin) {
|
||||
if(spid)Cache.set("spread", spid || 0);
|
||||
if(spid && islogin){
|
||||
spread(spid).then(res=>{
|
||||
})
|
||||
}
|
||||
const shareScence = function (spid, islogin, isTips = false) {
|
||||
if (spid) Cache.set("spread", spid || 0);
|
||||
if (spid && islogin) {
|
||||
// 判断:是否已经提示
|
||||
spread(spid).then(res => {
|
||||
console.log("绑定关系 回调", res)
|
||||
}).catch(err => {
|
||||
console.log('错误', err)
|
||||
console.log('是否提示',isTips)
|
||||
if(isTips){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: err,
|
||||
confirmText: '关闭',
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
export default shareScence
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
<block v-if="item.name == 'hotRanking' && hot_ranking_switch != 0 && navIndex == 0">
|
||||
<hotRanking :dataConfig="item"></hotRanking>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP || APP-PLUS -->
|
||||
<homeComb class="home-comb" v-if="smallPage" :isScale="isScale" :isMenu="isMenu" :dataConfig="homeCombData" :isFixed="isFixed" :isScrolled="isScrolled" :userInfo="userInfo" @changeDiy="changeDiy" @bindHeight="bindHeighta"></homeComb>
|
||||
|
|
@ -125,7 +125,7 @@
|
|||
<view class="pictrues acea-row row-center-wrapper"><text class="iconfont icon-gengduo1"></text></view>
|
||||
<view class="text" style="margin-top: 22rpx;">更多</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="sortProduct.length > 0">
|
||||
<view class="list acea-row row-between-wrapper">
|
||||
<navigator @tap="goDetails(item)" class="item" v-for="(item, index) in sortProduct" :key="item.product_id">
|
||||
|
|
@ -159,7 +159,7 @@
|
|||
{{ loadTitle }}
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
<block v-if="sortProduct.length == 0">
|
||||
<view class="noCommodity">
|
||||
<view class="pictrue" style="margin: 0 auto;">
|
||||
|
|
@ -522,7 +522,7 @@ export default {
|
|||
query.exec(res =>{
|
||||
that.isScrolled = res[0].top <= -60
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
onHide() {
|
||||
uni.setStorageSync('isIntegral',false)
|
||||
|
|
@ -545,7 +545,7 @@ export default {
|
|||
uni.reLaunch({
|
||||
url: "/pages/index/index"
|
||||
});
|
||||
|
||||
|
||||
}, 50)
|
||||
// #endif
|
||||
},
|
||||
|
|
@ -560,7 +560,7 @@ export default {
|
|||
}, 1500);
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
pageLoad(options){
|
||||
let that = this;
|
||||
if (options.spid) {
|
||||
|
|
@ -593,7 +593,7 @@ export default {
|
|||
}
|
||||
}
|
||||
// #endif
|
||||
shareScence(that.currSpid, that.isLogin);
|
||||
shareScence(that.currSpid, that.isLogin, true);
|
||||
this.isLogin && silenceBindingSpread();
|
||||
this.reloadData();
|
||||
Promise.all([
|
||||
|
|
@ -677,7 +677,7 @@ export default {
|
|||
let that = this;
|
||||
let parmas = {
|
||||
id: id,
|
||||
did: that.diyId,
|
||||
did: that.diyId,
|
||||
version: '221'
|
||||
}
|
||||
that.styleConfig = []
|
||||
|
|
@ -690,7 +690,7 @@ export default {
|
|||
let data = res.data.data;
|
||||
uni.setNavigationBarTitle({
|
||||
title: data.title
|
||||
});
|
||||
});
|
||||
if (data.is_bg_color) {
|
||||
that.bgColor = data.color_picker
|
||||
}
|
||||
|
|
@ -973,7 +973,7 @@ export default {
|
|||
});
|
||||
},
|
||||
getCateData(){
|
||||
getCateData().then(res => {
|
||||
getCateData().then(res => {
|
||||
res.data.unshift({
|
||||
cate_name: '首页'
|
||||
});
|
||||
|
|
@ -1130,7 +1130,7 @@ page {
|
|||
padding: 0 20rpx;
|
||||
}
|
||||
.colum0{
|
||||
white-space: nowrap;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
}
|
||||
.ysize {
|
||||
|
|
@ -1674,7 +1674,7 @@ page {
|
|||
}
|
||||
.pictrue {
|
||||
position: relative;
|
||||
|
||||
|
||||
.border-picture {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue