init
This commit is contained in:
813
pages_promotion/fenxiao/apply.vue
Normal file
813
pages_promotion/fenxiao/apply.vue
Normal file
@@ -0,0 +1,813 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="apply">
|
||||
<!-- 导航栏 -->
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="head-nav color-base-bg"></view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef H5 -->
|
||||
<!-- <view class="head-nav color-base-bg" :class="{ active: isIphoneX }"></view> -->
|
||||
<!-- #endif -->
|
||||
|
||||
<view v-if="status === ''">
|
||||
<block v-if="basicsConfig.is_apply == 1">
|
||||
<view class="image" :class="fenXiaoAgreement.agreement.img ? '' : 'color-base-bg'">
|
||||
<image v-if="fenXiaoAgreement.agreement.img" class="apply-adv" :src="$util.img(fenXiaoAgreement.agreement.img)" mode="widthFix" style="width: 100%;"/>
|
||||
<view class="bg ns-gradient-otherpages-fenxiao-apply-apply-bg" v-else>
|
||||
<view class="bg-title"><text>请填写申请信息</text></view>
|
||||
<view class="bg-img">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/apply/edit.png')" mode="scaleToFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="apply-wrap">
|
||||
<view class="app-info">
|
||||
<view class="info">
|
||||
<view class="apply-item">
|
||||
<view class="title">邀请人</view>
|
||||
<text class="shuru">{{ sourceMemberInfo.fenxiao_name }}</text>
|
||||
</view>
|
||||
<view class="apply-item">
|
||||
<view class="title">{{ fenxiaoWords.fenxiao_name }}名称</view>
|
||||
<input class="input" type="text" maxlength="30" :placeholder="'请输入' + fenxiaoWords.fenxiao_name + '名称'" v-model="formData.fenXiaoName" placeholder-class="pla-cla" />
|
||||
</view>
|
||||
<view class="apply-item">
|
||||
<view class="title">手机号</view>
|
||||
<input class="input" type="number" placeholder="请输入手机号" maxlength="11" v-model="formData.mobile" placeholder-class="pla-cla" />
|
||||
</view>
|
||||
<view class="apply-xy" v-if="isAgreement" @click="ckeckedRuler()">
|
||||
<view class="iconfont" :class="isChecked ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'">
|
||||
</view>
|
||||
我已阅读并了解
|
||||
<text class="color-base-text" @click.stop="openPopup">【{{ fenxiaoWords.fenxiao_name }}申请协议】</text>
|
||||
</view>
|
||||
<view class="apply-btn">
|
||||
<button @click="applyFenXiao" class="color-base-bg">申请成为{{ fenxiaoWords.fenxiao_name }}</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="apply-message-wrap" v-if="fenxiaoConfig.fenxiao_condition == 2 || fenxiaoConfig.fenxiao_condition == 3">
|
||||
<view class="apply-message">
|
||||
<view class="apply-message-title color-base-bg-before">分销商申请条件</view>
|
||||
<text class="apply-message-info font-size-goods-tag" v-if="fenxiaoConfig.fenxiao_condition == 2">
|
||||
申请成为{{ fenxiaoWords.fenxiao_name }},需要您的消费次数需要达到{{ fenxiaoConfig.consume_count }}次
|
||||
</text>
|
||||
<text class="apply-message-info font-size-goods-tag" v-if="fenxiaoConfig.fenxiao_condition == 3">
|
||||
申请成为{{ fenxiaoWords.fenxiao_name }},需要您的消费金额需要达到{{ fenxiaoConfig.consume_money }}元
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="app-info-list" v-if="fenxiaoConfig.fenxiao_condition == 4">
|
||||
<view class="apply-message">
|
||||
<view class="apply-message-title color-base-bg-before">分销商申请条件</view>
|
||||
<text class="apply-message-info font-size-goods-tag">申请成为{{ fenxiaoWords.fenxiao_name }},需要购买以下指定商品(任选其一)</text>
|
||||
</view>
|
||||
<view class="goods-list" v-for="(item, index) in goodsList" :key="index" @click="toDetail(item)">
|
||||
<view class="goods-img">
|
||||
<image :src="goodsImg(item.goods_image)" mode="widthFix" @error="imgError(index)"/>
|
||||
<view class="color-base-bg goods-tag" v-if="goodsTag(item) != ''">{{ goodsTag(item) }}</view>
|
||||
</view>
|
||||
<view class="goods-content">
|
||||
<view class="content-name">{{ item.goods_name }}</view>
|
||||
<view class="delete-price font-size-activity-tag color-tip content-price">
|
||||
<block>
|
||||
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
|
||||
{{ item.market_price > 0 ? item.market_price : item.price }}
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-lists" v-if="isShow" @click="onOpen()">
|
||||
{{ isOpen ? '展开更多' : '收起' }}
|
||||
<text class="iconfont icon-unfold" style="font-weight: bold;" v-if="isOpen"></text>
|
||||
<text class="iconfont icon-fold" v-else></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="empty" v-else-if="basicsConfig.is_apply == 0" style="margin-top:40rpx;">
|
||||
<block v-if="fenxiaoConfig.fenxiao_condition == 2 || fenxiaoConfig.fenxiao_condition == 3">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix"></image>
|
||||
<text v-if="fenxiaoConfig.fenxiao_condition == 2">申请成为{{ fenxiaoWords.fenxiao_name }},需要您的消费次数需要达到{{ fenxiaoConfig.consume_count }}次</text>
|
||||
<text v-if="fenxiaoConfig.fenxiao_condition == 3">
|
||||
申请成为{{ fenxiaoWords.fenxiao_name }},需要您的消费金额需要达到{{ fenxiaoConfig.consume_money | moneyFormat }}元
|
||||
</text>
|
||||
</block>
|
||||
<view class="apply-wrap" v-if="fenxiaoConfig.fenxiao_condition == 4">
|
||||
<view class="app-info-list">
|
||||
<view class="apply-message">
|
||||
<view class="apply-message-title color-base-bg-before">成为分销商的条件</view>
|
||||
<text class="apply-message-info font-size-goods-tag">成为{{ fenxiaoWords.fenxiao_name }},需要购买以下指定商品(任选其一)</text>
|
||||
</view>
|
||||
<view class="goods-list" v-for="(item, index) in goodsList" :key="index" @click="toDetail(item)">
|
||||
<view class="goods-img">
|
||||
<image :src="goodsImg(item.goods_image)" mode="widthFix" @error="imgError(index)"/>
|
||||
<view class="color-base-bg goods-tag" v-if="goodsTag(item) != ''">{{ goodsTag(item) }}</view>
|
||||
</view>
|
||||
<view class="goods-content">
|
||||
<view class="content-name">{{ item.goods_name }}</view>
|
||||
<view class="delete-price font-size-activity-tag color-tip content-price">
|
||||
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text>{{ item.market_price > 0 ? item.market_price : item.price }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-lists" v-if="isShow" @click="onOpen()">
|
||||
{{ isOpen ? '展开更多' : '收起' }}
|
||||
<text class="iconfont icon-unfold" style="font-weight: bold;" v-if="isOpen"></text>
|
||||
<text class="iconfont icon-fold" v-else></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty" v-else>
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix"></image>
|
||||
<text>您还不是分销商</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty" v-else>
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix"></image>
|
||||
<text v-if="status == 1">您已提交{{ fenxiaoWords.fenxiao_name }}申请,等待平台审核</text>
|
||||
<block v-else-if="status == -1">
|
||||
<text>您提交的{{ fenxiaoWords.fenxiao_name }}申请,已被拒绝,请再接再厉</text>
|
||||
<view class="again-btn color-base-bg" @click="againApply">重新申请</view>
|
||||
</block>
|
||||
</view>
|
||||
<view @touchmove.prevent v-if="fenXiaoAgreement.document">
|
||||
<uni-popup ref="applyPopup" type="center" class="wap-floating">
|
||||
<view class="conten-box">
|
||||
<text class="iconfont icon-close" @click="toClose"></text>
|
||||
<view class="title">{{ fenXiaoAgreement.document.title }}</view>
|
||||
<view class="content-con">
|
||||
<scroll-view scroll-y="true" class="con" show-scrollbar="true">
|
||||
<rich-text :nodes="fenXiaoAgreement.document.content"></rich-text>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import validate from 'common/js/validate.js';
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||
import htmlParser from '@/common/js/html-parser';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isChecked: false,
|
||||
isShow: true,
|
||||
isIphoneX: false,
|
||||
// 推荐人信息
|
||||
sourceMemberInfo: {
|
||||
fenxiao_name: '无'
|
||||
},
|
||||
formData: {
|
||||
fenXiaoName: '',
|
||||
mobile: ''
|
||||
},
|
||||
fenXiaoAgreement: {
|
||||
agreement: {},
|
||||
document: {}
|
||||
},
|
||||
isAgreement: false,
|
||||
back: '',
|
||||
isAbled: false,
|
||||
status: '',
|
||||
isSub: false,
|
||||
fenxiaoConfig: {
|
||||
fenxiao_condition: 0
|
||||
},
|
||||
basicsConfig: {},
|
||||
goodsList: [],
|
||||
isOpen: false
|
||||
};
|
||||
},
|
||||
components: {
|
||||
uniPopup
|
||||
},
|
||||
mixins: [fenxiaoWords],
|
||||
onLoad(option) {
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启分销',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}, 2000);
|
||||
}
|
||||
},1000);
|
||||
this.onOpen();
|
||||
this.getAgreement();
|
||||
if (option.back) this.back = option.back;
|
||||
},
|
||||
async onShow() {
|
||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||
|
||||
if (this.fenxiaoWords && this.fenxiaoWords.fenxiao_name) this.$langConfig.title(this.fenxiaoWords.fenxiao_name + '申请');
|
||||
|
||||
if (this.storeToken) {
|
||||
this.applyStatus();
|
||||
this.getSourceMemberInfo();
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_tool/login/login', {
|
||||
back: '/pages_promotion/fenxiao/apply'
|
||||
}, 'redirectTo');
|
||||
}
|
||||
|
||||
this.getFenxiaoConfig();
|
||||
this.getFenxiaoBasicsConfig();
|
||||
},
|
||||
methods: {
|
||||
toClose() {
|
||||
this.$refs.applyPopup.close();
|
||||
},
|
||||
ckeckedRuler() {
|
||||
this.isChecked = !this.isChecked;
|
||||
},
|
||||
goodsImg(imgStr) {
|
||||
let imgs = imgStr.split(',');
|
||||
return imgs[0] ?
|
||||
this.$util.img(imgs[0], {
|
||||
size: 'mid'
|
||||
}) :
|
||||
this.$util.getDefaultImage().goods;
|
||||
},
|
||||
imgError(index) {
|
||||
this.goodsList[index].goods_image = this.$util.getDefaultImage().goods;
|
||||
},
|
||||
onOpen() {
|
||||
this.isOpen = this.isOpen ? false : true;
|
||||
this.getFenxiaoConfig();
|
||||
},
|
||||
goodsTag(data) {
|
||||
return data.label_name || '';
|
||||
},
|
||||
//商品详情
|
||||
toDetail(item) {
|
||||
this.$util.redirectTo('/pages/goods/detail', {
|
||||
goods_id: item.goods_id
|
||||
});
|
||||
},
|
||||
applyStatus() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/apply/status',
|
||||
data: {},
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.status = res.data.status;
|
||||
this.isSub = false;
|
||||
if (this.status == 2) {
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
}
|
||||
}
|
||||
this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
navigateBack() {
|
||||
this.$util.goBack();
|
||||
},
|
||||
applyFenXiao() {
|
||||
if (!this.fenXiaoValidata()) return;
|
||||
if (this.isAgreement && !this.isChecked) {
|
||||
this.$util.showToast({
|
||||
title: '请仔细阅读协议,并勾选'
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.isSub) return;
|
||||
this.isSub = true;
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/apply/applyfenxiao',
|
||||
data: {
|
||||
fenxiao_name: this.formData.fenXiaoName,
|
||||
mobile: this.formData.mobile
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
if (this.basicsConfig.is_examine == 1) {
|
||||
this.applyStatus();
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/index');
|
||||
}
|
||||
} else {
|
||||
this.isSub = false;
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 申请协议
|
||||
getAgreement() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/config/agreement',
|
||||
success: res => {
|
||||
if (res.code === 0) {
|
||||
this.fenXiaoAgreement = res.data;
|
||||
if (this.fenXiaoAgreement.agreement.is_agreement === '1') {
|
||||
if (this.fenXiaoAgreement.document.content) this.fenXiaoAgreement.document
|
||||
.content = htmlParser(this.fenXiaoAgreement.document.content);
|
||||
this.isAgreement = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
openPopup() {
|
||||
if (this.isAgreement) this.$refs.applyPopup.open();
|
||||
},
|
||||
closePopup() {
|
||||
this.$refs.applyPopup.close();
|
||||
},
|
||||
fenXiaoValidata() {
|
||||
let rule = [{
|
||||
name: 'fenXiaoName',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入' + this.fenxiaoWords.fenxiao_name + '名称'
|
||||
},
|
||||
{
|
||||
name: 'mobile',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入手机号'
|
||||
},
|
||||
{
|
||||
name: 'mobile',
|
||||
checkType: 'phoneno',
|
||||
errorMsg: '请输入正确的手机号'
|
||||
}
|
||||
];
|
||||
var checkRes = validate.check(this.formData, rule);
|
||||
if (checkRes) {
|
||||
return true;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: validate.error
|
||||
});
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// 获取推广人信息
|
||||
getSourceMemberInfo() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/sourceinfo',
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data) {
|
||||
this.sourceMemberInfo = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 重新申请
|
||||
*/
|
||||
againApply() {
|
||||
this.status = '';
|
||||
},
|
||||
/**
|
||||
* 获取申请条件
|
||||
*/
|
||||
getFenxiaoConfig() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/config/fenxiao',
|
||||
data: {},
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.fenxiaoConfig = res.data;
|
||||
this.goodsList = res.data.goods_list;
|
||||
if (this.goodsList.length <= 3) {
|
||||
this.isShow = false;
|
||||
} else if (this.goodsList.length > 3 && this.isOpen == true) {
|
||||
this.isShow = true;
|
||||
this.goodsList = res.data.goods_list.slice(0, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取分销基本配置
|
||||
*/
|
||||
getFenxiaoBasicsConfig() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/config/basics',
|
||||
data: {},
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.basicsConfig = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
if (options.from === 'navigateBack') {
|
||||
return false;
|
||||
}
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
return true;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/deep/.uni-scroll-view {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
/deep/.uni-scroll-view::-webkit-scrollbar {
|
||||
/* 隐藏滚动条,但依旧具备可以滚动的功能 */
|
||||
display: none;
|
||||
}
|
||||
|
||||
.head-nav {
|
||||
width: 100%;
|
||||
height: var(--status-bar-height);
|
||||
}
|
||||
|
||||
.head-nav.active {
|
||||
padding-top: 40rpx;
|
||||
}
|
||||
|
||||
.head-return {
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
font-size: $font-size-base;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
|
||||
text {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 20rpx;
|
||||
display: inline-block;
|
||||
margin-right: 10rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
input::placeholder {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.apply {
|
||||
.bg {
|
||||
height: 160rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 30rpx 80rpx 44rpx 80rpx;
|
||||
align-items: center;
|
||||
|
||||
.bg-title {
|
||||
color: #ffffff;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.bg-img {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.apply-adv {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.apply-wrap {
|
||||
padding-bottom: 100rpx;
|
||||
|
||||
.app-info {
|
||||
position: relative;
|
||||
top: -28rpx;
|
||||
width: 692rpx;
|
||||
margin: 0 auto;
|
||||
border-radius: 10rpx;
|
||||
background-color: #ffffff;
|
||||
|
||||
.info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.apply-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: calc(100% - 100rpx);
|
||||
padding: 20rpx 10rpx;
|
||||
margin: 4rpx 10rpx;
|
||||
background-color: #ffffff;
|
||||
border-bottom: 1rpx solid #f1f1f1;
|
||||
|
||||
.title {
|
||||
color: #000;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 70%;
|
||||
text-align: right;
|
||||
height: 40rpx;
|
||||
padding-left: 30rpx;
|
||||
font-size: $font-size-tag;
|
||||
color: #a7a7a7;
|
||||
}
|
||||
|
||||
.pla-cla {
|
||||
color: #babbc1;
|
||||
}
|
||||
|
||||
.shuru {
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.apply-xy {
|
||||
display: flex;
|
||||
margin-top: 30rpx;
|
||||
color: #838383;
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
|
||||
text {
|
||||
color: #a7a7a7;
|
||||
}
|
||||
|
||||
.icon-yuan_checkbox {
|
||||
font-size: 36rpx;
|
||||
color: #838383;
|
||||
margin-right: 14rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.icon-yuan_checked {
|
||||
font-size: 36rpx;
|
||||
margin-right: 14rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.app-info-list {
|
||||
margin: 0 30rpx 20rpx;
|
||||
padding: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
background-color: #ffffff;
|
||||
|
||||
.apply-message-title {
|
||||
line-height: 1;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
padding-left: $padding;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.apply-message-title::before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 6rpx;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
|
||||
.apply-message-info {
|
||||
display: inline-block;
|
||||
line-height: 1.2;
|
||||
color: #333;
|
||||
background: #f9f9f9;
|
||||
position: relative;
|
||||
top: 20rpx;
|
||||
width: 586rpx;
|
||||
padding: 20rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.goods-list {
|
||||
padding: 30rpx 0;
|
||||
// margin-top: 50rpx;
|
||||
display: flex;
|
||||
border-bottom: 2rpx solid #f6f5f5;
|
||||
|
||||
.goods-img {
|
||||
width: 130rpx;
|
||||
height: 130rpx;
|
||||
margin-right: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.content-name {
|
||||
font-size: 28rpx;
|
||||
color: #303133;
|
||||
width: 460rpx;
|
||||
display: -webkit-box;
|
||||
line-clamp: 2;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.content-price {
|
||||
font-size: 28rpx !important;
|
||||
font-weight: 600;
|
||||
color: #ff4a01 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content-lists {
|
||||
margin: 20rpx auto 0;
|
||||
text-align: center;
|
||||
color: #a1a3a8;
|
||||
|
||||
text {
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.apply-btn {
|
||||
margin: 50rpx auto 70rpx auto;
|
||||
border-radius: $border-radius;
|
||||
width: 90%;
|
||||
|
||||
button {
|
||||
color: #ffffff;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.apply-message-wrap {
|
||||
margin-bottom: 100rpx;
|
||||
width: 100%;
|
||||
padding: 10rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.apply-message {
|
||||
width: 85%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.apply-message-title {
|
||||
line-height: 1;
|
||||
font-size: $font-size-tag;
|
||||
position: relative;
|
||||
padding-left: $padding;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.apply-message-title::before {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 6rpx;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
|
||||
.apply-message-info {
|
||||
padding-top: $padding;
|
||||
line-height: 1.2;
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.again-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: auto;
|
||||
border-radius: $border-radius;
|
||||
margin-top: 20rpx;
|
||||
color: #ffffff;
|
||||
align-items: center;
|
||||
padding: 10rpx 60rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.conten-box {
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
height: 812rpx;
|
||||
width: 580rpx;
|
||||
border-radius: 10rpx;
|
||||
|
||||
text {
|
||||
margin-top: 25rpx;
|
||||
float: right;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 100%;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-bottom: 2rpx solid #e0e0e0;
|
||||
line-height: 1;
|
||||
padding-bottom: 28rpx;
|
||||
}
|
||||
|
||||
.content-con {
|
||||
width: 100%;
|
||||
height: 680rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.con {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sure {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.sure-btn {
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: $border-radius;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
width: 100%;
|
||||
margin-top: 200rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
image {
|
||||
width: 300rpx;
|
||||
height: 176rpx;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: $font-size-goods-tag;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
/deep/ .uni-popup__wrapper-box {
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
</style>
|
||||
147
pages_promotion/fenxiao/bill.vue
Normal file
147
pages_promotion/fenxiao/bill.vue
Normal file
@@ -0,0 +1,147 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="bill" >
|
||||
<mescroll-uni ref="mescroll" @getData="getData" class="member-point" :size="8">
|
||||
<block slot="list">
|
||||
<view class="balances" v-if="accountList.length" v-for="item in accountList" :key="item.id">
|
||||
<image v-if="item.type == 'order'" :src="$util.img('public/uniapp/fenxiao/bill/jiesuan.png')" mode="widthFix"></image>
|
||||
<image v-else :src="$util.img('public/uniapp/fenxiao/bill/withdraw.png')" mode="widthFix"></image>
|
||||
<view class="balances-info">
|
||||
<text>{{ item.type_name }}</text>
|
||||
<text>账单编号: {{ item.account_no }}</text>
|
||||
<text>{{ $util.timeStampTurnTime(item.create_time) }}</text>
|
||||
</view>
|
||||
<view class="balances-num">
|
||||
<text :class="item.money > 0 ? 'color-base-text' : ''">{{ item.money > 0 ? '+' + item.money : item.money }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<ns-empty v-if="!accountList.length && showEmpty" text="暂无账单信息" :isIndex="false"></ns-empty>
|
||||
</block>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</mescroll-uni>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
accountList: {},
|
||||
showEmpty: true
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启分销',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}, 2000);
|
||||
}
|
||||
},1000);
|
||||
},
|
||||
methods: {
|
||||
getData(mescroll) {
|
||||
if (mescroll.num == 1) {
|
||||
this.accountList = [];
|
||||
}
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/account/page',
|
||||
data: {
|
||||
page: mescroll.num,
|
||||
page_size: mescroll.size
|
||||
},
|
||||
success: res => {
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data && res.data.list) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.accountList = []; //如果是第一页需手动制空列表
|
||||
this.accountList = this.accountList.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
this.showEmpty = true;
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ .empty {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
/deep/ .member-point .mescroll-uni-content {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.balances {
|
||||
width: calc(100% - 60rpx);
|
||||
border-radius: 10rpx;
|
||||
margin: 0 auto;
|
||||
padding: 27rpx 27rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
background: #fff;
|
||||
margin-bottom: 18rpx;
|
||||
margin-top: 18rpx;
|
||||
|
||||
image {
|
||||
width: 54rpx;
|
||||
height: 54rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.balances-info {
|
||||
flex: 1;
|
||||
margin-left: 16rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
text {
|
||||
line-height: 1;
|
||||
|
||||
&:last-child {
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
margin-top: 18rpx;
|
||||
font-size: $font-size-tag;
|
||||
color: $color-tip;
|
||||
}
|
||||
|
||||
&:nth-child(3) {
|
||||
font-size: $font-size-tag;
|
||||
margin-top: 19rpx;
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.balances-num {
|
||||
text {
|
||||
line-height: 1;
|
||||
font-size: $font-size-toolbar;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
289
pages_promotion/fenxiao/child_fenxiao.vue
Normal file
289
pages_promotion/fenxiao/child_fenxiao.vue
Normal file
@@ -0,0 +1,289 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<mescroll-uni ref="mescroll" @getData="getData" top="0" class="member-point" :size="8" v-if="storeToken">
|
||||
<block slot="list">
|
||||
<view class="team-li" v-for="(item, index) in teamList" :key="index" v-if="teamList.length != 0" @click="toFenxiaoOrder(item)">
|
||||
<view class="li-box" :class="{ active: index + 1 == teamList.length }">
|
||||
<image v-if="item.headimg" :src="$util.img(item.headimg)" @error="imageError(index)" mode="aspectFill"></image>
|
||||
<image v-else :src="$util.getDefaultImage().head"></image>
|
||||
<view class="member-info">
|
||||
<view class="member-name">
|
||||
<view class="left">
|
||||
<view class="flex-box">
|
||||
<view class="name">{{ item.nickname }}</view>
|
||||
<view v-if="item.level_name" class="title color-base-border color-base-text">{{ item.level_name }}</view>
|
||||
</view>
|
||||
<view class="color-tip font-size-goods-tag">加入时间:{{ $util.timeStampTurnTime(item.bind_fenxiao_time).substring(0, 10) }}</view>
|
||||
</view>
|
||||
<view class="consume-info">
|
||||
<view><text>{{ item.one_child_fenxiao_num + item.one_child_num }}</text> 人</view>
|
||||
<view><text>{{ item.order_num }}</text> 单</view>
|
||||
<view><text>{{ item.order_money|moneyFormat }}</text> 元</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="teamList.length == 0 && emptyShow">
|
||||
<ns-empty text="暂无数据" :isIndex="false"></ns-empty>
|
||||
</block>
|
||||
</block>
|
||||
</mescroll-uni>
|
||||
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
teamList: [],
|
||||
emptyShow: false,
|
||||
};
|
||||
},
|
||||
mixins: [fenxiaoWords],
|
||||
onShow() {
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启分销',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}, 2000);
|
||||
}
|
||||
},1000);
|
||||
|
||||
if (!this.storeToken) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_promotion/fenxiao/childfenxiao');
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getData(mescroll) {
|
||||
this.emptyShow = false;
|
||||
if (mescroll.num == 1) {
|
||||
this.teamList = [];
|
||||
}
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/childfenxiao',
|
||||
data: {
|
||||
page_size: mescroll.size,
|
||||
page: mescroll.num
|
||||
},
|
||||
success: res => {
|
||||
this.emptyShow = true;
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.teamList = []; //如果是第一页需手动制空列表
|
||||
this.teamList = this.teamList.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
imageError(e) {
|
||||
this.teamList[e].headimg = this.$util.getDefaultImage().head;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
toFenxiaoOrder(item) {
|
||||
if (item.fenxiao_id) {
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/relation', { fenxiao_id: item.fenxiao_id });
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/relation', { sub_member_id: item.member_id });
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.team-cate {
|
||||
padding: 0 30rpx;
|
||||
width: calc(100%);
|
||||
height: 90rpx;
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: var(--window-top);
|
||||
|
||||
.cate-li {
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
display: inline-block;
|
||||
line-height: 90rpx;
|
||||
height: 100%;
|
||||
font-size: 30rpx;
|
||||
|
||||
&.active {
|
||||
box-sizing: border-box;
|
||||
border-bottom: 4rpx solid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.team-member {
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
color: $color-tip;
|
||||
padding: 0 $padding;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.team-li {
|
||||
margin: $margin-updown $margin-both;
|
||||
padding: $margin-both;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
|
||||
.li-box {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.member-info {
|
||||
flex: 1;
|
||||
padding-left: $padding;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
.member-name {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: $font-size-base;
|
||||
|
||||
.left {
|
||||
width: 0;
|
||||
flex: 1;
|
||||
|
||||
.flex-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding: 4rpx 16rpx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
font-size: $font-size-activity-tag;
|
||||
border-radius: 4rpx;
|
||||
margin-left: 10rpx;
|
||||
line-height: 1;
|
||||
border: 2rpx solid;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.consume-info {
|
||||
text-align: right;
|
||||
|
||||
text {
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
|
||||
view {
|
||||
line-height: 1.5;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.member-date {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: $padding;
|
||||
|
||||
view {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
text-align: left;
|
||||
line-height: 1;
|
||||
|
||||
text {
|
||||
font-size: $font-size-tag;
|
||||
color: $color-tip;
|
||||
}
|
||||
|
||||
.tit {
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-see {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
}
|
||||
.order-box-btn {
|
||||
display: inline-block;
|
||||
line-height: 56rpx;
|
||||
padding: 0 30rpx;
|
||||
font-size: 26rpx;
|
||||
color: #303133;
|
||||
border: 2rpx solid #999;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-webkit-border-radius: $border-radius;
|
||||
border-radius: $border-radius;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.li-box.active {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
413
pages_promotion/fenxiao/goods_list.vue
Normal file
413
pages_promotion/fenxiao/goods_list.vue
Normal file
@@ -0,0 +1,413 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="content">
|
||||
<mescroll-uni ref="mescroll" @getData="getGoodsList">
|
||||
<block slot="list">
|
||||
<view class="goods-list" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/fenxiao/promote/promote_bg.png') + ')' }">
|
||||
<scroll-view class="quick-nav" scroll-x="true">
|
||||
<!-- #ifdef MP -->
|
||||
<view class="uni-scroll-view-content">
|
||||
<!-- #endif -->
|
||||
<view class="quick-nav-item" :class="{ selected: categoryId == 0 }" @click="changeCategory(0)">全部</view>
|
||||
<view
|
||||
class="quick-nav-item"
|
||||
v-for="item in categoryList"
|
||||
:class="{ selected: categoryId == item.category_id }"
|
||||
@click="changeCategory(item.category_id)"
|
||||
>
|
||||
{{ item.category_name }}
|
||||
</view>
|
||||
<!-- #ifdef MP -->
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</scroll-view>
|
||||
<view v-for="(item, index) in goodsList" :key="index" class="goods-item" @click="navToDetailPage(item)">
|
||||
<view class="image-wrap">
|
||||
<image :src="$util.img(item.sku_image, { size: 'mid' })" @error="imageError(index)" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="goods-content">
|
||||
<view class="goods-name">
|
||||
<text class="name">{{ item.sku_name }}</text>
|
||||
<view class="label-list" v-if="item.label_name">
|
||||
<text class="label-item">{{ item.label_name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-bottom">
|
||||
<view class="goods-price color-base-text">
|
||||
<text class="font-size-tag">¥</text>
|
||||
{{ item.discount_price }}
|
||||
</view>
|
||||
<view class="goods-share" @click.stop="shareFn('goods', index)">
|
||||
<text class="icondiy icon-system-share"></text>
|
||||
<text class="txt" v-if="!is_fenxiao">分享</text>
|
||||
<text class="txt" v-else>赚{{ item.commission_money }}元</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty" v-if="goodsList.length == 0">
|
||||
<ns-empty :isIndex="false" text="暂无分销商品" textColor="#fff"></ns-empty>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</mescroll-uni>
|
||||
<view class="active-btn" v-if="goodsList.length">
|
||||
<!-- #ifdef MP -->
|
||||
<button class="share-btn" :plain="true" open-type="share">分享好友</button>
|
||||
<text class="tag">|</text>
|
||||
<!-- #endif -->
|
||||
<text class="btn" @click="shareFn('fenxiao')">生成海报</text>
|
||||
</view>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
|
||||
<!-- 分享弹窗 -->
|
||||
<view @touchmove.prevent.stop>
|
||||
<uni-popup ref="sharePopup" type="bottom" class="share-popup">
|
||||
<view>
|
||||
<view class="share-title">分享</view>
|
||||
<view class="share-content">
|
||||
<!-- #ifdef MP -->
|
||||
<view class="share-box">
|
||||
<button class="share-btn" :plain="true" open-type="share">
|
||||
<view class="iconfont icon-share-friend"></view>
|
||||
<text>分享给好友</text>
|
||||
</button>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="share-box" v-if="goodsCircle">
|
||||
<button class="share-btn" :plain="true" @click="openBusinessView">
|
||||
<view class="iconfont icon-haowuquan"></view>
|
||||
<text>分享到好物圈</text>
|
||||
</button>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<view class="share-box" @click="openPosterPopup">
|
||||
<button class="share-btn" :plain="true">
|
||||
<view class="iconfont icon-pengyouquan"></view>
|
||||
<text>生成分享海报</text>
|
||||
</button>
|
||||
</view>
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="share-box" @click="copyUrl">
|
||||
<button class="share-btn" :plain="true">
|
||||
<view class="iconfont icon-fuzhilianjie"></view>
|
||||
<text>复制链接</text>
|
||||
</button>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class="share-footer" @click="closeSharePopup"><text>取消分享</text></view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
<!-- 海报 -->
|
||||
<view @touchmove.prevent.stop>
|
||||
<uni-popup ref="posterPopup" type="bottom" class="poster-layer">
|
||||
<template v-if="poster != '-1'">
|
||||
<view>
|
||||
<view class="image-wrap">
|
||||
<image :src="$util.img(poster)" :show-menu-by-longpress="true" />
|
||||
</view>
|
||||
<!-- #ifdef MP || APP-PLUS -->
|
||||
<view class="save" @click="saveGoodsPoster()">保存图片</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="save">长按保存图片</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view class="close iconfont icon-close" @click="closePosterPopup()"></view>
|
||||
</template>
|
||||
<view v-else class="msg">{{ posterMsg }}</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<!-- 小程序隐私协议 -->
|
||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import list from './public/js/goods_list.js';
|
||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||
|
||||
export default {
|
||||
mixins: [list, fenxiaoWords]
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.quick-nav >>> .uni-scroll-view-content {
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
max-height: unset !important;
|
||||
}
|
||||
.quick-nav {
|
||||
margin-bottom: 20rpx;
|
||||
.quick-nav-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 18rpx;
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
border-radius: 40rpx;
|
||||
margin-right: 20rpx;
|
||||
height: 48rpx;
|
||||
font-size: 24rpx;
|
||||
background: #fff;
|
||||
color: $base-color;
|
||||
|
||||
&.selected {
|
||||
background: $base-color;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content {
|
||||
overflow: hidden;
|
||||
padding: 0 30rpx 160rpx;
|
||||
min-height: 100vh;
|
||||
background-color: #ff2d46;
|
||||
|
||||
.goods-list {
|
||||
min-height: 100vh;
|
||||
padding: 420rpx 30rpx 0;
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
box-sizing: border-box;
|
||||
.goods-item {
|
||||
margin-bottom: 20rpx;
|
||||
background: #ffffff;
|
||||
padding: $padding;
|
||||
display: flex;
|
||||
border-radius: 10rpx;
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.image-wrap {
|
||||
display: inline-block;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
line-height: 200rpx;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
flex-shrink: 0;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 1;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-content {
|
||||
width: calc(100% - 200rpx);
|
||||
min-height: 160rpx;
|
||||
padding-left: $padding;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.goods-name {
|
||||
width: 100%;
|
||||
line-height: 1.3;
|
||||
.name {
|
||||
line-height: 1.3;
|
||||
word-break: break-all;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.label-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 6rpx;
|
||||
.label-item {
|
||||
padding: 4rpx 10rpx;
|
||||
font-size: $font-size-tag;
|
||||
color: $base-color;
|
||||
border: 2rpx solid $base-color;
|
||||
border-radius: 6rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods-bottom {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.goods-price {
|
||||
line-height: 1.3;
|
||||
font-size: $font-size-base;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.goods-share {
|
||||
height: 50rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 0 $padding;
|
||||
border-radius: 50rpx;
|
||||
border: 2rpx solid $base-color;
|
||||
text {
|
||||
color: $base-color;
|
||||
border-radius: 40rpx;
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
|
||||
.icondiy {
|
||||
margin-right: 4rpx;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.active-btn {
|
||||
position: fixed;
|
||||
bottom: 40rpx;
|
||||
left: 80rpx;
|
||||
right: 80rpx;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 2;
|
||||
border-radius: 50rpx;
|
||||
background-color: $base-color;
|
||||
color: #fff;
|
||||
.btn {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
.share-btn {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
border: 0;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.share-popup,
|
||||
.uni-popup__wrapper-box {
|
||||
.share-title {
|
||||
line-height: 60rpx;
|
||||
font-size: $font-size-toolbar;
|
||||
padding: 15rpx 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.share-content {
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
-webkit-flex-wrap: wrap;
|
||||
-moz-flex-wrap: wrap;
|
||||
-ms-flex-wrap: wrap;
|
||||
-o-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
padding: 80rpx 15rpx;
|
||||
|
||||
.share-box {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
|
||||
.share-btn {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
line-height: 1;
|
||||
height: auto;
|
||||
text {
|
||||
margin-top: 20rpx;
|
||||
font-size: $font-size-tag;
|
||||
display: block;
|
||||
color: $color-title;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-size: 80rpx;
|
||||
line-height: initial;
|
||||
}
|
||||
.icon-fuzhilianjie,
|
||||
.icon-pengyouquan,
|
||||
.icon-haowuquan,
|
||||
.icon-share-friend {
|
||||
color: #07c160;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.share-footer {
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-top: 2rpx solid $color-line;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.poster-layer {
|
||||
.generate-poster {
|
||||
padding: 40rpx 0;
|
||||
.iconfont {
|
||||
font-size: 80rpx;
|
||||
color: #07c160;
|
||||
line-height: initial;
|
||||
}
|
||||
> view {
|
||||
text-align: center;
|
||||
&:last-child {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.image-wrap {
|
||||
width: 64%;
|
||||
height: 854rpx;
|
||||
margin: 60rpx auto 40rpx auto;
|
||||
box-shadow: 0 0 32rpx rgba(100, 100, 100, 0.3);
|
||||
image {
|
||||
width: 480rpx;
|
||||
height: 854rpx;
|
||||
}
|
||||
}
|
||||
.msg {
|
||||
padding: 40rpx;
|
||||
}
|
||||
.save {
|
||||
text-align: center;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
.close {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 20rpx;
|
||||
width: 40rpx;
|
||||
height: 80rpx;
|
||||
font-size: 50rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
587
pages_promotion/fenxiao/index.vue
Normal file
587
pages_promotion/fenxiao/index.vue
Normal file
@@ -0,0 +1,587 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="fenxiao-index" :style="{ background: 'url(' + $util.img('public/uniapp/fenxiao/index/commissionFission-background.png') + ')',backgroundRepeat: 'no-repeat',backgroundSize:'100%' }">
|
||||
<block v-if="info.fenxiao_id > 0">
|
||||
<!-- 头部 -->
|
||||
<view class="fenxiao-index-header" :class="{ 'not-level': !levelList.length }" >
|
||||
<view class="member">
|
||||
<view class="member-pic">
|
||||
<image :src="info.headimg ? $util.img(info.headimg) : $util.getDefaultImage().head" @error="info.headimg = $util.getDefaultImage().head" mode="aspectFill"/>
|
||||
<!-- <text class="level-name ">{{ info.level_name }}</text> -->
|
||||
</view>
|
||||
<view class="member-info">
|
||||
<view class="member-info-box">
|
||||
<text class="name">{{ info.fenxiao_name }}</text>
|
||||
<p class="level" v-if="info.level_num > 0"><img :src="$util.img('public/uniapp/fenxiao/index/commissionFission-level.png')" alt="" class="level-icon">{{ info.level_name }}</p>
|
||||
</view>
|
||||
<view class="recommend">上级代理商:{{ info.parent_name?info.parent_name:'总店' }}</view>
|
||||
<view class="recommend">已邀请成功:{{ teamNum.num }}人<text class="iconfont icon-right" style="font-size: 24rpx;"></text></view>
|
||||
</view>
|
||||
<!-- <view class="promote-rules font-size-tag" @click="$util.redirectTo('/pages_promotion/fenxiao/promote')">
|
||||
<text class="iconfont icon-wenhao font-size-tag"></text>
|
||||
推广规则
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <view class="fenxiao-level-wrap" v-if="levelList.length">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/level_icon.png')" mode="widthFix" class="level-icon"/>
|
||||
<view class="level-wrap" @click="$util.redirectTo('/pages_promotion/fenxiao/level')">
|
||||
<view class="title">{{ info.level_num > 0 ? info.level_name : '等级未解锁' }}</view>
|
||||
<view class="desc">下单、邀请好友均可提升等级</view>
|
||||
</view>
|
||||
<view class="btn" @click="$refs.taskPopup.open()" v-if="info.condition.last_level">做任务</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<view class="fenxiao-index-allmoney">
|
||||
<view class="allmoney-top-money">
|
||||
<view class="allmoney-top">
|
||||
<view class="font-size-sub">可{{ fenxiaoWords.withdraw }}(元)</view>
|
||||
<view class="withdrawal-record" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">
|
||||
提现明细
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="total-commission price-font">{{ info.account }}</view>
|
||||
</view>
|
||||
|
||||
<view class="allmoney-bottom">
|
||||
<!-- <view class="allmoney-all-wrap" @click="$util.redirectTo('/pages_promotion/fenxiao/bill')">
|
||||
<view class="title">总{{ fenxiaoWords.account }}</view>
|
||||
<view class="money price-font">{{ info.total_commission | moneyFormat }}</view>
|
||||
</view>
|
||||
<view class="allmoney-all-wrap" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">
|
||||
<view class="title">已提现{{ fenxiaoWords.account }}</view>
|
||||
<view class="money price-font">{{ info.account_withdraw | moneyFormat }}</view>
|
||||
</view> -->
|
||||
<view class="allmoney-all-wrap" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">
|
||||
<view class="title">提现中(元)<text class="iconfont icon-right" style="font-size: 24rpx;"></text></view>
|
||||
<view class="money price-font">{{ info.account_withdraw_apply | moneyFormat }}</view>
|
||||
</view>
|
||||
<view class="allmoney-all-wrap" @click="$util.redirectTo('/pages_promotion/fenxiao/order', { type: 1 })">
|
||||
<view class="title">待入账(元)<text class="iconfont icon-right" style="font-size: 24rpx;"></text></view>
|
||||
<view class="money price-font">{{ info.in_progress_money | moneyFormat }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="withdraw-btn" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply')">提现
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="fenxiao-index-allmoney" style="padding: 0;border-radius:24rpx;margin-top: 0;" @click="toPoster()">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/commissionFission-qrcode1.png')" mode="widthFix" style="width: 100%;border-radius:24rpx" />
|
||||
</view>
|
||||
|
||||
<!-- 功能列表 -->
|
||||
<view class="fenxiao-menu-list">
|
||||
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/team')">
|
||||
<view class="icon-wrap">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/down-line.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">我的粉丝</view>
|
||||
<view class="desc">邀请的用户</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">
|
||||
<view class="icon-wrap">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/jifenjiangli.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">{{ fenxiaoWords.withdraw }}明细</view>
|
||||
<view class="desc">累计{{ fenxiaoWords.account }}¥{{ info.total_commission | moneyFormat }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/order')">
|
||||
<view class="icon-wrap">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/fenxiaodingdan.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">{{ fenxiaoWords.concept + '订单' }}</view>
|
||||
<view class="desc">{{ fenxiaoWords.concept + '订单' }}明细</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="menu-item" @click="toPoster()">
|
||||
<view class="icon-wrap">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/friend.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">我的邀请码</view>
|
||||
<view class="desc">邀好友赚好礼</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/promote')">
|
||||
<view class="icon-wrap">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/code.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">邀请好友</view>
|
||||
<view class="desc">邀好友赚好礼</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/bill')">
|
||||
<view class="icon-wrap">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/bill.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">账单报表</view>
|
||||
<view class="desc">{{ fenxiaoWords.account }}变更明细</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/goods_list', { templateId: templateId })">
|
||||
<view class="icon-wrap">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/market.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">{{ fenxiaoWords.concept }}商品</view>
|
||||
<view class="desc">{{ fenxiaoWords.concept }}商品</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/ranking_list', { type: 'profit' })">
|
||||
<view class="icon-wrap">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/commission_rank.png')" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">{{ fenxiaoWords.account }}排行</view>
|
||||
<view class="desc">您的排名为第{{ profitRanking }}位</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/ranking_list', { type: 'invited_num' })">
|
||||
<view class="icon-wrap">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/promoter_rank.png')" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">推广人排行</view>
|
||||
<view class="desc">您的排名为{{ invitedNumRanking }}位</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/level')" v-if="levelList.length">
|
||||
<view class="icon-wrap">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/team_reward.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">等级说明</view>
|
||||
<view class="desc">{{ fenxiaoWords.concept }}等级说明</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<!-- <view class="fenxiao-team">
|
||||
<view class="fenxiao-index-other">
|
||||
<view @click="$util.redirectTo('/pages_promotion/fenxiao/team')" class="all-money-item">
|
||||
<view class="img-wrap">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/down-line.png')" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="all-money-tit-wrap">
|
||||
<text class="all-money-tit">我的粉丝</text>
|
||||
<text class="all-money-num">{{ teamNum.num }}人</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fenxiao-index-other">
|
||||
<view @click="$util.redirectTo('/pages_promotion/fenxiao/child_fenxiao')" class="all-money-item">
|
||||
<view class="img-wrap">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/yejikaohe.png')" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="all-money-tit-wrap">
|
||||
<text class="all-money-tit">{{ fenxiaoWords.fenxiao_name }}</text>
|
||||
<text class="all-money-num">{{ teamNum.fenxiao_num }}人</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</block>
|
||||
<ns-copyright></ns-copyright>
|
||||
<view class="empty" v-if="!info.fenxiao_id > 0 && showEmpty">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix"></image>
|
||||
<text>您还不是{{ fenxiaoWords.fenxiao_name }},请先提交申请</text>
|
||||
<view @click="$util.redirectTo('/pages_promotion/fenxiao/apply')" class="color-base-bg">立即加入</view>
|
||||
</view>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
<ns-login ref="login"></ns-login>
|
||||
|
||||
<uni-popup ref="taskPopup" type="bottom">
|
||||
<view class="task-popup popup-layer" v-if="levelInfo">
|
||||
<view class="head-wrap">
|
||||
<text>快速升级技巧</text>
|
||||
<text class="iconfont icon-close" @click="$refs.taskPopup.close()"></text>
|
||||
</view>
|
||||
<view class="body-wrap">
|
||||
<view class="equity-content" v-for="(item, index) in levelInfo.task" :key="index">
|
||||
<text class="subordinate-consumption">
|
||||
{{ item.title }}
|
||||
<text class="iconfont icon-wenhao" @click="openTips(item)"></text>
|
||||
<text class="incomplete">{{ item.progress == 100 ? '已完成' : '未完成' }}</text>
|
||||
</text>
|
||||
<view class="circle">
|
||||
<progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" />
|
||||
</view>
|
||||
<text class="zero">{{ item.value }}</text>
|
||||
<text>/{{ item.condition }}</text>
|
||||
<text class="to-complete-box" @click="$util.redirectTo('/pages_promotion/fenxiao/promote')">
|
||||
<text class="to-complete">{{ item.progress == 100 ? '已完成' : '去完成' }}</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
<uni-popup type="bottom" ref="tips">
|
||||
<view class="popup">
|
||||
<view class="popup-header">
|
||||
<text class="tit">提示</text>
|
||||
<text class="iconfont icon-close" @click="$refs.tips.close()"></text>
|
||||
</view>
|
||||
<view class="popup-body">
|
||||
<view>{{ tips }}</view>
|
||||
<view v-if="levelInfo">{{ levelInfo.upgrade_type == 1 ? '满足任意一条件即可升级' : '满足全部条件才能进行升级' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import fenxiaoWords from '@/common/js/fenxiao-words.js';
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uniPopup
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {
|
||||
fenxiao_name: '',
|
||||
fenxiao_id: 0
|
||||
},
|
||||
showEmpty: false,
|
||||
teamNum: {
|
||||
fenxiao_num: 0,
|
||||
member_num: 0
|
||||
},
|
||||
//初始化获取到的模板id
|
||||
templateId: '',
|
||||
tips: '',
|
||||
profitRanking: 0,
|
||||
invitedNumRanking: 0,
|
||||
levelList: [],
|
||||
poster:''
|
||||
};
|
||||
},
|
||||
mixins: [fenxiaoWords],
|
||||
onShow() {
|
||||
if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + '中心');
|
||||
|
||||
if (this.storeToken) {
|
||||
this.checkFenxiaoIsStart();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_promotion/fenxiao/index');
|
||||
});
|
||||
}
|
||||
|
||||
this.getTemplateId();
|
||||
this.getPoster();
|
||||
},
|
||||
onLoad() {
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启分销',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index', {}, 'redirectTo');
|
||||
}, 2000);
|
||||
}
|
||||
},1000);
|
||||
this.getFenxiaoLevel();
|
||||
},
|
||||
methods: {
|
||||
toPoster(){
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/promote_code', { poster: this.poster,templateId:this.templateId })
|
||||
},
|
||||
/**
|
||||
* 获取分享海报
|
||||
*/
|
||||
getPoster() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/posterList',
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.poster = res.data.toString();
|
||||
this.poster = encodeURIComponent(this.poster);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 检测分销是否开启
|
||||
*/
|
||||
checkFenxiaoIsStart() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/config/basics',
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data) {
|
||||
if (res.data.level > 0) {
|
||||
this.getFenxiaoDetail();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启分销',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取分销商信息
|
||||
getFenxiaoDetail() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/detail',
|
||||
success: res => {
|
||||
console.log(res)
|
||||
if (res.data) {
|
||||
if (res.data.status == -1) {
|
||||
this.$util.showToast({
|
||||
title: '当前分销商已冻结'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/member/index');
|
||||
}, 2000);
|
||||
return;
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
this.info = res.data;
|
||||
this.getTeamNum();
|
||||
this.getRanking('invited_num');
|
||||
this.getRanking('profit');
|
||||
this.showEmpty = true;
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/apply', {}, 'redirectTo');
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
this.showEmpty = true;
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
//去提现
|
||||
goTixian() {
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply');
|
||||
},
|
||||
toLevel() {
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/level');
|
||||
},
|
||||
close() {
|
||||
this.$refs.taskPopup.close();
|
||||
},
|
||||
getTeamNum() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/teamnum',
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.teamNum = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取分享海报模板id
|
||||
*/
|
||||
getTemplateId() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/posterTemplateIds',
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.templateId = [...res.data].join();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
moneyFormat(money) {
|
||||
if (isNaN(parseFloat(money))) return money;
|
||||
return parseFloat(money).toFixed(2);
|
||||
},
|
||||
openTips(data) {
|
||||
this.tips = data.tips;
|
||||
this.$refs.tips.open();
|
||||
},
|
||||
getRanking(type) {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/ranking',
|
||||
data: {
|
||||
type: type
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
if (type == 'profit') this.profitRanking = res.data;
|
||||
if (type == 'invited_num') this.invitedNumRanking = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getFenxiaoLevel() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/Level/lists',
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data) {
|
||||
this.levelList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
if (options.from === 'navigateBack') {
|
||||
return false;
|
||||
}
|
||||
this.$util.redirectTo('/pages/member/index', {}, 'reLaunch');
|
||||
return true;
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.checkFenxiaoIsStart();
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
levelInfo() {
|
||||
if (this.info && this.info.condition && this.info.condition.last_level) {
|
||||
let level = this.info.condition.last_level;
|
||||
level.task = [];
|
||||
level.complete = 0;
|
||||
|
||||
if (level.one_fenxiao_order_num > 0) {
|
||||
let task = {
|
||||
title: '下级消费',
|
||||
desc: '下级消费单数满' + level.one_fenxiao_order_num + '单',
|
||||
tips: '分销商自己购买和自己推荐的直属会员购买的订单次数',
|
||||
condition: level.one_fenxiao_order_num,
|
||||
value: this.info.one_fenxiao_order_num,
|
||||
progress: parseFloat(this.info.one_fenxiao_order_num) > parseFloat(level.one_fenxiao_order_num) ?
|
||||
100 :
|
||||
((parseFloat(this.info.one_fenxiao_order_num) / parseFloat(level.one_fenxiao_order_num)) * 100).toFixed(2)
|
||||
};
|
||||
if (task.progress == 100) level.complete += 1;
|
||||
level.task.push(task);
|
||||
}
|
||||
if (level.one_fenxiao_total_order > 0) {
|
||||
let task = {
|
||||
title: '下级消费',
|
||||
desc: '下级消费金额满' + this.moneyFormat(level.one_fenxiao_total_order) + '元',
|
||||
tips: '分销商自己购买和推荐的直属会员购买的订单的总额',
|
||||
condition: this.moneyFormat(level.one_fenxiao_total_order),
|
||||
value: this.info.one_fenxiao_total_order,
|
||||
progress: parseFloat(this.info.one_fenxiao_total_order) > parseFloat(level.one_fenxiao_total_order) ?
|
||||
100 :
|
||||
((parseFloat(this.info.one_fenxiao_total_order) / parseFloat(level.one_fenxiao_total_order)) * 100).toFixed(2)
|
||||
};
|
||||
if (task.progress == 100) level.complete += 1;
|
||||
level.task.push(task);
|
||||
}
|
||||
if (level.one_fenxiao_order_money > 0) {
|
||||
let task = {
|
||||
title: '下级消费',
|
||||
desc: '下级消费产生' + this.fenxiaoWords.account + '总额满' + this.moneyFormat(level
|
||||
.one_fenxiao_order_money) + '元',
|
||||
tips: '分销商自己购买和自己推荐的直属会员购买的订单' + this.fenxiaoWords.account + '总额',
|
||||
condition: this.moneyFormat(level.one_fenxiao_order_money),
|
||||
value: this.info.one_fenxiao_order_money,
|
||||
progress: parseFloat(this.info.one_fenxiao_order_money) > parseFloat(level.one_fenxiao_order_money) ?
|
||||
100 :
|
||||
((parseFloat(this.info.one_fenxiao_order_money) / parseFloat(level.one_fenxiao_order_money)) * 100).toFixed(2)
|
||||
};
|
||||
if (task.progress == 100) level.complete += 1;
|
||||
level.task.push(task);
|
||||
}
|
||||
if (level.order_num > 0) {
|
||||
let task = {
|
||||
title: '自身消费',
|
||||
desc: '自身消费单数满' + level.order_num + '单',
|
||||
tips: '分销商自己购买的订单次数',
|
||||
condition: level.order_num,
|
||||
value: this.info.order_num,
|
||||
progress: parseFloat(this.info.order_num) > parseFloat(level.order_num) ? 100 : ((parseFloat(this.info.order_num) / parseFloat(level.order_num)) * 100).toFixed(2)
|
||||
};
|
||||
if (task.progress == 100) level.complete += 1;
|
||||
level.task.push(task);
|
||||
}
|
||||
if (level.order_money > 0) {
|
||||
let task = {
|
||||
title: '自身消费',
|
||||
desc: '自身消费金额满' + this.moneyFormat(level.order_money) + '元',
|
||||
tips: '分销商自己购买的订单总额',
|
||||
condition: this.moneyFormat(level.order_money),
|
||||
value: this.info.order_money,
|
||||
progress: parseFloat(this.info.order_money) > parseFloat(level.order_money) ?
|
||||
100 :
|
||||
((parseFloat(this.info.order_money) / parseFloat(level.order_money)) * 100).toFixed(2)
|
||||
};
|
||||
if (task.progress == 100) level.complete += 1;
|
||||
level.task.push(task);
|
||||
}
|
||||
if (level.one_child_num > 0) {
|
||||
let task = {
|
||||
title: '邀请好友',
|
||||
desc: '邀请好友人数达到' + level.one_child_num + '人',
|
||||
tips: '分销商的直属下级会员人数(包含已经申请成为分销商的)',
|
||||
condition: level.one_child_num,
|
||||
value: this.info.one_child_num,
|
||||
progress: parseFloat(this.info.one_child_num) > parseFloat(level.one_child_num) ?
|
||||
100 :
|
||||
((parseFloat(this.info.one_child_num) / parseFloat(level.one_child_num)) * 100).toFixed(2)
|
||||
};
|
||||
if (task.progress == 100) level.complete += 1;
|
||||
level.task.push(task);
|
||||
}
|
||||
if (level.one_child_fenxiao_num > 0) {
|
||||
let task = {
|
||||
title: '邀请好友',
|
||||
desc: '邀请好友成为分销商人数达到' + level.one_child_fenxiao_num + '人',
|
||||
tips: '分销商的直属下级分销商人数',
|
||||
condition: level.one_child_fenxiao_num,
|
||||
value: this.info.one_child_fenxiao_num,
|
||||
progress: parseFloat(this.info.one_child_fenxiao_num) > parseFloat(level.one_child_fenxiao_num) ?
|
||||
100 :
|
||||
((parseFloat(this.info.one_child_fenxiao_num) / parseFloat(level.one_child_fenxiao_num)) * 100).toFixed(2)
|
||||
};
|
||||
if (task.progress == 100) level.complete += 1;
|
||||
level.task.push(task);
|
||||
}
|
||||
level.task_num = level.upgrade_type == 1 ? 1 : level.task.length;
|
||||
return level;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './public/css/index.scss';
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
/deep/ .uni-popup__wrapper {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box,
|
||||
.uni-popup__wrapper.uni-custom.bottom .uni-popup__wrapper-box {
|
||||
background: none;
|
||||
max-height: unset !important;
|
||||
overflow-y: hidden !important;
|
||||
}
|
||||
|
||||
/deep/ .uni-popup__wrapper {
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
</style>
|
||||
320
pages_promotion/fenxiao/level.vue
Normal file
320
pages_promotion/fenxiao/level.vue
Normal file
@@ -0,0 +1,320 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="container">
|
||||
<view class="level-top">
|
||||
<image :src="$util.img('public/uniapp/level/level-top-bg.png')"></image>
|
||||
</view>
|
||||
|
||||
<swiper :autoplay="false" :duration="500" class="level-swiper" previous-margin="50rpx" next-margin="50rpx" @change="swiperChange" :current="curr">
|
||||
<swiper-item v-for="(item, index) in levelList" :key="index">
|
||||
<view class="level-item" :class="{'curr': index == curr}">
|
||||
<view class="level-wrap">
|
||||
<view class="member-info">
|
||||
<view class="head-img">
|
||||
<image :src="fenxiaoInfo.headimg ? $util.img(fenxiaoInfo.headimg) : $util.getDefaultImage().head" @error="fenxiaoInfo.headimg = $util.getDefaultImage().head" mode="aspectFill"/>
|
||||
</view>
|
||||
<view class="nickname">{{ fenxiaoInfo.nickname }}</view>
|
||||
<view class="level-name">{{ item.level_name }}</view>
|
||||
</view>
|
||||
<view class="level-rate">
|
||||
<view class="rate-item" v-if="config.level > 0">
|
||||
<view class="title">一级分佣比率</view>
|
||||
<view class="rate">{{ item.one_rate }}<text class="percentage">%</text></view>
|
||||
</view>
|
||||
<view class="rate-item" v-if="config.level > 1">
|
||||
<view class="title">二级分佣比率</view>
|
||||
<view class="rate">{{ item.two_rate }}<text class="percentage">%</text></view>
|
||||
</view>
|
||||
<view class="rate-item" v-if="config.level > 2">
|
||||
<view class="title">三级分佣比率</view>
|
||||
<view class="rate">{{ item.three_rate }}<text class="percentage">%</text></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="not-unlocked" v-if="item.level_num > fenxiaoInfo.level_num">
|
||||
<text class="iconfont icon-suoding"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<view class="level-condition" v-if="levelInfo">
|
||||
<view class="condition-title">
|
||||
<view class="title">快速升级技巧</view>
|
||||
<view class="rate price-font">
|
||||
<text class="complete">{{ levelInfo.complete > levelInfo.task_num ? levelInfo.task_num : levelInfo.complete }}</text>
|
||||
<text class="num">/{{ levelInfo.task_num }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="task">
|
||||
<view class="task-item" v-for="(item, index) in levelInfo.task" :key="index">
|
||||
<view class="flex-box">
|
||||
<view class="title">
|
||||
{{item.title}}
|
||||
<text class="iconfont icon-wenxiao" @click="openTips(item)"></text>
|
||||
</view>
|
||||
<view class="status" :class="{'complete': item.progress == 100}">
|
||||
{{ item.progress == 100 ? '已完成' : '未完成' }}</view>
|
||||
</view>
|
||||
<view class="progress">
|
||||
<progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" />
|
||||
</view>
|
||||
<view class="flex-box">
|
||||
<view class="desc">{{item.desc}}</view>
|
||||
<view class="rate price-font">
|
||||
<text class="complete">{{ item.value }}</text>
|
||||
<text class="num">/{{ item.condition }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<uni-popup type="bottom" ref="tips">
|
||||
<view class="popup">
|
||||
<view class="popup-header">
|
||||
<text class="tit">提示</text>
|
||||
<text class="iconfont icon-close" @click="$refs.tips.close()"></text>
|
||||
</view>
|
||||
<view class="popup-body">
|
||||
<view>{{ tips }}</view>
|
||||
<view v-if="levelInfo">{{ levelInfo.upgrade_type == 1 ? '满足任意一条件即可升级' : '满足全部条件才能进行升级' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
<ns-goods-recommend route="fenxiao_level"></ns-goods-recommend>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
fenxiaoInfo: {
|
||||
condition: {
|
||||
last_level: null
|
||||
}
|
||||
},
|
||||
config: {},
|
||||
levelList: [],
|
||||
curr: 0,
|
||||
tips: ''
|
||||
};
|
||||
},
|
||||
mixins: [fenxiaoWords],
|
||||
computed: {
|
||||
levelInfo() {
|
||||
if (this.levelList.length) {
|
||||
let level = this.levelList[this.curr];
|
||||
level.task = [];
|
||||
level.complete = 0;
|
||||
|
||||
if (level.one_fenxiao_order_num > 0) {
|
||||
let task = {
|
||||
title: '下级消费',
|
||||
desc: '下级消费单数满' + level.one_fenxiao_order_num + '单',
|
||||
tips: '分销商自己购买和自己推荐的直属会员购买的订单次数达到'+ level.one_fenxiao_order_num + '单',
|
||||
condition: level.one_fenxiao_order_num,
|
||||
value: this.fenxiaoInfo.one_fenxiao_order_num,
|
||||
progress: parseFloat(this.fenxiaoInfo.one_fenxiao_order_num) > parseFloat(level.one_fenxiao_order_num) ? 100 : (parseFloat(this.fenxiaoInfo.one_fenxiao_order_num) / parseFloat(level.one_fenxiao_order_num) * 100).toFixed(2)
|
||||
}
|
||||
if (task.progress == 100) level.complete += 1;
|
||||
level.task.push(task);
|
||||
}
|
||||
if (level.one_fenxiao_total_order > 0) {
|
||||
let task = {
|
||||
title: '下级消费',
|
||||
desc: '下级消费金额满' + this.moneyFormat(level.one_fenxiao_total_order) + '元',
|
||||
tips: '分销商自己购买和推荐的直属会员购买的订单的总额达到'+ this.moneyFormat(level.one_fenxiao_total_order) + '元',
|
||||
condition: this.moneyFormat(level.one_fenxiao_total_order),
|
||||
value: this.fenxiaoInfo.one_fenxiao_total_order,
|
||||
progress: parseFloat(this.fenxiaoInfo.one_fenxiao_total_order) > parseFloat(level.one_fenxiao_total_order) ? 100 : (parseFloat(this.fenxiaoInfo.one_fenxiao_total_order) / parseFloat(level.one_fenxiao_total_order) * 100)
|
||||
.toFixed(2)
|
||||
}
|
||||
if (task.progress == 100) level.complete += 1;
|
||||
level.task.push(task);
|
||||
}
|
||||
if (level.one_fenxiao_order_money > 0) {
|
||||
let task = {
|
||||
title: '下级消费',
|
||||
desc: '下级消费产生佣金总额满' + this.moneyFormat(level.one_fenxiao_order_money) + '元',
|
||||
tips: '分销商自己购买和自己推荐的直属会员购买的订单佣金总额达到'+ this.moneyFormat(level.one_fenxiao_order_money) + '元',
|
||||
condition: this.moneyFormat(level.one_fenxiao_order_money),
|
||||
value: this.fenxiaoInfo.one_fenxiao_order_money,
|
||||
progress: parseFloat(this.fenxiaoInfo.one_fenxiao_order_money) > parseFloat(level.one_fenxiao_order_money) ? 100 : (parseFloat(this.fenxiaoInfo.one_fenxiao_order_money) / parseFloat(level.one_fenxiao_order_money) * 100)
|
||||
.toFixed(2)
|
||||
}
|
||||
if (task.progress == 100) level.complete += 1;
|
||||
level.task.push(task);
|
||||
}
|
||||
if (level.order_num > 0) {
|
||||
let task = {
|
||||
title: '自身消费',
|
||||
desc: '自身消费单数满' + level.order_num + '单',
|
||||
tips: '分销商自己购买的订单次数达到'+ level.order_num + '单',
|
||||
condition: level.order_num,
|
||||
value: this.fenxiaoInfo.order_num,
|
||||
progress: parseFloat(this.fenxiaoInfo.order_num) > parseFloat(level.order_num) ? 100 : (parseFloat(this.fenxiaoInfo.order_num) / parseFloat(level.order_num) * 100).toFixed(2)
|
||||
}
|
||||
if (task.progress == 100) level.complete += 1;
|
||||
level.task.push(task);
|
||||
}
|
||||
if (level.order_money > 0) {
|
||||
let task = {
|
||||
title: '自身消费',
|
||||
desc: '自身消费金额满' + this.moneyFormat(level.order_money) + '元',
|
||||
tips: '分销商自己购买的订单总额满足'+ this.moneyFormat(level.order_money) + '元',
|
||||
condition: this.moneyFormat(level.order_money),
|
||||
value: this.fenxiaoInfo.order_money,
|
||||
progress: parseFloat(this.fenxiaoInfo.order_money) > parseFloat(level.order_money) ? 100 : (parseFloat(this.fenxiaoInfo.order_money) / parseFloat(level.order_money) * 100).toFixed(2)
|
||||
}
|
||||
if (task.progress == 100) level.complete += 1;
|
||||
level.task.push(task);
|
||||
}
|
||||
if (level.one_child_num > 0) {
|
||||
let task = {
|
||||
title: '邀请好友',
|
||||
desc: '邀请好友人数达到' + level.one_child_num + '人',
|
||||
tips: '分销商的直属下级会员人数达到'+level.one_child_num+'人(包含已经申请成为分销商的)',
|
||||
condition: level.one_child_num,
|
||||
value: this.fenxiaoInfo.one_child_num,
|
||||
progress: parseFloat(this.fenxiaoInfo.one_child_num) > parseFloat(level.one_child_num) ? 100 : (parseFloat(this.fenxiaoInfo.one_child_num) / parseFloat(level.one_child_num) * 100).toFixed(2)
|
||||
}
|
||||
if (task.progress == 100) level.complete += 1;
|
||||
level.task.push(task);
|
||||
}
|
||||
if (level.one_child_fenxiao_num > 0) {
|
||||
let task = {
|
||||
title: '邀请好友',
|
||||
desc: '邀请好友成为分销商人数达到' + level.one_child_fenxiao_num + '人',
|
||||
tips: '分销商的直属下级分销商人数达到'+ level.one_child_fenxiao_num + '人',
|
||||
condition: level.one_child_fenxiao_num,
|
||||
value: this.fenxiaoInfo.one_child_fenxiao_num,
|
||||
progress: parseFloat(this.fenxiaoInfo.one_child_fenxiao_num) > parseFloat(level.one_child_fenxiao_num) ? 100 : (parseFloat(this.fenxiaoInfo.one_child_fenxiao_num) / parseFloat(level.one_child_fenxiao_num) * 100).toFixed(2)
|
||||
}
|
||||
if (task.progress == 100) level.complete += 1;
|
||||
level.task.push(task);
|
||||
}
|
||||
level.task_num = level.upgrade_type == 1 ? 1 : level.task.length;
|
||||
return level;
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启分销',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}, 2000);
|
||||
}
|
||||
},1000);
|
||||
|
||||
if (this.fenxiaoWords && this.fenxiaoWords.fenxiao_name) this.$langConfig.title(this.fenxiaoWords.fenxiao_name + '等级');
|
||||
|
||||
if (this.storeToken) {
|
||||
this.getFenxiaoInfo();
|
||||
this.getBasicsConfig();
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_tool/login/login', {
|
||||
back: '/pages_promotion/fenxiao/level'
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取分销等级信息
|
||||
*/
|
||||
getFenxiaoLevel() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/Level/lists',
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data) {
|
||||
this.levelList = res.data;
|
||||
this.levelList.forEach((item, index) => {
|
||||
if (item.level_id == this.fenxiaoInfo.level_id) this.curr = index;
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取分销商信息
|
||||
*/
|
||||
getFenxiaoInfo() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/detail',
|
||||
success: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.fenxiaoInfo = res.data;
|
||||
this.curr = this.fenxiaoInfo.level_num;
|
||||
this.getFenxiaoLevel();
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/apply');
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取分销基本配置
|
||||
*/
|
||||
getBasicsConfig() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/config/basics',
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.config = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
swiperChange(e) {
|
||||
this.curr = e.detail.current;
|
||||
},
|
||||
moneyFormat(money) {
|
||||
if (isNaN(parseFloat(money))) return money;
|
||||
return parseFloat(money).toFixed(2);
|
||||
},
|
||||
openTips(data) {
|
||||
this.tips = data.tips;
|
||||
this.$refs.tips.open();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './public/css/level.scss';
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
/deep/ .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
background: none;
|
||||
max-height: unset !important;
|
||||
overflow-y: hidden !important;
|
||||
}
|
||||
|
||||
/deep/ .uni-popup__wrapper {
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
|
||||
/deep/ .uni-popup {
|
||||
z-index: 8;
|
||||
}
|
||||
|
||||
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
|
||||
max-height: unset !important;
|
||||
}
|
||||
</style>
|
||||
203
pages_promotion/fenxiao/order.vue
Normal file
203
pages_promotion/fenxiao/order.vue
Normal file
@@ -0,0 +1,203 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<view class="withdraw-cate">
|
||||
<block v-for="(item, index) in category" :key="index">
|
||||
<view @click="selectCate(item.id)" class="cate-li" :class="{ 'active color-base-text color-base-bg-before': selectId == item.id }">{{ item.name }}</view>
|
||||
</block>
|
||||
</view>
|
||||
<mescroll-uni ref="mescroll" @getData="getData" top="90" class="member-point" :size="8" v-if="storeToken">
|
||||
<view class="goods_list" slot="list">
|
||||
<view class="order-list">
|
||||
<view class="order-item" v-for="(orderItem, orderIndex) in orderList" :key="orderIndex" @click="toDetail(orderItem.fenxiao_order_id)">
|
||||
<view class="order-header">
|
||||
<text class="site-name font-size-base">{{ orderItem.order_no }}</text>
|
||||
<text class="status-name color-base-text" v-if="orderItem.is_refund == 1">已退款</text>
|
||||
<text class="status-name color-text-green" v-else-if="orderItem.is_settlement == 1">已结算</text>
|
||||
<text class="status-name color-text-orange" v-else>待结算</text>
|
||||
</view>
|
||||
|
||||
<view class="order-body">
|
||||
<view class="goods-wrap">
|
||||
<view class="goods-img">
|
||||
<image :src="$util.img(orderItem.sku_image, { size: 'mid' })" @error="imageError(orderIndex)" mode="aspectFill" :lazy-load="true"></image>
|
||||
</view>
|
||||
<view class="goods-info">
|
||||
<view class="top-wrap">
|
||||
<view class="goods-name font-size-base">{{ orderItem.sku_name }}</view>
|
||||
<view>
|
||||
<text class="color-tip">返{{ fenxiaoWords.account }}</text>
|
||||
<text class="price-color price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text class="price-color price-style large" >{{ parseFloat(orderItem.commission).toFixed(2).split(".")[0] }}</text>
|
||||
<text class="price-color price-style small">.{{ parseFloat(orderItem.commission).toFixed(2).split(".")[1] }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-sub-section">
|
||||
<view class="goods-price">
|
||||
<text class="unit price-style small">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text class="price-color price-style large" >{{ parseFloat(orderItem.price).toFixed(2).split(".")[0] }}</text>
|
||||
<text class="unit price-style small">.{{ parseFloat(orderItem.price).toFixed(2).split(".")[1] }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>
|
||||
<text class="iconfont icon-close"></text>
|
||||
{{ orderItem.num }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-footer">
|
||||
<view class="order-base-info active">
|
||||
<view class="order-type ">
|
||||
<text class="color-tip">{{ $util.timeStampTurnTime(orderItem.create_time) }}</text>
|
||||
<!-- <text>返{{ fenxiaoWords.account }}金额:</text>
|
||||
<text class="color-base-text">{{ $lang('common.currencySymbol') }}{{ orderItem.commission }}</text> -->
|
||||
</view>
|
||||
<view class="total">
|
||||
<text>合计:</text>
|
||||
<text class="price-color">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text class="price-color font-size-toolbar" >{{ parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[0] }}</text>
|
||||
<text class="price-color">.{{ parseFloat(orderItem.real_goods_money).toFixed(2).split(".")[1] }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cart-empty">
|
||||
<ns-empty text="暂无订单" :isIndex="false" v-if="selectId == 0 && orderList.length == 0 && emptyShow"></ns-empty>
|
||||
<ns-empty text="暂无待结算订单" :isIndex="false" v-if="selectId == 1 && orderList.length == 0 && emptyShow"></ns-empty>
|
||||
<ns-empty text="暂无已结算订单" :isIndex="false" v-if="selectId == 2 && orderList.length == 0 && emptyShow"></ns-empty>
|
||||
<ns-empty text="暂无已退款订单" :isIndex="false" v-if="selectId == 3 && orderList.length == 0 && emptyShow"></ns-empty>
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-uni>
|
||||
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
category: [
|
||||
{
|
||||
id: 0,
|
||||
name: '全部',
|
||||
number: 2
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '待结算',
|
||||
number: 0
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '已结算',
|
||||
number: 0
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '已退款',
|
||||
number: 0
|
||||
}
|
||||
],
|
||||
selectId: 0,
|
||||
orderList: [],
|
||||
emptyShow: false,
|
||||
fenxiaoId: '',
|
||||
subMemberId: ''
|
||||
};
|
||||
},
|
||||
mixins: [fenxiaoWords],
|
||||
onLoad(option) {
|
||||
if (option.type != undefined) this.selectId = option.type;
|
||||
},
|
||||
onShow() {
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启分销',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}, 2000);
|
||||
}
|
||||
},1000);
|
||||
|
||||
if(this.fenxiaoWords && this.fenxiaoWords.concept)this.$langConfig.title(this.fenxiaoWords.concept + '订单');
|
||||
|
||||
if (!this.storeToken) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_promotion/fenxiao/order');
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//获得列表数据
|
||||
getData(mescroll) {
|
||||
this.emptyShow = false;
|
||||
if (mescroll.num == 1) {
|
||||
this.orderList = [];
|
||||
}
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/order/page',
|
||||
data: {
|
||||
page: mescroll.num,
|
||||
page_size: mescroll.size,
|
||||
is_settlement: this.selectId
|
||||
},
|
||||
success: res => {
|
||||
this.emptyShow = true;
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data && res.data.list) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({ title: res.message });
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.orderList = []; //如果是第一页需手动制空列表
|
||||
this.orderList = this.orderList.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
selectCate(e) {
|
||||
this.selectId = e;
|
||||
this.$refs.mescroll.refresh();
|
||||
},
|
||||
toDetail(e) {
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/order_detail', {
|
||||
id: e
|
||||
});
|
||||
},
|
||||
imageError(index) {
|
||||
this.orderList[index].sku_image = this.$util.getDefaultImage().goods;
|
||||
this.$forceUpdate();
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './public/css/order.scss';
|
||||
</style>
|
||||
378
pages_promotion/fenxiao/order_detail.vue
Normal file
378
pages_promotion/fenxiao/order_detail.vue
Normal file
@@ -0,0 +1,378 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<view class="order-detail">
|
||||
<view class="order-detail-box">
|
||||
<view class="header">
|
||||
<view class="title">
|
||||
<text>共{{ orderData.num }}件商品</text>
|
||||
</view>
|
||||
<text class="color-base-text font-size-tag" v-if="orderData.is_refund == 1">已退款</text>
|
||||
<text class="color-base-text font-size-tag" v-else-if="orderData.is_settlement == 1">已结算</text>
|
||||
<text class="color-base-text font-size-tag" v-else>待结算</text>
|
||||
</view>
|
||||
<view class="detail-body">
|
||||
<view class="detail-body-box">
|
||||
<view class="goods-image"><image :src="$util.img(orderData.sku_image, { size: 'mid' })" @error="imageError()" mode="aspectFill"></image></view>
|
||||
<view class="order-info">
|
||||
<view class="goods-name">{{ orderData.sku_name }}</view>
|
||||
<view class="goods-sub-section margin-top">
|
||||
<view>
|
||||
<text class="goods-price">
|
||||
<text class="unit price-color">¥</text>
|
||||
<text class="price-color font-size-toolbar" >{{ parseFloat(orderData.price).toFixed(2).split(".")[0] }}</text>
|
||||
<text class="unit price-color">.{{ parseFloat(orderData.price).toFixed(2).split(".")[1] }}</text>
|
||||
</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>
|
||||
<text class="iconfont icon-close"></text>
|
||||
{{ orderData.num }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="detail-footer">
|
||||
<text></text>
|
||||
<text>
|
||||
<text>合计:</text>
|
||||
<text class="price-color total">¥{{ orderData.real_goods_money }}</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-detail-box commission">
|
||||
<view class="header">
|
||||
<view class="title color-base-bg-before"><text>返佣详情</text></view>
|
||||
<text class="color-base-text"> </text>
|
||||
</view>
|
||||
<view class="detail-content">
|
||||
<view class="order-info-item">
|
||||
<text class="tit">订单编号:</text>
|
||||
<text>{{ orderData.order_no }}</text>
|
||||
</view>
|
||||
<view class="order-info-item">
|
||||
<text class="tit">分佣层级:</text>
|
||||
<text>{{ orderData.commission_level }}级</text>
|
||||
</view>
|
||||
<view class="order-info-item">
|
||||
<text class="tit">返佣金额:</text>
|
||||
<text class="price-color font-size-toolbar">
|
||||
<text class="font-size-goods-tag">¥</text>
|
||||
{{ parseFloat(orderData.commission).toFixed(2).split(".")[0] }}
|
||||
<text class="font-size-goods-tag">.{{ parseFloat(orderData.commission).toFixed(2).split(".")[1] }}</text>
|
||||
</text>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isIphoneX: false,
|
||||
orderId: 0,
|
||||
orderData: {
|
||||
action: []
|
||||
}
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
onLoad(option) {
|
||||
if (option.id) {
|
||||
this.orderId = option.id;
|
||||
} else {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
},
|
||||
mixins: [fenxiaoWords],
|
||||
onShow() {
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启分销',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}, 2000);
|
||||
}
|
||||
},1000);
|
||||
|
||||
this.isIphoneX = this.$util.uniappIsIPhoneX();
|
||||
|
||||
if (this.storeToken) {
|
||||
this.getOrderData();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_promotion/fenxiao/order_detail?id=' + this.orderId);
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getOrderData() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/order/info',
|
||||
data: {
|
||||
fenxiao_order_id: this.orderId
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
this.orderData = res.data;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '未获取到订单信息!'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/order', {}, 'redirectTo');
|
||||
}, 1500);
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
imageError() {
|
||||
this.orderData.sku_image = this.$util.getDefaultImage().goods;
|
||||
this.$forceUpdate();
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.getOrderData();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.order-detail {
|
||||
width: 100%;
|
||||
padding: 0 $padding;
|
||||
box-sizing: border-box;
|
||||
margin-top: $margin-updown;
|
||||
.order-detail-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
border-radius: $border-radius;
|
||||
.header {
|
||||
width: 100%;
|
||||
padding: 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
.title {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
.detail-body {
|
||||
width: 100%;
|
||||
padding: 0 30rpx 30rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.detail-body-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.goods-image {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
border-radius: $border-radius;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 1rpx solid $color-line;
|
||||
border-radius: $border-radius;
|
||||
}
|
||||
}
|
||||
.order-info {
|
||||
width: calc(100% - 200rpx);
|
||||
height: 180rpx;
|
||||
padding-left: $padding;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.goods-name {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
line-height: 1.5;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
|
||||
.goods-sub-section {
|
||||
width: 100%;
|
||||
line-height: 1.3;
|
||||
display: flex;
|
||||
|
||||
.goods-price {
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
|
||||
.unit {
|
||||
font-weight: normal;
|
||||
font-size: $font-size-tag;
|
||||
margin-right: 2rpx;
|
||||
}
|
||||
|
||||
view {
|
||||
flex: 1;
|
||||
line-height: 1.3;
|
||||
&:last-of-type {
|
||||
text-align: right;
|
||||
|
||||
.iconfont {
|
||||
line-height: 1;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.detail-content {
|
||||
width: 100%;
|
||||
padding: 0 30rpx 30rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1rpx solid $color-line;
|
||||
text {
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
.order-info-item .tit {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
.detail-footer {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
padding: $padding;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.total {
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.commission {
|
||||
margin-top: 20rpx;
|
||||
.detail-content {
|
||||
border: 0 !important;
|
||||
}
|
||||
}
|
||||
.order-money-detail {
|
||||
width: 100%;
|
||||
padding: 0 $padding;
|
||||
box-sizing: border-box;
|
||||
margin-top: $margin-updown;
|
||||
.order-money-detail-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding-top: $padding;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
border-radius: $border-radius;
|
||||
.header {
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
padding: 0 $padding;
|
||||
border-bottom: 1rpx solid $color-line;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
.title {
|
||||
padding-left: 20rpx;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
line-height: 1;
|
||||
font-weight: 600;
|
||||
}
|
||||
.title::before {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 4rpx;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
.money-detail-body {
|
||||
width: 100%;
|
||||
padding: $padding;
|
||||
box-sizing: border-box;
|
||||
.order-cell {
|
||||
display: flex;
|
||||
margin: 10rpx 0;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
line-height: 40rpx;
|
||||
|
||||
.tit {
|
||||
text-align: left;
|
||||
display: inline-block;
|
||||
width: 200rpx;
|
||||
}
|
||||
|
||||
.box {
|
||||
flex: 1;
|
||||
line-height: inherit;
|
||||
|
||||
.textarea {
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
color: #bbb;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
|
||||
.order-pay {
|
||||
padding: 0;
|
||||
|
||||
text {
|
||||
display: inline-block;
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
}
|
||||
text {
|
||||
color: $color-tip;
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.price-color{
|
||||
color: var(--price-color);
|
||||
}
|
||||
</style>
|
||||
363
pages_promotion/fenxiao/promote.vue
Normal file
363
pages_promotion/fenxiao/promote.vue
Normal file
@@ -0,0 +1,363 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="fenxiao-promote" :style="{ backgroundImage: 'url(' + $util.img('public/uniapp/fenxiao/promote/promote_bg.png') + ')' }">
|
||||
<view class="my-earnings">
|
||||
<view class="earnings-head-wrap">
|
||||
<view class="earnings-head">
|
||||
<image class="name" :src="$util.img('public/uniapp/fenxiao/promote/my_earnings.png')" mode="aspectFit"></image>
|
||||
<image class="money-bg" :src="$util.img('public/uniapp/fenxiao/promote/money.png')" mode="aspectFill"></image>
|
||||
<view class="content">
|
||||
累计收益
|
||||
<text class="money-text">{{ detailData.total_commission }}</text>
|
||||
元
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="earnings-body">
|
||||
<view class="earnings-tab">
|
||||
<text :class="{ active: tabIndex == 0 }" @click="tabCut(0)">已邀请好友</text>
|
||||
<text :class="{ active: tabIndex == 1 }" @click="tabCut(1)">已下单好友</text>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class="earnings-content-wrap" @scrolltolower="getTeam()">
|
||||
<view class="earnings-list" v-if="promote.list.length">
|
||||
<view class="earnings-item" v-for="(item, index) in promote.list" :key="index">
|
||||
<image
|
||||
class="item-img"
|
||||
:src="item.headimg ? $util.img(item.headimg) : $util.getDefaultImage().head"
|
||||
@error="item.headimg = $util.getDefaultImage().head"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
<view class="item-content">
|
||||
<view class="item-name multi-hidden">{{ item.nickname }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="earnings-empty" v-else>暂无已邀请好友,快去邀请吧</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="activity-rules">
|
||||
<image class="rules-name" :src="$util.img('public/uniapp/fenxiao/promote/activity_rules.png')" mode="aspectFit"></image>
|
||||
<view class="content" v-if="promoteContent.content"><rich-text :nodes="promoteContent.content"></rich-text></view>
|
||||
<view class="rules-empty" v-else>暂无活动规则</view>
|
||||
</view>
|
||||
<view class="active-btn"><button type="primary" @click="toPoster()">邀请好友</button></view>
|
||||
<ns-copyright></ns-copyright>
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<!-- 小程序隐私协议 -->
|
||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import htmlParser from '@/common/js/html-parser';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabIndex: 0,
|
||||
promoteContent: {},
|
||||
promote: {
|
||||
page: 0,
|
||||
page_size: 5,
|
||||
page_count: 0,
|
||||
list: []
|
||||
},
|
||||
isPay: 0,
|
||||
detailData: {},
|
||||
templateId: '',
|
||||
poster:'',
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启分销',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}, 2000);
|
||||
}
|
||||
},1000);
|
||||
|
||||
if (this.storeToken) {
|
||||
this.getTeam();
|
||||
this.getPromoteRule();
|
||||
this.getFenxiaoDetail();
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_promotion/fenxiao/promote_code');
|
||||
});
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getTemplateId();
|
||||
this.getPoster();
|
||||
},
|
||||
methods: {
|
||||
toPoster(){
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/promote_code', { poster: this.poster,templateId:this.templateId })
|
||||
},
|
||||
tabCut(index) {
|
||||
this.tabIndex = index;
|
||||
this.isPay = index;
|
||||
|
||||
this.promote.page_count = 0;
|
||||
this.promote.page = 0;
|
||||
this.promote.page_size = 5;
|
||||
this.getTeam();
|
||||
},
|
||||
getTeam() {
|
||||
if (this.promote.page_count > 0 && this.promote.page == this.promote.page_count) return;
|
||||
this.promote.page++;
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/team',
|
||||
data: {
|
||||
page: this.promote.page,
|
||||
page_size: this.promote.page_size,
|
||||
is_pay: this.isPay,
|
||||
level: 1
|
||||
},
|
||||
success: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
if (res.code >= 0) {
|
||||
if (this.promote.page == 1) this.promote.list = [];
|
||||
this.promote.page_count = res.data.page_count;
|
||||
this.promote.list = this.promote.list.concat(res.data.list);
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取分销商信息
|
||||
getFenxiaoDetail() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/detail',
|
||||
success: res => {
|
||||
if (res.data) {
|
||||
this.detailData = res.data;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取富文本
|
||||
getPromoteRule() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/config/promoterule',
|
||||
success: res => {
|
||||
if (res.data) {
|
||||
this.promoteContent = res.data;
|
||||
this.promoteContent.content = res.data.content ? htmlParser(res.data.content) : '';
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取分享海报
|
||||
*/
|
||||
getPoster() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/posterList',
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.poster = res.data.toString();
|
||||
this.poster = encodeURIComponent(this.poster);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取分享海报id
|
||||
*/
|
||||
getTemplateId() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/posterTemplateIds',
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.templateId = [...res.data].join();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fenxiao-promote {
|
||||
overflow: hidden;
|
||||
padding: 0 30rpx 160rpx;
|
||||
min-height: 100vh;
|
||||
background-color: #ff2d46;
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
.my-earnings,
|
||||
.activity-rules {
|
||||
background-color: #fff;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
.my-earnings {
|
||||
margin-top: 230rpx;
|
||||
padding-bottom: 40rpx;
|
||||
.earnings-head-wrap {
|
||||
background-color: #fff7f5;
|
||||
height: 160rpx;
|
||||
border-radius: 30rpx;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.earnings-head {
|
||||
position: relative;
|
||||
padding-top: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.name {
|
||||
position: absolute;
|
||||
width: 384rpx;
|
||||
height: 74rpx;
|
||||
top: -22rpx;
|
||||
}
|
||||
.content {
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
.money-bg {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
.money-text {
|
||||
margin: 0 6rpx;
|
||||
font-size: 40rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
.earnings-body {
|
||||
padding: 0 30rpx;
|
||||
.earnings-tab {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
height: 100rpx;
|
||||
font-size: 30rpx;
|
||||
color: #e93224;
|
||||
margin-bottom: 10rpx;
|
||||
text.active {
|
||||
position: relative;
|
||||
font-weight: bold;
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
height: 4rpx;
|
||||
width: 86rpx;
|
||||
left: 50%;
|
||||
bottom: -4rpx;
|
||||
transform: translateX(-50%);
|
||||
background-color: #e93224;
|
||||
}
|
||||
}
|
||||
}
|
||||
.earnings-content-wrap {
|
||||
max-height: 440rpx;
|
||||
}
|
||||
.earnings-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.item-img {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
margin-right: 20rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.item-time {
|
||||
font-size: $font-size-tag;
|
||||
color: $color-tip;
|
||||
}
|
||||
.item-name {
|
||||
line-height: 1.3;
|
||||
}
|
||||
.money {
|
||||
margin-left: auto;
|
||||
color: #f9b124;
|
||||
}
|
||||
}
|
||||
}
|
||||
.earnings-empty {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 160rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
.activity-rules {
|
||||
position: relative;
|
||||
margin-top: 60rpx;
|
||||
min-height: 300rpx;
|
||||
.rules-name {
|
||||
position: absolute;
|
||||
width: 384rpx;
|
||||
height: 74rpx;
|
||||
top: -22rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
.content {
|
||||
padding: 70rpx 20rpx 0;
|
||||
}
|
||||
.rules-empty {
|
||||
padding-top: 140rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.active-btn {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #ff2d46;
|
||||
height: 160rpx;
|
||||
padding: 0 60rpx;
|
||||
|
||||
button {
|
||||
flex: 1;
|
||||
margin: 0;
|
||||
border-radius: 50rpx;
|
||||
color: #985400;
|
||||
background: linear-gradient(45deg, #ffe2ac 0%, #fdc174 100%);
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
307
pages_promotion/fenxiao/promote_code.vue
Normal file
307
pages_promotion/fenxiao/promote_code.vue
Normal file
@@ -0,0 +1,307 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="container">
|
||||
<swiper class="swiper" @change="getIndex">
|
||||
<swiper-item v-for="(item, index) in poster" :key="index">
|
||||
<view class="swiper-item">
|
||||
<view class="poster-wrap">
|
||||
<image :src="$util.img(item)" mode="widthFix" :show-menu-by-longpress="true"/>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="tips">长按识别图中二维码</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- #ifdef MP -->
|
||||
<view class="btn color-base-bg color-base-border" @click="save">保存海报</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<uni-popup ref="popupDialog" :custom="true" :mask-click="false">
|
||||
<view class="dialog-popup">
|
||||
<view class="title">提示</view>
|
||||
<view class="message">您拒绝了保存图片到相册的授权请求,无法保存图片到相册,如需正常使用,请授权之后再进行操作。</view>
|
||||
<view class="action-wrap">
|
||||
<view @click="closeDialog">取消</view>
|
||||
<view>
|
||||
<button type="default" open-type="openSetting" @opensetting="closeDialog" hover-class="none">立即授权</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<!-- 小程序隐私协议 -->
|
||||
<privacy-popup ref="privacyPopup"></privacy-popup>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
Weixin
|
||||
} from 'common/js/wx-jssdk.js';
|
||||
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
poster: [],
|
||||
fenxiaoInfo: {},
|
||||
posterIndex: 0,
|
||||
//海报模板id
|
||||
templateId: ['default'],
|
||||
mpShareData: null //小程序分享数据
|
||||
};
|
||||
},
|
||||
components: {
|
||||
uniPopup
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取分销海报
|
||||
*/
|
||||
getPoster(id) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/poster',
|
||||
data: {
|
||||
page: '/pages/index/index',
|
||||
qrcode_param: JSON.stringify({}),
|
||||
template_id: id
|
||||
},
|
||||
success: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
if (res.code >= 0) {
|
||||
resolve(res.data.path);
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
reject();
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
getIndex(e) {
|
||||
this.posterIndex = e.detail.current;
|
||||
},
|
||||
save() {
|
||||
// #ifdef MP
|
||||
uni.downloadFile({
|
||||
url: this.$util.img(this.poster[this.posterIndex]),
|
||||
success: res => {
|
||||
if (res.statusCode === 200) {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success: () => {
|
||||
this.$util.showToast({
|
||||
title: '保存成功'
|
||||
});
|
||||
},
|
||||
fail: res => {
|
||||
if (res.errMsg == 'saveImageToPhotosAlbum:fail auth deny' ||
|
||||
res.errMsg == 'saveImageToPhotosAlbum:fail:auth denied') {
|
||||
this.$refs.popupDialog.open();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '保存失败,请稍后重试'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '下载失败'
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
this.$util.showToast({
|
||||
title: '下载失败'
|
||||
});
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
getFenxiaoDetail() {
|
||||
this.poster = [];
|
||||
try {
|
||||
this.templateId.forEach((item, index) => {
|
||||
this.getPoster(item).then(resolve => {
|
||||
this.poster.push(resolve);
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}).catch(reject => {
|
||||
throw reject;
|
||||
});
|
||||
});
|
||||
} catch {
|
||||
this.$util.showToast({
|
||||
title: '海报生成失败'
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
closeDialog() {
|
||||
this.$refs.popupDialog.close();
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启分销',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}, 2000);
|
||||
}
|
||||
},1000);
|
||||
|
||||
if (option.templateId) {
|
||||
this.templateId = option.templateId.split(',');
|
||||
}
|
||||
|
||||
if (this.storeToken) {
|
||||
if(option.poster){
|
||||
this.poster = decodeURIComponent(option.poster).split(',')
|
||||
setTimeout(() => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}, 500)
|
||||
}else{
|
||||
this.getFenxiaoDetail();
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_promotion/fenxiao/promote_code');
|
||||
});
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
//小程序分享
|
||||
// #ifdef MP-WEIXIN
|
||||
this.$util.getMpShare().then(res => {
|
||||
this.mpShareData = res;
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
//分享给好友
|
||||
onShareAppMessage() {
|
||||
return this.mpShareData.appMessage;
|
||||
},
|
||||
//分享到朋友圈
|
||||
onShareTimeline() {
|
||||
return this.mpShareData.timeLine;
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.getFenxiaoDetail();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.container {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.poster-wrap {
|
||||
padding: 40rpx 0;
|
||||
width: calc(100vw - 80rpx);
|
||||
margin: 0 40rpx;
|
||||
line-height: 1;
|
||||
|
||||
image {
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper {
|
||||
height: 1240rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 0 80rpx;
|
||||
margin-top: 30rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: $border-radius;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tips {
|
||||
text-align: center;
|
||||
font-size: $font-size-base;
|
||||
color: #999;
|
||||
font-weight: 600;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.dialog-popup {
|
||||
width: 580rpx;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
height: initial;
|
||||
|
||||
.title {
|
||||
padding: 30rpx 30rpx 0 30rpx;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.message {
|
||||
padding: 0 30rpx;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
font-size: $font-size-base;
|
||||
line-height: 1.3;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.action-wrap {
|
||||
margin-top: 50rpx;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
border-top: 2rpx solid #eee;
|
||||
|
||||
&>view {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
|
||||
&:first-child {
|
||||
border-right: 2rpx solid #eee;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
button {
|
||||
border: none;
|
||||
line-height: 80rpx;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
94
pages_promotion/fenxiao/public/css/follow.scss
Normal file
94
pages_promotion/fenxiao/public/css/follow.scss
Normal file
@@ -0,0 +1,94 @@
|
||||
.ns-adv {
|
||||
margin: $margin-updown $margin-both;
|
||||
border-radius: $border-radius;
|
||||
overflow: hidden;
|
||||
line-height: 1;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.lineheight-clear {
|
||||
line-height: 1 !important;
|
||||
}
|
||||
|
||||
// 商品列表双列样式
|
||||
.goods-list.double-column {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: $margin-updown $margin-both;
|
||||
|
||||
.goods-item {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
flex-basis: 48%;
|
||||
max-width: calc((100% - 30rpx) / 2);
|
||||
margin-right: $margin-both;
|
||||
margin-bottom: $margin-updown;
|
||||
border-radius: $border-radius;
|
||||
|
||||
&:nth-child(2n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.goods-img {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
padding-top: 100%;
|
||||
border-top-left-radius: $border-radius;
|
||||
border-top-right-radius: $border-radius;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.info-wrap {
|
||||
padding: 0 26rpx 26rpx 26rpx;
|
||||
}
|
||||
|
||||
.goods-name {
|
||||
font-size: $font-size-base;
|
||||
line-height: 1.3;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
margin-top: 20rpx;
|
||||
height: 68rpx;
|
||||
}
|
||||
|
||||
.discount-price {
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
margin-top: 16rpx;
|
||||
|
||||
.unit {
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.pro-info {
|
||||
display: flex;
|
||||
margin-top: 16rpx;
|
||||
|
||||
& > view {
|
||||
padding: 2rpx 10rpx;
|
||||
border: 2rpx solid;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
574
pages_promotion/fenxiao/public/css/index.scss
Normal file
574
pages_promotion/fenxiao/public/css/index.scss
Normal file
@@ -0,0 +1,574 @@
|
||||
.fenxiao-index {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.task-popup {
|
||||
.head-wrap{
|
||||
font-size: 16px;
|
||||
line-height: 51px;
|
||||
height: 51px;
|
||||
display: block;
|
||||
text-align: center;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.body-wrap{
|
||||
max-height: 50vh;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.equity-content{
|
||||
width: 400rpx;
|
||||
height: 200rpx;
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
// padding: 20rpx 0 20rpx 0rpx;
|
||||
}
|
||||
.subordinate-consumption{
|
||||
// margin-left: 130rpx;
|
||||
font-weight: 900;
|
||||
}
|
||||
.incomplete{
|
||||
font-weight: normal;
|
||||
color: rgb(153,153,153);
|
||||
margin-left: 120rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.icon-wenhao{
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.to-complete-box{
|
||||
width: 100rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 60rpx;
|
||||
background: rgb(233,51,35);
|
||||
position: absolute;
|
||||
left: 100%;
|
||||
top: 40px;
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.to-complete-box{
|
||||
padding: 5rpx;
|
||||
color: #fff;
|
||||
}
|
||||
.circle{
|
||||
width: 355rpx;
|
||||
height: 12rpx;
|
||||
margin: 10rpx 0rpx;
|
||||
}
|
||||
.zero{
|
||||
color:rgb(198,152,53);
|
||||
// margin-left: 130rpx;
|
||||
}
|
||||
.icon-close {
|
||||
position: absolute;
|
||||
float: right;
|
||||
right: 22px;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
.fenxiao-index-header {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
height: 180rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
&.not-level {
|
||||
height: 200rpx;
|
||||
}
|
||||
|
||||
.member {
|
||||
width: 100%;
|
||||
height: 156rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 54rpx 32rpx 0;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
|
||||
.promote-rules {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
right: 40rpx;
|
||||
font-size: 24rpx;
|
||||
.iconfont{
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.member-pic {
|
||||
width: 108rpx;
|
||||
height: 108rpx;
|
||||
border-radius: 50%;
|
||||
border: 4rpx solid #fff;
|
||||
position: relative;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.level-name {
|
||||
height: 32rpx;
|
||||
background: linear-gradient(180deg, #FCFCFD 0%, #C8D0DD 100%);
|
||||
border-radius: 32rpx;
|
||||
line-height: 32rpx;
|
||||
padding: 0 10rpx;
|
||||
font-size: 18rpx;
|
||||
font-weight: 500;
|
||||
color: #666666;
|
||||
position: absolute;
|
||||
bottom: -4rpx;
|
||||
left: 50%;
|
||||
z-index: 5;
|
||||
white-space: nowrap;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.member-info {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
margin-left: 32rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
view {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.member-info-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 1;
|
||||
.level{
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-webkit-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-box-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
-webkit-flex-shrink: 0;
|
||||
flex-shrink: 0;
|
||||
color: #ff3c29;
|
||||
font-size: 24rpx;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
margin-left: 24rpx !important;
|
||||
border-radius: 0 24rpx 24rpx 0;
|
||||
vertical-align: middle;
|
||||
background: #fff6d1;
|
||||
padding: 4rpx 24rpx;
|
||||
margin: 10rpx 0 10rpx 14rpx;
|
||||
.level-icon {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
-webkit-transform: translate(-50%, -55%);
|
||||
transform: translate(-50%, -55%);
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin: auto 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.recommend {
|
||||
font-size: $font-size-tag;
|
||||
margin-top: 4rpx;
|
||||
line-height: 1;
|
||||
margin-bottom: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.copy {
|
||||
width: 68rpx;
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
background: linear-gradient(172deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.8) 100%);
|
||||
border-radius: 60rpx;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
font-size: 18rpx;
|
||||
font-weight: 600;
|
||||
color: #202230;
|
||||
margin-left: 20rpx
|
||||
}
|
||||
}
|
||||
|
||||
.member-tixian {
|
||||
width: 120rpx;
|
||||
height: 50rpx;
|
||||
border: 2rpx solid #ffffff;
|
||||
border-radius: $border-radius;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: $font-size-tag;
|
||||
color: #ffffff;
|
||||
}
|
||||
.code {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.fenxiao-level-wrap {
|
||||
width: calc(100% - 48rpx);
|
||||
height: 128rpx;
|
||||
background: linear-gradient(90deg, #FDE5C2 0%, #FDC172 100%);
|
||||
border-radius: 20rpx 20rpx 0px 0px;
|
||||
padding: 36rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.level-icon {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
|
||||
.level-wrap {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
padding: 0 30rpx;
|
||||
margin-left: 30rpx;
|
||||
position: relative;
|
||||
|
||||
view {
|
||||
color: #945100;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 24rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 2rpx;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, #FDE5C2 0%, #FDC172 100%);
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 118rpx;
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
background: #945100;
|
||||
border-radius: 54rpx;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fenxiao_index_money {
|
||||
color: #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
|
||||
.xian {
|
||||
height: 40rpx;
|
||||
border: 2rpx solid rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.index-money-item {
|
||||
padding: 40rpx 0;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.item_money {
|
||||
color: #fff;
|
||||
font-size: 36rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
.item_tit {
|
||||
padding-top: 10rpx;
|
||||
font-size: $font-size-tag;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fenxiao-index-allmoney {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
margin: 20rpx 24rpx;
|
||||
border-radius: 16rpx;
|
||||
background-color: #ffffff;
|
||||
width: calc(100% - 48rpx);
|
||||
padding: 32rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.allmoney-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
view {
|
||||
line-height: 1;
|
||||
color: #565656;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.iconright {
|
||||
line-height: 1;
|
||||
font-size: 28rpx;
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.total-commission {
|
||||
color: #fa2943;
|
||||
margin-top: 20rpx;
|
||||
font-size: 56rpx;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.allmoney-bottom {
|
||||
display: flex;
|
||||
margin-top: 50rpx;
|
||||
|
||||
.allmoney-all-wrap {
|
||||
flex: 1;
|
||||
|
||||
.title {
|
||||
font-size: 24rpx;
|
||||
color: #565656;
|
||||
}
|
||||
|
||||
.money {
|
||||
font-size: 38rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.withdraw-btn {
|
||||
height: 78rpx;
|
||||
line-height: 78rpx;
|
||||
border-radius: 92rpx;
|
||||
background: #fa2943;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
margin: 50rpx 10rpx 0 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.uni-popup__wrapper{
|
||||
width: 450rpx;
|
||||
height: 400rpx;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.fenxiao-team {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
|
||||
.fenxiao-index-other {
|
||||
margin: 0 24rpx 20rpx 24rpx;
|
||||
border-radius: 16rpx;
|
||||
background-color: #ffffff;
|
||||
padding: 30rpx 0;
|
||||
flex: 1;
|
||||
|
||||
&:last-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.all-money-item {
|
||||
margin: 0 30rpx;
|
||||
display: flex;
|
||||
font-size: $font-size-tag;
|
||||
align-items: center;
|
||||
.img-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.all-money-tit-wrap {
|
||||
flex: 1;
|
||||
margin-left: 24rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 70rpx;
|
||||
|
||||
.all-money-tit {
|
||||
line-height: 1;
|
||||
color: $color-title;
|
||||
font-size: $font-size-base;
|
||||
flex: 1;
|
||||
}
|
||||
.all-money-num {
|
||||
color: $color-tip;
|
||||
font-size: 24rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fenxiao-menu-list {
|
||||
margin: 0 24rpx 20rpx 24rpx;
|
||||
border-radius: 16rpx;
|
||||
background-color: #ffffff;
|
||||
width: calc(100% - 48rpx);
|
||||
padding: 10rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.menu-item {
|
||||
width: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 32rpx 0;
|
||||
|
||||
.icon-wrap {
|
||||
width: 68rpx;
|
||||
display: flex;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
margin-right: 20rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.info {
|
||||
flex: 1;
|
||||
|
||||
.title {
|
||||
font-size: 28rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: 24rpx;
|
||||
margin-top: 12rpx;
|
||||
color: #aaa;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
width: 100%;
|
||||
height: 400rpx;
|
||||
margin-top: 200rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
image {
|
||||
width: 300rpx;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
text {
|
||||
font-size: $font-size-tag;
|
||||
font-weight: 600;
|
||||
}
|
||||
view {
|
||||
width: 300rpx;
|
||||
height: 70rpx;
|
||||
border-radius: $border-radius;
|
||||
text-align: center;
|
||||
line-height: 70rpx;
|
||||
color: #ffffff;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.popup {
|
||||
width: 100vw;
|
||||
background: #fff;
|
||||
border-top-left-radius: 24rpx;
|
||||
border-top-right-radius: 24rpx;
|
||||
|
||||
.popup-header {
|
||||
display: flex;
|
||||
border-bottom: 2rpx solid $color-line;
|
||||
position: relative;
|
||||
padding: 40rpx;
|
||||
|
||||
.tit {
|
||||
flex: 1;
|
||||
font-size: $font-size-toolbar;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
}
|
||||
.iconfont {
|
||||
line-height: 1;
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
color: $color-tip;
|
||||
font-size: $font-size-toolbar;
|
||||
}
|
||||
}
|
||||
|
||||
.popup-body {
|
||||
height: calc(100% - 250rpx);
|
||||
padding: 30rpx;
|
||||
&.store-popup {
|
||||
height: calc(100% - 120rpx);
|
||||
}
|
||||
&.safe-area {
|
||||
height: calc(100% - 270rpx);
|
||||
}
|
||||
&.store-popup.safe-area {
|
||||
height: calc(100% - 140rpx);
|
||||
}
|
||||
}
|
||||
}
|
||||
293
pages_promotion/fenxiao/public/css/level.scss
Normal file
293
pages_promotion/fenxiao/public/css/level.scss
Normal file
@@ -0,0 +1,293 @@
|
||||
.level-top {
|
||||
width: 100%;
|
||||
height: 40rpx;
|
||||
position: relative;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 260rpx;
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
|
||||
.level-swiper {
|
||||
width: 100vw;
|
||||
height: 270rpx;
|
||||
|
||||
.level-item {
|
||||
width: calc(100% - 60rpx);
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 26rpx;
|
||||
|
||||
.level-wrap {
|
||||
width: 100%;
|
||||
height: 90%;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
transition: all .5s;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.not-unlocked {
|
||||
position: absolute;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
background: #4B4B4B;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
right: -1rpx;
|
||||
top: -1rpx;
|
||||
border-top-right-radius: 16rpx;
|
||||
border-bottom-left-radius: 16rpx;
|
||||
|
||||
.iconfont {
|
||||
color: #D3DEE6;
|
||||
}
|
||||
}
|
||||
|
||||
&.curr {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
|
||||
.level-wrap {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.member-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.head-img {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.nickname {
|
||||
color: #fff;
|
||||
margin: 0 20rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.level-name {
|
||||
line-height: 1;
|
||||
border: 2rpx solid #fff;
|
||||
padding: 4rpx 10rpx;
|
||||
border-radius: 6rpx;
|
||||
font-size: 26rpx;
|
||||
color: #f5f5f5;
|
||||
}
|
||||
}
|
||||
|
||||
.level-rate {
|
||||
display: flex;
|
||||
margin-top: 30rpx;
|
||||
|
||||
.rate-item {
|
||||
text-align: left;
|
||||
flex: 1;
|
||||
}
|
||||
.title {
|
||||
color: #f5f5f5;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.rate {
|
||||
margin-top: 10rpx;
|
||||
color: #fff;
|
||||
font-size: 38rpx;
|
||||
line-height: 1;
|
||||
|
||||
.percentage {
|
||||
font-size: 28rpx;
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
swiper-item {
|
||||
&:nth-child(1) .level-wrap {
|
||||
background: linear-gradient(to right, #9BA7B1, #D3DEE6);
|
||||
}
|
||||
&:nth-child(2) .level-wrap {
|
||||
background: linear-gradient(to right, #F57E2A, #FAD494);
|
||||
}
|
||||
&:nth-child(3) .level-wrap {
|
||||
background: linear-gradient(to right, #F85151, #FF9999);
|
||||
}
|
||||
&:nth-child(4) .level-wrap {
|
||||
background: linear-gradient(to right, #78B8B4, #AFE6E2);
|
||||
}
|
||||
&:nth-child(5) .level-wrap {
|
||||
background: linear-gradient(to right, #4DA1E1, #58CBF0);
|
||||
}
|
||||
&:nth-child(6) .level-wrap {
|
||||
background: linear-gradient(to right, #81C636, #D1F677);
|
||||
}
|
||||
&:nth-child(7) .level-wrap {
|
||||
background: linear-gradient(to right, #6D7279, #A5AAB0);
|
||||
}
|
||||
&:nth-child(8) .level-wrap {
|
||||
background: linear-gradient(to right, #866DDB, #D49BFE);
|
||||
}
|
||||
&:nth-child(9) .level-wrap {
|
||||
background: linear-gradient(to right, #f1c74e, #f7dc81);
|
||||
}
|
||||
&:nth-child(10) .level-wrap {
|
||||
background: linear-gradient(to right, #418CCF, #9CC6F1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.level-condition {
|
||||
margin: 30rpx 26rpx;
|
||||
background: #fff;
|
||||
padding: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
|
||||
.condition-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bolder;
|
||||
position: relative;
|
||||
padding-left: 20rpx;
|
||||
line-height: 1;
|
||||
|
||||
&:before {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 6rpx;
|
||||
height: 100%;
|
||||
background-color: $base-color;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.rate {
|
||||
.complete {
|
||||
color: #E7B667;
|
||||
font-size: 26rpx!important;
|
||||
font-weight: normal!important;
|
||||
}
|
||||
.num {
|
||||
color: #bbb;
|
||||
font-size: 26rpx!important;
|
||||
font-weight: normal!important;
|
||||
}
|
||||
}
|
||||
|
||||
.task-item {
|
||||
padding: 20rpx 30rpx;
|
||||
background: #F8F8F8;
|
||||
border-radius: 10rpx;
|
||||
margin-top: 30rpx;
|
||||
|
||||
.flex-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.status{
|
||||
color: #999;
|
||||
|
||||
&.complete {
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
|
||||
.iconfont {
|
||||
font-size: 28rpx;
|
||||
color: #B7B7B7;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.desc {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.progress {
|
||||
margin: 16rpx 0;
|
||||
}
|
||||
|
||||
.complete {
|
||||
font-size: 24rpx!important;
|
||||
}
|
||||
.num {
|
||||
font-size: 24rpx!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.popup {
|
||||
width: 100vw;
|
||||
background: #fff;
|
||||
border-top-left-radius: 24rpx;
|
||||
border-top-right-radius: 24rpx;
|
||||
|
||||
.popup-header {
|
||||
display: flex;
|
||||
border-bottom: 2rpx solid $color-line;
|
||||
position: relative;
|
||||
padding: 40rpx;
|
||||
|
||||
.tit {
|
||||
flex: 1;
|
||||
font-size: $font-size-toolbar;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
}
|
||||
.iconfont {
|
||||
line-height: 1;
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
color: $color-tip;
|
||||
font-size: $font-size-toolbar;
|
||||
}
|
||||
}
|
||||
|
||||
.popup-body {
|
||||
height: calc(100% - 250rpx);
|
||||
padding: 30rpx;
|
||||
&.store-popup {
|
||||
height: calc(100% - 120rpx);
|
||||
}
|
||||
&.safe-area {
|
||||
height: calc(100% - 270rpx);
|
||||
}
|
||||
&.store-popup.safe-area {
|
||||
height: calc(100% - 140rpx);
|
||||
}
|
||||
}
|
||||
}
|
||||
206
pages_promotion/fenxiao/public/css/order.scss
Normal file
206
pages_promotion/fenxiao/public/css/order.scss
Normal file
@@ -0,0 +1,206 @@
|
||||
/deep/ .fixed {
|
||||
position: relative;
|
||||
top: 0;
|
||||
}
|
||||
/deep/ .empty {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
.cart-empty {
|
||||
padding-top: 208rpx !important;
|
||||
}
|
||||
.color-text-green {
|
||||
color: #11bd64;
|
||||
}
|
||||
.color-text-orange {
|
||||
color: #ffa044;
|
||||
}
|
||||
.withdraw-cate {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
.cate-li {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
font-size: 30rpx;
|
||||
|
||||
&.active {
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
}
|
||||
&.active::after {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 4rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.goods_list {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0 24rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 18rpx;
|
||||
.order-item {
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 10rpx;
|
||||
background: #ffffff;
|
||||
position: relative;
|
||||
margin-bottom: 18rpx;
|
||||
|
||||
.order-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
padding-bottom: 24rpx;
|
||||
line-height: 1;
|
||||
font-size: $font-size-goods-tag;
|
||||
|
||||
.icon-dianpu {
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.status-name {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.order-body {
|
||||
margin-bottom: 24rpx;
|
||||
.goods-wrap {
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
&:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.goods-img {
|
||||
width: 170rpx;
|
||||
height: 170rpx;
|
||||
padding: 20rpx 0 0 0;
|
||||
margin-right: 5rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: $border-radius;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-info {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
padding: 20rpx 0 0 0;
|
||||
max-width: calc(100% - 200rpx);
|
||||
margin-left: 18rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.top-wrap {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.goods-name {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
line-height: 1.5;
|
||||
font-size: $font-size-goods-tag;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.goods-sub-section {
|
||||
width: 100%;
|
||||
line-height: 1.5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: $font-size-goods-tag;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.unit {
|
||||
font-size: $font-size-tag;
|
||||
margin-right: 2rpx;
|
||||
}
|
||||
|
||||
view {
|
||||
flex: 1;
|
||||
line-height: 1;
|
||||
&:last-of-type {
|
||||
text-align: right;
|
||||
|
||||
.iconfont {
|
||||
line-height: 1;
|
||||
font-size: $font-size-tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.order-time {
|
||||
margin-top: 12rpx;
|
||||
font-size: $font-size-goods-tag;
|
||||
color: #838383;
|
||||
|
||||
.goods-price {
|
||||
font-size: $font-size-goods-tag;
|
||||
float: right;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.order-footer {
|
||||
padding-top: 24rpx;
|
||||
.order-base-info {
|
||||
display: flex;
|
||||
|
||||
.total {
|
||||
text-align: right;
|
||||
padding-top: 20rpx;
|
||||
flex: 1;
|
||||
font-size: $font-size-goods-tag;
|
||||
|
||||
& > text {
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.order-type {
|
||||
font-size: $font-size-goods-tag;
|
||||
|
||||
& > text {
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.order-base-info.active {
|
||||
.total {
|
||||
padding-top: 0;
|
||||
}
|
||||
.order-type {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.order-item:last-child {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
.price-color{
|
||||
color: var(--price-color);
|
||||
}
|
||||
265
pages_promotion/fenxiao/public/js/goods_list.js
Normal file
265
pages_promotion/fenxiao/public/js/goods_list.js
Normal file
@@ -0,0 +1,265 @@
|
||||
import {
|
||||
Weixin
|
||||
} from '@/common/js/wx-jssdk.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
categoryList: [],
|
||||
goodsList: [],
|
||||
categoryId: 0,
|
||||
is_fenxiao: false,
|
||||
currIndex: 0,
|
||||
poster: '-1', //海报
|
||||
posterMsg: '', //海报错误信息
|
||||
shareUrl: '/pages_promotion/fenxiao/goods_list',
|
||||
shareType: 'goods',
|
||||
//海报模板id
|
||||
templateId: ['default'],
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
setTimeout(() => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启分销',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}, 2000);
|
||||
}
|
||||
}, 1000);
|
||||
if (options.templateId) {
|
||||
this.templateId = options.templateId.split(',');
|
||||
}
|
||||
this.getGoodsCategoryTree();
|
||||
},
|
||||
onShow() {
|
||||
|
||||
if (!this.storeToken) {
|
||||
this.$util.redirectTo(
|
||||
'/pages_tool/login/login', {
|
||||
back: '/pages_promotion/fenxiao/goods_list'
|
||||
},
|
||||
'redirectTo'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + '中心');
|
||||
this.is_fenxiao = Boolean(this.memberInfo.is_fenxiao);
|
||||
},
|
||||
methods: {
|
||||
//获取列表
|
||||
getGoodsList(mescroll) {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/goods/page',
|
||||
data: {
|
||||
page: mescroll.num,
|
||||
page_size: mescroll.size,
|
||||
category_id: this.categoryId
|
||||
},
|
||||
success: res => {
|
||||
let newArr = []
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
})
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.goodsList = []; //如果是第一页需手动制空列表
|
||||
this.goodsList = this.goodsList.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
//联网失败的回调
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
//商品详情
|
||||
navToDetailPage(item) {
|
||||
this.$util.redirectTo('/pages/goods/detail', {
|
||||
goods_id: item.goods_id
|
||||
});
|
||||
},
|
||||
//查询一级商品分类
|
||||
getGoodsCategoryTree() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/goodscategory/tree',
|
||||
data: {
|
||||
level: 1
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.categoryList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
changeCategory(category_id) {
|
||||
this.categoryId = category_id;
|
||||
if (this.$refs.mescroll) {
|
||||
this.$refs.mescroll.refresh();
|
||||
this.$refs.mescroll.myScrollTo(0);
|
||||
}
|
||||
},
|
||||
// 分享商品
|
||||
shareFn(type, keys) {
|
||||
this.shareType = type;
|
||||
if (this.shareType == "fenxiao")
|
||||
this.openPosterPopup();
|
||||
else {
|
||||
this.currIndex = keys;
|
||||
this.$refs.sharePopup.open();
|
||||
}
|
||||
},
|
||||
// #ifdef MP-WEIXIN
|
||||
/**
|
||||
* 将商品推荐到微信圈子
|
||||
*/
|
||||
openBusinessView() {
|
||||
if (wx.openBusinessView) {
|
||||
wx.openBusinessView({
|
||||
businessType: 'friendGoodsRecommend',
|
||||
extraData: {
|
||||
product: {
|
||||
item_code: this.goodsList[this.currIndex].goods_id,
|
||||
title: this.goodsList[this.currIndex].sku_name,
|
||||
image_list: this.$util.img(this.goodsList[this.currIndex].goods_image)
|
||||
}
|
||||
},
|
||||
success: function (res) {
|
||||
console.log('success', res);
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log('fail', res);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// #endif
|
||||
//-------------------------------------海报-------------------------------------
|
||||
// 打开海报弹出层
|
||||
openPosterPopup() {
|
||||
this.getGoodsPoster();
|
||||
this.$refs.sharePopup.close();
|
||||
},
|
||||
// 关闭海报弹出层
|
||||
closePosterPopup() {
|
||||
this.$refs.posterPopup.close();
|
||||
},
|
||||
//生成海报
|
||||
getGoodsPoster() {
|
||||
uni.showLoading({
|
||||
'title': '海报生成中...'
|
||||
});
|
||||
let url = "";
|
||||
let data = {};
|
||||
if (this.shareType == "goods") {
|
||||
url = "/api/goods/poster";
|
||||
data.page = "/pages/goods/detail";
|
||||
data.qrcode_param = JSON.stringify({
|
||||
goods_id: this.goodsList[this.currIndex].goods_id,
|
||||
source_member: this.memberInfo.member_id
|
||||
});
|
||||
} else {
|
||||
url = "/fenxiao/api/fenxiao/poster";
|
||||
data.page = "/pages/index/index";
|
||||
data.qrcode_param = JSON.stringify({});
|
||||
data.template_id = this.templateId[0];
|
||||
}
|
||||
|
||||
this.$api.sendRequest({
|
||||
url: url,
|
||||
data: data,
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.poster = res.data.path + "?time=" + new Date().getTime();
|
||||
this.$refs.posterPopup.open();
|
||||
} else {
|
||||
this.posterMsg = res.message;
|
||||
}
|
||||
uni.hideLoading();
|
||||
},
|
||||
fail: err => {
|
||||
uni.hideLoading();
|
||||
}
|
||||
});
|
||||
},
|
||||
// #ifdef MP || APP-PLUS
|
||||
//小程序中保存海报
|
||||
saveGoodsPoster() {
|
||||
let url = this.$util.img(this.poster);
|
||||
uni.downloadFile({
|
||||
url: url,
|
||||
success: (res) => {
|
||||
if (res.statusCode === 200) {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success: () => {
|
||||
this.$util.showToast({
|
||||
title: "保存成功"
|
||||
});
|
||||
},
|
||||
fail: () => {
|
||||
this.$util.showToast({
|
||||
title: "保存失败,请稍后重试"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// #endif
|
||||
// 打开分享弹出层
|
||||
openSharePopup() {
|
||||
this.$refs.sharePopup.open();
|
||||
},
|
||||
// 关闭分享弹出层
|
||||
closeSharePopup() {
|
||||
this.$refs.sharePopup.close();
|
||||
},
|
||||
copyUrl() {
|
||||
let text = this.$config.h5Domain + '/pages/goods/detail?goods_id=' + this.goodsList[this.currIndex].goods_id + '&source_member=' + this.memberInfo.member_id;
|
||||
this.$util.copy(text, () => {
|
||||
this.closeSharePopup();
|
||||
});
|
||||
},
|
||||
imageError(index) {
|
||||
this.goodsList[index].sku_image = this.$util.getDefaultImage().goods;
|
||||
this.$forceUpdate();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 自定义分享内容
|
||||
* @param {Object} res
|
||||
*/
|
||||
onShareAppMessage(res) {
|
||||
var path = this.shareUrl;
|
||||
|
||||
if (this.shareType == "goods") {
|
||||
path = `/pages/goods/detail?goods_id=${this.goodsList[this.currIndex].goods_id}&sku_id=${this.goodsList[this.currIndex].sku_id}&source_member=${this.memberInfo.member_id}`;
|
||||
}
|
||||
|
||||
return {
|
||||
title: this.goodsList[this.currIndex].sku_name,
|
||||
imageUrl: this.$util.img(this.goodsList[this.currIndex].goods_image, {
|
||||
size: 'big'
|
||||
}),
|
||||
path: path,
|
||||
success: res => {
|
||||
},
|
||||
fail: res => {
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
416
pages_promotion/fenxiao/ranking_list.vue
Normal file
416
pages_promotion/fenxiao/ranking_list.vue
Normal file
@@ -0,0 +1,416 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="container">
|
||||
<mescroll-uni ref="mescroll" @getData="getData" top="0" :size="10">
|
||||
<view slot="list">
|
||||
<block v-if="list.length != 0">
|
||||
<view class="banner" :style="{background: 'url('+ $util.img('public/uniapp/fenxiao/index/header_bg.png') +') no-repeat top left / 100% 100%'}">
|
||||
<view class="info">
|
||||
<view class="info-pic">
|
||||
<image :src="info.headimg ? $util.img(info.headimg) : $util.getDefaultImage().head" @error="info.headimg = $util.getDefaultImage().head" mode="aspectFill"/>
|
||||
</view>
|
||||
<view class="member-info">
|
||||
<view class="rank-info-box">
|
||||
<text class="name">{{info.nickname}}</text>
|
||||
</view>
|
||||
<view class="withdrawal" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply')" v-if="type == 'profit'">点击提现</view>
|
||||
<view class="withdrawal" @click="$util.redirectTo('/pages_promotion/fenxiao/team')" v-if="type == 'invited_num'">我的团队</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="fenxiao-team" v-if="type == 'profit'">
|
||||
<view class="fenxiao-index-other">
|
||||
<view class="all-money-item">
|
||||
<view class="img-wrap">
|
||||
<text class="iconfont icon-fenxiao"></text>
|
||||
</view>
|
||||
<view class="all-money-tit-wrap">
|
||||
<text class="all-money-tit">分销佣金</text>
|
||||
<text class="all-money-num">{{ info.today_commission}}元</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fenxiao-index-other">
|
||||
<view class="all-money-item">
|
||||
<view class="img-wrap">
|
||||
<text class="iconfont icon-baixingbeng"></text>
|
||||
</view>
|
||||
<view class="all-money-tit-wrap">
|
||||
<text class="all-money-tit">佣金排行</text>
|
||||
<text class="all-money-num">您排行第{{ ranking }}名</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fenxiao-team" v-if="type == 'invited_num'">
|
||||
<view class="fenxiao-index-other">
|
||||
<view class="all-money-item">
|
||||
<view class="img-wrap">
|
||||
<text class="iconfont icon-huodongtuiyan"></text>
|
||||
</view>
|
||||
<view class="all-money-tit-wrap">
|
||||
<text class="all-money-tit">推广人数</text>
|
||||
<text class="all-money-num">{{ info.one_child_num}}人</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fenxiao-index-other">
|
||||
<view class="all-money-item">
|
||||
<view class="img-wrap">
|
||||
<text class="iconfont icon-baixingbeng"></text>
|
||||
</view>
|
||||
<view class="all-money-tit-wrap">
|
||||
<text class="all-money-tit" v-if="type == 'invited_num'">推广排行</text>
|
||||
<text class="all-money-num">您排行第{{ ranking }}名</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="title-rakn-text" v-if="type == 'profit'">佣金排行</view>
|
||||
<view class="title-rakn-text" v-if="type == 'invited_num'">推广排行</view>
|
||||
|
||||
<view class="ranking-list">
|
||||
<view class="ranking-item" v-for="(item, index) in list" :key="index">
|
||||
<view class="ranking price-font">{{ index + 1 }}</view>
|
||||
<view class="content">
|
||||
<view class="head-img">
|
||||
<image :src="item.headimg ? $util.img(item.headimg) : $util.getDefaultImage().head" @error="item.headimg = $util.getDefaultImage().head" mode="aspectFill"/>
|
||||
</view>
|
||||
<view class="nickname">{{ item.nickname }}</view>
|
||||
</view>
|
||||
<view class="price-font price-style" v-if="type == 'profit'">
|
||||
¥{{ item.total_commission|moneyFormat }}</view>
|
||||
<view class="price-font price-style" v-if="type == 'invited_num'">{{ item.child_num }}人
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-if="list.length == 0 && emptyShow">
|
||||
<ns-empty text="暂无数据" :isIndex="false"></ns-empty>
|
||||
</block>
|
||||
</view>
|
||||
</mescroll-uni>
|
||||
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
emptyShow: false,
|
||||
type: '',
|
||||
ranking: 0,
|
||||
info: {}
|
||||
}
|
||||
},
|
||||
onLoad(data) {
|
||||
this.type = data.type;
|
||||
this.getRanking();
|
||||
this.getFenxiaoDetail();
|
||||
},
|
||||
methods: {
|
||||
getData(mescroll) {
|
||||
this.emptyShow = false;
|
||||
if (mescroll.num == 1) {
|
||||
this.list = [];
|
||||
}
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/rankinglist',
|
||||
data: {
|
||||
page_size: mescroll.size,
|
||||
page: mescroll.num,
|
||||
type: this.type
|
||||
},
|
||||
success: res => {
|
||||
this.emptyShow = true;
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
|
||||
this.list = this.list.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
getRanking() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/ranking',
|
||||
data: {
|
||||
type: this.type
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.ranking = res.data;
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getFenxiaoDetail() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/detail',
|
||||
success: res => {
|
||||
if (res.data) {
|
||||
this.info = res.data;
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.container {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.banner {
|
||||
width: 100%;
|
||||
height: 200rpx;
|
||||
// background: $base-color;
|
||||
}
|
||||
|
||||
.info {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 50rpx 80rpx 0;
|
||||
box-sizing: border-box;
|
||||
|
||||
.info-pic {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
border: 4rpx solid #fff;
|
||||
position: relative;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.member-info {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
margin-left: 32rpx;
|
||||
display: flex;
|
||||
|
||||
view {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.rank-info-box {
|
||||
line-height: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.withdrawal {
|
||||
border-radius: 4px;
|
||||
line-height: 23px;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.fenxiao-team {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
margin-top: 22rpx;
|
||||
|
||||
.fenxiao-index-other {
|
||||
margin: 0 24rpx 20rpx 24rpx;
|
||||
border-radius: 16rpx;
|
||||
background-color: #ffffff;
|
||||
padding: 30rpx 0;
|
||||
flex: 1;
|
||||
|
||||
&:last-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.all-money-item {
|
||||
margin: 0 30rpx;
|
||||
display: flex;
|
||||
font-size: $font-size-tag;
|
||||
align-items: center;
|
||||
|
||||
.img-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.all-money-tit-wrap {
|
||||
flex: 1;
|
||||
margin-left: 24rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 70rpx;
|
||||
|
||||
.all-money-tit {
|
||||
line-height: 1;
|
||||
color: $color-title;
|
||||
font-size: $font-size-base;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.all-money-num {
|
||||
color: $color-tip;
|
||||
font-size: 24rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.icon-wenxiao {
|
||||
text-align: center;
|
||||
font-size: 50rpx;
|
||||
color: var(--base-color) !important;
|
||||
}
|
||||
|
||||
.number {
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.info-text {
|
||||
font-size: 20rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.info-title {
|
||||
font-size: 50rpx;
|
||||
font-weight: 900;
|
||||
color: #f5f5f5;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.info-rank {
|
||||
color: #f5f5f5;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.title-rakn-text {
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.ranking-list {
|
||||
transform: translateY(-120rpx);
|
||||
margin: 200rpx 24rpx;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
margin-top: 140rpx;
|
||||
|
||||
.ranking-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 2rpx solid #f5f5f5;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.ranking {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
&:nth-child(1) .ranking {
|
||||
background: rgb(249, 186, 1);
|
||||
border-radius: 50%;
|
||||
border: 10rpx solid rgb(254, 220, 92);
|
||||
}
|
||||
|
||||
&:nth-child(2) .ranking {
|
||||
background: rgb(172, 185, 194);
|
||||
border-radius: 50%;
|
||||
border: 10rpx solid rgb(215, 223, 229);
|
||||
}
|
||||
|
||||
&:nth-child(3) .ranking {
|
||||
background: rgb(211, 163, 136);
|
||||
border-radius: 50%;
|
||||
border: 10rpx solid rgb(235, 201, 190);
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
padding: 0 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.head-img {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.nickname {
|
||||
color: #333;
|
||||
margin: 0 20rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
152
pages_promotion/fenxiao/relation.vue
Normal file
152
pages_promotion/fenxiao/relation.vue
Normal file
@@ -0,0 +1,152 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<mescroll-uni ref="mescroll" @getData="getData" top="20" class="member-point" :size="8" v-if="storeToken">
|
||||
<view class="goods_list" slot="list">
|
||||
<view class="order-list">
|
||||
<view class="order-item" v-for="(orderItem, orderIndex) in orderList" :key="orderIndex" @click="toDetail(orderItem.fenxiao_order_id)">
|
||||
<view class="order-header">
|
||||
<text class="site-name font-size-base">{{ orderItem.order_no }}</text>
|
||||
<text class="status-name color-base-text" v-if="orderItem.is_refund == 1">已退款</text>
|
||||
<text class="status-name color-text-green" v-else-if="orderItem.is_settlement == 1">已结算</text>
|
||||
<text class="status-name color-text-orange" v-else>待结算</text>
|
||||
</view>
|
||||
|
||||
<view class="order-body">
|
||||
<view class="goods-wrap">
|
||||
<view class="goods-img">
|
||||
<image :src="$util.img(orderItem.sku_image, { size: 'mid' })" @error="imageError(orderIndex)" mode="aspectFill" :lazy-load="true"></image>
|
||||
</view>
|
||||
<view class="goods-info">
|
||||
<view class="top-wrap">
|
||||
<view class="goods-name font-size-base">{{ orderItem.sku_name }}</view>
|
||||
<view>
|
||||
<text class="color-tip">返{{ fenxiaoWords.account }}</text>
|
||||
<text class="price-color font-size-goods-tag">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text class="price-color font-size-toolbar">{{ orderItem.commission }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-sub-section">
|
||||
<view class="goods-price">
|
||||
<text class="unit price-color">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text class="price-color font-size-toolbar">{{ orderItem.price }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>
|
||||
<text class="iconfont icon-close"></text>
|
||||
{{ orderItem.num }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-footer">
|
||||
<view class="order-base-info active">
|
||||
<view class="order-type ">
|
||||
<text class="color-tip">{{ $util.timeStampTurnTime(orderItem.create_time) }}</text>
|
||||
<!-- <text>返{{ fenxiaoWords.account }}金额:</text>
|
||||
<text class="color-base-text">{{ $lang('common.currencySymbol') }}{{ orderItem.commission }}</text> -->
|
||||
</view>
|
||||
<view class="total">
|
||||
<text>合计:</text>
|
||||
<text class="price-color">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text class="font-size-toolbar price-color">{{ orderItem.real_goods_money }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cart-empty"><ns-empty text="暂无订单" :isIndex="false" v-if="orderList.length == 0 && emptyShow"></ns-empty></view>
|
||||
</view>
|
||||
</mescroll-uni>
|
||||
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
orderList: [],
|
||||
emptyShow: false,
|
||||
fenxiaoId: '',
|
||||
subMemberId: ''
|
||||
};
|
||||
},
|
||||
mixins: [fenxiaoWords],
|
||||
onLoad(option) {
|
||||
if (option.fenxiao_id) {
|
||||
this.fenxiaoId = option.fenxiao_id;
|
||||
}
|
||||
if (option.sub_member_id) {
|
||||
this.subMemberId = option.sub_member_id;
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
if(this.fenxiaoWords && this.fenxiaoWords.concept)this.$langConfig.title(this.fenxiaoWords.concept + '订单');
|
||||
},
|
||||
methods: {
|
||||
//获得列表数据
|
||||
getData(mescroll) {
|
||||
this.emptyShow = false;
|
||||
if (mescroll.num == 1) {
|
||||
this.orderList = [];
|
||||
}
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/getorder',
|
||||
data: {
|
||||
page: mescroll.num,
|
||||
page_size: mescroll.size,
|
||||
fenxiao_id: this.fenxiaoId ? this.fenxiaoId : '',
|
||||
sub_member_id: this.subMemberId ? this.subMemberId : ''
|
||||
},
|
||||
success: res => {
|
||||
this.emptyShow = true;
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data && res.data.list) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({ title: res.message });
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.orderList = []; //如果是第一页需手动制空列表
|
||||
this.orderList = this.orderList.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
imageError(index) {
|
||||
this.orderList[index].sku_image = this.$util.getDefaultImage().goods;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
toDetail(e) {
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/order_detail', {
|
||||
id: e
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './public/css/order.scss';
|
||||
.goods-wraps {
|
||||
align-items: center;
|
||||
}
|
||||
.goods_list .order-item .order-body .goods-wraps .goods-img,
|
||||
.goods_list .order-item .order-body .goods-wraps .goods-info,
|
||||
.goods_list .order-item .order-footers {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
355
pages_promotion/fenxiao/team.vue
Normal file
355
pages_promotion/fenxiao/team.vue
Normal file
@@ -0,0 +1,355 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<view class="team-cate" v-if="storeToken && levelNum > 1">
|
||||
<block v-for="(item, index) in levelList" :key="index">
|
||||
<view class="cate-li" :class="{ 'active color-base-text color-base-border': currentLevel == item.level }" @click="selectLevel(item.level)">{{ item.name }}</view>
|
||||
</block>
|
||||
</view>
|
||||
<mescroll-uni ref="mescroll" @getData="getData" :top="levelNum > 1 ? 90 : 0" class="member-point" :size="8" v-if="storeToken">
|
||||
<block slot="list">
|
||||
<view class="team-li" v-for="(item, index) in teamList" :key="index" v-if="teamList.length != 0" @click="toFenxiaoOrder(item)">
|
||||
<view class="li-box" :class="{ active: index + 1 == teamList.length }">
|
||||
<image v-if="item.headimg" :src="$util.img(item.headimg)" @error="imageError(index)" mode="aspectFill"></image>
|
||||
<image v-else :src="$util.getDefaultImage().head"></image>
|
||||
<view class="member-info">
|
||||
<view class="member-name">
|
||||
<block v-if="item.is_fenxiao">
|
||||
<view class="left">
|
||||
<view class="flex-box">
|
||||
<view class="name">{{ item.nickname }}</view>
|
||||
<view class="title color-base-border color-base-text">{{ fenxiaoWords.fenxiao_name }}</view>
|
||||
</view>
|
||||
<view class="color-tip font-size-goods-tag">加入时间:{{ $util.timeStampTurnTime(item.bind_fenxiao_time).substring(0, 10) }}</view>
|
||||
</view>
|
||||
<view class="consume-info">
|
||||
<view>
|
||||
<text>{{ item.one_child_num }}</text>
|
||||
人
|
||||
</view>
|
||||
<view>
|
||||
<text>{{ item.order_num }}</text>
|
||||
单
|
||||
</view>
|
||||
<view>
|
||||
<text>{{ item.order_money | moneyFormat }}</text>
|
||||
元
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="left">
|
||||
<view class="flex-box">
|
||||
<view class="name font-size-tag">
|
||||
<text>{{ item.nickname }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="color-tip font-size-goods-tag">加入时间:{{ $util.timeStampTurnTime(item.bind_fenxiao_time).substring(0, 10) }}</view>
|
||||
</view>
|
||||
<view class="consume-info">
|
||||
<view>
|
||||
<text>0</text>
|
||||
人
|
||||
</view>
|
||||
<view>
|
||||
<text>{{ item.order_num }}</text>
|
||||
单
|
||||
</view>
|
||||
<view>
|
||||
<text>{{ item.order_money | moneyFormat }}</text>
|
||||
元
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="teamList.length == 0 && emptyShow"><ns-empty text="暂无数据" :isIndex="false"></ns-empty></block>
|
||||
</block>
|
||||
</mescroll-uni>
|
||||
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
levelList: [
|
||||
{
|
||||
name: '一级',
|
||||
level: 1
|
||||
},
|
||||
{
|
||||
name: '二级',
|
||||
level: 2
|
||||
}
|
||||
],
|
||||
currentLevel: 1,
|
||||
teamList: [],
|
||||
emptyShow: false,
|
||||
levelNum: 0,
|
||||
};
|
||||
},
|
||||
mixins: [fenxiaoWords],
|
||||
onShow() {
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启分销',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}, 2000);
|
||||
}
|
||||
},1000);
|
||||
|
||||
if (this.fenxiaoWords && this.fenxiaoWords.my_team) this.$langConfig.title(this.fenxiaoWords.my_team);
|
||||
this.getFenXiaoLevel();
|
||||
|
||||
if (!this.storeToken) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_promotion/fenxiao/team');
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getData(mescroll) {
|
||||
this.emptyShow = false;
|
||||
if (mescroll.num == 1) {
|
||||
this.teamList = [];
|
||||
}
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/team',
|
||||
data: {
|
||||
page_size: mescroll.size,
|
||||
page: mescroll.num,
|
||||
level: this.currentLevel
|
||||
},
|
||||
success: res => {
|
||||
this.emptyShow = true;
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.teamList = []; //如果是第一页需手动制空列表
|
||||
this.teamList = this.teamList.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
imageError(e) {
|
||||
this.teamList[e].headimg = this.$util.getDefaultImage().head;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
selectLevel(e) {
|
||||
this.currentLevel = e;
|
||||
this.$refs.mescroll.refresh();
|
||||
},
|
||||
toFenxiaoOrder(item) {
|
||||
if (item.fenxiao_id) {
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/relation', { fenxiao_id: item.fenxiao_id });
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/relation', { sub_member_id: item.member_id });
|
||||
}
|
||||
},
|
||||
async getFenXiaoLevel() {
|
||||
let res = await this.$api.sendRequest({
|
||||
url: '/fenxiao/api/config/basics',
|
||||
async: false,
|
||||
success: res => {}
|
||||
});
|
||||
if (res.code == 0 && res.data) {
|
||||
this.levelNum = res.data.level;
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
storeToken: function(nVal, oVal) {
|
||||
if (nVal) {
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.team-cate {
|
||||
padding: 0 30rpx;
|
||||
width: calc(100%);
|
||||
height: 90rpx;
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
background: #ffffff;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: var(--window-top);
|
||||
|
||||
.cate-li {
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
display: inline-block;
|
||||
line-height: 90rpx;
|
||||
height: 100%;
|
||||
font-size: 30rpx;
|
||||
|
||||
&.active {
|
||||
box-sizing: border-box;
|
||||
border-bottom: 4rpx solid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.team-member {
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
color: $color-tip;
|
||||
padding: 0 $padding;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.team-li {
|
||||
margin: $margin-updown $margin-both;
|
||||
padding: $margin-both;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
|
||||
.li-box {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.member-info {
|
||||
flex: 1;
|
||||
padding-left: $padding;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
.member-name {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: $font-size-base;
|
||||
|
||||
.left {
|
||||
width: 0;
|
||||
flex: 1;
|
||||
|
||||
.flex-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding: 4rpx 16rpx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
font-size: $font-size-activity-tag;
|
||||
border-radius: 4rpx;
|
||||
margin-left: 10rpx;
|
||||
line-height: 1;
|
||||
border: 2rpx solid;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.consume-info {
|
||||
text-align: right;
|
||||
|
||||
text {
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
|
||||
view {
|
||||
line-height: 1.5;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.member-date {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: $padding;
|
||||
|
||||
view {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
text-align: left;
|
||||
line-height: 1;
|
||||
|
||||
text {
|
||||
font-size: $font-size-tag;
|
||||
color: $color-tip;
|
||||
}
|
||||
|
||||
.tit {
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-see {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
}
|
||||
.order-box-btn {
|
||||
display: inline-block;
|
||||
line-height: 56rpx;
|
||||
padding: 0 30rpx;
|
||||
font-size: 26rpx;
|
||||
color: #303133;
|
||||
border: 2rpx solid #999;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-webkit-border-radius: $border-radius;
|
||||
border-radius: $border-radius;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.li-box.active {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
515
pages_promotion/fenxiao/withdraw_apply.vue
Normal file
515
pages_promotion/fenxiao/withdraw_apply.vue
Normal file
@@ -0,0 +1,515 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view class="container">
|
||||
<view class="bank-account-wrap" @click="goAccount()">
|
||||
<view class="tx-wrap" v-if="bankAccountInfo.withdraw_type && !isBalance">
|
||||
<text class="tx-to">提现到</text>
|
||||
<view class="tx-bank" v-if="bankAccountInfo.withdraw_type == 'wechatpay'">微信默认钱包</view>
|
||||
<view class="tx-bank" v-else>{{ bankAccountInfo.bank_account }} </view>
|
||||
<view class="tx-img" v-if="bankAccountInfo.withdraw_type == 'alipay'">
|
||||
<image :src="$util.img('public/uniapp/member/apply_withdrawal/alipay.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="tx-img" v-else-if="bankAccountInfo.withdraw_type == 'bank'">
|
||||
<image :src="$util.img('public/uniapp/member/apply_withdrawal/bank.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="tx-img" v-else-if="bankAccountInfo.withdraw_type == 'wechatpay'">
|
||||
<image :src="$util.img('public/uniapp/member/apply_withdrawal/wechatpay.png')" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
<text class="tx-to" v-else-if="!isBalance">请添加提现账户</text>
|
||||
<view class="tx-wrap" v-else="isBalance">
|
||||
<text class="tx-to">提现到</text>
|
||||
<view class="tx-bank">余额</view>
|
||||
<view class="tx-img">
|
||||
<image :src="$util.img('public/uniapp/member/apply_withdrawal/tixian.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="iconfont icon-right"></view>
|
||||
</view>
|
||||
<view class="empty-box"></view>
|
||||
<view class="withdraw-wrap">
|
||||
<view class="withdraw-wrap-title">提现金额:</view>
|
||||
<view class="money-wrap">
|
||||
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
|
||||
<input type="digit" class="withdraw-money" v-model="withdrawMoney" />
|
||||
<view class="delete" @click="remove" v-if="withdrawMoney">
|
||||
<image :src="$util.img('public/uniapp/member/apply_withdrawal/close.png')" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view>
|
||||
<text class="color-tip">可提现金额:{{ $lang('common.currencySymbol') }}{{ withdrawInfo.account | moneyFormat }}</text>
|
||||
<text class="all-tx color-base-text" @click="allTx">全部提现</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<text v-if="withdrawConfigInfo.withdraw > 0">最小提现金额为{{ $lang('common.currencySymbol') }}{{ withdrawConfigInfo.withdraw | moneyFormat }},</text>
|
||||
<text v-if="withdrawConfigInfo.max > 0">最大提现金额为{{ $lang('common.currencySymbol') }}{{ (withdrawConfigInfo.max > withdrawInfo.account ? withdrawInfo.account : withdrawConfigInfo.max) | moneyFormat }},</text>
|
||||
<text>手续费为{{ withdrawConfigInfo.withdraw_rate + '%' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="btn color-base-border ns-gradient-otherpages-member-widthdrawal-withdrawal" :class="{ disabled: withdrawMoney == '' || withdrawMoney == 0 }" @click="withdraw">
|
||||
提现
|
||||
</view> -->
|
||||
|
||||
|
||||
<view class="grace-page-footer page-btm" style="z-index: 999999; background: rgb(255, 255, 255); padding-bottom: 0px;" @click="withdraw">
|
||||
<view data-v-800ec5da="" class="collectionBorder">
|
||||
<button data-v-800ec5da="" class="renren-btn do false middle">提现</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="recoend" @click="toWithdrawal">
|
||||
<view class="recoend-con">提现记录</view>
|
||||
</view> -->
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
withdrawInfo: {},
|
||||
withdrawConfigInfo: {},
|
||||
bankAccountInfo: {},
|
||||
withdrawMoney: '',
|
||||
isSub: false,
|
||||
isBalance: 0,
|
||||
payList: null
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
if (option.is_balance) this.isBalance = option.is_balance;
|
||||
},
|
||||
onShow() {
|
||||
if (this.storeToken) {
|
||||
this.getTransferType();
|
||||
this.getWithdrawConfigInfo();
|
||||
this.getBankAccountInfo();
|
||||
this.getWithdrawInfo();
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_tool/login/login', {
|
||||
back: '/pages_promotion/fenxiao/withdraw_apply'
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toWithdrawal() {
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/withdraw_list');
|
||||
},
|
||||
//全部提现
|
||||
allTx() {
|
||||
this.withdrawMoney = this.withdrawInfo.account;
|
||||
},
|
||||
// 删除提现金额
|
||||
remove() {
|
||||
this.withdrawMoney = '';
|
||||
},
|
||||
/**
|
||||
* 获取提现信息
|
||||
*/
|
||||
getWithdrawInfo() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/fenxiao/detail',
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.withdrawInfo = res.data;
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取提现配置信息
|
||||
*/
|
||||
getWithdrawConfigInfo() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/config/withdraw',
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.withdrawConfigInfo = res.data;
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 银行账号信息
|
||||
*/
|
||||
getBankAccountInfo() {
|
||||
this.$api.sendRequest({
|
||||
url: '/api/memberbankaccount/defaultinfo',
|
||||
success: res => {
|
||||
|
||||
if (res.code >= 0) {
|
||||
if (res.data)
|
||||
this.bankAccountInfo = res.data;
|
||||
else if (this.payList && this.payList.balance) {
|
||||
// 如果信息为空,将默认为余额
|
||||
this.isBalance = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取提现方式
|
||||
getTransferType() {
|
||||
this.payList = null;
|
||||
this.$api.sendRequest({
|
||||
url: "/fenxiao/api/withdraw/transferType",
|
||||
success: res => {
|
||||
if (res.code >= 0 && res.data) {
|
||||
this.payList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
verify() {
|
||||
if (this.withdrawMoney == '' || this.withdrawMoney < 0 || isNaN(parseFloat(this.withdrawMoney))) {
|
||||
this.$util.showToast({
|
||||
title: '请输入提现金额'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
let money = this.withdrawInfo.account;
|
||||
if (this.withdrawConfigInfo.max > 0 && this.withdrawInfo.account > this.withdrawConfigInfo.max) {
|
||||
money = this.withdrawConfigInfo.max;
|
||||
}
|
||||
if (parseFloat(this.withdrawMoney) > 0 && (parseFloat(this.withdrawMoney) > parseFloat(money))) {
|
||||
this.$util.showToast({
|
||||
title: '提现金额超出可提现金额'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (parseFloat(this.withdrawMoney) > 0 && (parseFloat(this.withdrawMoney) < parseFloat(this
|
||||
.withdrawConfigInfo.withdraw))) {
|
||||
this.$util.showToast({
|
||||
title: '提现金额小于最低提现金额'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
withdraw() {
|
||||
if (!this.bankAccountInfo.withdraw_type && !this.isBalance) {
|
||||
this.$util.showToast({
|
||||
title: '请先添加提现方式'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.verify()) {
|
||||
if (this.isSub) return;
|
||||
this.isSub = true;
|
||||
|
||||
var applet_type = 0;
|
||||
if (this.bankAccountInfo.withdraw_type == 'wechatpay') {
|
||||
// #ifdef MP
|
||||
applet_type = 1;
|
||||
// #endif
|
||||
}
|
||||
|
||||
let withdrawType = this.isBalance ? 'balance' : this.bankAccountInfo.withdraw_type;
|
||||
let branchBankName = this.isBalance ? "余额" : this.bankAccountInfo.branch_bank_name;
|
||||
// #ifdef MP-WEIXIN
|
||||
// this.subscribeMessage(() => {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/withdraw/apply',
|
||||
data: {
|
||||
apply_money: this.withdrawMoney,
|
||||
transfer_type: withdrawType, //转账提现类型
|
||||
realname: this.bankAccountInfo.realname,
|
||||
mobile: this.bankAccountInfo.mobile,
|
||||
bank_name: branchBankName,
|
||||
account_number: this.bankAccountInfo.bank_account,
|
||||
applet_type: applet_type
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.$util.showToast({
|
||||
title: '提现申请成功'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/withdraw_list', {},
|
||||
'redirectTo');
|
||||
}, 1500);
|
||||
} else {
|
||||
this.isSub = false;
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
this.isSub = false;
|
||||
}
|
||||
});
|
||||
// });
|
||||
// #endif
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/withdraw/apply',
|
||||
data: {
|
||||
apply_money: this.withdrawMoney,
|
||||
transfer_type: withdrawType, //转账提现类型
|
||||
realname: this.bankAccountInfo.realname,
|
||||
mobile: this.bankAccountInfo.mobile,
|
||||
bank_name: branchBankName,
|
||||
account_number: this.bankAccountInfo.bank_account,
|
||||
applet_type: applet_type
|
||||
},
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.$util.showToast({
|
||||
title: '提现申请成功'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/withdraw_list', {},
|
||||
'redirectTo');
|
||||
}, 1500);
|
||||
} else {
|
||||
this.isSub = false;
|
||||
this.$util.showToast({
|
||||
title: res.message
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
this.isSub = false;
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
goAccount() {
|
||||
this.$util.redirectTo(
|
||||
'/pages_tool/member/account', {
|
||||
back: '/pages_promotion/fenxiao/withdraw_apply',
|
||||
type: 'fenxiao'
|
||||
},
|
||||
'redirectTo'
|
||||
);
|
||||
},
|
||||
/**
|
||||
* 微信订阅消息
|
||||
*/
|
||||
subscribeMessage(callback) {
|
||||
this.$api.sendRequest({
|
||||
url: '/weapp/api/weapp/messagetmplids',
|
||||
data: {
|
||||
keywords: 'USER_WITHDRAWAL_SUCCESS'
|
||||
},
|
||||
success: res => {
|
||||
if (res.code == 0 && res.data.length) {
|
||||
uni.requestSubscribeMessage({
|
||||
tmplIds: res.data,
|
||||
fail: res => {
|
||||
console.log('fail', res);
|
||||
},
|
||||
complete: () => {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.grace-page-footer{
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 99 !important;
|
||||
}
|
||||
.collectionBorder{
|
||||
border-top: 2rpx solid #e6e7eb;
|
||||
padding: 14rpx 24rpx;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
}
|
||||
.renren-btn {
|
||||
height: 68px;
|
||||
line-height: 68px;
|
||||
line-height: 62px;
|
||||
border-radius: 34px !important;
|
||||
border-radius: 128px;
|
||||
background: #ff3c29;
|
||||
color: #fff;
|
||||
font-size: 32px;
|
||||
font-weight: 400;
|
||||
width: 100%;
|
||||
border: 0;
|
||||
}
|
||||
.renren-btn.do {
|
||||
background: -webkit-linear-gradient(317.43deg, #ff3c29, #ff6f29 94.38%);
|
||||
background: linear-gradient(132.57deg, #ff3c29, #ff6f29 94.38%);
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.renren-btn.middle {
|
||||
height: 76rpx;
|
||||
line-height: 76rpx;
|
||||
border-radius: 38rpx !important;
|
||||
font-size: 28rpx !important;
|
||||
font-weight: 500 !important;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
.container {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.empty-box {
|
||||
height: 20rpx;
|
||||
}
|
||||
|
||||
.bank-account-wrap {
|
||||
margin: 0 20rpx;
|
||||
padding: 20rpx 30rpx;
|
||||
border-bottom: 2rpx solid #f7f7f7;
|
||||
position: relative;
|
||||
|
||||
.tx-wrap {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-right: 60rpx;
|
||||
|
||||
.tx-bank {
|
||||
margin-right: 60rpx;
|
||||
flex: 1;
|
||||
margin-left: 10rpx;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tx-img {
|
||||
position: absolute;
|
||||
right: 100rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.withdraw-wrap {
|
||||
margin: 0 20rpx;
|
||||
padding: 30rpx;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: rgba(110, 110, 110, 0.09) 0 0 20rpx 0;
|
||||
|
||||
.money-wrap {
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 2rpx solid #eee;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
|
||||
.unit {
|
||||
font-size: 60rpx;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.withdraw-money {
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
min-height: 70rpx;
|
||||
padding-left: 20rpx;
|
||||
font-size: 60rpx;
|
||||
flex: 1;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.delete {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
padding-top: 20rpx;
|
||||
|
||||
text {
|
||||
line-height: 1;
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.all-tx {
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 0 30rpx;
|
||||
margin-top: 60rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
border-radius: $border-radius;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
background-color: var(--main-color);
|
||||
|
||||
&.disabled {
|
||||
background: #ccc;
|
||||
border-color: #ccc;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.recoend {
|
||||
margin-top: 40rpx;
|
||||
|
||||
.recoend-con {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.desc {
|
||||
font-size: $font-size-tag;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
209
pages_promotion/fenxiao/withdraw_list.vue
Normal file
209
pages_promotion/fenxiao/withdraw_list.vue
Normal file
@@ -0,0 +1,209 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<mescroll-uni @getData="getData" class="member-point">
|
||||
<view slot="list">
|
||||
<block v-if="withdrawList.length">
|
||||
<view class="detailed-wrap">
|
||||
<view class="cont">
|
||||
<view class="detailed-item" v-for="(item, index) in withdrawList" :key="index" @click="toDetail(item.id)">
|
||||
<view class="info">
|
||||
<view class="event">{{ item.transfer_type=='balance'&&'余额' || item.transfer_type=='alipay'&&'支付宝' || item.transfer_type=='bank'&&'银行卡' || item.transfer_type=='wechatpay'&&'微信' }}</view>
|
||||
<view>
|
||||
<text class="time">{{ $util.timeStampTurnTime(item.create_time) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-wrap">
|
||||
<view class="num color-base-text">¥{{ item.money }}</view>
|
||||
<view class="status-name" :style="withdrawState[item.status].color">{{ item.status_name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<ns-empty :isIndex="false" text="暂无提现记录"></ns-empty>
|
||||
</block>
|
||||
</view>
|
||||
</mescroll-uni>
|
||||
<ns-login ref="login"></ns-login>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import fenxiaoWords from 'common/js/fenxiao-words.js';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
withdrawState: {
|
||||
'3': {
|
||||
color: 'color: rgb(255, 69, 68)',
|
||||
text: '已转账'
|
||||
},
|
||||
'1': {
|
||||
color: 'color: rgb(255, 160, 68)',
|
||||
text: '待审核'
|
||||
},
|
||||
'2': {
|
||||
color: 'color: rgb(17, 189, 100)',
|
||||
text: '已审核'
|
||||
},
|
||||
'-1': {
|
||||
color: 'color: rgb(255, 69, 68)',
|
||||
text: '已拒绝'
|
||||
}
|
||||
},
|
||||
withdrawList: [],
|
||||
emptyShow: false,
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: '商家未开启分销',
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages/index/index');
|
||||
}, 2000);
|
||||
}
|
||||
},1000);
|
||||
|
||||
if(this.fenxiaoWords && this.fenxiaoWords.withdraw)this.$langConfig.title(this.fenxiaoWords.withdraw + '明细');
|
||||
|
||||
if (!this.storeToken) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.login.open('/pages_promotion/fenxiao/withdraw_list');
|
||||
});
|
||||
}
|
||||
},
|
||||
mixins: [fenxiaoWords],
|
||||
methods: {
|
||||
//获得列表数据
|
||||
getData(mescroll) {
|
||||
this.emptyShow = false;
|
||||
if (mescroll.num == 1) {
|
||||
this.withdrawList = [];
|
||||
}
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/withdraw/page',
|
||||
data: {
|
||||
page_size: mescroll.size,
|
||||
page: mescroll.num,
|
||||
},
|
||||
success: res => {
|
||||
this.emptyShow = true;
|
||||
let newArr = [];
|
||||
let msg = res.message;
|
||||
if (res.code == 0 && res.data && res.data.list) {
|
||||
newArr = res.data.list;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: msg
|
||||
});
|
||||
}
|
||||
mescroll.endSuccess(newArr.length);
|
||||
//设置列表数据
|
||||
if (mescroll.num == 1) this.withdrawList = []; //如果是第一页需手动制空列表
|
||||
this.withdrawList = this.withdrawList.concat(newArr); //追加新数据
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
mescroll.endErr();
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
toDetail(id) {
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/withdrawal_detail', {
|
||||
id: id
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.account-box {
|
||||
width: 100vw;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: 10rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.tit {
|
||||
color: #fff;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.iconmn_jifen_fill {
|
||||
font-size: 60rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.point {
|
||||
color: #fff;
|
||||
font-size: 60rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.detailed-wrap {
|
||||
.head {
|
||||
display: flex;
|
||||
height: 90rpx;
|
||||
|
||||
& > view {
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
padding: 0 $padding;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.cont {
|
||||
background: #fff;
|
||||
|
||||
.detailed-item {
|
||||
padding: $padding 10rpx;
|
||||
margin: 0 $margin-both;
|
||||
border-bottom: 2rpx solid #eee;
|
||||
position: relative;
|
||||
|
||||
&:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.info {
|
||||
padding-right: 180rpx;
|
||||
|
||||
.event {
|
||||
font-size: $font-size-base;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: $font-size-base;
|
||||
color: $color-tip;
|
||||
}
|
||||
}
|
||||
|
||||
.right-wrap {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
text-align: right;
|
||||
|
||||
.num {
|
||||
font-size: $font-size-toolbar;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
127
pages_promotion/fenxiao/withdrawal_detail.vue
Normal file
127
pages_promotion/fenxiao/withdrawal_detail.vue
Normal file
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<page-meta :page-style="themeColor"></page-meta>
|
||||
<view>
|
||||
<view class="money-wrap">
|
||||
<text>-{{ detail.money }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 状态0待审核1.待转账2已转账 -1拒绝' -->
|
||||
<view class="item">
|
||||
<view class="line-wrap">
|
||||
<text class="label">当前状态</text>
|
||||
<text class="value">{{ detail.status_name }}</text>
|
||||
</view>
|
||||
<view class="line-wrap">
|
||||
<text class="label">交易号</text>
|
||||
<text class="value">{{ detail.withdraw_no }}</text>
|
||||
</view>
|
||||
<view class="line-wrap">
|
||||
<text class="label">手续费</text>
|
||||
<text class="value">¥{{ detail.withdraw_rate_money }}</text>
|
||||
</view>
|
||||
<view class="line-wrap">
|
||||
<text class="label">申请时间</text>
|
||||
<text class="value">{{ $util.timeStampTurnTime(detail.create_time) }}</text>
|
||||
</view>
|
||||
<view class="line-wrap" v-if="detail.status">
|
||||
<text class="label">审核时间</text>
|
||||
<text class="value">{{ $util.timeStampTurnTime(detail.audit_time) }}</text>
|
||||
</view>
|
||||
<view class="line-wrap" v-if="detail.bank_name">
|
||||
<text class="label">银行名称</text>
|
||||
<text class="value">{{ detail.bank_name }}</text>
|
||||
</view>
|
||||
<view class="line-wrap" v-if="detail.account_number">
|
||||
<text class="label">收款账号</text>
|
||||
<text class="value">{{ detail.account_number }}</text>
|
||||
</view>
|
||||
<view class="line-wrap" v-if="detail.status == -1 && detail.refuse_reason">
|
||||
<text class="label">拒绝理由</text>
|
||||
<text class="value">{{ detail.refuse_reason }}</text>
|
||||
</view>
|
||||
<view class="line-wrap" v-if="detail.status == 3">
|
||||
<text class="label">转账方式名称</text>
|
||||
<text class="value">{{ detail.transfer_name }}</text>
|
||||
</view>
|
||||
<view class="line-wrap" v-if="detail.status == 3">
|
||||
<text class="label">转账时间</text>
|
||||
<text class="value">{{ $util.timeStampTurnTime(detail.payment_time) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id: 0,
|
||||
detail: {}
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
this.id = option.id || 0;
|
||||
},
|
||||
onShow() {
|
||||
if (this.storeToken) {
|
||||
this.getDetail();
|
||||
} else {
|
||||
this.$util.redirectTo('/pages_tool/login/login', {
|
||||
back: '/pages_promotion/fenxiao/withdraw_list'
|
||||
}, 'redirectTo');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$api.sendRequest({
|
||||
url: '/fenxiao/api/withdraw/detail',
|
||||
data: {
|
||||
id: this.id
|
||||
},
|
||||
success: res => {
|
||||
if (res.data) {
|
||||
this.detail = res.data;
|
||||
}
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
},
|
||||
fail: res => {
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.money-wrap {
|
||||
text-align: center;
|
||||
font-size: 50rpx;
|
||||
font-weight: bold;
|
||||
margin: 40rpx;
|
||||
border-bottom: 2rpx solid $color-line;
|
||||
padding: 40rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
margin: 40rpx;
|
||||
|
||||
.line-wrap {
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.label {
|
||||
display: inline-block;
|
||||
width: 200rpx;
|
||||
color: $color-tip;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
|
||||
.value {
|
||||
display: inline-block;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user