去掉支付回调地址传参,由后端接口生成
This commit is contained in:
parent
aae8438289
commit
56f9356a48
|
@ -9,8 +9,8 @@ const config = {
|
||||||
// pagesInclude: ['jlgh/coupon.vue', 'jlgh/redeem.vue'],
|
// pagesInclude: ['jlgh/coupon.vue', 'jlgh/redeem.vue'],
|
||||||
// pagesInclude: ['jlgh/index.vue'],
|
// pagesInclude: ['jlgh/index.vue'],
|
||||||
// pagesInclude: ['jlgh/login.vue'],
|
// pagesInclude: ['jlgh/login.vue'],
|
||||||
// pagesInclude: ['jlgh/orderDetail.vue'],
|
pagesInclude: ['jlgh/orderDetail.vue'],
|
||||||
pagesInclude: ['index'],
|
// pagesInclude: ['index'],
|
||||||
}
|
}
|
||||||
|
|
||||||
const { pages, pagesInclude } = config
|
const { pages, pagesInclude } = config
|
||||||
|
|
|
@ -5,7 +5,7 @@ VITE_UNI_APPID = 'H57F2ACE4'
|
||||||
VITE_WX_APPID = 'wxa2abb91f64032a2b'
|
VITE_WX_APPID = 'wxa2abb91f64032a2b'
|
||||||
|
|
||||||
# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
|
# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
|
||||||
VITE_APP_PUBLIC_BASE = ./
|
VITE_APP_PUBLIC_BASE = './'
|
||||||
# 测试线上
|
# 测试线上
|
||||||
VITE_SERVER_BASEURL = 'https://gateway.dev.cdlsxd.cn'
|
VITE_SERVER_BASEURL = 'https://gateway.dev.cdlsxd.cn'
|
||||||
# 曾徐平
|
# 曾徐平
|
||||||
|
|
|
@ -7,12 +7,12 @@ VITE_SHOW_SOURCEMAP = false
|
||||||
|
|
||||||
# VITE_APP_PUBLIC_BASE = ./
|
# VITE_APP_PUBLIC_BASE = ./
|
||||||
# 测试线上
|
# 测试线上
|
||||||
# VITE_SERVER_BASEURL = 'https://gateway.dev.cdlsxd.cn'
|
VITE_SERVER_BASEURL = 'https://gateway.dev.cdlsxd.cn'
|
||||||
# 正式环境
|
# 正式环境
|
||||||
VITE_SERVER_BASEURL = 'https://scens.h5.86698.cn'
|
# VITE_SERVER_BASEURL = 'https://scens.h5.86698.cn'
|
||||||
|
|
||||||
# VITE_APP_PROXY = true
|
# VITE_APP_PROXY = true
|
||||||
# 测试线上
|
# 测试线上
|
||||||
# VITE_APP_PROXY_PREFIX = 'https://gateway.dev.cdlsxd.cn'
|
VITE_APP_PROXY_PREFIX = 'https://gateway.dev.cdlsxd.cn'
|
||||||
# 正式环境
|
# 正式环境
|
||||||
VITE_APP_PROXY_PREFIX = 'https://scens.h5.86698.cn'
|
# VITE_APP_PROXY_PREFIX = 'https://scens.h5.86698.cn'
|
||||||
|
|
|
@ -16,11 +16,12 @@
|
||||||
},
|
},
|
||||||
"pages": [
|
"pages": [
|
||||||
{
|
{
|
||||||
"path": "pages/index/index",
|
"path": "pages/jlgh/orderDetail",
|
||||||
"type": "home",
|
"type": "home",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"navigationBarTitleText": "首页"
|
"navigationBarTitleText": "订单详情",
|
||||||
|
"navigationBarBackgroundColor": "#FFF"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
@ -78,6 +78,7 @@ const query = reactive<any>({
|
||||||
|
|
||||||
const dui = (item) => {
|
const dui = (item) => {
|
||||||
item.activity_code = query.activity_code
|
item.activity_code = query.activity_code
|
||||||
|
item.lottery_code = query.lottery_code
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/jlgh/redeem?item=' + encodeURIComponent(JSON.stringify(item)),
|
url: '/pages/jlgh/redeem?item=' + encodeURIComponent(JSON.stringify(item)),
|
||||||
})
|
})
|
||||||
|
|
|
@ -91,7 +91,6 @@
|
||||||
import { onMounted, reactive, ref, unref } from 'vue'
|
import { onMounted, reactive, ref, unref } from 'vue'
|
||||||
import { queryOrderDetail, goPay, getPayConfig } from './api'
|
import { queryOrderDetail, goPay, getPayConfig } from './api'
|
||||||
import { debounce, throttle } from '@/utils/index'
|
import { debounce, throttle } from '@/utils/index'
|
||||||
// import { useUserStore } from '@/store'
|
|
||||||
|
|
||||||
const orderId = ref<string>('')
|
const orderId = ref<string>('')
|
||||||
const activityCode = ref<string>('')
|
const activityCode = ref<string>('')
|
||||||
|
@ -109,7 +108,6 @@ const payConfig = {
|
||||||
label: '微信',
|
label: '微信',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
// const useStore = useUserStore()
|
|
||||||
const second = ref(5)
|
const second = ref(5)
|
||||||
const current = ref(0)
|
const current = ref(0)
|
||||||
|
|
||||||
|
@ -131,9 +129,6 @@ function countDown() {
|
||||||
onShow(async () => {
|
onShow(async () => {
|
||||||
// eslint-disable-next-line camelcase
|
// eslint-disable-next-line camelcase
|
||||||
const { isPayBack } = getUrlParams() as any
|
const { isPayBack } = getUrlParams() as any
|
||||||
// uni.setNavigationBarTitle({
|
|
||||||
// title: (useStore.getUserInfo.contentData as any).order_detail_templates.moduledesc,
|
|
||||||
// })
|
|
||||||
if (isPayBack) {
|
if (isPayBack) {
|
||||||
pageType.value = 1
|
pageType.value = 1
|
||||||
countDown()
|
countDown()
|
||||||
|
@ -202,7 +197,6 @@ const pay = throttle(async (item) => {
|
||||||
// eslint-disable-next-line camelcase
|
// eslint-disable-next-line camelcase
|
||||||
pay_center_channel_id,
|
pay_center_channel_id,
|
||||||
// eslint-disable-next-line camelcase
|
// eslint-disable-next-line camelcase
|
||||||
...(pay_type === 1 && { return_url: window.location.href + '&isPayBack=true' }),
|
|
||||||
}
|
}
|
||||||
const res = await goPay(params)
|
const res = await goPay(params)
|
||||||
const { code, message, data } = res as any
|
const { code, message, data } = res as any
|
||||||
|
|
|
@ -134,7 +134,6 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import api from './api'
|
import api from './api'
|
||||||
// import { useUserStore } from '@/store'
|
|
||||||
import { debounce, throttle } from '@/utils/index'
|
import { debounce, throttle } from '@/utils/index'
|
||||||
const ismask = ref<boolean>(false)
|
const ismask = ref<boolean>(false)
|
||||||
const info = reactive<any>({})
|
const info = reactive<any>({})
|
||||||
|
@ -156,7 +155,6 @@ const pay_order_id = ref('')
|
||||||
const pay_order_no = ref('')
|
const pay_order_no = ref('')
|
||||||
// eslint-disable-next-line camelcase
|
// eslint-disable-next-line camelcase
|
||||||
const wait_pay_amount = ref(0)
|
const wait_pay_amount = ref(0)
|
||||||
// const useStore = useUserStore()
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
const item = decodeURIComponent(options.item)
|
const item = decodeURIComponent(options.item)
|
||||||
Object.assign(info, JSON.parse(item))
|
Object.assign(info, JSON.parse(item))
|
||||||
|
@ -226,26 +224,16 @@ function clickEvent() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const payEvent = throttle(async (item) => {
|
const payEvent = throttle(async (item) => {
|
||||||
const contentData: any = await api.getContent({ activity_code: info.activity_code })
|
|
||||||
// eslint-disable-next-line camelcase
|
// eslint-disable-next-line camelcase
|
||||||
const { pay_type, pay_center_channel_id } = item
|
const { pay_type, pay_center_channel_id } = item
|
||||||
// eslint-disable-next-line camelcase
|
// eslint-disable-next-line camelcase
|
||||||
const order_no = pay_order_no.value
|
const order_no = pay_order_no.value
|
||||||
// eslint-disable-next-line camelcase
|
// eslint-disable-next-line camelcase
|
||||||
const order_id = pay_order_id.value
|
|
||||||
// eslint-disable-next-line camelcase
|
|
||||||
const return_url =
|
|
||||||
// eslint-disable-next-line camelcase
|
|
||||||
contentData.data.order_detail_templates.source +
|
|
||||||
// eslint-disable-next-line camelcase
|
|
||||||
`?order_id=${order_id}&activity_code=${info.activity_code}&isPayBack=true`
|
|
||||||
const params = {
|
const params = {
|
||||||
// eslint-disable-next-line camelcase
|
// eslint-disable-next-line camelcase
|
||||||
order_no,
|
order_no,
|
||||||
// eslint-disable-next-line camelcase
|
// eslint-disable-next-line camelcase
|
||||||
pay_center_channel_id,
|
pay_center_channel_id,
|
||||||
// eslint-disable-next-line camelcase
|
|
||||||
...(pay_type === 1 && { return_url }),
|
|
||||||
}
|
}
|
||||||
const res = await api.goPay(params)
|
const res = await api.goPay(params)
|
||||||
const { code, message, data } = res as any
|
const { code, message, data } = res as any
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
// Generated by vite-plugin-uni-pages
|
// Generated by vite-plugin-uni-pages
|
||||||
|
|
||||||
interface NavigateToOptions {
|
interface NavigateToOptions {
|
||||||
url: "/pages/index/index";
|
url: "/pages/jlgh/orderDetail";
|
||||||
}
|
}
|
||||||
interface RedirectToOptions extends NavigateToOptions {}
|
interface RedirectToOptions extends NavigateToOptions {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue