This commit is contained in:
chenhao 2026-05-14 16:14:04 +08:00
parent f971e5053a
commit e48a3ffcac
35 changed files with 1604 additions and 914 deletions

BIN
public/img/allow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

BIN
public/img/allow_bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
public/img/certificate.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
public/img/check.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

BIN
public/img/co_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 962 B

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
public/img/cv_bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

BIN
public/img/down-one.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

BIN
public/img/ft_i1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
public/img/ft_i2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
public/img/ft_i3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 KiB

After

Width:  |  Height:  |  Size: 220 KiB

BIN
public/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
public/img/merchant_bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
public/img/paycode.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
public/img/point_bg.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 941 B

View File

@ -49,7 +49,8 @@
</van-cell> </van-cell>
<van-cell size="small"> <van-cell size="small">
<template #title> <template #title>
<van-button round type="primary" size="large" native-type="save" :loading="isSaving">保存</van-button> <van-button round type="primary" color="#ca2904" size="large" native-type="save"
:loading="isSaving">保存</van-button>
</template> </template>
</van-cell> </van-cell>
</van-cell-group> </van-cell-group>
@ -61,7 +62,7 @@
<van-cascader v-model="region" title="请选择地区" :options="options" @finish="onFinish" @close="showRegion = false" /> <van-cascader v-model="region" title="请选择地区" :options="options" @finish="onFinish" @close="showRegion = false" />
</van-popup> </van-popup>
<van-action-bar> <van-action-bar>
<van-action-bar-button type="primary" text="新增地址" @click="beforeAdd()" /> <van-action-bar-button color="#ca2904" type="primary" text="新增地址" @click="beforeAdd()" />
</van-action-bar> </van-action-bar>
</van-action-sheet> </van-action-sheet>
</template> </template>
@ -174,6 +175,10 @@ export default {
overflow-y: auto; overflow-y: auto;
} }
.van-switch--on {
background: #ca2904;
}
.address-item { .address-item {
padding: 1.067vw 0; padding: 1.067vw 0;
} }

View File

@ -2,7 +2,7 @@
<van-popup v-model:show="visible" position="right" :style="{ width: '60%', height: '100%' }"> <van-popup v-model:show="visible" position="right" :style="{ width: '60%', height: '100%' }">
<div class="manager_container"> <div class="manager_container">
<div class="manager_dbox"> <div class="manager_dbox">
<div @click="goInfo"> <div @click="navigateAndClose('My')">
<img src="/img/my_u1.png" alt=""> <img src="/img/my_u1.png" alt="">
<span>个人管理中心</span> <span>个人管理中心</span>
<van-icon class="r" name="arrow"></van-icon> <van-icon class="r" name="arrow"></van-icon>
@ -10,13 +10,13 @@
<div @click="navigateAndClose('Merchant')"> <div @click="navigateAndClose('Merchant')">
<img src="/img/my_u2.png" alt=""> <img src="/img/my_u2.png" alt="">
<span>商家中心</span> <span>商家管理中心</span>
<van-icon class="r" name="arrow"></van-icon> <van-icon class="r" name="arrow"></van-icon>
</div> </div>
<div> <div>
<img src="/img/my_u3.png" alt=""> <img src="/img/my_u3.png" alt="">
<span>运营中心</span> <span>运营管理中心</span>
<van-icon class="r" name="arrow"></van-icon> <van-icon class="r" name="arrow"></van-icon>
</div> </div>
</div> </div>
@ -41,37 +41,11 @@
</div> </div>
</div> </div>
<button @click="visible = false"> <button @click="loginout">
返回 退出登录
</button> </button>
</div> </div>
</van-popup> </van-popup>
<!-- 个人管理中心弹窗 -->
<van-action-sheet v-model:show="showInfo" title="个人信息">
<van-form @submit="save">
<van-cell-group inset>
<van-field name="uploader" label="头像" required>
<template #input>
<van-uploader v-model="tempData.AvatarUploader" :after-read="upload" :max-count="1" upload-text="头像" />
</template>
</van-field>
<van-field v-model="tempData.nickname" label="昵称" placeholder="请输入昵称"
:rules="[{ required: true, message: '请填写昵称' }]" clearable required />
<van-field v-model="tempData.cellphone" label="手机号" readonly>
<template #button>
更改联系平台
</template>
</van-field>
<van-cell>
<template #title>
<van-button style="width: 100%" color="#ea3e23" round type="primary" native-type="save"
:loading="saving">保存</van-button>
</template>
</van-cell>
</van-cell-group>
</van-form>
</van-action-sheet>
</template> </template>
<script> <script>
@ -108,6 +82,17 @@ export default {
this.$navigate(route) this.$navigate(route)
}) })
}, },
loginout() {
this.$showConfirmDialog({
title: "确认退出?",
}).then(() => {
this.$ls.remove('token');
location.replace('#/Login');
setTimeout(() => {
location.reload();
}, 100);
}).catch(() => { });
},
open() { open() {
this.visible = true this.visible = true
}, },
@ -119,52 +104,6 @@ export default {
this.loadUserInfo() this.loadUserInfo()
this.showInfo = true this.showInfo = true
}, },
loadUserInfo() {
this.$get('/v1/client/DUsersClient').then(data => {
this.tempData = {}
Object.assign(this.tempData, data.data)
this.tempData.AvatarUploader = [{ url: this.$file(data.data.userimg), isImage: true }]
})
},
upload(file) {
this.tempData.userimg = file.file
},
save() {
if (this.tempData.userimg instanceof File) {
const fd = new FormData()
fd.append('file', this.tempData.userimg)
fetch(`${import.meta.env.VITE_API_URL}/v1/client/DUsersClient/userimg`, {
method: 'POST',
headers: { 'Authorization': `Bearer ${localStorage.getItem('token')}` },
body: fd,
}).then(res => res.json()).then(res => {
if (res.status !== 200) throw new Error(res.errmsg)
this.tempData.userimg = res.data
}).then(() => {
return this.$put('/v1/client/DUsersClient', {
nickname: this.tempData.nickname,
cellphone: this.tempData.cellphone,
})
}).then(() => {
this.$showSuccessToast('保存成功')
this.showInfo = false
window.location.reload()
}).catch(err => {
this.$showFailToast(err.errmsg || err.message || '保存失败')
})
} else {
this.$put('/v1/client/DUsersClient', {
nickname: this.tempData.nickname,
cellphone: this.tempData.cellphone,
}).then(() => {
this.$showSuccessToast('保存成功')
this.showInfo = false
window.location.reload()
}).catch(err => {
this.$showFailToast(err.errmsg || '保存失败')
})
}
},
} }
} }
</script> </script>

View File

