增加定位功能

This commit is contained in:
Gao xiaosong
2020-06-13 01:38:36 +08:00
parent b23f9a2272
commit ba199ff02d
15 changed files with 170 additions and 117 deletions

View File

@ -174,7 +174,7 @@ export default {
})
.then(res => {
var data = res.data;
that.$store.commit("LOGIN", data.token, dayjs(data.expires_time));
that.$store.commit("login", data.token, dayjs(data.expires_time));
handleGetUserInfo();
})
.catch(err => {
@ -305,7 +305,7 @@ export default {
spread: cookie.get("spread")
})
.then(({ data }) => {
this.$store.commit("LOGIN", data.token, dayjs(data.expires_time));
this.$store.commit("login", data.token, dayjs(data.expires_time));
handleGetUserInfo();
// let replace=this.$yroute.query.replace
// if(replace){

View File

@ -149,7 +149,7 @@ export default {
.then(({ data }) => {
uni.hideLoading();
const expires_time = dayjs(data.expires_time);
store.commit("LOGIN", data.token, expires_time);
store.commit("login", data.token, expires_time);
that.$emit("changeswitch", false);
location.reload();
})
@ -164,7 +164,7 @@ export default {
} else {
cookie.set("loginType", "wechat", 60);
uni.hideLoading();
this.$store.commit("LOGOUT");
this.$store.commit("logout");
this.$emit("changeswitch", false);
}
},
@ -204,7 +204,7 @@ export default {
avatar: userInfo.avatar
}).then(
res => {
this.$store.dispatch("USERINFO", true);
this.$store.dispatch("userInfo", true);
this.$uni.showToast({
title: res.msg,
icon: "none",
@ -229,7 +229,7 @@ export default {
if (res.confirm) {
getLogout()
.then(res => {
this.$store.commit("LOGOUT");
this.$store.commit("logout");
clearAuthStatus();
location.href = location.origin;
})

View File

@ -115,9 +115,6 @@
</view>
</view>
<view class="myService">
<view class="title acea-row row-middle">
<text>我的服务</text>
</view>
<view class="serviceList acea-row row-middle">
<template v-for="(item, MyMenusIndex) in MyMenus">
<view
@ -129,7 +126,8 @@
<view class="pictrue">
<image :src="item.pic" />
</view>
<view>{{ item.name }}</view>
<view class="cell">{{ item.name }}</view>
<text class="iconfont icon-jiantou"></text>
</view>
</template>
</view>
@ -188,7 +186,7 @@ export default {
},
computed: mapGetters(["userInfo"]),
methods: {
...mapMutations(["UPDATE_AUTHORIZATIONPAGE", "CHANGE_TABTAR"]),
...mapMutations(["updateAuthorizationPage", "CHANGE_TABTAR"]),
goReturnList() {
this.$yrouter.push("/pages/order/ReturnList/index");
},
@ -240,7 +238,7 @@ export default {
.then(res => {
console.log(res);
// this.User();
thit.$store.dispatch("USERINFO", true);
thit.$store.dispatch("userInfo", true);
uni.hideLoading();
uni.showToast({
title: res.msg,
@ -250,7 +248,7 @@ export default {
})
.catch(error => {
uni.hideLoading();
thit.$store.dispatch("USERINFO", true);
thit.$store.dispatch("userInfo", true);
console.log(error);
uni.showToast({
title:
@ -353,7 +351,7 @@ export default {
},
onHide() {
console.log('离开用户中心')
this.UPDATE_AUTHORIZATIONPAGE(false);
this.updateAuthorizationPage(false);
}
};
</script>