feat: 修改api地址
This commit is contained in:
@@ -248,7 +248,7 @@
|
||||
|
||||
const goRecord = () => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/home/liquidationRecord',
|
||||
url: `/pages/home/liquidationRecord?type=${liquidationType.value}`,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<s-pages title="变现记录" :pink_bg="true">
|
||||
<s-pages :title="pageTitle" :pink_bg="true">
|
||||
<card_mescroll ref="cardPages" @upCallback="getList" :height="height">
|
||||
<view class="bg24 radius12 m-x-42 p-y-28 p-x-40" v-if="detailList.length">
|
||||
<view
|
||||
@@ -41,6 +41,8 @@
|
||||
let detailList = ref([]);
|
||||
let height = ref('100%');
|
||||
const tokenLoading = ref(false);
|
||||
const recordType = ref(1);
|
||||
const pageTitle = ref('变现记录');
|
||||
let sysInfo = uni.getSystemInfoSync();
|
||||
height.value = sysInfo.windowHeight - sysInfo.statusBarHeight - uni.upx2px(88) + 'px';
|
||||
let cardPages = ref(null);
|
||||
@@ -124,6 +126,7 @@
|
||||
const res = await api.walletLiquidationRecordPage({
|
||||
pageNo: mescroll.num,
|
||||
pageSize: mescroll.size,
|
||||
type: recordType.value,
|
||||
});
|
||||
if (res.code === 0) {
|
||||
const data = res.data?.list || [];
|
||||
@@ -135,7 +138,14 @@
|
||||
}
|
||||
};
|
||||
|
||||
onLoad(() => {});
|
||||
onLoad((options) => {
|
||||
const nextType = Number(options?.type || 1);
|
||||
recordType.value = nextType === 2 ? 2 : 1;
|
||||
pageTitle.value = recordType.value === 2 ? '无双变现记录' : '变现记录';
|
||||
uni.setNavigationBarTitle({
|
||||
title: pageTitle.value,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
+5
-14
@@ -11,6 +11,7 @@
|
||||
<uni-icons type="more-filled" color="#fff" size="34rpx" />
|
||||
</view>
|
||||
<view v-if="showLiquidationMenu" class="more-menu">
|
||||
<view class="more-menu-item" @click.stop="goLiquidation">去变现</view>
|
||||
<view class="more-menu-item" @click.stop="goWushuangLiquidation">无双变现</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -23,7 +24,6 @@
|
||||
<view class="num m-l-34" @click="jumpPage('提现', '/pages/home/pay/withdraw')">
|
||||
{{ $fen2yuan(money_obj?.withdrawAmount || 0) }}
|
||||
</view>
|
||||
<view class="withdraw_btn" @click="jumpPage('变现', '/pages/home/liquidation')">去变现</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -92,6 +92,10 @@
|
||||
function toggleLiquidationMenu() {
|
||||
showLiquidationMenu.value = !showLiquidationMenu.value;
|
||||
}
|
||||
function goLiquidation() {
|
||||
showLiquidationMenu.value = false;
|
||||
jumpPage('变现', '/pages/home/liquidation?type=1&title=去变现');
|
||||
}
|
||||
function goWushuangLiquidation() {
|
||||
showLiquidationMenu.value = false;
|
||||
uni.navigateTo({
|
||||
@@ -182,19 +186,6 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.withdraw_btn {
|
||||
margin-left: auto;
|
||||
height: 44rpx;
|
||||
padding: 0 18rpx;
|
||||
line-height: 44rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
border: 2rpx solid rgba(255, 255, 255, 0.55);
|
||||
border-radius: 22rpx;
|
||||
background: rgba(255, 255, 255, 0.16);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -308,22 +308,24 @@
|
||||
const openThirdPartyService = (item) => {
|
||||
if (!item?.url) return;
|
||||
const title = encodeURIComponent(item.title || item.name || '第三方服务');
|
||||
const targetUrl = encodeURIComponent(item.url);
|
||||
if (typeof plus !== 'undefined' && plus?.runtime) {
|
||||
const rawUrl = String(item.url || '').trim();
|
||||
const targetUrl = encodeURIComponent(rawUrl);
|
||||
const openWebview = () => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/public/webview?title=${title}&url=${targetUrl}`,
|
||||
});
|
||||
};
|
||||
if (typeof plus !== 'undefined' && plus?.runtime) {
|
||||
openWebview();
|
||||
return;
|
||||
}
|
||||
if (typeof window !== 'undefined' && typeof window.open === 'function') {
|
||||
const opened = window.open(item.url, '_blank');
|
||||
const opened = window.open(rawUrl, '_blank');
|
||||
if (opened) return;
|
||||
window.location.href = item.url;
|
||||
window.location.href = rawUrl;
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/pages/public/webview?title=${title}&url=${targetUrl}`,
|
||||
});
|
||||
openWebview();
|
||||
};
|
||||
const updateAvatar = async (avatar) => {
|
||||
if (!avatar) return;
|
||||
|
||||
@@ -17,10 +17,19 @@
|
||||
|
||||
const url = ref();
|
||||
const title = ref();
|
||||
const safeDecode = (value) => {
|
||||
const text = String(value || '');
|
||||
if (!text) return '';
|
||||
try {
|
||||
return decodeURIComponent(text);
|
||||
} catch (e) {
|
||||
return text;
|
||||
}
|
||||
};
|
||||
|
||||
onLoad((e) => {
|
||||
url.value = e.url;
|
||||
title.value = e.title;
|
||||
url.value = safeDecode(e.url);
|
||||
title.value = safeDecode(e.title);
|
||||
console.log(e);
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user