Commit d638243e authored by zhangjianguo's avatar zhangjianguo

分销中心模块换绑

parent d77ac75e
...@@ -123,7 +123,7 @@ export default { ...@@ -123,7 +123,7 @@ export default {
avatarUrl: "" avatarUrl: ""
}; };
this.showAuth = true; this.showAuth = true;
} else{ }else{
this.init(); this.init();
} }
if (option && option.form) { if (option && option.form) {
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</view> </view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo"></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
<view class="loading" v-if="load"> <view class="loading" v-if="load">
<u-loading mode="flower" size="48"></u-loading> <u-loading mode="flower" size="48"></u-loading>
<Text style='color: #fff;margin-top: 10rpx;'>加载中...</Text> <Text style='color: #fff;margin-top: 10rpx;'>加载中...</Text>
...@@ -97,12 +97,18 @@ ...@@ -97,12 +97,18 @@
avatarUrl: "" avatarUrl: ""
}; };
this.showAuth = true; this.showAuth = true;
}else{
this.getData()
} }
}, },
created(){ created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px'; this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
},
methods: {
getData(){
let date1 = new Date(); let date1 = new Date();
let time1 = date1.getFullYear() + "年" + (date1.getMonth() + 1) +'月' let time1 = date1.getFullYear() + "年" + (date1.getMonth() + 1) +'月'
let time2 = date1.getFullYear() + "-" + (date1.getMonth() + 1) let time2 = date1.getFullYear() + "-" + (date1.getMonth() + 1)
...@@ -112,10 +118,13 @@ ...@@ -112,10 +118,13 @@
this.balancedata() this.balancedata()
this.getlogs() this.getlogs()
}, },
methods: {
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth=false this.showAuth=false;
this.getData()
},
goback(){
uni.navigateBack()
}, },
balancedata(){ balancedata(){
uni.showNavigationBarLoading(); uni.showNavigationBarLoading();
......
...@@ -49,20 +49,23 @@ ...@@ -49,20 +49,23 @@
<!-- 取消提示 --> <!-- 取消提示 -->
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
</view> </view>
</template> </template>
<script> <script>
import error from '../../../components/error/error.vue' import error from '../../../components/error/error.vue';
import auth from "../../../components/auth/index.vue";
export default { export default {
components: { components: {
error error,
auth
}, },
data() { data() {
return { return {
pageTitle: "我的卡券", pageTitle: "我的卡券",
current: 0, current: 0,
showAuth: false,
list: [ list: [
{ name: "未使用" }, { name: "未使用" },
{ name: "已使用" }, { name: "已使用" },
...@@ -78,11 +81,24 @@ export default { ...@@ -78,11 +81,24 @@ export default {
item: "", item: "",
index: 0, index: 0,
isover: false, isover: false,
u:{},
}; };
}, },
created() { created() {
this.contentHeight = this.$utils.calcContentHeight(-40) + "px"; this.contentHeight = this.$utils.calcContentHeight(-40) + "px";
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.u = uni.getStorageSync("mall_UserInfo");
console.log(this.u)
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
} else{
this.loading = true;
this.init();
}
}, },
mounted() { mounted() {
let currentPages = getCurrentPages(); let currentPages = getCurrentPages();
...@@ -99,12 +115,6 @@ export default { ...@@ -99,12 +115,6 @@ export default {
title: this.pageTitle, title: this.pageTitle,
}); });
}, },
onLoad: function (option) {
//option为object类型,会序列化上个页面传递的参数
// this.current = option.status;
this.loading = true;
this.init();
},
methods: { methods: {
change(index) { change(index) {
console.log(index) console.log(index)
...@@ -150,6 +160,15 @@ export default { ...@@ -150,6 +160,15 @@ export default {
this.isover = true; this.isover = true;
} }
}, },
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth = false;
this.loading = true;
this.init();
},
goback(){
uni.navigateBack()
},
}, },
}; };
</script> </script>
......
<template> <template>
<view class="cdetailStyle" :style="{'height':contentHeight}"> <view class="cdetailStyle" :style="{'height':contentHeight}">
<view style="width: 100%;height: 100%;"> <view style="width: 100%;height: 100%;">
<u-tabs :list="list" :is-scroll="false" :current="current" @change="change" :active-color='mainColor' bg-color='#f3f4f6'></u-tabs> <u-tabs :list="list" :is-scroll="false" :current="msg.AuditStatus" @change="change" :active-color='mainColor' bg-color='#f3f4f6'></u-tabs>
<u-empty v-if="g==''" text="暂无数据" mode="data"></u-empty> <u-empty v-if="g==''" text="暂无数据" mode="data"></u-empty>
<template v-if="g.length > 0"> <template v-if="g.length > 0">
<view <view
...@@ -19,36 +19,41 @@ ...@@ -19,36 +19,41 @@
:style="{ height: '100%' }"> :style="{ height: '100%' }">
<view style="display: flex;flex-direction: column;align-items: center;"> <view style="display: flex;flex-direction: column;align-items: center;">
<view v-for="(item, index) in g" :key="index" class="listbox"> <view v-for="(item, index) in g" :key="index" class="listbox">
<view style="padding: 10px;color: #999;">{{item.date}}</view> <!-- <view style="padding: 10px;color: #999;">{{item.date}}</view> -->
<view class="box_b" v-for="(c, i) in item.list" :key="i"> <!-- <view class="box_b" v-for="(c, i) in item.list" :key="i"> -->
<view class="box_b" >
<view class="box_b_l"> <view class="box_b_l">
<view style='display: flex;flex-direction: row;align-items: center;'> <view style='display: flex;flex-direction: row;align-items: center;'>
<Text>{{c.pay_type}}</Text> <Text>{{item.WithdrawalWayName}}</Text>
<view class="status"> <view class="status">
<Text :style="{'color':mainColor}">{{c.status_text}}</Text> <Text :style="{'color':mainColor}">{{item.AuditStatusName}}</Text>
</view> </view>
</view> </view>
<Text class='text_s'>提现账户:</Text> <Text class='text_s'>提现账户:{{item.AccountName}}</Text>
<Text class='text_s'>提现时间:{{c.time.created_at}}</Text> <Text class='text_s'>提现时间:{{item.AuditDate}}</Text>
</view> </view>
<view class="box_b_l" style="align-items: flex-end;"> <view class="box_b_l" style="align-items: flex-end;">
<Text style='font-size: 18px;'>{{c.cash.price}}</Text> <Text style='font-size: 18px;'>{{item.AppliedMoney}}</Text>
<Text class='text_s' > 手续费{{c.cash.service_charge}}</Text> <Text class='text_s' > 手续费{{item.Fee}}</Text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#f3f4f6"
/>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
</view> </view>
<view class="loading" v-if="loading">
<u-loading mode="flower" size="48"></u-loading>
<Text style='color: #fff;margin-top: 10rpx;'>加载中...</Text>
</view>
</view> </view>
</template> </template>
...@@ -60,9 +65,8 @@ ...@@ -60,9 +65,8 @@
contentHeight:0, contentHeight:0,
mainColor:'', mainColor:'',
secondary:'', secondary:'',
current:0,
g:'', g:'',
loading:false,
list:[ list:[
{name: '全部'}, {name: '全部'},
{name: '待审核'}, {name: '待审核'},
...@@ -70,7 +74,18 @@ ...@@ -70,7 +74,18 @@
{name: '已打款'}, {name: '已打款'},
{name: '无效'}, {name: '无效'},
], ],
msg:{
pageIndex: 1,
pageSize:10,
AuditStatus:0
},
page_count:1,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多优惠券了",
},
} }
}, },
...@@ -97,34 +112,41 @@ ...@@ -97,34 +112,41 @@
}, },
methods: { methods: {
init(){ init(){
let that = this
that.loading= true;
uni.showNavigationBarLoading();
let h = this.apiheader();
this.request( uni.showLoading({
title: '加载中'
});
this.request2(
{ {
url: "", url: '/api/AppletUser/GetUserDistrbutorRemitPageList',
header:h, data: this.msg
data: {
r: "api/share/cash-list",
status:that.current-1
},
}, },
(res) => { (res) => {
that.loading = false;
uni.hideNavigationBarLoading(); uni.hideLoading();
that.g = Object.values(res.data.list) ; this.g = this.g.concat(res.data.pageData);
console.log(that.g) this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
} }
); );
}, },
change(index){ change(index){
this.current = index; this.msg.AuditStatus = index;
this.init() this.init()
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
} }
},
} }
} }
</script> </script>
...@@ -134,22 +156,7 @@ ...@@ -134,22 +156,7 @@
background: #f3f4f6; background: #f3f4f6;
} }
.cdetailStyle .loading{
width: 200rpx;
height: 200rpx;
background: #000000;
opacity: 0.7;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: fixed;
left: 50%;
top:30%;
margin-left: -100rpx;
z-index: 999;
}
.cdetailStyle .listbox{ .cdetailStyle .listbox{
width: 94%; width: 94%;
border-radius: 10rpx; border-radius: 10rpx;
...@@ -159,7 +166,7 @@ ...@@ -159,7 +166,7 @@
.cdetailStyle .listbox .box_b{ .cdetailStyle .listbox .box_b{
width: 100%; width: 100%;
padding: 10px; padding: 10px;
border-top: 1px solid #f5f5f5; /* border-top: 1px solid #f5f5f5; */
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
......
...@@ -207,15 +207,17 @@ ...@@ -207,15 +207,17 @@
v-if="showGoodList" v-if="showGoodList"
@close="closeGoodListHandler" @close="closeGoodListHandler"
></good-list> ></good-list>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
</view> </view>
</template> </template>
<script> <script>
import goodList from "@/components/goods/order-good-list2"; import goodList from "@/components/goods/order-good-list2";
import auth from "../../../components/auth/index.vue";
export default { export default {
components: { components: {
goodList, goodList,
auth
}, },
data() { data() {
return { return {
...@@ -235,6 +237,8 @@ export default { ...@@ -235,6 +237,8 @@ export default {
showGoodList: false, showGoodList: false,
showReviceModal: false, showReviceModal: false,
isover: false, isover: false,
showAuth:false,
u: {},
customStyle: { customStyle: {
marginLeft: "20px", marginLeft: "20px",
padding: "0 30rpx", padding: "0 30rpx",
...@@ -281,9 +285,20 @@ export default { ...@@ -281,9 +285,20 @@ export default {
onLoad: function (option) { onLoad: function (option) {
//option为object类型,会序列化上个页面传递的参数 //option为object类型,会序列化上个页面传递的参数
this.current = option.status || -1; this.current = option.status || -1;
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
}else{
this.loading = true; this.loading = true;
this.init(); this.init();
this.getOrderStatus(); this.getOrderStatus();
}
}, },
methods: { methods: {
getOrderStatus() { getOrderStatus() {
...@@ -470,6 +485,16 @@ export default { ...@@ -470,6 +485,16 @@ export default {
encodeURIComponent(JSON.stringify(forms)), encodeURIComponent(JSON.stringify(forms)),
}); });
}, },
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth = false;
this.loading = true;
this.init();
this.getOrderStatus();
},
goback(){
uni.navigateBack()
},
}, },
}; };
</script> </script>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="box_top" :style="{background:mainColor}"> <view class="box_top" :style="{background:mainColor}">
<view class="box_tl"> <view class="box_tl">
<Text>分销佣金</Text> <Text>分销佣金</Text>
<Text style='font-size: 22px;'>{{money.total_money}}</Text> <Text style='font-size: 22px;'>{{money.CommissionInfo.TotalCommission}}</Text>
</view> </view>
<view class="box_tr" @click="gocash()"> <view class="box_tr" @click="gocash()">
<Text>提现明细</Text> <Text>提现明细</Text>
...@@ -12,30 +12,30 @@ ...@@ -12,30 +12,30 @@
</view> </view>
<view class="kti" style="height: 50px;"> <view class="kti" style="height: 50px;">
<Text>可提现金佣金</Text> <Text>可提现金佣金</Text>
<Text class='moneytext'>{{money.money}}</Text> <Text class='moneytext'>{{money.CommissionInfo.CommissionWithdrawal}}</Text>
</view> </view>
<view class="ofmoney"> <view class="ofmoney">
<view class="ofmoneyitem" style="border-bottom: 1px solid #f5f5f5;"> <view class="ofmoneyitem" style="border-bottom: 1px solid #f5f5f5;">
<Text>已提现佣金</Text> <Text>已提现佣金</Text>
<Text class='moneytext'>{{money.cash_money}}</Text> <Text class='moneytext'>{{money.CommissionInfo.TXCommission}}</Text>
</view> </view>
<view class="ofmoneyitem" style="border-bottom: 1px solid #f5f5f5;"> <view class="ofmoneyitem" style="border-bottom: 1px solid #f5f5f5;">
<Text>待打款佣金</Text> <Text>{{money.CustomModel.CommissionTobePaidName}}</Text>
<Text class='moneytext'>{{money.un_pay}}</Text> <Text class='moneytext'>{{money.CommissionInfo.WJSCommission}}</Text>
</view> </view>
</view> </view>
<view class="kti" style="margin-top: 15px"> <view class="kti" style="margin-top: 15px">
<!-- <Text>用户须知</Text> --> <!-- <Text>用户须知</Text> -->
<u-collapse style='width: 100%;'> <u-collapse style='width: 100%;'>
<u-collapse-item title="用户须知" > <u-collapse-item :title="money.CustomModel.UserNotesName" >
<!-- TODO无数据 --> <!-- TODO无数据 -->
</u-collapse-item> </u-collapse-item>
</u-collapse> </u-collapse>
</view> </view>
<View class='getapply' :style="{background:mainColor}" @click='tixian'> <View class='getapply' :style="{background:mainColor}" @click='tixian'>
<Text>提现</Text> <Text>{{money.CustomModel.IWantToWithdrawName}}</Text>
</View> </View>
</view> </view>
...@@ -78,21 +78,16 @@ ...@@ -78,21 +78,16 @@
methods: { methods: {
init(){ init(){
uni.showNavigationBarLoading(); uni.showNavigationBarLoading();
let h = this.apiheader();
this.request( this.request2(
{ {
url: "", url: '/api/AppletUser/GetUserDistrbutorCommissionInfo',
header:h, data: {}
data: {
r: "api/share/brokerage",
}, },
},
(res) => { (res) => {
uni.hideNavigationBarLoading() uni.hideNavigationBarLoading()
this.money = res.data.list this.money = res.data
} }
); );
}, },
......
<template> <template>
<view class="corderStyle" :style="{'height':contentHeight}"> <view class="corderStyle" :style="{'height':contentHeight}">
<view style="width: 100%;height: 100%;"> <view style="width: 100%;height: 100%;">
<u-tabs :list="list" :is-scroll="false" :current="current" @change="change" :active-color='mainColor' ></u-tabs> <u-tabs :list="list" :is-scroll="false" :current="msg.DistrbutionOrderSelectStatus" @change="change" :active-color='mainColor' ></u-tabs>
<u-empty v-if="g.length==0" text="暂无数据" mode="data"></u-empty> <u-empty v-if="g.length==0" text="暂无数据" mode="data"></u-empty>
<template v-if="g.length > 0"> <template v-if="g.length > 0">
<view <view
...@@ -20,32 +20,36 @@ ...@@ -20,32 +20,36 @@
<view style="display: flex;flex-direction: column;align-items: center;"> <view style="display: flex;flex-direction: column;align-items: center;">
<view v-for="(item, index) in g" :key="index" class="listbox"> <view v-for="(item, index) in g" :key="index" class="listbox">
<view class="box_top"> <view class="box_top">
<Text style='font-size: 14px;'>订单号:{{item.order_no}}</Text> <Text style='font-size: 14px;'>订单号:{{item.OrderNo}}</Text>
<Text :style="{'font-size':'14px','color':mainColor}">{{item.status}}</Text> <Text :style="{'font-size':'14px','color':mainColor}">{{item.StatusName}}</Text>
</view> </view>
<view class="box_center" @click="isdetail(index)"> <view class="box_center" @click="isdetail(index)">
<view class="center_l" > <view class="center_l" >
<image :src="item.avatar" style="width: 35px;height: 35px" mode='aspectFit'></image> <!-- TODO暂不确定头像字段字段的名字 -->
<u-avatar :src="item.Photo" mode="square" size="70"></u-avatar>
<view class="box_ltext"> <view class="box_ltext">
<Text class='l_name'>{{item.nickname}}</Text> <Text class='l_name'>{{item.nickname}}</Text>
</view> </view>
<Text>{{item.share_status}}</Text> <Text v-if='item.Grade==0'>自购返佣</Text>
<Text v-if='item.Grade==1'>一级分销</Text>
<Text v-if='item.Grade==2'>二级分销</Text>
</view> </view>
<view class="center_l"> <view class="center_l">
<!-- TODO返佣金额 -->
<Text>预计佣金:<Text :style="{color:mainColor}">{{item.share_money}}</Text></Text> <Text>预计佣金:<Text :style="{color:mainColor}">{{item.share_money}}</Text></Text>
<u-icon name="arrow" v-if='item.showdetail==false'></u-icon> <u-icon name="arrow" v-if='item.showdetail==false'></u-icon>
<u-icon name="arrow-down" v-if='item.showdetail==true'></u-icon> <u-icon name="arrow-down" v-if='item.showdetail==true'></u-icon>
</view> </view>
</view> </view>
<view style="display: flex;flex-direction: column;align-items: center;padding-bottom: 15px;width: 100%;" v-if='item.showdetail==true'> <view style="display: flex;flex-direction: column;align-items: center;padding-bottom: 15px;width: 100%;" v-if='item.showdetail==true'>
<view class="box_bottom" v-for="(c, i) in item.detail" :key="i"> <view class="box_bottom" v-for="(c, i) in item.DetailList" :key="i">
<image :src="c.cover_pic" style="width: 55px;height: 55px" mode='aspectFit'></image> <image :src="c.CoverImagePath" style="width: 55px;height: 55px" mode='aspectFit'></image>
<view class="b_r"> <view class="b_r">
<Text class='l_name'>{{c.name}}</Text> <Text class='l_name'>{{c.GoodsName}}</Text>
<view style='display: flex;flex-direction: row;align-items: center;'> <view style='display: flex;flex-direction: row;align-items: center;'>
<Text v-for="(q, w) in c.attr_list" :key="w">{{q.attr_group_name}}:{{q.attr_name}}</Text> <Text v-for="(q, w) in c.SpecificationList" :key="w">{{q}}</Text>
</view> </view>
<Text>x{{c.num}}</Text> <Text>x{{c.Number}}</Text>
</view> </view>
</view> </view>
...@@ -53,17 +57,21 @@ ...@@ -53,17 +57,21 @@
</view> </view>
</view> </view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#f3f4f6"
/>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
</view> </view>
<view class="loading" v-if="loading">
<u-loading mode="flower" size="48"></u-loading>
<Text style='color: #fff;margin-top: 10rpx;'>加载中...</Text>
</view>
</view> </view>
</template> </template>
...@@ -71,20 +79,29 @@ ...@@ -71,20 +79,29 @@
export default { export default {
data() { data() {
return { return {
pageTitle: "提现明细", pageTitle: "分销订单",
contentHeight:0, contentHeight:0,
mainColor:'', mainColor:'',
secondary:'', secondary:'',
current:0,
g:[], g:[],
loading:false,
list:[ list:[
{name: '全部'}, {name: '全部'},
{name: '待付款'}, {name: '待付款'},
{name: '已付款'}, {name: '已付款'},
{name: '已完成'}, {name: '已完成'},
], ],
msg:{
pageIndex: 1,
pageSize:10,
DistrbutionOrderSelectStatus:0
},
page_count:1,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多优惠券了",
},
} }
}, },
...@@ -111,41 +128,46 @@ ...@@ -111,41 +128,46 @@
}, },
methods: { methods: {
init(){ init(){
let that = this
that.loading= true;
uni.showNavigationBarLoading();
let h = this.apiheader();
this.request( uni.showLoading({
title: '加载中'
});
this.request2(
{ {
url: "", url: '/api/AppletOrder/GetUserDistributionOrdersPageList',
header:h, data: this.msg
data: {
r: "api/share/share-order",
status:that.current
},
}, },
(res) => { (res) => {
that.loading = false; uni.hideLoading();
uni.hideNavigationBarLoading(); let list = res.data.pageData;
let list = res.data.list;
list.forEach((x)=>{ list.forEach((x)=>{
x.showdetail = false x.showdetail = false
}) })
that.g = list ; this.g = this.g.concat(list);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
} }
); );
}, },
change(index){ change(index){
this.current = index; this.msg.DistrbutionOrderSelectStatus = index;
this.init() this.init()
}, },
isdetail(index){ isdetail(index){
this.g[index].showdetail = !this.g[index].showdetail this.g[index].showdetail = !this.g[index].showdetail
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
} }
},
} }
} }
</script> </script>
...@@ -155,22 +177,7 @@ ...@@ -155,22 +177,7 @@
background: #f3f4f6; background: #f3f4f6;
} }
.corderStyle .loading{
width: 200rpx;
height: 200rpx;
background: #000000;
opacity: 0.7;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: fixed;
left: 50%;
top:30%;
margin-left: -100rpx;
z-index: 999;
}
.corderStyle .listbox{ .corderStyle .listbox{
width: 100%; width: 100%;
background: #fff; background: #fff;
......
...@@ -20,35 +20,40 @@ ...@@ -20,35 +20,40 @@
<view style="display: flex;flex-direction: column;align-items: center;"> <view style="display: flex;flex-direction: column;align-items: center;">
<view v-for="(item, index) in g" :key="index" class="listbox"> <view v-for="(item, index) in g" :key="index" class="listbox">
<view class="box_top"> <view class="box_top">
<image :src="item.avatar" style="width: 55px;height: 55px" mode='aspectFit'></image>
<u-avatar :src="item.Photo" size="110"></u-avatar>
<view class="box_r"> <view class="box_r">
<view style="width: 100%;display: flex;flex-direction: row;align-items: center;justify-content: space-between;"> <view style="width: 100%;display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<view style="width: 190px;"> <view style="width: 190px;">
<Text class='l_name'>{{item.nickname}}</Text> <Text class='l_name'>{{item.UserName}}</Text>
</view> </view>
<Text style='font-size: 12px;'>推广{{item.peopleCount}}</Text> <Text style='font-size: 12px;'>推广{{item.GeneralizeNum}}</Text>
</view> </view>
<Text style='font-size: 12px;'>注册时间:{{item.junior_at}}</Text> <Text style='font-size: 12px;'>注册时间:{{item.CreateDate}}</Text>
</view> </view>
</view> </view>
<view class="box_b"> <view class="box_b">
<Text style='color: #BABABA;'>{{item.orderPrice}}</Text> <Text style='color: #BABABA;'>{{item.Income}}</Text>
<Text style='color: #BABABA;'>{{item.orderCount}}个订单</Text> <Text style='color: #BABABA;'>{{item.OrderNum}}个订单</Text>
</view> </view>
</view> </view>
</view> </view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#f3f4f6"
/>
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
</view> </view>
<view class="loading" v-if="loading">
<u-loading mode="flower" size="48"></u-loading>
<Text style='color: #fff;margin-top: 10rpx;'>加载中...</Text>
</view>
</view> </view>
</template> </template>
...@@ -62,8 +67,23 @@ ...@@ -62,8 +67,23 @@
secondary:'', secondary:'',
current:0, current:0,
g:[], g:[],
loading:false, list:[
list:[], {name: '一级分销'},
{name: '二级分销'},
{name: '三级分销'},
],
msg:{
pageIndex: 1,
pageSize:10,
GradeId:1
},
page_count:1,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多优惠券了",
},
} }
}, },
...@@ -91,46 +111,41 @@ ...@@ -91,46 +111,41 @@
}, },
methods: { methods: {
init(){ init(){
let that = this
that.loading= true;
uni.showNavigationBarLoading();
let h = this.apiheader();
this.request( uni.showLoading({
title: '加载中'
});
this.request2(
{ {
url: "", url: '/api/AppletUser/GetUserMyTeamPageList',
header:h, data: this.msg
data: {
r: "api/share/team",
status:that.current+1
},
}, },
(res) => { (res) => {
that.loading = false; uni.hideLoading();
uni.hideNavigationBarLoading(); this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
that.g = res.data.list ; if (this.page_count == 1) {
let list= []; this.status = "nomore";
if(res.data.first_count>0){
list.push({'name':'一级分销名称('+res.data.first_count+')'})
}
if(res.data.second_count>0){
list.push({'name':'二级分销名称('+res.data.second_count+')'})
} }
if(res.data.third_count>0){
list.push({'name':'三级分销名称('+res.data.third_count+')'})
}
this.list= list
} }
); );
}, },
change(index){ change(index){
this.current = index; this.current = index
this.msg.GradeId = index+1;
this.init() this.init()
}, },
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
}
},
} }
} }
......
<template> <template>
<view class="s_addStyle" :style="{'height':contentHeight}"> <view class="s_addStyle" :style="{'height':contentHeight}">
<image :src="bg_img" style="width: 100%;height: 165px;"></image> <image :src="userinfo.CustomModel.HeadImage" style="width: 100%;height: 165px;"></image>
<view style='width: 94%;margin-left: 3%;margin-top: 10px;'> <view style='width: 94%;margin-left: 3%;margin-top: 10px;'>
<Text style='padding: 10px 0;width: 100%;border-bottom: 1px solid #f5f5f5;display: inline-block;'> <Text style='padding: 10px 0;width: 100%;border-bottom: 1px solid #f5f5f5;display: inline-block;'>
欢迎加入 欢迎加入
...@@ -11,21 +11,21 @@ ...@@ -11,21 +11,21 @@
<view class="addTbox_l"> <view class="addTbox_l">
<Text>邀请人</Text> <Text>邀请人</Text>
</view> </view>
<Text :style="{color:mainColor}">{{userinfo.identity.parent_name}} <Text style='color: #6F6666;'>(请核对)</Text> </Text> <Text :style="{color:mainColor}">{{userinfo.ApplyForInfo.SuperiorName}} <Text style='color: #6F6666;'>(请核对)</Text> </Text>
</view> </view>
<view class='addTbox'> <view class='addTbox'>
<view class="addTbox_l"> <view class="addTbox_l">
<Text>姓名</Text> <Text>姓名</Text>
</view> </view>
<input class="uni-input" v-model="name" placeholder="请输入真实姓名" /> <input class="uni-input" v-model="msg.Name" placeholder="请输入真实姓名" />
</view> </view>
<view class='addTbox'> <view class='addTbox'>
<view class="addTbox_l"> <view class="addTbox_l">
<Text>手机号码</Text> <Text>手机号码</Text>
</view> </view>
<input class="uni-input" type="number" v-model="mobile" placeholder="请填写手机号码" /> <input class="uni-input" type="number" v-model="msg.Mobile" placeholder="请填写手机号码" />
</view> </view>
<view class='addTbox'> <view class='addTbox'>
<u-checkbox-group @change="Select"> <u-checkbox-group @change="Select">
...@@ -33,30 +33,17 @@ ...@@ -33,30 +33,17 @@
>我已经阅读并了解</u-checkbox >我已经阅读并了解</u-checkbox
> >
</u-checkbox-group> </u-checkbox-group>
<Text style='font-size: 12px;color: #1F4C87;' @click='showagreement'>分销申请协议</Text> <Text style='font-size: 12px;color: #1F4C87;' @click='showagreement'>{{userinfo.CustomModel.ApplicationAgreement}}</Text>
</view> </view>
</view> </view>
<view style="width: 100%;height:70px ;background: #F7F7F7;display: flex;align-items: center;justify-content: center;"> <view style="width: 100%;height:70px ;background: #F7F7F7;display: flex;align-items: center;justify-content: center;">
<view :style="{background:mainColor}" class="apply" @click="apply"> <view :style="{background:userinfo.CustomModel.ButtonColor,'border-radius':userinfo.CustomModel.ButtonFilletPX+'px'}" class="apply" @click="apply">
<Text style='color: #fff;font-weight: 500;'>申请成为分销商</Text> <Text :style="{color:userinfo.CustomModel.ButtonTextColor}">{{userinfo.CustomModel.ButtonText}}</Text>
</view>
</view>
<view class="addbottom">
<view class="add_b_box" style="border-bottom: 1px solid #f5f5f5">
<Text style='font-size: 13px;color:#666666 ;'>分销商特权</Text>
</view>
<view class="add_b_box" style="border-bottom: 1px solid #f5f5f5">
<u-icon name="gold-coin-o" color="#F0A158" size='50'></u-icon>
<view style='display: flex;flex-direction: column;margin-left: 10px;'>
<Text>销售拿佣金</Text>
<Text style='font-size: 13px;color:#666666 ;margin-top: 5px;'>成为分销商后卖的商品,您可以获得佣金</Text>
</view>
</view>
<view class="add_b_box" >
<Text style='font-size: 12px;color:#666666 ;'>分销商的商品销售统一由厂家直接收款、直接发货,并提供产品的售后服务,分销佣金由厂家统一设置。</Text>
</view> </view>
</view> </view>
<image :src="userinfo.CustomModel.BottomImage" style="width: 100%;height: 165px;"></image>
<view class="agreementbox" v-if='isshowagreement==true'></view> <view class="agreementbox" v-if='isshowagreement==true'></view>
<view class="agreementbox_t" v-if='isshowagreement==true'> <view class="agreementbox_t" v-if='isshowagreement==true'>
<view class="agreement_b"> <view class="agreement_b">
...@@ -87,22 +74,19 @@ ...@@ -87,22 +74,19 @@
topname:'', topname:'',
checked:false, checked:false,
isshowagreement:false, isshowagreement:false,
name:'', msg:{
mobile:'', Name:'',
Mobile:'',
} }
},
onLoad(option){
if(option.u!=undefined){
let u = JSON.parse(decodeURIComponent(option.u))
this.userinfo = u
} }
}, },
created(){ created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px'; this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary; this.secondary = this.$uiConfig.secondary;
this.getUserInfo()
}, },
mounted() { mounted() {
let currentPages = getCurrentPages(); let currentPages = getCurrentPages();
...@@ -115,9 +99,7 @@ ...@@ -115,9 +99,7 @@
this.pageTitle = x.new_name ? x.new_name : x.name; this.pageTitle = x.new_name ? x.new_name : x.name;
} }
}); });
this.bg_img = wx.getStorageSync("basedata")
? wx.getStorageSync("basedata").__wxapp_img.share.apply
: '';
this.topname = wx.getStorageSync("basedata") this.topname = wx.getStorageSync("basedata")
? wx.getStorageSync("basedata").mall.name ? wx.getStorageSync("basedata").mall.name
: ''; : '';
...@@ -126,6 +108,25 @@ ...@@ -126,6 +108,25 @@
}); });
}, },
methods: { methods: {
getUserInfo(){
uni.showNavigationBarLoading();
let h = this.apiheader();
this.request2(
{
url: '/api/AppletUser/GetUserApplyForDistrbutorInfo',
data: {}
},
(res) => {
uni.hideNavigationBarLoading()
this.userinfo = res.data;
this.pageTitle = res.data.CustomModel.DistributionApplication
// if(res.data.is_can_apply==false && res.data.status==1){
// this.getorder()
// }
}
);
},
Select(){ Select(){
console.log(this.checked) console.log(this.checked)
}, },
...@@ -160,7 +161,28 @@ ...@@ -160,7 +161,28 @@
}); });
return false return false
} }
// TODO 接口暂时不知道是哪个 uni.showLoading({
title: '加载中...'
});
let pages = getCurrentPages(); // 当前页面
let beforePage = pages[pages.length - 2]; // 前一个页面
this.request2(
{
url: '/api/AppletUser/SetUserApplyForBeDistrbutor',
data: this.msg
},
(res) => {
uni.hideLoading();
setTimeout(()=>{
uni.navigateBack({
success: function() {
beforePage.onLoad(); // 执行前一个页面的created方法
}
});
},1000)
}
);
} }
...@@ -193,23 +215,7 @@ ...@@ -193,23 +215,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.s_addStyle .addbottom{
width: 100%;
border-bottom: 1px solid #f5f5f5;
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 50px;
}
.s_addStyle .addbottom .add_b_box{
width: 90%;
padding: 10px 0;
display: flex;
flex-direction: row;
align-items: center;
}
.s_addStyle .agreementbox{ .s_addStyle .agreementbox{
position: fixed; position: fixed;
left: 0; left: 0;
......
...@@ -2,13 +2,16 @@ ...@@ -2,13 +2,16 @@
<view class="cashStyle" :style="{'height':contentHeight}"> <view class="cashStyle" :style="{'height':contentHeight}">
<view class="cashBox"> <view class="cashBox">
<view class="cashBox_top"> <view class="cashBox_top">
<Text style='font-size: 18px;margin-top: 10px;'>账户剩余余额:{{money}}</Text> <Text style='font-size: 18px;margin-top: 10px;'>账户剩余余额:{{cash.CommissionWithdrawal}}</Text>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 10px;"> <Text style='font-size: 14px;color:#333 ;margin-top: 10px;'>今日剩余提现金额次数:{{cash.CanRemitMoney}}</Text>
<Text style='font-size: 14px;color:#333 ;margin-top: 10px;'>最少提现额度:{{cash.MinimumWithdrawalLimit}}</Text>
<Text style='font-size: 14px;color:#333 ;margin-top: 10px;'>手续费 百分比:{{cash.WithdrawFee}}%</Text>
<!-- <view style="display: flex;flex-direction: row;align-items: center;margin-top: 10px;">
<Text style='font-size: 12px;color:#333 '>今日提现金额无限制</Text> <Text style='font-size: 12px;color:#333 '>今日提现金额无限制</Text>
<view class="rule" :style="{'border-color':mainColor}" @click="show2=true"> <view class="rule" :style="{'border-color':mainColor}" @click="show2=true">
<Text :style="{'color':mainColor}">规则</Text> <Text :style="{'color':mainColor}">规则</Text>
</view> </view>
</view> </view> -->
<view style="width: 100%;height: 1px;background: #f5f5f5;margin: 10px 0;"></view> <view style="width: 100%;height: 1px;background: #f5f5f5;margin: 10px 0;"></view>
<view class="tixian"> <view class="tixian">
<view style='display: flex;flex-direction: row;align-items: center;'> <view style='display: flex;flex-direction: row;align-items: center;'>
...@@ -42,14 +45,14 @@ ...@@ -42,14 +45,14 @@
</view> </view>
<view class="txtype"> <view class="txtype">
<view class="typeitem" v-for="(item, index) in list" :key="index" > <view class="typeitem" v-for="(item, index) in list" :key="index" >
<Text>{{item.name}}</Text> <Text>{{item.Name}}</Text>
<u-radio-group v-model="value"> <u-radio-group v-model="value">
<u-radio <u-radio
v-model = 'item.checked' v-model = 'item.checked'
:active-color="mainColor" :active-color="mainColor"
shape="circle" shape="circle"
:name="item.name" :name="item.Name"
@change="radioChange" @change="radioChange(item)"
> >
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
...@@ -74,7 +77,7 @@ ...@@ -74,7 +77,7 @@
</view> </view>
</u-popup> </u-popup>
</template> </template>
<u-toast ref="uToast" />
</view> </view>
</template> </template>
...@@ -95,16 +98,21 @@ ...@@ -95,16 +98,21 @@
list: [ list: [
{ {
name: '微信零钱', Name: '微信零钱',
checked: false, checked: false,
}, },
], ],
value:'', value:'',
msg:{
AppliedMoney:0,
Fee:0,
}
} }
}, },
onLoad(option){ onLoad(option){
this.money = option.u
}, },
created(){ created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px'; this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
...@@ -132,41 +140,46 @@ ...@@ -132,41 +140,46 @@
uni.showNavigationBarLoading(); uni.showNavigationBarLoading();
let h = this.apiheader(); let h = this.apiheader();
this.request( this.request2(
{ {
url: "", url: '/api/AppletUser/GetUserDistrbutorWithdrawDepositBalance',
header:h, data: {}
data: {
r: "api/share/setting",
},
}, },
(res) => { (res) => {
uni.hideNavigationBarLoading() uni.hideNavigationBarLoading()
this.cash = res.msg.config this.cash = res.data;
let WayList = res.data.WithdrawWayList;
WayList.forEach((x)=>{
x.checked = false
})
this.list = WayList
} }
); );
}, },
allmoney(){ allmoney(){
this.txmoney = Number(this.money) this.txmoney = Number(this.cash.CommissionWithdrawal)
}, },
radioChange(e){ radioChange(item){
this.txmode = e; this.txmode = item.Name;
this.show=false this.show=false
}, },
getapply(){ getapply(){
// TODO 接口暂无 // TODO 接口暂无
if(this.txmoney==''){ if(this.txmoney==''){
this.$refs.uToast.show({
title: "请输入提现金额" uni.showToast({
title: "请输入提现金额",
icon: "none"
}); });
return false return false
} }
if(this.txmode==''){ if(this.txmode==''){
this.$refs.uToast.show({ uni.showToast({
title: "请选择提现方式" title: "请选择提现方式",
icon: "none"
}); });
return false return false
} }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment