Browse Source

支付请求一遍userinfo

master
jiazhipeng 8 months ago
parent
commit
d565630f95
  1. 2
      app.js
  2. 12
      pages/order/pay/index.js
  3. 7
      project.private.config.json

2
app.js

@ -38,7 +38,7 @@ App({
// 获取前端配置文件 // 获取前端配置文件
commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => { commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => {
let data = JSON.parse(res.data); let data = JSON.parse(res.data);
data.isTest = data.isTest112? true : false; data.isTest = data.isTest113? true : false;
data.indexSeason = null data.indexSeason = null
this.globalData.configJson = data this.globalData.configJson = data
}).then(() => { }).then(() => {

12
pages/order/pay/index.js

@ -64,8 +64,20 @@ Page({
this.setData({ this.setData({
id:options.id id:options.id
}) })
this.getUserInfo()
}, },
getUserInfo () {
commonApi.user_post("uservice/user/getMyInfo",{}).then(res => {
if (res && res.data) {
wx.setStorageSync('jstrip_userid', res.data.id)
wx.setStorageSync('jstrip_token', res.data.token)
wx.setStorageSync('jstrip_userInfo', res.data)
}
})
},
daojishi:function(time){ daojishi:function(time){
let now = new Date().getTime(); let now = new Date().getTime();
if(now>time){ if(now>time){

7
project.private.config.json

@ -6,6 +6,13 @@
"condition": { "condition": {
"miniprogram": { "miniprogram": {
"list": [ "list": [
{
"name": "pages/order/pay/index",
"pathName": "pages/order/pay/index",
"query": "id=28182508211650158717&token=de4306f5-7f80-4a0f-a7ae-af63cf089fa4",
"launchMode": "default",
"scene": null
},
{ {
"name": "pages/pbService/web/index", "name": "pages/pbService/web/index",
"pathName": "pages/pbService/web/index", "pathName": "pages/pbService/web/index",

Loading…
Cancel
Save