This commit is contained in:
2025-05-21 15:45:10 +08:00
parent f6ed5b04de
commit 5d96054c0c
44 changed files with 2460 additions and 2126 deletions

2
.env
View File

@@ -1,3 +1,5 @@
VITE_API_URL=http://admin.ceshi.guo123.cn/api
VITE_TINYMCE_KEY=agmu6i1c6k7bcp36oenzyz7yi1yplptq7goyx88y1g6ofnqu
VITE_AES_KEY=st123456654321st
VITE_APP_ID=wxa4dd2d036c8156a4
VITE_APP_VERSION=trial

View File

@@ -4,7 +4,7 @@
"type": "module",
"scripts": {
"dev:custom": "uni -p",
"dev:h5": "uni",
"dev:h5": "uni --mode=production",
"commit": "git add . && git commit -m 'update' && git push",
"dev:h5:ssr": "uni --ssr",
"dev:mp-alipay": "uni -p mp-alipay",
@@ -55,35 +55,35 @@
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-4050420250306001",
"@dcloudio/uni-mp-xhs": "3.0.0-alpha-4050420250306001",
"@dcloudio/uni-quickapp-webview": "3.0.0-alpha-4050420250306001",
"@tailwindcss/vite": "^4.0.15",
"@tailwindcss/vite": "^4.1.7",
"@uni-helper/vite-plugin-uni-tailwind": "^0.15.2",
"axios": "^1.9.0",
"axios": "0.27.0",
"crypto-js": "^4.2.0",
"dayjs": "^1.11.13",
"deep-pick-omit": "^1.2.1",
"destr": "^2.0.3",
"pinia": "^2.2.4",
"pinia-plugin-persistedstate": "^4.1.1",
"destr": "^2.0.5",
"pinia": "^2.3.1",
"pinia-plugin-persistedstate": "^4.3.0",
"postcss": "^8.5.3",
"sass-embedded": "^1.86.0",
"tailwindcss": "^4.0.15",
"sass-embedded": "^1.89.0",
"tailwindcss": "^4.1.7",
"tailwindcss-rem2px-preset": "^1.0.3",
"thorui-uni": "^3.0.0",
"uniapp-axios-adapter": "^0.3.2",
"uqrcodejs": "^4.0.7",
"uuid": "^11.1.0",
"vue": "^3.5.13",
"vue-i18n": "^9.1.9"
"vue": "^3.5.14",
"vue-i18n": "^9.14.4"
},
"devDependencies": {
"@dcloudio/types": "^3.4.8",
"@dcloudio/types": "^3.4.15",
"@dcloudio/uni-automator": "3.0.0-alpha-4050420250306001",
"@dcloudio/uni-cli-shared": "3.0.0-alpha-4050420250306001",
"@dcloudio/uni-stacktracey": "3.0.0-alpha-4050420250306001",
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-4050420250306001",
"@tailwindcss/postcss": "^4.1.5",
"@tailwindcss/postcss": "^4.1.7",
"@types/crypto-js": "^4.2.2",
"@vue/runtime-core": "^3.4.21",
"@vue/runtime-core": "^3.5.14",
"vite": "6.3.5",
"weapp-tailwindcss": "^4.1.7"
}

3387
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -257,6 +257,76 @@ const system = {
data: data
});
},
addWithdrawal: async (data) => {
return request({
method: MethodsENUM.POST,
url: "/user/addWithdrawal",
data: data
});
},
getWithdrawal: async (data) => {
return request({
method: MethodsENUM.POST,
url: "/user/getWithdrawal",
data: data
});
},
getWithdrawalInfo: async (id) => {
return request({
method: MethodsENUM.POST,
url: "/user/getWithdrawalInfo",
data: {id}
});
},
editWithdrawal: async (data) => {
return request({
method: MethodsENUM.POST,
url: "/user/editWithdrawal",
data: data
});
},
setDefaultWithdrawal: async (id) => {
return request({
method: MethodsENUM.POST,
url: "/user/setDefaultWithdrawal",
data: {id}
});
},
delWithdrawal: async (id) => {
return request({
method: MethodsENUM.POST,
url: "/user/delWithdrawal",
data: {id}
});
},
getUserMoneyLog: async (data) => {
return request({
method: MethodsENUM.POST,
url: "/user/getUserMoneyLog",
data: data
});
},
postWithdrawal: async (data) => {
return request({
method: MethodsENUM.POST,
url: "/user/postWithdrawal",
data: data
});
},
getDefaultWithdrawalInfo: async (data) => {
return request({
method: MethodsENUM.POST,
url: "/user/getDefaultWithdrawalInfo",
data: data
});
},
getWithdrawLog: async (data) => {
return request({
method: MethodsENUM.POST,
url: "/user/getWithdrawLog",
data: data
});
},
}
export default system;

View File

