Commit 2f867b20 by LJM

css

parent 132cfcb6
......@@ -27,6 +27,9 @@
border-radius: 10rpx;
font-size: 28rpx;
color: #fff;
&.disabled {
opacity: 0.8;
}
}
}
.success {
......
......@@ -132,6 +132,9 @@
border-radius: 10rpx;
font-size: 28rpx;
color: #ffffff;
&.disabled {
opacity: 0.5;
}
}
.success {
.p1 {
......
......@@ -125,6 +125,9 @@
border-radius: 10rpx;
font-size: 28rpx;
color: #ffffff;
&.disabled {
opacity: 0.5;
}
}
.forget {
margin-top: 40rpx;
......
......@@ -12,14 +12,16 @@
<view class="form-box" v-if="flag">
<template v-if="type == 1">
<view><input type="text" placeholder="请输入邮箱号码" class="uni-input" v-model="formParams.email" /></view>
<view class="btn row rowCenter verCenter" @click="updateUserInfo()" :class="{ disabled: formParams.email == '' }">绑定</view>
</template>
<template v-else-if="type == 2">
<view><input type="text" placeholder="请输入QQ号" class="uni-input" v-model="formParams.qq" /></view>
<view class="btn row rowCenter verCenter" @click="updateUserInfo()" :class="{ disabled: formParams.qq == '' }">绑定</view>
</template>
<template v-else-if="type == 3">
<view><input type="text" placeholder="请输入微信号" class="uni-input" v-model="formParams.wx" /></view>
<view class="btn row rowCenter verCenter" @click="updateUserInfo()" :class="{ disabled: formParams.wx == '' }">绑定</view>
</template>
<view class="btn row rowCenter verCenter" @click="updateUserInfo()">绑定</view>
</view>
<view class="success column rowCenter verCenter" v-else>
<image src="../../static/success.png"></image>
......
......@@ -32,7 +32,7 @@
<input type="number" placeholder="请输入验证码" placeholder-style="color:#919399;" class="uni-input" v-model="formParams.sms_verify" />
<text class="code-text" @click="countdownChange()" :class="{ disabled: code_disabled }">{{ code_text }}</text>
</view>
<view class="btn row rowCenter verCenter" @click="submit(1)">提交</view>
<view class="btn row rowCenter verCenter" @click="submit(1)" :class="{ disabled: formParams.account == '' || formParams.sms_verify == '' }">提交</view>
</template>
<!-- 重置密码 -->
<template v-else-if="curr == 1">
......
......@@ -72,7 +72,12 @@
</template>
</view>
</template>
<view class="btn row rowCenter verCenter" @click="submit()">{{ curr == 0 ? '登录/注册' : '登录' }}</view>
<template v-if="curr == 0">
<view class="btn row rowCenter verCenter" @click="submit()" :class="{ disabled: formParams.account == '' || formParams.sms_verify == '' }">{{ btn_text }}</view>
</template>
<template v-else>
<view class="btn row rowCenter verCenter" @click="submit()" :class="{ disabled: formParams.account == '' || formParams.pwd == '' }">{{ btn_text }}</view>
</template>
<view class="row forget"><navigator url="/forget">忘记密码</navigator></view>
<view class="agreement row rowCenter verCenter">
<text class="t1">登录即代表您同意</text>
......@@ -89,6 +94,8 @@ import w_md5 from '@/util/md5.js';
export default {
data() {
return {
wx: false,
btn_text: '登录/注册',
referer: '',
code_text: '获取验证码',
code_disabled: false,
......@@ -109,8 +116,21 @@ export default {
}
};
},
watch: {
formParams(newVal, oldVal) {
console.log(newVal);
}
},
onLoad(options) {
this.referer = options.referer;
if (/MicroMessenger/.test(navigator.userAgent)) {
// 在微信浏览器中打开
this.wx = true;
this.btn_text = '绑定微信并登录';
} else {
// 不在微信浏览器中打开
this.wx = false;
}
},
methods: {
bindPickerChange: function(e) {
......@@ -124,6 +144,15 @@ export default {
*/
tab(index) {
this.curr = index;
if (this.wx) {
this.btn_text = '绑定微信并登录';
} else {
if (index == 0) {
this.btn_text = '登录/注册';
} else if (index == 1) {
this.btn_text = '登录';
}
}
},
/**
* 刷新验证码
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment