源文件

This commit is contained in:
gyq
2024-05-23 14:39:33 +08:00
commit a1128dd791
2997 changed files with 500069 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
<template>
<uni-popup ref="popup" type="bottom" mask-background-color="rgba(0,0,0,.5)" @change='change' :safe-area="false" @maskClick="emits('cancel')">
<!-- 通用提示弹窗 用于提示用户 数据含义 -->
<view class="card-wrapper">
<view class="card-title flex-center">{{ title }}</view>
<slot />
<view class="card-button flex-center" hover-class="touch-hover" @tap="confirm"> {{ buttonText }}</view>
</view>
</uni-popup>
</template>
<script setup>
import { ref,inject } from 'vue'
const emits = defineEmits(['cancel'])
const props = defineProps({
title: { type: String }, //标题
buttonText: { type: String }, //按钮文字
})
const popup = ref(null)
const open = (val) => {
popup.value.open()
}
const confirm = () => {
emits('cancel')
popup.value.close()
}
let changePageMetaOverflowFunc = inject('changePageMetaOverflowFunc')
const change = (e)=>{
if(changePageMetaOverflowFunc){
changePageMetaOverflowFunc(!e.show)
}
if(e.show) return uni.hideTabBar()
uni.showTabBar()
}
defineExpose({ open })
</script>
<style lang="scss" scoped>
.card-wrapper {
border-radius: 32rpx 32rpx 0 0;
background-color: #fff;
max-height: 70vh;
.card-title {
margin-bottom: 20rpx;
height: 110rpx;
font-size: 30rpx;
font-weight: 400;
border-bottom: 1rpx solid rgba(0, 0, 0, 0.07);
}
.card-button {
margin-top: 20rpx;
height: 110rpx;
font-size: 32rpx;
color: #2980fd;
border-top: 20rpx solid #f7f7f7;
}
}
</style>

View File

@@ -0,0 +1,49 @@
export default [
{
title: '进件管理',
url: '/pageApply/applyList',
imgUrl: '/static/navImg/nav-jinjian.svg',
mTop: '20rpx',
},
{
title: '代理商管理',
url: '/pageWork/agentManagement/agentManagement',
imgUrl: '/static/navImg/nav-dailishang.svg',
},
{
title: '商户管理',
url: '/pageWork/merchantManagement/merchantManagement',
imgUrl: '/static/navImg/nav-shangdian.svg',
},
{
title: '门店管理',
url: '/pageWork/storeManagement/storeManagement',
imgUrl: '/static/navImg/nav-mendian.svg',
},
{
title: '拓展员管理',
url: '/pageWork/developerManagement/developerManagement',
imgUrl: '/static/navImg/nav-tuozhan.svg',
},
{
title: '设备管理',
url: '/pageWork/deviceManagement/deviceManagement',
imgUrl: '/static/navImg/nav-shebei.svg',
},
{
title: '交易记录',
url: '/pageWork/transactionRecord/transactionRecord',
imgUrl: '/static/navImg/nav-jiaoyi.svg',
},
{
title: '提现记录',
url: '/pageAccount/withdrawalDetails/withdrawalList',
imgUrl: '/static/navImg/nav-tixian.svg',
},
{
title: '应用管理',
url: '/pageWork/appManage/appList',
imgUrl: '/static/navImg/icon-app.svg',
isBorder: 'isBorder',
},
]

View File

