修改登陆 不登陆能看 点击详情得登陆
This commit is contained in:
parent
d8aa633914
commit
ea21316c09
|
@ -526,9 +526,9 @@
|
|||
that.getHomeArtificerList();
|
||||
that.getHomeNearbyList();
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pages/public/login'
|
||||
})
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/public/login'
|
||||
// })
|
||||
}
|
||||
that.token = uni.getStorageSync('token');
|
||||
},
|
||||
|
@ -669,16 +669,32 @@
|
|||
});
|
||||
},
|
||||
goCity(){
|
||||
var that = this
|
||||
uni.navigateTo({
|
||||
url:'/pages/index/searchAddress?text='+'index'
|
||||
})
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
var that = this
|
||||
uni.navigateTo({
|
||||
url:'/pages/index/searchAddress?text='+'index'
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pages/public/login'
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
searchBtn(){//搜索按钮
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
uni.navigateTo({
|
||||
url:'/pages/my/fuwuGengduo?searchValue='+this.searchValue
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pages/public/login'
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
input(res) {//搜索 输入框
|
||||
this.searchValue=res;
|
||||
|
@ -687,14 +703,30 @@
|
|||
this.changeSelectData=e
|
||||
},
|
||||
shangcheng(){
|
||||
uni.navigateTo({
|
||||
url:'/package/pages/zysc/index/index'
|
||||
})
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
uni.navigateTo({
|
||||
url:'/package/pages/zysc/index/index'
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pages/public/login'
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
yuedao(text){
|
||||
uni.navigateTo({
|
||||
url:'/pages/shop/index?text='+text
|
||||
})
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
uni.navigateTo({
|
||||
url:'/pages/shop/index?text='+text
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pages/public/login'
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
closePopup(type){//提前结束 关闭弹出框
|
||||
this.type = type
|
||||
|
@ -728,9 +760,17 @@
|
|||
phoneNumber: kefuPhone //仅为示例
|
||||
});
|
||||
}else if(kefu == 3){
|
||||
uni.navigateTo({
|
||||
url: '/my/setting/customer'
|
||||
});
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
uni.navigateTo({
|
||||
url: '/my/setting/customer'
|
||||
});
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pages/public/login'
|
||||
})
|
||||
}
|
||||
|
||||
} else{
|
||||
// #ifdef MP-WEIXIN
|
||||
let that = this
|
||||
|
@ -860,31 +900,62 @@
|
|||
},
|
||||
|
||||
chaoji(){//超级满减
|
||||
uni.navigateTo({
|
||||
url:'/my/wallet/index'
|
||||
})
|
||||
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
uni.navigateTo({
|
||||
url:'/my/wallet/index'
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pages/public/login'
|
||||
})
|
||||
}
|
||||
},
|
||||
xinren(){//新人专享
|
||||
uni.navigateTo({
|
||||
url:'/my/hongbao/xinrenhongbao'
|
||||
})
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
uni.navigateTo({
|
||||
url:'/my/hongbao/xinrenhongbao'
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pages/public/login'
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
goNavs(e){
|
||||
uni.switchTab({
|
||||
url:e
|
||||
})
|
||||
},
|
||||
goNav(e){
|
||||
if(e!=undefined){
|
||||
uni.navigateTo({
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
uni.switchTab({
|
||||
url:e
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'敬请期待!'
|
||||
uni.navigateTo({
|
||||
url: '/pages/public/login'
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
goNav(e){
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
if(e!=undefined){
|
||||
uni.navigateTo({
|
||||
url:e
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'敬请期待!'
|
||||
})
|
||||
}
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pages/public/login'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
// chooseItem(item){
|
||||
|
@ -950,9 +1021,17 @@
|
|||
|
||||
},
|
||||
gengduo(){
|
||||
uni.reLaunch({
|
||||
url:'/pages/therapist/therapist'
|
||||
})
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
uni.reLaunch({
|
||||
url:'/pages/therapist/therapist'
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pages/public/login'
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
getCity(e) {
|
||||
|
@ -1112,45 +1191,77 @@
|
|||
},
|
||||
goDatail(item){//热门精选,推荐套餐 跳详情
|
||||
console.log("asdasdasddasd",item)
|
||||
if(item.type=='114'){
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
if(item.type=='114'){
|
||||
uni.navigateTo({
|
||||
url:'/pages/shop/qiyeDatail?id='+item.id+'&name='+'index'
|
||||
})
|
||||
}else if(item.type=='104'){
|
||||
uni.navigateTo({
|
||||
url:'/pages/my/serviceOderDrtail?id='+item.id+'&limit='+this.limit+'&page='+this.page+'&name='+'index'+'&isCanCoupon='+item.isCanCoupon
|
||||
})
|
||||
}else if(this.typeData=='105'){
|
||||
uni.navigateTo({
|
||||
url:'/pages/shop/qiyeDatail?id='+item.id+'&name='+'index'
|
||||
url:'/pages/my/cikarDrtail?id='+item.id+'&name='+'index'+'&isCanCoupon='+item.isCanCoupon
|
||||
})
|
||||
}else if(item.type=='104'){
|
||||
}else if(this.typeData=='106'){
|
||||
uni.navigateTo({
|
||||
url:'/pages/my/serviceOderDrtail?id='+item.id+'&limit='+this.limit+'&page='+this.page+'&name='+'index'+'&isCanCoupon='+item.isCanCoupon
|
||||
url:'/pages/my/fuwuliaochengDetail?id='+item.id+'&limit='+this.limit+'&page='+this.page+'&name='+'index'+'&isCanCoupon='+item.isCanCoupon
|
||||
})
|
||||
}else if(this.typeData=='105'){
|
||||
uni.navigateTo({
|
||||
url:'/pages/my/cikarDrtail?id='+item.id+'&name='+'index'+'&isCanCoupon='+item.isCanCoupon
|
||||
})
|
||||
}else if(this.typeData=='106'){
|
||||
uni.navigateTo({
|
||||
url:'/pages/my/fuwuliaochengDetail?id='+item.id+'&limit='+this.limit+'&page='+this.page+'&name='+'index'+'&isCanCoupon='+item.isCanCoupon
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url:'/pages/my/fuwuDateil?id='+item.id+'&limit='+this.limit+'&page='+this.page
|
||||
})
|
||||
}
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url:'/pages/my/fuwuDateil?id='+item.id+'&limit='+this.limit+'&page='+this.page
|
||||
url: '/pages/public/login'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
chengFel(item){//大家常买。。。 导航切换
|
||||
this.currentTabFl=item.id;
|
||||
if(this.currentTabFl=='1'){//大家常买
|
||||
this.remen()
|
||||
}else if(this.currentTabFl=='2'){// 全部项目
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
uni.navigateTo({
|
||||
url:'/pages/my/fuwuGengduo?text='+'index'
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pages/public/login'
|
||||
})
|
||||
}
|
||||
|
||||
}else if(this.currentTabFl=='3'){//行业大拿
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
uni.navigateTo({
|
||||
url:'/pages/my/hangyedana'
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pages/public/login'
|
||||
})
|
||||
}
|
||||
|
||||
}else{// 女性专区
|
||||
uni.navigateTo({
|
||||
url:'/pages/my/fuwuxiangm'
|
||||
})
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
uni.navigateTo({
|
||||
url:'/pages/my/fuwuxiangm'
|
||||
})
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pages/public/login'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
|
|
@ -268,6 +268,15 @@
|
|||
},
|
||||
onShow(){
|
||||
console.log('回到前台');
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
var add=uni.getStorageSync('cityAdderss');
|
||||
}else{
|
||||
var add=uni.getStorageSync('cityAdderss');
|
||||
uni.navigateTo({
|
||||
url: '/pages/public/login'
|
||||
})
|
||||
}
|
||||
if(this.isClick){
|
||||
this.dataList[this.k].state = 'pause';
|
||||
uni.createVideoContext(this.dataList[this.k].id+''+this.k,this).pause()
|
||||
|
|
Loading…
Reference in New Issue