Commit a41321f8 authored by 罗超's avatar 罗超

Merge branch 'B2C' of http://gitlab.oytour.com/zk123/jz_travel into B2C

parents 68fb5fb5 68403fa4
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
import coupon from "@/components/coupons/coupons"; import coupon from "@/components/coupons/coupons";
export default { export default {
props:['zanYang'],
components: { components: {
coupon, coupon,
}, },
...@@ -298,14 +299,26 @@ ...@@ -298,14 +299,26 @@
that.$emit("changeuserinfo"); that.$emit("changeuserinfo");
uni.setStorageSync("lastLogin",new Date().getTime()) uni.setStorageSync("lastLogin",new Date().getTime())
} else { } else {
if(this.zanYang){
uni.redirectTo({
url: `/pages/jiuzhai/bind_Customer?zanYang=${this.zanYang}`
})
}else{
uni.redirectTo({
url: '/pages/jiuzhai/bind_Customer'
})
}
}
}, (error2) => {
if(this.zanYang){
uni.redirectTo({
url: `/pages/jiuzhai/bind_Customer?zanYang=${this.zanYang}`
})
}else{
uni.redirectTo({ uni.redirectTo({
url: '/pages/jiuzhai/bind_Customer' url: '/pages/jiuzhai/bind_Customer'
}) })
} }
}, (error2) => {
uni.redirectTo({
url: '/pages/jiuzhai/bind_Customer'
})
}); });
}, },
updateuserinfo(msg) { updateuserinfo(msg) {
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</template> </template>
<coupon v-if="showCoupons" :coupon-message="couponMessage" :cform="ComeFrom" <coupon v-if="showCoupons" :coupon-message="couponMessage" :cform="ComeFrom"
@goLook="()=>showCoupons = false" @closeBtn="()=>showCoupons = false"></coupon> @goLook="()=>showCoupons = false" @closeBtn="()=>showCoupons = false"></coupon>
<auth v-if="showAuth&&is_show_auth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth> <auth v-if="showAuth&&is_show_auth" :zanYang="zanYang" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
<official-account></official-account> <official-account></official-account>
</view> </view>
</view> </view>
...@@ -123,6 +123,7 @@ ...@@ -123,6 +123,7 @@
isNavPosition: 0, isNavPosition: 0,
scrollTop: 0, scrollTop: 0,
is_show_auth: 0, is_show_auth: 0,
zanYang: 0
}; };
}, },
components: { components: {
...@@ -177,6 +178,10 @@ ...@@ -177,6 +178,10 @@
this.showCoupons = true; this.showCoupons = true;
this.couponMessage = uni.getStorageSync('coupons'); this.couponMessage = uni.getStorageSync('coupons');
} }
if (options.zanYang) {
this.zanYang = options.zanYang
}
}, },
mounted() { mounted() {
const that = this const that = this
...@@ -231,6 +236,12 @@ ...@@ -231,6 +236,12 @@
const bu = uni.getStorageSync('b2b_user') const bu = uni.getStorageSync('b2b_user')
if (!mu || !bu) this.showAuth = true if (!mu || !bu) this.showAuth = true
else{
if(this.zanYang){
this.$utils.goZanYangUrl()
}
}
}, },
methods: { methods: {
...@@ -369,6 +380,9 @@ ...@@ -369,6 +380,9 @@
setTimeout(() => { setTimeout(() => {
uni.removeStorageSync("LoginState") uni.removeStorageSync("LoginState")
}, 1000); }, 1000);
if(this.zanYang){
this.$utils.goZanYangUrl()
}
}, },
gbAuth() { gbAuth() {
this.showAuth = false; this.showAuth = false;
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
createBy:0, createBy:0,
}, },
ShareLoginstatus: false, ShareLoginstatus: false,
zanYang: 0,
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -58,6 +59,7 @@ ...@@ -58,6 +59,7 @@
} }
}) })
} }
if(option.zanYang) this.zanYang = option.zanYang
}, },
mounted() { mounted() {
...@@ -148,13 +150,13 @@ ...@@ -148,13 +150,13 @@
uni.setStorageSync('coupons',[{Name:tempData.CouponsName,Num:1}]) uni.setStorageSync('coupons',[{Name:tempData.CouponsName,Num:1}])
} }
let newUrl = '/pages/index/index'; let newUrl = this.zanYang?`/pages/index/index?zanYang=${this.zanYang}`:'/pages/index/index';
uni.redirectTo({ uni.redirectTo({
url: newUrl url: newUrl
}) })
} else { } else {
uni.redirectTo({ uni.redirectTo({
url: '/pages/index/index' url: this.zanYang?`/pages/index/index?zanYang=${this.zanYang}`:'/pages/index/index'
}) })
} }
} else { } else {
......
...@@ -239,25 +239,26 @@ ...@@ -239,25 +239,26 @@
}, },
methods: { methods: {
goExchange(){ goExchange(){
this.$utils.goZanYangUrl()
console.log(uni.getStorageSync('mall_UserInfo').OpenId,'积分商场') console.log(uni.getStorageSync('mall_UserInfo').OpenId,'积分商场')
uni.navigateToMiniProgram({ // uni.navigateToMiniProgram({
appId: 'wxacd9f8cc3480d29e', // appId: 'wxacd9f8cc3480d29e',
path: `pages/index/index?jzTravelOpenId=${uni.getStorageSync('mall_UserInfo').OpenId}`, // 目标页面路径(可选) // path: `pages/index/index?jzTravelOpenId=${uni.getStorageSync('mall_UserInfo').OpenId}`, // 目标页面路径(可选)
extraData: { // 传递给目标小程序的数据(可选) // extraData: { // 传递给目标小程序的数据(可选)
}, // },
envVersion: 'rel ease', // 目标版本(可选,默认 release;可选值:develop/trial/release) // envVersion: 'rel ease', // 目标版本(可选,默认 release;可选值:develop/trial/release)
success(res) { // success(res) {
console.log('跳转成功', res); // console.log('跳转成功', res);
}, // },
fail(err) { // fail(err) {
console.error('跳转失败', err); // console.error('跳转失败', err);
// 常见错误:-4(appId未声明)、-5(参数错误)、-100(用户拒绝) // // 常见错误:-4(appId未声明)、-5(参数错误)、-100(用户拒绝)
}, // },
complete() { // complete() {
console.log('跳转流程结束'); // console.log('跳转流程结束');
} // }
}); // });
}, },
goTisp(){ goTisp(){
this.showTisp = true this.showTisp = true
......
...@@ -206,6 +206,27 @@ function GetDateFewFaysLater(Days){ ...@@ -206,6 +206,27 @@ function GetDateFewFaysLater(Days){
} }
} }
function goZanYangUrl(){
uni.navigateToMiniProgram({
appId: 'wxacd9f8cc3480d29e',
path: `pages/index/index?jzTravelOpenId=${uni.getStorageSync('mall_UserInfo').OpenId}`, // 目标页面路径(可选)
extraData: { // 传递给目标小程序的数据(可选)
},
envVersion: 'release', // 目标版本(可选,默认 release;可选值:develop/trial/release)
success(res) {
console.log('跳转成功', res);
},
fail(err) {
console.error('跳转失败', err);
// 常见错误:-4(appId未声明)、-5(参数错误)、-100(用户拒绝)
},
complete() {
console.log('跳转流程结束');
}
});
}
export default { export default {
calcContentHeight, calcContentHeight,
SystemInfo, SystemInfo,
...@@ -217,5 +238,6 @@ export default { ...@@ -217,5 +238,6 @@ export default {
VersionUpdate, VersionUpdate,
formatDates, formatDates,
setAttatchParameter, setAttatchParameter,
GetDateFewFaysLater GetDateFewFaysLater,
goZanYangUrl
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment