This commit is contained in:
parent
2b82ab702d
commit
f15cabc538
|
@ -52,8 +52,10 @@ onLoad((options) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const token = getQueryString("token") || uni.getStorageSync("token");
|
const token = getQueryString("token");
|
||||||
uni.setStorageSync("token", token);
|
const backUrl = getQueryString('backUrl')
|
||||||
|
token && uni.setStorageSync("token", token);
|
||||||
|
backUrl && uni.setStorageSync("backUrl", encodeURIComponent(backUrl));
|
||||||
getDetail();
|
getDetail();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -67,13 +69,9 @@ const getDetail = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const toPay = async () => {
|
const toPay = async () => {
|
||||||
const tempBackUrl = getQueryString("backUrl");
|
|
||||||
const backUrl = tempBackUrl
|
|
||||||
? encodeURIComponent(tempBackUrl)
|
|
||||||
: uni.getStorageSync("backUrl");
|
|
||||||
const params = {
|
const params = {
|
||||||
product_id: unref(id),
|
product_id: unref(id),
|
||||||
backUrl: backUrl,
|
backUrl: uni.getStorageSync("backUrl"),
|
||||||
};
|
};
|
||||||
goPay({ params })
|
goPay({ params })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
|
@ -23,136 +23,7 @@
|
||||||
import brand from "./components/brand";
|
import brand from "./components/brand";
|
||||||
import { getProductList, goPay, login } from "../../api/ycnc";
|
import { getProductList, goPay, login } from "../../api/ycnc";
|
||||||
import { onMounted, ref, provide, unref } from "vue";
|
import { onMounted, ref, provide, unref } from "vue";
|
||||||
import { getQueryString, getQueryPa
|
import { getQueryString, getQueryParams } from "../../utils/utils";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
rams } from "../../utils/utils";
|
|
||||||
import config from "./config";
|
import config from "./config";
|
||||||
const productList = ref([]);
|
const productList = ref([]);
|
||||||
|
|
||||||
|
@ -169,10 +40,9 @@ const goDetail = (productData) => {
|
||||||
|
|
||||||
const pay = (productData) => {
|
const pay = (productData) => {
|
||||||
const { ProductId, voucherAmount, brandFlag } = productData;
|
const { ProductId, voucherAmount, brandFlag } = productData;
|
||||||
const backUrl = encodeURIComponent(getQueryString("backUrl"));
|
|
||||||
const params = {
|
const params = {
|
||||||
product_id: ProductId,
|
product_id: ProductId,
|
||||||
backUrl: backUrl,
|
backUrl: uni.getStorageSync('backUrl'),
|
||||||
};
|
};
|
||||||
goPay({ params })
|
goPay({ params })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
@ -209,8 +79,8 @@ onMounted(async () => {
|
||||||
);
|
);
|
||||||
const token = getQueryString("token");
|
const token = getQueryString("token");
|
||||||
const backUrl = getQueryString("backUrl");
|
const backUrl = getQueryString("backUrl");
|
||||||
uni.setStorageSync("token", token);
|
token && uni.setStorageSync("token", token);
|
||||||
uni.setStorageSync("backUrl", encodeURIComponent(backUrl));
|
backUrl && uni.setStorageSync("backUrl", encodeURIComponent(backUrl));
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleData(arg, args) {
|
function handleData(arg, args) {
|
||||||
|
|
|
@ -71,14 +71,10 @@ const replace = ref(false);
|
||||||
//获取订单列表
|
//获取订单列表
|
||||||
const queryOrderList = () => {
|
const queryOrderList = () => {
|
||||||
const activeTab = unref(activeName);
|
const activeTab = unref(activeName);
|
||||||
const tempBackUrl = getQueryString("backUrl");
|
|
||||||
const backUrl = tempBackUrl
|
|
||||||
? encodeURIComponent(tempBackUrl)
|
|
||||||
: uni.getStorageSync("backUrl");
|
|
||||||
const params = {
|
const params = {
|
||||||
page: unref(page),
|
page: unref(page),
|
||||||
pageSize: pageSize,
|
pageSize: pageSize,
|
||||||
backUrl: backUrl,
|
backUrl: uni.getStorageSync("backUrl"),
|
||||||
...(activeTab !== 0 && { state: activeTab }),
|
...(activeTab !== 0 && { state: activeTab }),
|
||||||
};
|
};
|
||||||
getOrderList({ params })
|
getOrderList({ params })
|
||||||
|
@ -181,12 +177,6 @@ function refund(orderData) {
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const token = getQueryString("token") || uni.getStorageSync("token");
|
|
||||||
const _tempBackUrl = getQueryString("backUrl");
|
|
||||||
uni.setStorageSync("token", token);
|
|
||||||
if (_tempBackUrl) {
|
|
||||||
uni.setStorageSync("backUrl", encodeURIComponent(_tempBackUrl));
|
|
||||||
}
|
|
||||||
queryOrderList();
|
queryOrderList();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -88,8 +88,6 @@ let timer = undefined;
|
||||||
|
|
||||||
// 用onshow 解决h5页面被缓存的问题
|
// 用onshow 解决h5页面被缓存的问题
|
||||||
onShow(async () => {
|
onShow(async () => {
|
||||||
const token = getQueryString("token") || uni.getStorageSync("token");
|
|
||||||
uni.setStorageSync("token", token);
|
|
||||||
const order_id = getQueryString("order_id");
|
const order_id = getQueryString("order_id");
|
||||||
const order_no = getQueryString("order_no");
|
const order_no = getQueryString("order_no");
|
||||||
const isPayBack = getQueryString("isPayBack");
|
const isPayBack = getQueryString("isPayBack");
|
||||||
|
@ -130,9 +128,11 @@ const timerEvent = () => {
|
||||||
|
|
||||||
const queryEvent = () => {
|
const queryEvent = () => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
const backUrl = uni.getStorageSync('backUrl')
|
||||||
const params = {
|
const params = {
|
||||||
order_id: unref(id),
|
order_id: unref(id),
|
||||||
order_no: unref(orderNo),
|
order_no: unref(orderNo),
|
||||||
|
backUrl:backUrl,
|
||||||
};
|
};
|
||||||
queryOrderState({ params }).then((res) => {
|
queryOrderState({ params }).then((res) => {
|
||||||
const { state, voucher_link } = res;
|
const { state, voucher_link } = res;
|
||||||
|
@ -192,8 +192,7 @@ async function pay(orderData) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const getDetail = () => {
|
const getDetail = () => {
|
||||||
const tempBackUrl = getQueryString('backUrl')
|
const backUrl = uni.getStorageSync('backUrl')
|
||||||
const backUrl = tempBackUrl ? encodeURIComponent(tempBackUrl) : uni.getStorageSync('backUrl')
|
|
||||||
const params = {
|
const params = {
|
||||||
order_id: unref(id),
|
order_id: unref(id),
|
||||||
order_no: unref(orderNo),
|
order_no: unref(orderNo),
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
>
|
>
|
||||||
<view class="small-text"
|
<view class="small-text"
|
||||||
>5、如有疑问请联系成都蓝色兄弟网络科技有限公司,<text class="small-red"
|
>5、如有疑问请联系成都蓝色兄弟网络科技有限公司,<text class="small-red"
|
||||||
>客服电话400-118-1216</text
|
>客服电话400-623-9566</text
|
||||||
>(服务时间09:00-18:00)。
|
>(服务时间09:00-18:00)。
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -30,7 +30,7 @@ export default defineConfig(({ command, mode }) => {
|
||||||
zipPack({
|
zipPack({
|
||||||
inDir: `dist/build/${UNI_PLATFORM}`, // 输入的文件夹,就是要打包的文件夹
|
inDir: `dist/build/${UNI_PLATFORM}`, // 输入的文件夹,就是要打包的文件夹
|
||||||
outDir: `dist/build`, // 打包好的 zip 文件放到哪个文件夹下
|
outDir: `dist/build`, // 打包好的 zip 文件放到哪个文件夹下
|
||||||
outFileName: `${UNI_PLATFORM}-${timeStringNow}.zip`, //文件名不能包含\/:*?"<>|
|
outFileName: `${UNI_PLATFORM}-${mode}-${timeStringNow}.zip`, //文件名不能包含\/:*?"<>|
|
||||||
pathPrefix: ''
|
pathPrefix: ''
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue