mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-07 17:53:42 +08:00
wechat payment is ready for PC
This commit is contained in:
@@ -96,6 +96,9 @@ onMounted(() => {
|
||||
if (res.data.rand_bg) {
|
||||
bgClass.value = "rand-bg"
|
||||
}
|
||||
if (res.data.slogan) {
|
||||
slogan.value = res.data.slogan
|
||||
}
|
||||
}).catch(e => {
|
||||
ElMessage.error("获取系统配置失败:" + e.message)
|
||||
})
|
||||
|
||||
@@ -76,6 +76,9 @@
|
||||
<el-button type="success" @click="PayJs(scope.item)" size="small" v-if="payWays['payjs']">
|
||||
<span><i class="iconfont icon-wechat-pay"></i> 微信</span>
|
||||
</el-button>
|
||||
<el-button type="success" @click="wechatPay(scope.item)" size="small" v-if="payWays['wechat']">
|
||||
<i class="iconfont icon-wechat-pay"></i> 微信
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -314,6 +317,21 @@ const PayJs = (row) => {
|
||||
genPayQrcode()
|
||||
}
|
||||
|
||||
const wechatPay = (row) => {
|
||||
payName.value = '微信'
|
||||
curPay.value = "wechat"
|
||||
amount.value = (row.price - row.discount).toFixed(2)
|
||||
if (!isLogin.value) {
|
||||
store.setShowLoginDialog(true)
|
||||
return
|
||||
}
|
||||
|
||||
if (row) {
|
||||
curPayProduct.value = row
|
||||
}
|
||||
genPayQrcode()
|
||||
}
|
||||
|
||||
const queryOrder = (orderNo) => {
|
||||
httpPost("/api/payment/query", {order_no: orderNo}).then(res => {
|
||||
if (res.data.status === 1) {
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
<el-form-item label="控制台标题" prop="admin_title">
|
||||
<el-input v-model="system['admin_title']"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="网站Slogan" prop="slogan">
|
||||
<el-input v-model="system['slogan']"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="网站 LOGO" prop="logo">
|
||||
<el-input v-model="system['logo']" placeholder="网站LOGO图片">
|
||||
<template #append>
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<template>
|
||||
<div class="index container">
|
||||
<h2 class="title">{{title}}</h2>
|
||||
<van-notice-bar left-icon="info-o" :scrollable="true">
|
||||
你有多少想象力,AI就有多大创造力。我辈之人,先干为敬,陪您先把 AI 用起来。
|
||||
</van-notice-bar>
|
||||
<van-notice-bar left-icon="info-o" :scrollable="true">{{slogan}}}</van-notice-bar>
|
||||
|
||||
<div class="content">
|
||||
<van-grid :column-num="3" :gutter="10" border>
|
||||
@@ -90,8 +88,18 @@ const isLogin = ref(false)
|
||||
const apps = ref([])
|
||||
const loading = ref(false)
|
||||
const roles = ref([])
|
||||
const slogan = ref('你有多大想象力,AI就有多大创造力!')
|
||||
|
||||
onMounted(() => {
|
||||
httpGet("/api/config/get?key=system").then(res => {
|
||||
title.value = res.data.title
|
||||
if (res.data.slogan) {
|
||||
slogan.value = res.data.slogan
|
||||
}
|
||||
}).catch(e => {
|
||||
ElMessage.error("获取系统配置失败:" + e.message)
|
||||
})
|
||||
|
||||
checkSession().then((user) => {
|
||||
isLogin.value = true
|
||||
roles.value = user.chat_roles
|
||||
|
||||
@@ -69,6 +69,9 @@
|
||||
<van-button type="success" @click="pay('payjs',item)" size="small" v-if="payWays['payjs']">
|
||||
<span><i class="iconfont icon-wechat-pay"></i> 微信</span>
|
||||
</van-button>
|
||||
<van-button type="primary" @click="pay('wechat',item)" size="small" v-if="payWays['wechat']">
|
||||
<i class="iconfont icon-wechat-pay"></i> 微信
|
||||
</van-button>
|
||||
</div>
|
||||
</h4>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user