@@ -6,6 +6,7 @@ import PlatformENUM from "../enum/PlatformENUM";
import Api from "../api/index";
import {showToast} from "../utils/uils";
const emits = defineEmits(['success']);
const {details} = defineProps({
details: {
type: Object,
@@ -70,12 +71,17 @@ watch(
)
const success = async () => {
if (!selected.value) {
showToast('请选择帐号');
return;
}
const {msg} = await Api.system.acceptTask({
id: details.id,
account: selected.value,
});
showToast(msg);
show.value = false;
emits('success');
}
</script>
@@ -106,10 +112,10 @@ const success = async () => {
<template v-if="vo.length > 0">
<view
:key="index"
@click="v.is_use !== 0 ? selected = v.id : null"
@click="v.is_use !== 0 && po.status === 0 ? selected = v.id : null"
v-for="(v, index) in vo"
class="!flex items-center py-[22rpx]">
<radio :checked="selected === v.id" :disabled="v.is_use === 0"></radio>
<radio :checked="selected === v.id" :disabled="v.is_use === 0 || po.status>0"></radio>
<image class="!size-[80rpx] rounded-[50%] overflow-hidden !ml-[34rpx]"
:src="PlatformENUM[v.platform_id]"></image>
<view class="!flex flex-col !ml-[16rpx]">

View File

@@ -1,4 +1,5 @@
import {toPage} from "../utils/uils.js";
import useXFunModal from "../hooks/useXFunModal.js";
const OpenTypeFun = async (options) => {
console.log('OpenTypeFun打开', options);
@@ -23,7 +24,8 @@ const OpenTypeFun = async (options) => {
break;
}
case 5: { // 弹窗
console.log('弹窗');
console.log('弹窗', options);
useXFunModal(options);
break;
}
}

View File

@@ -19,6 +19,10 @@ const props = defineProps({
});
const sendMsg = async () => {
if (!/^1[3-9]\d{9}$/.test(props.mobile)) {
showToast('手机号不正确');
return;
}
const {msg} = await Api.system.sendSms({
mobile: props.mobile,
type: props.type,

View File

@@ -4,6 +4,7 @@ import {ref} from "vue";
const modalValue = defineModel();
const DateTimeRef = ref();
const emits = defineEmits(['success']);
const {placeholder, fields, type} = defineProps({
placeholder: {
type: String,
@@ -25,12 +26,13 @@ const open = () => {
const success = ({result}) => {
modalValue.value = result;
emits('success');
}
</script>
<template>
<view :class="[!$slots.default ? 'x-date-input' : '']">
<view v-if="!$slots.default" class="!flex items-center justify-center gap-[20rpx]" @click="open">
<view :class="[!$slots.default ? 'x-date-input' : '']" @click="open">
<view v-if="!$slots.default" class="!flex items-center justify-center gap-[20rpx]">
<image class="!size-[24rpx]" :src="timeIcon"></image>
<text v-if="!modalValue" class="text-[#666]">{{ placeholder }}</text>
<text class="test-24r" v-else>{{ modalValue }}</text>
@@ -42,6 +44,11 @@ const success = ({result}) => {
</template>
<style lang="scss" scoped>
.x-date-input-picker {
flex-grow: 1;
border-radius: 4rpx;
}
.x-date-input {
background-color: #F2F3F5;
padding: 14rpx 0;

View File

@@ -15,7 +15,7 @@ const {model, rules} = defineProps({
const verify = () => {
Object.entries(model).forEach(([key, value]) => {
console.log(rules[key], key)
if (!rules[key].reg.test(value)) {
if (rules[key] && !rules[key].reg.test(value)) {
showToast({
icon: 'error',
mask: true,

View File

@@ -21,18 +21,22 @@ const {src, list, imageClass} = defineProps({
});
const show = ref(false);
const preview = () => {
const open = () => {
show.value = true;
}
defineExpose({
open
});
</script>
<template>
<!-- #ifndef MP-WEIXIN -->
<image @click="preview" v-bind="$attrs" :src="src" mode="aspectFill"></image>
<image @click="open" v-bind="$attrs" :src="src" mode="aspectFill"></image>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<image @click="preview" :class="imageClass" :src="src" mode="aspectFill"></image>
<image @click="open" :class="imageClass" :src="src" mode="aspectFill"></image>
<!-- #endif -->
<view

View File

@@ -14,11 +14,15 @@ const STATUS = {
},
};
const {text, status, tile} = defineProps({
const {text, status, tile, textColor} = defineProps({
text: {
type: String,
default: '提示请在规定时间内按要求提交回填1。以免影响收益。哈哈哈哈哈哈哈哈哈哈'
},
textColor: {
type: String,
default: '#000'
},
status: {
type: String,
default: 'error'
@@ -52,8 +56,8 @@ onMounted(() => {
:style="{alignItems: tile ? 'start' : 'center'}">
<image v-if="status==='error'" class="!size-[26rpx] flex-shrink-0" :src="warn"></image>
<image v-else class="!size-[26rpx] flex-shrink-0" :src="success"></image>
<text v-if="!tile" class="!whitespace-nowrap flex-shrink-0">{{ text }}</text>
<text v-else>
<text v-if="!tile" class="!whitespace-nowrap flex-shrink-0" :style="{color: textColor}">{{ text }}</text>
<text v-else :style="{color: textColor}">
{{ text }}
</text>
</view>

43
src/components/XTY.vue Normal file
View File

@@ -0,0 +1,43 @@
<script setup>
import ICON from "../static/icons/dd.png";
const {size} = defineProps({
size: {
type: String,
default: '30rpx',
}
});
const modelValue = defineModel();
</script>
<template>
<view class="!flex" @click="modelValue=!modelValue">
<view :class="['x-t-y', modelValue ? 'cur' : '']">
<image v-if="modelValue" class="!size-[17rpx]" :src="ICON"></image>
</view>
<view>
<slot></slot>
</view>
</view>
</template>
<style scoped lang="scss">
.x-t-y {
$size: v-bind(size);
width: $size;
height: $size;
border: 1px solid #666;
border-radius: 50%;
display: inline-flex;
flex-shrink: 0;
margin-top: 5rpx;
margin-right: 10rpx;
justify-content: center;
align-items: center;
}
.cur {
border: 1px solid var(--primary-color);
}
</style>

View File

@@ -34,4 +34,9 @@ const {type} = defineProps({
background-color: #FFF7E8;
color: #FF7D00;
}
.error {
background-color: #FFECE8;
color: #F53F3F;
}
</style>

View File

@@ -4,19 +4,57 @@ import XModal from "./XModal.vue";
import fmt from '../static/images/fmt.png';
import play from '../static/icons/play.png';
const {options} = defineProps({
options: {
type: Object,
default: {},
}
});
const show = ref(false);
const playVideo = ref(false);
const current = ref(0);
const open = () => {
show.value = true;
}
defineExpose({
open
});
const changeSwiper = ({detail}) => {
current.value = detail.current;
}
</script>
<template>
<view @click="show=true">
<slot></slot>
</view>
<x-modal
backgroundColor="rgba(255,255,255,0)"
class="x-video-modal"
v-model:show="show">
<view class="!p-[20rpx] relative">
<template v-if="options.pop_type === 1">
<view class="relative h-[800rpx]">
<swiper class="!size-full" @change="changeSwiper">
<swiper-item v-for="src in options.pop_images" class="!flex flex-col justify-center px-[24rpx]">
<view
class="w-full bg-[#fff] h-fit !flex items-center p-[24rpx] rounded-[24rpx] relative">
<image class="!w-full" :src="src" mode="widthFix"></image>
</view>
</swiper-item>
</swiper>
<view class="absolute left-1/2 -translate-x-1/2 bottom-[-80rpx] text-white test-36r">
{{ current + 1 }} / {{ options.pop_images.length }}
</view>
<image
@click="show=false"
class="!w-[52rpx] !h-[52rpx] !absolute left-1/2 -translate-x-1/2 bottom-[-150rpx]"
src="/static/icons/close.png">
</image>
</view>
</template>
<template v-else>
<view class="!p-[20rpx] relative bg-white rounded-[24rpx]">
<image
@click="show=false"
class="!w-[52rpx] !h-[52rpx] !absolute left-1/2 -translate-x-1/2 bottom-[-100rpx]"
@@ -39,10 +77,12 @@ const playVideo = ref(false);
</video>
</view>
</view>
</template>
</x-modal>
</template>
<style lang="scss">
.x-video-modal {
.tui-modal-box {
margin-bottom: 200rpx;

8
src/enum/TXJLENUM.js Normal file
View File

@@ -0,0 +1,8 @@
const TXJLENUM = {
0: 'info',
1: 'warn',
2: 'success',
'-1': 'error'
}
export default TXJLENUM;

9
src/enum/ZFENUM.js Normal file
View File

@@ -0,0 +1,9 @@
import ZFBICON from "../static/icons/ZFBICON.png";
import YHKICON from "../static/icons/YHKICON.png";
const ZFENUM = {
1: ZFBICON,
2: YHKICON,
}
export default ZFENUM;

22
src/hooks/useXFunModal.js Normal file
View File

@@ -0,0 +1,22 @@
import XVideoModal from "../components/XVideoModal.vue";
import {createApp} from "vue";
const useXFunModal = (options) => {
const container = document.createElement('div');
document.body.appendChild(container);
const app = createApp(XVideoModal, {
options: options
});
const vm = app.mount(container);
const {open} = vm;
open();
return {};
}
export default useXFunModal;

View File

@@ -50,7 +50,7 @@
"quickapp": {},
/* */
"mp-weixin": {
"appid": "wxcd6a96b9a22754f4",
"appid": "wxa4dd2d036c8156a4",
"setting": {
"urlCheck": false
},

View File

@@ -2,7 +2,7 @@
"pages": [
// #ifdef MP-WEIXIN
{
"path": "pages/downloadMaterials/index",
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "领取素材"
}

View File

@@ -10,9 +10,12 @@ import PLUSICON from "../../static/icons/plus.png";
import XNav from "../../components/XNav.vue";
import XNoticeBar from "../../components/XNoticeBar.vue";
import {showToast, toPage} from "../../utils/uils.js";
import {onMounted, reactive} from "vue";
import {reactive} from "vue";
import Api from "../../api/index.js";
import {onShow} from "@dcloudio/uni-app";
import {useSystemStore} from "../../pinia/SystemStore/index.js";
const SystemStore = useSystemStore();
const BASE = [
{
id: 1,
@@ -42,22 +45,19 @@ const BASE = [
];
const list = reactive([]);
const dataList = reactive([]);
const po = reactive({
pid: null,
});
const getData = async () => {
const {data} = await Api.system.myAccount(po);
const {data} = await Api.system.myAccount(SystemStore.accountManagementPo);
dataList.length = 0;
dataList.push(...data);
}
const changeTab = (pid) => {
po.pid = pid;
SystemStore.accountManagementPo.pid = pid;
getData();
}
onMounted(() => {
onShow(() => {
Api.system.getPlatform().then(({data}) => {
data = data.filter(v => v.id !== 0);
list.length = 0;
@@ -73,7 +73,7 @@ onMounted(() => {
})
})
po.pid = list[0].id;
if (!SystemStore.accountManagementPo) SystemStore.accountManagementPo.pid = list[0].id;
getData();
})
})
@@ -94,7 +94,7 @@ const deleteItem = async (id) => {
<template v-for="(item, index) in list" :key="item.id">
<view class="!flex flex-col items-center" @click="changeTab(item.id)">
<image class="!size-[64rpx]" :src="item.icon"></image>
<view :class="['test-24r !mt-[10rpx]', po.pid === item.id ? 'cur' : '']">
<view :class="['test-24r !mt-[10rpx]', SystemStore.accountManagementPo.pid === item.id ? 'cur' : '']">
{{
item.name
}}
@@ -106,7 +106,7 @@ const deleteItem = async (id) => {
<view class="p-[20rpx] !flex flex-col gap-[20rpx]">
<view
@click="toPage('/pages/addAccount/index')"
@click="toPage(`/pages/addAccount/index`)"
class="py-[15rpx] bg-[#E8F3FF] text-[var(--primary-color)] !flex justify-center items-center gap-[10rpx] border border-[var(--primary-color)] rounded-[4rpx]">
<image :src="PLUSICON" class="!size-[26rpx] !mt-[2rpx]"></image>
新增帐号

View File

@@ -9,8 +9,10 @@ import XUpload from "../../components/XUpload.vue";
import {reactive} from "vue";
import {backPage, showToast} from "../../utils/uils.js";
import {onLoad} from "@dcloudio/uni-app";
import XDateRange from "../../components/XDateRange.vue";
import XDateTime from "../../components/XDateTime.vue";
import {useSystemStore} from "../../pinia/SystemStore/index.js";
const SystemStore = useSystemStore();
const form = reactive({
status: null,
@@ -43,11 +45,12 @@ const success = async () => {
onLoad((options) => {
const {id} = options;
Api.system.getAccountInfo(id).then(({data}) => {
if (id) Api.system.getAccountInfo(id).then(({data}) => {
data.homepage = [data.homepage];
data.qrcode = [data.qrcode];
Object.assign(form, data);
});
if (SystemStore.accountManagementPo.pid) form.pid = Number(SystemStore.accountManagementPo.pid);
})
</script>

View File

@@ -1,48 +1,104 @@
<script setup>
import {reactive} from 'vue';
import {reactive, ref} from 'vue';
import XForm from "../../../components/XForm.vue";
import XFormItem from "../../../components/XFormItem.vue";
import XInput from "../../../components/XInput.vue";
import {toPage} from "../../../utils/uils.js";
import {backPage, showToast, toPage} from "../../../utils/uils.js";
import Api from "../../../api/index.js";
import XTY from "../../../components/XTY.vue";
const rules = {
name: {
reg: /.+/,
msg: '姓名不能为空',
const {id} = defineProps({
id: {
type: Number,
default: null,
}
});
const formRef = ref();
const TY = ref(false);
const rules = {
realname: {
reg: /^[\u4e00-\u9fa5]{1}(?:·?[\u4e00-\u9fa5]){1,24}$|^[\u4e00-\u9fa5]{2,25}$/,
msg: '姓名不符合规则',
},
id_card: {
reg: /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/,
msg: '身份证号错误',
},
account: {
reg: /^(?!\s*$).+/,
msg: '支付宝不符合规则',
},
mobile: {
reg: /^1[3-9]\d{9}$/,
msg: '手机号错误',
},
};
const form = reactive({
name: null,
type: 1,
realname: null,
id_card: null,
account: null,
mobile: null,
});
if (id) {
Api.system.getWithdrawalInfo(id).then(({data}) => {
Object.assign(form, data);
})
}
const success = async () => {
if (!TY.value) {
showToast({
icon: 'error',
mask: true,
title: '请同意服务协议',
});
return;
}
formRef.value.verify();
if (id) {
const {msg} = await Api.system.editWithdrawal(form);
showToast(msg);
} else {
const {msg} = await Api.system.addWithdrawal(form);
showToast(msg);
}
setTimeout(() => {
backPage();
}, 2000)
}
</script>
<template>
<view>
<x-form :model="form" :rules="rules">
<x-form :model="form" :rules="rules" ref="formRef">
<x-form-item label="真实姓名">
<x-input v-model:model-value="form.name" height="96rpx" placeholder="请输入真实姓名"></x-input>
<x-input v-model:model-value="form.realname" height="96rpx" placeholder="请输入真实姓名"></x-input>
</x-form-item>
<x-form-item label="身份证号码">
<x-input v-model:model-value="form.name" height="96rpx" placeholder="请输入身份证号码"></x-input>
<x-input v-model:model-value="form.id_card" height="96rpx" placeholder="请输入身份证号码"></x-input>
</x-form-item>
<x-form-item label="支付宝账号">
<x-input v-model:model-value="form.name" height="96rpx" placeholder="请输入支付宝账号"></x-input>
<x-input v-model:model-value="form.account" height="96rpx" placeholder="请输入支付宝账号"></x-input>
</x-form-item>
<x-form-item label="手机号">
<x-input v-model:model-value="form.name" height="96rpx" placeholder="请输入手机号"></x-input>
<x-input v-model:model-value="form.mobile" height="96rpx" placeholder="请输入手机号"></x-input>
</x-form-item>
<x-form-item>
<view class="items-center test-24r xy">
<radio></radio>
<x-t-y v-model:model-value="TY">
本人承诺已阅读并同意
<text class="text-[var(--primary-color)]" @click="toPage('/pages/richPage/index')">
<text class="text-[var(--primary-color)]" @click="toPage('/pages/richPage/index?id=3')">
灵活用工平台综合服务协议
</text>
本人按照协议内容向贵司提供相应的服务
</x-t-y>
</view>
</x-form-item>
<x-form-item>
<view
@click="success"
class="bg-[var(--primary-color)] py-[26rpx] w-full text-[#fff] rounded-[12rpx] !flex justify-center items-center !mt-[40rpx]">
提交
</view>

View File

@@ -1,48 +1,104 @@
<script setup>
import {reactive} from "vue";
import {toPage} from "../../../utils/uils.js";
import XInput from "../../../components/XInput.vue";
import XFormItem from "../../../components/XFormItem.vue";
import {reactive, ref} from 'vue';
import XForm from "../../../components/XForm.vue";
import XFormItem from "../../../components/XFormItem.vue";
import XInput from "../../../components/XInput.vue";
import {backPage, showToast, toPage} from "../../../utils/uils.js";
import Api from "../../../api/index.js";
import XTY from "../../../components/XTY.vue";
const rules = {
name: {
reg: /.+/,
msg: '姓名不能为空',
const {id} = defineProps({
id: {
type: Number,
default: null,
}
});
const formRef = ref();
const TY = ref(false);
const rules = {
realname: {
reg: /^[\u4e00-\u9fa5]{1}(?:·?[\u4e00-\u9fa5]){1,24}$|^[\u4e00-\u9fa5]{2,25}$/,
msg: '姓名不符合规则',
},
id_card: {
reg: /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/,
msg: '身份证号错误',
},
account: {
reg: /^(?!\s*$).+/,
msg: '支付宝不符合规则',
},
mobile: {
reg: /^1[3-9]\d{9}$/,
msg: '手机号错误',
},
};
const form = reactive({
name: null,
type: 2,
realname: null,
id_card: null,
account: null,
mobile: null,
});
if (id) {
Api.system.getWithdrawalInfo(id).then(({data}) => {
Object.assign(form, data);
})
}
const success = async () => {
if (!TY.value) {
showToast({
icon: 'error',
mask: true,
title: '请同意服务协议',
});
return;
}
formRef.value.verify();
if (id) {
const {msg} = await Api.system.editWithdrawal(form);
showToast(msg);
} else {
const {msg} = await Api.system.addWithdrawal(form);
showToast(msg);
}
setTimeout(() => {
backPage();
}, 2000)
}
</script>
<template>
<view>
<x-form :model="form" :rules="rules">
<x-form :model="form" :rules="rules" ref="formRef">
<x-form-item label="真实姓名">
<x-input v-model:model-value="form.name" height="96rpx" placeholder="请输入真实姓名"></x-input>
<x-input v-model:model-value="form.realname" height="96rpx" placeholder="请输入真实姓名"></x-input>
</x-form-item>
<x-form-item label="身份证号码">
<x-input v-model:model-value="form.name" height="96rpx" placeholder="请输入身份证号码"></x-input>
<x-input v-model:model-value="form.id_card" height="96rpx" placeholder="请输入身份证号码"></x-input>
</x-form-item>
<x-form-item label="银行卡号">
<x-input v-model:model-value="form.name" height="96rpx" placeholder="请输入银行卡号"></x-input>
<x-input v-model:model-value="form.account" height="96rpx" placeholder="请输入银行卡号"></x-input>
</x-form-item>
<x-form-item label="手机号">
<x-input v-model:model-value="form.name" height="96rpx" placeholder="请输入手机号"></x-input>
<x-input v-model:model-value="form.mobile" height="96rpx" placeholder="请输入手机号"></x-input>
</x-form-item>
<x-form-item>
<view class="items-center test-24r xy">
<radio></radio>
<x-t-y v-model:model-value="TY">
本人承诺已阅读并同意
<text class="text-[var(--primary-color)]" @click="toPage('/pages/richPage/index')">
<text class="text-[var(--primary-color)]" @click="toPage('/pages/richPage/index?id=3')">
灵活用工平台综合服务协议
</text>
本人按照协议内容向贵司提供相应的服务
</x-t-y>
</view>
</x-form-item>
<x-form-item>
<view
@click="success"
class="bg-[var(--primary-color)] py-[26rpx] w-full text-[#fff] rounded-[12rpx] !flex justify-center items-center !mt-[40rpx]">
提交
</view>

View File

@@ -2,6 +2,9 @@
import {defineAsyncComponent, ref} from "vue";
import XNav from "../../components/XNav.vue";
import XNoticeBar from "../../components/XNoticeBar.vue";
import {onLoad} from "@dcloudio/uni-app";
import Api from "../../api/index.js";
import {showToast} from "../../utils/uils.js";
// #ifdef APP-PLUS
import AliPay from "./components/AliPay.vue";
@@ -13,6 +16,7 @@ const AliPay = defineAsyncComponent(() => import('./components/AliPay.vue'));
const BankPay = defineAsyncComponent(() => import('./components/BankPay.vue'));
// #endif
const id = ref(null);
const currentTab = ref(0);
const tabs = [
{
@@ -26,8 +30,22 @@ const tabs = [
];
const change = (e) => {
if (id.value) {
showToast('无法修改类型');
return;
}
currentTab.value = e.index;
}
onLoad((options) => {
const {id: _id} = options;
if (_id) {
id.value = _id;
Api.system.getWithdrawalInfo(id.value).then(({data}) => {
currentTab.value = data.type - 1;
});
}
});
</script>
<template>
@@ -37,6 +55,7 @@ const change = (e) => {
<x-notice-bar
status="success"
:tile="true"
text-color="var(--primary-color)"
text="平台承诺:所有信息仅用于打款,不会用作其他用途。为了您的资金安全,大额提现会通过第三方支付代发,请填写实名信息和银行卡进行验证。">
</x-notice-bar>
@@ -51,7 +70,7 @@ const change = (e) => {
<Suspense>
<template #default>
<view class="px-[34rpx] !mt-[40rpx]">
<component :is="tabs[currentTab].component"></component>
<component :is="tabs[currentTab].component" :id="id"></component>
</view>
</template>

View File

@@ -2,7 +2,6 @@
import {onMounted, reactive, ref} from "vue";
import XNav from "../../components/XNav.vue";
import videoMask from '../../static/images/video-mask.png';
import XVideoModal from "../../components/XVideoModal.vue";
import Api from "../../api/index.js";
import useTableQuery from "../../hooks/useTableQuery.js";
import OpenTypeFun from "../../components/OpenTypeFun.js";

View File

@@ -1,177 +0,0 @@
<script setup>
import {ref} from "vue";
import XNav from "../../components/XNav.vue";
import {copy, download} from "../../utils/uils.js";
import XLink from "../../components/XLink.vue";
import XImage from "../../components/XImage.vue";
import testIcon from "../../static/images/test.png";
const mock = [
'https://udnsunusn.oss-cn-hangzhou.aliyuncs.com/mock-1.png',
'https://udnsunusn.oss-cn-hangzhou.aliyuncs.com/mock-2.png',
'https://udnsunusn.oss-cn-hangzhou.aliyuncs.com/mock-3.png',
'https://udnsunusn.oss-cn-hangzhou.aliyuncs.com/mock-4.png',
'https://udnsunusn.oss-cn-hangzhou.aliyuncs.com/mock-5.png',
'https://udnsunusn.oss-cn-hangzhou.aliyuncs.com/mock-6.png',
'https://udnsunusn.oss-cn-hangzhou.aliyuncs.com/mock-7.png',
'https://udnsunusn.oss-cn-hangzhou.aliyuncs.com/mock-8.png',
];
const current = ref(0);
const tabs = ref([
{
id: 1,
name: '素材1',
},
{
id: 2,
name: '素材2',
},
{
id: 3,
name: '素材3',
},
]);
</script>
<template>
<!--下载素材-->
<!-- #ifndef MP-WEIXIN -->
<x-nav></x-nav>
<!-- #endif -->
<tui-tabs :tabs="tabs" :currentTab="current" @change="({index})=>current=index"></tui-tabs>
<view class="block">
<view class="title">标题</view>
<view class="info">
我是标题我是标题我是标题我是标题我是标题
<view class="copy-button" @click="copy('我是标题我是标题我是标题我是标题我是标题')">复制</view>
</view>
</view>
<view class="block">
<view class="title">
话题
<x-link class="!ml-auto" show-description>查看引导</x-link>
</view>
<view class="info">
我是标题我是标题我是标题我是标题我是标题
<view class="copy-button" @click="copy('我是标题我是标题我是标题我是标题我是标题')">复制</view>
</view>
</view>
<view class="block">
<view class="title">正文</view>
<view class="info">
正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文文正文正文文正文正文文正文正文
<view class="copy-button" @click="copy('我是标题我是标题我是标题我是标题我是标题')">复制</view>
</view>
</view>
<view class="block">
<view class="title">素材请按顺序下载&发布</view>
<view class="info">
<view class="!grid grid-cols-5 flex-wrap gap-[32rpx]">
<x-image :src="testIcon" imageClass="!w-[100%] !h-auto !aspect-square"></x-image>
<x-image :src="testIcon" imageClass="!w-[100%] !h-auto !aspect-square"></x-image>
<x-image :src="testIcon" imageClass="!w-[100%] !h-auto !aspect-square"></x-image>
<x-image :src="testIcon" imageClass="!w-[100%] !h-auto !aspect-square"></x-image>
<x-image :src="testIcon" imageClass="!w-[100%] !h-auto !aspect-square"></x-image>
<x-image :src="testIcon" imageClass="!w-[100%] !h-auto !aspect-square"></x-image>
<x-image :src="testIcon" imageClass="!w-[100%] !h-auto !aspect-square"></x-image>
<x-image :src="testIcon" imageClass="!w-[100%] !h-auto !aspect-square"></x-image>
</view>
<view class="copy-button" @click="download(mock)">批量保存</view>
</view>
</view>
<view class="block">
<view class="title">评论1</view>
<view class="info">
正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文文正文正文文正文正文文正文正文
<view class="!grid grid-cols-5 flex-wrap gap-[32rpx]">
<x-image :src="testIcon" imageClass="!w-[100%] !h-auto !aspect-square"></x-image>
<x-image :src="testIcon" imageClass="!w-[100%] !h-auto !aspect-square"></x-image>
<x-image :src="testIcon" imageClass="!w-[100%] !h-auto !aspect-square"></x-image>
</view>
<view class="!flex gap-[24rpx] justify-center">
<view class="copy-button !mx-0" @click="copy('我是标题我是标题我是标题我是标题我是标题')">复制文字
</view>
<view class="copy-button !mx-0" @click="download(mock)">保存图片</view>
</view>
</view>
</view>
<view class="block">
<view class="title">评论2
<x-link class="!ml-auto" show-description>查看引导</x-link>
</view>
<view class="info">
正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文正文文正文正文文正文正文文正文正文
<view class="!grid grid-cols-5 flex-wrap gap-[32rpx]">
<x-image :src="testIcon" imageClass="!w-[100%] !h-auto !aspect-square"></x-image>
<x-image :src="testIcon" imageClass="!w-[100%] !h-auto !aspect-square"></x-image>
</view>
<view class="!flex gap-[24rpx] justify-center">
<view class="copy-button !mx-0" @click="copy('我是标题我是标题我是标题我是标题我是标题')">复制文字
</view>
<view class="copy-button !mx-0" @click="download(mock)">保存图片</view>
</view>
</view>
</view>
</template>
<style scoped lang="scss">
.block {
background-color: #fff;
padding: 20rpx;
.copy-button {
padding: 7rpx 24rpx;
background: rgb(22, 93, 255);
color: #fff;
border-radius: 4rpx;
width: fit-content;
margin-top: 24rpx;
margin-left: auto;
margin-right: auto;
color: rgb(255, 255, 255);
font-size: 12px;
font-weight: 400;
line-height: 140%;
letter-spacing: 0;
font-weight: 300;
}
.info {
color: rgb(29, 33, 41);
font-size: 14px;
font-weight: 500;
line-height: 22px;
letter-spacing: 0;
text-align: left;
padding: 24rpx;
background-color: #F7F8FA;
border: 1px solid #E5E6EB;
border-radius: 8rpx;
position: relative;
}
.title {
color: rgb(78, 89, 105);
font-size: 14px;
font-weight: 500;
line-height: 20px;
letter-spacing: 0;
padding-bottom: 14rpx;
display: flex;
}
}
</style>

View File

@@ -19,18 +19,14 @@ const vo = reactive({
page: '',
rows: [],
total: 0,
month_money: 0,
all_money: 0,
});
const {loading, pagination, initFetchData} = useTableQuery({
api: Api.system.getData,
api: Api.system.getWithdrawLog,
parameter: po,
watchParameter: true,
callback: (data) => {
vo.page = data.page;
vo.total = data.total;
if (data.current === 1) {
vo.rows.length = 0;
}
vo.rows = [...vo.rows, ...data.rows];
Object.assign(vo, data);
}
});
</script>
@@ -72,15 +68,15 @@ const {loading, pagination, initFetchData} = useTableQuery({
<view class="!flex flex-col gap-[20rpx] p-[20rpx]">
<view class="bg-[var(--primary-color)] p-[32rpx] rounded-[12rpx] !flex items-center">
<view class="!flex-grow text-[#fff]">
<view class="test-36r font-bold">246.23</view>
<view class="test-36r font-bold">{{ vo?.month_money.toFixed(2) }}</view>
<view class="test-24r">该月收益</view>
</view>
<view class="!flex-grow text-[#fff]">
<view class="test-36r font-bold">246.23</view>
<view class="test-36r font-bold">{{ vo?.all_money.toFixed(2) }}</view>
<view class="test-24r">累计收益</view>
</view>
<view class="flex-shrink-0">
<x-date-time v-model:model-value="po.datetime" fields="month">
<x-date-time v-model:model-value="po.datetime" fields="month" type="3">
<view
class="rounded-full bg-[#E8F3FF] text-[var(--primary-color)] px-[32rpx] py-[8rpx] !flex items-center gap-[14rpx]">
{{ po.datetime }}

174
src/pages/index/index.vue Normal file
View File

@@ -0,0 +1,174 @@
<script setup>
import {ref, reactive} from "vue";
import XNav from "../../components/XNav.vue";
import {copy, download, showToast} from "../../utils/uils.js";
import XLink from "../../components/XLink.vue";
import XImage from "../../components/XImage.vue";
import testIcon from "../../static/images/test.png";
import {onLoad} from "@dcloudio/uni-app";
import Api from "../../api/index.js";
import {useUserStore} from "../../pinia/UserStore/index.js";
const {setToken} = useUserStore();
const detail = reactive({});
const current = ref(0);
const tabs = reactive([]);
onLoad((options) => {
const {id, token} = options;
if (!id) {
showToast('未找到任务');
return;
}
setToken(token);
Api.system.getTaskinfo(id).then(({data}) => {
Object.assign(detail, data);
tabs.push(...detail.children.material.map((v, index) => ({
id: v.id,
name: `素材${index + 1}`
})));
});
})
</script>
<template>
<!--下载素材-->
<!-- #ifndef MP-WEIXIN -->
<x-nav></x-nav>
<!-- #endif -->
<tui-tabs v-if="tabs.length>0" :tabs="tabs" :currentTab="current" @change="({index})=>current=index"></tui-tabs>
<view class="block">
<view class="title">标题</view>
<view class="info">
{{ detail.children.material[current].title }}
<view class="copy-button" @click="copy(detail.children.material[current].title)">复制</view>
</view>
</view>
<view class="block">
<view class="title">
话题
<x-link class="!ml-auto" show-description>查看引导</x-link>
</view>
<view class="info">
{{ detail.children.material[current].tags_arr.join(' ') }}
<view class="copy-button" @click="copy(detail.children.material[current].tags_arr.join(' '))">复制</view>
</view>
</view>
<view class="block">
<view class="title">正文</view>
<view class="info">
{{ detail.children.material[current].content }}
<view class="copy-button" @click="copy(detail.children.material[current].content)">复制</view>
</view>
</view>
<view class="block">
<view class="title">素材请按顺序下载&发布</view>
<view class="info">
<view class="!grid grid-cols-5 flex-wrap gap-[32rpx]">
<x-image
v-for="(v, index) in detail.children.material[current].material_arr"
:key="index"
:src="v"
imageClass="!w-[100%] !h-auto !aspect-square">
</x-image>
</view>
<view class="copy-button" @click="download(detail.children.material[current].material_arr)">批量保存</view>
</view>
</view>
<view v-if="detail.children?.material[current]?.comment" class="block">
<view class="title">评论1</view>
<view class="info">
{{ detail.children?.material[current]?.comment.intro }}
<view class="!grid grid-cols-5 flex-wrap gap-[32rpx]">
<x-image
v-for="j in detail.children?.material[current]?.comment.image_arr"
:src="j"
imageClass="!w-[100%] !h-auto !aspect-square">
</x-image>
</view>
<view class="!flex gap-[24rpx] justify-center">
<view class="copy-button !mx-0" @click="copy(detail.children?.material[current]?.comment.intro)">复制文字
</view>
<view class="copy-button !mx-0"
@click="download(detail.children?.material[current]?.comment.image_arr)">保存图片
</view>
</view>
</view>
</view>
<view v-for="(v, index) in detail.children?.material[current]?.comment.children" :key="v.id" class="block">
<view class="title">评论{{ index + 2 }}</view>
<view class="info">
{{ v.intro }}
<view class="!grid grid-cols-5 flex-wrap gap-[32rpx]">
<x-image v-for="j in v.image_arr" :src="j" imageClass="!w-[100%] !h-auto !aspect-square"></x-image>
</view>
<view class="!flex gap-[24rpx] justify-center">
<view class="copy-button !mx-0" @click="copy(v.intro)">复制文字
</view>
<view class="copy-button !mx-0" @click="download(v.image_arr)">保存图片</view>
</view>
</view>
</view>
</template>
<style scoped lang="scss">
.block {
background-color: #fff;
padding: 20rpx;
.copy-button {
padding: 7rpx 24rpx;
background: rgb(22, 93, 255);
color: #fff;
border-radius: 4rpx;
width: fit-content;
margin-top: 24rpx;
margin-left: auto;
margin-right: auto;
color: rgb(255, 255, 255);
font-size: 12px;
font-weight: 400;
line-height: 140%;
letter-spacing: 0;
font-weight: 300;
}
.info {
color: rgb(29, 33, 41);
font-size: 14px;
font-weight: 500;
line-height: 22px;
letter-spacing: 0;
text-align: left;
padding: 24rpx;
background-color: #F7F8FA;
border: 1px solid #E5E6EB;
border-radius: 8rpx;
position: relative;
}
.title {
color: rgb(78, 89, 105);
font-size: 14px;
font-weight: 500;
line-height: 20px;
letter-spacing: 0;
padding-bottom: 14rpx;
display: flex;
}
}
</style>

View File

@@ -9,13 +9,36 @@ import ICON5 from "../../static/icons/icon-radio.png";
import ICON6 from "../../static/icons/icon-radio-s.png";
import XLink from "../../components/XLink.vue";
import XConfirmModal from "../../components/XConfirmModal.vue";
import {onShow} from "@dcloudio/uni-app";
import Api from "../../api/index.js";
import {reactive} from "vue";
const deletePayment = async () => {
const list = reactive([]);
const getData = async () => {
const {data} = await Api.system.getWithdrawal();
list.length = 0;
list.push(...data);
}
const deletePayment = async (id) => {
const {msg} = await Api.system.delWithdrawal(id);
showToast({
icon: 'success',
title: '删除成功'
title: msg
});
await getData();
}
const setDefaultWithdrawal = async (id) => {
const {msg} = await Api.system.setDefaultWithdrawal(id);
showToast(msg);
await getData();
}
onShow(() => {
getData();
});
</script>
<template>
@@ -25,24 +48,25 @@ const deletePayment = async () => {
<view class="py-[20rpx] pl-[30rpx] pr-[24rpx] rounded-[12rpx] bg-[#fff] w-full !flex gap-[22rpx] items-center"
@click="toPage('/pages/addPaymentAccount/index')">
<image class="!size-[72rpx]" mode="aspectFill" :src="ICON1"></image>
<view class="text-[#86909C] test-28r">您还没有添加收款信息~</view>
<view class="text-[#86909C] test-28r">添加新的收款信息~</view>
<x-link class="test-28r !ml-auto">去添加</x-link>
<image class="!w-[12rpx]" mode="widthFix" :src="ICON2"></image>
</view>
<view class="bg-[#3878F6] p-[32rpx] rounded-[12rpx]" v-for="i in 10">
<view :class="['p-[32rpx] rounded-[12rpx]', v.type === 1 ? 'ZFB' : 'YHK']" v-for="v in list" :key="v.id">
<view class="!flex items-center">
<view class="text-[#fff]">支付宝</view>
<image class="!size-[35rpx] !ml-auto" mode="aspectFill" :src="ICON3"></image>
<x-confirm-modal title="确定删除银行卡" info="135 7777 9865" @success="deletePayment">
<view class="text-[#fff]">{{ v.type_text }}</view>
<image @click="toPage(`/pages/addPaymentAccount/index?id=${v.id}`)" class="!size-[35rpx] !ml-auto"
mode="aspectFill" :src="ICON3"></image>
<x-confirm-modal title="确定删除银行卡" :info="v.account" @success="deletePayment(v.id)">
<image class="!size-[30rpx] !ml-[20rpx]" mode="aspectFill" :src="ICON4"></image>
</x-confirm-modal>
</view>
<view class="HarmonyOS account">
135 7777 9865
{{ v.account }}
</view>
<view class="radio-info">
<image v-if="false" class="!size-[30rpx]" mode="aspectFill" :src="ICON5"></image>
<view class="radio-info" @click="setDefaultWithdrawal(v.id)">
<image v-if="v.is_default !== 1" class="!size-[30rpx]" mode="aspectFill" :src="ICON5"></image>
<image v-else class="!size-[30rpx]" mode="aspectFill" :src="ICON6"></image>
设为默认打款信息
</view>
@@ -51,6 +75,14 @@ const deletePayment = async () => {
</template>
<style scoped lang="scss">
.YHK {
background: linear-gradient(90.00deg, rgb(96, 137, 255), rgb(68, 81, 255) 100%);
}
.ZFB {
background: linear-gradient(90.00deg, rgb(0, 141, 255), rgb(22, 119, 255) 100%);
}
.radio-info {
color: rgb(255, 255, 255);
font-size: 12px;

View File

@@ -1,7 +1,7 @@
<script setup>
import {ref, reactive} from "vue";
import XSquareCarouselImage from "../../../components/XSquareCarouselImage.vue";
import {toPage} from "../../../utils/uils.js";
import {toPage, toWXMiniApp} from "../../../utils/uils.js";
const {data} = defineProps({
data: {
@@ -78,7 +78,7 @@ const current = ref(0);
</view>
</view>
<tui-button size="28" @click="toPage('/pages/downloadMaterials/index')">
<tui-button size="28" @click="toWXMiniApp(data.id)">
<tui-icon size="20" color="#fff" name="bottom"></tui-icon>
<view class="!ml-[20rpx]">一键下载</view>
</tui-button>

View File

@@ -349,7 +349,7 @@ onMounted(() => {
</view>
</view>
<accept-assignment-modal v-if="details.is_use === 0" :details="details">
<accept-assignment-modal v-if="details.is_use === 0" :details="details" @success="getData">
<view
class="bg-[var(--primary-color)] rounded-[8rpx] py-[26rpx] text-[#fff] !flex justify-center items-center">
接受任务

View File

@@ -13,7 +13,7 @@ const show = defineModel('show');
const rules = {
nickname: {
reg: /^[^]*\S[^]*$/,
msg: '请输入正确的微信号',
msg: '昵称不能为空',
}
};
const form = reactive({

View File

@@ -12,7 +12,7 @@ const XFormRef = ref();
const show = defineModel('show');
const rules = {
wechat: {
reg: /^[^]*\S[^]*$/,
reg: /^[a-zA-Z0-9_-]{1,20}$/,
msg: '请输入正确的微信号',
}
};

View File

@@ -2,17 +2,44 @@
import {ref} from "vue";
import XConfirmModal from "../../../components/XConfirmModal.vue";
import {showToast} from "../../../utils/uils.js";
import {useUserStore} from "../../../pinia/UserStore/index.js";
import dayjs from "dayjs";
import Api from "../../../api/index.js";
const UserStore = useUserStore();
const emits = defineEmits(['success']);
const show = ref(false);
const open = () => {
const defaultDrawal = ref();
const open = async () => {
if (UserStore.userInfo.money < 1) {
showToast({
icon: 'error',
title: '平台最低提现金额为1.00元',
});
return;
}
if (dayjs().hour() <= 11 || dayjs().hour() >= 18) {
showToast({
icon: 'error',
title: '请于11:00至18:00发起提现',
});
return;
}
const {data} = await Api.system.getDefaultWithdrawalInfo();
defaultDrawal.value = data;
show.value = true;
}
const success = () => {
const success = async () => {
const {msg} = await Api.system.postWithdrawal({
id: defaultDrawal.value.id,
money: UserStore.userInfo.money,
});
showToast({
icon: 'success',
title: '发起提现成功,正在打款',
title: msg,
});
emits('success');
}
</script>
@@ -29,19 +56,23 @@ const success = () => {
confirm-text="我已确认"
:cancel="false">
<template v-slot:context>
<view class="w-full">
<view class="w-full" v-if="defaultDrawal">
<view class="title">
请核对提现信息
</view>
<view class="info">
姓名李晓<br/>
支付宝号13566890241<br/>
提现金额36.78<br/>
提现手续费3.678<br/>
到账金额33.10
姓名{{ defaultDrawal.realname }}<br/>
{{ defaultDrawal.type_text }}{{ defaultDrawal.account }}<br/>
提现金额{{ UserStore.userInfo.money.toFixed(2) }}<br/>
提现手续费{{
(UserStore.userInfo.money * (Number(defaultDrawal.ratio) / 100)).toFixed(2)
}}<br/>
到账金额{{
(UserStore.userInfo.money - (UserStore.userInfo.money * (Number(defaultDrawal.ratio) / 100))).toFixed(2)
}}
</view>
<view class="exp">
手续费率为6%由三方代账公司收取
手续费率为{{ defaultDrawal.ratio }}%由三方代账公司收取
</view>
</view>
</template>

View File

@@ -6,10 +6,24 @@ import XLink from "../../components/XLink.vue";
import Right from "../../static/icons/right.png";
import {toPage} from "../../utils/uils.js";
import WithdrawalModal from "./components/WithdrawalModal.vue";
import {useUserStore} from "../../pinia/UserStore/index.js";
import {onShow} from "@dcloudio/uni-app";
import Api from "../../api/index.js";
import {ref} from "vue";
import ZFENUM from "../../enum/ZFENUM.js";
const withdrawal = async () => {
const UserStore = useUserStore();
const defaultDrawal = ref();
const getData = async () => {
await UserStore.getUserInfo();
const {data: _defaultDrawal} = await Api.system.getDefaultWithdrawalInfo();
defaultDrawal.value = _defaultDrawal;
}
onShow(() => {
getData();
})
</script>
<template>
@@ -18,6 +32,7 @@ const withdrawal = async () => {
<view class="!flex flex-col gap-[20rpx] p-[20rpx]">
<view class="py-[20rpx] pl-[30rpx] pr-[24rpx] rounded-[12rpx] bg-[#fff] w-full !flex gap-[22rpx] items-center"
v-if="!defaultDrawal?.id"
@click="toPage('/pages/paymentAccount/index')">
<image class="!size-[72rpx]" mode="aspectFill" :src="ICON1"></image>
<view class="text-[#86909C] test-28r">您还没有添加收款信息~</view>
@@ -25,15 +40,24 @@ const withdrawal = async () => {
<image class="!w-[12rpx]" mode="widthFix" :src="ICON2"></image>
</view>
<view class="py-[20rpx] pl-[30rpx] pr-[24rpx] rounded-[12rpx] bg-[#fff] w-full !flex gap-[22rpx] items-center"
v-else
@click="toPage('/pages/paymentAccount/index')">
<image class="!size-[72rpx] rounded-[20rpx]" mode="aspectFill" :src="ZFENUM[defaultDrawal.type]"></image>
<view class="text-[#1D2129] test-28r">{{ defaultDrawal.account }}</view>
<image class="!w-[12rpx] !ml-auto" mode="widthFix" :src="ICON2"></image>
</view>
<view class="py-[32rpx] px-[24rpx] rounded-[12rpx] bg-[#fff] w-full">
<view class="!flex items-center justify-between">
<view>
<view class="test-28r">可提现余额(</view>
<view class="HarmonyOS" style="font-size: 60rpx;font-weight: 500;">0.00</view>
<view class="HarmonyOS" style="font-size: 60rpx;font-weight: 500;">
{{ UserStore.userInfo.money.toFixed(2) }}
</view>
<withdrawal-modal>
</view>
<withdrawal-modal @success="getData">
<view
@click=""
class="py-[8rpx] bg-[var(--primary-color)] text-[#fff] rounded-full w-[200rpx] !flex justify-center items-center">
立即提现
</view>

View File

@@ -23,16 +23,10 @@ const vo = reactive({
total: 0,
});
const {loading, pagination, initFetchData} = useTableQuery({
api: Api.system.getData,
api: Api.system.getUserMoneyLog,
parameter: sumPo,
watchParameter: true,
callback: (data) => {
vo.page = data.page;
vo.total = data.total;
if (data.current === 1) {
vo.rows.length = 0;
}
vo.rows = [...vo.rows, ...data.rows];
Object.assign(vo, data);
}
});
</script>
@@ -42,6 +36,7 @@ const {loading, pagination, initFetchData} = useTableQuery({
<x-nav></x-nav>
<x-filter
@success="initFetchData"
v-model:model="sumPo"
v-model:visible="showFilter">
<x-filter-item label="账单类型">
@@ -81,17 +76,20 @@ const {loading, pagination, initFetchData} = useTableQuery({
@scrolltolower="pagination.current++"
scroll-y
class="h-[calc(100vh-200rpx)]">
<view class="p-[20rpx]" v-for="item in vo.rows">
<view class="p-[20rpx]" v-for="item in vo.rows" :key="item.id">
<view class="p-[20rpx] rounded-[12rpx] bg-[#fff] !flex justify-between items-center">
<view class="!flex flex-col gap-[24rpx]">
<view class="!flex items-center gap-[16rpx]">
<view>提现退回</view>
<x-tag type="success">收入</x-tag>
<view>{{ item.purpose_name }}</view>
<x-tag :type="Number(item.money) > 0 ? 'success' : 'info'">{{ item.purpose_type }}</x-tag>
</view>
<view class="text-[#86909C] test-24r">{{
dayjs(item.createtime).format('YYYY-MM-DD HH:mm:ss')
}}
</view>
<view class="text-[#86909C] test-24r">{{ dayjs().format('YYYY-MM-DD HH:mm:ss') }}</view>
</view>
<view class="test-36r font-bold HarmonyOS">
+95.88
{{ item.money }}
</view>
</view>
</view>

View File

@@ -8,26 +8,24 @@ import Api from "../../api/index.js";
import {reactive} from "vue";
import XDateTime from "../../components/XDateTime.vue";
import dayjs from "dayjs";
import ZFENUM from "../../enum/ZFENUM.js";
import TXJLENUM from "../../enum/TXJLENUM.js";
const po = reactive({
datetime: dayjs().format('YYYY-MM'),
time: dayjs().format('YYYY-MM'),
});
const vo = reactive({
page: '',
rows: [],
total: 0,
month_money: 0,
all_money: 0,
});
const {loading, pagination, initFetchData} = useTableQuery({
api: Api.system.getData,
watchParameter: true,
api: Api.system.getWithdrawLog,
parameter: po,
callback: (data) => {
if (data.current === 1) {
vo.rows.length = 0;
}
vo.page = data.page;
vo.total = data.total;
vo.rows = [...vo.rows, ...data.rows];
Object.assign(vo, data);
}
});
</script>
@@ -44,45 +42,45 @@ const {loading, pagination, initFetchData} = useTableQuery({
<view class="!flex flex-col gap-[20rpx]">
<view class="bg-[var(--primary-color)] p-[32rpx] rounded-[12rpx] !flex items-center">
<view class="!flex-grow text-[#fff]">
<view class="test-36r font-bold">246.23</view>
<view class="test-36r font-bold">{{ vo?.month_money.toFixed(2) }}</view>
<view class="test-24r">该月提现收益</view>
</view>
<view class="!flex-grow text-[#fff]">
<view class="test-36r font-bold">246.23</view>
<view class="test-24r">该月提现收益</view>
<view class="test-36r font-bold">{{ vo?.all_money.toFixed(2) }}</view>
<view class="test-24r">累计提现收益</view>
</view>
<view class="flex-shrink-0">
<x-date-time v-model:model-value="po.datetime" fields="month">
<x-date-time v-model:model-value="po.time" fields="month" type="3" @success="initFetchData">
<view
class="rounded-full bg-[#E8F3FF] text-[var(--primary-color)] px-[32rpx] py-[8rpx] !flex items-center gap-[14rpx]">
{{ po.datetime }}
{{ po.time }}
<image class="!w-[18rpx]" mode="widthFix" :src="dropDown"></image>
</view>
</x-date-time>
</view>
</view>
<view class="p-[20rpx] bg-[#fff] rounded-[8rpx] card" v-for="v in vo.rows">
<view class="p-[20rpx] bg-[#fff] rounded-[8rpx] card" v-for="v in vo.rows" :key="v.id">
<view class="!flex">
<image class="!size-[80rpx]" mode="aspectFill" :src="ZFBICON"></image>
<image class="!size-[80rpx]" mode="aspectFill" :src="ZFENUM[v.type]"></image>
<view class="!ml-[60rpx] !flex gap-[60rpx]">
<view>
<view class="test-32r font-bold">100.00</view>
<view class="test-32r font-bold">{{ v.money.toFixed(2) }}</view>
<view class="text-[#86909C] test-24r">提现金额</view>
</view>
<view>
<view class="test-32r font-bold">94.00</view>
<view class="test-32r font-bold">{{ v.real_money.toFixed(2) }}</view>
<view class="text-[#86909C] test-24r">到账金额</view>
</view>
</view>
<view class="!ml-auto">
<x-tag>正在提现</x-tag>
<x-tag :type="TXJLENUM[v.status]">{{ v.status_text }}</x-tag>
</view>
</view>
<view
class="!mt-[20rpx] py-[10rpx] px-[20rpx] test-24r !flex justify-between items-center bg-[#F2F3F5] rounded-[8rpx]">
<view>提现时间2024-08-06 12:22</view>
<view>手续费6%</view>
<view>提现时间{{ dayjs(v.createtime).format('YYYY-MM-DD HH:mm') }}</view>
<view>手续费{{ v.ratio }}%</view>
</view>
</view>

View File

@@ -0,0 +1,11 @@
import {defineStore} from "pinia";
import {reactive} from "vue";
export const useSystemStore = defineStore('SystemStore', () => {
const accountManagementPo = reactive({
pid: null,
});
return {
accountManagementPo,
}
});

View File

@@ -20,11 +20,17 @@ export const useUserStore = defineStore('UserStore', () => {
Object.assign(userInfo, data);
}
const setToken = (value) => {
isLogin.value = true;
token.value = value;
}
return {
isLogin,
userInfo,
token,
logout,
setToken,
getUserInfo,
}
}, {

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
src/static/icons/dd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 B

View File

@@ -4,7 +4,19 @@ import {showToast} from "./uils.js";
import AESCrypto from "./AESCrypto.js";
import {useUserStore} from "../pinia/UserStore/index.js";
export const BASEURL = import.meta.env.MODE === 'development' ? '/baseApi/api' : import.meta.env.VITE_API_URL;
let BASEURL = null;
// #ifdef MP-WEIXIN
BASEURL = import.meta.env.VITE_API_URL;
// #endif
// #ifndef MP-WEIXIN
BASEURL = import.meta.env.MODE === 'development' ?
'/baseApi/api' :
import.meta.env.VITE_API_URL;
// #endif
export {BASEURL};
const request = axios.create({
baseURL: BASEURL,
@@ -16,6 +28,7 @@ request.interceptors.request.use(
(config) => {
const {token} = useUserStore();
console.log('看看token在不在', token)
// 如果 token 存在,则将其添加到请求头中
if (token) {
config.headers['Access-Token'] = token;

View File

@@ -114,7 +114,8 @@ export const download = (urls) => {
}
})
},
fail: () => {
fail: (err) => {
console.log(err);
reject(false);
}
})
@@ -131,6 +132,11 @@ export const numberToCharacter = (number) => {
return ['一', '二', '三', '四', '五'][number];
}
export const toWXMiniApp = (id) => {
const {token} = useUserStore();
window.open(`weixin://dl/business/?appid=${import.meta.env.VITE_APP_ID}&path=pages/index/index&env_version=${import.meta.env.VITE_APP_VERSION}&query=${encodeURIComponent(`id=${id}&token=${token}`)}`);
}
export const uploadFile = ({count}) => {
const UserStore = useUserStore();
return new Promise((resolve, reject) => {

View File

@@ -4,11 +4,17 @@ import {UnifiedViteWeappTailwindcssPlugin} from 'weapp-tailwindcss/vite';
import tailwindcss from '@tailwindcss/postcss'
export default defineConfig({
plugins: [uni.default({
plugins: [
uni.default({
script: {
defineModel: true,
}
})], css: {
}),
UnifiedViteWeappTailwindcssPlugin({
rem2rpx: true,
})
],
css: {
postcss: {
plugins: [tailwindcss()]
},