扫码支付成功二次确认
This commit is contained in:
1 parent
242ae97c91
commit
62a90c100a
5 files changed
+34
-19
No files matched your search
@@ -21,13 +21,13 @@ VITE_OAUTH2_APP_CLIENT='mini:mini'
|
||||
# VITE_IMAGE_BASE_PATH = http://192.168.101.64:9999 # 邓-本地
|
||||
# VITE_IMAGE_BASE_PATH = https://123.156.230.15:8089/api # 线上
|
||||
# VITE_IMAGE_BASE_PATH = http://220.191.229.171:8090/api # 线上
|
||||
VITE_IMAGE_BASE_PATH = https://stgl.pj.gov.cn/api # 线上
|
||||
# VITE_IMAGE_BASE_PATH = http://pjcloud.center.takin.cc # 张
|
||||
#VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api # 信创线上
|
||||
VITE_IMAGE_BASE_PATH = https://stgl.pj.gov.cn/api # 域名线上
|
||||
|
||||
# ******************** start 开发环境 start ********************
|
||||
# ******************** start 开发环境 start ****************
|
||||
#VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上
|
||||
# VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/app-api
|
||||
VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/api # 域名线上
|
||||
# VITE_APP_DEV_SERVICE = http://192.168.101.64:9999 # 邓-本地
|
||||
# VITE_APP_DEV_SERVICE = http://127.0.0.1:9999
|
||||
# VITE_APP_DEV_SERVICE = http://123.156.230.15:8089/api/ # 线上
|
||||
@@ -38,10 +38,7 @@ VITE_IMAGE_BASE_PATH = https://stgl.pj.gov.cn/api # 线上
|
||||
# ******************** start 生产环境 start ****************
|
||||
#VITE_APP_PROD_SERVICE = http://123.156.228.134:48080/app-api
|
||||
#VITE_APP_PROD_SERVICE = http://59.202.170.152:81/api
|
||||
VITE_APP_PROD_SERVICE = https://stgl.pj.gov.cn/api
|
||||
VITE_APP_PROD_SERVICE = https://stgl.pj.gov.cn/api # 域名线上
|
||||
# VITE_APP_PROD_SERVICE = http://220.191.229.171:8090/api
|
||||
#VITE_APP_PROD_SERVICE = http://59.202.170.152:81/api # 信创线上
|
||||
# ******************** end 生产环境 end ********************
|
||||
|
||||
# VITE_DEV_ENV = dev
|
||||
VITE_DEV_ENV = prod
|
||||
# ******************** end 生产环境 end ********************
|
||||
@@ -342,7 +342,6 @@
|
||||
"iconPath": "",
|
||||
"selectedIconPath": ""
|
||||
}
|
||||
|
||||
// {
|
||||
// "pagePath": "pages/tabbar/canteen",
|
||||
// "text": "食堂",
|
||||
|
||||
@@ -139,7 +139,7 @@ const doProduct = (v: any) => {
|
||||
:gutter="10"
|
||||
:breakpoints="{
|
||||
1200: { rowPerView: 4 },
|
||||
800: { rowPerView: 3 },
|
||||
900: { rowPerView: 3 },
|
||||
375: { rowPerView: 2 },
|
||||
}"
|
||||
:hasAroundGutter="false"
|
||||
|
||||
@@ -67,6 +67,22 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<tm-modal
|
||||
v-model:show="show"
|
||||
:overlayClick="false"
|
||||
:showCancel="false"
|
||||
title="支付成功"
|
||||
confirmText="确定"
|
||||
position="right"
|
||||
@confirm="payConfirm"
|
||||
>
|
||||
<view class="w-full text-2xl text-[#333] flex justify-center">
|
||||
共
|
||||
<text class="text-3xl color-#0779FD">{{ Number(amount).toFixed(2) }}</text>
|
||||
元
|
||||
</view>
|
||||
</tm-modal>
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
@@ -86,6 +102,7 @@ const keyboardLayout = ref([
|
||||
])
|
||||
const scanData = ref<{ id?: string; name?: string }>({})
|
||||
const disabled = ref(false)
|
||||
const show = ref(false)
|
||||
|
||||
onShow(() => {
|
||||
scanData.value = usePayStore().payData
|
||||
@@ -160,16 +177,18 @@ const pay = async () => {
|
||||
if (res.code != 0) {
|
||||
throw new Error()
|
||||
}
|
||||
|
||||
uni.showToast({ title: "支付成功", icon: "success" })
|
||||
usePayStore().payData = {}
|
||||
setTimeout(() => {
|
||||
router.back()
|
||||
uni.hideLoading()
|
||||
}, 1000)
|
||||
show.value = true
|
||||
uni.hideLoading()
|
||||
} catch (error: any) {
|
||||
// uni.showToast({ title: "错误", icon: "error" })
|
||||
uni.showToast({ title: "错误", icon: "error" })
|
||||
uni.hideLoading()
|
||||
}
|
||||
}
|
||||
|
||||
// 支付确认
|
||||
const payConfirm = () => {
|
||||
usePayStore().payData = {}
|
||||
show.value = false
|
||||
router.back()
|
||||
}
|
||||
</script>
|
||||
@@ -178,7 +178,7 @@ const doScanCode = async () => {
|
||||
try {
|
||||
let decodedString: string | undefined = ""
|
||||
if (isDevEnv()) {
|
||||
decodedString = decodeBase64("eyJpZCI6IjE4ODk0ODM5Mzg0ODQ1MzEyMDEiLCJuYW1lIjoi5rWL6K+V6LaF5biCIn0=")
|
||||
decodedString = decodeBase64("eyJpZCI6IjE5MDQ3MDUzMDEwNTQ2NzY5OTMiLCJuYW1lIjoi5paw5Y6/5bqc6LaF5biCIn0=")
|
||||
uni.showToast({ title: "开发环境不是浙政钉环境,扫码仅供测试", icon: "none" })
|
||||
} else {
|
||||
const res: any = await (window as any).dd.scan({ type: "all" })
|
||||
|
||||
Reference in new issue
Block a user