Commit dd717bfa authored by leiqingsong's avatar leiqingsong

用户信息获取时好时坏的bug

parent 6f1eaae3
# 生产环境 部署生产环境放开这个 # 生产环境 部署生产环境放开这个
# VUE_APP_BASE_URL = "http://app.xitiansen.com" VUE_APP_BASE_URL = "http://app.xitiansen.com"
# 测试环境 部署测试环境放开这个 # 测试环境 部署测试环境放开这个
VUE_APP_BASE_URL = "http://8.131.244.76:81" # VUE_APP_BASE_URL = "http://8.131.244.76:81"
\ No newline at end of file \ No newline at end of file
...@@ -36,9 +36,9 @@ export default { ...@@ -36,9 +36,9 @@ export default {
}); });
}, },
methods: { methods: {
saveUser(data) { async saveUser(data) {
if (data) { if (data) {
getUserInfo().then(res => { await getUserInfo().then(res => {
console.log("存用户信息"); console.log("存用户信息");
if (res.code == 0) { if (res.code == 0) {
localStorage.setItem("user", JSON.stringify(res.data)); localStorage.setItem("user", JSON.stringify(res.data));
......
...@@ -38,7 +38,7 @@ export function uploadImage(params, file) { ...@@ -38,7 +38,7 @@ export function uploadImage(params, file) {
*/ */
export function versionUpdate(params) { export function versionUpdate(params) {
return request({ return request({
url: '/account/version', url: "/account/version",
method: "get", method: "get",
params params
}); });
...@@ -46,12 +46,11 @@ export function versionUpdate(params) { ...@@ -46,12 +46,11 @@ export function versionUpdate(params) {
/** /**
* 获取App下载路径 * 获取App下载路径
* @returns * @returns
*/ */
export function getAppDownUrl() { export function getAppDownUrl() {
return request({ return request({
url: '/account/download', url: "/account/download",
method: 'get' method: "get"
}) });
} }
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</div> </div>
<div v-if="title == '注册失败'" class="tip">{{ tip }}</div> <div v-if="title == '注册失败'" class="tip">{{ tip }}</div>
<div v-else class="tip"> <div v-else class="tip">
<a :href="androidUrl">下载安卓版App</a> | <a :href="androidUrl">下载安卓版App</a> |
<a :href="iosUrl">下载IOS版App</a> <a :href="iosUrl">下载IOS版App</a>
</div> </div>
<van-button @click="show = false">确定</van-button> <van-button @click="show = false">确定</van-button>
...@@ -86,8 +86,8 @@ export default { ...@@ -86,8 +86,8 @@ export default {
name: "Register", name: "Register",
data() { data() {
return { return {
androidUrl: '', androidUrl: "",
iosUrl: '', iosUrl: "",
form: { form: {
userId: "", userId: "",
sms: "", sms: "",
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
} }
}); });
} }
}) });
}, },
onClickHide() { onClickHide() {
this.show = false; this.show = false;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<van-cell-group class="group-1"> <van-cell-group class="group-1">
<van-cell title="用户名" :value="userName" /> <van-cell title="用户名" :value="userName" />
<!--is-link @click="onModefy" --> <!--is-link @click="onModefy" -->
<van-cell center title="头像" is-link @click="onModefy"> <van-cell center title="头像">
<img class="avatar-img" :src="imageBaseUrl + avatar" alt="头像" /> <img class="avatar-img" :src="imageBaseUrl + avatar" alt="头像" />
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
...@@ -90,7 +90,7 @@ export default { ...@@ -90,7 +90,7 @@ export default {
}; };
}, },
mounted() { mounted() {
console.log('读取用户信息'); console.log("读取用户信息");
this.imageBaseUrl = process.env.VUE_APP_BASE_URL; this.imageBaseUrl = process.env.VUE_APP_BASE_URL;
this.getUser(); this.getUser();
this.getAppVersion(); this.getAppVersion();
...@@ -105,9 +105,9 @@ export default { ...@@ -105,9 +105,9 @@ export default {
}, },
updateVersion() { updateVersion() {
const params = { const params = {
type: this.$bridgeToAppFun.userAgent === 'ios' ? 1 : 2, type: this.$bridgeToAppFun.userAgent === "ios" ? 1 : 2,
version: this.version.substr(2) version: this.version.substr(2)
} };
versionUpdate(params).then(res => { versionUpdate(params).then(res => {
this.versionShow = true; this.versionShow = true;
if (res.code == 1) { if (res.code == 1) {
......
...@@ -4,7 +4,7 @@ const name = "西田森App"; ...@@ -4,7 +4,7 @@ const name = "西田森App";
module.exports = { module.exports = {
publicPath: "/front", publicPath: "/front",
// outputDir: "front", outputDir: "front",
devServer: { devServer: {
proxy: { proxy: {
'/shop-mall': { '/shop-mall': {
......
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