@ -62,20 +62,36 @@ const routes = [
title: '余额', title: '余额',
} }
}, },
{
path: '/Voucher',
name: 'Voucher',
component: () => import('./views/User/Voucher.vue'),
meta: {
title: '消费券',
}
},
{ {
path: '/CV', path: '/CV',
name: 'CV', name: 'CV',
component: () => import('./views/User/CV.vue'), component: () => import('./views/User/CV.vue'),
meta: { meta: {
title: '贡献值', title: '会员卡额度',
}
},
{
path: '/Point',
name: 'Point',
component: () => import('./views/User/Point.vue'),
meta: {
title: '积分',
}
},
{
path: '/Allow',
name: 'Allow',
component: () => import('./views/User/Allow.vue'),
meta: {
title: '业绩统计',
}
},
{
path: '/Certificate',
name: 'Certificate',
component: () => import('./views/User/Certificate.vue'),
meta: {
title: '礼品券',
} }
}, },
{ {

View File

@ -2510,9 +2510,12 @@
.b_l_w; .b_l_w;
.f5; .f5;
padding: 4vw 3.33vw; padding: 4vw 3.33vw;
background: url(/img/merchant_bg.jpg) no-repeat;
background-size: 100% auto;
.shopinfo { .shopinfo {
.box; .box;
position: relative;
.tx { .tx {
width: 16vw; width: 16vw;
@ -2539,62 +2542,88 @@
} }
.service-box { .service-box {
height: 6.4vw; margin-left: auto;
background-color: #2db57c; display: flex;
border-radius: 3.2vw; flex-wrap: nowrap;
.bs; align-items: center;
.box; position: absolute;
.box-align-center; color: #fff;
font-size: 3.47vw;
font-weight: bold;
right: -4vw;
top: 8vw;
height: 6.67vw;
background-color: #fc6a39;
border-radius: 3.33vw 0vw 0vw 3.33vw;
padding: 0 2.8vw;
white-space: nowrap; white-space: nowrap;
padding: 0 1.33vw;
.icon {
height: 4.67vw;
margin-right: 1.2vw;
}
} }
} }
.wallet { .wallet {
padding: 4.133vw 2.667vw; padding: 4.133vw 2.667vw;
background-color: #3dcd91; background-color: #ffffff;
border-radius: 2.667vw; border-radius: 1.6vw;
position: relative; position: relative;
margin-top: 4vw; margin-top: 4vw;
&::after { .tit {
content: ''; span {
width: 12.67vw; color: #1b1b1b;
height: 14.27vw; }
position: absolute;
top: 0; .line {
right: 3.73vw; .box;
z-index: 0; .box-align-center;
background: url(/img/money.png)no-repeat; margin-top: 4.53vw;
background-size: 100% 100%;
>div {
margin-left: 6.67vw;
.box;
.box-align-center;
height: 6.13vw;
padding: 0 1.47vw;
border-radius: 1.07vw;
border: solid 0.13vw #222222;
color: #1b1b1b;
p {
font-weight: bold;
}
}
b {
font-size: 6.67vw;
color: #1b1b1b;
}
}
} }
b { b {
font-size: 4vw; font-size: 4vw;
.bs;
} }
.cc { .cc {
.box; .box;
position: relative; position: relative;
z-index: 1; z-index: 1;
background-color: #ffffff; background-color: #f5f5f5;
border-radius: 1.333vw; border-radius: 1.6vw;
padding: 5.667vw 3.33vw; padding: 5.667vw 3.33vw;
margin-top: 3.33vw; margin-top: 3.33vw;
>div { >div {
.box; .box;
.box-tb; .box-tb;
.box-align-center;
width: 50%; width: 50%;
color: #222222; color: #222222;
} }
>div:first-child {
border-right: 1px solid #8a8a8a80;
}
span { span {
display: block; display: block;
margin-bottom: 2vw; margin-bottom: 2vw;
@ -2607,6 +2636,53 @@
} }
} }
.fastTo {
.box;
.box-align-center;
.box-pack-between;
margin-top: 4vw;
>div {
.box;
width: 29.33vw;
height: 18.67vw;
border-radius: 1.6vw;
position: relative;
padding: 4vw 2.2vw;
font-size: 3.73vw;
font-weight: bold;
line-height: 4.44vw;
color: #1b1b1b;
img {
width: 11.6vw;
position: absolute;
bottom: 0;
right: 0;
}
}
.ft1 {
background-color: #f5f8ff;
border: solid 0.27vw #9ab0f9;
}
.ft2 {
background-color: #fff8f6;
border: solid 0.27vw #f9b49d;
}
.ft3 {
background-color: #fff8ef;
border: solid 0.27vw #f6c88a;
img {
bottom: 1.2vw;
right: 1.2vw;
}
}
}
.block { .block {
.box; .box;
.box-pack-between; .box-pack-between;
@ -4113,209 +4189,141 @@
} }
} }
.voucher { .balance {
background: url(/img/voucher-bg.png) no-repeat;
background-size: 100% auto;
padding: 6.667vw 3.333vw;
.b_l_w;
.f5;
>div { .top {
.b_l_w; .bs;
background-color: #374c6d;
padding: 8vw 4vw;
.line {
.box;
.box-align-center;
margin-bottom: 5vw;
.num {
font-size: 8vw;
color: #ffffff;
}
} }
.t {
background-size: 100% 100% !important;
border-radius: 4vw;
position: relative;
margin-bottom: 4vw;
height: 49.2vw;
.tit { .tit {
.box; .box;
.box-align-center; .box-align-center;
font-size: 4.8vw;
color: #ffffff;
.van-icon {
margin-left: 2.4vw;
}
}
.co_box {
.r;
.box;
.box-align-center;
span { span {
font-size: 4vw; margin: 0 1.2vw;
.box;
.box-align-center;
i {
font-size: 4vw;
margin: .5vw 0 0 1vw;
}
}
}
.c {
.box;
.box-align-center;
.box-wrap;
font-size: 3.2vw;
position: relative;
background: url(/img/voucher-c.png) no-repeat;
background-size: 100% auto;
height: 50vw;
padding: 5vw 5.467vw 0;
padding-bottom: 4.53vw;
>div {
.b_l_w;
}
.number {
font-size: 8vw;
.box;
.box-pack-between;
.box-align-center;
margin: 4vw 0 0;
color: #d5a837;
.a {
width: 26.667vw;
height: 8vw;
line-height: 8vw;
border-radius: 4vw;
.center;
background-color: #f3c947;
font-size: 4.267vw;
color: #141414;
margin-left: auto;
}
.van-button {
width: 24vw;
.b;
font-size: 3.733vw;
margin-left: 3vw;
}
}
.total {
margin: 4vw 0 0;
line-height: 8vw;
.box;
.box-pack-around;
.center;
font-size: 3.333vw;
color: #959595;
p {
font-size: 4vw;
color: #252525;
.b;
}
}
}
}
.times {
.box;
.box-align-center;
height: 12.8vw;
margin: 2vw 0 4vw;
background-color: #ffffff;
box-shadow: 0vw 0.67vw 1.11vw 0.09vw rgba(219, 255, 242, 0.08);
border-radius: 2.67vw;
position: relative;
z-index: 2;
&::after {
content: '';
width: 86.4vw;
height: 10.4vw;
background-color: #ffffff;
opacity: 0.5;
border-radius: 2.67vw;
position: absolute;
bottom: -2vw;
left: 2.4vw;
z-index: -1;
} }
img { img {
width: 2.4vw; height: 4.27vw;
height: 1.333vw; }
}
button {
padding: 0 4vw;
color: #333;
height: 8vw;
background-color: #ffffff;
border-radius: 4vw;
box-shadow: none;
}
.pn {
.box;
.box-align-center;
color: #b6c7e1;
}
}
.botom {
padding: 5.87vw 4vw;
background-color: #ffffff;
border-radius: 5.33vw 5.33vw 0vw 0vw;
margin-top: -10vw;
.tabs {
margin-top: 4vw;
.van-tab--card:last-child {
margin: 0;
}
.van-tab--card {
border-right: none;
border-radius: 4vw;
background-color: #f6f6f6;
margin-right: 3vw;
gap: 3vw;
width: max-content;
font-size: 3.2vw;
}
.van-tabs__nav--card {
border: none;
margin: 0;
}
}
}
.date_box {
.box;
.box-align-center;
.date {
.box;
.box-center-center;
height: 8vw;
background-color: #f6f6f6;
border-radius: 4vw;
padding: 0 2.8vw;
img {
height: 1.2vw;
margin-left: 1.2vw; margin-left: 1.2vw;
} }
._t {
.box;
.box-align-center;
height: 12.667vw;
p {
width: 1.333vw;
height: 4vw;
border-radius: 0.667vw;
margin-right: 1.867vw;
} }
b { .count {
font-size: 3.867vw;
}
a {
.r; .r;
.b;
.box; .box;
.box-align-center; gap: 12vw;
} line-height: 4.67vw;
}
._m { >div {
.box;
.box-align-center;
.box-pack-between;
width: 100%;
padding-right: 3.33vw;
.l {
.box;
.box-align-center;
.box-pack-center;
width: 28vw;
height: 8vw;
.b_k;
border-radius: 4vw;
font-size: 3.33vw;
color: #474747;
span {
.box; .box;
.box-tb; .box-tb;
.box-align-center; .box-align-center;
} }
} }
.right {
.box;
.center;
p {
margin-left: 10vw;
line-height: 4.5vw;
}
}
} }
} ._m_ {
margin-top: 4vw;
._m_list {
background-color: #ffffff;
border-radius: 2.67vw;
.list { .list {
.b_l_w; .b_l_w;
.b_k; .b_k;
// margin-bottom: 4vw; margin-bottom: 4vw;
border-bottom: 1px solid #f5f5f580;
padding: 3.333vw; padding: 3.333vw;
.box; .box;
.box-tb; .box-tb;
background-color: #f6f6f6;
border-radius: 1.6vw;
border-radius: 2vw; border-radius: 2vw;
border-bottom: 1px solid #f5f5f580;
>div { >div {
.b_l_w; .b_l_w;
@ -4449,93 +4457,204 @@
} }
.cv { .cv {
.b_l_w;
.f5; .f5;
padding: 8vw 4vw;
>div { .card {
.b_l_w; .box;
.box-tb;
.box-pack-between;
background-color: #fbf0f0;
border-radius: 2.67vw;
overflow: hidden;
border: solid 1.33vw #ffffff;
padding: 5.07vw 2.67vw;
// height: 34.67vw;
width: 100%;
position: relative;
z-index: 1;
&::after {
content: '';
right: 0;
bottom: 0;
z-index: -1;
position: absolute;
width: 26vw;
height: 23.33vw;
background: url(/img/cv-i1.png) no-repeat;
background-size: 100% auto;
} }
.top { .t {
background: url(/img/cv-t.png) no-repeat;
background-size: 100% auto;
padding: 9.07vw 6.67vw;
height: 58.13vw;
.bs;
.line {
.box; .box;
.box-align-center; .box-align-center;
.title { .u_info {
font-size: 4.67vw; margin-left: 3.6vw;
font-weight: bold; height: 10.4vw;
}
.explain {
.r;
.box; .box;
.box-center-center; .box-tb;
padding: 0 1.2vw; .box-pack-around;
height: 5.33vw;
border-radius: 2.67vw;
border: solid 0.27vw #ffffff;
img { b {
width: 3.33vw; font-size: 3.47vw;
height: 3.33vw; color: #222;
margin-right: 1.2vw; }
span {
color: #999999;
} }
} }
.record {
color: #841e36;
}
}
.db {
.box;
.box-align-center;
padding-left: 12.4vw;
margin-top: 5.2vw;
.left {
.box;
.box-tb;
.box-align-start;
span {
color: #999999;
} }
b { b {
margin-top: 1.73vw;
display: block; display: block;
font-size: 8.67vw; font-size: 4.8vw;
margin-top: 10vw; line-height: 3.2vw;
color: #222222;
} }
} }
.container { button {
background: #f5f5f5; .r;
padding: 0 3.33vw height: 6.67vw;
border-radius: 3.33vw;
border: solid 0.27vw #841e36;
padding: 0 2.4vw;
background: transparent;
color: #841e36;
}
}
} }
.inf_box { .list_box {
background-color: #ffffff;
border-radius: 2.67vw 2.67vw 1.07vw 1.07vw;
margin-top: 4vw;
padding: 6vw 2.67vw;
height: 100%;
.date_box {
.box;
.box-align-center;
.date {
.box;
.box-center-center;
height: 8vw;
background-color: #fbf0f0;
border-radius: 4vw;
padding: 0 2.8vw;
color: #841e36;
img {
height: 1.2vw;
margin-left: 1.2vw;
}
}
.count {
.r;
.box;
gap: 12vw;
line-height: 4.67vw;
>div {
.box; .box;
.box-tb; .box-tb;
padding: 3.73vw 3.07vw; .box-align-center;
background-color: #ffffff; }
border-radius: 2.67vw; }
margin-top: -6.67vw;
.title {
font-size: 4vw;
font-weight: bold;
color: #000000;
margin-bottom: 4vw;
} }
.list { .list {
margin-top: 4vw;
>div:last-child { .item {
border: none; .box;
.box-tb;
padding: 3.07vw 2.67vw;
background-color: #f6f6f6;
border-radius: 1.6vw;
margin-bottom: 4vw;
span {
font-size: 3.2vw;
font-weight: normal;
font-stretch: normal;
line-height: 4.67vw;
letter-spacing: 0vw;
color: #999999;
} }
>div { .t {
.box; .box;
.box-align-center; .box-align-center;
padding: 3.33vw 1.2vw; margin-bottom: 1.2vw;
border-bottom: 1px solid #f5f5f580;
img { span {
width: 4.27vw; .bs;
margin-right: 2.53vw;
} }
b { .tit {
.r; font-size: 3.47vw;
color: #333333;
} }
.in {
.box;
.box-center-center;
.bs;
height: 4.8vw;
background-color: #269f3d;
border-radius: 0.53vw;
padding: 0 2.4vw;
}
.out {
.box;
.box-center-center;
.bs;
height: 4.8vw;
background-color: #d13c25;
border-radius: 0.53vw;
padding: 0 2.4vw;
}
}
}
}
}
}
.point {
.top {
background: url(/img/point_bg.jpg) no-repeat;
background-size: 100% auto;
.line {
.pn {
color: #e8b5b6;
} }
} }
} }
@ -4554,20 +4673,25 @@
.count { .count {
.box; .box;
.box-tb; .box-tb;
background-image: linear-gradient(0deg, background-color: #d1b792;
#156e3f 0%,
#52c087 100%);
border-radius: 2vw; border-radius: 2vw;
padding: 3.33vw; padding: 3.33vw;
.num {
font-size: 6.67vw;
line-height: 6.4vw;
color: #222222;
}
.top { .top {
.box; .box;
.box-align-center; .box-align-center;
color: #222222;
.left { .left {
.box; .box;
.box-tb; // .box-tb;
.bs; // .bs;
b { b {
font-size: 3.73vw; font-size: 3.73vw;
@ -4586,9 +4710,10 @@
height: 8vw; height: 8vw;
line-height: 8vw; line-height: 8vw;
.b_k; .b_k;
.bs;
background-color: #1b1b1b;
border-radius: 4vw; border-radius: 4vw;
padding: 0 3.33vw; padding: 0 3.33vw;
color: #2c8d5a;
font-size: 4vw; font-size: 4vw;
img { img {
@ -4654,10 +4779,12 @@
.user_box { .user_box {
.box; .box;
.box-align-center; .box-align-center;
width: 100%;
margin-bottom: 4vw; margin-bottom: 4vw;
background-color: #ffffff; background-color: #ffffff;
border-radius: 2vw; border-radius: 2vw;
padding: 3.33vw; padding: 3.33vw;
padding-bottom: 0;
.icon { .icon {
width: 12vw; width: 12vw;
@ -4669,11 +4796,13 @@
.info { .info {
.box; .box;
.box-tb; .box-tb;
width: 100%;
>div { >div {
.box; .box;
.box-align-center; .box-align-center;
margin-bottom: 2.53vw; margin-bottom: 3.33vw;
width: 100%;
b { b {
font-size: 4vw; font-size: 4vw;
@ -4713,3 +4842,137 @@
} }
} }
} }
.allow {
.top {
background: url(/img/allow_bg.jpg);
background-size: 100% auto;
// height: 35vw;
padding: 12vw 4vw;
.tit {
.box;
.box-align-center;
font-size: 4.8vw;
color: #222222;
span {
display: block;
margin-right: 1.2vw;
}
}
b {
display: block;
font-size: 8vw;
color: #222222;
margin-top: 5.47vw;
}
}
.content {
background-color: #ffffff;
border-radius: 5.33vw 5.33vw 0vw 0vw;
margin-top: -4vw;
padding: 4vw;
.t {
font-size: 4vw;
font-weight: bold;
color: #333333;
}
.list {
.box;
.box-tb;
margin-top: 3.33vw;
.item {
.box;
.box-align-center;
// height: 10vw;
padding: 4vw 0;
border-bottom: 1px solid #f5f5f580;
img {
width: 4.53vw;
height: 4.27vw;
margin-right: 4vw;
}
span {
font-size: 3.47vw;
color: #333333;
}
}
}
}
}
.certificate {
.f5;
.van-tabs__line {
bottom: 5.5vw;
}
.list {
margin-top: 4vw;
padding: 0 4vw;
.item {
.box;
.box-align-center;
margin-bottom: 4vw;
img {
width: 26.67vw;
height: 26.67vw;
}
.info {
.box;
.box-align-center;
height: 26.67vw;
background-color: #ffffff;
border-radius: 1.6vw;
width: 100%;
padding: 5.2vw 0;
position: relative;
>div {
margin-left: 5.2vw;
b {
font-size: 4.8vw;
color: #010101;
}
p {
color: #333333;
margin-top: 5.2vw;
}
}
img {
width: 11.6vw;
height: 10.27vw;
position: absolute;
right: 2.4vw;
}
button {
position: absolute;
right: 2.4vw;
width: 18.67vw;
height: 6.67vw;
background-color: #ea3e23;
border-radius: 1.6vw;
border: none;
.bs;
}
}
}
}
}

View File

@ -1098,8 +1098,11 @@ img {
} }
button { button {
position: fixed;
bottom: 4vw;
border: none; border: none;
width: 100%; width: 86%;
.bs; .bs;
font-size: 4.53vw; font-size: 4.53vw;
height: 10.67vw; height: 10.67vw;
@ -1375,6 +1378,7 @@ img {
.box-pack-between; .box-pack-between;
font-size: 3.47vw; font-size: 3.47vw;
color: #303030; color: #303030;
width: 100%;
b { b {
.text-hide(1); .text-hide(1);
@ -2163,6 +2167,7 @@ img {
.box-align-center; .box-align-center;
.box-pack-between; .box-pack-between;
margin-top: 4vw; margin-top: 4vw;
white-space: nowrap;
>div { >div {
.box; .box;
@ -2304,20 +2309,29 @@ img {
margin-bottom: 3.2vw; margin-bottom: 3.2vw;
} }
.active {
background-color: #ca2904;
.bs;
}
.inactive {
border: 1px solid #ca2904;
color: #000;
}
.spec_de { .spec_de {
height: 8vw; height: 8vw;
background-color: #ca2904;
border-radius: 1.07vw; border-radius: 1.07vw;
padding: 0 4vw; padding: 0 4vw;
width: max-content; width: max-content;
margin-right: 2.4vw; margin-right: 2.4vw;
.box; .box;
.box-center-center; .box-center-center;
.bs;
} }
.buynums { .buynums {
.box; display: flex;
width: 100%;
.title { .title {
margin-bottom: 0; margin-bottom: 0;

View File

@ -324,6 +324,15 @@ export default {
}, },
mounted() { mounted() {
this.init() this.init()
//
const params = new URLSearchParams(location.hash.split('?')[1] || '');
const inviteCode = params.get('invite');
if (inviteCode) {
this.formData.Recommend = inviteCode;
localStorage.setItem('recommend', inviteCode);
//
this.isReg = true;
}
}, },
beforeUnmount() { beforeUnmount() {
if (this.countdown.timer) { if (this.countdown.timer) {

View File

@ -16,8 +16,6 @@
</div> </div>
</div> </div>
<div class="price_box"> <div class="price_box">
<div class="price"> <div class="price">
¥{{ data.saleprice?.toFixed(2) }} ¥{{ data.saleprice?.toFixed(2) }}
@ -60,9 +58,9 @@
</div> </div>
</div> </div>
<div class="spec_box"> <div class="spec_box" @click="showSpecs = true">
<img src="/img/spec.png" alt=""> <img src="/img/spec.png" alt="">
<span>请选择规格分类</span> <span>{{ selectedSku }}</span>
<van-icon class="r" name="arrow"></van-icon> <van-icon class="r" name="arrow"></van-icon>
</div> </div>
@ -71,17 +69,15 @@
<img src="/img/pro.png" alt=""> <img src="/img/pro.png" alt="">
<span>产品详情</span> <span>产品详情</span>
</div> </div>
<div class="vhtml"> <div class="vhtml" v-html="data.contents"></div>
</div>
</div> </div>
</div> </div>
<van-action-bar safe-area-inset-bottom placeholder> <van-action-bar safe-area-inset-bottom placeholder>
<van-action-bar-icon icon="/img/vb-home.png" text="首页" @click="$navigate('Home')" /> <van-action-bar-icon icon="/img/vb-home.png" text="首页" @click="$navigate('Home')" />
<van-action-bar-icon icon="/img/vb-service.png" text="客服" @click="$navigate('Service')" /> <van-action-bar-icon icon="/img/vb-service.png" text="客服" @click="$goService()" />
<van-action-bar-icon icon="/img/vb-share.png" text="分享" @click="showShare = true" /> <van-action-bar-icon icon="/img/vb-share.png" text="分享" @click="beforeShare" />
<van-action-bar-button type="danger" text="立即购买" @click="showSpecs = true" /> <van-action-bar-button color="#ca2904" type="danger" text="立即购买" @click="showSpecs = true" />
</van-action-bar> </van-action-bar>
<van-share-sheet v-model:show="showShare" title="立即分享给好友" :options="options" @select="onSelect" /> <van-share-sheet v-model:show="showShare" title="立即分享给好友" :options="options" @select="onSelect" />
@ -89,40 +85,40 @@
<van-popup v-model:show="showSpecs" position="bottom" closeable round> <van-popup v-model:show="showSpecs" position="bottom" closeable round>
<div class="showspec"> <div class="showspec">
<div class="goods"> <div class="goods">
<img :src="$file(data.img)" alt=""> <img :src="$file(tempSku.img || data.img)" alt="">
<div> <div>
<div class="s_price">¥</div> <div class="s_price">¥{{ (tempSku.saleprice * tempSku.Qty).toFixed(2) }}</div>
<div class="s_stock">剩余</div> <div class="s_stock">剩余{{ tempSku.saleleft }}</div>
<div class="s_spec">已选</div> <div class="s_spec">已选{{ tempSku.skuname }}</div>
</div> </div>
</div> </div>
<div class="spec_box"> <div class="spec_box" v-for="spec in specSelect">
<span class="title"> <span class="title">
基本规格 {{ spec.name }}
</span> </span>
<div class="speccc"> <div class="speccc">
<div class="spec_de"> <div v-for="child in spec.children" class="spec_de"
:class="selectedSpecs[spec.name] === child.name ? 'active' : 'inactive'"
@click="selectSpec(spec.name, child.name)">
{{ child.name }}
</div> </div>
<div class="spec_de">
</div> </div>
</div> </div>
<div class="buynums"> <div class="buynums box">
<span class="title"> <span class="title">
购买数量 购买数量
</span> </span>
<van-stepper class="r" integer v-model="value" theme="round" button-size="22" disable-input /> <van-stepper class="r" integer v-model="tempSku.Qty" min="1" max="99" theme="round" button-size="22"
disable-input />
</div> </div>
</div>
<van-action-bar safe-area-inset-bottom placeholder> <van-action-bar safe-area-inset-bottom placeholder>
<van-action-bar-button color="#ca2904" type="danger" text="立即购买" @click="showSpecs = true" /> <van-action-bar-button color="#ca2904" type="danger" text="立即购买" @click="submit" />
</van-action-bar> </van-action-bar>
</div> </div>
</van-popup> </van-popup>
@ -133,19 +129,28 @@
</template> </template>
<script> <script>
import { html2canvas, canvasToDataURL } from '@/utils/html2image';
export default { export default {
name: 'GoodsDetail', name: 'GoodsDetail',
emits: ['updateShare'],
mounted() { mounted() {
this.init(); this.init();
}, },
data() { data() {
return { return {
data: {}, data: {},
showShare: false, specSelect: [],
specCombinations: [],
tempSku: {},
showSpecs: false, showSpecs: false,
selectedSku: '请选择规格分类',
selectedSpecs: {},
showShare: false,
options: [ options: [
{ name: '分享海报', icon: '/img/share.png' }, { name: '分享海报', icon: '/img/share.png' },
] ],
shareLink: location.origin
} }
}, },
methods: { methods: {
@ -156,9 +161,85 @@ export default {
this.specCombinations = this.data.specCombinations || []; this.specCombinations = this.data.specCombinations || [];
this.shareLink = `${location.origin}/GoodsDetail?id=${this.data.id}`; this.shareLink = `${location.origin}/GoodsDetail?id=${this.data.id}`;
this.$emit('updateShare', { title: this.data.name, imageUrl: this.data.img, link: this.shareLink }); this.$emit('updateShare', { title: this.data.name, imageUrl: this.data.img, link: this.shareLink });
// this.initDefaultSku(); this.initDefaultSku();
}); });
}, },
initDefaultSku() {
const mainSku = this.specCombinations.find(s => s.ismain) || this.specCombinations[0];
if (mainSku) {
this.tempSku = { ...mainSku, Qty: 1 };
this.selectedSku = "已选:" + mainSku.skuname;
// skuname
this.specSelect.forEach(spec => {
const child = spec.children?.find(c => mainSku.skuname.includes(c.name));
if (child) {
this.selectedSpecs[spec.name] = child.name;
}
});
}
},
selectSpec(specName, specValue) {
this.selectedSpecs[specName] = specValue;
this.refreshSku();
},
refreshSku() {
const specKeys = Object.keys(this.selectedSpecs);
if (specKeys.length === 0) return;
let matchedSku = this.specCombinations.find(combo => {
return specKeys.every(key => {
const spec = this.specSelect.find(s => s.name === key);
if (!spec) return false;
const specValue = this.selectedSpecs[key];
return combo.skuname === specValue;
});
});
if (matchedSku) {
this.tempSku = { ...matchedSku, Qty: this.tempSku.Qty || 1 };
this.selectedSku = "已选:" + matchedSku.skuname;
}
},
onSelect(option) {
this.showShare = false;
if (option.name === "分享海报") {
this.generateShareImg();
} else if (option.name == "复制链接") {
this.$copyText(location.href);
this.$showToast({ type: "success", message: "复制成功" });
} else if (option.name == "分享好友") {
this.showTip = true;
}
},
submit() {
if (this.tempSku.saleleft < 1) {
this.$showFailToast("该规格库存不足,无法购买");
return;
}
this.$navigate(`/TradeConfirm?id=${this.data.id}&buynums=${this.tempSku.Qty}`);
},
beforeShare() {
this.showShare = true;
},
async generateShareImg() {
var shareContent = document.querySelector('#bsCard');
if (!shareContent) return;
var width = shareContent.offsetWidth;
var height = shareContent.offsetHeight;
try {
var canvas = await html2canvas(shareContent, {
scale: 2,
width: width,
height: height,
useCORS: true,
allowTaint: true,
});
this.ShareImg = canvasToDataURL(canvas, "image/png", 1.0);
this.showShareImg = true;
} catch (e) {
console.error(e);
}
}
} }
} }
</script> </script>

View File

@ -8,41 +8,52 @@
<p>账号{{ data.MerchantPhone }}</p> <p>账号{{ data.MerchantPhone }}</p>
</div> </div>
<div class="service-box" @click="$navigate('Service')"> <div class="service-box" @click="$showManagerPopup()">
<img class="icon" src="/img/service-icon.png" alt=""> 管理中心
专属顾问 <van-icon name="arrow"></van-icon>
</div> </div>
</div> </div>
<div class="wallet"> <div class="wallet">
<b> <div class="tit">
我的钱包 <span @click="$navigate('MerchantIncome')"> 营业收入() <van-icon name="arrow"></van-icon>
</span>
<div class="line">
<b @click="$navigate('MerchantIncome')">
1020.00
</b> </b>
<div>
<span>提现中金额
</span>
<p>1000.00</p>
</div>
</div>
</div>
<div class="cc"> <div class="cc">
<div class="ll" @click="$navigate('MerchantIncome')"> <div class="ll" @click="$navigate('Balance')">
<span> <span>
当前营业收入<van-icon name="arrow"></van-icon> 可用余额<van-icon name="arrow"></van-icon>
</span> </span>
<b>{{ data.Income?.toFixed(2) }}</b> <b>{{ data.Income?.toFixed(2) }}</b>
</div> </div>
<div class="ll" @click="$navigate('Voucher?type=merchant')"> <div class="ll" @click="$navigate('CV')">
<span> <span>
消费券累计<van-icon name="arrow"></van-icon> 会员卡额度<van-icon name="arrow"></van-icon>
</span> </span>
<b>{{ data.Point?.toFixed(2) }}</b> <b>{{ data.Point?.toFixed(2) }}</b>
</div> </div>
</div> </div>
</div> </div>
<div class="block"> <!-- <div class="block">
<!-- <div class="d1" @click="$navigate('MerchantTrade')"> <div class="d1" @click="$navigate('MerchantTrade')">
<b>订单记录</b> <b>订单记录</b>
<p>查看订单记录</p> <p>查看订单记录</p>
<van-badge :content="expiring ? expiring : ''" :offset="[60, -40]"> <van-badge :content="expiring ? expiring : ''" :offset="[60, -40]">
<button>立即查看</button> <button>立即查看</button>
</van-badge> </van-badge>
<img src="/img/bbb1.png"> <img src="/img/bbb1.png">
</div> --> </div>
<div class="_r"> <div class="_r">
<div class="d2" @click="$navigate('MerchantTrade')"> <div class="d2" @click="$navigate('MerchantTrade')">
<b>订单记录</b> <b>订单记录</b>
@ -58,6 +69,23 @@
</div> </div>
</div> </div>
</div> -->
<div class="fastTo">
<div class="ft1" @click="showBottom = true">
<span>收款码</span>
<img src="/img/ft_i1.png" alt="">
</div>
<div class="ft2" @click="$navigate('MerchantTrade')">
<span>订单记录</span>
<img src="/img/ft_i2.png" alt="">
</div>
<div class="ft3">
<span>商家资料</span>
<img src="/img/ft_i3.png" alt="">
</div>
</div> </div>
<div class="countbox"> <div class="countbox">
@ -81,7 +109,7 @@
<div class="item"> <div class="item">
<span> <span>
今日抵扣积分 今日应收
</span> </span>
<b>{{ data.TodayDeduct?.toFixed(2) }}</b> <b>{{ data.TodayDeduct?.toFixed(2) }}</b>
<p>昨日<span>{{ data.YesterdayDeduct?.toFixed(2) }}</span></p> <p>昨日<span>{{ data.YesterdayDeduct?.toFixed(2) }}</span></p>
@ -97,36 +125,58 @@
<div class="item"> <div class="item">
<span> <span>
本月收入 今日惠利金额
</span> </span>
<b>{{ data.MonthIncome?.toFixed(2) }}</b> <b>{{ data.MonthIncome?.toFixed(2) }}</b>
<p>上月<span>{{ data.PrevMonthIncome?.toFixed(2) }}</span></p> <p>昨日<span>{{ data.PrevMonthIncome?.toFixed(2) }}</span></p>
</div> </div>
</div> </div>
</div> </div>
<button class="back" @click="$showManagerPopup()">
返回个人中心
</button>
</div> </div>
<van-action-sheet v-model:show="showBottom" title="收款码" @click-overlay="onCloseBottom" @opened="onOpenBottom">
<div class="paycode-wrap">
<div class="paycode-original" ref="paycodeOriginal" v-show="!paycodeImg">
<img src="/img/paycode.jpg" alt="" style="width: 100%; display: block;">
<div class="info">
<img :src="$file(data.MerchantAvatar)" alt="" style="border-radius: 50%;">
</div>
<div class="name">
<span>{{ data.MerchantName }}</span>
</div>
<div class="code">
<vue-qr v-if="!loading" :margin="0" :text="link" backgroundColor="rgb(255,255,255)"
colorLight="rgb(255,255,255)"></vue-qr>
</div>
</div>
<div class="paycode-result" v-if="paycodeImg">
<img :src="paycodeImg" style="width: 100%;" alt="收款码">
</div>
</div>
</van-action-sheet>
</BasePage> </BasePage>
</template> </template>
<script> <script>
import { htmlToDataURL } from '@/utils/html2image'
export default { export default {
name: 'Merchant', name: 'Merchant',
mounted() { mounted() {
this.init();
}, },
data() { data() {
return { return {
showInfo: false, showInfo: false,
showBottom: false,
paycodeImg: '',
isCapturing: false,
link: '',
data: { data: {
id: 'merchant_001', id: 'merchant_001',
MerchantAvatar: '/img/co-1.png', MerchantAvatar: '',
MerchantName: '泰古润直营店', MerchantName: '泰古润直营店',
MerchantPhone: '13800138000', MerchantPhone: '13800138000',
Income: 12868.50, Income: 12868.50,
@ -143,11 +193,137 @@ export default {
}, },
States: 0, States: 0,
expiring: 3, expiring: 3,
loading: false,
} }
}, },
methods: { methods: {
init() { onOpenBottom() {
this.paycodeImg = ''
this.$nextTick(() => {
const el = this.$refs.paycodeOriginal
if (!el) return
const scale = 2
const rect = el.getBoundingClientRect()
const w = rect.width * scale
const h = rect.height * scale
const elRect = el.getBoundingClientRect()
const canvas = document.createElement('canvas')
canvas.width = w
canvas.height = h
const ctx = canvas.getContext('2d')
//
const bg = new Image()
bg.src = el.querySelector('img').src
bg.onload = () => {
ctx.drawImage(bg, 0, 0, w, h)
const infoEl = el.querySelector('.info')
const codeEl = el.querySelector('.code')
//
const avatarEl = infoEl.querySelector('img')
htmlToDataURL(avatarEl, { scale: 2, useCORS: true, backgroundColor: 'transparent' }).then(avaCanvas => {
const avaImg = new Image()
avaImg.src = avaCanvas
avaImg.onload = () => {
const infoRect = infoEl.getBoundingClientRect()
const avaSize = infoRect.height * scale * 0.8
const avaX = (infoRect.left - elRect.left) * scale + avaSize * 0.1
const avaY = (infoRect.top - elRect.top) * scale + (infoRect.height * scale - avaSize) / 2
//
ctx.save()
ctx.beginPath()
ctx.arc(avaX + avaSize / 2, avaY + avaSize / 2, avaSize / 2, 0, Math.PI * 2)
ctx.clip()
ctx.drawImage(avaImg, avaX, avaY, avaSize, avaSize)
ctx.restore()
//
ctx.font = `${avaSize * 0.6}px 'PingFang SC'`
ctx.fillStyle = '#333'
ctx.textBaseline = 'middle'
ctx.fillText(this.data.MerchantName, avaX + avaSize + avaSize * 0.3, avaY + avaSize / 2)
//
htmlToDataURL(codeEl, { scale: 2, useCORS: true, backgroundColor: '#ffffff' }).then(codeCanvas => {
const qrImg = new Image()
qrImg.src = codeCanvas
qrImg.onload = () => {
const codeRect = codeEl.getBoundingClientRect()
ctx.drawImage(
qrImg,
(codeRect.left - elRect.left) * scale,
(codeRect.top - elRect.top) * scale,
codeRect.width * scale,
codeRect.height * scale
)
this.paycodeImg = canvas.toDataURL('image/png')
}
})
}
})
}
})
}, },
onCloseBottom() {
this.showBottom = false
this.paycodeImg = ''
},
},
}
</script>
<style lang="less">
.paycode-original {
position: relative;
width: 100%;
font-family: 'PingFang SC';
>img {
width: 100%;
display: block;
}
.info {
display: flex;
align-items: center;
position: absolute;
left: 30.67vw;
top: 32.27vw;
img {
width: 6.4vw;
height: 6.4vw;
border-radius: 50%;
}
}
.name {
position: absolute;
left: 39.33vw;
top: 33.47vw;
span {
font-size: 4vw;
color: #333;
}
}
.code {
position: absolute;
top: 42.4vw;
left: 23.33vw;
canvas,
img {
width: 53.33vw;
height: 53.33vw;
}
} }
} }
</script> </style>

View File

@ -4,7 +4,7 @@
<div class="xzdz" @click="$refs.ad_selector.showSelector()"> <div class="xzdz" @click="$refs.ad_selector.showSelector()">
<img src="/img/addr.png" alt=""> <img src="/img/addr.png" alt="">
<span v-if="address.ReceiveName"> <span style="color: #333;" v-if="address.ReceiveName">
<p> <p>
{{ address.ReceiveName }} {{ address.ReceiveName }}
{{ address.ReceivePhone }} {{ address.ReceivePhone }}
@ -142,18 +142,29 @@ export default {
}, },
methods: { methods: {
loadProduct() { loadProduct() {
this.$get(`/v1/client/EProsClient/${this.$route.query.id}`).then(res => { const id = this.$route.query.id;
const data = res.data;
const skuid = this.$route.query.skuid; const skuid = this.$route.query.skuid;
const sku = (data.specCombinations || []).find(s => s.skuid == skuid); this.$get(`/v1/client/EProsClient/${id}`).then(res => {
const data = res.data;
// SKU
let sku = null;
if (skuid && data.specCombinations) {
sku = data.specCombinations.find(s => String(s.skuid) === String(skuid));
}
if (!sku && data.specCombinations?.length) {
sku = data.specCombinations[0];
}
this.product = { this.product = {
...data, id: data.id,
skuid: sku?.skuid, name: data.name,
skuname: sku?.skuname,
saleprice: sku?.saleprice,
originalprice: sku?.originalprice,
img: sku?.img || data.img, img: sku?.img || data.img,
buynums: 1 saleprice: sku?.saleprice || data.saleprice,
originalprice: sku?.originalprice || data.originalprice,
skuid: sku?.skuid,
skuname: sku?.skuname || '默认规格',
buynums: parseInt(this.$route.query.buynums) || 1,
typename: data.typename || '商品',
expressprice: data.expressprice || 0
}; };
}); });
}, },

56
src/views/User/Allow.vue Normal file
View File

@ -0,0 +1,56 @@
<template>
<BasePage>
<div class="allow">
<div class="top">
<div class="tit">
<span>礼包业绩总累计</span>
<van-icon name="question-o" @click.stop="showTerm = true"></van-icon>
</div>
<b>4000.00</b>
</div>
<div class="content">
<div class="t">
业绩统计
</div>
<div class="list">
<div class="item">
<img src="/img/allow.png" alt="">
<span>
自己礼包消费业绩
</span>
<span class="r"></span>
</div>
<div class="item">
<img src="/img/allow.png" alt="">
<span>
网体礼包消费业绩
</span>
<span class="r"></span>
</div>
</div>
</div>
<van-action-sheet v-model:show="showTerm" safe-area-inset-bottom :title="`礼包业绩说明`" closeable
style="min-height: 50%; padding: 0px 10px 10px 10px">
<div class="w100 html" v-html="data.Term" />
</van-action-sheet>
</div>
</BasePage>
</template>
<script>
export default {
data() {
return {
showTerm: false,
data: {
}
}
}
}
</script>

View File

@ -1,6 +1,6 @@
<template> <template>
<BasePage> <BasePage>
<div class="asset asset-1"> <!-- <div class="asset asset-1">
<div class="t"> <div class="t">
<a @click.stop="$navigate('/CashoutRecord?Area=Balance')" class="a"> <a @click.stop="$navigate('/CashoutRecord?Area=Balance')" class="a">
<img src="/img/asset-i1.png" /> <img src="/img/asset-i1.png" />
@ -57,7 +57,7 @@
</div> </div>
</div> </div>
<!-- <van-tabs v-model:active="searchParams.RecordSource" class="balance-tabs" type="card" <van-tabs v-model:active="searchParams.RecordSource" class="balance-tabs" type="card"
background="transparent" color="#ff5e5e" title-inactive-color="#313131" title-active-color="#fff" background="transparent" color="#ff5e5e" title-inactive-color="#313131" title-active-color="#fff"
@click="changeTabs"> @click="changeTabs">
<van-tab title="全部" name=""></van-tab> <van-tab title="全部" name=""></van-tab>
@ -65,7 +65,166 @@
<van-tab title="分享补贴" name="direct"></van-tab> <van-tab title="分享补贴" name="direct"></van-tab>
<van-tab title="管理补贴" name="subsidy"></van-tab> <van-tab title="管理补贴" name="subsidy"></van-tab>
<van-tab title="销售分成" name="sale"></van-tab> <van-tab title="销售分成" name="sale"></van-tab>
</van-tabs> --> </van-tabs>
<BaseList ref="baselist" url="/v1/client/DUsermoneysClient" class="_m_" :params="searchParams">
<template #default="{ item }">
<div class="list" :key="item.TradeCode">
<table width="100%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<div style="margin-bottom: 2vw;">{{ $route.meta.title }}{{
item.balance?.toFixed(2) }}</div>
</td>
<td style="text-align: right;">
<van-tag :type="item.nums > 0 ? 'primary' : 'danger'"
style="margin-bottom: 2vw;">
{{ item.nums > 0 ? "增加:+" : "减少:"
}}{{ (item.nums).toFixed(2) }}
</van-tag>
</td>
</tr>
<tr v-if="item.remark">
<td colspan="2">
<div style="line-height: 5vw;word-break: break-all; color: #999">
备注{{ item.remark }}
</div>
</td>
</tr>
<tr v-if="item.ordernum">
<td colspan="2">
<div
style="line-height: 5vw;word-break: break-all;color: #999;display: inline;">
订单{{ item.ordernum }}
</div>
<u style="color: #535353; margin-left: 1.667vw"
@click="$copyText(item.ordernum); $showSuccessToast('复制成功')">复制</u>
</td>
</tr>
<tr>
<td colspan="2">
<div
style="line-height: 5vw;word-break: break-all;color: #999;display: inline;">
时间{{ $formatGMT(item.addtime, 'yyyy-MM-dd HH:mm:ss') }}
</div>
</td>
</tr>
</tbody>
</table>
</div>
</template>
</BaseList>
<div class="_m" style="padding-top: 0;">
<div class="b_l_w">
<div v-for="item in list" :key="item.TradeCode" class="list">
<table width="100%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<div style="margin-bottom: 2vw;">{{ $route.meta.title }}{{
item.CurValue?.toFixed(2) }}</div>
</td>
<td style="text-align: right;">
<van-tag :type="item.OpeType == '1' ? 'primary' : 'danger'" style="margin-bottom: 2vw;">
{{ item.OpeType == "1" ? "增加:+" : "减少:-"
}}{{ (item.RecordValue).toFixed(2) }}
</van-tag>
</td>
</tr>
<tr v-if="item.Remark">
<td colspan="2">
<div style="line-height: 5vw;word-break: break-all; color: #999">
备注{{ item.Remark }}
</div>
</td>
</tr>
<tr v-if="item.TradeCode">
<td colspan="2">
<div style="line-height: 5vw;word-break: break-all;color: #999;display: inline;">
订单{{ item.TradeCode }}
</div>
<u style="color: #535353; margin-left: 1.667vw"
@click="$copyText(item.TradeCode); $showSuccessToast('复制成功')">复制</u>
</td>
</tr>
<tr>
<td colspan="2">
<div style="line-height: 5vw;word-break: break-all;color: #999;display: inline;">
时间{{ $date.dateformat(item.CTime, true) }}
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div> -->
<div class="balance">
<div class="top">
<div class="line">
<b class="tit">
当前余额 <van-icon name="question-o" @click.stop="showTerm = true"></van-icon>
</b>
<div class="co_box">
<img src="/img/co_icon.png" alt="">
<span>提现记录</span>
<van-icon name="arrow"></van-icon>
</div>
</div>
<div class="line">
<b class="num">
{{ data.total.totalsum?.toFixed(2) }}
</b>
<button class="r" @click="$navigate('Cashout')">
提现
</button>
</div>
<div class="line">
<div class="pn">
累计收入:
<p>{{ data.total?.positivesum?.toFixed(2) }}</p>
</div>
<div class="r pn">
累计支出:
<p>{{ Math.abs((data.total?.negativesum))?.toFixed(2) }}</p>
</div>
</div>
</div>
<div class="botom">
<div class="date_box">
<div class="date" @click="showDate = true">
{{ date[0] }}-
<p>{{ (parseInt(date[1]) < 10) ? `0${parseInt(date[1])}` : parseInt(date[1]) }}</p>
<img src="/img/down.png" alt="">
</div>
<div class="count">
<div>
<span>收入</span>
<p> {{ data.total?.positivesumcurrent?.toFixed(2) }}</p>
</div>
<div>
<span>支出</span>
<p> {{ Math.abs((data.total?.negativesumcurrent))?.toFixed(2) }}</p>
</div>
</div>
</div>
<van-tabs v-model:active="active" type="card" class="tabs" color="#374c6d">
<van-tab title="全部"></van-tab>
<van-tab title="礼包"></van-tab>
<van-tab title="商家"></van-tab>
<van-tab title="商城"></van-tab>
<van-tab title="分成"></van-tab>
</van-tabs>
<BaseList ref="baselist" url="/v1/client/DUsermoneysClient" class="_m_" :params="searchParams"> <BaseList ref="baselist" url="/v1/client/DUsermoneysClient" class="_m_" :params="searchParams">
<template #default="{ item }"> <template #default="{ item }">
@ -115,55 +274,9 @@
</div> </div>
</template> </template>
</BaseList> </BaseList>
<!-- <div class="_m" style="padding-top: 0;">
<div class="b_l_w">
<div v-for="item in list" :key="item.TradeCode" class="list">
<table width="100%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<div style="margin-bottom: 2vw;">{{ $route.meta.title }}{{
item.CurValue?.toFixed(2) }}</div>
</td>
<td style="text-align: right;">
<van-tag :type="item.OpeType == '1' ? 'primary' : 'danger'"
style="margin-bottom: 2vw;">
{{ item.OpeType == "1" ? "增加:+" : "减少:-"
}}{{ (item.RecordValue).toFixed(2) }}
</van-tag>
</td>
</tr>
<tr v-if="item.Remark">
<td colspan="2">
<div style="line-height: 5vw;word-break: break-all; color: #999">
备注{{ item.Remark }}
</div>
</td>
</tr>
<tr v-if="item.TradeCode">
<td colspan="2">
<div
style="line-height: 5vw;word-break: break-all;color: #999;display: inline;">
订单{{ item.TradeCode }}
</div>
<u style="color: #535353; margin-left: 1.667vw"
@click="$copyText(item.TradeCode); $showSuccessToast('复制成功')">复制</u>
</td>
</tr>
<tr>
<td colspan="2">
<div
style="line-height: 5vw;word-break: break-all;color: #999;display: inline;">
时间{{ $date.dateformat(item.CTime, true) }}
</div>
</td>
</tr>
</tbody>
</table>
</div> </div>
</div> </div>
</div> -->
</div>
<van-popup v-model:show="showDate" position="bottom"> <van-popup v-model:show="showDate" position="bottom">
<van-date-picker v-model="currentDate" title="选择年月" :columns-type="['year', 'month']" @confirm="onconfirm" <van-date-picker v-model="currentDate" title="选择年月" :columns-type="['year', 'month']" @confirm="onconfirm"
@cancel="showDate = false" /> @cancel="showDate = false" />
@ -176,8 +289,6 @@
</BasePage> </BasePage>
</template> </template>
<script> <script>
import BaseList from '../../components/BaseList.vue';
export default { export default {
name: 'Balance', name: 'Balance',
mounted() { mounted() {
@ -185,6 +296,7 @@ export default {
}, },
data() { data() {
return { return {
active: 0,
data: { data: {
total: { total: {
Balance: 8888.88, Balance: 8888.88,

View File

@ -1,154 +1,123 @@
<template> <template>
<BasePage> <BasePage>
<div class="cv"> <div class="cv">
<div class="top"> <div class="card">
<div class="line"> <div class="t">
<span class="title"> <img style="height: 10.4vw;" src="/img/logo.png" alt="">
当前贡献值统计 <div class="u_info">
<b>会员卡<van-icon style="margin-left: 1.2vw;" name="question-o" @click.stop="showTerm = true"></van-icon></b>
<span>123456789</span>
</div>
<div class="record r">
赠卡记录
<van-icon name="arrow"></van-icon>
</div>
</div>
<div class="db">
<div class="left">
<span>余额</span>
<b>{{ data.totalsum?.toFixed(2) }}</b>
</div>
<button>
赠卡
</button>
</div>
</div>
<div class="list_box">
<div class="date_box">
<div class="date" @click="showDate = true">
{{ date[0] }}-
<p>{{ (parseInt(date[1]) < 10) ? `0${parseInt(date[1])}` : parseInt(date[1]) }}</p>
<img src="/img/down-one.png" alt="">
</div>
<div class="count">
<div>
<span>收入</span>
<p> {{ data?.positivesumcurrent?.toFixed(2) }}</p>
</div>
<div>
<span>支出</span>
<p> {{ Math.abs((data?.negativesumcurrent))?.toFixed(2) }}</p>
</div>
</div>
</div>
<BaseList ref="baselist" url="/v1/client/DUserxiaofeiquansClient" class="list" :params="searchParams">
<template #default="{ item }">
<div class="item">
<div class="t">
<span class="tit">当前额度{{ item.balance?.toFixed(2) }}</span>
<span :class="item.nums > 0 ? 'in' : 'out'" class="r">
<span v-if="item.nums > 0">增加+</span>
<span v-else>减少</span>
{{ item.nums }}
</span> </span>
<div class="explain" @click="showTerm = true">
<img src="/img/explain.png" alt="">
贡献值说明
</div> </div>
</div> <span>
备注{{ item.remark }}
<b>
{{ (data.gongxianzhi + data.maxgongxianzhi + data.othersgongxianzhi)?.toFixed(2) }}
</b>
</div>
<div class="container">
<div class="inf_box">
<span class="title">
团队贡献值构成
</span> </span>
<span>
订单{{ item.ordernum }}
</span>
<span>
时间{{ $formatGMT(item.addtime, 'yyyy-dd-MM HH:ss') }}
</span>
</div>
</template>
</BaseList>
<div class="list"> </div>
<div>
<img src="/img/cv-i1.png" alt="">
<span>个人贡献值累计</span>
<b>{{ (data.gongxianzhi)?.toFixed(2) }}</b>
</div> </div>
<div> <van-popup v-model:show="showDate" position="bottom">
<img src="/img/cv-i2.png" alt=""> <van-date-picker v-model="currentDate" title="选择年月" :columns-type="['year', 'month']" @confirm="onconfirm"
<span>网体大部门贡献值累计</span> @cancel="showDate = false" />
<b>{{ (data.maxgongxianzhi)?.toFixed(2) }}</b> </van-popup>
</div> <van-action-sheet v-model:show="showTerm" safe-area-inset-bottom :title="`${this.$route.meta.title}说明`" closeable
<div>
<img src="/img/cv-i3.png" alt="">
<span>网体其他部门贡献值累计</span>
<b>{{ (data.othersgongxianzhi)?.toFixed(2) }}</b>
</div>
</div>
</div>
</div>
</div>
</BasePage>
<van-action-sheet v-model:show="showTerm" safe-area-inset-bottom :title="`贡献值说明`" closeable
style="min-height: 50%; padding: 0px 10px 10px 10px"> style="min-height: 50%; padding: 0px 10px 10px 10px">
<div class="w100 html" v-html="data.Term" /> <div class="w100 html" v-html="data.Term" />
</van-action-sheet> </van-action-sheet>
</BasePage>
</template> </template>
<script> <script>
export default { export default {
name: 'Point',
mounted() { mounted() {
this.getCVList(); this.init();
}, },
data() { data() {
return { return {
data: { showDate: false,
total: { showTerm: false,
Balance: 3680.50, data: {},
TotalBalance: 10000.00,
MonthBalance: 1250.00,
MonthReduceBalance: 569.50,
},
Term: '贡献值说明:贡献值可用于升级会员、兑换礼品等。',
},
date: [`${new Date().getFullYear()}`, `${new Date().getMonth() + 1}`], date: [`${new Date().getFullYear()}`, `${new Date().getMonth() + 1}`],
currentDate: [`${new Date().getFullYear()}`, `${new Date().getMonth() + 1}`], currentDate: [`${new Date().getFullYear()}`, `${new Date().getMonth() + 1}`],
show: false,
showDate: false,
searchParams: { searchParams: {
WalletType: this.$route.query.type || 'CV', // type: 'Balance',
RecordSource: '', year: new Date().getFullYear(),
Year: new Date().getFullYear(), month: new Date().getMonth() + 1,
Month: new Date().getMonth() + 1,
}, },
loading: false,
showTerm: false,
list: [
{
CurValue: 200.00,
OpeType: '1',
RecordValue: 200.00,
Remark: '完成任务奖励',
TradeCode: 'CV202604200001',
CTime: '2026-04-20 10:00:00',
},
{
CurValue: 80.00,
OpeType: '1',
RecordValue: 80.00,
Remark: '邀请新用户贡献',
TradeCode: 'CV202604200002',
CTime: '2026-04-20 11:30:00',
},
{
CurValue: 150.00,
OpeType: '2',
RecordValue: 150.00,
Remark: '兑换礼品',
TradeCode: 'CV202604190001',
CTime: '2026-04-19 14:00:00',
},
{
CurValue: 50.00,
OpeType: '1',
RecordValue: 50.00,
Remark: '每日签到奖励',
TradeCode: 'CV202604190002',
CTime: '2026-04-19 09:00:00',
},
{
CurValue: 300.00,
OpeType: '1',
RecordValue: 300.00,
Remark: '团队业绩奖励',
TradeCode: 'CV202604180001',
CTime: '2026-04-18 16:30:00',
},
],
} }
}, },
methods: { methods: {
getCVList() {
this.$get('/v1/client/DUsergongxianzhisClient/statistics').then(data => {
// this.list = data.data.items;
this.data = data.data;
// console.log(data);
}).catch(err => {
this.$showFailToast(err.message || '加载失败');
});
},
onconfirm(value) { onconfirm(value) {
this.date = this.currentDate; this.date = this.currentDate;
this.showDate = false; this.showDate = false;
this.searchParams.Year = Number.parseInt(this.currentDate[0]); this.searchParams.year = Number.parseInt(this.currentDate[0]);
this.searchParams.Month = Number.parseInt(this.currentDate[1]); this.searchParams.month = Number.parseInt(this.currentDate[1]);
this.init();
this.$refs.baselist.refresh()
}, },
changeTabs(e) { init() {
this.show = false; this.$get('/v1/client/DUserxiaofeiquansClient/statistics', this.searchParams).then(res => {
}, this.data = res.data;
onShowTerm() { })
this.showTerm = true;
} }
} }
} }

View File

@ -0,0 +1,52 @@
<template>
<BasePage>
<div class="certificate">
<van-tabs v-model:active="active" background="#fff" color="#ea3e23" line-height="1.07vw" line-width="5.33vw"
title-active-color="#ea3e23">
<van-tab title="全部"></van-tab>
<van-tab title="待核销"></van-tab>
<van-tab title="已核销"></van-tab>
</van-tabs>
<div class="list">
<div class="item">
<img src="/img/certificate.png" alt="">
<div class="info">
<div>
<b>礼品券</b>
<p>券码123456789</p>
</div>
<button>
去核销
</button>
</div>
</div>
<div class="item">
<img src="/img/certificate.png" alt="">
<div class="info">
<div>
<b>礼品券</b>
<p>券码123456789</p>
</div>
<button v-if="check">
去核销
</button>
<img v-else src="/img/check.png" alt="">
</div>
</div>
</div>
</div>
</BasePage>
</template>
<script>
export default {
data() {
return {
active: 0,
check: false,
}
}
}
</script>

View File

@ -5,11 +5,13 @@
<div class="d1"> <div class="d1">
<div class="w100"> <div class="w100">
<!-- <img id="invite_bg" :src="$file(data.Icon)" /> --> <!-- <img id="invite_bg" :src="$file(data.Icon)" /> -->
<img id="invite_bg" src="/img/invite_bg.jpg"> <img id="invite_bg" src="/img/invite_bg.jpg" crossorigin="anonymous">
</div> </div>
<img class="icon" :src="$file(data.Avatar)"> <img class="icon" :src="$file(data.Avatar) + '?t=1'" crossorigin="anonymous">
<div class="name"> <div class="name">
<b>{{ $substring(data.NickName, 0, 8) }}</b> <b>{{ $substring(data.NickName, 0, 8) }}</b>
<p>邀请你使用泰古润平台<br>
共赴葡园品鉴醇香</p>
</div> </div>
<div class="ewm_test box box-tb box-align-center"> <div class="ewm_test box box-tb box-align-center">
<vue-qr v-if="!loading" :text="link" backgroundColor="rgb(255,255,255)" <vue-qr v-if="!loading" :text="link" backgroundColor="rgb(255,255,255)"
@ -26,6 +28,7 @@
<script> <script>
import { html2canvas, canvasToDataURL } from '@/utils/html2image'; import { html2canvas, canvasToDataURL } from '@/utils/html2image';
import { useUserStore } from '@/stores/user';
export default { export default {
name: 'Invite', name: 'Invite',
@ -34,30 +37,66 @@ export default {
loading: true, loading: true,
data: { data: {
Icon: '', Icon: '',
Avatar: '/img/avatar.png', Avatar: '',
NickName: '123123', NickName: '',
}, },
link: '123', link: '',
userStore: useUserStore(),
}; };
}, },
mounted() { mounted() {
this.loading = false; this.loading = false;
document.getElementById("invite_bg").onload = () => { this.init().then(() => {
//
this.$nextTick(() => {
const img = document.getElementById("invite_bg");
if (img.complete) {
this.CreatePoster(".ewm_bg > div", "#sc_ewm"); this.CreatePoster(".ewm_bg > div", "#sc_ewm");
}; } else {
img.onload = () => this.CreatePoster(".ewm_bg > div", "#sc_ewm");
}
});
});
}, },
methods: { methods: {
async init() {
try {
//
const userInfo = await this.$get('/v1/client/DUsersClient');
if (userInfo?.data) {
this.data.Avatar = userInfo.data.userimg || '';
this.data.NickName = userInfo.data.nickname || '';
this.data.Icon = userInfo.data.Icon || '';
}
//
const inviteCode = userInfo?.data?.cellphone || '';
this.link = `${location.origin}${location.pathname}#/Login?invite=${inviteCode}`;
} catch (err) {
console.error('获取用户信息失败:', err);
}
},
async CreatePoster(divID, targetID) { async CreatePoster(divID, targetID) {
var shareContent = document.querySelector(divID); var shareContent = document.querySelector(divID);
var width = shareContent.offsetWidth; var width = shareContent.offsetWidth;
var height = shareContent.offsetHeight; var height = shareContent.offsetHeight;
try { try {
//
const avatarImg = shareContent.querySelector('.icon');
if (avatarImg && !avatarImg.complete) {
await new Promise((resolve, reject) => {
avatarImg.onload = resolve;
avatarImg.onerror = resolve; //
setTimeout(resolve, 5000); //
});
}
var canvas = await html2canvas(shareContent, { var canvas = await html2canvas(shareContent, {
scale: 2, scale: 2,
width: width, width: width,
height: height, height: height,
useCORS: true, useCORS: true,
allowTaint: false,
}); });
var dataUrl = canvasToDataURL(canvas, "image/png", 1.0); var dataUrl = canvasToDataURL(canvas, "image/png", 1.0);
var newImg = document.createElement("img"); var newImg = document.createElement("img");
@ -88,38 +127,39 @@ export default {
.name { .name {
position: absolute; position: absolute;
bottom: 78.067vw; left: 20.27vw;
bottom: 25.6vw;
line-height: 6vw; line-height: 6vw;
width: 100%; width: 100%;
b { b {
font-size: 4.8vw; font-size: 3.47vw;
color: #1d3437; color: #3a0a05;
} }
p { p {
color: #1d3437;
font-size: 3.2vw; font-size: 3.2vw;
} }
} }
.icon { .icon {
position: absolute; position: absolute;
width: 16.8vw; width: 10.67vw;
height: 16.8vw; height: 10.67vw;
left: 41.467vw; left: 20.27vw;
bottom: 86.933vw; bottom: 42vw;
border-radius: 50%;
} }
.ewm_test { .ewm_test {
position: absolute; position: absolute;
left: 30vw; left: 23.73vw;
bottom: 28.133vw; bottom: 57.47vw;
white-space: nowrap; white-space: nowrap;
img { img {
width: 39.333vw; width: 52.53vw;
height: 39.333vw; height: 52.53vw;
} }
} }
} }

View File

@ -32,7 +32,7 @@
</div> </div>
<div class="wallet_box"> <div class="wallet_box">
<div> <div @click="$navigate('Balance')">
<div class="t"> <div class="t">
<img src="/img/my_w1.png" alt=""> <img src="/img/my_w1.png" alt="">
<span>余额</span> <span>余额</span>
@ -40,7 +40,7 @@
<b>1377.00</b> <b>1377.00</b>
</div> </div>
<div> <div @click="$navigate('CV')">
<div class="t"> <div class="t">
<img src="/img/my_w2.png" alt=""> <img src="/img/my_w2.png" alt="">
<span>会员卡额度</span> <span>会员卡额度</span>
@ -48,7 +48,7 @@
<b>13777.00</b> <b>13777.00</b>
</div> </div>
<div> <div @click="$navigate('Point')">
<div class="t"> <div class="t">
<img src="/img/my_w3.png" alt=""> <img src="/img/my_w3.png" alt="">
<span>积分</span> <span>积分</span>

174
src/views/User/Point.vue Normal file
View File

@ -0,0 +1,174 @@
<template>
<BasePage>
<div class="balance point">
<div class="top">
<div class="line">
<b class="tit">
当前积分 <van-icon name="question-o" @click.stop="showTerm = true"></van-icon>
</b>
</div>
<div class="line">
<b class="num">
{{ data.total.totalsum?.toFixed(2) }}
</b>
</div>
<div class="line">
<div class="pn">
累计收入:
<p>{{ data.total?.positivesum?.toFixed(2) }}</p>
</div>
<div class="r pn">
累计支出:
<p>{{ Math.abs((data.total?.negativesum))?.toFixed(2) }}</p>
</div>
</div>
</div>
<div class="botom">
<div class="date_box">
<div class="date" @click="showDate = true">
{{ date[0] }}-
<p>{{ (parseInt(date[1]) < 10) ? `0${parseInt(date[1])}` : parseInt(date[1]) }}</p>
<img src="/img/down.png" alt="">
</div>
<div class="count">
<div>
<span>收入</span>
<p> {{ data.total?.positivesumcurrent?.toFixed(2) }}</p>
</div>
<div>
<span>支出</span>
<p> {{ Math.abs((data.total?.negativesumcurrent))?.toFixed(2) }}</p>
</div>
</div>
</div>
<!--
<van-tabs v-model:active="active" type="card" class="tabs" color="#374c6d">
<van-tab title="全部"></van-tab>
<van-tab title="礼包"></van-tab>
<van-tab title="商家"></van-tab>
<van-tab title="商城"></van-tab>
<van-tab title="分成"></van-tab>
</van-tabs> -->
<BaseList ref="baselist" url="/v1/client/DUserxiaofeijifensClient" class="_m_" :params="searchParams">
<template #default="{ item }">
<div class="list" :key="item.TradeCode">
<table width="100%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<div style="margin-bottom: 2vw;">{{ $route.meta.title }}{{
item.balance?.toFixed(2) }}</div>
</td>
<td style="text-align: right;">
<van-tag :type="item.nums > 0 ? 'primary' : 'danger'" style="margin-bottom: 2vw;">
{{ item.nums > 0 ? "增加:+" : "减少:"
}}{{ (item.nums).toFixed(2) }}
</van-tag>
</td>
</tr>
<tr v-if="item.remark">
<td colspan="2">
<div style="line-height: 5vw;word-break: break-all; color: #999">
备注{{ item.remark }}
</div>
</td>
</tr>
<tr v-if="item.ordernum">
<td colspan="2">
<div style="line-height: 5vw;word-break: break-all;color: #999;display: inline;">
订单{{ item.ordernum }}
</div>
<u style="color: #535353; margin-left: 1.667vw"
@click="$copyText(item.ordernum); $showSuccessToast('复制成功')">复制</u>
</td>
</tr>
<tr>
<td colspan="2">
<div style="line-height: 5vw;word-break: break-all;color: #999;display: inline;">
时间{{ $formatGMT(item.addtime, 'yyyy-MM-dd HH:mm:ss') }}
</div>
</td>
</tr>
</tbody>
</table>
</div>
</template>
</BaseList>
</div>
</div>
<van-popup v-model:show="showDate" position="bottom">
<van-date-picker v-model="currentDate" title="选择年月" :columns-type="['year', 'month']" @confirm="onconfirm"
@cancel="showDate = false" />
</van-popup>
<van-action-sheet v-model:show="showTerm" safe-area-inset-bottom :title="`${this.$route.meta.title}说明`" closeable
style="min-height: 50%; padding: 0px 10px 10px 10px">
<div class="w100 html" v-html="data.Term" />
</van-action-sheet>
</BasePage>
</template>
<script>
export default {
name: 'Point',
mounted() {
this.init();
},
data() {
return {
data: {
total: {
Balance: 8888.88,
TotalBalance: 20000.00,
MonthBalance: 5200.00,
MonthReduceBalance: 1311.12,
},
Term: '余额说明:余额可用于提现、购物等。',
},
date: [`${new Date().getFullYear()}`, `${new Date().getMonth() + 1}`],
currentDate: [`${new Date().getFullYear()}`, `${new Date().getMonth() + 1}`],
show: false,
showDate: false,
searchParams: {
// type: 'Balance',
year: new Date().getFullYear(),
month: new Date().getMonth() + 1,
},
loading: false,
showTerm: false,
list: [],
}
},
methods: {
init() {
this.$get('/v1/client/DUserxiaofeijifensClient/statistics', this.searchParams).then(data => {
this.data.total = data.data;
}).catch(err => {
this.$showFailToast(err.message || '加载失败');
})
},
onconfirm(value) {
this.date = this.currentDate;
this.showDate = false;
this.searchParams.year = Number.parseInt(this.currentDate[0]);
this.searchParams.month = Number.parseInt(this.currentDate[1]);
this.init();
this.$refs.baselist.refresh()
},
changeTabs(e) {
this.show = false;
},
onShowTerm() {
this.showTerm = true;
}
}
}
</script>

View File

@ -7,9 +7,11 @@
<b> <b>
我的好友 我的好友
</b> </b>
<span> <van-icon style="margin-left: 1.2vw;" :name="cansee ? 'eye-o' : 'closed-eye'"
@click="cansee = !cansee"> </van-icon>
<!-- <span>
{{ total.TotalTreeQty }} {{ total.TotalTreeQty }}
</span> </span> -->
</div> </div>
<div class="right_btn r" @click="$navigate('/Invite')"> <div class="right_btn r" @click="$navigate('/Invite')">
<img src="/img/team-i1.png" alt=""> <img src="/img/team-i1.png" alt="">
@ -19,8 +21,13 @@
</div> </div>
</div> </div>
<div class="count_box"> <div class="num">
<!-- <div class="item"> <b>
{{ !cansee ? (total.allfriendcount || 0) : '***' }}
</b>
</div>
<!-- <div class="count_box">
<div class="item">
<div> <div>
<img src="/img/team_i1.png" alt=""> <img src="/img/team_i1.png" alt="">
<span> <span>
@ -41,7 +48,7 @@
<div> <div>
<b>{{ total.TotalTreeQty }}</b> <b>{{ total.TotalTreeQty }}</b>
</div> </div>
</div> --> </div>
<div class="item"> <div class="item">
<div> <div>
<span> <span>
@ -63,14 +70,16 @@
<b>{{ total.allfriendcount }}</b> <b>{{ total.allfriendcount }}</b>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
<div class="list_title"> <div class="list_title">
<!-- 直推好友列表({{ total.TotalCount }}) --> <!-- 直推好友列表({{ total.TotalCount }}) -->
<van-tabs v-model:active="active" background="transparent" color="#177142"> <van-tabs v-model:active="active" background="transparent" color="#ad9573">
<van-tab :title="'直推好友(' + total.friendcount + ')'"></van-tab> <van-tab :title="'分享的好友(' + total.friendcount + ')'"></van-tab>
<van-tab :title="'网体好友(' + total.allfriendcount + ')'"></van-tab> <van-tab :title="'拓展的商家'"></van-tab>
<van-tab :title="'我的推荐人'"></van-tab>
</van-tabs> </van-tabs>
@ -85,25 +94,47 @@
<img class="icon" :src="$file(item.userimg)" alt=""> <img class="icon" :src="$file(item.userimg)" alt="">
<div class="info"> <div class="info">
<div> <div>
<b>{{ item.username }}</b> <b>{{ item.nickname }}</b>
<span class="vip">{{ item.userlevelname }}</span> <span class="vip">{{ item.userlevelname }}</span>
</div> </div>
<div> <div class="box">
<p>账号:{{ item.cellphone ? item.cellphone.substring(0, 3) + '****' + <p>账号:{{ item.cellphone ? item.cellphone.substring(0, 3) + '****' +
item.cellphone.substring(7) : '' }}</p> item.cellphone.substring(7) : '' }}</p>
</div> </div>
<!-- <div> <!-- <div>
<p>ID {{ item.UserID }}</p> <p>ID {{ item.UserID }}</p>
<img src="/img/copy.png" @click="$copyText(item.UserID); $showSuccessToast('复制ID成功')" <img src="/img/copy.png" @click="$copyText(item.UserID); $showSuccessToast('复制ID成功')"
alt=""> alt="">
</div> --> </div> -->
<div>
<span>{{ $formatGMT(item.addtime, 'yyyy-MM-dd HH:mm:ss') }}</span> <span>{{ $formatGMT(item.addtime, 'yyyy-MM-dd HH:mm:ss') }}</span>
<span class="r" @click="show = true">
商家信息 <van-icon name="arrow"></van-icon>
</span>
<!-- <span class="r">
Ta的好友
<van-icon name="arrow"></van-icon>
</span> -->
</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
</BaseList> </BaseList>
<van-popup v-model:show="show" style="padding: 4vw 3.33vw;border-radius: 2.67vw;">
<!-- 该账号商家信息 -->
<div class="merchantinfo">
<img src="" alt="">
<div class="inf">
<b>name</b>
<span>账号</span>
</div>
</div>
</van-popup>
</div> </div>
</BasePage> </BasePage>
</template> </template>
@ -122,39 +153,11 @@ export default {
data() { data() {
return { return {
active: 0, active: 0,
cansee: true,
show: false,
data: [ data: [
{
UserID: '10001',
NickName: '张三',
Avatar: '/img/mall_i1.png',
LevelName: 'VIP会员',
Phone: '13812345678',
CTime: '2026-04-15 10:30:00',
},
{
UserID: '10002',
NickName: '李四',
Avatar: '/img/mall_i2.png',
LevelName: '银卡会员',
Phone: '13987654321',
CTime: '2026-04-10 14:20:00',
},
{
UserID: '10003',
NickName: '王五',
Avatar: '/img/mall_i3.png',
LevelName: '普通会员',
Phone: '13611112222',
CTime: '2026-04-05 09:15:00',
},
], ],
total: { total: {
TotalTreeQty: 3,
TotalTreeSeed: 12,
TotalTreeFruit: 580,
TotalCount: 3,
friendcount: 0,
allfriendcount: 0,
}, },
title: this.$route.query.title || null, title: this.$route.query.title || null,
}; };
@ -188,4 +191,32 @@ export default {
.r10 { .r10 {
border-radius: 10px; border-radius: 10px;
} }
.merchantinfo {
display: flex;
}
.merchantinfo img {
width: 12vw;
height: 12vw;
border-radius: 50%;
}
.merchantinfo .inf {
display: flex;
flex-direction: column;
justify-content: space-between;
margin-left: 3.33vw;
height: 12vw;
}
.merchantinfo .inf b {
font-size: 4vw;
color: #000000;
}
.merchantinfo .inf span {
font-size: 3.67vw;
color: #333;
}
</style> </style>

View File

@ -1,258 +0,0 @@
<template>
<BasePage>
<div class="voucher">
<div class="t">
<div class="c">
<div class="tit">
<span>当前{{ $route.meta.title }}<van-icon name="question-o" @click.stop="onShowTerm"></van-icon></span>
</div>
<div class="number">
<b>{{ data.total?.totalsum?.toFixed(2) }}</b>
</div>
<div class="total" style="margin: 1vw 0 0;">
<div>
累计收入
<p>{{ data.total?.positivesum?.toFixed(2) }}</p>
</div>
<div>
累计支出
<p>{{ Math.abs(data.total?.negativesum)?.toFixed(2) }}</p>
</div>
</div>
</div>
</div>
<div class="times">
<div class="_m">
<div class="l" @click="showDate = true">
<span>
{{ date[0] }}
<p>{{ (parseInt(date[1]) < 10) ? `0${parseInt(date[1])}` : parseInt(date[1]) }}</p>
</span>
<img src="/img/i-date.png">
</div>
<div class="right">
<p>
收入<br />
{{ data.total?.positivesumcurrent?.toFixed(2) }}
</p>
<p>
支出<br />
{{ Math.abs(data.total?.negativesumcurrent)?.toFixed(2) }}
</p>
</div>
</div>
</div>
<!-- <van-tabs v-model:active="searchParams.RecordSource" class="balance-tabs" type="card"
background="transparent" color="#ff5e5e" title-inactive-color="#313131" title-active-color="#fff"
@click="changeTabs">
<van-tab title="全部" name=""></van-tab>
<van-tab title="参团补贴" name="fail"></van-tab>
<van-tab title="分享补贴" name="direct"></van-tab>
<van-tab title="管理补贴" name="subsidy"></van-tab>
<van-tab title="销售分成" name="sale"></van-tab>
</van-tabs> -->
<BaseList ref="baselist" url="/v1/client/DUserxiaofeiquansClient" class="_m_list" :params="searchParams">
<template #default="{ item }">
<div class="list" :key="item.TradeCode">
<table width="100%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<div style="margin-bottom: 2vw;">{{ $route.meta.title }}{{
item.balance?.toFixed(2) }}</div>
</td>
<td style="text-align: right;">
<van-tag :type="item.nums > 0 ? 'primary' : 'danger'" style="margin-bottom: 2vw;">
{{ item.nums > 0 ? "增加:+" : "减少:"
}}{{ (item.nums).toFixed(2) }}
</van-tag>
</td>
</tr>
<tr v-if="item.remark">
<td colspan="2">
<div style="line-height: 5vw;word-break: break-all; color: #999">
备注{{ item.remark }}
</div>
</td>
</tr>
<tr v-if="item.ordernum">
<td colspan="2">
<div style="line-height: 5vw;word-break: break-all;color: #999;display: inline;">
订单{{ item.ordernum }}
</div>
<u style="color: #535353; margin-left: 1.667vw"
@click="$copyText(item.ordernum); $showSuccessToast('复制成功')">复制</u>
</td>
</tr>
<tr>
<td colspan="2">
<div style="line-height: 5vw;word-break: break-all;color: #999;display: inline;">
时间{{ $formatGMT(item.addtime, 'yyyy-MM-dd HH:mm:ss') }}
</div>
</td>
</tr>
</tbody>
</table>
</div>
</template>
</BaseList>
<!-- <div class="_m_list" style="padding-top: 0;">
<div class="b_l_w">
<div v-for="item in list" :key="item.TradeCode" class="list">
<table width="100%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<div style="margin-bottom: 2vw;">{{ $route.meta.title }}{{
item.CurValue?.toFixed(2) }}</div>
</td>
<td style="text-align: right;">
<van-tag :type="item.OpeType == '1' ? 'primary' : 'danger'" style="margin-bottom: 2vw;">
{{ item.OpeType == "1" ? "增加:+" : "减少:-"
}}{{ (item.RecordValue).toFixed(2) }}
</van-tag>
</td>
</tr>
<tr v-if="item.Remark">
<td colspan="2">
<div style="line-height: 5vw;word-break: break-all; color: #999">
备注{{ item.Remark }}
</div>
</td>
</tr>
<tr v-if="item.TradeCode">
<td colspan="2">
<div style="line-height: 5vw;word-break: break-all;color: #999;display: inline;">
订单{{ item.TradeCode }}
</div>
<u style="color: #535353; margin-left: 1.667vw"
@click="$copyText(item.TradeCode); $showSuccessToast('复制成功')">复制</u>
</td>
</tr>
<tr>
<td colspan="2">
<div style="line-height: 5vw;word-break: break-all;color: #999;display: inline;">
时间{{ $date.dateformat(item.CTime, true) }}
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div> -->
</div>
<van-popup v-model:show="showDate" position="bottom">
<van-date-picker v-model="currentDate" title="选择年月" :columns-type="['year', 'month']" @confirm="onconfirm"
@cancel="showDate = false" />
</van-popup>
<van-action-sheet v-model:show="showTerm" safe-area-inset-bottom :title="`${this.$route.meta.title}说明`" closeable
style="min-height: 50%; padding: 0px 10px 10px 10px">
<div class="w100 html" v-html="data.Term" />
</van-action-sheet>
</BasePage>
</template>
<script>
import BaseList from '../../components/BaseList.vue';
export default {
name: 'Voucher',
mounted() {
this.init();
},
data() {
return {
data: {
total: {
Balance: 8888.88,
TotalBalance: 20000.00,
MonthBalance: 5200.00,
MonthReduceBalance: 1311.12,
},
Term: '余额说明:余额可用于提现、购物等。',
},
date: [`${new Date().getFullYear()}`, `${new Date().getMonth() + 1}`],
currentDate: [`${new Date().getFullYear()}`, `${new Date().getMonth() + 1}`],
show: false,
showDate: false,
searchParams: {
year: new Date().getFullYear(),
month: new Date().getMonth() + 1,
},
loading: false,
showTerm: false,
list: [
{
CurValue: 100.00,
OpeType: '1',
RecordValue: 100.00,
Remark: '参团补贴奖励',
TradeCode: 'TR202604200001',
CTime: '2026-04-20 10:30:00',
},
{
CurValue: 50.00,
OpeType: '1',
RecordValue: 50.00,
Remark: '分享补贴奖励',
TradeCode: 'TR202604200002',
CTime: '2026-04-20 11:00:00',
},
{
CurValue: 200.00,
OpeType: '2',
RecordValue: 200.00,
Remark: '余额提现',
TradeCode: 'TR202604190001',
CTime: '2026-04-19 14:20:00',
},
{
CurValue: 80.00,
OpeType: '1',
RecordValue: 80.00,
Remark: '管理补贴奖励',
TradeCode: 'TR202604190002',
CTime: '2026-04-19 16:45:00',
},
{
CurValue: 150.00,
OpeType: '1',
RecordValue: 150.00,
Remark: '销售分成奖励',
TradeCode: 'TR202604180001',
CTime: '2026-04-18 09:15:00',
},
],
}
},
methods: {
init() {
this.$get('/v1/client/DUserxiaofeiquansClient/statistics', this.searchParams).then(data => {
this.data.total = data.data;
// console.log(this.data.total);
}).catch(err => {
this.$showFailToast(err.message || '加载失败');
})
},
onconfirm(value) {
this.date = this.currentDate;
this.showDate = false;
this.searchParams.year = Number.parseInt(this.currentDate[0]);
this.searchParams.month = Number.parseInt(this.currentDate[1]);
this.init();
this.$refs.baselist.refresh()
},
changeTabs(e) {
this.show = false;
},
onShowTerm() {
this.showTerm = true;
}
}
}
</script>