删除过时的部署管理端触发词文档,并更新相关索引以反映新的触发词约定,确保文档一致性和准确性。
This commit is contained in:
@@ -18,7 +18,6 @@ Page({
|
||||
amountDisplay: '0.00',
|
||||
isSinglePageMode: false,
|
||||
showLoginModal: false,
|
||||
agreeProtocol: false,
|
||||
showPrivacyModal: false,
|
||||
// 创建态
|
||||
isCreateMode: false,
|
||||
@@ -227,7 +226,7 @@ Page({
|
||||
}
|
||||
const userId = app.globalData.userInfo?.id
|
||||
if (!userId) {
|
||||
this.setData({ showLoginModal: true, agreeProtocol: false })
|
||||
this.setData({ showLoginModal: true })
|
||||
return
|
||||
}
|
||||
await this._doRedeem()
|
||||
@@ -265,51 +264,15 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
closeLoginModal() {
|
||||
onLoginModalClose() {
|
||||
this.setData({ showLoginModal: false, showPrivacyModal: false })
|
||||
},
|
||||
toggleAgree() {
|
||||
this.setData({ agreeProtocol: !this.data.agreeProtocol })
|
||||
},
|
||||
async handleWechatLogin() {
|
||||
if (!this.data.agreeProtocol) {
|
||||
wx.showToast({ title: '请先阅读并同意用户协议和隐私政策', icon: 'none' })
|
||||
return
|
||||
}
|
||||
try {
|
||||
const result = await app.login()
|
||||
if (!result) return
|
||||
this.setData({ showLoginModal: false, agreeProtocol: false })
|
||||
await this._doRedeem()
|
||||
} catch (e) {
|
||||
wx.showToast({ title: '登录失败', icon: 'none' })
|
||||
}
|
||||
},
|
||||
handleAgreePrivacyForPhone() {
|
||||
if (app._privacyResolve) {
|
||||
app._privacyResolve({ buttonId: 'agree-privacy-btn', event: 'agree' })
|
||||
app._privacyResolve = null
|
||||
}
|
||||
onLoginModalPrivacyAgree() {
|
||||
this.setData({ showPrivacyModal: false })
|
||||
},
|
||||
async handlePhoneLogin(e) {
|
||||
if (!e.detail.code) return this.handleWechatLogin()
|
||||
try {
|
||||
const result = await app.loginWithPhone(e.detail.code)
|
||||
if (!result) return
|
||||
this.setData({ showLoginModal: false })
|
||||
await this._doRedeem()
|
||||
} catch (e) {
|
||||
wx.showToast({ title: '登录失败', icon: 'none' })
|
||||
}
|
||||
},
|
||||
|
||||
stopPropagation() {},
|
||||
openUserProtocol() {
|
||||
wx.navigateTo({ url: '/pages/agreement/agreement' })
|
||||
},
|
||||
openPrivacy() {
|
||||
wx.navigateTo({ url: '/pages/privacy/privacy' })
|
||||
async onLoginModalSuccess() {
|
||||
this.setData({ showLoginModal: false })
|
||||
await this._doRedeem()
|
||||
},
|
||||
|
||||
goBack() {
|
||||
|
||||
@@ -145,30 +145,15 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 登录弹窗(好友领取时未登录) -->
|
||||
<view class="modal-overlay" wx:if="{{showLoginModal}}" bindtap="closeLoginModal">
|
||||
<view class="modal-content login-modal" catchtap="stopPropagation">
|
||||
<view class="modal-close" bindtap="closeLoginModal"><icon name="x" size="36" color="#8e8e93"></icon></view>
|
||||
<view class="login-icon"><icon name="lock" size="80" color="#00CED1"></icon></view>
|
||||
<text class="login-title">登录 卡若创业派对</text>
|
||||
<text class="login-desc">登录后可免费领取并阅读</text>
|
||||
<button id="agree-phone-btn" class="btn-wechat {{agreeProtocol ? '' : 'btn-wechat-disabled'}}" open-type="getPhoneNumber|agreePrivacyAuthorization" bindgetphonenumber="handlePhoneLogin" bindagreeprivacyauthorization="handleAgreePrivacyForPhone" disabled="{{!agreeProtocol}}">
|
||||
<text class="btn-wechat-icon">微</text>
|
||||
<text>手机号一键登录</text>
|
||||
</button>
|
||||
<view class="privacy-wechat-row" wx:if="{{showPrivacyModal}}">
|
||||
<text class="privacy-wechat-desc">为获取手机号,请先同意《用户隐私保护指引》</text>
|
||||
<button id="agree-privacy-btn" class="privacy-agree-btn" open-type="agreePrivacyAuthorization" bindagreeprivacyauthorization="handleAgreePrivacyForPhone">同意</button>
|
||||
</view>
|
||||
<view class="login-agree-row" catchtap="toggleAgree">
|
||||
<view class="agree-checkbox {{agreeProtocol ? 'agree-checked' : ''}}"><icon wx:if="{{agreeProtocol}}" name="check" size="24" color="#34C759"></icon></view>
|
||||
<text class="agree-text">我已阅读并同意</text>
|
||||
<text class="agree-link" bindtap="openUserProtocol">《用户协议》</text>
|
||||
<text class="agree-text">和</text>
|
||||
<text class="agree-link" bindtap="openPrivacy">《隐私政策》</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 登录弹窗(公用组件) -->
|
||||
<login-modal
|
||||
show="{{showLoginModal}}"
|
||||
desc="登录后可免费领取并阅读"
|
||||
showPrivacyModal="{{showPrivacyModal}}"
|
||||
bind:close="onLoginModalClose"
|
||||
bind:success="onLoginModalSuccess"
|
||||
bind:privacyagree="onLoginModalPrivacyAgree"
|
||||
/>
|
||||
|
||||
<!-- 背景光效 -->
|
||||
<view class="bg-effects">
|
||||
|
||||
Reference in New Issue
Block a user