修复小程序违规

This commit is contained in:
hero920103 committed 2026-11-16 18:25:44 +08:00
1 parent 3fdda89833
commit 54c90072fb
8 files changed
+28 -28

No files matched your search

+11 -11
View File
@@ -24,7 +24,7 @@
<block v-if="step === 'main'">
<view class="panel-head">
<text class="panel-title">欢迎登录</text>
<text class="panel-sub">使用微信手机号,一键完成身份认证</text>
<text class="panel-sub">使用手机号快捷登录,快速完成身份认证</text>
</view>
<view v-if="errorMsg" class="error-box">
@@ -34,16 +34,16 @@
<!-- #ifdef MP-WEIXIN -->
<block v-if="showMiniLogin">
<button
class="btn-wechat"
class="btn-phone"
open-type="getPhoneNumber"
:class="{ disabled: submitting }"
@getphonenumber="onGetPhoneNumber"
>
<FaIcon name="weixin" type="brands" color="#ffffff" :size="20" />
<text class="btn-wechat-text">{{ submitting ? '登录中...' : '微信手机号一键登录' }}</text>
<FaIcon name="phone" color="#ffffff" :size="20" />
<text class="btn-phone-text">{{ submitting ? '登录中...' : '手机号快捷登录' }}</text>
</button>
<view class="tip-row">
<text class="tip-text">首次使用请先用账号密码登录一次,自动完成微信绑定后即可一键登录</text>
<text class="tip-text">首次使用请先用账号密码登录一次,完成账号绑定后即可快捷登录</text>
</view>
</block>
<view v-else class="loading-box">
@@ -510,9 +510,9 @@ function uniLoginCode() {
provider: 'weixin',
success: (res) => {
if (res && res.code) resolve(res.code)
else reject(new Error('未获取到微信登录凭证'))
else reject(new Error('未获取到登录凭证'))
},
fail: () => reject(new Error('获取微信登录凭证失败'))
fail: () => reject(new Error('获取登录凭证失败'))
})
})
}
@@ -532,7 +532,7 @@ async function onGetPhoneNumber(e) {
const detail = (e && e.detail) || {}
const errMsg = detail.errMsg || ''
if (errMsg.indexOf('deny') !== -1) {
uni.showToast({ title: '你已取消手机号授权', icon: 'none' })
uni.showToast({ title: '已取消手机号快捷登录', icon: 'none' })
return
}
const phoneCode = detail.code && errMsg.indexOf('fail') === -1 ? detail.code : ''
@@ -597,7 +597,7 @@ function showError(err) {
const raw = (err && err.message) || ''
if (/url not in domain list/i.test(raw)) {
errorMsg.value =
'当前小程序未配置服务器域名,请在微信公众平台「开发管理 - 开发设置 - 服务器域名」中添加 api.yunzer.cn 为 request 合法域名'
'当前小程序未配置服务器域名,请在小程序管理后台「开发管理 - 开发设置 - 服务器域名」中添加 api.yunzer.cn 为 request 合法域名'
return
}
errorMsg.value = raw || '登录失败,请稍后重试'
@@ -954,7 +954,7 @@ function goForget() {
}
}
.btn-wechat {
.btn-phone {
margin-top: 0;
height: 96rpx;
border-radius: 20rpx;
@@ -980,7 +980,7 @@ function goForget() {
}
}
.btn-wechat-text {
.btn-phone-text {
font-size: 32rpx;
color: #ffffff;
}