123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- <!DOCTYPE html>
- <html class="h100p">
- <head>
- <meta charset="utf-8">
- <title>忘记密码-创业帮</title>
- <meta name="keywords" content="忘记密码-创业帮">
- <meta name="description" content="忘记密码-创业帮">
- <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,shrink-to-fit=no,user-scalable=no" name="viewport" viewport="cover">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
- <meta content="telephone=no" name="format-detection">
- <meta content="email=no" name="format-detection">
- <meta name="apple-mobile-web-app-title" content="忘记密码-创业帮">
- <meta http-equiv="Cache-Control" content="no-siteapp">
- <link rel="stylesheet" href="./static/css/main.css">
- </head>
- <body class="bgc-back nopb pt0" style="padding-top:0;">
- <div id="app" v-cloak>
- <van-nav-bar class="bgc-back user_rank_explan_title" left-arrow @click-left="goback" v-if="toptitleisshow">
- <template #left> <img src="./static/images/left.png" alt=""></template>
- </van-nav-bar>
- <div class="regist-box-input pt8 pb32 pl32 pr32">
- <div class="f24 c333 b pb32">商户信息管理</div>
- <div class="f12 c666 mb6">真实姓名</div>
- <van-field class="mb12" v-model="reg.RealName" @input="checkValue" :readonly="!isall" placeholder="请输入商户的真实姓名"></van-field>
- <div class="f12 c666 mb6">手机号</div>
- <van-field class="mb12" v-model="reg.Mobile" @input="checkValue" :readonly="!isall" placeholder="请输入商户手机号"></van-field>
- <div class="f12 c666 mb6">身份证号码</div>
- <van-field class="mb12" v-model="reg.Idcard" @input="checkValue" :readonly="!isall" placeholder="请输入商户身份证号码"></van-field>
- <div class="f12 c666 mb6">机具类型</div>
- <van-field class="mb12" v-model="reg.MerchantType" readonly @click="choseType = true" @input="checkValue" placeholder="请输入商户身份证号码"></van-field>
- <div class="pt16 bc333" v-cloak>
- <van-button type="primary" block color="#FFD500" v-if="isall" :disabled="canRegist ? false : true" @click="changepwd">确认</van-button>
- </div>
- </div>
- </div>
- <script src="./static/js/klm-vv.min.js"></script>
- <script src="./static/js/appfunc.min.js"></script>
- <script src="./static/js/klm-axios-config.js"></script>
- <script src="./static/js/publicfn.js"></script>
- <script>
- if ('OTPCredential' in window) {
- // DOMContentLoaded 事件会等待 DOM树准备好
- window.addEventListener('DOMContentLoaded', e => {
- const input = document.querySelector('input[autocomplete="one-time-code"]');
- if (!input) return;
- const ac = new AbortController();
- // 用户可以自己输入验证码并且提交,使用 AbortController 终止 Web OTP API 的自动填充
- // AbortController 还可以终止 fetch 的请求
- // 监听终止事件 ac.signal.addEventListener('abort', function(){});
- const form = input.closest('form');
- if (form) {
- form.addEventListener('submit', e => {
- ac.abort(); // 终止 Web OTP API 的自动填充
- });
- }
- navigator.credentials.get({
- otp: { transport:['sms'] },
- signal: ac.signal
- }).then(otp => {
- input.value = otp.code;
- if (form) form.submit();
- }).catch(err => {
- console.log(err);
- });
- });
- }
- // 通过 CDN 引入时不会自动注册 Lazyload 组件
- // 可以通过下面的方式手动注册
- Vue.use(vant.Lazyload);
-
- // 在 #app 标签下渲染一个按钮组件
- let app = new Vue({
- el: '#app',
- data() {
- return {
- //- 选择器选择项(动态生成)
- typecolumns: [
- ],
- choseTypetitle:'',
- choseType:false,
- toptitleisshow,
- reg:{
- Mobile: '',
- RealName:'',
- Idcard: '',
- MerchantType: '',
- },
- isall:false,
- canRegist: false,
- products:[],
- };
- },
- created(){
- //- this.getproductlist();
- this.getmerchantinfo();
- },
- methods: {
- //- choseTypeonConfirm(date){
- //- this.products.forEach(item=>{
- //- if(item.Name === date){
- //- this.reg.MerchantType = date;
- //- this.reg.BrandId = item.Id;
- //- };
- //- });
- //- this.choseType = false;
- //- },
- async getproductlist(){
- const res = await getRequest('api/v1/pos/kqproducts/list?t='+Math.random(6),JSON.stringify({PageSize:10,PageNum:1}));
- if(res.status === '1') {
- //- this.typecolumns = res.data.map(item=>{
- //- return item.Name
- //- });
- this.products = res.data;
- };
- },
- //- 确定按钮是否能够使用(需要将信息填入完整)
- checkValue(){
- this.canRegist = (this.reg.Mobile !== '' && this.reg.RealName !== '' && this.reg.Idcard !== '') ? true : false;
- },
- //- 获取商户详情
- async getmerchantinfo(){
- const list = await getRequest('api/v1/pos/kqproducts/list?t='+Math.random(6),JSON.stringify({PageSize:10,PageNum:1}));
- if(list.status === '1') {
- this.products = list.data;
- };
- const Id = PublicLib.getCookieInfo('merchantId');
- const res = await getRequest('/api/v1/pos/merchantinfo/detail',JSON.stringify({Id}));
- if(res.status !== '1') return tips(res.info);
- this.products.forEach(item=>{
- if(item.Name === res.data.ProductType){
- this.reg.BrandId = item.Id;
- };
- });
- if(res.data.MerIdcardNo === null){
- this.isall = true;
- }else{
- this.reg = {
- Mobile:res.data.MerchantMobile,
- RealName:res.data.MerRealName,
- Idcard:res.data.MerIdcardNo,
- };
- //- this.products.forEach(item=>{
- //- if(item.Id === res.data.BrandId){
- //- this.reg.MerchantType = item.Name;
- //- };
- //- });
- };
- this.reg.MerchantType = res.data.ProductType;
- },
- changepwd:undebounce(async function(){
- //- if(!verificationName(this.reg.RealName)) return tips('请输入中文姓名');
- if(this.reg.RealName.length > 14) return tips('请输入正确商户姓名');
- if(verification(this.reg.Mobile)) return;
- if(!verificationIdCardNumber(this.reg.Idcard)) return tips('请输入正确的身份证号码');
- const Id = PublicLib.getCookieInfo('merchantId');
- const res = await postRequest('/api/v1/pos/posmerchantinfo/editinfo?t='+Math.random(6),JSON.stringify({Id,MerchantMobile:this.reg.Mobile,MerRealName:this.reg.RealName,MerIdcardNo:this.reg.Idcard,BrandId:this.reg.BrandId}));
- if(res.status !== '1') return tips(res.info);
- tips('商户信息维护成功!');
- setTimeout(()=>{
- this.goback();
- },1500);
- },300),
- goback(){
- PublicLib.GoBack({Level:1});
- }
- }
- });
- </script>
- </body>
- </html>
|