Commit 247e6d5a by 张卓

成为分销成功弹框

parent dfc413f0
...@@ -21,5 +21,9 @@ export default { ...@@ -21,5 +21,9 @@ export default {
getDistributorHomepage(data) { getDistributorHomepage(data) {
return requestPOST(`${process.env.OLSHOP_URL}/distributorHomepageInfo/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 @@ ...@@ -93,6 +93,7 @@
<share-popup></share-popup> <share-popup></share-popup>
<my-card></my-card> <my-card></my-card>
<set-my-homepage></set-my-homepage> <set-my-homepage></set-my-homepage>
<apply-sucess-entry></apply-sucess-entry>
</div> </div>
</template> </template>
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
"live-broadcast":"/static/nativeComponents/LiveBroadcast/index", "live-broadcast":"/static/nativeComponents/LiveBroadcast/index",
"my-card":"/static/nativeComponents/MyCard/index", "my-card":"/static/nativeComponents/MyCard/index",
"get-index-homepage":"/static/nativeComponents/GetIndexHomePage/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, "enablePullDownRefresh":true,
"backgroundColor":"#f5f5f5" "backgroundColor":"#f5f5f5"
......
...@@ -10,10 +10,7 @@ const componentOptions = { ...@@ -10,10 +10,7 @@ const componentOptions = {
// 组件数据 // 组件数据
data: { data: {
isPageHidden: false, isPageHidden: false,
showPop: false, showPop: true,
showSetMoreDiscountPrice: false,
distributionPrice1: 0,
showBaiFen: false,
}, },
// 数据监听器 // 数据监听器
observers: {}, observers: {},
...@@ -48,74 +45,21 @@ const componentOptions = { ...@@ -48,74 +45,21 @@ const componentOptions = {
}, },
// 组件方法 // 组件方法
methods: { methods: {
toMyBusinessCard() { closePopuop() {
// 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() {
this.setData({ showPop: false }); this.setData({ showPop: false });
}, },
closePopuop2() { toSpokesmanCenter() {
this.setData({ showSetMoreDiscountPrice: false }); let linkVal = '/personalCenter/spokesmanCenter'
}, spokesmanApi.apply_for_withdraw({type:'applyRemindFlag'}).then(res => {
initShopDetail() { if (res.code == "200") {
let linkVal = '/personalCenter/spokesmanCenter/mine/spokesmanHomePage?fromSpokesmanCenter=1' console.log(res,9999)
}
});
$themeToLink({ $themeToLink({
type: 1, type: 1,
link:linkVal, 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"> <view class="applySucessEntry">
<van-popup <van-popup
show="true" show="{{showPop}}"
position="center" position="center"
:close-on-click-overlay="false" :close-on-click-overlay="false"
closeable closeable
close-icon-position="top-left" close-icon-position="top-left"
get-container='body' get-container='body'
bind:close="closePopuop"
> >
<view class="ApplySucessEntry"> <view class="ApplySucessEntry">
<view class="ent-top"> <view class="ent-top">
...@@ -13,7 +14,7 @@ ...@@ -13,7 +14,7 @@
<text>已成为分销商</text> <text>已成为分销商</text>
</view> </view>
<text class="toApply">现在邀请好友购买,即可赚取奖励金</text> <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> <text class="reviwBtn">开始赚钱</text>
</view> </view>
</view> </view>
......
.ApplySucessEntry{ .ApplySucessEntry{
width:534rpx;
height: 642rpx; height: 642rpx;
border-radius: 6rpx; border-radius: 6rpx;
padding-left:76rpx; padding-left:76rpx;
...@@ -15,7 +14,7 @@ ...@@ -15,7 +14,7 @@
background-size: 100% 100%; background-size: 100% 100%;
position: relative; 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; font-size:32rpx;
color:rgba(0,0,0,1); color:rgba(0,0,0,1);
position: absolute; 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