From 28911b6e7c7b04a1c7e0869d9a3779bee0aad22d Mon Sep 17 00:00:00 2001
From: ghusermoon <2673031505@qq.com>
Date: Mon, 22 Jun 2020 17:45:17 +0800
Subject: [PATCH] update token
---
common/api/user.js | 10 +
common/http.interceptor.js | 2 +-
components/mine/address-active/index.vue | 26 +-
.../mine/address-block/address-item.vue | 238 ++++++++----------
pageA/login/login.vue | 2 +-
pageE/more/AddAddress.vue | 6 +-
pageE/more/Address.vue | 57 ++++-
7 files changed, 195 insertions(+), 146 deletions(-)
diff --git a/common/api/user.js b/common/api/user.js
index 2d2a5b9..f2f9ecc 100644
--- a/common/api/user.js
+++ b/common/api/user.js
@@ -68,6 +68,16 @@ export default {
launch_id: launch_id
});
},
+ // 获取地区列表
+ getAreaList({ pid }) {
+ return vm.$u.post('Area/areaList', {
+ pid: pid
+ });
+ },
+ // 用户收货地址列表
+ getAddressList() {
+ return vm.$u.post('MemberAddress/addressList');
+ }
}
}
}
\ No newline at end of file
diff --git a/common/http.interceptor.js b/common/http.interceptor.js
index 82c41a7..f1144d9 100644
--- a/common/http.interceptor.js
+++ b/common/http.interceptor.js
@@ -25,7 +25,7 @@ const install = (Vue, vm) => {
const token = uni.getStorageSync('token');
// console.log(token);
// config.header.token = token;
- config.header.Authorization = token;
+ config.header.Authorization = 'Bearer' + " " + token;
// config.header.Token = 'xxxxxx';
// 可以对某个url进行特别处理,此url参数为this.$u.get(url)中的url值
diff --git a/components/mine/address-active/index.vue b/components/mine/address-active/index.vue
index 1e5b869..df3052b 100644
--- a/components/mine/address-active/index.vue
+++ b/components/mine/address-active/index.vue
@@ -7,8 +7,8 @@
-
-
+
+
@@ -21,16 +21,34 @@
保存地址
+
+
\ No newline at end of file
diff --git a/pageA/login/login.vue b/pageA/login/login.vue
index 581cbe6..8d8692a 100644
--- a/pageA/login/login.vue
+++ b/pageA/login/login.vue
@@ -115,7 +115,7 @@
// 存储接口请求所需token
uni.setStorage({
key: 'token',
- data: res.data.data.token,
+ data: res.data.token,
});
// 注册返回参数
this.$refs.uToast.show({
diff --git a/pageE/more/AddAddress.vue b/pageE/more/AddAddress.vue
index f73c371..ad1546f 100644
--- a/pageE/more/AddAddress.vue
+++ b/pageE/more/AddAddress.vue
@@ -14,7 +14,11 @@ export default {
components: {
AddressActive
},
- onLoad() {}
+ onLoad() {
+ },
+ methods: {
+
+ },
}
\ No newline at end of file