Merge branch 'master' of repo.ufutx.net:ufutx.love.mp.v2
This commit is contained in:
commit
daeaed7c3c
@ -179,45 +179,46 @@ import https from '../mixins/https'
|
|||||||
},
|
},
|
||||||
conversion(item) {
|
conversion(item) {
|
||||||
let that = this,
|
let that = this,
|
||||||
url = `${service.host}/user/recharge/v2`
|
url = `${service.host}/rank/buy`
|
||||||
that.modalName = ''
|
that.modalName = ''
|
||||||
that.$showLoading('支付中...')
|
that.$showLoading('支付中...')
|
||||||
let data = {
|
let data = {
|
||||||
sub_rank_id: that.payId,
|
sub_rank_id: that.payId,
|
||||||
chat_user_id: that.chat_user_id
|
pay_type: 'cash'
|
||||||
|
// chat_user_id: that.chat_user_id
|
||||||
}
|
}
|
||||||
that.$post({url: url, data}, {
|
that.$post({url: url, data}).then(({code, data}) => {
|
||||||
success: ({code, data}) => {
|
that.trade_no = data.order.trade_no
|
||||||
that.trade_no = data.trade_no
|
if (data.length == 0) {
|
||||||
if (data.wx_pay.length == 0) {
|
that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => {
|
||||||
that.$post({url: `${service.orderpay}/${that.trade_no}/v2`}).then(({code, data}) => {
|
|
||||||
// that.getUserData()
|
// that.getUserData()
|
||||||
that.$emit('toUpdateCut')
|
that.$emit('toUpdateCut')
|
||||||
that.$Toast_success('支付成功')
|
that.$Toast_success('支付成功')
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
let wxconfig = data.wx_pay.config
|
let wxconfig = data.config
|
||||||
if (wxconfig.payment_debug) {
|
if (wxconfig.payment_debug) {
|
||||||
return that.$post({url: `${service.orderpay}/${that.trade_no}/v2`}).then(({code, data}) => {
|
return that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => {
|
||||||
// that.getUserData()
|
// that.getUserData()
|
||||||
that.$emit('toUpdateCut')
|
that.$emit('toUpdateCut')
|
||||||
that.$Toast_success('支付成功')
|
that.$Toast_success('支付成功')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
wx.requestPayment({
|
wx.requestPayment({
|
||||||
timeStamp: wxconfig.timestamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
|
timeStamp: wxconfig.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
|
||||||
nonceStr: wxconfig.nonceStr, // 支付签名随机串,不长于 32 位
|
nonceStr: wxconfig.nonceStr, // 支付签名随机串,不长于 32 位
|
||||||
package: wxconfig.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***)
|
package: wxconfig.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***)
|
||||||
signType: wxconfig.signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
|
signType: wxconfig.signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
|
||||||
paySign: wxconfig.paySign, // 支付签名
|
paySign: wxconfig.paySign, // 支付签名
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
that.$post({url: `${service.orderpay}/${that.trade_no}/v2`}).then(({code, data}) => {
|
that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => {
|
||||||
// that.getUserData()
|
// that.getUserData()
|
||||||
that.$emit('toUpdateCut')
|
that.$emit('toUpdateCut')
|
||||||
that.$Toast_success('支付成功')
|
that.$Toast_success('支付成功')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
fail: function (res) {
|
fail: function (res) {
|
||||||
|
console.log(res, '===')
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '已取消支付',
|
title: '已取消支付',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
@ -226,14 +227,6 @@ import https from '../mixins/https'
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
|
||||||
fail: ({code, data}) => {
|
|
||||||
},
|
|
||||||
complete: () => {
|
|
||||||
setTimeout(() => {
|
|
||||||
wx.hideLoading()
|
|
||||||
}, 1200)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
gotoApp(url) {
|
gotoApp(url) {
|
||||||
|
|||||||
@ -42,6 +42,9 @@ wepy.page({
|
|||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
if (wx.getStorageSync('logoutCode')) {
|
||||||
|
return
|
||||||
|
}
|
||||||
wx.switchTab({url: `/pages/tabBar/home`})
|
wx.switchTab({url: `/pages/tabBar/home`})
|
||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
|
|||||||
@ -195,6 +195,7 @@
|
|||||||
data = {
|
data = {
|
||||||
type: 'ALLSEX',
|
type: 'ALLSEX',
|
||||||
reason: vm.value
|
reason: vm.value
|
||||||
|
// convert_marriage: 0
|
||||||
}
|
}
|
||||||
if (vm.throttling) {
|
if (vm.throttling) {
|
||||||
vm.throttling = false
|
vm.throttling = false
|
||||||
|
|||||||
@ -421,7 +421,9 @@
|
|||||||
ensureData(data) { // 保存
|
ensureData(data) { // 保存
|
||||||
this.$put({url: `${service.host}/user/base/profile`, data}).then(({code, data}) => {
|
this.$put({url: `${service.host}/user/base/profile`, data}).then(({code, data}) => {
|
||||||
console.log('参数保存成功!')
|
console.log('参数保存成功!')
|
||||||
this.$gotoBack(1)
|
wx.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -180,10 +180,10 @@
|
|||||||
this.rankList = []
|
this.rankList = []
|
||||||
this.system = app.globalData.systemInfo.system.split(' ')[0]
|
this.system = app.globalData.systemInfo.system.split(' ')[0]
|
||||||
console.log(this.system, '2224')
|
console.log(this.system, '2224')
|
||||||
if (this.system == 'iOS') {
|
// if (this.system == 'iOS') {
|
||||||
this.$redirectTo(`/pages/users/upgradeVIP2?chat_user_id=${this.chat_user_id}`)
|
// this.$redirectTo(`/pages/users/upgradeVIP2?chat_user_id=${this.chat_user_id}`)
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
// share_type
|
// share_type
|
||||||
console.log(this.system)
|
console.log(this.system)
|
||||||
this.getPageData()
|
this.getPageData()
|
||||||
@ -257,6 +257,7 @@
|
|||||||
vm.rankList.push(item)
|
vm.rankList.push(item)
|
||||||
// }
|
// }
|
||||||
})
|
})
|
||||||
|
console.log(vm.rankList, 'rankList-====')
|
||||||
if (vm.system == 'iOS') {
|
if (vm.system == 'iOS') {
|
||||||
vm.rankList = [
|
vm.rankList = [
|
||||||
{pic: 'https://images.ufutx.com/202004/11/3ccfd5478ea792e8793c7eebbf152511.png'},
|
{pic: 'https://images.ufutx.com/202004/11/3ccfd5478ea792e8793c7eebbf152511.png'},
|
||||||
@ -356,7 +357,7 @@
|
|||||||
pay_type: this.wxPayShow
|
pay_type: this.wxPayShow
|
||||||
}
|
}
|
||||||
that.$post({url: url, data}).then(({code, data}) => {
|
that.$post({url: url, data}).then(({code, data}) => {
|
||||||
that.trade_no = data.trade_no
|
that.trade_no = data.order.trade_no
|
||||||
if (data.length == 0) {
|
if (data.length == 0) {
|
||||||
that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => {
|
that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => {
|
||||||
that.getUserData()
|
that.getUserData()
|
||||||
|
|||||||
@ -52,6 +52,10 @@ const wx_login = () => {
|
|||||||
wx.setStorageSync('openid', (data.openid))
|
wx.setStorageSync('openid', (data.openid))
|
||||||
wx.setStorageSync('user_id', data.user.id) // 用户id
|
wx.setStorageSync('user_id', data.user.id) // 用户id
|
||||||
wx.setStorageSync('mobile', data.user.mobile) // 用户手机号
|
wx.setStorageSync('mobile', data.user.mobile) // 用户手机号
|
||||||
|
if (data.user.hidden_profile !== 'NONE') { // 资料是否关闭
|
||||||
|
wx.setStorageSync('logoutCode', 1)
|
||||||
|
wx.redirectTo({url: '/pages/users/logoutDefault'})
|
||||||
|
}
|
||||||
let userInfo = {
|
let userInfo = {
|
||||||
is_moment_admin: data.is_moment_admin,
|
is_moment_admin: data.is_moment_admin,
|
||||||
is_base_profile: data.is_base_profile,
|
is_base_profile: data.is_base_profile,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user