【修改】 修改secret配置

This commit is contained in:
fengachen
2022-01-19 14:52:19 +08:00
parent 4ff47a2245
commit eeb6509ceb
3 changed files with 24 additions and 19 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import {
appId,
secret
type
} from '../js/project.config'
import UserApi from '../js/http/userApi'
export function wxBind(callback) {
@@ -11,7 +11,7 @@ export function wxBind(callback) {
if (res.code && count === 1) {
let params = {
appid: appId,
secret: secret,
type: type,
js_code: res.code,
grant_type: 'authorization_code'
}
+8 -5
View File
@@ -1,14 +1,17 @@
// export const appId = 'wx322b63d1e6ff4765'
export const appId = 'wx457dfcb58fd556ea'// fcc
// export const secret = 'a3e81ffa80aa5f04d0b104b2ccda7f32'
export const secret = 'e8d2ee25e32c77561efccb7145ba9dc8' // fcc
// export const appName = '来款测试demo'
export const appName = 'zoey来款测试demo'// fcc
// export let baseUrl = 'https://bxxt.hzwlsoft.com' // 外网环境
export let baseUrl = 'http://10.10.10.46:8055/' // 测试环境
// export const baseUrl = 'http://10.0.1.16:8080' // 本地环境
// export let baseUrl = 'http://10.10.10.46:8055/' // 测试环境
export const baseUrl = 'http://10.0.1.18:8080' // 本地环境
// export const baseUrl = 'http://cwp.catarc.org.cn' // 本地环境
export const URL_CONFIG = '/jero-boot/'
// 小程序名称
export const appletName = "标准所协同工作平台"
export const appletName = "汽车标准化工作平台"
// 传 secret接口 参数 fcc - dev 客户 -- prod
export const type = 'dev'
+4 -2
View File
@@ -1,6 +1,8 @@
// pages/mine/mine.js
import UserApi from '../../assets/js/http/userApi'
import { encrypt } from '../../assets/js/jsencrypt/rsa'
import {appId,type} from "../../assets/js/project.config";
var countdown = 60; // 倒计时秒数
Page({
data: {
@@ -274,7 +276,7 @@ Page({
if (res.code) {
let params = {
appid: appId,
secret: secret,
type:type,
js_code: res.code,
grant_type: 'authorization_code'
}
@@ -282,7 +284,7 @@ Page({
if (res.success) { // 成功拿到openId
// 微信和该账号绑定
let params = {
openId: res.result.openid,
openId: encrypt(that.data.rsaPublicKey, res.result.openid),
rsaPublicKey: that.data.rsaPublicKey
}
UserApi.wxBind(params).then(res=>{})