@@ -0,0 +1,360 @@
<template>
<JHeaderTitle bgColor="#7737fe" color="#fff" pdB="70rpx" :back="false" />
<view class="page-wrapper">
<!-- 自定义导航栏 -->
<!-- 钱包卡片 -->
<view class="wallet-wrapper">
<view class="wallet-top">
<view class="wallet-money">钱包余额</view>
<view class="wallet-number">{{
isOpenEyes ? walletInfo.amount || "0.00" : desensitization(walletInfo.amount || "0.00")
}}</view>
<view class="wallet-eyes bdR10">
<image :src="imgEyes[isOpenEyes ? 1 : 0]" mode="scaleToFill" @tap="changeOpen" />
</view>
</view>
<view class="wallet-bottom">
<view>
<view class="wallet-money">提现中金额</view>
<view class="wallet-b-number">{{
isOpenEyes ? walletInfo.unAmount || "0.00" : desensitization(walletInfo.unAmount || "0.00")
}}</view>
</view>
<view>
<view class="wallet-money">在途利润</view>
<view class="wallet-b-number">{{
isOpenEyes
? walletInfo.auditProfitAmount || "0.00"
: desensitization(walletInfo.auditProfitAmount || "0.00")
}}</view>
</view>
<view>
<view class="wallet-money">冻结金额
<uni-icons type="help-filled" size="20" color="#c6c6c6" @tap="openTips()" />
</view>
<view class="wallet-b-number">{{
isOpenEyes
? walletInfo.freezeAmount || "0.00"
: desensitization(walletInfo.freezeAmount || "0.00")
}}</view>
</view>
</view>
</view>
<JButton pd="0 50rpx 50rpx 50rpx" bgColor="#fff" color="#7737fe" pdTop="0"
@HandleTouch="jumpPage('/pageAccount/takeMoney/takeMoney')">提现</JButton>
<JCardContent>
<!-- nav 导航部分 -->
<view class="nav-list">
<view class="nav-item bgF2 bdR16" v-for="(v, i) in list" :key="i" :class="[v.url === 'null' ? 'nav-station' : '']"
@tap="jumpPage(v.url)">
<image :src="v.imgUrl" mode="scaleToFill" v-if="v.imgUrl" />
<text class="nav-text">{{ v.title }}</text>
</view>
</view>
<!-- 广告展示部分 -->
<blcok v-for="v in vdata.adList" :key="v.adverId">
<JeepayBanner :list="v.appContent" :interval='v.changeTime' v-if="v.appPlaceType == 2" mg='40rpx 0' />
<JeepayAdCard :list='v.appContent' v-if="v.appPlaceType == 1" mg='40rpx 0' mgs="40rpx 0"/>
</blcok>
<!-- 公告列表 -->
<template v-if="noticeList.length > 0">
<view class="notice-title fs30 fw700">最新公告</view>
<view class="notice-wrapper bdR16" v-for="v in noticeList" :key="v.articleId"
@tap="jumpPage(`/pageWork/setUp/postDetail?id=${v.articleId}`)">
<view class="notice-content single-text-beyond fs30">{{ v.title }}</view>
<view class="notice-time">{{ v.createdAt }}</view>
</view>
<JContent @HandleTouch="jumpPage('/pageWork/setUp/latestPost')" height="160rpx">查看全部</JContent>
</template>
</JCardContent>
</view>
<JTipsPopupContent ref="tips" title="冻结金额释义" buttonText="我知道了">
<view class="tips-wrapper">
<view class="tips-title">描述<span class="tips-info">冻结金额为不可提现金额</span></view>
</view>
<view class="tips-wrapper">
<view class="tips-title">当前可提现金额为<span class="tips-info">{{ walletInfo.allowTakeAmount }}</span></view>
</view>
<view class="tips-wrapper" v-if="walletInfo.freezeAmount > 0 && walletInfo.freezeDesc">
<view class="tips-title">冻结原因</view>
<view class="tips-info">{{ walletInfo.freezeDesc }}请尽快处理</view>
</view>
</JTipsPopupContent>
<!-- #ifdef APP-PLUS -->
<view style="height: 120rpx;"></view>
<!-- #endif -->
</template>
<script setup>
import { ref, reactive, onBeforeUnmount } from "vue"
import { $statistics, $getNoticeList, $getMainUserInfo, $adList ,$getCompanyInfo, $getUserInfo} from "@/http/apiManager.js"
import { onShow, onPullDownRefresh, onLoad,onShareAppMessage,onShareTimeline } from "@dcloudio/uni-app"
import JHeaderTitle from "@/components//newComponents/JHeaderTitle/JHeaderTitle"
import JButton from "@/components//newComponents/JButton/JButton"
import JCardContent from "@/components//newComponents/JCardContent/JCardContent"
import JContent from "@/components//newComponents/JContent/JContent"
import storageManage from "@/util/storageManage.js"
import { horn } from "@/hooks/handleMoney"
import dayjs from "dayjs"
import list from "./navList/navList"
import JTipsPopupContent from './component/JTipsPopupContent.vue';
onLoad(() => {
$getMainUserInfo().then(({ bizData }) => {
toExamine(bizData.infoState)
})
})
onShow(() => {
userDate()
getNoticeList()
onPullDownRefresh(() => {
userDate()
})
})
const vdata = reactive({
})
// 控制眼睛开关
const imgEyes = reactive(["/static/iconImg/home-eye-close.svg", "/static/iconImg/icon-openEyes.svg"])
const isOpenEyes = ref(false)
const changeOpen = () => {
isOpenEyes.value = !isOpenEyes.value
}
// 钱包信息
const walletInfo = ref({
agentShareImgUrl:''
})
const userDate = () => {
$statistics().then((res) => {
const { bizData } = res
walletInfo.value.amount = horn(bizData.availableBalanceAmount) //钱包余额
walletInfo.value.auditProfitAmount = horn(bizData.auditProfitAmount) //在途金额
walletInfo.value.freezeAmount = horn(bizData.freezeAmount) //钱包冻结金额
walletInfo.value.unAmount = horn(bizData.unAmount) //提现中金额
walletInfo.value.allowTakeAmount = horn(bizData.allowTakeAmount) //最大可提现金额
walletInfo.value.freezeDesc = bizData.freezeDesc // 钱包金额冻结描述
})
uni.stopPullDownRefresh()
}
// 信息转换为*号
const desensitization = (val) => {
if (!val) return //如果为undefined 直接return 出去
return "******"
}
// 提示框
const tips = ref()
// 打开提示弹窗
const openTips = () => {
tips.value.open()
}
// 公告列表
const noticeList = ref([])
const getNoticeList = () => {
$getNoticeList({ pageSize: 3, pageNumber: 1, articleType: 1 }).then((res) => {
const { bizData } = res
noticeList.value = bizData.records.slice(0, 3)
noticeList.value.forEach((v) => {
v.createdAt = formatTime(dayjs(v.createdAt).format("YYYY-MM-DD HH:mm"))
})
uni.stopPullDownRefresh()
})
}
// 把 - 替换成 /
const formatTime = (val) => {
const time = val.split(" ")
time[0] = time[0].split("-").join("/")
return time.join(" ")
}
// 跳转路由
const jumpPage = (url) => {
if (url === "null") return
// 发起提现时判断是否有可提现金额
if(url == '/pageAccount/takeMoney/takeMoney'){
if(walletInfo.value.allowTakeAmount <= 0) {
uni.showToast({
title: "无可提现金额",
icon: "error",
})
return
}
}
uni.navigateTo({
url,
})
}
const toExamine = (val) => {
let url = null
switch (val) {
case 2:
url = "/pageWork/information/information"
break
case 3:
url = "/pageWork/information/information"
break
case 4:
url = "/pageWork/information/information"
break
}
if (!url) return false
uni.reLaunch({ url })
}
$getCompanyInfo().then(({ bizData }) => {
vdata.agentShareImgUrl = bizData.agentShareImgUrl
})
// 微信分享
onShareAppMessage((res) => {
if(res.from == 'menu') return {
title: uni.$appName,
path: '/pages/workbench/workbench',
imageUrl: vdata.agentShareImgUrl
}
})
// 分享到朋友圈
onShareTimeline(() => {
return {
title: uni.$appName,
imageUrl: vdata.agentShareImgUrl
}
})
// 请求首页广告
$adList({ appPlace: 2 }).then(({ bizData }) => {
bizData.forEach(v => {
v.appContent = JSON.parse(v.appContent)
})
vdata.adList = bizData
console.log(bizData)
})
$getUserInfo().then(({ bizData }) => {
storageManage.userInfo(bizData)
})
onBeforeUnmount(() => {
uni.removeInterceptor("switchTab")
})
</script>
<style lang="scss" scoped>
.page-wrapper {
background-color: $primaryColor;
.wallet-wrapper {
padding: 20rpx 50rpx 50rpx 50rpx;
color: #fff;
}
.wallet-money {
font-size: 25rpx;
color: rgba($color: #fff, $alpha: 0.7);
}
.wallet-top {
position: relative;
.wallet-number {
margin: 10rpx 0;
font-size: 63rpx;
}
.wallet-eyes {
display: flex;
position: absolute;
top: 0;
right: 0;
padding: 14rpx;
background-color: rgba($color: #000000, $alpha: 0.2);
image {
width: 40rpx;
height: 40rpx;
}
}
}
.wallet-bottom {
display: flex;
justify-content: space-between;
margin-top: 60rpx;
padding-right: 20rpx;
.wallet-b-number {
margin-top: 10rpx;
}
}
}
// 导航栏 和 公告时间部分 共用一个样式
.nav-text,
.notice-time {
margin-top: 21rpx;
font-size: 28rpx;
}
// 导航
.nav-list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 30rpx;
.nav-item {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
width: 200rpx;
height: 200rpx;
margin-top: 25rpx;
image {
width: 60rpx;
height: 60rpx;
}
}
.nav-station {
background-color: #fff;
}
}
.notice-wrapper {
margin-top: 20rpx;
padding: 30rpx;
background-color: #f7f7f7;
.notice-content {
white-space: nowrap;
}
.notice-time {
color: #8c8c8c;
}
}
.tips-wrapper {
display: flex;
flex-direction: column;
justify-content: center;
padding: 0 50rpx;
.tips-title {
margin-bottom: 30rpx;
font-size: 30rpx;
}
.tips-info {
font-size: 26rpx;
color: #808080;
}
}
</style>

View File

@@ -0,0 +1,190 @@
<template>
<JHeaderTitle bgColor="#7737fe" color="#fff" pdB="70rpx" :back="false" />
<view class="page-wrapper" @click="toLogin">
<!-- 自定义导航栏 -->
<!-- 钱包卡片 -->
<view class="wallet-wrapper">
<view class="wallet-top">
<view class="wallet-money">钱包余额</view>
<view class="wallet-number">******</view>
<view class="wallet-eyes bdR10">
<image src="/static/iconImg/home-eye-close.svg" mode="scaleToFill"/>
</view>
</view>
<view class="wallet-bottom">
<view>
<view class="wallet-money">提现中金额</view>
<view class="wallet-b-number">0.00</view>
</view>
<view>
<view class="wallet-money">在途利润</view>
<view class="wallet-b-number">0.00</view>
</view>
<view>
<view class="wallet-money">冻结金额
<uni-icons type="help-filled" size="20" color="#c6c6c6"/>
</view>
<view>0.00
</view>
</view>
</view>
</view>
<view style="padding: 30rpx;">
<button style="padding:10rpx 50rpx 10rpx 50rpx; background: #fff; color:#7737fe ;">提现</button>
</view>
<!-- <Button pd="0 50rpx 50rpx 50rpx" bgColor="#fff" color="#7737fe" pdTop="0">提现</JButton> -->
<JCardContent>
<!-- nav 导航部分 -->
<view class="nav-list">
<view class="nav-item bgF2 bdR16" v-for="(v, i) in list" :key="i" :class="[v.url === 'null' ? 'nav-station' : '']">
<image :src="v.imgUrl" mode="scaleToFill" v-if="v.imgUrl" />
<text class="nav-text">{{ v.title }}</text>
</view>
</view>
<!-- 广告展示部分 -->
<blcok v-for="v in vdata.adList" :key="v.adverId">
<JeepayBanner :list="v.appContent" :interval='v.changeTime' v-if="v.appPlaceType == 2" mg='40rpx 0' />
<JeepayAdCard :list='v.appContent' v-if="v.appPlaceType == 1" mg='40rpx 0' mgs="40rpx 0"/>
</blcok>
</JCardContent>
</view>
<!-- #ifdef APP-PLUS -->
<view style="height: 120rpx;"></view>
<!-- #endif -->
</template>
<script setup>
import { ref, reactive, onBeforeUnmount } from "vue"
import list from "./navList/navList"
const noticeList = ref([])
const vdata = reactive({
adList:[]
})
const toLogin=()=>{
uni.reLaunch({
url:'/pages/login/login'
})
}
</script>
<style lang="scss" scoped>
.page-wrapper {
background-color: $primaryColor;
padding-top: 100rpx;
.wallet-wrapper {
padding: 20rpx 50rpx 50rpx 50rpx;
color: #fff;
}
.wallet-money {
font-size: 25rpx;
color: rgba($color: #fff, $alpha: 0.7);
}
.wallet-top {
position: relative;
.wallet-number {
margin: 10rpx 0;
font-size: 63rpx;
}
.wallet-eyes {
display: flex;
position: absolute;
top: 0;
right: 0;
padding: 14rpx;
background-color: rgba($color: #000000, $alpha: 0.2);
image {
width: 40rpx;
height: 40rpx;
}
}
}
.wallet-bottom {
display: flex;
justify-content: space-between;
margin-top: 60rpx;
padding-right: 20rpx;
.wallet-b-number {
margin-top: 10rpx;
}
}
}
// 导航栏 和 公告时间部分 共用一个样式
.nav-text,
.notice-time {
margin-top: 21rpx;
font-size: 28rpx;
}
// 导航
.nav-list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 30rpx;
background: #fff;
border-radius: 30rpx 30rpx 0 0 ;
padding: 30rpx 45rpx;
.nav-item {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
width: 200rpx;
height: 200rpx;
margin-top: 25rpx;
image {
width: 60rpx;
height: 60rpx;
}
}
.nav-station {
background-color: #fff;
}
}
.notice-wrapper {
margin-top: 20rpx;
padding: 30rpx;
background-color: #f7f7f7;
.notice-content {
white-space: nowrap;
}
.notice-time {
color: #8c8c8c;
}
}
.tips-wrapper {
display: flex;
flex-direction: column;
justify-content: center;
padding: 0 50rpx;
.tips-title {
margin-bottom: 30rpx;
font-size: 30rpx;
}
.tips-info {
font-size: 26rpx;
color: #808080;
}
}
</style>