8.28 修改事件详情相关概念模块样式,增加股票详情信息来源展示
This commit is contained in:
@@ -5,18 +5,19 @@
|
||||
<view class="loginTitle">欢迎登录价值前沿平台</view>
|
||||
<view class="inputC mobile flex">
|
||||
<image class="icon" src="/static/icon/login/mobile.png" mode="widthFix"></image>
|
||||
<input class="flex1" type="number" v-model="mobile" placeholder="请输入手机号" placeholder-style="color: #aaa"/>
|
||||
<input class="flex1" type="number" v-model="mobile" placeholder="请输入手机号" placeholder-style="color: #aaa" maxlength="11"/>
|
||||
</view>
|
||||
<view class="inputC code flex">
|
||||
<image class="icon" src="/static/icon/login/code.png" mode="widthFix"></image>
|
||||
<input class="flex1" type="number" v-model="code" placeholder="请输入验证码" placeholder-style="color: #aaa"/>
|
||||
<view class="getCode" @click="clickGetCode()">获取验证码</view>
|
||||
<view class="getCode" @click="clickGetCode()">{{getCode?(countdown>0?countdown+'s':'重新获取验证码'):'获取验证码'}}</view>
|
||||
</view>
|
||||
<view class="btn loginAtOnce" @click="clickLoginAtOnce()">立即登录</view>
|
||||
<view class="btn oneClickLogin" @click="clickOneClickLogin()">授权手机号一键登录</view>
|
||||
<view class="agreeProtocolC fixed flexCenter">
|
||||
<view class="agreeC">
|
||||
<image class="icon" src="" mode="widthFix"></image>
|
||||
<view class="agreeC" @click="clickAgree()">
|
||||
<image v-if="isAgree" class="icon" src="/static/icon/login/select_s.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/login/select.png" mode="widthFix"></image>
|
||||
</view>
|
||||
阅读并同意我们的<text class="protocol">《用户服务协议》</text>和<text class="protocol">《隐私政策》</text>
|
||||
</view>
|
||||
@@ -25,7 +26,8 @@
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
import { loginByPhone } from '@/request/api';
|
||||
import { loginByPhone, sendSMS } from '@/request/api';
|
||||
const app = getApp()
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -33,6 +35,10 @@
|
||||
contentTop:'',
|
||||
mobile:'', //手机号
|
||||
code:'', //验证码
|
||||
isAgree:false,
|
||||
countdown:0, //验证码倒计时
|
||||
getCode:false, //是否已经获取过验证码
|
||||
timer:null //定时器
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -44,7 +50,61 @@
|
||||
*/
|
||||
clickGetCode()
|
||||
{
|
||||
|
||||
let mobile = this.mobile
|
||||
if(!mobile)
|
||||
{
|
||||
uni.showToast({
|
||||
title:'请输入手机号',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!app.globalData.mobileReg.test(mobile)) {
|
||||
uni.showToast({
|
||||
title:'请输入正确格式的手机号',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.isSubmiting) {
|
||||
return
|
||||
}
|
||||
if (this.countdown>0) {
|
||||
return
|
||||
}
|
||||
this.isSubmiting = true
|
||||
let param = {phone:this.mobile,isJson:1}
|
||||
let that = this
|
||||
sendSMS(param).then(res=>{
|
||||
// if(res.code==200)
|
||||
// {
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
let time = 60
|
||||
this.timer = setInterval(() => {
|
||||
that.isSubmiting = false
|
||||
time --
|
||||
if (time==0) {
|
||||
clearInterval(that.timer)
|
||||
}
|
||||
// that.code = res.debug_code
|
||||
that.getCode = true
|
||||
that.countdown = time
|
||||
}, 1000);
|
||||
// }else
|
||||
// {
|
||||
// this.isSubmiting = false
|
||||
// uni.showToast({
|
||||
// title:res.message,
|
||||
// icon:'none'
|
||||
// })
|
||||
// }
|
||||
|
||||
}).catch(error=>{
|
||||
this.isSubmiting = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 点击立即登录
|
||||
@@ -67,11 +127,27 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
if(!this.isAgree)
|
||||
{
|
||||
uni.showToast({
|
||||
title:'请阅读并同意我们的《用户服务协议》和《隐私政策》',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
let param = {phone:this.mobile,code:this.code,isJson:1}
|
||||
loginByPhone(param).then(res=>{
|
||||
if(res.code==200)
|
||||
if(res.code==0)
|
||||
{
|
||||
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
})
|
||||
uni.setStorageSync('token',res.token)
|
||||
setTimeout(function() {
|
||||
uni.switchTab({
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
}, 1000);
|
||||
}else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
@@ -87,6 +163,22 @@
|
||||
clickOneClickLogin()
|
||||
{
|
||||
uni.navigateBack()
|
||||
},
|
||||
/**
|
||||
* 点击同意
|
||||
*/
|
||||
clickAgree()
|
||||
{
|
||||
this.isAgree = !this.isAgree
|
||||
},
|
||||
/**
|
||||
* 点击查看协议
|
||||
*/
|
||||
clickProtocol(type)
|
||||
{
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine/web/web?type='+type
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -180,6 +272,7 @@
|
||||
padding: 14rpx;
|
||||
.icon
|
||||
{
|
||||
display: block;
|
||||
width: 28rpx;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user