加入支付时间字段
This commit is contained in:
parent
72c7bcfcef
commit
29b06bcb91
43
index.html
43
index.html
|
@ -17,8 +17,45 @@
|
||||||
<div id="app"><!--app-html--></div>
|
<div id="app"><!--app-html--></div>
|
||||||
<script src="/static/ycnc/YT_Client_api.js"></script>
|
<script src="/static/ycnc/YT_Client_api.js"></script>
|
||||||
<script type="module" src="/src/main.js"></script>
|
<script type="module" src="/src/main.js"></script>
|
||||||
<!-- 调试工具 -->
|
<script>
|
||||||
<script src="https://fastly.jsdelivr.net/npm/eruda"></script>
|
var clickCount = 0
|
||||||
<script>eruda.init();</script>
|
var timer = null
|
||||||
|
var isShow = false
|
||||||
|
function insertScript() {
|
||||||
|
isShow = true
|
||||||
|
// 创建一个新的script元素
|
||||||
|
var src = 'https://fastly.jsdelivr.net/npm/eruda'
|
||||||
|
var script = document.createElement('script')
|
||||||
|
script.type = 'text/javascript'
|
||||||
|
script.src = src
|
||||||
|
// 插入到head中
|
||||||
|
document.head.appendChild(script)
|
||||||
|
script.onload = function () {
|
||||||
|
eruda.init()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener('click', function () {
|
||||||
|
if (isShow) return false
|
||||||
|
if (clickCount < 6) {
|
||||||
|
clickCount++
|
||||||
|
console.log(`Clicked ${clickCount} times`)
|
||||||
|
|
||||||
|
// 如果是第一次点击,则开始计时
|
||||||
|
if (clickCount === 1) {
|
||||||
|
timer = setTimeout(() => {
|
||||||
|
clickCount = 0 // 重置点击计数
|
||||||
|
}, 2000)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果点击次数达到6次,则清除计时器并重置状态
|
||||||
|
if (clickCount >= 6) {
|
||||||
|
clearTimeout(timer)
|
||||||
|
insertScript()
|
||||||
|
clickCount = 0 // 重置点击计数
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -70,14 +70,14 @@
|
||||||
onMounted(async ()=>{
|
onMounted(async ()=>{
|
||||||
queryProducts();
|
queryProducts();
|
||||||
// let testToken = import.meta.env.VITE_TEST_TOKEN
|
// let testToken = import.meta.env.VITE_TEST_TOKEN
|
||||||
// uni.setStorageSync('token',testToken)
|
// window.localStorage.setItem('token',testToken)
|
||||||
const token = uni.getStorageSync('token') || '';
|
const token = window.localStorage.getItem('token') || '';
|
||||||
if(!token){
|
if(!token){
|
||||||
console.log('进入登录过程');
|
console.log('进入登录过程');
|
||||||
const code = await useCode();
|
const code = await useCode();
|
||||||
authCode.value = code
|
authCode.value = code
|
||||||
const {token} = await login({params:{code:unref(authCode)}});
|
const {token} = await login({params:{code:unref(authCode)}});
|
||||||
uni.setStorageSync('token',token);
|
window.localStorage.setItem('token',token);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,8 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="order-info">
|
<view class="order-info">
|
||||||
<view class="info-item">订单编号:{{ orderDetail.order_no }}</view>
|
<view class="info-item">订单编号:{{ orderDetail.order_no }}</view>
|
||||||
<view class="info-item">支付时间:{{ orderDetail.create_time }}</view>
|
<!-- <view class="info-item" v-if="![1].includes(orderDetail.state)">支付时间:{{ orderDetail.exchange_time || '' }}</view> -->
|
||||||
|
<view class="info-item" v-if="!!orderDetail.exchange_time">支付时间:{{ orderDetail.exchange_time }}</view>
|
||||||
<view class="info-item">下单时间:{{ orderDetail.create_time }}</view>
|
<view class="info-item">下单时间:{{ orderDetail.create_time }}</view>
|
||||||
<view class="info-item" style="margin-bottom: 24rpx;">订单金额:{{ orderDetail.price }}</view>
|
<view class="info-item" style="margin-bottom: 24rpx;">订单金额:{{ orderDetail.price }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -55,7 +56,6 @@
|
||||||
const orderDetail = reactive({});
|
const orderDetail = reactive({});
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
console.log('href',window.location.href);
|
|
||||||
console.log('options',options);
|
console.log('options',options);
|
||||||
const {order_id,order_no} = options;
|
const {order_id,order_no} = options;
|
||||||
id.value = order_id
|
id.value = order_id
|
||||||
|
@ -67,6 +67,7 @@
|
||||||
url:`/pages/ycnc/index`
|
url:`/pages/ycnc/index`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const viewPwd = (detailData) => {
|
const viewPwd = (detailData) => {
|
||||||
const {voucher_link} = detailData
|
const {voucher_link} = detailData
|
||||||
if(voucher_link){
|
if(voucher_link){
|
||||||
|
|
Loading…
Reference in New Issue