Commit f175a236 authored by 黄奎's avatar 黄奎

11

parent 2cce1bb2
......@@ -222,14 +222,16 @@
b2bResult.groupId = b2bData.groupId;
b2bResult.contactNumber = b2bData.contactNumber;
uni.setStorageSync('b2b_user', b2bResult)
}
}, (error2) => {
if (that.isOpenAuth == 1) {
//未绑定的用户强制跳转到登录页面
that.$emit("changeuserinfo");
} else {
uni.redirectTo({
url: '/pages/jiuzhai/bind_Customer'
})
}
}, (error2) => {
uni.redirectTo({
url: '/pages/jiuzhai/bind_Customer'
})
});
}
}
......
......@@ -195,6 +195,7 @@
configId: 0, //线路带过来字段
cityId: 0, //线路带来字段
videoId: 0, //视频字段
b2bUser: {}, //同行信息
};
},
components: {
......@@ -415,22 +416,34 @@
if (options && options.cityId) {
this.cityId = options.cityId;
}
let set = uni.getStorageSync("basedata") ?
uni.getStorageSync("basedata").mall.setting : {};
this.setting = set;
that.u = uni.getStorageSync("mall_UserInfo");
that.b2bUser = uni.getStorageSync("b2b_user");
console.log("onLoad_setting", this.setting);
console.log("onLoad_b2bUser", this.b2bUser);
if (!that.u) {
that.u = {
nickName: "未登录",
avatarUrl: "",
};
that.showAuth = true;
} else if (!that.b2bUser && this.setting && this.setting.is_show_auth && this.setting.is_show_auth == 1) {
that.u = {
nickName: "未登录",
avatarUrl: "",
};
that.showAuth = true;
} else {
that.sharejump(); //4-9新加
}
// #endif
let set = uni.getStorageSync("basedata") ?
uni.getStorageSync("basedata").mall.setting : {};
this.setting = set;
if (!uni.getStorageSync("add_top_app")) {
uni.setStorageSync("add_top_app", {
add_top_app_show: 1,
......@@ -1016,6 +1029,9 @@
uni.setStorageSync("navs", res.data.navbar.navs);
}
uni.setStorageSync("basedata", res.data);
if (res.data && res.data.mall && res.data.mall.setting) {
this.setting = res.data.mall.setting;
}
if (Object.keys(this.$refs).length > 0 && this.$refs.study) {
//判断
......
......@@ -457,6 +457,7 @@
</view>
</template>
</view>
<auth v-if="showAuth&&is_show_auth==1" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
<u-picker mode="time" v-model="isShowDate" @confirm='getStratDate' :params="params"></u-picker>
<u-popup v-model="showTimePopup" mode="bottom" border-radius="20" length="90%" :safe-area-inset-bottom="true">
<canlendar @finish="chosenDateResult"></canlendar>
......@@ -467,9 +468,11 @@
</template>
<script>
import canlendar from "./components/time/index.vue"
import auth from "@/components/auth/index.vue";
export default {
components: {
canlendar
canlendar,
auth
},
data() {
return {
......@@ -574,7 +577,11 @@
"天数日期",
"出发城市"
],
CityId: 0
CityId: 0,
showAuth: false,
is_show_auth: 0, //是否显示授权弹窗
b2bUser: {}, //同行信息
mallUserInfo: {},
};
},
created() {
......@@ -583,7 +590,7 @@
})
},
onLoad(option) {
console.log("option",option);
console.log("option", option);
if (option && option.LineTeamIds) {
let NewArr = [];
NewArr = option.LineTeamIds.split(",");
......@@ -601,9 +608,38 @@
if (option && option.teamType && option.teamType == "1") {
this.msg.teamType = option.teamType;
}
let basedata = uni.getStorageSync("basedata");
//判断后台是否开启自动授权
if (basedata && basedata.mall && basedata.mall.setting && basedata.mall.setting && basedata.mall.setting.is_show_auth ==
1) {
this.is_show_auth = 1;
}
this.b2bUser = uni.getStorageSync("b2b_user");
this.mallUserInfo = uni.getStorageSync("mall_UserInfo");
if (!this.mallUserInfo) {
this.mallUserInfo = {
nickName: "未登录",
avatarUrl: "",
};
this.showAuth = true;
} else if (!this.b2bUser && this.is_show_auth == 1) {
this.U = {
nickName: "未登录",
avatarUrl: "",
};
this.showAuth = true;
}
this.getLineQuery();
},
methods: {
reloadUserinfo() {
this.b2bUser = uni.getStorageSync("b2b_user");
this.mallUserInfo = uni.getStorageSync("mall_UserInfo");
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
},
allTeamsChangeHandler(e) {
this.allTeams = e.detail.value.length > 0
if (this.allTeams && this.msg.team.length > 0) {
......@@ -720,7 +756,7 @@
this.optionsTitle[1] = '线路玩法'
this.currentLineId = null
this.msg.lineId = 0;
this.msg.PlaceIds="";
this.msg.PlaceIds = "";
this.allTeams = false
this.$forceUpdate()
this.$refs.uDropdown.close();
......@@ -754,7 +790,7 @@
this.research();
},
setTeams(teamId) {
this.msg.PlaceIds="";
this.msg.PlaceIds = "";
let id = teamId
let temp = this.msg.team.indexOf(id)
if (temp == -1) {
......
......@@ -1012,6 +1012,7 @@
isDownloading: false,
startCities: [],
is_show_auth: 0, //是否配置启用授权(1-开启)
b2bUser: {}, //同行信息
};
},
created() {},
......@@ -1049,6 +1050,7 @@
}
this.getDetails();
this.U = uni.getStorageSync("mall_UserInfo");
this.b2bUser = uni.getStorageSync("b2b_user");
let basedata = uni.getStorageSync("basedata");
//判断后台是否开启自动授权
if (basedata && basedata.mall && basedata.mall.setting && basedata.mall.setting && basedata.mall.setting.is_show_auth ==
......@@ -1062,6 +1064,12 @@
avatarUrl: "",
};
this.showAuth = true;
} else if (!this.b2bUser && this.is_show_auth == 1) {
this.U = {
nickName: "未登录",
avatarUrl: "",
};
this.showAuth = true;
}
let that = this;
uni.getSystemInfo({
......@@ -1141,6 +1149,7 @@
})
},
reloadUserinfo() {
this.b2bUser = uni.getStorageSync("b2b_user");
this.u = uni.getStorageSync("mall_UserInfo");
},
//关闭登录窗口
......@@ -1446,6 +1455,7 @@
//立即预定
goReserce() {
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
......@@ -1455,6 +1465,16 @@
this.is_show_auth = 1;
return;
}
this.b2bUser = uni.getStorageSync("b2b_user");
if (!this.b2bUser) {
this.u = {
nickName: "未登录",
avatarUrl: "",
};
this.showAuth = true;
this.is_show_auth = 1;
return;
}
let myObj = {};
myObj.startCityName = this.dataList.startCityName;
myObj.startDate = this.currentPrice.startDate;
......@@ -1469,7 +1489,7 @@
myObj.b2BMemberPrice = this.currentPrice.b2BMemberPrice;
myObj.tcid = this.currentPrice.tcid;
myObj.teamType = this.currentPrice.teamType;
myObj.lineteamId=this.dataList.lineteamId;
myObj.lineteamId = this.dataList.lineteamId;
let imgCover = JSON.parse(this.dataList.imgCover);
if (imgCover.length > 0) {
myObj.CoverImg = imgCover[0].Url;
......
......@@ -208,15 +208,6 @@
};
},
created() {
this.userInfo = uni.getStorageSync("mall_UserInfo");
this.b2b_user_info = uni.getStorageSync('b2b_user');
if (!this.b2b_user_info || !this.b2b_user_info.token) {
this.showAuth = true;
} else {
this.getOrderInfo();
}
// #ifdef MP-ALIPAY
this.showBar = false;
// #endif
......@@ -236,11 +227,17 @@
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.userInfo = uni.getStorageSync("mall_UserInfo");
this.b2b_user_info = uni.getStorageSync('b2b_user');
if (!this.b2b_user_info) {
this.showAuth = true;
} else {
this.getOrderInfo();
}
},
methods: {
//获取订单状态名称
getOrderStateName(item) {
console.log("item", item);
var str = "待付款";
if (item.orderState == 1) {
str = "已付款"
......@@ -257,7 +254,9 @@
reloadUserinfo() {
this.userInfo = uni.getStorageSync("mall_UserInfo");
this.b2b_user_info = uni.getStorageSync('b2b_user');
this.getOrderInfo();
if (this.b2b_user_info) {
this.getOrderInfo();
}
},
goOrderDetail(item) {
uni.navigateTo({
......
......@@ -79,10 +79,10 @@
<text>{{ meueData.user_center.foot_bar[1].name }}</text>
</view>
<!--优惠劵-->
<view class="top_b_item" v-if=" meueData.user_center && meueData.user_center.is_account_status == 1" @click="goUrl(couponsObj.link_url)">
<!-- <view class="top_b_item" v-if=" meueData.user_center && meueData.user_center.is_account_status == 1" @click="goUrl(couponsObj.link_url)">
<text style="font-size: 21px">{{ user_info.coupon ? user_info.coupon : 0 }}</text>
<text>{{ couponsObj.name }}</text>
</view>
</view> -->
</view>
<view class="Receiptbalance" v-if=" meueData.user_center && meueData.user_center.is_account_status == 1">
......@@ -212,7 +212,7 @@
</view>
</view>
</template>
<!-- <view class="login-btn" style="margin:30px 0" @click='signOutHandler'>退出登录</view> -->
<view class="login-btn" style="margin:30px 0" @click='signOutHandler'>退出登录</view>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
<tabbars></tabbars>
......@@ -271,7 +271,6 @@
appId: "2021002181604459"
})),
userId: uni.getStorageSync("mall_UserInfo").UserId,
};
},
components: {
......@@ -298,18 +297,20 @@
this.isAttestationEdu = basedata.user_info.isAttestationEdu ?
basedata.user_info.isAttestationEdu :
0;
this.b2b_user_info = uni.getStorageSync('b2b_user')
},
onLoad() {
this.navHeight = this.$navHeight - 2;
this.u = wx.getStorageSync("basedata").user_info;
this.b2b_user_info = uni.getStorageSync('b2b_user')
this.mall_UserInfo = uni.getStorageSync("mall_UserInfo");
this.nav = uni.getSystemInfoSync().statusBarHeight + "px";
this.headStyle.background = `linear-gradient(to right, '#e6b865',80%, '#ebb45e')`;
this.headStyle.paddingTop = this.nav;
if (!this.mall_UserInfo) {
this.showAuth = true;
} else if (!this.b2b_user_info ) {
//&& this.setting && this.setting.is_show_auth == 1
this.showAuth = true;
}
},
mounted() {
......@@ -343,10 +344,7 @@
// #endif
},
onShow() {
this.userinfo(2);
if (this.mall_UserInfo) {
}
this.userCenterinfo(2);
let basedata = uni.getStorageSync("basedata") ?
uni.getStorageSync("basedata") :
"";
......@@ -355,6 +353,7 @@
0;
},
methods: {
//退出登录
signOutHandler() {
uni.removeStorageSync('b2b_user')
uni.removeStorageSync('mall_UserInfo')
......@@ -458,7 +457,7 @@
return flag;
},
//获取菜单配置
userinfo(type = 1) {
userCenterinfo(type = 1) {
uni.showNavigationBarLoading();
this.request2({
url: "/api/Mall/GetUserCenter",
......@@ -560,11 +559,11 @@
}
},
reloadUserinfo() {
this.userinfo();
this.b2b_user_info = uni.getStorageSync('b2b_user');
this.userCenterinfo();
this.u = this.user_info;
this.mall_UserInfo = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo") : {};
this.b2b_user_info = uni.getStorageSync('b2b_user');
this.getUserPoint();
},
login(name) {
......
......@@ -23,7 +23,7 @@ export default {
install(Vue, options) {
Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
// Vue.prototype.host2 = "http://192.168.5.46:5003"
// Vue.prototype.host2 = "http://192.168.5.46:8300"
// Vue.prototype.host3 = "http://192.168.5.46"
Vue.prototype.host2 = "https://erpmallapi.oytour.com"
Vue.prototype.host3 = "https://reborn.oytour.com"
......@@ -120,12 +120,12 @@ export default {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
uni.removeStorageSync('b2b_user')
uni.removeStorageSync('mall_UserInfo')
// uni.redirectTo({
// url: '/pages/jiuzhai/login'
// })
uni.redirectTo({
url: '/pages/index/index'
url: '/pages/jiuzhai/bind_Customer'
})
// uni.redirectTo({
// url: '/pages/index/index'
// })
} else if (res.data.resultCode != 1) {
if (!failed) {
if (res.data.message != '') {
......
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