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
5a6f1118
Commit
5a6f1118
authored
Apr 01, 2021
by
张卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页自定义分享
parent
0d88fe85
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
42 deletions
+43
-42
src/pages/home/index.vue
+43
-42
No files found.
src/pages/home/index.vue
View file @
5a6f1118
...
@@ -235,6 +235,18 @@ export default {
...
@@ -235,6 +235,18 @@ export default {
})
})
//获取分销信息
//获取分销信息
this
.
getSpokesmanInit
(
options
)
this
.
getSpokesmanInit
(
options
)
}
else
{
let
footerVal
=
{...
app
.
globalData
.
footerVal
};
console
.
log
(
'"分销员中心"'
,
footerVal
)
if
(
footerVal
.
componentData
)
{
footerVal
.
componentData
.
list
.
forEach
(
res
=>
{
if
(
res
.
link
.
name
==
"分销员中心"
||
res
.
link
.
name
==
"分销商中心"
)
{
res
.
show
=
false
}
})
app
.
globalData
.
footerVal
=
footerVal
;
this
.
$mp
.
page
.
selectComponent
(
".custom-tab-bar"
).
init
();
}
}
}
// 来源
// 来源
if
(
options
.
from
==
"logout"
)
{
if
(
options
.
from
==
"logout"
)
{
...
@@ -335,18 +347,6 @@ export default {
...
@@ -335,18 +347,6 @@ export default {
this
.
$mp
.
page
.
selectComponent
(
".custom-tab-bar"
).
init
();
this
.
$mp
.
page
.
selectComponent
(
".custom-tab-bar"
).
init
();
// that.applySucessEntry = res;
// that.applySucessEntry = res;
})
})
}
else
{
let
footerVal
=
{...
app
.
globalData
.
footerVal
};
console
.
log
(
'"分销员中心"'
,
footerVal
)
if
(
footerVal
.
componentData
)
{
footerVal
.
componentData
.
list
.
forEach
(
res
=>
{
if
(
res
.
link
.
name
==
"分销员中心"
||
res
.
link
.
name
==
"分销商中心"
)
{
res
.
show
=
false
}
})
app
.
globalData
.
footerVal
=
footerVal
;
this
.
$mp
.
page
.
selectComponent
(
".custom-tab-bar"
).
init
();
}
}
}
},
},
getSpokesmanInit
(
extConfig
)
{
getSpokesmanInit
(
extConfig
)
{
...
@@ -454,38 +454,39 @@ export default {
...
@@ -454,38 +454,39 @@ export default {
});
});
}
}
},
},
onShareAppMessage
(
res
){
async
onShareAppMessage
(
res
){
app
.
fenxiaoModel
.
getSpokesmanidByShare
().
then
(
res
=>
{
console
.
log
(
res
)
let
newHref
=
'/pages/home/main'
;
let
newHref
=
'/pages/home/main'
;
if
(
res
.
hasInvitationStatus
==
1
)
{
let
title
=
app
.
globalData
.
shopInfo
.
shopName
;
newHref
=
concatUrl
(
newHref
,
res
)
await
app
.
fenxiaoModel
.
getSpokesmanidByShare
().
then
(
data
=>
{
if
(
data
.
hasInvitationStatus
==
1
)
{
newHref
=
concatUrl
(
newHref
,
data
)
}
}
let
title
=
app
.
globalData
.
shopInfo
.
shopName
;
console
.
log
(
newHref
,
3333555666
,
title
)
return
{
title
:
title
,
// 默认是小程序的名称
path
:
newHref
,
// 默认是当前页面
// imageUrl: this.shareLogoUrl,
success
:
function
(
res
)
{
// 转发成功之后的回调
if
(
res
.
errMsg
==
"shareAppMessage:ok"
)
{
console
.
log
(
res
,
"分享成功"
);
}
},
fail
:
function
()
{
// 转发失败之后的回调
if
(
res
.
errMsg
==
"shareAppMessage:fail cancel"
)
{
// 用户取消转发
console
.
log
(
res
,
"分享失败"
);
}
else
if
(
res
.
errMsg
==
"shareAppMessage:fail"
)
{
// 转发失败,其中 detail message 为详细失败信息
}
},
complete
:
function
()
{
// 转发结束之后的回调(转发成不成功都会执行)
}
};
})
})
console
.
log
(
newHref
,
3333555666
,
title
,
res
)
return
{
title
:
title
,
// 默认是小程序的名称
path
:
newHref
,
// 默认是当前页面
// imageUrl: this.shareLogoUrl,
success
:
function
(
res
)
{
// 转发成功之后的回调
if
(
res
.
errMsg
==
"shareAppMessage:ok"
)
{
console
.
log
(
res
,
"分享成功"
);
}
},
fail
:
function
()
{
// 转发失败之后的回调
if
(
res
.
errMsg
==
"shareAppMessage:fail cancel"
)
{
// 用户取消转发
console
.
log
(
res
,
"分享失败"
);
}
else
if
(
res
.
errMsg
==
"shareAppMessage:fail"
)
{
// 转发失败,其中 detail message 为详细失败信息
}
},
complete
:
function
()
{
// 转发结束之后的回调(转发成不成功都会执行)
}
};
},
},
onPullDownRefresh
(){
onPullDownRefresh
(){
console
.
log
(
'onPullDownRefresh'
,
this
.
$store
.
state
.
extConfig
)
console
.
log
(
'onPullDownRefresh'
,
this
.
$store
.
state
.
extConfig
)
...
...
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