Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
zhangwenxue
5 years ago
Commit
a35fd8b77b070108524a8a89521b9d6c45d42ed6
1 parent
5d821c8d
端口详情: 添加出售前实名认证流程
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
3 deletions
apps/pages/product/product-detail.vue
apps/pages/product/product-detail.vue
View file @
a35fd8b
...
...
@@ -223,8 +223,30 @@ export default {
loading && loading.hide();
});
},
/**
* 登录|认证
* needCert: 需要实名认证
*/
async auth(needCert = false) {
if (needCert) {
const authInfo = await this.$yoho.authRealName();
if (authInfo && authInfo.code === 403) { // 此时已经异步登录,当前页面取消业务处理
return;
}
return authInfo;
}
return this.$yoho.auth();
},
async _toggleFav(isFav) {
await this.$yoho.auth();
const userInfo = await this.auth();
if (!userInfo) {
return;
}
this.toggleFav({ productId: this.productId, isFav }).then(() => {
const txt = isFav ? '收藏成功' : '取消收藏成功';
...
...
@@ -271,7 +293,11 @@ export default {
this.showSizeSelectSheet = false;
},
async buy() {
await this.$yoho.auth();
const userInfo = await this.auth();
if (!userInfo) {
return;
}
this.selectSizeConfig = {
dest: 'OrderBuyConfirm',
...
...
@@ -284,7 +310,13 @@ export default {
this.showBuySheet = false;
},
async sell() {
await this.$yoho.auth();
// 出售需要实名认证
const userInfo = await this.auth(true);
if (!userInfo) {
return;
}
this.selectSizeConfig = {
dest: 'OrderSellConfirm',
type: 'sell',
...
...
Please
register
or
login
to post a comment