This commit is contained in:
zmr900709 2020-07-04 11:03:20 +08:00
parent 64b43b6b3d
commit 3d8cfd23d4
5 changed files with 62 additions and 45 deletions

View File

@ -91,7 +91,7 @@
"https" : false "https" : false
}, },
"router" : { "router" : {
"base" : "history" "base" : ""
} }
} }
} }

View File

@ -32,9 +32,9 @@
</view> </view>
<!-- 注册 --> <!-- 注册 -->
<view class="more_Login"> <view class="more_Login">
<text @click="registerUrl()">{{register}}</text> <text @click="registerUrl()">{{register}}</text>
<text class="other" @click="mask_u">其他方式登录</text> <text class="other" @click="mask_u">其他方式登录</text>
</view> </view>
<!-- denglu QQ weixin --> <!-- denglu QQ weixin -->
<view class="buttones"> <view class="buttones">
<view @click="loginOn">{{login}}</view> <view @click="loginOn">{{login}}</view>
@ -159,32 +159,32 @@
}) })
return false return false
}else{ }else{
uni.setStorageSync('token', res.data.token);//
uni.navigateTo({
url : '/pageA/topick/topick'
})
// //
uni.setStorage({ // uni.setStorageSync({
key: 'user_info', // key: 'user_info',
data: res.data, // data: res.data,
success: function() { // success: function() {
console.log('success'); // console.log('success');
// // //
uni.navigateTo({ // uni.navigateTo({
url : '/pageA/topick/topick' // url : '/pageA/topick/topick'
}) // })
} // }
}); // });
} }
// token // token
uni.setStorage({ uni.setStorageSync('token', res.data.token);//
key: 'token', // //
data: res.data.token, // this.$refs.uToast.show({
}); // title: res.message,
// // type: 'success',
this.$refs.uToast.show({ // url: '/pageA/topick/topick'
title: res.message, // })
type: 'success',
url: '/pageA/topick/topick'
})
} }
if (res.errCode == 1) { if (res.errCode == 1) {
this.$refs.uToast.show({ this.$refs.uToast.show({

View File

@ -20,7 +20,7 @@ export default {
// //
let typeIindex = option.index; let typeIindex = option.index;
this.typeIndexRquest(typeIindex) this.typeIndexRquest(typeIindex)
}, },
methods: { methods: {
typeIndexRquest(typeIindex){ typeIndexRquest(typeIindex){
// 3 0 1 2 agreementopen_storeprivacyuse使 // 3 0 1 2 agreementopen_storeprivacyuse使

View File

@ -6,7 +6,7 @@
<view class="backes"></view> <view class="backes"></view>
<view class="content"> <view class="content">
<view class="title">手机注册</view> <view class="title">手机注册</view>
<view class="labales"> <view class="labales phones">
<!-- <text></text> --> <!-- <text></text> -->
<input type="tel" placeholder="请输入您的手机号" v-model="member_mobile" /> <input type="tel" placeholder="请输入您的手机号" v-model="member_mobile" />
</view> </view>
@ -21,9 +21,7 @@
<view class="pact"> <view class="pact">
<view></view> <view></view>
<text>我已详细阅读并同意</text> <text>我已详细阅读并同意</text>
<text class="pact_text">用户协议</text> <text class="pact_text" v-for="(item,index) in pact_text" :key="index" @click="pact_click(index)"> {{item.text}} </text>
<text class="pact_text">隐私协议</text>
<text class="pact_text">使用协议</text>
<u-checkbox-group @change="checkboxGroupChange" size="27"> <u-checkbox-group @change="checkboxGroupChange" size="27">
<u-checkbox @change="checkboxChange" v-model="item.checked" v-for="(item, index) in list" :key="index" :name="item.name" <u-checkbox @change="checkboxChange" v-model="item.checked" v-for="(item, index) in list" :key="index" :name="item.name"
shape="circle" size="14" active-color="#19BE6B" ></u-checkbox> shape="circle" size="14" active-color="#19BE6B" ></u-checkbox>
@ -72,12 +70,32 @@
member_mobile: '', // member_mobile: '', //
smslog_type : '1',// smslog_type : '1',//
sms_code : '', // sms_code : '', //
//
pact_text: [{
"id": '1',
"text": "《用户协议》"
}, {
"id": '2',
"text": "《隐私协议》"
}, {
"id": '3',
"text": "《使用协议》"
},
]
}; };
}, },
onLoad() { onLoad() {
}, },
methods: { methods: {
//
pact_click(index){
console.log(index)
uni.navigateTo({
url: '/pageA/pactList/pactList?index=' + index
});
},
// //
loginIn(){ loginIn(){
let type_phone = this.$u.test.mobile( this.member_mobile) let type_phone = this.$u.test.mobile( this.member_mobile)
@ -113,8 +131,8 @@
if(res.errCode == 0){ if(res.errCode == 0){
// //
uni.setStorage({ uni.setStorage({
key: 'user_info', key: 'token',
data: res.data, data: res.data.token,
success: function () { success: function () {
console.log('success'); console.log('success');
// //
@ -421,4 +439,7 @@
// text-overflow: ellipsis; // // text-overflow: ellipsis; //
// white-space: nowrap; // // white-space: nowrap; //
} }
.phones{
margin-bottom: 90rpx!important;
}
</style> </style>

View File

@ -34,9 +34,14 @@
}; };
}, },
onLoad(){ onLoad(){
//
// console.log("11111222")
this.labelList() this.$u.api.labelList({
}).then((res) => {
console.log(res)
this.tab_lables = res.data
})
}, },
mounted(){ mounted(){
@ -68,16 +73,7 @@
url: '/pages/index/index' url: '/pages/index/index'
}); });
}, },
//
labelList(){
console.log("11111222")
this.$u.api.labelList({
}).then((res) => {
console.log(res)
this.tab_lables = res.data
})
},
} }
}; };
</script> </script>