Commit d638243e authored by zhangjianguo's avatar zhangjianguo

分销中心模块换绑

parent d77ac75e
......@@ -123,7 +123,7 @@ export default {
avatarUrl: ""
};
this.showAuth = true;
} else{
}else{
this.init();
}
if (option && option.form) {
......
......@@ -46,7 +46,7 @@
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo"></auth>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
<view class="loading" v-if="load">
<u-loading mode="flower" size="48"></u-loading>
<Text style='color: #fff;margin-top: 10rpx;'>加载中...</Text>
......@@ -97,25 +97,34 @@
avatarUrl: ""
};
this.showAuth = true;
}
}else{
this.getData()
}
},
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor;
let date1 = new Date();
let time1 = date1.getFullYear() + "年" + (date1.getMonth() + 1) +'月'
let time2 = date1.getFullYear() + "-" + (date1.getMonth() + 1)
this.date = time1
this.date2 = time2
this.balancedata()
this.getlogs()
},
methods: {
getData(){
let date1 = new Date();
let time1 = date1.getFullYear() + "年" + (date1.getMonth() + 1) +'月'
let time2 = date1.getFullYear() + "-" + (date1.getMonth() + 1)
this.date = time1
this.date2 = time2
this.balancedata()
this.getlogs()
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth=false
this.showAuth=false;
this.getData()
},
goback(){
uni.navigateBack()
},
balancedata(){
uni.showNavigationBarLoading();
......
......@@ -49,20 +49,23 @@
<!-- 取消提示 -->
<u-toast ref="uToast" />
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
</view>
</template>
<script>
import error from '../../../components/error/error.vue'
import error from '../../../components/error/error.vue';
import auth from "../../../components/auth/index.vue";
export default {
components: {
error
error,
auth
},
data() {
return {
pageTitle: "我的卡券",
current: 0,
showAuth: false,
list: [
{ name: "未使用" },
{ name: "已使用" },
......@@ -78,11 +81,24 @@ export default {
item: "",
index: 0,
isover: false,
u:{},
};
},
created() {
this.contentHeight = this.$utils.calcContentHeight(-40) + "px";
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() {
let currentPages = getCurrentPages();
......@@ -99,12 +115,6 @@ export default {
title: this.pageTitle,
});
},
onLoad: function (option) {
//option为object类型,会序列化上个页面传递的参数
// this.current = option.status;
this.loading = true;
this.init();
},
methods: {
change(index) {
console.log(index)
......@@ -150,6 +160,15 @@ export default {
this.isover = true;
}
},
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth = false;
this.loading = true;
this.init();
},
goback(){
uni.navigateBack()
},
},
};
</script>
......
<template>
<view class="cdetailStyle" :style="{'height':contentHeight}">
<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>
<template v-if="g.length > 0">
<view
......@@ -19,36 +19,41 @@
:style="{ height: '100%' }">
<view style="display: flex;flex-direction: column;align-items: center;">
<view v-for="(item, index) in g" :key="index" class="listbox">
<view style="padding: 10px;color: #999;">{{item.date}}</view>
<view class="box_b" v-for="(c, i) in item.list" :key="i">
<!-- <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" >
<view class="box_b_l">
<view style='display: flex;flex-direction: row;align-items: center;'>
<Text>{{c.pay_type}}</Text>
<Text>{{item.WithdrawalWayName}}</Text>
<view class="status">
<Text :style="{'color':mainColor}">{{c.status_text}}</Text>
<Text :style="{'color':mainColor}">{{item.AuditStatusName}}</Text>
</view>
</view>
<Text class='text_s'>提现账户:</Text>
<Text class='text_s'>提现时间:{{c.time.created_at}}</Text>
<Text class='text_s'>提现账户:{{item.AccountName}}</Text>
<Text class='text_s'>提现时间:{{item.AuditDate}}</Text>
</view>
<view class="box_b_l" style="align-items: flex-end;">
<Text style='font-size: 18px;'>{{c.cash.price}}</Text>
<Text class='text_s' > 手续费{{c.cash.service_charge}}</Text>
<Text style='font-size: 18px;'>{{item.AppliedMoney}}</Text>
<Text class='text_s' > 手续费{{item.Fee}}</Text>
</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>
</view>
</template>
</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>
</template>
......@@ -60,9 +65,8 @@
contentHeight:0,
mainColor:'',
secondary:'',
current:0,
g:'',
loading:false,
list:[
{name: '全部'},
{name: '待审核'},
......@@ -70,7 +74,18 @@
{name: '已打款'},
{name: '无效'},
],
msg:{
pageIndex: 1,
pageSize:10,
AuditStatus:0
},
page_count:1,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多优惠券了",
},
}
},
......@@ -97,34 +112,41 @@
},
methods: {
init(){
let that = this
that.loading= true;
uni.showNavigationBarLoading();
let h = this.apiheader();
this.request(
uni.showLoading({
title: '加载中'
});
this.request2(
{
url: "",
header:h,
data: {
r: "api/share/cash-list",
status:that.current-1
},
},
url: '/api/AppletUser/GetUserDistrbutorRemitPageList',
data: this.msg
},
(res) => {
that.loading = false;
uni.hideNavigationBarLoading();
that.g = Object.values(res.data.list) ;
console.log(that.g)
}
(res) => {
uni.hideLoading();
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
}
);
},
change(index){
this.current = index;
this.msg.AuditStatus = index;
this.init()
}
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
}
},
}
}
</script>
......@@ -134,22 +156,7 @@
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{
width: 94%;
border-radius: 10rpx;
......@@ -159,7 +166,7 @@
.cdetailStyle .listbox .box_b{
width: 100%;
padding: 10px;
border-top: 1px solid #f5f5f5;
/* border-top: 1px solid #f5f5f5; */
display: flex;
flex-direction: row;
align-items: center;
......
......@@ -207,15 +207,17 @@
v-if="showGoodList"
@close="closeGoodListHandler"
></good-list>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
</view>
</template>
<script>
import goodList from "@/components/goods/order-good-list2";
import auth from "../../../components/auth/index.vue";
export default {
components: {
goodList,
auth
},
data() {
return {
......@@ -235,6 +237,8 @@ export default {
showGoodList: false,
showReviceModal: false,
isover: false,
showAuth:false,
u: {},
customStyle: {
marginLeft: "20px",
padding: "0 30rpx",
......@@ -281,9 +285,20 @@ export default {
onLoad: function (option) {
//option为object类型,会序列化上个页面传递的参数
this.current = option.status || -1;
this.loading = true;
this.init();
this.getOrderStatus();
this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
}else{
this.loading = true;
this.init();
this.getOrderStatus();
}
},
methods: {
getOrderStatus() {
......@@ -470,6 +485,16 @@ export default {
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>
......
......@@ -4,7 +4,7 @@
<view class="box_top" :style="{background:mainColor}">
<view class="box_tl">
<Text>分销佣金</Text>
<Text style='font-size: 22px;'>{{money.total_money}}</Text>
<Text style='font-size: 22px;'>{{money.CommissionInfo.TotalCommission}}</Text>
</view>
<view class="box_tr" @click="gocash()">
<Text>提现明细</Text>
......@@ -12,30 +12,30 @@
</view>
<view class="kti" style="height: 50px;">
<Text>可提现金佣金</Text>
<Text class='moneytext'>{{money.money}}</Text>
<Text class='moneytext'>{{money.CommissionInfo.CommissionWithdrawal}}</Text>
</view>
<view class="ofmoney">
<view class="ofmoneyitem" style="border-bottom: 1px solid #f5f5f5;">
<Text>已提现佣金</Text>
<Text class='moneytext'>{{money.cash_money}}</Text>
<Text class='moneytext'>{{money.CommissionInfo.TXCommission}}</Text>
</view>
<view class="ofmoneyitem" style="border-bottom: 1px solid #f5f5f5;">
<Text>待打款佣金</Text>
<Text class='moneytext'>{{money.un_pay}}</Text>
<Text>{{money.CustomModel.CommissionTobePaidName}}</Text>
<Text class='moneytext'>{{money.CommissionInfo.WJSCommission}}</Text>
</view>
</view>
<view class="kti" style="margin-top: 15px">
<!-- <Text>用户须知</Text> -->
<u-collapse style='width: 100%;'>
<u-collapse-item title="用户须知" >
<u-collapse-item :title="money.CustomModel.UserNotesName" >
<!-- TODO无数据 -->
</u-collapse-item>
</u-collapse>
</view>
<View class='getapply' :style="{background:mainColor}" @click='tixian'>
<Text>提现</Text>
<Text>{{money.CustomModel.IWantToWithdrawName}}</Text>
</View>
</view>
......@@ -78,23 +78,18 @@
methods: {
init(){
uni.showNavigationBarLoading();
let h = this.apiheader();
this.request(
{
url: "",
header:h,
data: {
r: "api/share/brokerage",
},
},
(res) => {
uni.hideNavigationBarLoading()
this.money = res.data.list
}
);
this.request2(
{
url: '/api/AppletUser/GetUserDistrbutorCommissionInfo',
data: {}
},
(res) => {
uni.hideNavigationBarLoading()
this.money = res.data
}
);
},
tixian(){
......
<template>
<view class="corderStyle" :style="{'height':contentHeight}">
<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>
<template v-if="g.length > 0">
<view
......@@ -20,32 +20,36 @@
<view style="display: flex;flex-direction: column;align-items: center;">
<view v-for="(item, index) in g" :key="index" class="listbox">
<view class="box_top">
<Text style='font-size: 14px;'>订单号:{{item.order_no}}</Text>
<Text :style="{'font-size':'14px','color':mainColor}">{{item.status}}</Text>
<Text style='font-size: 14px;'>订单号:{{item.OrderNo}}</Text>
<Text :style="{'font-size':'14px','color':mainColor}">{{item.StatusName}}</Text>
</view>
<view class="box_center" @click="isdetail(index)">
<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">
<Text class='l_name'>{{item.nickname}}</Text>
</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 class="center_l">
<!-- TODO返佣金额 -->
<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-down" v-if='item.showdetail==true'></u-icon>
</view>
</view>
<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">
<image :src="c.cover_pic" style="width: 55px;height: 55px" mode='aspectFit'></image>
<view class="box_bottom" v-for="(c, i) in item.DetailList" :key="i">
<image :src="c.CoverImagePath" style="width: 55px;height: 55px" mode='aspectFit'></image>
<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;'>
<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>
<Text>x{{c.num}}</Text>
<Text>x{{c.Number}}</Text>
</view>
</view>
......@@ -53,17 +57,21 @@
</view>
</view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#f3f4f6"
/>
</scroll-view>
</view>
</template>
</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>
</template>
......@@ -71,20 +79,29 @@
export default {
data() {
return {
pageTitle: "提现明细",
pageTitle: "分销订单",
contentHeight:0,
mainColor:'',
secondary:'',
current:0,
g:[],
loading:false,
list:[
{name: '全部'},
{name: '待付款'},
{name: '已付款'},
{name: '已完成'},
],
msg:{
pageIndex: 1,
pageSize:10,
DistrbutionOrderSelectStatus:0
},
page_count:1,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多优惠券了",
},
}
},
......@@ -111,41 +128,46 @@
},
methods: {
init(){
let that = this
that.loading= true;
uni.showNavigationBarLoading();
let h = this.apiheader();
this.request(
uni.showLoading({
title: '加载中'
});
this.request2(
{
url: "",
header:h,
data: {
r: "api/share/share-order",
status:that.current
},
},
url: '/api/AppletOrder/GetUserDistributionOrdersPageList',
data: this.msg
},
(res) => {
that.loading = false;
uni.hideNavigationBarLoading();
let list = res.data.list;
list.forEach((x)=>{
x.showdetail = false
})
that.g = list ;
}
(res) => {
uni.hideLoading();
let list = res.data.pageData;
list.forEach((x)=>{
x.showdetail = false
})
this.g = this.g.concat(list);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
}
);
},
change(index){
this.current = index;
this.msg.DistrbutionOrderSelectStatus = index;
this.init()
},
isdetail(index){
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>
......@@ -155,22 +177,7 @@
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{
width: 100%;
background: #fff;
......
......@@ -20,35 +20,40 @@
<view style="display: flex;flex-direction: column;align-items: center;">
<view v-for="(item, index) in g" :key="index" class="listbox">
<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 style="width: 100%;display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<view style="width: 190px;">
<Text class='l_name'>{{item.nickname}}</Text>
<Text class='l_name'>{{item.UserName}}</Text>
</view>
<Text style='font-size: 12px;'>推广{{item.peopleCount}}</Text>
<Text style='font-size: 12px;'>推广{{item.GeneralizeNum}}</Text>
</view>
<Text style='font-size: 12px;'>注册时间:{{item.junior_at}}</Text>
<Text style='font-size: 12px;'>注册时间:{{item.CreateDate}}</Text>
</view>
</view>
<view class="box_b">
<Text style='color: #BABABA;'>{{item.orderPrice}}</Text>
<Text style='color: #BABABA;'>{{item.orderCount}}个订单</Text>
<Text style='color: #BABABA;'>{{item.Income}}</Text>
<Text style='color: #BABABA;'>{{item.OrderNum}}个订单</Text>
</view>
</view>
</view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#f3f4f6"
/>
</scroll-view>
</view>
</template>
</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>
</template>
......@@ -62,8 +67,23 @@
secondary:'',
current:0,
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 @@
},
methods: {
init(){
let that = this
that.loading= true;
uni.showNavigationBarLoading();
let h = this.apiheader();
this.request(
{
url: "",
header:h,
data: {
r: "api/share/team",
status:that.current+1
},
},
uni.showLoading({
title: '加载中'
});
this.request2(
{
url: '/api/AppletUser/GetUserMyTeamPageList',
data: this.msg
},
(res) => {
that.loading = false;
uni.hideNavigationBarLoading();
that.g = res.data.list ;
let list= [];
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
}
);
(res) => {
uni.hideLoading();
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
}
);
},
change(index){
this.current = index;
this.current = index
this.msg.GradeId = index+1;
this.init()
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
}
},
}
}
......
<template>
<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;'>
<Text style='padding: 10px 0;width: 100%;border-bottom: 1px solid #f5f5f5;display: inline-block;'>
欢迎加入
......@@ -11,21 +11,21 @@
<view class="addTbox_l">
<Text>邀请人</Text>
</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 class='addTbox'>
<view class="addTbox_l">
<Text>姓名</Text>
</view>
<input class="uni-input" v-model="name" placeholder="请输入真实姓名" />
<input class="uni-input" v-model="msg.Name" placeholder="请输入真实姓名" />
</view>
<view class='addTbox'>
<view class="addTbox_l">
<Text>手机号码</Text>
</view>
<input class="uni-input" type="number" v-model="mobile" placeholder="请填写手机号码" />
<input class="uni-input" type="number" v-model="msg.Mobile" placeholder="请填写手机号码" />
</view>
<view class='addTbox'>
<u-checkbox-group @change="Select">
......@@ -33,30 +33,17 @@
>我已经阅读并了解</u-checkbox
>
</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 style="width: 100%;height:70px ;background: #F7F7F7;display: flex;align-items: center;justify-content: center;">
<view :style="{background:mainColor}" class="apply" @click="apply">
<Text style='color: #fff;font-weight: 500;'>申请成为分销商</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 :style="{background:userinfo.CustomModel.ButtonColor,'border-radius':userinfo.CustomModel.ButtonFilletPX+'px'}" class="apply" @click="apply">
<Text :style="{color:userinfo.CustomModel.ButtonTextColor}">{{userinfo.CustomModel.ButtonText}}</Text>
</view>
</view>
<image :src="userinfo.CustomModel.BottomImage" style="width: 100%;height: 165px;"></image>
<view class="agreementbox" v-if='isshowagreement==true'></view>
<view class="agreementbox_t" v-if='isshowagreement==true'>
<view class="agreement_b">
......@@ -87,22 +74,19 @@
topname:'',
checked:false,
isshowagreement:false,
name:'',
mobile:'',
msg:{
Name:'',
Mobile:'',
}
}
},
onLoad(option){
if(option.u!=undefined){
let u = JSON.parse(decodeURIComponent(option.u))
this.userinfo = u
}
},
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
this.getUserInfo()
},
mounted() {
let currentPages = getCurrentPages();
......@@ -115,9 +99,7 @@
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")
? wx.getStorageSync("basedata").mall.name
: '';
......@@ -126,6 +108,25 @@
});
},
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(){
console.log(this.checked)
},
......@@ -160,7 +161,28 @@
});
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 @@
align-items: 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{
position: fixed;
left: 0;
......
......@@ -2,13 +2,16 @@
<view class="cashStyle" :style="{'height':contentHeight}">
<view class="cashBox">
<view class="cashBox_top">
<Text style='font-size: 18px;margin-top: 10px;'>账户剩余余额:{{money}}</Text>
<view style="display: flex;flex-direction: row;align-items: center;margin-top: 10px;">
<Text style='font-size: 18px;margin-top: 10px;'>账户剩余余额:{{cash.CommissionWithdrawal}}</Text>
<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>
<view class="rule" :style="{'border-color':mainColor}" @click="show2=true">
<Text :style="{'color':mainColor}">规则</Text>
</view>
</view>
</view> -->
<view style="width: 100%;height: 1px;background: #f5f5f5;margin: 10px 0;"></view>
<view class="tixian">
<view style='display: flex;flex-direction: row;align-items: center;'>
......@@ -42,14 +45,14 @@
</view>
<view class="txtype">
<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
v-model = 'item.checked'
:active-color="mainColor"
shape="circle"
:name="item.name"
@change="radioChange"
:name="item.Name"
@change="radioChange(item)"
>
</u-radio>
</u-radio-group>
......@@ -74,7 +77,7 @@
</view>
</u-popup>
</template>
<u-toast ref="uToast" />
</view>
</template>
......@@ -95,16 +98,21 @@
list: [
{
name: '微信零钱',
Name: '微信零钱',
checked: false,
},
],
value:'',
msg:{
AppliedMoney:0,
Fee:0,
}
}
},
onLoad(option){
this.money = option.u
},
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
......@@ -132,41 +140,46 @@
uni.showNavigationBarLoading();
let h = this.apiheader();
this.request(
{
url: "",
header:h,
data: {
r: "api/share/setting",
},
},
this.request2(
{
url: '/api/AppletUser/GetUserDistrbutorWithdrawDepositBalance',
data: {}
},
(res) => {
uni.hideNavigationBarLoading()
this.cash = res.msg.config
}
);
(res) => {
uni.hideNavigationBarLoading()
this.cash = res.data;
let WayList = res.data.WithdrawWayList;
WayList.forEach((x)=>{
x.checked = false
})
this.list = WayList
}
);
},
allmoney(){
this.txmoney = Number(this.money)
this.txmoney = Number(this.cash.CommissionWithdrawal)
},
radioChange(e){
this.txmode = e;
radioChange(item){
this.txmode = item.Name;
this.show=false
},
getapply(){
// TODO 接口暂无
if(this.txmoney==''){
this.$refs.uToast.show({
title: "请输入提现金额"
uni.showToast({
title: "请输入提现金额",
icon: "none"
});
return false
}
if(this.txmode==''){
this.$refs.uToast.show({
title: "请选择提现方式"
uni.showToast({
title: "请选择提现方式",
icon: "none"
});
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