refactor: replace direct WeChat/Alipay with unified pay-api gateway

Switch from direct WeChat Pay / Alipay integrations to the unified
宇之然 pay-api gateway (HMAC-SHA256 auth). Removes wechat_pay.py,
keeps PaymentGateway abstraction, adds UnifiedPayService. Simplifies
payment.py create_order to {plan, pay_type} params. Single webhook
endpoint replaces separate WeChat/Alipay notify handlers.
This commit is contained in:
TradeMate Dev
2026-05-29 18:36:50 +08:00
parent 5d2bced39f
commit 3e39cf0170
34 changed files with 973 additions and 424 deletions
+86 -7
View File
@@ -277,28 +277,64 @@
</view>
<view class="footer">
<view class="footer-qrcode">
<view class="qrcode-item">
<image src="/static/images/yzr/yuzhiran.jpg" class="qrcode-img" mode="aspectFill" />
<text class="qrcode-label">公众号</text>
</view>
<view class="qrcode-item">
<image src="/static/images/yzr/yuzhiran-tech.jpg" class="qrcode-img" mode="aspectFill" />
<text class="qrcode-label">服务号</text>
</view>
<view class="qrcode-item">
<image src="/static/images/yzr/yuzhiran-yhl.jpg" class="qrcode-img" mode="aspectFill" />
<text class="qrcode-label">小程序</text>
</view>
<view class="qrcode-item">
<image src="/static/images/yzr/kefu.png" class="qrcode-img" mode="aspectFill" />
<text class="qrcode-label">客服</text>
</view>
</view>
<view class="footer-links">
<text class="footer-link" @click="goToPage(PAGES.AGREEMENT_PRIVACY)">隐私政策</text>
<text class="footer-divider">|</text>
<text class="footer-link" @click="goToPage(PAGES.AGREEMENT_TERMS)">用户协议</text>
</view>
<view class="footer-beian">
<a class="footer-beian-link" :href="EXTERNAL_URLS.BEIAN" target="_blank">{{ APP_INFO.ICP }}</a>
<a class="footer-beian-link" :href="EXTERNAL_URLS.BEIAN_PSB" target="_blank">{{ APP_INFO.PSB }}</a>
<a class="footer-beian-link" :href="beianUrl" target="_blank">{{ beianIcp }}</a>
<text class="footer-divider">|</text>
<a class="footer-beian-link" :href="beianPsbUrl" target="_blank">{{ beianPsb }}</a>
</view>
<text class="footer-copyright">© {{ APP_INFO.COPYRIGHT }}. 保留所有权利.</text>
<text class="footer-copyright">© {{ copyrightYear }} 北京宇之然科技中心. 保留所有权利.</text>
</view>
<AiAssistant />
</view>
</template>
<script setup>
import { ref, onUnmounted } from 'vue'
import { ref, computed, onUnmounted } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import { authApi, customerApi, analyticsApi, onboardingApi, notificationApi, followupApi, translateApi, BASE_URL } from '@/utils/api.js'
import AiAssistant from '@/components/ai-assistant.vue'
import { STORAGE_KEYS, PAGES, EXTERNAL_URLS, APP_INFO, EXTRACT_FIELD_LABELS } from '@/config.js'
const beianInfo = computed(() => {
let hostname = ''
try { hostname = window.location.hostname } catch {}
if (hostname === 'yuzhiran.com' || hostname === 'www.yuzhiran.com') {
return { icp: '京ICP备2026007249号-1', psb: '京公网安备11011502039545号', psbUrl: 'https://beian.mps.gov.cn/#/query/webSearch?code=11011502039545' }
}
if (hostname === 'yuzhiran.com.cn' || hostname === 'www.yuzhiran.com.cn') {
return { icp: '京ICP备2026007249号-2', psb: '京公网安备11011502039622号', psbUrl: 'https://beian.mps.gov.cn/#/query/webSearch?code=11011502039622' }
}
return { icp: APP_INFO.ICP, psb: APP_INFO.PSB, psbUrl: EXTERNAL_URLS.BEIAN_PSB }
})
const beianUrl = computed(() => EXTERNAL_URLS.BEIAN)
const beianIcp = computed(() => beianInfo.value.icp)
const beianPsb = computed(() => beianInfo.value.psb)
const beianPsbUrl = computed(() => beianInfo.value.psbUrl)
const copyrightYear = computed(() => new Date().getFullYear())
const showAnnouncement = ref(false)
const currentAnnouncement = ref(0)
const announcements = [
@@ -1239,10 +1275,53 @@ const playTryResult = () => {
}
.footer {
margin-top: 40rpx;
padding: 40rpx 20rpx 30rpx;
padding: 30rpx 20rpx 20rpx;
background: #f8f8f8;
text-align: center;
border-top: 2rpx solid #e8e8e8;
}
.footer-qrcode {
display: flex;
justify-content: center;
gap: 24rpx;
margin-bottom: 20rpx;
flex-wrap: wrap;
}
.qrcode-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 6rpx;
}
.qrcode-img {
width: 80rpx;
height: 80rpx;
border-radius: 10rpx;
}
.qrcode-label {
font-size: 20rpx;
color: #999;
}
.footer-links {
display: flex;
justify-content: center;
align-items: center;
gap: 16rpx;
margin-bottom: 12rpx;
}
.footer-link {
font-size: 24rpx;
color: #666;
}
.footer-divider {
font-size: 24rpx;
color: #d9d9d9;
}
.footer-links {
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB