gyhup
This commit is contained in:
@@ -8,11 +8,11 @@
|
||||
<view class="title">手机登录</view>
|
||||
<view class="labales">
|
||||
<!-- <text></text> -->
|
||||
<input type="tel" placeholder="请输入您的手机号" v-model="member_mobile" />
|
||||
<input type="tel" placeholder="请输入您的手机号" maxlength="11" v-model="member_mobile" />
|
||||
</view>
|
||||
<view class="labales">
|
||||
<!-- <text></text> -->
|
||||
<input type="tel" placeholder="请输入验证码" v-model="sms_code" />
|
||||
<input type="number" placeholder="请输入验证码" maxlength="6" v-model="sms_code" />
|
||||
<!-- <text class="identifying" @click="getCode">{{text}}</text> -->
|
||||
<identifying @tochange="tochange" :smslog_type="smslog_type" :member_mobile="member_mobile"></identifying>
|
||||
</view>
|
||||
@@ -22,7 +22,8 @@
|
||||
<view>
|
||||
<view></view>
|
||||
<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" v-for="(item,index) in pact_text" :key="index" @click="pact_click(index)"> {{item.text}}
|
||||
</text>
|
||||
</view>
|
||||
<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"
|
||||
@@ -32,12 +33,12 @@
|
||||
</view>
|
||||
<!-- 注册 -->
|
||||
<view class="more_Login">
|
||||
<text @click="registerUrl()">{{register}}</text>
|
||||
<text @click="registerUrl()">{{register}}</text>
|
||||
<text class="other" @click="mask_u">其他方式登录</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- denglu QQ weixin -->
|
||||
<view class="buttones">
|
||||
<view @click="loginOn">{{login}}</view>
|
||||
<view @click="loginOn">{{login}}</view>
|
||||
</view>
|
||||
<u-mask :show="show" @click="show = false">
|
||||
<view class="warp">
|
||||
@@ -50,7 +51,7 @@
|
||||
<image src="../../static/pageA/weixin.png" class="image"></image>
|
||||
<view>微信登录</view>
|
||||
</view>
|
||||
<view class="rect_butoon" @click="show = false">取消</view>
|
||||
<view class="rect_butoon" @click="show = false">取消</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-mask>
|
||||
@@ -60,6 +61,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import identifying from '@/components/logininput/identifying'
|
||||
import { mapMutations } from 'vuex';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -96,9 +98,10 @@
|
||||
},
|
||||
onLoad() {
|
||||
// 数据的请求
|
||||
this.apiwelcome()
|
||||
this.apiwelcome();
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['loginIn']),
|
||||
apiwelcome() {
|
||||
this.$u.api.sendSmsCode({
|
||||
|
||||
@@ -107,14 +110,15 @@
|
||||
})
|
||||
},
|
||||
// 协议跳转
|
||||
pact_click(index){
|
||||
pact_click(index) {
|
||||
console.log(index)
|
||||
uni.navigateTo({
|
||||
url: '/pageA/pactList/pactList?index=' + index
|
||||
url: '/pageA/pactList/pactList?index=' + index
|
||||
});
|
||||
},
|
||||
// 用户登录
|
||||
loginOn() {
|
||||
let me = this;
|
||||
// uni.navigateTo({
|
||||
// url: '/pageE/zhibo/index'
|
||||
// });
|
||||
@@ -123,8 +127,8 @@
|
||||
// console.log(this.sms_code)
|
||||
// 判断手机号是否为空
|
||||
// 校验手机号
|
||||
let type_phone = this.$u.test.mobile( this.member_mobile)
|
||||
if( this.member_mobile == ''){
|
||||
let type_phone = this.$u.test.mobile(this.member_mobile)
|
||||
if (this.member_mobile == '') {
|
||||
this.$refs.uToast.show({
|
||||
title: '手机号不能为空',
|
||||
type: 'error'
|
||||
@@ -138,8 +142,8 @@
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if( this.sms_code == ''){
|
||||
this.$refs.uToast.show({
|
||||
if (this.sms_code == '') {
|
||||
this.$refs.uToast.show({
|
||||
title: '验证码不能为空',
|
||||
type: 'error'
|
||||
})
|
||||
@@ -152,16 +156,16 @@
|
||||
console.log(res)
|
||||
// console.log(res)
|
||||
if (res.errCode == 0) {
|
||||
if(res.data == ''){
|
||||
if (res.data == '') {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}else{
|
||||
uni.setStorageSync('token', res.data.token);//存储一个字符传值
|
||||
} else {
|
||||
me.loginIn(res.data.token); //存储一个字符传值
|
||||
uni.navigateTo({
|
||||
url : '/pageA/topick/topick'
|
||||
url: '/pageA/topick/topick'
|
||||
})
|
||||
// 缓存用户的信息
|
||||
// uni.setStorageSync({
|
||||
@@ -176,9 +180,9 @@
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
|
||||
// 存储接口请求所需token
|
||||
uni.setStorageSync('token', res.data.token);//存储一个字符传值
|
||||
me.loginIn(res.data.token); //存储一个字符传值
|
||||
// // 注册返回参数
|
||||
// this.$refs.uToast.show({
|
||||
// title: res.message,
|
||||
@@ -192,11 +196,11 @@
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// qq授权登录
|
||||
rect_qq() {
|
||||
console.log("授权Q")
|
||||
console.log("授权QQ")
|
||||
var vm = this;
|
||||
uni.getProvider({
|
||||
service: 'oauth',
|
||||
@@ -296,10 +300,12 @@
|
||||
width: 630rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.u-checkbox__icon-wrap .u-icon{
|
||||
width: 26rpx!important;
|
||||
|
||||
.u-checkbox__icon-wrap .u-icon {
|
||||
width: 26rpx !important;
|
||||
height: 26rpx;
|
||||
}
|
||||
|
||||
.more_Login text {
|
||||
display: inline-block;
|
||||
width: 50%;
|
||||
@@ -397,7 +403,7 @@
|
||||
height: 22rpx;
|
||||
}
|
||||
|
||||
.buttones > view {
|
||||
.buttones>view {
|
||||
width: 628rpx;
|
||||
height: 98rpx;
|
||||
background: rgba(255, 120, 15, 1) !important;
|
||||
|
||||
Reference in New Issue
Block a user