Commit a3a7add6 authored by mengcuiguang's avatar mengcuiguang

支付接口调试完成

parent dc424f15
......@@ -29,25 +29,6 @@
// #endif
try {
let value = uni.getStorageSync('token') || '';
// if (options.query.token) {
// if (value !== options.query.token) {
// value = '';
// } else {
// value = options.query.token;
// }
// uni.setStorage({
// key: 'token',
// data: value
// });
// }
// if (options.query.token) {
// value = options.query.token;
// uni.setStorage({
// key: 'token',
// data: value
// });
// }
let inviteUId = uni.getStorageSync('inviteUId') || '';
if (!inviteUId && options.query.inviteUId) {
......@@ -145,8 +126,8 @@
auth: false, // 三要素实名认证
userInfo: null,
cardInfo: null,
// pkgName: 'com.mints.quickscanmax'
pkgName: 'com.mints.helivideo'
pkgName: 'com.mints.quickscanmax'
// pkgName: 'com.mints.helivideo'
}
};
</script>
......
......@@ -146,8 +146,8 @@ export default {
let requestTask;
Object.assign(header, {
// token: app.globalData.token,
token: '393068DF9283B935CC4C37D9ABEF88F39D63941D16243ACA30B04FE7A3F7F2EB5F433703067DF5142735505C42F58997',
token: app.globalData.token,
// token: '393068DF9283B935CC4C37D9ABEF88F39D63941D16243ACA30B04FE7A3F7F2EB5F433703067DF5142735505C42F58997',
pkgName: app.globalData.pkgName
})
......
......@@ -8,14 +8,14 @@
}
},
"pages": [
// {
// "path": "pages/loading",
// "style": {
// "navigationStyle": "custom",
// "navigationBarBackgroundColor": "#ffffff",
// "navigationBarTextStyle": "black" //用于配置状态栏的字体颜色
// }
// },
{
"path": "pages/loading",
"style": {
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black" //用于配置状态栏的字体颜色
}
},
{
"path": "pages/index/index",
"style": {
......
......@@ -83,7 +83,7 @@
console.log('my.getAuthCode=',res.authCode);
that.post({
url: '/user/wechatlogin',
url: '/user/alipayLogin',
data: {
channel: channel,
clueToken: clueToken,
......@@ -98,10 +98,15 @@
success: ({
data
}) => {
uni.setStorage({
key: 'token',
data: data.token
});
app.globalData.token = data.token;
app.globalData.userId = data.pk_id;
app.globalData.userInfo = data;
redirectTo('home');
uni.switchTab({
url: '/pages/index/index'
});
}
});
},
......
......@@ -117,7 +117,7 @@
alipay(data) {
my.tradePay({
// 调用统一收单交易创建接口(alipay.trade.create),获得返回字段支付宝交易号 trade_no
tradeNO: '201711152100110410533667792',
tradeNO: data.params.params,
success: res => {
message.notify('支付成功');
setTimeout(() => {
......
......@@ -36,7 +36,8 @@
return {
windowWidth: '',
windowHeight: '',
imgUri: '',
imgUri: '',
userBean: {},
type: ''
};
},
......@@ -59,6 +60,17 @@
this.type = 'fanyi'
}
},
onShow(){
this.post({
url: '/user/baseMsg',
showLoading: false,
success: ({
data
}) => {
this.userBean = data;
}
});
},
methods: {
compress() {
......@@ -72,8 +84,14 @@
}
})
},
clickOcr() {
this.compress()
clickOcr() {
if(this.userBean.expireTime<=0){
//开通VIP会员
navigateTo(`/pagesA/vipPay/vipPay`)
}else{
this.compress()
}
},
ocr(imgUrl) {
if (this.type == ScanTypeBean.zh) {
......@@ -131,8 +149,8 @@
filePath: tempFilePath,
header: {
pkgname: app.globalData.pkgName,
// token: app.globalData.token
token: '393068DF9283B935CC4C37D9ABEF88F39D63941D16243ACA30B04FE7A3F7F2EB5F433703067DF5142735505C42F58997'
token: app.globalData.token
// token: '393068DF9283B935CC4C37D9ABEF88F39D63941D16243ACA30B04FE7A3F7F2EB5F433703067DF5142735505C42F58997'
},
name: 'file',
formData: {
......
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