support wechat and alipay payment for mobile page

This commit is contained in:
RockYang
2024-09-30 16:20:40 +08:00
parent 8923e938d2
commit 5a04a935be
8 changed files with 120 additions and 45 deletions

View File

@@ -470,8 +470,6 @@ const initData = () => {
// 允许在输入框粘贴文件
inputRef.value.addEventListener('paste', (event) => {
const items = (event.clipboardData || window.clipboardData).items;
let fileFound = false;
for (let item of items) {
if (item.kind === 'file') {
const file = item.getAsFile();
@@ -780,6 +778,7 @@ const loadChatHistory = function (chatId) {
chatData.value = []
loading.value = true
httpGet('/api/chat/history?chat_id=' + chatId).then(res => {
loading.value = false
const data = res.data
if ((!data || data.length === 0) && chatData.value.length === 0) { // 加载打招呼信息
const _role = getRoleById(roleId.value)

View File

@@ -6,8 +6,13 @@
<script setup>
import {useRouter} from "vue-router";
import {isMobile} from "@/utils/libs";
const router = useRouter()
console.log(router.currentRoute.value.query)
window.close()
if (isMobile()) {
router.push('/mobile/profile')
} else {
window.close()
}
</script>

View File

@@ -60,7 +60,7 @@
<span class="name">{{ item.name }}</span>
<div class="pay-btn">
<div v-for="payWay in payWays" @click="pay(item,payWay)" :key="payWay">
<span v-if="payWay.pay_way === 'geek'">
<span>
<van-button type="primary" size="small" v-if="payWay.pay_type==='alipay'" >
<i class="iconfont icon-alipay"></i> 支付宝
</van-button>