diff --git a/common/ajax.js b/common/ajax.js
index 7ddcc38..09a3c78 100644
--- a/common/ajax.js
+++ b/common/ajax.js
@@ -2,7 +2,7 @@
// 引入 uni-ajax 模块
import ajax from '@/uni_modules/u-ajax'
-
+import store from '@/store/index.js';
// 创建请求实例
const instance = ajax.create({
// 初始配置
@@ -11,7 +11,10 @@ const instance = ajax.create({
// 添加请求拦截器
instance.interceptors.request.use(
- config => {
+ config => {
+ if (store.getters.getuserIsLogin) {
+ config.header['token'] = store.state.user.token
+ }
// 在发送请求前做些什么
return config
},
@@ -25,12 +28,14 @@ instance.interceptors.request.use(
instance.interceptors.response.use(
response => {
if (response.statusCode == 200) {
-
+ let res = response.data;
+ if (res.hasOwnProperty('token'))
+ uni.setStorageSync('token', res.token);
return response.data
- }
+ }
// 对响应数据做些什么
console.log(response)
-
+
return response.data
},
error => {
diff --git a/components/ywx-auth-model/ywx-auth-model.vue b/components/ywx-auth-model/ywx-auth-model.vue
index fcd8f61..c27e103 100644
--- a/components/ywx-auth-model/ywx-auth-model.vue
+++ b/components/ywx-auth-model/ywx-auth-model.vue
@@ -113,13 +113,11 @@
},
onLoad: function() {},
methods: {
- ...mapMutations(["updateUserInfo", "saveUserInfoToStorge"]),
- onChooseAvatar(e) {
- console.log(e)
+ ...mapMutations(["updateUserInfo"]),
+ onChooseAvatar(e) {
const {
avatarUrl
} = e.detail
-
this.formDataReg.avatarUrl = avatarUrl
},
submitLogin(loginform) {
@@ -169,8 +167,7 @@
sessionKey: this.sessionKey,
openId: this.openId,
}).then(res => {
- this.formDataReg.mobile = res.data.phoneNumber
- console.log(res.data)
+ this.formDataReg.mobile = res.data.phoneNumber
});
}
}
diff --git a/cpzs/chucang/chucang.vue b/cpzs/chucang/chucang.vue
new file mode 100644
index 0000000..8183fd0
--- /dev/null
+++ b/cpzs/chucang/chucang.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
diff --git a/cpzs/chushou/chushou.vue b/cpzs/chushou/chushou.vue
new file mode 100644
index 0000000..8183fd0
--- /dev/null
+++ b/cpzs/chushou/chushou.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
diff --git a/cpzs/diaohuo/diaohuo.vue b/cpzs/diaohuo/diaohuo.vue
new file mode 100644
index 0000000..8183fd0
--- /dev/null
+++ b/cpzs/diaohuo/diaohuo.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
diff --git a/cpzs/index/index.vue b/cpzs/index/index.vue
new file mode 100644
index 0000000..3d15f3b
--- /dev/null
+++ b/cpzs/index/index.vue
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cpzs/rucang/rucang.vue b/cpzs/rucang/rucang.vue
new file mode 100644
index 0000000..8183fd0
--- /dev/null
+++ b/cpzs/rucang/rucang.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
diff --git a/cpzs/ruku/ruku.vue b/cpzs/ruku/ruku.vue
new file mode 100644
index 0000000..8183fd0
--- /dev/null
+++ b/cpzs/ruku/ruku.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
diff --git a/cpzs/shouhou/shouhou.vue b/cpzs/shouhou/shouhou.vue
new file mode 100644
index 0000000..8183fd0
--- /dev/null
+++ b/cpzs/shouhou/shouhou.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
diff --git a/cpzs/shouhoudo/shouhoudo.vue b/cpzs/shouhoudo/shouhoudo.vue
new file mode 100644
index 0000000..8183fd0
--- /dev/null
+++ b/cpzs/shouhoudo/shouhoudo.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
diff --git a/member/profile/profile.vue b/member/profile/profile.vue
index 8718f40..11c3750 100644
--- a/member/profile/profile.vue
+++ b/member/profile/profile.vue
@@ -1,77 +1,62 @@
-
+
-
+
-
+
-
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -87,13 +72,20 @@
isDisabled: true,
// 基础表单数据
formData: {
+ signature:'',
nickname: '',
- height:0,
- age: 0,
+ sex: 1,
+ birthday: 0,
+ height:178,
+ location:"",
+ education:"",
+ job:"",
+ company:"",
+ hometown:"",
introduction: '',
- sex: 2,
- hobby: [5],
- datetimesingle: 1627529992399
+ income:"",
+ marriage:"",
+ house:"",
},
@@ -212,6 +204,10 @@
//this.$refs.customForm.setRules(this.customRules)
},
methods: {
+ editTrue(){
+ this.isDisabled = false;
+ console.log(this.isDisabled)
+ },
onClickItem(e) {
console.log(e);
this.current = e.currentIndex
diff --git a/pages.json b/pages.json
index 2418152..7542574 100644
--- a/pages.json
+++ b/pages.json
@@ -78,7 +78,71 @@
}]
},{
"root": "cpzs",
- "pages": []
+ "pages": [{
+ "path" : "index/index",
+ "style" :
+ {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+
+ }
+ ,{
+ "path" : "ruku/ruku",
+ "style" :
+ {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false
+ }
+
+ }
+ ,{
+ "path" : "rucang/rucang",
+ "style" :
+ {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false
+ }
+
+ }
+ ,{
+ "path" : "diaohuo/diaohuo",
+ "style" :
+ {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false
+ }
+
+ }
+ ,{
+ "path" : "chushou/chushou",
+ "style" :
+ {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false
+ }
+
+ }
+ ,{
+ "path" : "shouhou/shouhou",
+ "style" :
+ {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false
+ }
+
+ }
+ ,{
+ "path" : "shouhoudo/shouhoudo",
+ "style" :
+ {
+ "navigationBarTitleText": "",
+ "enablePullDownRefresh": false
+ }
+
+ }
+ ]
}
],
"tabBar": {
diff --git a/pages/tabbar/home/home.vue b/pages/tabbar/home/home.vue
index 0013ac9..a3363da 100644
--- a/pages/tabbar/home/home.vue
+++ b/pages/tabbar/home/home.vue
@@ -1,36 +1,41 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
- 测试功能
+ 新闻动态
- 测试功能
+ 视频教程
- 测试功能
+ 产品追溯
- 测试功能
+ 车架查询
@@ -1304,7 +1309,7 @@
}
}
-page {
+ page {
display: flex;
flex-direction: column;
box-sizing: border-box;
diff --git a/pages/tabbar/my/my.vue b/pages/tabbar/my/my.vue
index fd61776..c7c812b 100644
--- a/pages/tabbar/my/my.vue
+++ b/pages/tabbar/my/my.vue
@@ -1,10 +1,10 @@
-
-
-
+
+
+
{{userInfo.nickname}}
- UID {{userInfo.uid}}
+ UID {{userInfo.uid}}
云深不知归处,爱你不会迷路
-
-
+
+
-
-
-
+ title="账号与安全" clickable showArrow>
+
-
-
+
-
+
@@ -88,8 +82,7 @@
data() {
return {}
},
- onLoad() {
- console.log(this.isLogin);
+ onLoad() {
if (!this.isLogin) {
uni.redirectTo({
url: "/pages/login/login"
@@ -97,7 +90,23 @@
}
},
methods: {
-
+ logOut() {
+ let self = this;
+ uni.showModal({
+ content: "确定注销登录嘛?",
+ confirmText: "确定",
+ cancelText: "取消",
+ success(res) {
+ if (res.confirm) {
+
+ self.$store.dispatch("actionLogout");
+ uni.reLaunch({
+ url:"/pages/tabbar/home/home"
+ })
+ }
+ }
+ })
+ }
},
onBackPress() {
// #ifdef APP-PLUS
@@ -108,24 +117,26 @@