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
247e6d5a
Commit
247e6d5a
authored
Mar 11, 2021
by
张卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成为分销成功弹框
parent
dfc413f0
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
70 deletions
+20
-70
src/api/spokesman.js
+4
-0
src/pages/home/index.vue
+1
-0
src/pages/home/main.json
+2
-1
static/nativeComponents/ApplySucessEntry/index.js
+9
-65
static/nativeComponents/ApplySucessEntry/index.wxml
+3
-2
static/nativeComponents/ApplySucessEntry/index.wxss
+1
-2
No files found.
src/api/spokesman.js
View file @
247e6d5a
...
@@ -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
})
},
}
}
src/pages/home/index.vue
View file @
247e6d5a
...
@@ -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
>
...
...
src/pages/home/main.json
View file @
247e6d5a
...
@@ -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"
...
...
static/nativeComponents/ApplySucessEntry/index.js
View file @
247e6d5a
...
@@ -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
});
},
}
}
};
};
...
...
static/nativeComponents/ApplySucessEntry/index.wxml
View file @
247e6d5a
<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>
...
...
static/nativeComponents/ApplySucessEntry/index.wxss
View file @
247e6d5a
.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;
...
...
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