Commit 247e6d5a by 张卓

成为分销成功弹框

parent dfc413f0
......@@ -21,5 +21,9 @@ export default {
getDistributorHomepage(data) {
return requestPOST(`${process.env.OLSHOP_URL}/distributorHomepageInfo/getDistributorHomepage/${data}`, {})
},
// 客户点击按钮后关闭提醒
apply_for_withdraw(data) {
return requestPOST(`${process.env.OLSHOP_URL}/spokesman/noReminderRequired`, { data })
},
}
......@@ -93,6 +93,7 @@
<share-popup></share-popup>
<my-card></my-card>
<set-my-homepage></set-my-homepage>
<apply-sucess-entry></apply-sucess-entry>
</div>
</template>
......
......@@ -18,7 +18,8 @@
"live-broadcast":"/static/nativeComponents/LiveBroadcast/index",
"my-card":"/static/nativeComponents/MyCard/index",
"get-index-homepage":"/static/nativeComponents/GetIndexHomePage/index",
"set-my-homepage":"/static/nativeComponents/SetMyHomePage/index"
"set-my-homepage":"/static/nativeComponents/SetMyHomePage/index",
"apply-sucess-entry":"/static/nativeComponents/ApplySucessEntry/index"
},
"enablePullDownRefresh":true,
"backgroundColor":"#f5f5f5"
......
......@@ -10,10 +10,7 @@ const componentOptions = {
// 组件数据
data: {
isPageHidden: false,
showPop: false,
showSetMoreDiscountPrice: false,
distributionPrice1: 0,
showBaiFen: false,
showPop: true,
},
// 数据监听器
observers: {},
......@@ -48,74 +45,21 @@ const componentOptions = {
},
// 组件方法
methods: {
toMyBusinessCard() {
// this.setData(showPop)
this.setData({ showPop: true });
},
setNewShop() {
// window.sessionStorage.setItem(getTokenTwo()+'currentState',0)
spokesmanApi.getDistributorHomepage('1').then(res=>{
// if(!this.$store.state.spokesmanModule.getLoginSpokesmanInfo.parentId) {
this.initShopDetail()
return
// }
if(res.code=='200'&&!(res.data&&res.data.id)) {
this.showSetMyShop = true;
}else if(res.code=='200'&&res.data&&res.data.id){
this.initShopDetail()
}
})
},
copyShop() {
console.log(this.data.distributionPrice1,888888888)
spokesmanApi.oneClickShopQuickCopy({grossProfitMargin: parseFloat(this.data.distributionPrice1)}).then(res=>{
if(res.data == 'true') {
this.initShopDetail()
}
})
},
closePopuop1() {
closePopuop() {
this.setData({ showPop: false });
},
closePopuop2() {
this.setData({ showSetMoreDiscountPrice: false });
},
initShopDetail() {
let linkVal = '/personalCenter/spokesmanCenter/mine/spokesmanHomePage?fromSpokesmanCenter=1'
toSpokesmanCenter() {
let linkVal = '/personalCenter/spokesmanCenter'
spokesmanApi.apply_for_withdraw({type:'applyRemindFlag'}).then(res => {
if (res.code == "200") {
console.log(res,9999)
}
});
$themeToLink({
type: 1,
link:linkVal,
});
},
checkedBtn() {
this.setData({ showPop: false });
this.setData({ showSetMoreDiscountPrice: true });
},
focus(){
// this.setData({ distributionPrice1: parseFloat(this.data.distributionPrice1) });
},
blur() {
// if(!(this.data.distributionPrice1-0)){
// this.setData({ distributionPrice1: 0 });
// }else {
// this.setData({ distributionPrice1: distributionPrice1 });
// }
},
setProfit(val) {
if(val.detail!==0&&!(val.detail.toString())) {
return
}
console.log(val.detail,val)
if(val.detail-0<0 || !(val.detail-0)) {
this.setData({ distributionPrice1: 0 });
return
}
if((val.detail-0).toString().indexOf('.')!=-1&&(val.detail-0).toString().substring((val.detail-0).toString().indexOf('.')+1).length>2) {
this.setData({ distributionPrice1: (val.detail-0).toFixed(2)-0 });
return
}
this.setData({ distributionPrice1: val.detail-0 });
},
}
};
......
<view class="applySucessEntry">
<van-popup
show="true"
show="{{showPop}}"
position="center"
:close-on-click-overlay="false"
closeable
close-icon-position="top-left"
get-container='body'
bind:close="closePopuop"
>
<view class="ApplySucessEntry">
<view class="ent-top">
......@@ -13,7 +14,7 @@
<text>已成为分销商</text>
</view>
<text class="toApply">现在邀请好友购买,即可赚取奖励金</text>
<view style="width:100%;display:flex;justify-content: center;">
<view style="width:100%;display:flex;justify-content: center;" bindtap="toSpokesmanCenter">
<text class="reviwBtn">开始赚钱</text>
</view>
</view>
......
.ApplySucessEntry{
width:534rpx;
height: 642rpx;
border-radius: 6rpx;
padding-left:76rpx;
......@@ -15,7 +14,7 @@
background-size: 100% 100%;
position: relative;
}
.ApplySucessEntry .ent-top text:nth-child(1),text:nth-child(2){
.ApplySucessEntry .ent-top text:nth-child(1),.ApplySucessEntry .ent-top text:nth-child(2){
font-size:32rpx;
color:rgba(0,0,0,1);
position: absolute;
......
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