123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <template>
- <view :style="{ minHeight: sys.windowHeight + 'px' }"
- :class="[$tm.vx.state().tmVuetify.black ? 'black' : ' ']">
- <tm-menubars title="" :shadow="0" :showback="true"></tm-menubars>
- <view class="tou C1b1b1b">
- <view>忘记密码?</view>
- <view class="text-size-s mt-20">请输入您的注册手机号码,我们将发送短信验证码到您的手机</view>
- </view>
- <view class="zhuti">
- <tm-form>
- <view class="tel text-size-m mt-50">请输入注册手机号码</view>
- <tm-input name="title" v-model="reqData.mobile"></tm-input>
- <view class="mima">
- <tm-input placeholder="请输入短信验证码" name="title" v-model="reqData.sms_code"></tm-input>
- <tm-button class="wangji" @click="sendyzm" size="m">{{yzmvar.text}}</tm-button>
- </view>
- <view class="px-24">
- <tm-button @click="xia()" theme="primary" :round="24" class="mt100" block>下一步</tm-button>
- </view>
- </tm-form>
- </view>
- <!-- 弹出层消息 -->
- <tm-message ref="toast"></tm-message>
- </view>
- </template>
- <script>
- import{myRequest} from '@/api/request.js'
- export default {
- data() {
- return {
- kan:1, //1没看2看
- kan1:3, //1没看2看
- reqData:{
- mobile:'',
- sms_code:''
- },
- yzmvar:{
- text:'发送验证码'
- }
- };
- },
- onLoad() {
-
- },
- created() {
- this.sys = uni.getSystemInfoSync();
- },
- methods: {
- xia(){
- var that=this;
- if(that.reqData.mobile==""){
- that.$refs.toast.show({model:'warn',label:'请输入手机号'})
- return
- }else if(that.reqData.sms_code==""){
- that.$refs.toast.show({model:'warn',label:'请输入验证码'})
- return
- }
- uni.navigateTo({
- url: "/pages/zhtijiao/index?mobile="+that.reqData.mobile+'&sms_code='+that.reqData.sms_code,
- })
- },
- sendyzm(){
- var that=this;
- if(that.reqData.mobile==""){
- that.$refs.toast.show({model:'warn',label:'请输入手机号'})
- return
- }
- uni.request({
- url: "https://apitest.yitutianxia.com/common/SendSms?mobile="+that.reqData.mobile,
- method: "get",
- data:{},
- dataType:'json',
- success : function(res) {
- console.log(res)
- if (res.data.code == 200) {
- that.$refs.toast.show({model:'success',label:res.data.msg})
- that.yzmvar.text="已发送";
- setTimeout(function(){
- that.yzmvar.text="发送验证码";
- },15000)
- }else{
- that.$refs.toast.show({model:'error',label:res.data.msg})
- }
- },
- error : function(e) {
- alert("网络异常,请重试");
- }
- });
- },
- },
- }
- </script>
- <style lang="scss">
- /deep/ .tm-menubars .body{
- background-color: #1b1b1b !important;
- }
- /deep/ .grey-darken-5{
- background-color: #0d0d0d!important;
- padding: 0px !important;
- }
- .tou{
- font-size: 28px;
- padding: 15px 30px 40px 30px;
- }
- .zhuti{
- padding: 15px 30px 40px 30px;
- }
- .mima{
- position: relative;
- }
- .wangji{
- position: absolute;
- right: 0px;
- top: 3px;
- }
- /deep/ .wangji .primary{
- background-color: #303440 !important;
- }
- .tel{
- margin-left: 5px;
- }
- </style>
|