Commit dfc413f0 by 张卓

成为分销成功弹框

parent b741b17c
let app = getApp()
const { spokesmanApi, DFSImg, $themeToLink } = app;
const componentOptions = {
// 组件选项
options: {
multipleSlots: true
},
behaviors: [],
properties: {},
// 组件数据
data: {
isPageHidden: false,
showPop: false,
showSetMoreDiscountPrice: false,
distributionPrice1: 0,
showBaiFen: false,
},
// 数据监听器
observers: {},
// 组件生命周期
lifetimes: {
created() {},
ready() {
},
moved() {},
detached() {}
},
attached() {
},
definitionFilter() {},
onPageScroll() {
// console.log(e,444444444444);
},
// 页面生命周期
pageLifetimes: {
// 页面被展示
show() {
},
// 页面被隐藏
hide() {
},
// 页面尺寸变化时
resize() {}
},
// 组件方法
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() {
this.setData({ showPop: false });
},
closePopuop2() {
this.setData({ showSetMoreDiscountPrice: false });
},
initShopDetail() {
let linkVal = '/personalCenter/spokesmanCenter/mine/spokesmanHomePage?fromSpokesmanCenter=1'
$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 });
},
}
};
Component(componentOptions);
{
"component": true,
"usingComponents": {
"van-popup":"/static/vant/popup/index"
}
}
\ No newline at end of file
<view class="applySucessEntry">
<van-popup
show="true"
position="center"
:close-on-click-overlay="false"
closeable
close-icon-position="top-left"
get-container='body'
>
<view class="ApplySucessEntry">
<view class="ent-top">
<text>恭喜您</text>
<text>已成为分销商</text>
</view>
<text class="toApply">现在邀请好友购买,即可赚取奖励金</text>
<view style="width:100%;display:flex;justify-content: center;">
<text class="reviwBtn">开始赚钱</text>
</view>
</view>
</van-popup>
</view>
.ApplySucessEntry{
width:534rpx;
height: 642rpx;
border-radius: 6rpx;
padding-left:76rpx;
padding-right:76rpx;
background: #fff;
border-radius:20rpx;
}
.ApplySucessEntry .ent-top{
width: 220rpx;
height: 438rpx;
margin:0 auto;
background: url('https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/product/PY6HFce42i.png') no-repeat;
background-size: 100% 100%;
position: relative;
}
.ApplySucessEntry .ent-top text:nth-child(1),text:nth-child(2){
font-size:32rpx;
color:rgba(0,0,0,1);
position: absolute;
bottom:80rpx;
text-align: center;
left:50%;
transform: translateX(-50%);
}
.ApplySucessEntry .ent-top text:nth-child(2){
font-size:30rpx;
font-weight:bold;
color:rgba(0,0,0,1);
position: absolute;
bottom:32rpx;
width:400rpx;
}
.ApplySucessEntry .toApply{
color:rgba(0,0,0,1);
font-size: 24rpx;
margin-bottom: 40rpx;
font-weight: 400;
}
.ApplySucessEntry .reviwBtn{
width: 400rpx;
height: 88rpx;
background:#CE1340;
border-radius: 50rpx;
font-size:28rpx;
color:#fff;
margin-top:20rpx;
display: flex;
justify-content: center;
align-items: center;
}
\ No newline at end of file
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