Commit 37430cb0 authored by 罗超's avatar 罗超

优化跳转问题

parent 8d190f77
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
}, },
methods:{ methods:{
getUserVipInfo(){ getUserVipInfo(){
if(!this.user.customerId) return
const parameter = { const parameter = {
VipCusType:1, VipCusType:1,
CustomerId:this.user.customerId CustomerId:this.user.customerId
......
...@@ -1102,7 +1102,7 @@ ...@@ -1102,7 +1102,7 @@
</view> </view>
</view> </view>
</view> </view>
<auth v-if="showAuth&&is_show_auth==1" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
<u-popup v-model="showStartCities" mode="bottom" border-radius="20" length="60%" :safe-area-inset-bottom="true"> <u-popup v-model="showStartCities" mode="bottom" border-radius="20" length="60%" :safe-area-inset-bottom="true">
<view style="display: flex;flex-direction: column;height:100%;width:100%;"> <view style="display: flex;flex-direction: column;height:100%;width:100%;">
<view style="font-size: 24px; font-weight: 700;padding: 20px;font-family: city-font;"> <view style="font-size: 24px; font-weight: 700;padding: 20px;font-family: city-font;">
...@@ -1163,6 +1163,7 @@ ...@@ -1163,6 +1163,7 @@
}" @click="goReserce()">确定</u-button> }" @click="goReserce()">确定</u-button>
</view> </view>
</u-popup> </u-popup>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
</view> </view>
</template> </template>
<script> <script>
...@@ -1170,6 +1171,7 @@ ...@@ -1170,6 +1171,7 @@
import canlendar from "./components/sign/index.vue"; import canlendar from "./components/sign/index.vue";
import auth from "@/components/auth/index.vue"; import auth from "@/components/auth/index.vue";
import vip from "../../components/vip/vip.vue"; import vip from "../../components/vip/vip.vue";
export default { export default {
components: { components: {
canlendar, canlendar,
...@@ -1315,12 +1317,12 @@ ...@@ -1315,12 +1317,12 @@
}, },
onLoad(option) { onLoad(option) {
this.mc = this.$uiConfig.mainColor; this.mc = this.$uiConfig.mainColor;
if(!uni.getStorageSync("b2b_user")){ // if(!uni.getStorageSync("b2b_user")){
uni.redirectTo({ // uni.redirectTo({
url:'/pages/index/index' // url:'/pages/index/index'
}) // })
} // }
this.customer = uni.getStorageSync("b2b_user");
// #ifdef MP-DI // #ifdef MP-DI
this.delMsg.directCustomerId = this.customer.customerId this.delMsg.directCustomerId = this.customer.customerId
// #endif // #endif
...@@ -1414,6 +1416,7 @@ ...@@ -1414,6 +1416,7 @@
this.SaleId = item.CreateBy this.SaleId = item.CreateBy
}, },
getUserCouponList() { getUserCouponList() {
if(!this.customer.accountId) return
let couponParams = { let couponParams = {
"lineId": this.dataList.lineId, //线路ID "lineId": this.dataList.lineId, //线路ID
"lineteamId": this.dataList.lineteamId, //系列ID "lineteamId": this.dataList.lineteamId, //系列ID
...@@ -1456,6 +1459,7 @@ ...@@ -1456,6 +1459,7 @@
); );
}, },
getSale(){ getSale(){
if(!this.customer.customerId) return
this.apipost( this.apipost(
"b2b_get_GetCustomerCreateByList", "b2b_get_GetCustomerCreateByList",
{ {
...@@ -1538,8 +1542,15 @@ ...@@ -1538,8 +1542,15 @@
}) })
}, },
reloadUserinfo() { reloadUserinfo() {
this.b2bUser = uni.getStorageSync("b2b_user"); // this.b2bUser = uni.getStorageSync("b2b_user");
this.u = uni.getStorageSync("mall_UserInfo"); // this.u = uni.getStorageSync("mall_UserInfo");
// this.customer = this.b2bUser
console.log('reload')
const pages = getCurrentPages()
const curPage = pages[pages.length-1]
curPage.onLoad(curPage.options)
curPage.onShow()
curPage.onReady()
}, },
//关闭登录窗口 //关闭登录窗口
gbAuth() { gbAuth() {
...@@ -1704,20 +1715,24 @@ ...@@ -1704,20 +1715,24 @@
icon: 'none', icon: 'none',
title: '行程已下架,请查看其它行程' title: '行程已下架,请查看其它行程'
}) })
setTimeout(() => { // setTimeout(() => {
uni.redirectTo({ // uni.redirectTo({
url: '/pages/index/index' // url: '/pages/index/index'
}) // })
}) // },2000)
} }
}, },
(err) => { (err) => {
uni.hideLoading() uni.hideLoading()
setTimeout(() => { uni.showToast({
uni.redirectTo({ icon: 'none',
url: '/pages/index/index' title: '行程不见了,请查看其它行程'
})
}) })
// setTimeout(() => {
// uni.redirectTo({
// url: '/pages/index/index'
// },2000)
// })
} }
); );
}, },
......
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