This commit is contained in:
xiaogang 2025-07-09 11:06:28 +08:00
parent 2b82ab702d
commit f15cabc538
6 changed files with 15 additions and 158 deletions

View File

@ -52,8 +52,10 @@ onLoad((options) => {
});
onMounted(() => {
const token = getQueryString("token") || uni.getStorageSync("token");
uni.setStorageSync("token", token);
const token = getQueryString("token");
const backUrl = getQueryString('backUrl')
token && uni.setStorageSync("token", token);
backUrl && uni.setStorageSync("backUrl", encodeURIComponent(backUrl));
getDetail();
});
@ -67,13 +69,9 @@ const getDetail = () => {
};
const toPay = async () => {
const tempBackUrl = getQueryString("backUrl");
const backUrl = tempBackUrl
? encodeURIComponent(tempBackUrl)
: uni.getStorageSync("backUrl");
const params = {
product_id: unref(id),
backUrl: backUrl,
backUrl: uni.getStorageSync("backUrl"),
};
goPay({ params })
.then((res) => {

View File

@ -23,136 +23,7 @@
import brand from "./components/brand";
import { getProductList, goPay, login } from "../../api/ycnc";
import { onMounted, ref, provide, unref } from "vue";
import { getQueryString, getQueryPa
rams } from "../../utils/utils";
import { getQueryString, getQueryParams } from "../../utils/utils";
import config from "./config";
const productList = ref([]);
@ -169,10 +40,9 @@ const goDetail = (productData) => {
const pay = (productData) => {
const { ProductId, voucherAmount, brandFlag } = productData;
const backUrl = encodeURIComponent(getQueryString("backUrl"));
const params = {
product_id: ProductId,
backUrl: backUrl,
backUrl: uni.getStorageSync('backUrl'),
};
goPay({ params })
.then((res) => {
@ -209,8 +79,8 @@ onMounted(async () => {
);
const token = getQueryString("token");
const backUrl = getQueryString("backUrl");
uni.setStorageSync("token", token);
uni.setStorageSync("backUrl", encodeURIComponent(backUrl));
token && uni.setStorageSync("token", token);
backUrl && uni.setStorageSync("backUrl", encodeURIComponent(backUrl));
});
function handleData(arg, args) {

View File

@ -71,14 +71,10 @@ const replace = ref(false);
//
const queryOrderList = () => {
const activeTab = unref(activeName);
const tempBackUrl = getQueryString("backUrl");
const backUrl = tempBackUrl
? encodeURIComponent(tempBackUrl)
: uni.getStorageSync("backUrl");
const params = {
page: unref(page),
pageSize: pageSize,
backUrl: backUrl,
backUrl: uni.getStorageSync("backUrl"),
...(activeTab !== 0 && { state: activeTab }),
};
getOrderList({ params })
@ -181,12 +177,6 @@ function refund(orderData) {
}
onMounted(() => {
const token = getQueryString("token") || uni.getStorageSync("token");
const _tempBackUrl = getQueryString("backUrl");
uni.setStorageSync("token", token);
if (_tempBackUrl) {
uni.setStorageSync("backUrl", encodeURIComponent(_tempBackUrl));
}
queryOrderList();
});

View File

@ -88,8 +88,6 @@ let timer = undefined;
// onshow h5
onShow(async () => {
const token = getQueryString("token") || uni.getStorageSync("token");
uni.setStorageSync("token", token);
const order_id = getQueryString("order_id");
const order_no = getQueryString("order_no");
const isPayBack = getQueryString("isPayBack");
@ -130,9 +128,11 @@ const timerEvent = () => {
const queryEvent = () => {
uni.hideLoading();
const backUrl = uni.getStorageSync('backUrl')
const params = {
order_id: unref(id),
order_no: unref(orderNo),
backUrl:backUrl,
};
queryOrderState({ params }).then((res) => {
const { state, voucher_link } = res;
@ -192,8 +192,7 @@ async function pay(orderData) {
}
const getDetail = () => {
const tempBackUrl = getQueryString('backUrl')
const backUrl = tempBackUrl ? encodeURIComponent(tempBackUrl) : uni.getStorageSync('backUrl')
const backUrl = uni.getStorageSync('backUrl')
const params = {
order_id: unref(id),
order_no: unref(orderNo),

View File

@ -98,7 +98,7 @@
>
<view class="small-text"
>5如有疑问请联系成都蓝色兄弟网络科技有限公司<text class="small-red"
>客服电话400-118-1216</text
>客服电话400-623-9566</text
>服务时间09:00-18:00
</view>
</view>

View File

@ -30,7 +30,7 @@ export default defineConfig(({ command, mode }) => {
zipPack({
inDir: `dist/build/${UNI_PLATFORM}`, // 输入的文件夹,就是要打包的文件夹
outDir: `dist/build`, // 打包好的 zip 文件放到哪个文件夹下
outFileName: `${UNI_PLATFORM}-${timeStringNow}.zip`, //文件名不能包含\/:*?"<>|
outFileName: `${UNI_PLATFORM}-${mode}-${timeStringNow}.zip`, //文件名不能包含\/:*?"<>|
pathPrefix: ''
}),
],