unknown 11 months ago
parent
commit
513ec4167d
  1. 21
      config/api.js
  2. 10
      pages.json
  3. 4
      pages/indexEntry/enroll/enroll.vue
  4. 29
      pages/indexEntry/enroll/realName/realName.vue
  5. 85
      pages/indexEntry/enroll/realName/webView.vue
  6. 6
      pages/indexEntry/webView/webView.vue
  7. 9
      pages/mineEntry/myOrder/comp/opera.vue
  8. 17
      pages/mineEntry/myOrder/detail/comp/refundInfo.vue
  9. 52
      pages/mineEntry/myOrder/detail/detail.vue
  10. 17
      pages/mineEntry/myOrder/myOrder.vue
  11. 122
      pages/mineEntry/refund/comp/myform.vue
  12. 68
      pages/mineEntry/refund/refund - 副本.vue
  13. 28
      pages/mineEntry/refund/refund.vue
  14. 15
      pages/userCenter/login/loginByPhone.vue

21
config/api.js

@ -7,7 +7,7 @@ export const getAgreement = (params, config = {}) => http.post('/util/manage/get
// 验证码登录
export const loginSMS = (data) => http.post('member/auth/sms-login', data, { custom: { noToken: true }})
// 登录发验证码
export const getLoginCode = (data) => http.post('member/auth/send-sms-code', data, { custom: { noToken: true, }})
export const getLoginCode = (data) => http.post('member/auth/send-sms-code', data, { custom: { noToken: true, catch: true,}})
// 获取个人信息
export const getUserInfo = (data) => http.post('member/user/get', {header: {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'}})
// 退出登录
@ -142,6 +142,25 @@ export const masterCancelBooking = (data) => http.put('business/booking/master/c
export const applyOrderPage = (params) => http.get('app/apply-order/page', {params})
// 我的订单详情
export const applyOrderGet = (params) => http.get('app/apply-order/get', {params})
// 线上提交学员退款信息
export const applyOnlineFund = (data) => http.post('app/refund/applyOnlineFund', data)
// 查询退费详情
export const selectRefundDetail = (params) => http.get('app/refund/selectRefundDetail', {params})
// 获得退款记录分页
export const refundPage = (params) => http.get('app/refund/page', {params})
// 获取保存的biztonken
export const getbiztoken = (params) => http.get('app/student-record/getbiztoken', {params})
// 退款原因
export const getdictDataList = (params) => http.get('app/refund/getdictDataList', {params})
// 轮询是否已报名
export const getApplyStep = (params) => http.get('app/student-record/getApplyStep', {params})

10
pages.json

@ -90,7 +90,15 @@
"backgroundTextStyle": "dark"
}
},
{
"path": "enroll/realName/webView",
"style": {
"navigationBarTitleText": "实名认证",
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"backgroundTextStyle": "dark"
}
},
{
"path": "enroll/uploadAvatar/uploadAvatar",
"style": {

4
pages/indexEntry/enroll/enroll.vue

@ -138,7 +138,7 @@
this.showType = false
},
async getpersonfaceFn() {
const {data: res} = await getpersonface({ ruleId: 1, RedirectUrl: website + '/pages/indexEntry/enroll/realName/realName',userId: this.userId})
const {data: res} = await getpersonface({ ruleId: 1, RedirectUrl: website + '/pages/indexEntry/enroll/realName/realName?userId='+this.userId+'&test=123' ,userId: this.userId})
let obj = JSON.parse(res)
this.link = obj.Url
this.$store.commit('updateBizToken', obj.BizToken)
@ -151,7 +151,7 @@
// #ifdef MP-WEIXIN
this.$store.commit('updateWebVeiwUrl', this.link)
uni.navigateTo({
url: '/pages/indexEntry/webView/webView'
url: '/pages/indexEntry/enroll/realName/webView'
})
// #endif

29
pages/indexEntry/enroll/realName/realName.vue

@ -5,18 +5,35 @@
</template>
<script>
import { GetDetectInfoEnhanced } from '@/config/api.js'
import { GetDetectInfoEnhanced, getbiztoken } from '@/config/api.js'
import { website } from '@/config/site.config.js'
export default {
data() {
return {
userId: ''
}
},
onLoad(options) {
alert(options.BizToken)
alert(options.userId)
alert(options.test)
const routeInfo = this.$route;
console.log('当前页面路由信息:', routeInfo);
const fullPath = '/' + routeInfo.path + '?' + Object.keys(routeInfo.query).map(key => key + '=' + routeInfo.query[key]).join('&');
console.log('当前页面全路径:', fullPath);
alert(fullPath)
alert(routeInfo.query.userId)
alert(routeInfo.query.test)
if(options.userId) {
this.userId = options.userId
this.GetDetectInfoEnhancedFn()
}
},
onPullDownRefresh() {
this.GetDetectInfoEnhancedFn()
},
methods: {
async GetDetectInfoEnhancedFn() {
const data = await getbiztoken({ userId: this.userId})
// alert(this.$store.state.school.BizToken)
uni.showLoading({
title: '正在检测中...'
@ -28,7 +45,7 @@
let obj = {
ruleId: 1,
redirectUrl,
bizToken: this.$store.state.school.BizToken,
bizToken: data.data,
userId: this.userId
}
const res = await GetDetectInfoEnhanced(obj)
@ -37,6 +54,12 @@
let obj2 = JSON.parse(res.data)
await this.$store.dispatch('getUserInfo')
uni.hideLoading()
if (process.env.VUE_APP_PLATFORM === 'h5') {
window.close(); //
} else {
//
console.log('当前不是 H5 环境,无法关闭页面');
}
if(obj2.Text.ErrMsg=='成功') {
this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
}

85
pages/indexEntry/enroll/realName/webView.vue

@ -0,0 +1,85 @@
<template>
<view>
<topNavbar title="学员报名"></topNavbar>
<!-- <web-view :webview-styles="webviewStyles" src="http://192.168.1.44:92/question/?uniItem=%7B%22phone%22%3A%2218267103167%22%2C%22cityCode%22%3A%223311%22%2C%22isUni%22%3A1%7D"></web-view> -->
<web-view :webview-styles="webviewStyles" class="custom-webview" :src="link" :update-title="true"></web-view>
<!-- <iframe src="https://your-h5-url.com" frameborder="0"></iframe> -->
</view>
</template>
<script>
import { getApplyStep } from "@/config/api.js"
export default {
data() {
return {
webviewStyles: {
progress: {
color: '#3877ff'
},
width: '100vw', // WebView 100%
height: '100vh', // WebView 100vh
},
link: '',
ok: false,
getApplyStepApi: null
}
},
onLoad() {
this.link = this.$store.state.webViewUrl
console.log('噜噜哇'+ this.$store.state.webViewUrl)
// http://192.168.1.44:92/question/?uniItem=%7B%22phone%22%3A%2218267103167%22%2C%22cityCode%22%3A%223311%22%2C%22isUni%22%3A1%7D
// uni.hideNavigationBarLoading()
},
beforeDestroy() {
clearInterval(this.timer)
this.timer = null
},
onHide() {
clearInterval(this.timer)
this.timer = null
},
onShow() {
this.timer = setInterval(async () => {
const res = await this.getApplyStepFn()
console.log(res)
if(res==2) {
clearInterval(this.timer)
this.timer = null
let redirectUrl = '/pages/indexEntry/enroll/registInfo/registInfo'
if(this.$store.state.user.NonPlatformStudent) {
redirectUrl = '/pages/indexEntry/NonPlatformStudent/NonPlatformStudent'
}
this.$goPage(redirectUrl)
}
}, 2000)
},
methods: {
getApplyStepFn() {
let _this = this
if(this.ok) return this.getApplyStepApi
this.ok =true
return new Promise((reslove,reject)=>{
_this.getApplyStepApi = getApplyStep({userId: this.userId}).then((res)=>{
_this.ok = false
// console.log(res)
reslove(res.data)
}).catch(()=>{
_this.ok = false
reject(0)
})
})
}
}
}
</script>
<style>
.custom-webview::after {
content: none !important; /* 隐藏返回按钮 */
}
.iframe {
display: block;
width: 100vw;
height: 100vh;
}
</style>

6
pages/indexEntry/webView/webView.vue

@ -13,7 +13,7 @@
return {
webviewStyles: {
progress: {
color: '#FF3333'
color: '#3877ff'
},
width: '100vw', // WebView 100%
height: '100vh', // WebView 100vh
@ -27,9 +27,7 @@
// http://192.168.1.44:92/question/?uniItem=%7B%22phone%22%3A%2218267103167%22%2C%22cityCode%22%3A%223311%22%2C%22isUni%22%3A1%7D
// uni.hideNavigationBarLoading()
},
// onReady() {
// uni.hideNavigationBarLoading();
// }
}
</script>

9
pages/mineEntry/myOrder/comp/opera.vue

@ -3,11 +3,15 @@
<view class="consultItem">
<view class="top_row">
<view class="flex">
<view class="tag" :class="{yellow: item.orderType==1}"> {{orderTypeTxt[item.orderType]}}</view>
<view class="tag" :class="{yellow: (item.orderType==1||item.feeType==1)}"> {{orderTypeTxt[item.orderType||item.feeType]}}</view>
<view class="schoolName oneRowText">{{ $u.utils.truncateText(item.schoolName, 12) }}</view>
</view>
<view class="status">
<view class="text">{{orderStatusTxt[item.orderStatus]}}</view>
<!-- 退款 -->
<view class="text" v-if="item.feeType">{{auditStatusTxt[item.auditStatus]}}</view>
<!-- 订单 -->
<view class="text" v-else>{{orderStatusTxt[item.orderStatus]}}</view>
<view class="icon">
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
</view>
@ -57,6 +61,7 @@
return {
orderTypeTxt: ['', '学费', '理科费', '考场模拟', '额外学时购买'],//1234
orderStatusTxt: ['待支付', '已支付', '已取消', '支付失败'], //01-12
auditStatusTxt: ['待审核', '审核通过', '审核不通过',],//01-12,(2)
}
}
}

17
pages/mineEntry/myOrder/detail/comp/refundInfo.vue

@ -8,41 +8,44 @@
</view>
<view class="row">
<view class="lab">退款金额</view>
<view class="val">100.00</view>
<view class="val">{{$u.utils.priceTo(info.amount)}}</view>
</view>
<view class="border_bottom">
<view class="date">申请时间2023/08/06 09:12:33</view>
<view class="date">退款完成时间2023/08/10 09:12:33</view>
<view class="date">申请时间{{ $u.timeFomat(info.createTime, 'yyyy-mm-dd hh:MM:ss')}}</view>
<view class="date" v-if="info.refundTime">退款完成时间{{ $u.timeFomat(info.refundTime, 'yyyy-mm-dd hh:MM:ss')}}</view>
</view>
</view>
<view class="h1">收款信息</view>
<view class="card">
<view class="row">
<view class="lab">持卡人</view>
<view class="value">张三</view>
<view class="value">{{ info.stuName }}</view>
</view>
<view class="row">
<view class="lab">手机号</view>
<view class="value">
<view class="flex-b">
<view class="phone">18267103167</view>
<view class="phone">{{ info.mobile }}</view>
<view class="blue">已验证</view>
</view>
</view>
</view>
<view class="row">
<view class="lab">卡号</view>
<view class="value">79879465454148</view>
<view class="value">{{ info.bankAccount }}</view>
</view>
<view class="row">
<view class="lab">开户行</view>
<view class="value">招商银行</view>
<view class="value">{{ info.bankName }}</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: ['info']
}
</script>
<style lang="scss" scoped>

52
pages/mineEntry/myOrder/detail/detail.vue

@ -95,41 +95,79 @@
<view class="label hui">待支付尾款</view>
<view class="value blue">2000.02</view>
</view>
<view class="refundBtn">申请退款</view>
<view class="refundBtn" @click="goFund">申请退款</view>
</view>
</view>
</view>
<refundInfo/>
<refundInfo :info="refundInfo" v-if="info.refundId"/>
</view>
</view>
</template>
<script>
import refundInfo from './comp/refundInfo.vue'
import { applyOrderGet } from '@/config/api.js'
import { applyOrderGet, selectRefundDetail } from '@/config/api.js'
export default {
components: { refundInfo },
data() {
return {
id: '',
orderId: '',
refundId: '',
info: {},
refundInfo: {},
orderTypeTxt: ['', '学费', '理科费', '考场模拟', '额外学时购买'],//1234
orderStatusTxt: ['待支付', '已支付', '已取消', '支付失败'], //01-12
}
},
onLoad(options) {
this.id = options.id
if(options.orderId) {
this.orderId =options.orderId
this.applyOrderGetFn()
}
if(options.refundId) {
this.refundId = options.refundId
this.selectRefundDetailFn()
}
},
onPullDownRefresh() {
this.applyOrderGetFn()
if(this.refundId) {
this.selectRefundDetailFn()
}else if(this.orderId) {
this.applyOrderGetFn()
}
},
methods: {
async applyOrderGetFn() {
const {data: res} = await applyOrderGet({ orderId: this.id})
const {data: res} = await applyOrderGet({ orderId: this.orderId})
this.info = res
uni.stopPullDownRefresh()
}
},
async selectRefundDetailFn() {
const {data: res} = await selectRefundDetail({ id: this.refundId})
console.log(res)
this.info = res
uni.stopPullDownRefresh()
},
goFund() {
this.$goPage('/pages/mineEntry/refund/refund?orderId='+this.orderId)
},
// 退
// applyOnlineFundFn() {
// uni.showModal({
// title: '退',
// success: async ()=> {
// let obj = {
// studentId: this.studentId,
// orderId: this.orderId,
// // schoolId:
// }
// const {data: res} = await applyOnlineFund(obj)
// console.log(res)
// }
// })
// }
}
}
</script>

17
pages/mineEntry/myOrder/myOrder.vue

@ -14,7 +14,7 @@
<view class="recordTotal"> <text v-if="total">{{total}}条记录</text></view>
<view class="tabCon">
<view class="card" v-for="(item,index) in list" :key="index" @click="$goPage('/pages/mineEntry/myOrder/detail/detail?id='+ item.orderId)">
<view class="card" v-for="(item,index) in list" :key="index" @click="goDetail(item)">
<opera :item="item"></opera>
</view>
</view>
@ -31,7 +31,7 @@
<script>
import opera from './comp/opera'
import { applyOrderPage } from '@/config/api.js'
import { applyOrderPage, refundPage } from '@/config/api.js'
export default {
components: { opera },
data() {
@ -71,6 +71,13 @@
}
},
methods: {
goDetail(item) {
if(this.params.orderStatus==3) {
this.$goPage('/pages/mineEntry/myOrder/detail/detail?refundId='+ item.id+'&orderId='+item.orderId)
}else {
this.$goPage('/pages/mineEntry/myOrder/detail/detail?orderId='+ item.orderId)
}
},
searchFn(val) {
this.params.sercheValue = val
this.initList()
@ -93,7 +100,11 @@
let obj = Object.assign({},this.params)
if(obj.orderType==0) delete obj.orderType
if(!obj.sercheValue) delete obj.sercheValue
const {data: res} = await applyOrderPage(obj)
if(this.params.orderStatus==3) {
var {data: res} = await refundPage(obj)
}else {
var {data: res} = await applyOrderPage(obj)
}
this.list.push(...res.list)
this.params.pageNo ++
this.total = res.total

122
pages/mineEntry/refund/comp/myform.vue

@ -3,7 +3,7 @@
<view class="card">
<view class="row" @click="showReason=true">
<view class="lab">退款原因</view>
<view class="val">申请同城转校</view>
<mySelect placeholder="请选择" :value="FormData.reasonName" style="flex: 1;"></mySelect>
<view class="icon">
<u-icon name="arrow-right"></u-icon>
</view>
@ -12,17 +12,17 @@
<view class="row">
<view class="lab">退款金额</view>
<view class="val">
<u--input placeholder="请输入" border="none" clearable type="number" maxlength="11" v-model="FormData.phone"></u--input>
<u--input placeholder="请输入" border="none" clearable type="number" maxlength="11" v-model="FormData.amount" @blur="changePrice"></u--input>
</view>
</view>
<view class="tpsHui">退款金额不可超过¥2000.00</view>
<view class="tpsHui">退款金额不可超过¥ {{$u.utils.priceTo(info.totalAmount)}}</view>
</view>
<view class="h1">收款信息</view>
<view class="card">
<view class="row">
<view class="lab">持卡人</view>
<view class="val">
<u--input placeholder="请输入" border="none" clearable type="number" maxlength="11" v-model="FormData.phone"></u--input>
<u--input placeholder="请输入" border="none" clearable v-model="FormData.stuName"></u--input>
</view>
</view>
<view class="row">
@ -30,16 +30,16 @@
<view class="val">
<view class="flex-b">
<view class="inputBox">
<u--input placeholder="请输入" border="none" clearable type="number" maxlength="11" v-model="FormData.phone"></u--input>
<u--input placeholder="请输入" border="none" type="number" maxlength="11" v-model="FormData.mobile"></u--input>
</view>
<view class="code" @click='goSms' :class="{active: isPhone&&!codeOn}">获取验证码</view>
<view class="code" @click='goSms' :class="{active: isPhone&&!codeOn}">{{codeText}}</view>
</view>
</view>
</view>
<view class="row">
<view class="lab" >验证码</view>
<view class="val">
<u--input placeholder="请输入" border="none" clearable type="number" maxlength="11" v-model="FormData.phone"></u--input>
<u--input placeholder="请输入" border="none" type="number" maxlength="11" v-model="FormData.code"></u--input>
</view>
</view>
<view class="row">
@ -47,7 +47,7 @@
<view class="val">
<view class="flex-b">
<view class="inputBox">
<u--input placeholder="请输入" border="none" clearable type="number" maxlength="11" v-model="FormData.phone"></u--input>
<u--input placeholder="请输入" border="none" clearable v-model="FormData.idCard"></u--input>
</view>
<view class="scan">
<image src="@/static/images/userCenter/btn_yinhangkax.png" mode=""></image>
@ -58,22 +58,37 @@
<view class="row">
<view class="lab">开户行</view>
<view class="val">
<u--input placeholder="请输入" border="none" clearable type="number" maxlength="11" v-model="FormData.phone"></u--input>
<u--input placeholder="请输入" border="none" clearable v-model="FormData.bankName"></u--input>
</view>
</view>
</view>
<u-picker :show="showReason" :columns="reasonArr" keyName="lab" @confirm="confirmReason" @cancel="showReason=false"></u-picker>
<view class="btnBg" @click="onsubmit">提交</view>
<u-picker :show="showReason" :columns="reasonArr" keyName="label" @confirm="confirmReason" @cancel="showReason=false"></u-picker>
</view>
</template>
<script>
import { getdictDataList, applyOnlineFund, getLoginCode } from '@/config/api.js'
export default {
props: ['info', 'orderId'],
data() {
return {
FormData: {
reasonType: '',
reasonName: '',
mobile: '',
amount: '',
stuName: ''
},
FormDataToast: {
reasonName: '请选择退款原因',
amount: '请输入退款金额',
stuName: '请输入持卡人',
mobile: '请输入手机号',
code: '请输入验证码',
idCard: '请输入卡号',
bankName: '请输入开启行'
},
showReason: false ,
codeOn: false,
reasonArr: [
@ -83,44 +98,94 @@
{lab: '去别的地方学',id: 3},
]
],
codeText: '发送验证码',
}
},
computed: {
isPhone() {
return uni.$u.test.mobile(this.FormData.phone)
return uni.$u.test.mobile(this.FormData.mobile)
}
},
created() {
this.getdictDataListFn()
},
methods: {
//
async onsubmit() {
for(let key in this.FormDataToast) {
if(!this.FormData[key]) {
return this.$u.toast(this.FormDataToast[key])
}
}
if(!this.isBankCardNumber(this.FormData.idCard)) return this.$u.toast('请输入正确的银行卡号')
let obj = Object.assign({},this.FormData)
obj.idCard = obj.idCard.replace(/\s/g, '');
obj.studentId = this.studentId
obj.orderId = this.orderId
obj.feeType = this.info.orderType
const res = await applyOnlineFund(obj)
if(res.code==0) {
this.$u.toast('申请退款成功')
setTimeout(()=>{
this.$goPage('/pages/mineEntry/myOrder/detail/detail?orderId='+this.orderId)
},1500)
}
// console.log(res)
},
changePrice() {
let maxPrice = this.$u.utils.priceTo(this.info.totalAmount)
if(this.FormData.amount*1>maxPrice) {
this.FormData.amount = ''
return this.$u.toast('金额不得超过¥'+maxPrice)
}
},
async getdictDataListFn() {
const {data: res} = await getdictDataList()
this.reasonArr = [ res ]
// console.log(res)
},
confirmReason(val) {
let item = val.value[0]
this.FormData.reasonName = item.label
this.FormData.reasonType = item.value
this.showReason = false
console.log(item)
},
//
isBankCardNumber(cardNumber) {
//
cardNumber = cardNumber.replace(/\s/g, '');
// 12-19
const regex = /^[0-9]{12,19}$/;
return regex.test(cardNumber);
},
//
async goSms() {
const {
FormData
} = this
if (!FormData.phone) return this.$u.toast('请输入手机号');
if (!this.FormData.mobile) return this.$u.toast('请输入手机号');
if (!this.isPhone) return this.$u.toast('手机号格式有误');
if (this.codeOn) return
const data = await getLoginCode({
codeType: 1,
phone: FormData.phone,
})
console.log(data)
this.codeOn = true;
let _this = this
getLoginCode({
// codeType: 1,
mobile: this.FormData.mobile,
scene: 1,
}).then(()=>{
//
var time = 60;
var timer = setInterval(() => {
time--;
this.codeText = time + "秒后重新发送"
this.codeOn = true;
_this.codeText = time + "秒后重新发送"
if (time == 0) {
clearInterval(timer);
this.codeText = "获取验证码";
this.codeOn = false;
_this.codeText = "获取验证码";
_this.codeOn = false;
}
}, 1000);
}).catch(()=>{
_this.codeOn = false;
})
},
}
}
@ -185,7 +250,10 @@
padding: 0rpx 0 16rpx 0;
}
}
.btnBg {
width: 396rpx;
margin: 94rpx auto;
}

68
pages/mineEntry/refund/refund - 副本.vue

@ -1,68 +0,0 @@
<template>
<view class="pageBgImg">
<topNavbar title="同城转校"></topNavbar>
<view class="pad">
<view class="card">
<view class="tpsBox">
<view class="row">
<view class="icon">
<image src="@/static/images/userCenter/warn.png" mode=""></image>
</view>
<view class="tps">请与教练协商确认达成一致后填写协商好的退款金额</view>
</view>
</view>
</view>
<myform></myform>
<view class="btnBg">提交</view>
</view>
</view>
</template>
<script>
import myform from './comp/myform'
export default {
components: { myform },
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.card {
padding: 12rpx 28rpx;
margin-bottom: 24rpx;
.tpsBox {
height: 140rpx;
background: #FFFFFF;
border-radius: 16rpx;
.row {
height: 100%;
display: flex;
align-items: center;
.icon {
width: 36rpx;
height: 36rpx;
}
.tps {
padding-left: 26rpx;
font-size: 28rpx;
font-weight: 600;
color: $themC;
line-height: 1.2em;
}
}
}
}
.btnBg {
width: 396rpx;
margin: 94rpx auto;
}
</style>

28
pages/mineEntry/refund/refund.vue

@ -1,6 +1,6 @@
<template>
<view class="pageBgImg">
<topNavbar title="同城转校"></topNavbar>
<topNavbar :title="title"></topNavbar>
<view class="pad">
<view class="card">
<view class="tpsBox">
@ -12,23 +12,36 @@
</view>
</view>
</view>
<myform></myform>
<view class="btnBg">提交</view>
<myform :info="info" :orderId="orderId"></myform>
</view>
</view>
</template>
<script>
import myform from './comp/myform'
import { applyOrderGet, applyOnlineFund } from '@/config/api.js'
export default {
components: { myform },
data() {
return {
orderId: '',
info: {},
title: '退款申请'
}
},
onLoad(options) {
this.orderId = options.orderId
this.applyOrderGetFn()
},
onPullDownRefresh() {
this.applyOrderGetFn()
},
methods: {
async applyOrderGetFn() {
const {data: res} = await applyOrderGet({ orderId: this.orderId})
this.info = res
uni.stopPullDownRefresh()
},
}
}
</script>
@ -61,8 +74,5 @@
}
}
.btnBg {
width: 396rpx;
margin: 94rpx auto;
}
</style>

15
pages/userCenter/login/loginByPhone.vue

@ -73,30 +73,33 @@
this.isCheck = val
},
//
async goSms() {
goSms() {
const {
FormData
} = this
if (!FormData.phone) return this.$u.toast('请输入手机号');
if (!this.isPhone) return this.$u.toast('手机号格式有误');
if (this.codeOn) return
const data = await getLoginCode({
this.codeOn = true;
getLoginCode({
scene: 1,
mobile: FormData.phone,
})
console.log(data)
//
}).then(()=>{
var time = 60;
var timer = setInterval(() => {
time--;
this.codeText = time + "秒后重新发送"
this.codeOn = true;
if (time == 0) {
clearInterval(timer);
this.codeText = "获取验证码";
this.codeOn = false;
}
}, 1000);
}).catch(()=>{
this.codeOn = false;
})
//
},
async submitFn() {
if(!this.btnHighlight) return

Loading…
Cancel
Save