diff --git a/api/init.js b/api/init.js index f7ae203..692a31e 100644 --- a/api/init.js +++ b/api/init.js @@ -18,6 +18,9 @@ export async function init() { export const commonType = (num) => { return http.request({ url: `/common/type/${num}`, + params:{ + type:num + } }) } diff --git a/api/video/index.js b/api/video/index.js index 68209ef..b7a4314 100644 --- a/api/video/index.js +++ b/api/video/index.js @@ -97,14 +97,16 @@ export function payOrder(data) { // #endif return http.request({ url: 'wuyou/payOrder/' + data.orderId + '?payType=' + payType, - method: 'GET' + method: 'GET', + data:data }) } //获取订单支付状态 export function getOrderInfo(data) { return http.request({ url: 'wuyou/queryOrder/' + data.orderId, - method: 'GET' + method: 'GET', + data:data }) } //金币解锁 diff --git a/commons/config.js b/commons/config.js index 9b19bd0..a2e7a3d 100644 --- a/commons/config.js +++ b/commons/config.js @@ -1,5 +1,5 @@ //打包时修改env的值即可 -const env = 'zhangsong_local' //test,production,local +const env = 'php_production' //test,production,local export const encryptKey = '1234567890123456' // http数据加解密的key @@ -10,7 +10,9 @@ export const h5Config = { test: 'https://web-api.hnsiyao.cn', // local: 'http://192.168.1.21:8100', local: 'http://192.168.1.43:1333', - zhangsong_local:'http://192.168.1.54:1024' + zhangsong_local:'http://192.168.1.54:1024', + hong:'http://192.168.1.31:8080', + php_production:'https://playlet.test.sxczgkj.com' } export const AppConfig = { @@ -18,7 +20,9 @@ export const AppConfig = { test: 'https://web-api.hnsiyao.cn', // local: 'http://192.168.1.21:8100', local: 'http://192.168.1.43:1333', - zhangsong_local:'http://192.168.1.54:1024' + zhangsong_local:'http://192.168.1.54:1024', + hong:'http://192.168.1.31:8080', + php_production:'https://playlet.test.sxczgkj.com' } export function returnShareUrl() { @@ -28,6 +32,9 @@ export function returnShareUrl() { if (env === 'production') { return 'https://dj-h5.hnsiyao.cn' } + if (env === 'php_production') { + return 'https://playlet.test.sxczgkj.com' + } if (env === 'local') { return AppConfig[env] } diff --git a/http/http.js b/http/http.js index 8053b9d..be431e2 100644 --- a/http/http.js +++ b/http/http.js @@ -76,7 +76,7 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) { // http响应码不正确 if (statusCode != 200 && statusCode != 204 && statusCode != 201) { isShowErrorToast = true; - infoBox.showToast(data.message || "服务器异常"); + infoBox.showToast(data.message||data.msg || "服务器异常"); return Promise.reject(bodyData); // 跳转到catch函数 } if (bodyData.code == 401) { @@ -118,7 +118,7 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) { if (bodyData.code != 0) { - infoBox.showToast(data.message); + infoBox.showToast(data.message||data.msg); return; }