diff --git a/pro_v3.5.1/view/uniapp/App.vue b/pro_v3.5.1/view/uniapp/App.vue index d1b04f8c..ae873bd1 100644 --- a/pro_v3.5.1/view/uniapp/App.vue +++ b/pro_v3.5.1/view/uniapp/App.vue @@ -95,7 +95,11 @@ success(e) { /* 窗口宽度大于420px且不在PC页面且不在移动设备时跳转至 PC.html 页面 */ if (e.windowWidth > 420 && !window.top.isPC && !/iOS|Android/i.test(e.system)) { - window.location.pathname = '/h5/static/html/pc.html'; + const p = (window.location.pathname || '/').replace(/\/$/, '') || '/'; + if (p.endsWith('/static/html/pc.html')) return; + /* 与 manifest h5.router.base 一致:根路径为 / 或子路径 /h5/ */ + const h5Base = p.startsWith('/h5/') || p === '/h5' ? '/h5' : ''; + window.location.pathname = `${h5Base}/static/html/pc.html`; } } }); diff --git a/pro_v3.5.1/view/uniapp/manifest.json b/pro_v3.5.1/view/uniapp/manifest.json index 75b6cb99..7c1e64f9 100644 --- a/pro_v3.5.1/view/uniapp/manifest.json +++ b/pro_v3.5.1/view/uniapp/manifest.json @@ -1,7 +1,7 @@ { - "name" : "黄精粉", + "name" : "范氏国香", "appid" : "__UNI__6691FE3", - "description" : "黄精粉商城", + "description" : "范氏国香商城", "versionName" : "3.5.1", "versionCode" : 351, "transformPx" : false, @@ -214,7 +214,7 @@ }, "h5" : { "devServer" : { - "https" : true + "https" : false }, "router" : { "mode" : "history", diff --git a/pro_v3.5.1/view/uniapp/pages/users/login/index.vue b/pro_v3.5.1/view/uniapp/pages/users/login/index.vue index 806f367f..869c2787 100644 --- a/pro_v3.5.1/view/uniapp/pages/users/login/index.vue +++ b/pro_v3.5.1/view/uniapp/pages/users/login/index.vue @@ -396,45 +396,44 @@ this.keyCode + Date.parse(new Date()); }, - success(data) { - this.$refs.verify.hide() - getCodeApi() - .then(res => { - this.keyCode = res.data.key; - this.getCode(data); - }) - .catch(res => { - this.$util.Tips({ - title: res - }); + success(data) { + if (this.$refs.verify) this.$refs.verify.hide() + getCodeApi() + .then(res => { + this.keyCode = res.data.key; + this.getCode(data); + }) + .catch(res => { + this.$util.Tips({ + title: res }); - }, - code() { - let that = this - if (!that.protocol) { - this.inAnimation = true - return that.$util.Tips({ - title: '请先阅读并同意协议' + }); + }, + code() { + let that = this + if (!that.protocol) { + this.inAnimation = true + return that.$util.Tips({ + title: '请先阅读并同意协议' + }); + } + if (!that.account) return that.$util.Tips({ + title: '请填写手机号码' + }); + if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({ + title: '请输入正确的手机号码' + }); + getCodeApi() + .then(res => { + that.keyCode = res.data.key; + that.getCode({ captchaVerification: '' }); + }) + .catch(res => { + that.$util.Tips({ + title: res }); - } - if (!that.account) return that.$util.Tips({ - title: '请填写手机号码' }); - if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({ - title: '请输入正确的手机号码' - }); - // getCodeApi() - // .then(res => { - // that.keyCode = res.data.key; - // that.getCode(); - // }) - // .catch(res => { - // that.$util.Tips({ - // title: res - // }); - // }); - this.$refs.verify.show() - }, + }, async getLogoImage() { let that = this; getLogo(2).then(res => { @@ -568,12 +567,12 @@ }); that.sendCode(); }) - .catch(res => { - this.$refs.verify.refresh() - that.$util.Tips({ - title: res - }); + .catch(res => { + if (this.$refs.verify) this.$refs.verify.refresh() + that.$util.Tips({ + title: res }); + }); }, async submit() { let that = this; diff --git a/pro_v3.5.1/view/uniapp/static/html/pc.html b/pro_v3.5.1/view/uniapp/static/html/pc.html index cb654fa3..9f34185d 100644 --- a/pro_v3.5.1/view/uniapp/static/html/pc.html +++ b/pro_v3.5.1/view/uniapp/static/html/pc.html @@ -35,21 +35,30 @@ } } -
- + +