Commit 0658fa3d authored by 罗林杰's avatar 罗林杰

修改实名认证

parent 606e9857
......@@ -146,6 +146,13 @@
const memInfo = res.data.data
if (memInfo.memNickName != null && memInfo.memNickName != '' && memInfo.memBirthday != null && memInfo.memMaxEducation != null
&& memInfo.memCareer != '' && memInfo.memCareer != null && memInfo.memResidenceProvince != null && memInfo.memResidenceCity != null){
if (uni.getStorageSync('userInfo').memRealAuthen != '1'){
uni.showToast({
title: '请先实名认证',
icon: 'none'
})
return
}
//已完善个人资料 可以发布动态
uni.navigateTo({
url: '/pagesArticle/publishArticle?topicId='+this.topicId
......
......@@ -207,6 +207,13 @@
url: "/pageslogin/index"
})
}else {
if (uni.getStorageSync('userInfo').memRealAuthen != '1'){
uni.showToast({
title: '请先实名认证',
icon: 'none'
})
return
}
uni.navigateTo({
url: '/pagesUser/userInfo?memberId='+item.businessId
})
......
......@@ -207,6 +207,13 @@ export default {
},
//跳转用户详情
gotoDetail(item){
if (uni.getStorageSync('userInfo').memRealAuthen != '1'){
uni.showToast({
title: '请先认证',
icon: 'none'
})
return
}
uni.navigateTo({
url: '/pagesUser/userInfo?memberId='+item.businessId
})
......
......@@ -109,6 +109,13 @@ import {activityDetail, addApplication, isApplication, pay} from "../api/activit
const token = uni.getStorageSync('token')
//校验token 如果没有token,跳到登录页进行登录
if (token && token !== '' && token != null){
if (uni.getStorageSync('userInfo').memRealAuthen != '1'){
uni.showToast({
title: '请先实名认证',
icon: 'none'
})
return
}
this.show = true
this.countprice()
} else {
......@@ -138,68 +145,75 @@ import {activityDetail, addApplication, isApplication, pay} from "../api/activit
const activityId = this.activityId
const orderId = res.data.data.businessId
// 支付
if (res.data.data.price != 0){
const payquery = {
orderId: orderId,
activityId: this.activityId,
type:'0'
}
pay(payquery).then(res => {
console.log("支付参数", res)
console.log("测试支付", res.data.errMsg)
if (res.data.errMsg === 'OK') {
if (!res.data.data.nonceStr) {
uni.showToast({
title: '下单失败,请稍后重试',
icon: 'none'
})
} else {
// 调取微信支付窗口
uni.requestPayment({
provider: "wxpay",
appId: res.data.appid, // 微信小程序appid
timeStamp: res.data.timeStamp, // 时间戳
nonceStr: res.data.nonceStr, // 随机字符串
package: res.data.package,
signType: "MD5", // 签名算法
paySign: res.data.paySign, // 签名
success(res) {
uni.showToast({
title: '支付成功',
icon: 'success'
})
this.show = false
uni.navigateTo({
url:'/my/myorder/index'
})
},
fail(e) {
console.log("支付失败", e)
uni.showToast({
title: '支付已取消',
icon: 'none'
})
const orderStatus = {
orderId: orderId,
activityId: activityId
}
}
});
}
} else {
uni.showToast({
title: '下单失败',
icon: 'none'
})
}
})
} else {
uni.showToast({
title: '报名成功!',
icon: 'none'
})
this.getUserInfo()
}
// if (res.data.data.price != 0){
// const payquery = {
// orderId: orderId,
// activityId: this.activityId,
// type:'0'
// }
// pay(payquery).then(res => {
// console.log("支付参数", res)
// console.log("测试支付", res.data.errMsg)
// if (res.data.errMsg === 'OK') {
// if (!res.data.data.nonceStr) {
// uni.showToast({
// title: '下单失败,请稍后重试',
// icon: 'none'
// })
// } else {
// // 调取微信支付窗口
// uni.requestPayment({
// provider: "wxpay",
// appId: res.data.appid, // 微信小程序appid
// timeStamp: res.data.timeStamp, // 时间戳
// nonceStr: res.data.nonceStr, // 随机字符串
// package: res.data.package,
// signType: "MD5", // 签名算法
// paySign: res.data.paySign, // 签名
// success(res) {
// uni.showToast({
// title: '支付成功',
// icon: 'success'
// })
// this.show = false
// uni.navigateTo({
// url:'/my/myorder/index'
// })
// },
// fail(e) {
// console.log("支付失败", e)
// uni.showToast({
// title: '支付已取消',
// icon: 'none'
// })
// const orderStatus = {
// orderId: orderId,
// activityId: activityId
// }
// }
// });
// }
// } else {
// uni.showToast({
// title: '下单失败',
// icon: 'none'
// })
// }
// })
// } else {
// uni.showToast({
// title: '报名成功!',
// icon: 'none'
// })
// this.show = false
// this.getUserInfo()
// }
uni.showToast({
title: '报名成功!',
icon: 'none'
})
this.show = false
this.getUserInfo()
} else if(res.data.code !== 200){
uni.showToast({
title: res.data.message,
......
......@@ -225,6 +225,13 @@ export default{
url: "/pageslogin/index"
})
} else {
if (uni.getStorageSync('userInfo').memRealAuthen != '1'){
uni.showToast({
title: '请先实名认证',
icon: 'none'
})
return
}
this.commentValue = ''
const params = {
articleId: this.articleInfo.businessId,//动态id
......
......@@ -142,6 +142,13 @@ export default {
},
//跳转用户详情
gotoDetail(item){
if (uni.getStorageSync('userInfo').memRealAuthen != '1'){
uni.showToast({
title: '请先认证',
icon: 'none'
})
return
}
uni.navigateTo({
url: '/pagesUser/userInfo?memberId='+item.businessId
})
......
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