Refactor:分包

This commit is contained in:
lifizer
2026-05-12 15:19:37 +08:00
parent 6caf9afcc0
commit 535a98e43a
62 changed files with 250 additions and 20914 deletions
+73
View File
@@ -0,0 +1,73 @@
<template>
<view class="CustomerList">
<view
class="item acea-row row-between-wrapper"
v-for="item in list"
:key="item.id"
@click="goCustomerService(item)"
>
<view class="pictrue">
<image :src="item.avatar" />
</view>
<view class="text line1">{{ item.nickname }}</view>
</view>
</view>
</template>
<script>
import { serviceList } from "@/api/user";
export default {
name: "CustomerList",
data() {
return {
list: []
};
},
methods: {
goCustomerService(item) {
this.$yrouter.push({
path: "/pages/user/CustomerService/index",
query: { id: item.uid }
});
},
getList() {
serviceList().then(res => {
this.list = res.data;
});
}
},
mounted() {
this.getList();
}
};
</script>
<style scoped lang="less">
.CustomerList {
margin-top: 0.13*100rpx;
}
.CustomerList .item {
height: 1.38*100rpx;
border-bottom: 1px solid #eee;
padding: 0 0.24*100rpx;
background-color: #fff;
}
.CustomerList .item .pictrue {
width: 0.9*100rpx;
height: 0.9*100rpx;
border-radius: 50%;
border: 0.03*100rpx solid #fff;
box-shadow: 0 0 0.1*100rpx 0.05*100rpx #f3f3f3;
-webkit-box-shadow: 0 0 0.1*100rpx 0.05*100rpx #f3f3f3;
-moz-box-shadow: 0 0 0.1*100rpx 0.05*100rpx #f3f3f3;
}
.CustomerList .item .pictrue image{
width: 100%;
height: 100%;
border-radius: 50%;
}
.CustomerList .item .text {
width: 5.82*100rpx;
font-size: 0.32*100rpx;
color: #000;
}
</style>
+357
View File
@@ -0,0 +1,357 @@
<template>
<view class="v12-pb-10">
<view class="v12-justify-around v12-pa-2 v12-white data-nav">
<view
v-for="(day, i) in currentWeek"
:key="i"
class="v12-font-26"
>
<view style="color:#BCBCBC" class="day-wrap">{{ getDate(day) }}</view>
<view class="v12-dark-text day-wrap" :class="{'active': actived === i, 'disabled': disabled(day)}" @click="handle(day, i)">{{ getDay(day) }}</view>
</view>
</view>
<view v-if="isLoad" class="history-wrap">
<view
v-for="(item, index) in items"
:key="index"
class="v12-mt-3"
:id="`history-${item.historyDate}`"
>
<view class="" style="height: 56px; width: 100%" v-if="isSrcoll"></view>
<view >
<text class="v12-font-bold v12-font-32">{{ item.historyDate }}</text>
<view class="wrapper">
<view
v-for="(historyItem, historyKey) in item.histories"
:key="historyKey"
class="v12-white v12-radius-20 history-card"
@click="goodsDetail(historyItem)"
>
<view class="delete-icon" @click.stop="deleteHistoryItem(historyItem)">
<u-icon
name="close"
color="#fff"
size="16"
/>
</view>
<image
class="goods-img"
:src="historyItem.image"
mode="scaleToFill"
/>
<view v-if="isInvalidItem(historyItem)" class="invalid-mask">
<text class="invalid-mask-text">商品已下架</text>
</view>
<view class="good-info">
<view
v-if="historyItem.couponName"
:style="{
opacity: !historyItem.couponName ? 0 : 1
}"
class="v12-align-center v12-mt-2"
>
<view class="v12-primary-text v12-primary-border v12-radius-6 v12-font-18 v12-px-1"></view>
<view class="v12-primary-text v12-primary-border v12-radius-6 v12-font-18 v12-px-1">{{ historyItem.couponName }}</view>
</view>
<view class="more-t v12-font-20 v12-mt-2">{{ historyItem.storeName }}</view>
<view class="v12-justify-between v12-mt-2 price">
<view v-if="!historyItem.isNegotiable" class="v12-font-bold v12-primary-text" :class="{'v12-align-center': (historyItem.price).toString().length < 5 && (historyItem.otPrice).toString().length < 5 }">
<text class="v12-font-16"></text>
<text class="v12-font-24 v12-mr-1">{{ historyItem.price }}</text>
<view class="ot-price v12-font-weight-400">
<text class="v12-font-22"></text>
<text class="v12-font-22">{{ historyItem.otPrice }}</text>
<view class="under-line"></view>
</view>
</view>
<view v-else class="v12-font-26 v12-primary-text v12-font-bold">价格面议</view>
<image
:src="webUrl+'/orderIcon/组 355.png'"
class="icon"
/>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="v12-px-6" v-if="items.length > 0">
<u-divider text=" · 已经到底啦 · " textPosition="center"></u-divider>
</view>
<image
v-if="items.length === 0"
:src="webUrl + '/orderIcon/nohistory.png'"
class="img-nodata v12-mt-16"
mode="widthFix"
/>
</view>
<goo-skeleton
v-else
:show-avatar="false"
/>
</view>
</template>
<script>
import { getHistory, deleteHistory as deleteHistoryApi } from '@/api/user'
export default {
data() {
return {
currentWeek: [],
actived: 0,
webUrl: this.$VUE_APP_RESOURCES_URL,
isLoad: false,
items: [],
isSrcoll: false
}
},
onLoad() {
this.queryHistory()
},
onShow() {
this.$nextTick(() => {
this.currentWeek = this.getWeek()
this.actived = this.getActived()
})
},
methods: {
disabled(day) {
const dayItems = this.items.filter(item => {
return item.historyDate === day
}).map(e => {
return e.histories
}).flat()
return dayItems.length === 0
},
getActived() {
const weekMap = this.currentWeek.map(e => new Date(e).getDay())
const today = new Date().getDay()
return weekMap.indexOf(today)
},
getWeek() {
const dates = []
const now = new Date();
// 0-6, 0是周日
const dayOfWeek = now.getDay()
// 当前日
const numDate = now.getDate()
const numDaysToMonday = dayOfWeek - 1 > -1 ? dayOfWeek : 0
// 得到本周周一的日期
const monday = new Date(now)
monday.setDate(numDate - numDaysToMonday)
// 生成本周剩余的日期
for (let i = 0; i < 7; i++) {
dates.push(new Date(monday).toISOString().slice(0, 10))
monday.setDate(monday.getDate() + 1)
}
return dates
},
getDay(date) {
return new Date(date).getDate()
},
getDate(date) {
const dateMap = {
1: '一',
2: '二',
3: '三',
4: '四',
5: '五',
6: '六',
0: '日'
}
const d = new Date(date).getDay()
return dateMap[d]
},
handle(day, i) {
if(this.disabled(day)) return
this.actived = i
this.isSrcoll = true
uni.pageScrollTo({
selector:`#history-${day}`,
duration:200,
success:(success)=>{
this.isSrcoll = false
},
})
},
formatStr(str) {
const regx = /-/g
return str.replace(regx, '')
},
goodsDetail (item) {
if (this.isInvalidItem(item)) {
uni.showToast({
title: '商品已下架',
icon: 'none'
})
return
}
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: item.productId
}
})
},
isInvalidItem(item) {
if (!item) return false
if (item.isInvalid === true || item.isInvalid === 'true') return true
return Number(item.isInvalid) === 1
},
deleteHistoryItem(historyItem) {
const id = historyItem.id
if (!id) return
uni.showModal({
title: '提示',
content: '确认删除该浏览足迹吗?',
success: (res) => {
if (res.confirm) {
deleteHistoryApi(id).then(() => {
this.queryHistory()
})
}
}
})
},
queryHistory() {
this.items = []
this.isLoad = false
getHistory().then(res => {
const { data = [] } = res
if (data.length > 0) {
this.items = data.filter(e => e.histories && e.histories.length > 0).reverse()
// data.map(item => {
// if (item.histories) {
// if (item.histories.length > 0) {
// this.items.push(item)
// }
// }
// })
}
}).finally(() => {
this.isLoad = true
})
}
}
}
</script>
<style lang="less" scoped>
.data-nav{
position: sticky;
width: 100%;
top: 0;
z-index: 9;
box-sizing: border-box;
}
.disabled{
color: #CBCBCB !important;
}
.history-wrap {
padding: 0 20rpx;
.img-nodata {
width: 100%;
}
}
.under-line{
width: 100%;
height: 3rpx;
background-color: #CBCBCB;
position: absolute;
top: 4rpx;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
.wrapper{
display: flex;
flex-wrap: wrap;
width: 710rpx;
margin: 0 auto;
}
.history-card{
width: 226rpx;
box-sizing: border-box;
margin-top: 16rpx;
margin-right: 16rpx;
border-radius: 20rpx;
overflow: hidden;
position: relative;
&:nth-child(3n) {
margin-right: 0;
}
.goods-img {
display: block;
width: 226rpx;
height: 226rpx;
}
.invalid-mask{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.45);
display: flex;
align-items: center;
justify-content: center;
z-index: 1;
.invalid-mask-text{
color: #fff;
font-size: 24rpx;
padding: 8rpx 16rpx;
border: 1px solid rgba(255, 255, 255, 0.7);
border-radius: 24rpx;
background: rgba(0, 0, 0, 0.2);
}
}
.good-info {
padding: 12rpx 12rpx 20rpx 12rpx;
.price {
line-height: 34rpx;
align-items: flex-end;
.ot-price {
// margin: 0 0 0 10rpx;
color: #CBCBCB;
position: relative;
}
}
.icon {
display: block;
width: 34rpx;
height: 34rpx;
}
}
}
.delete-icon{
position: absolute;
top: 8rpx;
right: 8rpx;
z-index: 2;
width: 32rpx;
height: 32rpx;
border-radius: 16rpx;
// background-color: rgba(0, 0, 0, 0.35);
display: flex;
align-items: center;
justify-content: center;
}
.active{
background: #C52733;
color: #fff !important;
}
.day-wrap{
width: 40rpx;
height: 40rpx;
line-height: 40rpx;
text-align: center;
border-radius: 50%;
}
</style>
@@ -0,0 +1,39 @@
<template>
<view class="container">
<view class="content">
<view v-if="userInfo && userInfo.levelExplain" v-html="userInfo.levelExplain"></view>
</view>
</view>
</template>
<script>
import { mapGetters } from "vuex";
export default {
data() {
return {
}
},
computed: mapGetters(["userInfo"]),
onLoad:function(e){
},
onShow:function(){
this.$store.dispatch("getUser", true);
},
methods: {
}
}
</script>
<style>
.content{
background-color: #fff;
margin: 20rpx;
padding:20rpx;
font-size: 30rpx;
font-weight: normal;
border-radius: 10rpx;
}
</style>
+161
View File
@@ -0,0 +1,161 @@
<template>
<view class="messageList">
<mescroll-body ref="mescrollRef" top="16rpx" bottom="0" class='cotent-scroll' :up="upOption" :down="downOption" @up="upCallback" @down="downCallback" @init="mescrollInit" @emptyclick="emptyClick">
<view class="acea-row row-column">
<view
@click="toDetail(msg.id)"
class="acea-row message-box"
v-for="(msg, index) in list"
:key="index"
>
<view class="acea-row row-between row-middle">
<view class="title line1">{{msg.noticeTitle}}</view>
<!-- <div class="date">{{dataFormat(msg.createdTime,true)}}</div> -->
<view class="date">{{dataFormat(msg.noticeTime/1000,true)}}</view>
</view>
<view class="acea-row row-middle row-between">
<view class="content line1" v-html="msg.noticeContent"></view>
<view v-if="msg.readFlag=='RF0'" class="unread-dot"></view>
</view>
</view>
</view>
</mescroll-body>
</view>
</template>
<script>
import { noticeList } from "@/api/user";
import { isWeixin, dataFormat } from "@/utils";
import MescrollMixins from "@/mixins/mescroll-mixins.js";
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue";
export default {
components:{
MescrollBody
},
data() {
return {
list:[
// {
// noticeTitle:'ddjifjiejfiejife',
// noticeTime:'2020-09-09',
// noticeContent:'djdifjeijfiejifef'
// }
],
upOption:{
noMoreSize: 10, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
auto:true,
empty:{
tip: '', // 提示
icon:this.$VUE_APP_RESOURCES_URL+'/20240102232728574017.png',
width:500,
height:500
// btnText:'点击刷新'
}
},
downOption:{
auto:false
}
}
},
mixins:[
MescrollMixins({
getPageData(mescroll){
var _this = this;
// 此时mescroll会携带page的参数:
let pageNum = mescroll.num; // 页码, 默认从1开始
let pageSize = mescroll.size; // 页长, 默认每页10条
var params = {
limit:pageSize,
page:pageNum
}
// mescroll.endByPage(0, 0);
// return;
noticeList(params)
.then(res => {
if(mescroll.num == 1) {
_this.list = []; //如果是第一页需手动制空列表
}
_this.list = _this.list.concat(res.data);//追加新数据
mescroll.endSuccess(res.data.length);
})
.catch(err => {
mescroll.endErr();
uni.showToast({
title: err + '',
icon: 'none',
mask: false,
duration: 1500
});
})
}
})
],
methods: {
dataFormat,
toDetail(mid){
this.$yrouter.push('/pagesUser/user/MessageDetail/MessageDetail?id='+mid);
}
},
onLoad:function(e){
},
onShow:function(){
//静默刷新
this.mescroll && this.mescroll.resetUpScroll(false);
}
}
</script>
<style scoped lang="less">
page{
background-color: #fff;
}
.messageList{
padding: 0.32*100rpx;
background-color: #FFFFFF;
}
.message-box{
background:rgba(246,247,250,1);
border-radius:0.12*100rpx;
padding: 0.24*100rpx;
margin-bottom: 0.4*100rpx;
display: block;
// width: 100%;
}
.unread-dot{
position: absolute;
right: 0.2*100rpx;
top: auto;
flex-shrink: 0;
width:0.16*100rpx;
height:0.16*100rpx;
background:rgba(255,26,26,1);
border-radius:50%;
}
.content{
flex: 1;
color: #8B8F99;
font-size: 0.24*100rpx;
margin-top: 0.08*100rpx;
}
.date{
font-size:0.24*100rpx;
font-weight: bold;
color:rgba(139,143,153,1);
flex-shrink: 0;
color: #8B8F99;
}
.title{
flex: 1;
}
</style>
@@ -0,0 +1,90 @@
<template>
<view>
<view class="message">
<view class="title">{{messageInfo.noticeTitle}}</view>
<view class="date">{{dataFormat(messageInfo.noticeTime/1000,true)}}</view>
<view class="content" v-html="messageInfo.noticeContent"></view>
</view>
</view>
</template>
<script>
import { noticeDetail } from "@/api/user";
import { dataFormat } from "@/utils";
export default {
data() {
return {
id:0,
messageInfo:{}
}
},
methods: {
dataFormat,
getData:function(){
let that = this;
const id = this.id;
if (!id) {
uni.showToast({
title:"消息id不存在",
icon: "none",
duration: 2000
});
return;
}
noticeDetail({
id:this.id
}).then((res)=>{
that.messageInfo = res.data;
}).catch((err)=>{
uni.showToast({
title:
err.msg || err.response.data.msg || err.response.data.message,
icon: "none",
duration: 2000
});
})
}
},
onLoad:function(e){
this.id = e.id;
this.getData();
}
}
</script>
<style lang="less">
page{
background-color: #fff !important;
}
.message{
padding: 0.36*100rpx;
}
.title{
font-size:0.36*100rpx;
font-weight: bold;
color:rgba(8,15,26,1);
}
.date{
font-size:0.24*100rpx;
font-weight: bold;
color:rgba(139,143,153,1);
margin-top: 0.24*100rpx;
margin-bottom: 0.4*100rpx;
}
.content{
padding: 0.1*100rpx;
color: #080F1A;
}
</style>
@@ -0,0 +1,217 @@
<template>
<view class="container">
<view class="content acea-row row-column">
<input class="phone-input" type="text" :value="phone" disabled/>
<view class="acea-row row-middle" style="flex-wrap: nowrap;">
<input type="text" placeholder="填写验证码" placeholder-style="color:#DADCE0;font-size:28rpx;" class="codeIput" v-model="captcha" />
<button
class="code acea-row row-middle"
:disabled="disabled"
:class="disabled === true ? 'on' : ''"
@click="code"
>{{ text }}</button>
</view>
<input type="number" maxlength="6" password placeholder="请输新6位数字支付密码" placeholder-style="color:#DADCE0;font-size:28rpx" class="payPwdInput" v-model="payPwd" @input='inputPaypwdChange' />
</view>
<view class="confirmBnt bg-color-red" @click="confirm()">保存</view>
</view>
</view>
</template>
<script>
import { mapGetters } from "vuex";
import sendVerifyCode from "@/mixins/SendVerifyCode";
import { required, alpha_num, chs_phone } from "@/utils/validate";
import { validatorDefaultCatch } from "@/utils/dialog";
import { getUserInfo, registerVerify, bindingPhone,modifyUserPayPwd } from "@/api/user";
export default {
data() {
return {
captcha: "",
phone:'',
payPwd:''
}
},
mixins: [sendVerifyCode],
watch:{
userInfo(){
this.phone = this.userInfo.phone;
}
},
computed:{
...mapGetters(["userInfo"]),
},
onLoad:function(e){
if (e.isSetMode) {
uni.setNavigationBarTitle({
title: '设置支付密码'
});
} else{
uni.setNavigationBarTitle({
title: '修改支付密码'
});
}
//获取用户信息
if (this.$store.getters.token) {
this.$store.dispatch("getUser", true);
}
},
methods: {
inputPaypwdChange:function(event){
var value = event.target.value;
var filterValue = value.replace(/\D/g,"");
//console.log('value:'+filterValue);
this.payPwd = filterValue; // 不允许输入非数字字符
},
async code() {
let that = this;
const { phone } = that;
try {
await that
.$validator({
phone: [
required(required.message("手机号码")),
chs_phone(chs_phone.message())
]
})
.validate({ phone });
} catch (e) {
return validatorDefaultCatch(e);
}
registerVerify({ phone: phone })
.then(res => {
uni.showToast({
title: res.data,
icon: "none",
duration: 2000
});
that.sendCode();
})
.catch(res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
});
},
async confirm() {
let that = this;
const { phone, captcha, payPwd } = that;
try {
await that
.$validator({
phone: [
chs_phone(chs_phone.message("手机号码")),
alpha_num(alpha_num.message())
],
captcha: [
required(required.message("验证码")),
alpha_num(alpha_num.message("验证码"))
],
payPwd: [
required(required.message("支付密码")),
alpha_num(alpha_num.message("支付密码"))
]
})
.validate({ phone, captcha,payPwd });
} catch (e) {
return validatorDefaultCatch(e);
}
//网络请求
uni.showLoading();
modifyUserPayPwd({
passwordPay:that.payPwd,
code:that.captcha,
phone:that.phone
}).then((res)=>{
//提示成功并返回
uni.hideLoading();
that.$dialog.toast({ mes: "保存成功" });
setTimeout(function(){
that.$yrouter.back();
},1000);
}).catch((err)=>{
uni.hideLoading();
that.$dialog.error(err.msg || "修改失败");
})
}
}
}
</script>
<style>
page{
background: #fff;
}
.container{
background: #fff;
}
.confirmBnt {
font-size: 32rpx;
width: 580rpx;
height: 90rpx;
border-radius: 45rpx;
color: #fff;
margin: 92rpx auto 0 auto;
text-align: center;
line-height: 90rpx;
}
.content{
margin: 114rpx;
}
.phone-input{
color: #8B8F99;
font-size: 36rpx;
height:88rpx;
background:rgba(247,247,249,1);
opacity:1;
border-radius:12rpx;
margin-bottom: 32rpx;
}
.codeIput{
font-size: 28rpx;
height:88rpx;
border:1px solid rgba(218,220,224,1);
opacity:1;
border-radius:12rpx;
flex-grow: 1;
}
.code{
/* width:224rpx; */
height:88rpx;
background:rgba(121,129,253,1);
opacity:1;
color: #fff;
font-size: 28rpx;
border-radius:12rpxpx;
flex-shrink: 0;
margin-left: 16rpx;
text-align: center;
padding-left: 24rpx;
padding-right: 24rpx;
}
.payPwdInput{
font-size: 28rpx;
height:88rpx;
border:1px solid rgba(218,220,224,1);
opacity:1;
border-radius:12rpx;
margin-top: 32rpx;
}
</style>
+368
View File
@@ -0,0 +1,368 @@
<template>
<view class="point-page">
<view v-if="isLoad">
<view class="rule-btn" @click="showHidePopup(true)">
积分规则
</view>
<view class="tab-wrap">
<view
:class="query.pm === 1 ? 'curr' : ''"
class="tab-item"
@click="tabItemClick(1)"
>
<view class="txt">当前总积分</view>
<view class="number">
<image
v-if="query.pm === 1"
:src="webUrl + '/page/my/coin.png'"
class="icon"
/>
{{ point.currentPoints }}
</view>
</view>
<view
:class="query.pm === 0 ? 'curr' : ''"
class="tab-item"
@click="tabItemClick(0)"
>
<view class="txt">已使用积分</view>
<view class="number">
<image
v-if="query.pm === 0"
:src="webUrl + '/page/my/coin.png'"
class="icon"
/>
{{ point.totalUsedPoints }}
</view>
</view>
</view>
<view class="list-wrap">
<view
v-for="(item, index) in list"
:key="index"
class="item"
>
<view v-if="item.orderId" class="order">
<view class="title">
<view class="img">
<image :src="item.image" class="img" />
</view>
<view class="name more-t">
<view class="more-t">
{{ item.title }}
</view>
<view
:class="item.pm ? 'red' : 'green'"
class="number"
>
{{ item.pm ? '+' : '-' }}{{ item.number }}
<text class="txt">积分</text>
</view>
</view>
</view>
<view class="bottom" @click="goOrderDetails(item)">
<view class="txt">
点击查看详情 >>
</view>
<text class="iconfont icon-jiantou"></text>
</view>
</view>
<view v-else class="lottery">
<image :src="webUrl + '/points-lottery.png'" class="img" />
<view class="one-t title">
{{ item.title }}
</view>
<view
:class="item.pm ? 'red' : 'green'"
class="number"
>
{{ item.pm ? '+' : '-' }}{{ item.number }}
<text class="txt">积分</text>
</view>
</view>
</view>
<goo-skeleton
v-if="isLoading"
:show-avatar="false"
/>
<view v-else>
<view v-if="list.length === 0" class="no-data">
暂无数据
</view>
<!-- <u-loadmore
v-if="query.page >= totalPage && list.length > 0"
:line="true"
status="nomore"
nomore-text="到底了"
/> -->
</view>
</view>
</view>
<goo-skeleton
v-else
:show-avatar="false"
/>
<u-popup
:show="show"
mode="center"
round="10"
closeable
@close="showHidePopup(false)"
>
<view class="popup-body">
<view class="title bold">积分规则</view>
<view class="content">
<view class="content-html">
<rich-text :nodes="point.pointsRule" />
</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import {
getUserPointInfo,
getUserPointBill
} from '@/api/user'
import { pageListenMixins } from '@/mixins/pageListenMixins'
export default {
name: 'UserPoints',
mixins: [pageListenMixins],
data: function() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
query: {
pm: 1, // 0-支出,1-收入
page: 1,
limit: 10
},
isLoading: false,
list: [],
totalPage: 1,
isLoad: false,
point: {
currentPoints: 0, // 当前总积分
totalUsedPoints: 0, // 累计使用积分
pointsRule: ''
},
show: false,
pageKeyId: Object.freeze('userPointsBill')
}
},
created() {
this.getInfo()
},
onReachBottom() {
if (this.isLoading || this.query.page >= this.totalPage) {
return
}
this.query.page++
this.getList()
},
methods: {
tabItemClick(type) {
if (this.query.pm === type) {
return
}
this.query.pm = type
this.query.page = 1
this.list = []
this.getList()
},
getInfo() {
getUserPointInfo().then(res => {
const { success, data } = res
if (success) {
this.isLoad = true
this.point = data
this.getList()
}
})
},
getList() {
this.isLoading = true
getUserPointBill(this.query).then(res => {
const { success, data } = res
if (success) {
this.totalPage = data.pages || 1
if (data.records.length > 0) {
data.records.map(item => {
this.list.push(item)
})
}
}
}).finally(() => {
this.isLoading = false
})
},
goOrderDetails(order) {
this.$yrouter.push({
path: '/pagesOrder/order/OrderDetails/index',
query: {
id: order.orderId
}
})
},
showHidePopup(value) {
this.show = value
}
}
}
</script>
<style lang="less" scoped>
.point-page {
padding: 30rpx;
.rule-btn {
position: fixed;
right: 0;
top: 255rpx;
z-index: 9;
height: 24rpx;
padding: 20rpx 30rpx 20rpx 40rpx;
border-top-left-radius: 35rpx;
border-bottom-left-radius: 35rpx;
color: #fff;
font-size: 14px;
line-height: 24rpx;
background-color: #C51919;
}
.tab-wrap {
display: flex;
align-items: center;
.tab-item {
flex: 1;
justify-content: center;
padding: 20rpx;
border-radius: 15rpx;
background-color: #fff;
.txt {
width: 100px;
height: 36px;
padding: 0 20rpx;
margin: 0 auto;
border-radius: 4px;
border: 1px solid #C51919;
line-height: 36px;
text-align: center;
color: #C51919;
font-size: 16px;
}
.number {
display: flex;
justify-content: center;
align-items: center;
margin: 20rpx 0 0 0;
font-size: 20px;
color: #333;
font-weight: bold;
line-height: 26px;
.icon {
width: 40rpx;
height: 40rpx;
margin: 0 20rpx 0 0;
}
}
&.curr {
padding: 35rpx 20rpx;
background-color: #C51919;
.txt {
border-color: #fff;
color: #fff;
}
.number {
font-size: 26px;
color: #fff;
}
}
}
}
.list-wrap {
padding: 60rpx 0 0 0;
.item {
margin: 30rpx 0 0 0;
border-radius: 8px;
background-color: #fff;
.order {
.title {
display: flex;
padding: 20rpx;
.img {
display: block;
width: 120rpx;
height: 120rpx;
margin: 0 20rpx 0 0;
background-color: #f6f6f6;
}
.name {
width: calc(100% - 140rpx);
color: #333;
}
}
.bottom {
display: flex;
padding: 20rpx;
border-top: 1rpx solid #f6f6f6;
font-size: 12px;
color: #666;
.txt {
flex: 1;
color: #FD5749;
}
.iconfont {
font-size: 14px;
}
}
}
.lottery {
display: flex;
align-items: center;
padding: 20rpx;
.img {
display: block;
width: 62rpx;
height: 62rpx;
margin: 0 20rpx 0 0;
}
.title {
flex: 1;
}
}
.number {
text-align: right;
font-size: 18px;
font-weight: bold;
.txt {
font-size: 12px;
}
&.red {
color: #FD5749;
}
&.green {
color: #3DC260;
}
}
}
}
.no-data {
line-height: 200rpx;
text-align: center;
font-size: 16px;
color: #999;
}
.popup-body {
.title {
line-height: 80rpx;
text-align: center;
}
.content {
padding: 0 30rpx 30rpx 30rpx;
.content-html {
max-height: 70vh;
overflow-y: auto;
}
}
}
}
</style>
+335
View File
@@ -0,0 +1,335 @@
<template>
<view>
<view class="payment-top acea-row row-column row-center-wrapper">
<text class="name">我的余额</text>
<view class="pic">
<text>
<text class="pic-font">{{ now_money || 0 }}</text>
</text>
</view>
</view>
<view class="recharge">
<view class="nav acea-row row-around row-middle">
<view class="item on">账户充值</view>
</view>
<view class="info-wrapper">
<view class="picList acea-row row-between mt-20">
<view
class="pic-box pic-box-color acea-row row-center-wrapper row-column"
:class="activePic === index ? 'pic-box-color-active' : ''"
v-for="(item, index) in picList"
:key="index"
@click="picCharge(index, item)"
>
<view class="pic-number-pic">
<text>
{{ item.value.price }}
<text class="pic-number"></text>
</text>
</view>
<view class="pic-number" v-if="item.value.give_price > 0">赠送{{ item.value.give_price }} </view>
</view>
<!-- <view
class="pic-box pic-box-color acea-row row-center-wrapper"
@click="picCharge(picList.length, money)"
>
<input
type="number"
placeholder="其他"
v-model="money"
class="pic-box-money pic-number-pic"
/>
</view> -->
</view>
<view class="tip">提示充值后帐户的金额不能提现</view>
<view class="pay-btn bg-color-red" @click="recharge">立即充值</view>
</view>
</view>
</view>
</template>
<script>
import { mapGetters } from "vuex";
import { weappPay } from "@/libs/wechat";
import { rechargeWechat, getRechargeApi } from "@/api/user";
import { add, sub } from "@/utils/bc";
export default {
name: "Recharge",
components: {},
props: {},
data: function() {
return {
active: 0,
from: this.$deviceType,
money: "",
now_money: "",
picList: [],
activePic: 0,
numberPic: "",
paid_price: "",
rechar_id: 0
};
},
computed: mapGetters(["userInfo"]),
mounted: function() {
this.now_money = this.userInfo.nowMoney;
this.getRecharge();
},
methods: {
/**
* 充值额度选择
*/
getRecharge() {
getRechargeApi()
.then(res => {
this.picList = res.data.recharge_price_ways || [];
if (this.picList[0]) {
this.rechar_id = this.picList[0].id;
this.paid_price = this.picList[0].value.price;
this.numberPic = this.picList[0].value.give_price;
}
})
.catch(res => {
uni.showToast({
title:
err.msg || err.response.data.msg || err.response.data.message,
icon: "none",
duration: 2000
});
});
},
/**
* 选择金额
*/
picCharge(idx, item) {
this.activePic = idx;
if (idx == this.picList.length) {
this.rechar_id = 0;
this.paid_price = "";
this.numberPic = "";
} else {
this.money = "";
this.rechar_id = item.id;
this.paid_price = item.value.give_price;
this.numberPic = item.value.price;
}
},
recharge: function() {
let that = this,
price = Number(this.money);
if (this.picList.length == this.activePic && price === 0) {
uni.showToast({
title: "请输入您要充值的金额",
icon: "none",
duration: 2000
});
return;
} else if (this.picList.length == this.activePic && price < 0.01) {
uni.showToast({
title: "充值金额不能低于0.01",
icon: "none",
duration: 2000
});
return;
}
let prices = "",
paid_price = "";
if (price) {
prices = price;
paid_price = 0;
} else {
prices = that.numberPic;
paid_price = that.paid_price;
}
rechargeWechat({
price: prices,
from: that.from,
paid_price: paid_price,
rechar_id: that.rechar_id
})
.then(res => {
console.log(res);
var data = res.data.data;
weappPay(res.data.data)
.then(() => {
prices = add(prices, paid_price);
that.now_money = add(prices, parseFloat(that.userInfo.nowMoney));
uni.showToast({
title: "支付成功",
icon: "success",
duration: 2000
});
this.$yrouter.back();
})
.finally(res => {
//if(typeof(res) == "undefined") return
uni.showToast({
title: res,
icon: "none",
duration: 2000
});
})
.catch(function() {
uni.showToast({
title: "支付失败",
icon: "none",
duration: 2000
});
});
})
.catch(err => {
console.log(err);
uni.showToast({
title:
err.msg || err.response.data.msg || err.response.data.message,
icon: "none",
duration: 2000
});
});
}
}
};
</script>
<style scoped lang="less">
#iframe {
display: none;
}
.pic-box-color-active {
background-color: #eb3729 !important;
color: #fff !important;
}
.picList {
margin-bottom: 0.3 * 100rpx;
margin-top: 0.3 * 100rpx;
}
.font-color {
color: #e83323;
}
.recharge {
border-radius: 0.1 * 100rpx;
width: 100%;
background-color: #fff;
margin: 0.2 * 100rpx auto 0 auto;
padding: 0.3 * 100rpx;
border-top-right-radius: 0.39 * 100rpx;
border-top-left-radius: 0.39 * 100rpx;
margin-top: -0.45 * 100rpx;
box-sizing: border-box;
}
.recharge .nav {
height: 0.75 * 100rpx;
line-height: 0.75 * 100rpx;
padding: 0 1 * 100rpx;
}
.recharge .nav .item {
font-size: 0.3 * 100rpx;
color: #333;
}
.recharge .nav .item.on {
font-weight: bold;
border-bottom: 0.04 * 100rpx solid #e83323;
}
.recharge .info-wrapper {
}
.recharge .info-wrapper .money {
margin-top: 0.6 * 100rpx;
padding-bottom: 0.2 * 100rpx;
border-bottom: 1px dashed #ddd;
text-align: center;
}
.recharge .info-wrapper .money span {
font-size: 0.56 * 100rpx;
color: #333;
font-weight: bold;
}
.recharge .info-wrapper .money input {
display: inline-block;
width: 3 * 100rpx;
font-size: 0.84 * 100rpx;
text-align: center;
color: #282828;
font-weight: bold;
padding-right: 0.7 * 100rpx;
}
.recharge .info-wrapper .money input::placeholder {
color: #ddd;
}
.recharge .info-wrapper .money input::-webkit-input-placeholder {
color: #ddd;
}
.recharge .info-wrapper .money input:-moz-placeholder {
color: #ddd;
}
.recharge .info-wrapper .money input::-moz-placeholder {
color: #ddd;
}
.recharge .info-wrapper .money input:-ms-input-placeholder {
color: #ddd;
}
.tip {
font-size: 0.28 * 100rpx;
color: #333333;
font-weight: 800;
margin-bottom: 0.14 * 100rpx;
}
.recharge .info-wrapper .tips span {
color: #ef4a49;
}
.recharge .info-wrapper .pay-btn {
display: block;
width: 100%;
height: 0.86 * 100rpx;
margin: 0.5 * 100rpx auto 0 auto;
line-height: 0.86 * 100rpx;
text-align: center;
color: #fff;
border-radius: 0.5 * 100rpx;
font-size: 0.3 * 100rpx;
font-weight: bold;
}
.payment-top {
width: 100%;
height: 3.5 * 100rpx;
background-color: #eb3729;
}
.payment-top .name {
font-size: 0.26 * 100rpx;
color: rgba(255, 255, 255, 0.8);
margin-top: -0.38 * 100rpx;
margin-bottom: 0.3 * 100rpx;
}
.payment-top .pic {
font-size: 0.32 * 100rpx;
color: #fff;
}
.payment-top .pic-font {
font-size: 0.78 * 100rpx;
color: #fff;
}
.picList .pic-box {
width: 32%;
height: auto;
border-radius: 0.2 * 100rpx;
margin-top: 0.21 * 100rpx;
padding: 0.2 * 100rpx 0;
}
.pic-box-color {
background-color: #f4f4f4;
color: #656565;
}
.pic-number {
font-size: 0.22 * 100rpx;
}
.pic-number-pic {
font-size: 0.38 * 100rpx;
margin-right: 0.1 * 100rpx;
text-align: center;
}
.pic-box-money {
width: 100%;
display: block;
}
</style>
+153
View File
@@ -0,0 +1,153 @@
<template>
<view class="register absolute">
<view class="shading">
<view class="pictrue acea-row row-center-wrapper">
<image :src="`${staticUrl}/logo.png`" />
</view>
</view>
<view class="whiteBg">
<view class="title">找回密码</view>
<view class="list">
<view class="item">
<view>
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-phone_" />
</svg>
<input type="text" placeholder="输入手机号码" v-model="account" />
</view>
</view>
<view class="item">
<view class="align-left">
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_1" />
</svg>
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
<button
class="code"
:disabled="disabled"
:class="disabled === true ? 'on' : ''"
@click="code"
>{{ text }}</button>
</view>
</view>
<view class="item">
<view>
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_" />
</svg>
<input type="password" placeholder="填写您的登录密码" v-model="password" />
</view>
</view>
</view>
<view class="logon" @click="registerReset">确认</view>
<view class="tip">
<text @click="goLogin()" class="font-color-red">立即登录</text>
</view>
</view>
<view class="bottom"></view>
</view>
</template>
<script>
import sendVerifyCode from "@/mixins/SendVerifyCode";
import { registerVerify, registerReset } from "@/api/user";
import { validatorDefaultCatch } from "@/utils/dialog";
import attrs, { required, alpha_num, chs_phone } from "@/utils/validate";
export default {
name: "RetrievePassword",
data: function() {
return {
staticUrl: this.$STATIC_RESOURCE_URL,
account: "",
password: "",
captcha: ""
};
},
mixins: [sendVerifyCode],
methods: {
goLogin() {
this.$yrouter.push({ path: "/pages/user/Login/index" });
},
async registerReset() {
var that = this;
const { account, captcha, password } = that;
try {
await that
.$validator({
account: [
required(required.message("手机号码")),
chs_phone(chs_phone.message())
],
captcha: [
required(required.message("验证码")),
alpha_num(alpha_num.message("验证码"))
],
password: [
required(required.message("密码")),
attrs.range([6, 16], attrs.range.message("密码")),
alpha_num(alpha_num.message("密码"))
]
})
.validate({ account, captcha, password });
} catch (e) {
return validatorDefaultCatch(e);
}
registerReset({
account: that.account,
captcha: that.captcha,
password: that.password
})
.then(res => {
uni.showToast({
title: res.msg,
icon: "success",
duration: 2000,
complete: () => {
that.$yrouter.push({ name: "Login" });
}
});
})
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg|| err.response.data.message,
icon: "none",
duration: 2000
});
});
},
async code() {
var that = this;
const { account } = that;
try {
await that
.$validator({
account: [
required(required.message("手机号码")),
chs_phone(chs_phone.message())
]
})
.validate({ account });
} catch (e) {
return validatorDefaultCatch(e);
}
registerVerify({ phone: that.account })
.then(res => {
uni.showToast({
title: res.msg,
icon: "success",
duration: 2000
});
that.sendCode();
})
.catch(err => {
uni.showToast({
title: err.msg || err.response.data.msg|| err.response.data.message,
icon: "none",
duration: 2000
});
});
}
}
};
</script>
@@ -0,0 +1,368 @@
<template>
<view class="container">
<view class="content-box">
<view class="content">
<view v-if="userLevelInfo" class="verify-status-box acea-row row-center row-middle">
<img v-if="userLevelInfo.checkState==3" class="verify-status-img" :src="webUrl+'/20200824093220483259.png'"/>
<span class="verify-status-text">{{ getCheckState(userLevelInfo) }}</span>
</view>
<view v-if="userLevelInfo && userLevelInfo.checkState==4" class="reason">原因:{{ userLevelInfo.checkRemark }}
</view>
<view class="electronic-box acea-row row-middle row-center">
<view class="checkbox-wrapper">
<checkbox-group @change="toggleProtocolCheck()">
<label class="well-check">
<checkbox :checked="protocolChecked" color="#fff"
style="border-radius: 50%;transform:scale(0.7)"></checkbox>
</label>
</checkbox-group>
</view>
<view class="electronic-tip">
<span class="">我已同意</span>
<span @click="toggleProtocolPage()" class="electronic-protocol-text">香道滇股东协议</span>
</view>
</view>
<view class="upload-box acea-row row-column row-center">
<view class="idcard_pictrue">
<view @tap="chooseIdCardFrontImage">
<view class="pictrue">
<img v-if="idCardFrontImg.length>0" :src="idCardFrontImg"/>
<img v-else :src="webUrl+'/20200824092942325489.png'"/>
</view>
<view v-if="idCardFrontImg.length==0" class="add-icon">
<img :src="webUrl+'/20200824093150470953.png'"/>
</view>
</view>
</view>
<span class="upload-tip">上传身份证正面照</span>
<view class="idcard_pictrue">
<view class="" @tap="chooseIdCardBackImage">
<view class="pictrue">
<img v-if="idCardBackImg.length>0" :src="idCardBackImg"/>
<img v-else :src="webUrl+'/20200824093104069571.png'"/>
</view>
<view v-if="idCardBackImg.length==0" class="add-icon">
<img :src="webUrl+'/20200824093150470953.png'"/>
</view>
</view>
</view>
<span class="upload-tip">上传身份证反面照</span>
</view>
<view v-if="userLevelInfo && userLevelInfo.checkState!=3 && userLevelInfo.checkState!=2" class="submit-btn"
@click="submitBtnClick">保存
</view>
</view>
</view>
</view>
</template>
<script>
var that;
import {mapGetters} from "vuex";
import {chooseImage} from "@/utils";
import {getUserLevelInfo, saveUserProtocol} from "@/api/user"
import uniPopup from '@/components/uni-popup/uni-popup.vue';
export default {
components: {
uniPopup
},
props: {},
data: function () {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
idCardFrontImg: "",
idCardBackImg: "",
protocolChecked: true,
protocolShow: false,
verifyPass: 0,//是否审核通过
userLevelInfo: null,
avatar: ''
};
},
watch: {},
computed: mapGetters(["userInfo"]),
onShow() {
if (this.$store.getters.token) {
this.$store.dispatch("getUser", true);
}
},
onLoad: function () {
//setTimeout里的this不是页面的this
//所以这里要处理一下用that
that = this;
this.getUserLevelInfo();
},
methods: {
toggleProtocolCheck() {
this.protocolChecked = !this.protocolChecked;
},
//checkState:1-新增 2-待审核 3-已审核 4-已驳回
getCheckState(info) {
var status = '';
if (info) {
switch (info.checkState) {
case 1:
status = '新增';
break;
case 2:
status = '待审核';
break;
case 3:
status = '审核通过';
break;
case 4:
status = '审核驳回';
break;
default:
break;
}
}
return status;
},
//显示协议内容
toggleProtocolPage() {
//this.$refs.popup.open();
this.$yrouter.push('/pagesUser/user/UpgradeProtocolDetail/UpgradeProtocolDetail')
},
chooseIdCardFrontImage() {
// if(this.userLevelInfo && this.userLevelInfo.checkState!=3){
// chooseImage(img => {
// console.log(img)
// this.avatar = img;
// });
// }
chooseImage(img => {
console.log(img)
that.idCardFrontImg = img;
});
},
chooseIdCardBackImage() {
chooseImage(img => {
console.log(img)
that.idCardBackImg = img;
});
},
//提交
submitBtnClick: function () {
//var that = this;
if (this.idCardFrontImg.length == 0) {
this.$dialog.toast({mes: '请上传身份证正面照片'});
return;
}
if (this.idCardBackImg.length == 0) {
this.$dialog.toast({mes: '请上传身份证反面面照片'});
return;
}
this.$dialog.loading.open();
saveUserProtocol({
uid: that.userInfo.uid,
idcardOne: that.idCardFrontImg,
idcardTwo: that.idCardBackImg
}).then((res) => {
that.$dialog.toast({mes: "保存成功!"});
//跳转回上一页
setTimeout(function () {
that.$yrouter.back();
}, 1000);
}).catch(err => {
that.$dialog.error(err.msg || "保存失败!");
}).finally(() => {
that.$dialog.loading.close();
});
},
// 获取用户等级信息
getUserLevelInfo: function () {
var that = this;
getUserLevelInfo().then((res) => {
if (res.data) {
that.userLevelInfo = res.data;
that.idCardFrontImg = res.data.idcardOne || "";
that.idCardBackImg = res.data.idcardTwo || "";
}
}).catch(err => {
}).finally(() => {
});
},
idCardFrontImageuploaded(res) {
if (res.errno !== 0)
return this.$dialog.error(res.msg || "上传图片失败");
this.idCardFrontImg = res.link;
//this.$set(this.idCardFrontImg, "avatar", res.link);
},
idCardBackImageuploaded(res) {
if (res.errno !== 0)
return this.$dialog.error(res.msg || "上传图片失败");
this.idCardBackImg = res.link;
//this.$set(this.idCardBackImg, "avatar", res.link);
},
onBackClick: function () {
this.$yrouter.back();
}
}
};
</script>
<style scoped>
.content-box {
background-color: #FFFAF5;
padding: 38rpx;
}
.content {
border: 1px solid rgba(195, 172, 149, 1);
padding: 54rpx;
}
.checkbox-wrapper {
/* width: 0.8rem; */
width: auto;
text-align: center;
}
.checkbox-wrapper .icon {
/* left: calc((0.8rem - 18px)/2); */
left: 0;
}
.checkbox-wrapper input:checked + .icon {
background-color: #FD2C4B !important;
border-color: #FD2C4B !important;
}
.electronic-tip {
color: #9B6E40;
font-size: 28rpx;
/* padding-left: 48rpx; */
}
.electronic-protocol-text {
color: #FF8D5B;
}
.protocol-wrapper {
/* display: flex; */
/* align-items: center; */
/* justify-content: center; */
height: 100%;
width: 100%;
}
.p-content {
background-color: #fff;
margin: 100rpx;
padding: 20rpx;
overflow-y: scroll;
border-radius: 16rpx;
height: calc(100% - 200rpx);
}
.p-content .title {
font-weight: bold;
color: #000;
font-size: 40rpx;
text-align: center;
}
.overlay-protocol {
z-index: 1000 !important;
}
.upload-box {
margin-top: 40rpx;
}
.upload-box .idcard_pictrue {
width: 568rpx;
height: 320rpx;
/* background:rgba(255,255,255,1); */
position: relative;
}
.upload-tip {
font-weight: bold;
font-size: 28rpx;
color: #C3AC95;
text-align: center;
margin-top: 20rpx;
width: 100%;
}
.upload-box .idcard_pictrue .pictrue {
width: 568rpx;
height: 320rpx;
position: relative;
}
.upload-box .idcard_pictrue .pictrue img {
width: 100%;
height: 100%;
}
.add-icon {
width: 92rpx;
height: 92rpx;
position: absolute;
left: calc((100% - 92rpx) / 2);
top: calc((100% - 92rpx) / 2);
}
.add-icon img {
width: 92rpx;
height: 92rpx;
}
.verify-status-box {
margin: 32rpx auto;
}
.verify-status-img {
width: 56rpx;
height: 56rpx;
}
.verify-status-text {
color: #9B6E40;
font-size: 36rpx;
font-weight: bold;
}
.submit-btn {
font-size: 32rpx;
color: #fff;
/* width:6.9rem; */
height: 90rpx;
border-radius: 50rpx;
text-align: center;
line-height: 90rpx;
background-color: #00AAEA;
margin: 76rpx auto 0 auto;
}
.reason {
margin-top: 20rpx;
margin-bottom: 20rpx;
font-size: 28rpx;
color: #FF0000;
text-align: center;
}
</style>
@@ -0,0 +1,211 @@
<template>
<view class="container">
<view class="WordSection1">
<!-- <view class="MsoNormal" align="center" style="text-align:center;text-indent:38.95rpx"><span style="font-size:18.0rpx;font-family:宋体">共享股东协议</span></view> -->
<view class="MsoNormal" align="center" style="text-align:center;text-indent:30.3rpx"><span lang="EN-US" style="font-size:28rpx">&nbsp;</span></view>
<view class="MsoNormal" style="text-indent:28.0rpx">
<span
style="font-size:28rpx;
font-family:宋体"
>
欢迎阅读香道滇官方商城服务条款
</span>
<span lang="EN-US" style="font-size:28rpx">(</span>
<span style="font-size:28rpx;font-family:宋体">下称本条款</span>
<span lang="EN-US" style="font-size:28rpx">)</span>
<span
style="font-size:28rpx;font-family:
宋体"
>
本条款阐述之条款和条件适用于您在香道滇官方商城平台无偿或有偿使用香道滇产品
</span>
</view>
<view class="MsoNormal" style="text-indent:30.3rpx">
<span lang="EN-US" style="font-size:30rpx">1.&nbsp;</span>
<span
style="font-size:28rpx;
font-family:宋体"
>
接受条款
</span>
</view>
<view class="MsoNormal" style="text-indent:30.3rpx">
<u>
<span style="font-size:28rpx;font-family:宋体">
以任何方式使用香道滇产品即表示您同意自己已经与香道滇公司就香道滇官方商城平台服务事项下称香道滇商城服务订立本条款且您将受本条款的条件约束
</span>
</u>
<span style="font-size:28rpx;font-family:宋体">
您应在第一次提出申请前仔细阅读本条款并有权选择停止或继续使用香道滇商城服务一旦您继续使用香道滇商城服务则表示您已接受本条款当您与香道滇商城发生争议时应以本条款作为约束双方的条款
</span>
</view>
<view class="MsoNormal" style="text-indent:30.3rpx">
<span lang="EN-US" style="font-size:30rpx">2.&nbsp;</span>
<span
style="font-size:28rpx;
font-family:宋体"
>
谁可成为
</span>
<span
style="font-size:28rpx;font-family:
宋体"
>
香道滇官方商城
<span>平台的共享股东</span>
</span>
</view>
<view class="MsoNormal" style="text-indent:28.0rpx">
<span
style="font-size:28rpx;
font-family:宋体"
>
必需是注册成为香道滇官方商城会员后对香道滇产品产生一定兴趣和拥有一定资源的合作伙伴
</span>
</view>
<view class="MsoNormal" style="text-indent:28.0rpx">
<span
style="font-size:28rpx;
font-family:宋体"
>
升级成为群主针对个人要求拥有吃货宣传带动力
</span>
</view>
<view class="MsoNormal" style="text-indent:28.0rpx">
<span
style="font-size:28rpx;
font-family:宋体"
>
升级成为团长针对个人要求具备一定的线上或线下实战带货力
</span>
</view>
<view class="MsoNormal" style="text-indent:28.0rpx">
<span
style="font-size:28rpx;
font-family:宋体"
>
升级成为特约合作方针对第三方合作要求具备一定实力的带货公司
</span>
<span lang="EN-US" style="font-size:28rpx">/</span>
<span
style="font-size:28rpx;
font-family:宋体"
>
平台
</span>
</view>
<view class="MsoNormal" style="text-indent:28.0rpx">
<span
style="font-size:28rpx;
font-family:宋体"
>
请您先与商城管理员进行信息交流让我们了解下您的资源情况同时也把相应匹配的共享股东的具体权益让您也具体了解待双方都明确的情况下在由您提出申请并提交相应资料信息后即可完成对应升级
</span>
</view>
<view class="MsoNormal" style="text-indent:30.3rpx">
<span lang="EN-US" style="font-size:30rpx">3.&nbsp;</span>
<span
style="font-size:28rpx;
font-family:宋体"
>
您的资料与隐私
</span>
</view>
<view class="MsoNormal" style="text-indent:28.0rpx">
<span
style="font-size:28rpx;
font-family:宋体"
>
需要到您提交个人或平台方的资料仅作为香道滇官方商城合作备案同时香道滇官方商城也保证不会泄露您的信息给第三方
</span>
</view>
<view class="MsoNormal" style="text-indent:30.3rpx">
<span lang="EN-US" style="font-size:28rpx">4.&nbsp;</span>
<span
style="font-size:28rpx;
font-family:宋体"
>
香道滇官方商城
<span>平台产品责任</span>
</span>
</view>
<view class="MsoNormal" style="text-indent:28.0rpx">
<span
style="font-size:28rpx;
font-family:宋体"
>
</span>
<span lang="EN-US" style="font-size:28rpx">1</span>
<span style="font-size:28rpx;font-family:宋体">所有从本商城发货出去的产品均有品质保证如因产品本身出现的质量问题均由本商城负责处理及承担相应责任</span>
</view>
<view class="MsoNormal" style="margin-left:8.0rpx;text-indent:20.45rpx">
<span style="font-size:28rpx;font-family:宋体"></span>
<span lang="EN-US" style="font-size:28rpx">2</span>
<span
style="font-size:28rpx;font-family:
宋体"
>
您作为香道滇官方商城产品的推广方用户需按照本商城给予的指导售价产品实际宣传内容以及有针对性的目标群体进行宣传推广
</span>
<span style="font-size:28rpx;font-family:宋体">不得进行虚假宣传或者促使消费者误解的方式进行宣传</span>
<span style="font-size:28rpx;font-family:宋体">如此造成目标客户群体的影响则由其自行承担相应责任</span>
</view>
<view class="MsoNormal" style="text-indent:30.3rpx">
<span lang="EN-US" style="font-size:30rpx">5.&nbsp;</span>
<span
style="font-size:28rpx;
font-family:宋体"
>
不可抗力
</span>
</view>
<view class="MsoNormal" style="text-indent:28.0rpx">
<span
style="font-size:28rpx;
font-family:宋体"
>
由于自然灾害暴动战争行为政府行为通电信网络黑客攻击尚无有效防御措施的计算机病毒的发作及其他各方不能预见并且对其发生和后果不能防止并避免的不可抗力原因致使凡香道滇官方商城延迟或未能履约的香道滇公司不对您承担任何责任
</span>
</view>
<view class="MsoNormal"><span lang="EN-US" style="font-size:28rpx">&nbsp;</span></view>
</view>
</view>
</template>
<scrirpx>
export default {
data() {
return {
}
},
methods: {
}
}
</scrirpx>
<style>
.container {
padding: 0 20rpx;
}
</style>
+111
View File
@@ -0,0 +1,111 @@
<template>
<view class="my-account">
<view class="wrapper">
<view class="header">
<view class="headerCon">
<view class="account acea-row row-top row-between">
<view class="assets">
<view style="color: #fff;">总资产()</view>
<view class="money">{{ now_money }}</view>
</view>
<!-- <navigator url="/pagesUser/user/Recharge/index" class="recharge font-color-red">充值</navigator> -->
</view>
<view class="cumulative acea-row row-top">
<view class="item">
<view style="color: #fff;">累计消费()</view>
<view class="money">{{ orderStatusSum }}</view>
</view>
</view>
</view>
</view>
<view class="nav acea-row row-middle">
<view class="item" @click="goUserBill(0)">
<view class="pictrue">
<image :src="webUrl+'/20230304202916716809.png'" />
</view>
<view>账单记录</view>
</view>
<view class="item" @click="goUserBill(1)">
<view class="pictrue">
<image :src="webUrl+'/20230304202923197491.png'" />
</view>
<view>消费记录</view>
</view>
</view>
<view class="advert acea-row row-between-wrapper"></view>
</view>
<Recommend></Recommend>
</view>
</template>
<script>
import Recommend from "@/components/Recommend";
import { getActivityStatus, getBalance } from "@/api/user";
export default {
name: "UserAccount",
components: {
Recommend
},
props: {},
data: function() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
now_money: 0,
orderStatusSum: 0,
recharge: 0,
activity: {
is_bargin: false,
is_pink: false,
is_seckill: false
}
};
},
onShow: function() {
this.getIndex();
// this.getActivity();
},
methods: {
goUserBill(types) {
this.$yrouter.push({
path: "/pagesUser/user/UserBill/index",
query: { types }
});
},
getIndex: function() {
let that = this;
getBalance().then(
res => {
that.now_money = res.data.now_money;
that.orderStatusSum = res.data.orderStatusSum;
that.recharge = res.data.recharge;
},
err => {
uni.showToast({
title:
err.msg || err.response.data.msg || err.response.data.message,
icon: "none",
duration: 2000
});
}
);
},
getActivity: function() {
let that = this;
getActivityStatus().then(
res => {
that.activity.is_bargin = res.data.is_bargin;
that.activity.is_pink = res.data.is_pink;
that.activity.is_seckill = res.data.is_seckill;
},
err => {
uni.showToast({
title:
err.msg || err.response.data.msg || err.response.data.message,
icon: "none",
duration: 2000
});
}
);
}
}
};
</script>
+128
View File
@@ -0,0 +1,128 @@
<template>
<view class="bill-details" ref="container">
<view class="nav acea-row">
<view class="item" :class="types == 0 ? 'on' : ''" @click="changeTypes(0)">全部</view>
<view class="item" :class="types == 1 ? 'on' : ''" @click="changeTypes(1)">消费</view>
<view class="item" :class="types == 2 ? 'on' : ''" @click="changeTypes(2)">充值</view>
</view>
<view class="sign-record">
<view class="list">
<view class="item" v-for="(item, listIndex) in list" :key="listIndex">
<view class="data">{{ item.time }}</view>
<view class="listn" v-for="(val, key) in item.list" :key="key">
<view class="itemn acea-row row-between-wrapper">
<view>
<view class="name line1">{{ val.title }}</view>
<view>{{ val.addTime }}</view>
</view>
<view
class="num"
:class="val.pm == 0 ? 'font-color-red' : ''"
>{{ val.pm == 0 ? "-" : "+" }}{{ force2Decimal(val.number) }}</view>
</view>
</view>
</view>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
<view v-if="loaded && list.length === 0">
<image :src="webUrl + '/noConsumption.png'" class="no-data"></image>
</view>
</view>
</template>
<script>
import { getCommissionInfo } from "@/api/user";
import Loading from "@/components/Loading";
import { pageListenMixins } from '@/mixins/pageListenMixins'
export default {
name: "UserBill",
components: {
Loading
},
mixins: [pageListenMixins],
data: function() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
types: 0,
where: {
page: 1,
limit: 5
},
list: [],
loaded: false,
loading: false,
pageKeyId: Object.freeze('userBalanceBill')
};
},
watch: {
"$yroute.query.types": function(newVal) {
let that = this;
if (newVal != undefined) {
that.types = newVal;
that.list = [];
that.where.page = 1;
that.loaded = false;
that.loading = false;
that.getIndex();
}
},
types: function() {
this.getIndex();
}
},
mounted: function() {
let that = this;
that.types = that.$yroute.query.types||0;
that.getIndex();
},
onReachBottom() {
!this.loading && this.getIndex();
},
methods: {
force2Decimal(v){
return this.$force2Decimal(v);
},
code: function() {
this.sendCode();
},
changeTypes: function(val) {
if (val != this.types) {
this.types = val;
this.list = [];
this.where.page = 1;
this.loaded = false;
this.loading = false;
}
},
getIndex: function() {
let that = this;
if (that.loaded == true || that.loading == true) return;
that.loading = true;
getCommissionInfo(that.where, that.types).then(
res => {
that.loading = false;
that.loaded = res.data.length < that.where.limit;
that.where.page = that.where.page + 1;
that.list.push.apply(that.list, res.data);
},
err => {
uni.showToast({
title: err.msg || err.response.data.msg|| err.response.data.message,
icon: 'none',
duration: 2000
});
}
);
}
}
};
</script>
<style lang="less" scoped>
.no-data {
display: block;
width: 500rpx;
height: 500rpx;
margin: 100rpx auto;
}
</style>
@@ -0,0 +1,316 @@
<template>
<view class="newsList" ref="container">
<mescroll-body ref="mescrollRef" top="0" bottom="0" class='cotent-scroll' :up="upOption" :down="downOption" @up="upCallback" @down="downCallback" @init="mescrollInit" @emptyclick="emptyClick">
<view class="list" v-for="(item, index) in list" :key="index">
<view @click="goNewsDetail(item)" class="item acea-row" style="flex-wrap: nowrap;">
<view class="text acea-row row-column-between">
<view class="acea-row row-column" style="position: relative;">
<view class="name line2">{{ item.name }}</view>
<view class="summary line1" style="width: 322rpx;">{{ shortDateString(item.createdTime) }}</view>
</view>
<view class="acea-row row-left row-middle">
<view class="see-num-box acea-row row-middle" style="margin-right: 20rpx;">
<image :src="webUrl+'/20230304131559277594.png'" class="eye-icon" mode=""></image>
<text class="see-num-text">{{$formatCount(item.pv||0)}}</text>
</view>
<view class="zan-num-box acea-row row-middle">
<img class="zan-icon" :src="webUrl+'/20230304133322439350.png'" />
<text class="zan-num-text">{{$formatCount(item.zan||0)}}</text>
</view>
</view>
</view>
<view class="pictrue">
<image v-if="item.type=='NT_TEXT'" style="width: 100%;height: 100%;" :src="item.resources[0]" />
<video v-if="item.type=='NT_VIDEO'" style="width: 100%;height: 100%;" :src="item.resources[0]"></video>
</view>
</view>
</view>
<view id="loading-more"></view>
</mescroll-body>
</view>
</template>
<script>
import MescrollMixins from "@/mixins/mescroll-mixins.js";
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue";
import { getHotelNewsZanList } from "@/api/inn.js";
import { formatDateTime,isNullOrEmpty} from "@/utils";
var _this;
export default {
data() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
list:[],
upOption:{
noMoreSize: 10, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
auto:true,
empty:{
tip: '暂无数据' // 提示
// btnText:'点击刷新'
}
},
downOption:{
auto:false
}
}
},
components:{
MescrollBody
},
mixins:[
MescrollMixins({
getPageData(mescroll){
var _this = this;
// 此时mescroll会携带page的参数:
let pageNum = mescroll.num; // 页码, 默认从1开始
let pageSize = mescroll.size; // 页长, 默认每页10条
var params = {
limit:pageNum,
page:pageSize
}
getHotelNewsZanList(params)
.then(res => {
if(mescroll.num == 1) {
_this.list = []; //如果是第一页需手动制空列表
}
_this.list = _this.list.concat(res.data);//追加新数据
mescroll.endSuccess(res.data.length);
})
.catch(err => {
console.log(err);
mescroll.endErr();
uni.showToast({
title: err.msg || '请求出错',
icon: 'none',
mask: false,
duration: 1500
});
})
}
})
],
onLoad:function(e){
_this = this;
//从query里取模式
//this.isSelectMode = this.$yroute.query.isSelected;
},
onShow:function(){
//静默刷新
this.mescroll && this.mescroll.resetUpScroll(false);
},
methods: {
isNullOrEmpty,
shortDateString(dateStr){
var ret = '';
if (isNullOrEmpty(dateStr)) {
} else{
// var s = dataStr;
// s = s.replace(/-/g,"/");
// var date = new Date(s).getTime();
ret = formatDateTime(dateStr,'yyyy-MM-dd HH:mm:ss');
}
return ret;
},
goNewsDetail:function(item){
this.$yrouter.push('/pagesInn/inn/innInfoDetail?id='+item.id);
}
}
}
</script>
<style scoped lang="less">
.pink-dot{
width:24rpx;
height:24rpx;
background:rgba(255,86,74,0.4);
border-radius:50%;
position: absolute;
z-index: 0;
bottom: 0;
right: -12rpx;
}
.main-title{
font-size: 36rpx;
line-height: 36rpx;
// color: #080F1A;
color: #FFFFFF;
position: relative;
}
.eye-icon{
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
}
.zan-icon{
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
}
.zan-num-text{
color: #080F1A;
font-size: 24rpx;
}
.see-num-text{
color: #080F1A;
font-size: 24rpx;
}
.newsList .list .item .text .name{
color: #080F1A !important;
font-size: 32rpx;
font-weight: bold;
}
.newsList .list .item .text{
margin-right: 10rpx;
width: auto !important;
height: auto !important;
}
.newsList .list .item .pictrue{
flex-shrink: 0;
width: 288rpx !important;
height: 216rpx !important;
}
.newsList .list .item{
background-color: #fff;
flex-wrap: nowrap;
padding: 35rpx !important;
margin: 35rpx 30rpx !important;
border-radius: 8rpx;
}
.summary{
color: #C2C5CC;
font-size: 24rpx;
}
.sub-title{
font-size:14*2rpx;
margin-top: 10rpx;
color:rgba(252,85,179,0.7);
}
.title .hot-title{
font-size: 18*2rpx;
color: #FF7900;
background:rgba(255,255,255,1);
margin-left: 5*2rpx;
margin-right: 5*2rpx;
}
.hotGoodsList{
position: relative;
margin: 35rpx 0;
background-color: #fff;
flex-wrap: wrap;
}
.hotGoodsList .newProductsItem{
margin-left: 35rpx;
margin-top: 20rpx;
}
.img-box{
position: relative;
}
.price-tag{
position: absolute;
width: 39*2rpx;
height: 19*2rpx;
left: 0;
top: 0;
}
.like-btn{
position: absolute;
width: 24*2rpx;
height: 24*2rpx;
right: 0;
top: 0;
}
.inn-tag-wrap{
margin-top: 10rpx;
margin-bottom: 10rpx;
}
.zanmost-tag{
padding: 2rpx 8rpx 2rpx 8rpx;
background: #FF2D69;
font-size: 10*2rpx;
color: #FFFFFF;
}
.latest-tag{
padding: 2rpx 8rpx 2rpx 8rpx;
background: #0DC5C5;
font-size: 10*2rpx;
color: #FFFFFF;
margin-left: 8rpx;
}
.location-tag{
padding: 2rpx 8rpx 2rpx 8rpx;
background: #FD685D;
font-size: 10*2rpx;
color: #FFFFFF;
margin-left: 8rpx;
}
.inn-shop-icon{
border-radius: 50%;
width: 24*2rpx;
height: 24*2rpx;
}
.inn-shop-name{
font-size: 24rpx;
color: #080F1A;
}
.inn-shop-date{
font-size: 18rpx;
color: #C2C5CC;
}
.location{
padding: 4rpx 16rpx;
background: #FFFFFF;
border-radius: 22rpx;
}
.city-name{
color: #FD685D;
font-size: 24rpx;
margin-left: 4rpx;
}
.btLine{
width: 100%;
height: 12rpx;
margin-top: -4rpx;
background: #FD685D;
}
.pro-info{
font-size: 14*2rpx;
}
</style>
+209
View File
@@ -0,0 +1,209 @@
<template>
<view class="member-center">
<view class="header">
<view class="slider-banner banner">
<swiper indicatorDots="true" @change="swiperChange">
<block v-for="(item, vipListIndex) in vipList" :key="vipListIndex">
<swiper-item>
<view class="swiper-slide" :style="{ backgroundImage: 'url(' + item.image + ')' }">
<!-- <image :src="item.icon" />-->
<view class="name">{{ item.name }}</view>
<view class="discount">
可享受商品折扣: {{ item.discount / 10 }}
<text class="iconfont icon-zhekou"></text>
</view>
<view class="nav acea-row" v-if="item.grade == grade">
<view class="item" v-for="(val, indexn) in vipComplete" :key="indexn">
<view class="num">{{ val.newNumber }}</view>
<view>{{ val.realName }}</view>
</view>
</view>
<view class="lock" v-if="item.grade > grade">
<text class="iconfont icon-quanxianguanlisuozi"></text>该会员等级尚未解锁
</view>
<view class="lock" v-if="item.grade < grade">
<text class="iconfont icon-xuanzhong1"></text>已解锁更高等级
</view>
</view>
</swiper-item>
</block>
</swiper>
</view>
</view>
<view class="wrapper">
<view class="title acea-row row-between-wrapper">
<view>
<text class="iconfont icon-jingyanzhi"></text>会员升级要求
</view>
<view class="num">
<text class="current">{{ taskCount }}</text>
/{{ vipRequire.length }}
</view>
</view>
<view class="list">
<view class="item" v-for="(item, vipCompleteIndex) in vipComplete" :key="vipCompleteIndex">
<view class="top acea-row row-between-wrapper">
<view class="name">
{{ item.name}}
<text class="iconfont icon-wenti" v-if="item.illustrate" @click="showGrow(item)"></text>
</view>
<view>{{ item.finish ? "已满足条件" : "未满足条件" }}</view>
</view>
<view class="cu-progress">
<view class="bg-red" :style="{ width: item.speed + '%' }"></view>
</view>
<view class="experience acea-row row-between-wrapper">
<view>{{ item.taskTypeTitle }}</view>
<view>
<text class="num">{{ item.newNumber }}</text>
/{{ item.number }}
</view>
</view>
</view>
</view>
</view>
<Recommend></Recommend>
<view class="growthValue" :class="growthValue === false ? 'on' : ''">
<view class="pictrue">
<image :src="webUrl+'/20200729164901293388.jpg'" />
<text class="iconfont icon-guanbi3" @click="growthTap"></text>
</view>
<view class="conter">{{ illustrate }}</view>
</view>
<view class="mask" :hidden="growthValue" @click="growthTap"></view>
</view>
</template>
<script>
// import { swiper, swiperSlide } from "vue-awesome-swiper";
import Recommend from "@/components/Recommend";
import { getVipInfo, getVipTask, setDetection } from "@/api/user";
export default {
name: "Poster",
components: {
// swiper,
// swiperSlide,
Recommend
},
props: {},
data: function() {
return {
webUrl:this.$VUE_APP_RESOURCES_URL,
vipList: [], //等级列表
vipRequire: [], //等级要求
vipComplete: [], //完成情况
taskCount: 0, //任务数
grade: 0, //当前会员等级
swiperVip: {
speed: 1000,
effect: "coverflow",
slidesPerView: "auto",
centeredSlides: true,
// loop: true,
coverflowEffect: {
rotate: 0, // 旋转的角度
stretch: -20, // 拉伸 图片间左右的间距和密集度
depth: 100, // 深度 切换图片间上下的间距和密集度
modifier: 2, // 修正值 该值越大前面的效果越明显
slideShadows: false // 页面阴影效果
},
observer: true,
observeParents: true
},
loading: false,
growthValue: true,
illustrate: "",
activeIndex: 0
};
},
watch: {
vipList: function() {
let that = this;
if (that.vipList.length > 0) {
that.vipList.forEach(function(item, index) {
if (item.isClear === false) {
// that.swiper.slideTo(index);
that.activeIndex = index;
that.grade = item.grade;
}
});
}
}
},
computed: {
swiper() {
// return this.$refs.mySwiper.swiper;
}
},
mounted: function() {
let that = this;
setDetection();
that.getInfo();
// that.swiper.on("slideChange", function() {
// that.activeIndex = that.swiper.activeIndex;
// that.getTask();
// });
},
methods: {
swiperChange: function(e) {
let that = this;
that.activeIndex = e.mp.detail.current;
that.getTask();
},
growthTap: function() {
this.growthValue = true;
},
getInfo: function() {
let that = this;
getVipInfo().then(
res => {
that.vipList = res.data.list;
that.vipRequire = res.data.task.list;
that.vipComplete = res.data.task.task;
that.taskCount = res.data.task.reachCount;
},
err => {
uni.showToast({
title:
err.msg || err.response.data.msg || err.response.data.message,
icon: "none",
duration: 2000
});
}
);
},
getTask: function() {
let that = this;
getVipTask(that.vipList[that.activeIndex].id).then(
res => {
that.vipRequire = res.data.list;
that.vipComplete = res.data.task;
that.taskCount = res.data.reach_count;
},
err => {
uni.showToast({
title:
err.msg || err.response.data.msg || err.response.data.message,
icon: "none",
duration: 2000
});
}
);
},
showGrow: function(item) {
if (this.illustrate != item.illustrate) this.illustrate = item.illustrate;
this.growthValue = false;
}
}
};
</script>
<style lang="less">
.banner swiper {
height: 328rpx;
}
.swiper-slide {
margin: 0 auto;
}
</style>
@@ -0,0 +1,32 @@
<template>
<view class="cash-audit">
<view class="pictrue">
<image :src="`${staticUrl}/examine.png`" />
</view>
<view class="tip">提现申请已提交等待人工审核</view>
<view class="time">{{ time }}</view>
<view class="bnt bg-color-red" @click="goUserPromotion()">好的</view>
</view>
</template>
<script>
export default {
name: "CashAudit",
components: {},
props: {},
data: function() {
return {
staticUrl:this.$STATIC_RESOURCE_URL,
time: ""
};
},
mounted: function() {
let myData = new Date();
this.time = myData.toLocaleString();
},
methods: {
goUserPromotion() {
this.$yrouter.back();
}
}
};
</script>
@@ -0,0 +1,122 @@
<template>
<view class="commission-details" ref="container">
<view class="promoterHeader bg-color-red">
<view class="headerCon acea-row row-between-wrapper">
<view>
<view class="name">佣金明细</view>
<view class="money">
<text class="num">{{ force2Decimal(commission) }}</text>
</view>
</view>
</view>
</view>
<view class="sign-record" ref="content">
<view class="list">
<view class="item" v-for="(item, infoIndex) in info" :key="infoIndex">
<view class="data">{{ item.time }}</view>
<view class="listn" v-for="(val, indexn) in item.list" :key="indexn">
<view class="itemn acea-row row-between-wrapper">
<view>
<view class="name line1">{{ val.title }}</view>
<view>{{ val.addTime }}</view>
</view>
<view class="">
<view class="" style="flex-shrink: 0;text-align: right;">{{val.status==0?"待收货确定":(val.status==1?"有效":"无效")}}</view>
<view class="">
<view class="num" v-if="val.pm == 1">+{{ force2Decimal(val.number) }}</view>
<view class="num font-color-red" v-if="val.pm == 0">
-{{ force2Decimal(val.number) }}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</view>
</template>
<script>
import { getCommissionInfo, getSpreadInfo } from "@/api/user";
import Loading from "@/components/Loading";
import { pageListenMixins } from '@/mixins/pageListenMixins'
export default {
name: "CommissionDetails",
components: {
Loading
},
mixins: [pageListenMixins],
data: function() {
return {
info: [],
commission: 0,
where: {
page: 1,
limit: 3
},
types: 9,//3,
loaded: false,
loading: false,
pageKeyId: Object.freeze('userSpreadBill')
};
},
mounted: function() {
this.getCommission();
this.getIndex();
},
onReachBottom() {
this.loading === false && this.getIndex();
},
methods: {
force2Decimal(v){
return this.$force2Decimal(v);
},
getIndex: function() {
let that = this;
if (that.loading == true || that.loaded == true) return;
that.loading = true;
getCommissionInfo(that.where, that.types).then(
res => {
that.loading = false;
that.loaded = res.data.length < that.where.limit;
that.loadTitle = that.loaded ? "人家是有底线的" : "上拉加载更多";
that.where.page = that.where.page + 1;
that.info.push.apply(that.info, res.data);
},
err => {
uni.showToast({
title: err.msg || err.response.data.msg|| err.response.data.message,
icon: 'none',
duration: 2000
});
}
);
},
getCommission: function() {
let that = this;
getSpreadInfo().then(
res => {
that.commission = res.data.commissionCount;
},
err => {
uni.showToast({
title: err.msg || err.response.data.msg|| err.response.data.message,
icon: 'none',
duration: 2000
});
}
);
}
}
};
</script>
<style scoped lang="less">
.promoterHeader {
.headerCon {
box-sizing: border-box;
}
}
</style>
+160
View File
@@ -0,0 +1,160 @@
<template>
<view class="distribution-posters">
<view class="slider-banner banner">
<swiper indicatorDots="true">
<block v-for="(item, infoIndex) in info" :key="infoIndex">
<swiper-item>
<image
class="slide-image"
:src="item.wap_poster"
mode="widthFix"
show-menu-by-longpress
/>
</swiper-item>
</block>
</swiper>
</view>
<view class="keep bg-color-red" @click="saveImg">保存海报</view>
</view>
</template>
<script>
// import { swiper, swiperSlide } from "vue-awesome-swiper";
import { getSpreadImg } from "@/api/user";
export default {
name: "Poster",
components: {
// swiper,
// swiperSlide
},
props: {},
data: function() {
return {
swiperPosters: {
speed: 1000,
effect: "coverflow",
slidesPerView: "auto",
centeredSlides: true,
coverflowEffect: {
rotate: 0, // 旋转的角度
stretch: -20, // 拉伸 图片间左右的间距和密集度
depth: 100, // 深度 切换图片间上下的间距和密集度
modifier: 3, // 修正值 该值越大前面的效果越明显
slideShadows: false // 页面阴影效果
},
observer: true,
observeParents: true
},
info: [],
activeIndex: 0
};
},
mounted: function() {
this.getIndex();
let that = this;
// this.swiper.on("slideChange", function() {
// that.activeIndex = that.swiper.activeIndex;
// });
},
computed: {
swiper() {
// return this.$refs.mySwiper.swiper;
}
},
methods: {
getIndex: function() {
let that = this;
let from = {};
if (this.$deviceType == "app") {
from.from = "app";
}
getSpreadImg(from).then(
res => {
that.info = res.data;
},
err => {
uni.showToast({
title: err.msg || err.response.data.msg|| err.response.data.message,
icon: "none",
duration: 2000
});
}
);
},
downloadIamge: function(imgsrc, name) {
var that = this;
this.isDown = true;
var downloadUrl = imgsrc;
if (!wx.saveImageToPhotosAlbum) {
uni.showModal({
title: "提示",
content:
"当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。"
});
that.openDialogVisible = true;
return;
}
// 可以通过 wx.getSetting 先查询一下用户是否授权了 "scope.writePhotosAlbum" 这个 scope
wx.getSetting({
success(res) {
if (!res.authSetting["scope.writePhotosAlbum"]) {
that.openDialogVisible = true;
// 接口调用询问
wx.authorize({
scope: "scope.writePhotosAlbum",
success() {
that.downloadImage(downloadUrl);
},
fail() {
// 用户拒绝了授权
// 打开设置页面
wx.openSetting({
success: function(data) {},
fail: function(data) {}
});
}
});
} else {
that.downloadImage(downloadUrl);
}
},
fail(res) {
that.openDialogVisible = true;
}
});
},
saveImg: function() {
this.downloadIamge(
this.info[this.activeIndex].wap_poster,
"poster" + this.activeIndex
);
}
}
};
</script>
<style lang="less">
page {
height: 100%;
}
.distribution-posters {
height: 100%;
}
.banenr {
height: 100%;
}
.banner swiper {
height: 100%;
}
.banner .slide-image {
width: 100%;
height: auto;
}
</style>
@@ -0,0 +1,361 @@
<template>
<view class="promoter-list" ref="container">
<view class="header">
<!-- 搜索开始 -->
<view class="search acea-row row-between-wrapper" style="background-color: #F5F5F5 !important;margin-top: 22rpx;">
<form @submit.prevent="submitForm" style="width: 100% !important;">
<view class="input" style="text-align: left !important;background: #fff !important;width: auto !important;">
<text class="iconfont icon-sousuo2"
style="left: 28rpx !important;right: auto !important;margin-right: 10rpx;font-size: 32rpx !important;color: #9D9D9D !important;"></text>
<input style="margin-left: 70rpx !important;text-align: left !important;color: #CCCCCC !important;"
placeholder="点击搜索会员名称" placeholder-style="color:#CCCCCC" v-model="screen.keyword"
@confirm="submitForm"/>
<!-- <text class="iconfont icon-guanbi"></text> -->
</view>
</form>
</view>
<!-- 搜索结束 -->
<view class="promoterHeader" style="height: 160rpx !important;">
<view class="headerCon acea-row row-between-wrapper"
style="width: auto !important;padding: 0 32rpx !important;">
<view class="acea-row row-column">
<view class="name"
style="color: #000000 !important;font-size: 32rpx !important;font-weight: 500;margin-bottom: 20rpx;">
{{ first + second || '0' }}
</view>
<view style="color: #8C8C8C;font-size: 24rpx;"> 推广人数()</view>
</view>
<view class="acea-row row-middle">
<view class="dropDownBtn acea-row row-middle row-center" @click="changeGrade()">
<text style="color: #fff;font-size: 24rpx;margin-right: 28rpx;">
{{ screen.grade == 0 ? '一级' : '二级' }}
</text>
<image style="width: 24rpx;height: 12rpx;" :src="webUrl+'/20210819151908963957.png'" mode=""></image>
</view>
</view>
</view>
</view>
<!-- 一二级筛选 -->
<!-- <view class="nav acea-row row-around">
<view
class="item"
:class="screen.grade == 0 ? 'on' : ''"
@click="checkGrade(0)"
>一级({{ first||'0' }})</view>
<view
class="item"
:class="screen.grade == 1 ? 'on' : ''"
@click="checkGrade(1)"
>二级({{ second||'0' }})</view>
</view> -->
<!-- 一二级筛选 -->
</view>
<view class="list">
<view class="sortNav acea-row row-middle" :class="fixedState === true ? 'on' : ''">
<view class="sortItem" :style="(childCount === 1 || childCount === 3) ? 'color:#0DC5C5' : ''"
@click="sort('childCount')">
团队排序
<image :src="webUrl+'/20230304204227252460.png'" v-if="childCount == 1"/>
<image :src="webUrl+'/20230304204233362231.png'" v-if="childCount == 2"/>
<image :src="webUrl+'/20230304204240497772.png'" v-if="childCount == 3"/>
</view>
<view class="sortItem" :style="(numberCount === 1 || numberCount === 3) ? 'color:#0DC5C5' : ''"
@click="sort('numberCount')">
金额排序
<image :src="webUrl+'/20230304204227252460.png'" v-if="numberCount == 1"/>
<image :src="webUrl+'/20230304204233362231.png'" v-if="numberCount == 2"/>
<image :src="webUrl+'/20230304204240497772.png'" v-if="numberCount == 3"/>
</view>
<view class="sortItem" :style="(orderCount === 1 || orderCount === 3) ? 'color:#0DC5C5' : ''"
@click="sort('orderCount')">
订单排序
<image :src="webUrl+'/20230304204227252460.png'" v-if="orderCount == 1"/>
<image :src="webUrl+'/20230304204233362231.png'" v-if="orderCount == 2"/>
<image :src="webUrl+'/20230304204240497772.png'" v-if="orderCount == 3"/>
</view>
<view class="sortItem" :style="(levelCount === 1 || levelCount === 3) ? 'color:#0DC5C5' : ''"
@click="sort('levelCount')">
等级排序
<image :src="webUrl+'/20230304204227252460.png'" v-if="levelCount == 1"/>
<image :src="webUrl+'/20230304204233362231.png'" v-if="levelCount == 2"/>
<image :src="webUrl+'/20230304204240497772.png'" v-if="levelCount == 3"/>
</view>
</view>
<view :class="fixedState === true ? 'sortList' : ''">
<view
class="item acea-row row-between-wrapper"
v-for="(val, spreadListIndex) in spreadList"
:key="spreadListIndex"
>
<view class="picTxt acea-row row-between-wrapper" style="flex-wrap: nowrap;">
<view class="" style="width: 60rpx;word-wrap: break-word;text-align: center;margin-right: 8rpx;">
{{ spreadListIndex + 1 }}
</view>
<view class="pictrue" style="flex-shrink: 0;margin-right: 8rpx;">
<image :src="val.avatar"/>
</view>
<view class="text">
<view class="name line1 acea-row row-middle">{{ val.nickname }}
<text class="levelBox">{{ val.levelName }}</text>
</view>
<view style="color: #999999 !important;">加入时间: {{ val.time }}</view>
</view>
</view>
<view class="right">
<view>
<text class="font-color-red">{{ val.childCount }}</text>
</view>
<view>{{ val.orderCount }}</view>
<view>
<text class="font-color-red">{{ val.numberCount ? val.numberCount : 0 }}</text>
</view>
</view>
</view>
</view>
<view class="v12-px-6" v-if="spreadList.length === 0">
<u-divider :text=" ' · 此级别未找到会员 · ' " textPosition="center"></u-divider>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</view>
</template>
<script>
import {getSpreadUser} from "@/api/user";
import Loading from "@/components/Loading";
import { pageListenMixins } from '@/mixins/pageListenMixins'
export default {
name: "PromoterList",
components: {
Loading
},
mixins: [pageListenMixins],
data: function () {
return {
fixedState: false,
screen: {
page: 1,
limit: 15,
grade: 0,
keyword: "",
sort: ""
},
childCount: 2,
numberCount: 2,
orderCount: 2,
levelCount: 2,
loaded: false,
loading: false,
spreadList: [],
loadTitle: "",
first: "",
second: "",
webUrl: this.$VUE_APP_RESOURCES_URL,
pageKeyId: Object.freeze('userSpreadStat')
};
},
mounted: function () {
this.getSpreadUsers();
},
onReachBottom() {
!this.loading && this.getSpreadUsers();
},
watch: {
"screen.sort": function () {
this.screen.page = 1;
this.loaded = false;
this.loading = false;
this.spreadList = [];
this.getSpreadUsers();
}
},
methods: {
changeGrade: function () {
var that = this;
uni.showActionSheet({
itemList: ['一级', '二级'],
success: function (res) {
console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
that.checkGrade(res.tapIndex);
},
fail: function (res) {
}
});
},
handleScroll: function () {
// var scrollTop =
// document.documentElement.scrollTop || document.body.scrollTop;
// var offsetTop = document.querySelector(".header").clientHeight;
// if (scrollTop >= offsetTop) {
// this.fixedState = true;
// } else {
// this.fixedState = false;
// }
},
submitForm: function () {
this.screen.page = 1;
this.loaded = false;
this.loading = false;
this.spreadList = [];
this.getSpreadUsers();
},
getSpreadUsers: function () {
let that = this,
screen = that.screen;
if (that.loaded || that.loading) return;
that.loading = true;
getSpreadUser(screen).then(
res => {
that.loading = false;
that.spreadList.push.apply(that.spreadList, res.data.list);
that.loaded = res.data.list.length < that.screen.limit; //判断所有数据是否加载完成;
that.loadTitle = that.loaded ? "人家是有底线的" : "上拉加载更多";
that.screen.page = that.screen.page + 1;
that.first = res.data.total;
that.second = res.data.totalLevel;
},
err => {
uni.showToast({
title:
err.msg || err.response.data.msg || err.response.data.message,
icon: "none",
duration: 2000
});
},
300
);
},
checkGrade: function (val) {
if (val == this.screen.grade) return;
else {
this.screen.page = 1;
this.screen.grade = val;
this.loading = false;
this.loaded = false;
this.spreadList = [];
this.getSpreadUsers();
}
},
sort: function (types) {
let that = this;
switch (types) {
case "childCount":
if (that.childCount == 2) {
that.childCount = 1;
that.orderCount = 2;
that.numberCount = 2;
that.levelCount = 2;
that.screen.sort = "childCount DESC";
} else if (that.childCount == 1) {
that.childCount = 3;
that.orderCount = 2;
that.numberCount = 2;
that.levelCount = 2;
that.screen.sort = "childCount ASC";
} else if (that.childCount == 3) {
that.childCount = 2;
that.orderCount = 2;
that.numberCount = 2;
that.levelCount = 2;
that.screen.sort = "";
}
break;
case "numberCount":
if (that.numberCount == 2) {
that.numberCount = 1;
that.orderCount = 2;
that.childCount = 2;
that.levelCount = 2;
that.screen.sort = "numberCount DESC";
} else if (that.numberCount == 1) {
that.numberCount = 3;
that.orderCount = 2;
that.childCount = 2;
that.levelCount = 2;
that.screen.sort = "numberCount ASC";
} else if (that.numberCount == 3) {
that.numberCount = 2;
that.orderCount = 2;
that.childCount = 2;
that.levelCount = 2;
that.screen.sort = "";
}
break;
case "orderCount":
if (that.orderCount == 2) {
that.orderCount = 1;
that.numberCount = 2;
that.childCount = 2;
that.levelCount = 2;
that.screen.sort = "orderCount DESC";
} else if (that.orderCount == 1) {
that.orderCount = 3;
that.numberCount = 2;
that.childCount = 2;
that.levelCount = 2;
that.screen.sort = "orderCount ASC";
} else if (that.orderCount == 3) {
that.orderCount = 2;
that.numberCount = 2;
that.childCount = 2;
that.levelCount = 2;
that.screen.sort = "";
}
break;
case "levelCount":
if (that.levelCount == 2) {
that.levelCount = 1;
that.orderCount = 2;
that.numberCount = 2;
that.childCount = 2;
that.screen.sort = "level desc";
} else if (that.levelCount == 1) {
that.levelCount = 3;
that.orderCount = 2;
that.numberCount = 2;
that.childCount = 2;
that.screen.sort = "level ASC";
} else if (that.levelCount == 3) {
that.levelCount = 2;
that.orderCount = 2;
that.numberCount = 2;
that.childCount = 2;
that.screen.sort = "";
}
break;
default:
that.screen.sort = "";
}
}
}
};
</script>
<style scoped>
.dropDownBtn {
width: 176rpx;
height: 60rpx;
background: #0DC5C5;
box-shadow: 0px 8rpx 14rpx rgba(179, 188, 191, 0.6);
opacity: 1;
border-radius: 8rpx;
}
.levelBox {
padding: 0 10rpx;
font-size: 18rpx;
line-height: 28rpx;
height: 28rpx;
background: #FF564A;
color: #fff;
border-radius: 14rpx;
margin-left: 14rpx;
}
</style>
@@ -0,0 +1,134 @@
<template>
<view class="promoter-order" ref="container">
<view class="promoterHeader bg-color-red">
<view class="headerCon acea-row row-between-wrapper" style="flex-wrap: nowrap;">
<view style="flex-shrink: 0;margin-right: 40rpx;">
<text class="name">累计推广订单</text>
<view>
<text class="num">{{ count||'0' }}</text>
<text></text>
</view>
</view>
<view class="" style="flex-grow: 1;font-size: 24rpx;">
{{ ruleText }}
</view>
</view>
</view>
<view class="list">
<view class="item" v-for="(item, listIndex) in list" :key="listIndex">
<view class="title acea-row row-column row-center">
<view class="data">{{ item.time }}</view>
<text>本月累计推广订单{{ item.count ? item.count : 0 }}</text>
</view>
<view class="listn">
<view class="itenm" v-for="(val, indexn) in item.child" :key="indexn">
<view class="top acea-row row-between-wrapper">
<view class="pictxt acea-row row-between-wrapper">
<view class="pictrue">
<image :src="val.avatar" />
</view>
<text class="text line1">{{ val.nickname }}</text>
</view>
<view class="money">
<text>返佣</text>
<text class="font-color-red">{{ val.number ? val.number : 0 }}</text>
</view>
</view>
<view class="bottom">
<view class="acea-row row-between" style="flex-wrap: nowrap;">
<view style="flex-grow: 1;">
<text class="name">订单金额</text>
<text class="font-color-red">{{ val.payPrice || 0 }}({{ val.totalPrice || 0 }}+{{ val.totalPostage || 0 }}运费)</text>
</view>
<view class="" style="flex-shrink: 0;">{{val.billStatus==0?"待收货确定":(val.billStatus==1?"有效":"无效")}}</view>
</view>
<view>
<text class="name">订单号</text>
{{ val.orderId }}
</view>
<view>
<text class="name">下单时间</text>
{{ val.time }}
</view>
</view>
</view>
</view>
</view>
</view>
<Loading :loaded="loaded" :loading="loading"></Loading>
</view>
</template>
<script>
import { getSpreadOrder, getUserSpreadRule } from "@/api/user";
import Loading from "@/components/Loading";
import { pageListenMixins } from '@/mixins/pageListenMixins'
export default {
name: "PromoterOrder",
components: {
Loading
},
mixins: [pageListenMixins],
data: function() {
return {
list: [],
where: {
page: 1,
limit: 15
},
loaded: false,
loading: false,
loadTitle: '',
count: '',
ruleText: '',
pageKeyId: Object.freeze('userSpreadOrder')
}
},
mounted() {
this.getIndex()
this.getRuleText()
},
onReachBottom() {
!this.loading && this.getIndex()
},
methods: {
getRuleText() {
getUserSpreadRule().then(res => {
const { success, data } = res
if (success) {
this.ruleText = data.userSpreadRule || ''
}
})
},
getIndex() {
let there = this
if (there.loaded == true || there.loading == true) return
there.loading = true
getSpreadOrder(there.where).then(
res => {
there.loading = false
there.loaded = res.data.list.length < there.where.limit
there.loadTitle = there.loaded ? "人家是有底线的" : "上拉加载更多"
there.where.page = there.where.page + 1
there.list.push.apply(there.list, res.data.list)
there.count = res.data.count
},
err => {
uni.showToast({
title: err.msg || err.response.data.msg|| err.response.data.message,
icon: "none",
duration: 2000
})
}
)
}
}
};
</script>
<style>
.promoterHeader .headerCon{
width: auto !important;
padding: 0 20rpx 0 20rpx !important;
}
</style>
+212
View File
@@ -0,0 +1,212 @@
<template>
<view class="cash-withdrawal">
<view class="nav acea-row">
<view
v-for="(item, navListIndex) in navList"
class="item font-color-red"
@click="swichNav(navListIndex, item)"
:key="navListIndex"
>
<view class="line bg-color-red" :class="currentTab === navListIndex ? 'on' : ''"></view>
<view class="iconfont" :class="item.icon + ' ' + (currentTab === navListIndex ? 'on' : '')"></view>
<view>{{ item.name }}</view>
</view>
</view>
<view class="wrapper">
<view :hidden="currentTab !== 0" class="list">
<view class="item acea-row row-between-wrapper">
<view class="name">微信号</view>
<view class="input">
<input placeholder="请输入微信号" v-model="post.weixin" />
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view class="name">提现</view>
<view class="input">
<input :placeholder="'最低提现金额' + minPrice" v-model="post.money" />
</view>
</view>
<view class="tip">当前可提现金额: {{ commissionCount }}</view>
<view class="bnt bg-color-red" @click="submitted">提现</view>
</view>
<view :hidden="currentTab !== 1" class="list">
<view class="item acea-row row-between-wrapper">
<view class="name">用户名</view>
<view class="input">
<input placeholder="请填写您的支付宝用户名" v-model="post.name" />
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view class="name">账号</view>
<view class="input">
<input placeholder="请填写您的支付宝账号" v-model="post.alipay_code" />
</view>
</view>
<view class="item acea-row row-between-wrapper">
<view class="name">提现</view>
<view class="input">
<input :placeholder="'最低提现金额' + minPrice" v-model="post.money" />
</view>
</view>
<view class="tip">当前可提现金额: {{ commissionCount }}</view>
<view class="bnt bg-color-red" @click="submitted">提现</view>
</view>
</view>
</view>
</template>
<script>
import { getBank, postCashInfo } from "@/api/user";
import { required } from "@/utils/validate";
import { validatorDefaultCatch } from "@/utils/dialog";
export default {
name: "UserCash",
components: {},
props: {},
data: function() {
return {
navList: [
{ name: "微信", type: "weixin", icon: "icon-weixin2" },
{ name: "支付宝", type: "alipay", icon: "icon-icon34" }
],
post: {
extract_type: "weixin",
alipay_code: "",
money: "",
name: "",
bankname: "",
cardnum: "",
weixin: ""
},
currentTab: 0,
minPrice: 0,
banks: [],
commissionCount: 0
};
},
mounted: function() {
this.getBank();
},
methods: {
swichNav: function(index, item) {
console.log(item);
this.currentTab = index;
this.post.extract_type = item.type;
},
getBank: function() {
let that = this;
getBank().then(
res => {
that.banks = res.data.extractBank;
that.minPrice = res.data.minPrice;
that.commissionCount = res.data.commissionCount;
},
function(err) {
uni.showToast({
title: err.msg || err.response.data.msg|| err.response.data.message,
icon: "none",
duration: 2000
});
}
);
},
async submitted() {
let bankname = this.post.bankname,
alipay_code = this.post.alipay_code,
money = this.post.money,
name = this.post.name,
cardnum = this.post.cardnum,
weixin = this.post.weixin,
that = this;
// console.log(parseFloat(money))
if (
parseFloat(money) > parseFloat(that.commissionCount) ||
parseFloat(that.commissionCount) == 0
)
return that.$dialog.message("余额不足");
if (parseFloat(money) < parseFloat(that.minPrice))
return that.$dialog.message("最低提现金额" + that.minPrice);
//console.log(that.post.extract_type)
switch (that.post.extract_type) {
case "alipay":
// if (!name) {
// uni.showToast({
// title: "请输入支付宝用户名",
// icon: "none",
// duration: 2000
// });
// return;
// }
// if (!alipay_code) {
// uni.showToast({
// title: "请输入支付宝账号",
// icon: "none",
// duration: 2000
// });
// return;
// }
// if (!money) {
// uni.showToast({
// title: "请输入提现金额",
// icon: "none",
// duration: 2000
// });
// return;
// }
try {
await this.$validator({
name: [required(required.message("支付宝用户名"))],
alipay_code: [required(required.message("支付宝账号"))],
money: [required(required.message("提现金额"))]
}).validate({ name, alipay_code, money });
let save = {
extractType: that.post.extract_type,
alipayCode: alipay_code,
name: name,
money: money
};
that.save(save);
} catch (e) {
return validatorDefaultCatch(e);
}
break;
case "weixin":
try {
await this.$validator({
weixin: [required(required.message("提现微信号"))],
money: [required(required.message("提现金额"))]
}).validate({ weixin, money });
let save = {
extractType: that.post.extract_type,
weixin: weixin,
money: money
};
that.save(save);
} catch (e) {
return validatorDefaultCatch(e);
}
break;
}
},
save: function(info) {
postCashInfo(info).then(
res => {
uni.showToast({
title: res.msg,
icon: "none",
duration: 2000
});
this.router.push({ path: "/user/audit" });
},
err => {
uni.showToast({
title: err.msg || err.response.data.msg|| err.response.data.message,
icon: "none",
duration: 2000
});
}
);
}
}
};
</script>
@@ -0,0 +1,242 @@
<template>
<view class="my-promotion">
<view class="topBanner acea-row row-middle row-center">
<view class="item acea-row row-column">
<view class="itemValue">{{ force2Decimal(Info.commissionCount) }}</view>
<view class="itemTitle">当前佣金</view>
</view>
<view class="vline"></view>
<view class="item acea-row row-column">
<view class="itemValue">{{ force2Decimal(Info.lastDayCount) }}</view>
<view class="itemTitle">今日收益</view>
</view>
<view class="vline"></view>
<view class="item acea-row row-column">
<view class="itemValue">{{ force2Decimal(Info.extractCount) }}</view>
<view class="itemTitle">累计已提</view>
</view>
</view>
<view class="acea-row row-right">
<view class="withdrawRecordBtn acea-row row-middle row-center" @click="goCashRecord()">
<image :src="webUrl+'/20210819120620545726.png'" mode="" style="width: 24rpx;height: 24rpx;margin-right: 10rpx;"></image>
<text style="color: #fff;font-size: 24rpx;">提现记录</text>
</view>
</view>
<view class="menu-list acea-row row-column">
<view class="menu-item acea-row row-middle" @click="goPromoterList()">
<image class="menu-item-img" :src="webUrl+'/20210819120915878640.png'" mode=""></image>
<text class="menu-item-title">推广统计</text>
<text class="iconfont icon-jiantou" style="font-size: 24rpx;color: #999999;"></text>
</view>
<view class="menu-item acea-row row-middle" @click="goCommissionDetails()">
<image class="menu-item-img" :src="webUrl+'/20210819133737716135.png'" mode=""></image>
<text class="menu-item-title">佣金明细</text>
<text class="iconfont icon-jiantou" style="font-size: 24rpx;color: #999999;"></text>
</view>
<view class="menu-item acea-row row-middle" @click="goPromoterOrder()">
<image class="menu-item-img" :src="webUrl+'/20210819133751983817.png'" mode=""></image>
<text class="menu-item-title">推广人订单</text>
<text class="iconfont icon-jiantou" style="font-size: 24rpx;color: #999999;"></text>
</view>
<view class="menu-item acea-row row-middle" @click="toCash()">
<image class="menu-item-img" :src="webUrl+'/20210819133726059725.png'" mode=""></image>
<text class="menu-item-title">立即提现</text>
<text class="iconfont icon-jiantou" style="font-size: 24rpx;color: #999999;"></text>
</view>
</view>
<!-- <view class="header">
<view class="name acea-row row-center-wrapper">
<view>当前佣金</view>
<view class="record" @click="goCashRecord()">
提现记录
<text class="iconfont icon-xiangyou"></text>
</view>
</view>
<view class="num">{{ force2Decimal(Info.commissionCount) }}</view>
<view class="profit acea-row row-between-wrapper">
<view class="item">
<view>今日收益</view>
<view class="money">{{ force2Decimal(Info.lastDayCount) }}</view>
</view>
<view class="item">
<view>累积已提</view>
<view class="money">{{ force2Decimal(Info.extractCount) }}</view>
</view>
</view>
</view>
<view class="list acea-row row-between-wrapper">
<view class="item acea-row row-center-wrapper row-column" @click="goPoster()">
<text class="iconfont icon-erweima"></text>
<view>推广名片</view>
</view>
<view class="item acea-row row-center-wrapper row-column" @click="goPromoterList()">
<text class="iconfont icon-tongji"></text>
<view>推广人统计</view>
</view>
<view class="item acea-row row-center-wrapper row-column" @click="goCommissionDetails()">
<text class="iconfont icon-qiandai"></text>
<view>佣金明细</view>
</view>
<view class="item acea-row row-center-wrapper row-column" @click="goPromoterOrder()">
<text class="iconfont icon-dingdan"></text>
<view>推广人订单</view>
</view>
<view class="item acea-row row-center-wrapper row-column" @click="toCash()">
<text class="iconfont icon-chongzhi"></text>
<view>立即提现</view>
</view>
</view> -->
</view>
</template>
<script>
import { getSpreadInfo } from "@/api/user";
import { pageListenMixins } from '@/mixins/pageListenMixins'
export default {
name: "UserPromotion",
mixins: [pageListenMixins],
data: function() {
return {
Info: {
lastDayCount: 0,
extractCount: 0,
commissionCount: 0
},
webUrl:this.$VUE_APP_RESOURCES_URL,
pageKeyId: Object.freeze('userSpreadIndex')
};
},
mounted: function() {
},
onShow:function(){
this.getInfo();
},
methods: {
force2Decimal(v){
return this.$force2Decimal(v);
},
goPoster() {
this.$yrouter.push("/pagesUser/user/promotion/Poster/index");
},
goCashRecord() {
this.$yrouter.push('/pkg_user/views/withdrawalLog');
},
goPromoterList() {
this.$yrouter.push("/pagesUser/user/promotion/PromoterList/index");
},
goCommissionDetails() {
this.$yrouter.push("/pagesUser/user/promotion/CommissionDetails/index");
},
goPromoterOrder() {
this.$yrouter.push("/pagesUser/user/promotion/PromoterOrder/index");
},
getInfo: function() {
let that = this;
getSpreadInfo().then(
res => {
that.Info = res.data;
},
function(err) {
uni.showToast({
title: err.msg || err.response.data.msg|| err.response.data.message,
icon: 'none',
duration: 2000
});
}
);
},
toCash: function() {
this.$yrouter.push("/pkg_user/views/withdrawal");
}
}
};
</script>
<style lang="less">
.my-promotion{
padding: 32rpx;
}
.my-promotion .header{
background-image: none !important;
background-color: #FE5261;
}
.my-promotion .list .item .iconfont{
color: #FE5261 !important;
}
.topBanner{
height: 180rpx;
background: #FFFFFF;
box-shadow: 0px 6rpx 16rpx rgba(232, 236, 241, 0.5);
border-radius: 16rpx;
padding: 32rpx;
}
.topBanner .item{
flex: 1;
}
.topBanner .item .itemValue{
color: #333333;
font-size: 36rpx;
text-align: center;
}
.topBanner .item .itemTitle{
color: #999999;
font-size: 22rpx;
text-align: center;
}
.vline{
background-color: #E3E3E3;
width: 1px;
height: 64rpx;
margin: 0 10rpx;
}
.withdrawRecordBtn{
width: 174rpx;
height: 60rpx;
background: #0DC5C5;
box-shadow: 0px 8rpx 14rpx rgba(179, 188, 191, 0.6);
border-radius: 8rpx;
margin: 32rpx 0;
}
.menu-list{
}
.menu-list .menu-item{
padding: 24rpx;
background: #FFFFFF;
box-shadow: 0px 6rpx 16rpx rgba(232, 236, 241, 0.5);
border-radius: 16rpx;
margin-bottom: 18rpx;
}
.menu-list .menu-item .menu-item-title{
font-size: 24rpx;
font-weight: 500;
color: #333333;
flex-grow: 1;
}
.menu-list .menu-item .menu-item-img{
width: 40rpx;
height: 40rpx;
flex-shrink:0;
margin-right: 16rpx;
}
</style>