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