f
Some checks failed
Check / lint (18.x, macos-latest) (push) Has been cancelled
Check / lint (18.x, ubuntu-latest) (push) Has been cancelled
Check / lint (18.x, windows-latest) (push) Has been cancelled
Check / lint (20.x, macos-latest) (push) Has been cancelled
Check / lint (20.x, ubuntu-latest) (push) Has been cancelled
Check / lint (20.x, windows-latest) (push) Has been cancelled
Check / lint (22.x, macos-latest) (push) Has been cancelled
Check / lint (22.x, ubuntu-latest) (push) Has been cancelled
Check / lint (22.x, windows-latest) (push) Has been cancelled
Check / typecheck (18.x, macos-latest) (push) Has been cancelled
Check / typecheck (18.x, ubuntu-latest) (push) Has been cancelled
Check / typecheck (18.x, windows-latest) (push) Has been cancelled
Check / typecheck (20.x, macos-latest) (push) Has been cancelled
Check / typecheck (20.x, ubuntu-latest) (push) Has been cancelled
Check / typecheck (20.x, windows-latest) (push) Has been cancelled
Check / typecheck (22.x, macos-latest) (push) Has been cancelled
Check / typecheck (22.x, ubuntu-latest) (push) Has been cancelled
Check / typecheck (22.x, windows-latest) (push) Has been cancelled
Check / build (build, 18.x, macos-latest) (push) Has been cancelled
Check / build (build, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build, 18.x, windows-latest) (push) Has been cancelled
Check / build (build, 20.x, macos-latest) (push) Has been cancelled
Check / build (build, 20.x, ubuntu-latest) (push) Has been cancelled
Check / build (build, 20.x, windows-latest) (push) Has been cancelled
Check / build (build, 22.x, macos-latest) (push) Has been cancelled
Check / build (build, 22.x, ubuntu-latest) (push) Has been cancelled
Check / build (build, 22.x, windows-latest) (push) Has been cancelled
Check / build (build:app, 18.x, macos-latest) (push) Has been cancelled
Check / build (build:app, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:app, 18.x, windows-latest) (push) Has been cancelled
Check / build (build:app, 20.x, macos-latest) (push) Has been cancelled
Check / build (build:app, 20.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:app, 20.x, windows-latest) (push) Has been cancelled
Check / build (build:app, 22.x, macos-latest) (push) Has been cancelled
Check / build (build:app, 22.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:app, 22.x, windows-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 18.x, macos-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 20.x, macos-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 20.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 20.x, windows-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 22.x, macos-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 22.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 22.x, windows-latest) (push) Has been cancelled
Some checks failed
Check / lint (18.x, macos-latest) (push) Has been cancelled
Check / lint (18.x, ubuntu-latest) (push) Has been cancelled
Check / lint (18.x, windows-latest) (push) Has been cancelled
Check / lint (20.x, macos-latest) (push) Has been cancelled
Check / lint (20.x, ubuntu-latest) (push) Has been cancelled
Check / lint (20.x, windows-latest) (push) Has been cancelled
Check / lint (22.x, macos-latest) (push) Has been cancelled
Check / lint (22.x, ubuntu-latest) (push) Has been cancelled
Check / lint (22.x, windows-latest) (push) Has been cancelled
Check / typecheck (18.x, macos-latest) (push) Has been cancelled
Check / typecheck (18.x, ubuntu-latest) (push) Has been cancelled
Check / typecheck (18.x, windows-latest) (push) Has been cancelled
Check / typecheck (20.x, macos-latest) (push) Has been cancelled
Check / typecheck (20.x, ubuntu-latest) (push) Has been cancelled
Check / typecheck (20.x, windows-latest) (push) Has been cancelled
Check / typecheck (22.x, macos-latest) (push) Has been cancelled
Check / typecheck (22.x, ubuntu-latest) (push) Has been cancelled
Check / typecheck (22.x, windows-latest) (push) Has been cancelled
Check / build (build, 18.x, macos-latest) (push) Has been cancelled
Check / build (build, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build, 18.x, windows-latest) (push) Has been cancelled
Check / build (build, 20.x, macos-latest) (push) Has been cancelled
Check / build (build, 20.x, ubuntu-latest) (push) Has been cancelled
Check / build (build, 20.x, windows-latest) (push) Has been cancelled
Check / build (build, 22.x, macos-latest) (push) Has been cancelled
Check / build (build, 22.x, ubuntu-latest) (push) Has been cancelled
Check / build (build, 22.x, windows-latest) (push) Has been cancelled
Check / build (build:app, 18.x, macos-latest) (push) Has been cancelled
Check / build (build:app, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:app, 18.x, windows-latest) (push) Has been cancelled
Check / build (build:app, 20.x, macos-latest) (push) Has been cancelled
Check / build (build:app, 20.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:app, 20.x, windows-latest) (push) Has been cancelled
Check / build (build:app, 22.x, macos-latest) (push) Has been cancelled
Check / build (build:app, 22.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:app, 22.x, windows-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 18.x, macos-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 20.x, macos-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 20.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 20.x, windows-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 22.x, macos-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 22.x, ubuntu-latest) (push) Has been cancelled
Check / build (build:mp-weixin, 22.x, windows-latest) (push) Has been cancelled
This commit is contained in:
@@ -3,6 +3,9 @@ import { ref, computed } from 'vue'
|
||||
import { getAgentRevenue } from '@/api/apis'
|
||||
import GzhQrcode from '@/components/GzhQrcode.vue'
|
||||
|
||||
// 分享给好友、分享到朋友圈
|
||||
useShare({ title: '天远数据 - 资产与收益' })
|
||||
|
||||
// 日期选项映射
|
||||
const dateRangeMap = {
|
||||
today: 'today',
|
||||
|
||||
@@ -384,6 +384,7 @@
|
||||
import { ref, onMounted, reactive, computed } from 'vue'
|
||||
import { useToast } from 'wot-design-uni'
|
||||
import { activateAgentMembership } from '@/apis/agent'
|
||||
import { formatExpiryTime } from '@/utils/format'
|
||||
|
||||
// 使用 wot-design-ui 的 toast
|
||||
const toast = useToast()
|
||||
@@ -744,25 +745,9 @@ async function applyVip() {
|
||||
type: selectedType.value.toUpperCase(),
|
||||
})
|
||||
|
||||
if (res.code === 200) {
|
||||
if (res.data.id) {
|
||||
payID.value = res.data.id
|
||||
showPayment.value = true
|
||||
uni.requestPayment({
|
||||
"provider": "wxpay",
|
||||
"orderInfo": {
|
||||
"appid": "wx499********7c70e", // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
|
||||
"noncestr": "c5sEwbaNPiXAF3iv", // 随机字符串
|
||||
"package": "Sign=WXPay", // 固定值
|
||||
"partnerid": "148*****52", // 微信支付商户号
|
||||
"prepayid": "wx202254********************fbe90000", // 统一下单订单号
|
||||
"timestamp": 1597935292, // 时间戳(单位:秒)
|
||||
"sign": "A842B45937F6EFF60DEC7A2EAA52D5A0" // 签名,这里用的 MD5/RSA 签名
|
||||
},
|
||||
success(res) { },
|
||||
fail(e) { }
|
||||
})
|
||||
}
|
||||
if (res.code === 200 && res.data?.id) {
|
||||
payID.value = String(res.data.id)
|
||||
showPayment.value = true
|
||||
} else {
|
||||
toast.error(res.msg || '申请失败')
|
||||
}
|
||||
@@ -771,12 +756,6 @@ async function applyVip() {
|
||||
toast.error('网络请求失败,请稍后重试')
|
||||
}
|
||||
}
|
||||
|
||||
function formatExpiryTime(expiryTimeStr) {
|
||||
if (!expiryTimeStr) return '未知'
|
||||
// 从格式化字符串中提取日期部分
|
||||
return expiryTimeStr.split(' ')[0] // 假设格式是 "YYYY-MM-DD HH:MM:SS"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -5,8 +5,17 @@ import { ref, onBeforeMount } from 'vue'
|
||||
import iconCard1 from '/static/image/icon_2.png'
|
||||
import iconCard2 from '/static/image/icon_1.png'
|
||||
|
||||
// 分享给好友、分享到朋友圈
|
||||
useShare({ title: '天远数据 - 大数据报告查询,即刻赚佣金' })
|
||||
|
||||
// 从缓存中获取代理状态
|
||||
const isAgent = ref(false)
|
||||
|
||||
// 公众号二维码弹窗
|
||||
const showQrcodePopup = ref(false)
|
||||
function toggleQrcodePopup() {
|
||||
showQrcodePopup.value = !showQrcodePopup.value
|
||||
}
|
||||
onBeforeMount(() => {
|
||||
// 从缓存获取代理信息
|
||||
const agentInfo = uni.getStorageSync('agentInfo')
|
||||
@@ -69,6 +78,15 @@ function getPhoneNumber(e) {
|
||||
</view>
|
||||
<image class="w-20 h-20 mr-4 ml-4 my-4" :src="iconCard2" mode="aspectFit" />
|
||||
</view>
|
||||
<!-- 公众号卡片 -->
|
||||
<view class="rounded-2xl overflow-hidden shadow-xl mt-4 mb-4 relative h-[120px]" @click="toggleQrcodePopup">
|
||||
<image
|
||||
class="absolute inset-0 w-full h-full"
|
||||
src="/static/image/footbanner.jpg"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view class="absolute inset-0 bg-black/10" />
|
||||
</view>
|
||||
<!-- 帮助中心模块 -->
|
||||
<!-- <view class="mt-6">
|
||||
<view class="flex items-center justify-between mb-2">
|
||||
@@ -90,6 +108,33 @@ function getPhoneNumber(e) {
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<!-- 二维码弹窗 -->
|
||||
<view
|
||||
v-if="showQrcodePopup"
|
||||
class="fixed inset-0 z-50 flex items-center justify-center bg-black/60"
|
||||
@click="toggleQrcodePopup"
|
||||
>
|
||||
<view
|
||||
class="bg-white rounded-2xl p-6 mx-8 flex flex-col items-center"
|
||||
@click.stop
|
||||
>
|
||||
<image
|
||||
class="w-48 h-48 mb-4"
|
||||
src="/static/qrcode/tydatagzh.jpg"
|
||||
mode="aspectFit"
|
||||
show-menu-by-longpress
|
||||
/>
|
||||
<view class="text-gray-600 text-sm text-center mb-2">长按识别保存或者扫码</view>
|
||||
<view class="text-gray-400 text-xs">关注「天远数据」公众号</view>
|
||||
<view
|
||||
class="mt-4 text-blue-500 text-sm"
|
||||
@click="toggleQrcodePopup"
|
||||
>
|
||||
关闭
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ onUnmounted(() => {
|
||||
<view class="login px-8">
|
||||
<view class="mb-8 pt-8 text-left">
|
||||
<view class="flex flex-col items-center">
|
||||
<image class="h-18 w-18 rounded-full shadow" src="/static/image/logo.jpg" mode="scaleToFill" />
|
||||
<image class="h-18 w-18 rounded-full shadow" src="/static/image/logo.png" mode="scaleToFill" />
|
||||
<view class="mt-4 text-3xl font-bold text-gray-800">天远数据</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -33,16 +33,32 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<VipBanner v-if="isAgent && level === 'normal'" />
|
||||
<VipBanner v-if="isLoggedIn && !isVipOrSvip" />
|
||||
<!-- 功能菜单 -->
|
||||
<view class="features-section space-y-3">
|
||||
<template v-if="isAgent && ['VIP', 'SVIP'].includes(level)">
|
||||
<!-- 代理报告配置 + 续费:VIP/SVIP 代理 -->
|
||||
<template v-if="isLoggedIn && isAgent && isVipOrSvip">
|
||||
<button
|
||||
class=" flex items-center p-3 rounded-xl bg-gradient-to-r from-purple-200/80 to-pink-200/80 text-purple-700 font-medium shadow-sm transition-all active:shadow-md"
|
||||
hover-class="opacity-80 scale-98" @click="toVipConfig">
|
||||
<text class="mr-2">⚙️</text> 代理报告配置
|
||||
</button>
|
||||
<button
|
||||
class="flex flex-col items-start p-3 rounded-xl bg-gradient-to-r from-amber-200/80 to-orange-200/80 text-amber-700 font-medium shadow-sm transition-all active:shadow-md"
|
||||
hover-class="opacity-80 scale-98" @click="toVipRenewal">
|
||||
<view class="flex items-center">
|
||||
<text class="mr-2">🔄</text> 续费代理会员
|
||||
</view>
|
||||
<view v-if="ExpiryTime" class="text-xs text-gray-500 mt-1 ml-6">有效期至 {{ formatExpiryTime(ExpiryTime) }}</view>
|
||||
</button>
|
||||
</template>
|
||||
<!-- 升级/开通代理会员:登录后显示,非代理→申请,普通代理→升级 -->
|
||||
<button
|
||||
v-if="isLoggedIn && !isVipOrSvip"
|
||||
class="flex items-center p-3 rounded-xl bg-gradient-to-r from-amber-200/80 to-orange-200/80 text-amber-700 font-medium shadow-sm transition-all active:shadow-md"
|
||||
hover-class="opacity-80 scale-98" @click="toAgentUpgrade">
|
||||
<text class="mr-2">⬆️</text> {{ isAgent ? '升级代理会员' : '开通代理会员' }}
|
||||
</button>
|
||||
<button
|
||||
class=" flex items-center text-gray-600 p-3 rounded-xl bg-white font-medium shadow-sm transition-all active:shadow-md"
|
||||
hover-class="opacity-80 bg-blue-50" @click="toUserAgreement">
|
||||
@@ -76,6 +92,10 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, onBeforeMount } from 'vue'
|
||||
import { maskName, formatExpiryTime } from '@/utils/format'
|
||||
|
||||
// 分享给好友、分享到朋友圈
|
||||
useShare({ title: '天远数据 - 大数据报告查询' })
|
||||
|
||||
// 用户数据
|
||||
const userName = ref('')
|
||||
@@ -86,6 +106,7 @@ const userType = ref(null)
|
||||
// 代理数据
|
||||
const isAgent = ref(false)
|
||||
const level = ref('normal')
|
||||
const ExpiryTime = ref('')
|
||||
|
||||
|
||||
const showUpdateProgress = ref(false)
|
||||
@@ -110,6 +131,7 @@ onBeforeMount(() => {
|
||||
if (agentInfo?.isAgent) {
|
||||
isAgent.value = agentInfo.isAgent
|
||||
level.value = agentInfo.level || 'normal'
|
||||
ExpiryTime.value = agentInfo.expiryTime || ''
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -129,6 +151,11 @@ const levelText = {
|
||||
SVIP: '尊享代理特权',
|
||||
}
|
||||
|
||||
const isVipOrSvip = computed(() => {
|
||||
const l = (level.value || '').toString()
|
||||
return ['VIP', 'SVIP'].includes(l)
|
||||
})
|
||||
|
||||
const levelGradient = computed(() => ({
|
||||
border: {
|
||||
normal: 'bg-green-300',
|
||||
@@ -152,11 +179,6 @@ const levelGradient = computed(() => ({
|
||||
}[level.value],
|
||||
}))
|
||||
|
||||
function maskName(name) {
|
||||
if (!name || name.length < 11) return name
|
||||
return name.substring(0, 3) + "****" + name.substring(7)
|
||||
}
|
||||
|
||||
function toHistory() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/queryHistory'
|
||||
@@ -194,6 +216,18 @@ function toVipConfig() {
|
||||
})
|
||||
}
|
||||
|
||||
function toVipRenewal() {
|
||||
uni.navigateTo({ url: '/pages/agentVipApply' })
|
||||
}
|
||||
|
||||
function toAgentUpgrade() {
|
||||
if (isAgent.value) {
|
||||
uni.navigateTo({ url: '/pages/agentVipApply' })
|
||||
} else {
|
||||
uni.navigateTo({ url: '/pages/invitationAgentApply' })
|
||||
}
|
||||
}
|
||||
|
||||
function toBindPhone() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login'
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
<view class="min-h-screen bg-gray-50">
|
||||
<!-- 收益列表 -->
|
||||
<uni-list :loading="loading" :loadmore="loadMoreStatus" @loadmore="onLoadMore">
|
||||
<!-- 空状态提示 -->
|
||||
<view v-if="!loading && list.length === 0" class="flex flex-col items-center justify-center py-16">
|
||||
<image src="/static/image/empty.svg" mode="aspectFit" class="w-48 h-48 mb-4" />
|
||||
<text class="text-gray-400 text-base">暂无直推报告</text>
|
||||
</view>
|
||||
<EmptyState v-if="!loading && list.length === 0" text="暂无直推报告" />
|
||||
|
||||
<view v-for="(item, index) in list" :key="index" class="mx-4 my-2 bg-white rounded-lg p-4 shadow-sm">
|
||||
<view class="flex justify-between items-center mb-2">
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
<view class="min-h-screen bg-gray-50">
|
||||
<!-- 收益列表 -->
|
||||
<uni-list :loading="loading" :loadmore="loadMoreStatus" @loadmore="onLoadMore">
|
||||
<!-- 空状态提示 -->
|
||||
<view v-if="!loading && list.length === 0" class="flex flex-col items-center justify-center py-16">
|
||||
<image src="/static/image/empty.svg" mode="aspectFit" class="w-48 h-48 mb-4" />
|
||||
<text class="text-gray-400 text-base">暂无收益记录</text>
|
||||
</view>
|
||||
<EmptyState v-if="!loading && list.length === 0" text="暂无收益记录" />
|
||||
|
||||
<view v-for="(item, index) in list" :key="index" class="mx-4 my-2 bg-white rounded-lg p-4 shadow-sm">
|
||||
<view class="flex justify-between items-center mb-2">
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
<view class="min-h-screen bg-gray-50">
|
||||
<!-- 提现记录列表 -->
|
||||
<uni-list :loading="loading" :loadmore="loadMoreStatus" @loadmore="onLoadMore">
|
||||
<!-- 空状态提示 -->
|
||||
<view v-if="!loading && list.length === 0" class="flex flex-col items-center justify-center py-16">
|
||||
<image src="/static/image/empty.svg" mode="aspectFit" class="w-48 h-48 mb-4" />
|
||||
<text class="text-gray-400 text-base">暂无提现记录</text>
|
||||
</view>
|
||||
<EmptyState v-if="!loading && list.length === 0" text="暂无提现记录" />
|
||||
|
||||
<view v-for="(item, index) in list" :key="index" class="mx-4 my-2 bg-white rounded-lg p-4 shadow-sm">
|
||||
<view class="flex justify-between items-center mb-2">
|
||||
@@ -35,6 +31,7 @@
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { getWithdrawalRecords } from '@/apis/agent'
|
||||
import { maskName } from '@/utils/format'
|
||||
|
||||
// 状态映射配置
|
||||
const statusConfig = {
|
||||
@@ -74,13 +71,6 @@ const list = ref([])
|
||||
const loading = ref(false)
|
||||
const loadMoreStatus = ref('more') // 'more'|'loading'|'noMore'
|
||||
|
||||
// 账户脱敏处理
|
||||
const maskName = (name) => {
|
||||
if (!name || typeof name !== 'string') return ''
|
||||
if (name.length <= 7) return name
|
||||
return name.substring(0, 3) + '****' + name.substring(7)
|
||||
}
|
||||
|
||||
// 状态转中文
|
||||
const statusToChinese = (status) => {
|
||||
return statusConfig[status]?.chinese || '未知状态'
|
||||
|
||||
Reference in New Issue
Block a user