feat: 小程序演示版改造 + 服务端安全加固
- 许愿树移除付费许愿/商品选择/微信支付调用,全部走免费许愿 - 许愿发布前接入微信 msgSecCheck v2 内容安全检测(access_token 内存缓存) - 许愿字数限制改为按字符计算(中文按 1 字计) - 占卜页改名「民俗趣算」并弱化「算命」措辞,占卜/每日运势页加文化声明 - 生产环境 JWT_SECRET 缺失或为默认值/不足 32 位时拒绝启动 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
12fa2b0d19
commit
51d1a1999f
@@ -122,64 +122,22 @@
|
||||
</view>
|
||||
|
||||
<view class="modal-body">
|
||||
<!-- 许愿类型选择 -->
|
||||
<view class="type-selector">
|
||||
<view
|
||||
class="type-item {{wishType === 'free' ? 'active' : ''}}"
|
||||
bindtap="selectType"
|
||||
data-type="free"
|
||||
>
|
||||
<text class="type-name">免费许愿</text>
|
||||
<text class="type-desc">20字以内</text>
|
||||
</view>
|
||||
<view
|
||||
class="type-item {{wishType === 'paid' ? 'active' : ''}}"
|
||||
bindtap="selectType"
|
||||
data-type="paid"
|
||||
>
|
||||
<text class="type-name">付费许愿</text>
|
||||
<text class="type-desc">更多特权</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 许愿内容输入 -->
|
||||
<textarea
|
||||
class="wish-input"
|
||||
placeholder="请输入你的愿望..."
|
||||
maxlength="{{wishType === 'free' ? maxFreeLength : maxPaidLength}}"
|
||||
maxlength="{{maxFreeLength}}"
|
||||
bindinput="onInputContent"
|
||||
value="{{wishContent}}"
|
||||
></textarea>
|
||||
<view class="input-count">
|
||||
{{wishContent.length}}/{{wishType === 'free' ? maxFreeLength : maxPaidLength}}
|
||||
</view>
|
||||
|
||||
<!-- 付费商品选择 -->
|
||||
<view class="product-section" wx:if="{{wishType === 'paid'}}">
|
||||
<view class="product-title">选择许愿商品</view>
|
||||
<view class="product-list">
|
||||
<view
|
||||
wx:for="{{products}}"
|
||||
wx:key="id"
|
||||
class="product-item {{selectedProduct && selectedProduct.id === item.id ? 'active' : ''}}"
|
||||
bindtap="selectProduct"
|
||||
data-id="{{item.id}}"
|
||||
>
|
||||
<view class="product-info">
|
||||
<text class="product-name">{{item.name}}</text>
|
||||
<text class="product-desc">展示{{item.duration}}天</text>
|
||||
</view>
|
||||
<view class="product-price">¥{{item.price / 100}}</view>
|
||||
</view>
|
||||
</view>
|
||||
{{wishContent.length}}/{{maxFreeLength}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="modal-footer">
|
||||
<button class="btn-outline" bindtap="closeCreateModal">取消</button>
|
||||
<button class="btn-primary" bindtap="submitWish">
|
||||
{{wishType === 'paid' ? '支付并许愿' : '提交许愿'}}
|
||||
</button>
|
||||
<button class="btn-primary" bindtap="submitWish">提交许愿</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user