From 3d8cfd23d43984c3f50e0c73c216e095db722bc9 Mon Sep 17 00:00:00 2001 From: zmr900709 <1838875027@qq.com> Date: Sat, 4 Jul 2020 11:03:20 +0800 Subject: [PATCH] v --- manifest.json | 2 +- pageA/login/login.vue | 48 ++++++++++++++++++------------------- pageA/pactList/pactList.vue | 2 +- pageA/register/register.vue | 33 ++++++++++++++++++++----- pageA/topick/topick.vue | 22 +++++++---------- 5 files changed, 62 insertions(+), 45 deletions(-) diff --git a/manifest.json b/manifest.json index 8abe36e..a49d78f 100644 --- a/manifest.json +++ b/manifest.json @@ -91,7 +91,7 @@ "https" : false }, "router" : { - "base" : "history" + "base" : "" } } } diff --git a/pageA/login/login.vue b/pageA/login/login.vue index 3ba18ab..07dda5a 100644 --- a/pageA/login/login.vue +++ b/pageA/login/login.vue @@ -32,9 +32,9 @@ - {{register}} + {{register}} 其他方式登录 - + {{login}} @@ -159,32 +159,32 @@ }) return false }else{ + uni.setStorageSync('token', res.data.token);//存储一个字符传值 + uni.navigateTo({ + url : '/pageA/topick/topick' + }) // 缓存用户的信息 - uni.setStorage({ - key: 'user_info', - data: res.data, - success: function() { - console.log('success'); - // 跳转首页 - uni.navigateTo({ - url : '/pageA/topick/topick' - }) - } - }); + // uni.setStorageSync({ + // key: 'user_info', + // data: res.data, + // success: function() { + // console.log('success'); + // // 跳转首页 + // uni.navigateTo({ + // url : '/pageA/topick/topick' + // }) + // } + // }); } - // 存储接口请求所需token - uni.setStorage({ - key: 'token', - data: res.data.token, - }); - // 注册返回参数 - this.$refs.uToast.show({ - title: res.message, - type: 'success', - url: '/pageA/topick/topick' - }) + uni.setStorageSync('token', res.data.token);//存储一个字符传值 + // // 注册返回参数 + // this.$refs.uToast.show({ + // title: res.message, + // type: 'success', + // url: '/pageA/topick/topick' + // }) } if (res.errCode == 1) { this.$refs.uToast.show({ diff --git a/pageA/pactList/pactList.vue b/pageA/pactList/pactList.vue index ea46e33..ec7d6b4 100644 --- a/pageA/pactList/pactList.vue +++ b/pageA/pactList/pactList.vue @@ -20,7 +20,7 @@ export default { // 协议类型调用不同的的协议 let typeIindex = option.index; this.typeIndexRquest(typeIindex) - }, + }, methods: { typeIndexRquest(typeIindex){ // 3种协议分别是 0 1 2 【agreement:用户协议,open_store:开店协议,privacy:隐私协议,use:使用协议】; diff --git a/pageA/register/register.vue b/pageA/register/register.vue index ba21d9c..4e30e75 100644 --- a/pageA/register/register.vue +++ b/pageA/register/register.vue @@ -6,7 +6,7 @@ 手机注册 - + @@ -21,9 +21,7 @@ 我已详细阅读并同意 - 《用户协议》 - 《隐私协议》 - 《使用协议》 + {{item.text}} @@ -72,12 +70,32 @@ member_mobile: '', //手机号 smslog_type : '1',//状态 sms_code : '', //验证码 + // 协议渲染 + pact_text: [{ + "id": '1', + "text": "《用户协议》" + }, { + "id": '2', + "text": "《隐私协议》" + }, { + "id": '3', + "text": "《使用协议》" + }, + + ] }; }, onLoad() { }, methods: { + // 协议跳转 + pact_click(index){ + console.log(index) + uni.navigateTo({ + url: '/pageA/pactList/pactList?index=' + index + }); + }, // 用户注册 loginIn(){ let type_phone = this.$u.test.mobile( this.member_mobile) @@ -113,8 +131,8 @@ if(res.errCode == 0){ // 缓存用户的信息 uni.setStorage({ - key: 'user_info', - data: res.data, + key: 'token', + data: res.data.token, success: function () { console.log('success'); // 跳转选择页面 @@ -421,4 +439,7 @@ // text-overflow: ellipsis; //溢出用省略号显示 // white-space: nowrap; //溢出不换行 } + .phones{ + margin-bottom: 90rpx!important; + } diff --git a/pageA/topick/topick.vue b/pageA/topick/topick.vue index 800b00c..fc44f05 100644 --- a/pageA/topick/topick.vue +++ b/pageA/topick/topick.vue @@ -34,9 +34,14 @@ }; }, onLoad(){ - - // 列表的方法 - this.labelList() + // 标签的列表展示 + console.log("11111222") + this.$u.api.labelList({ + + }).then((res) => { + console.log(res) + this.tab_lables = res.data + }) }, mounted(){ @@ -68,16 +73,7 @@ url: '/pages/index/index' }); }, - // 标签的列表展示 - labelList(){ - console.log("11111222") - this.$u.api.labelList({ - - }).then((res) => { - console.log(res) - this.tab_lables = res.data - }) - }, + } };