Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
dfc413f0
Commit
dfc413f0
authored
Mar 08, 2021
by
张卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成为分销成功弹框
parent
b741b17c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
205 additions
and
0 deletions
+205
-0
static/nativeComponents/ApplySucessEntry/index.js
+124
-0
static/nativeComponents/ApplySucessEntry/index.json
+7
-0
static/nativeComponents/ApplySucessEntry/index.wxml
+21
-0
static/nativeComponents/ApplySucessEntry/index.wxss
+53
-0
No files found.
static/nativeComponents/ApplySucessEntry/index.js
0 → 100644
View file @
dfc413f0
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
);
static/nativeComponents/ApplySucessEntry/index.json
0 → 100644
View file @
dfc413f0
{
"component"
:
true
,
"usingComponents"
:
{
"van-popup"
:
"/static/vant/popup/index"
}
}
\ No newline at end of file
static/nativeComponents/ApplySucessEntry/index.wxml
0 → 100644
View file @
dfc413f0
<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>
static/nativeComponents/ApplySucessEntry/index.wxss
0 → 100644
View file @
dfc413f0
.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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment