修复部分问题
This commit is contained in:
@@ -18,6 +18,9 @@ export async function init() {
|
|||||||
export const commonType = (num) => {
|
export const commonType = (num) => {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: `/common/type/${num}`,
|
url: `/common/type/${num}`,
|
||||||
|
params:{
|
||||||
|
type:num
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,14 +97,16 @@ export function payOrder(data) {
|
|||||||
// #endif
|
// #endif
|
||||||
return http.request({
|
return http.request({
|
||||||
url: 'wuyou/payOrder/' + data.orderId + '?payType=' + payType,
|
url: 'wuyou/payOrder/' + data.orderId + '?payType=' + payType,
|
||||||
method: 'GET'
|
method: 'GET',
|
||||||
|
data:data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//获取订单支付状态
|
//获取订单支付状态
|
||||||
export function getOrderInfo(data) {
|
export function getOrderInfo(data) {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: 'wuyou/queryOrder/' + data.orderId,
|
url: 'wuyou/queryOrder/' + data.orderId,
|
||||||
method: 'GET'
|
method: 'GET',
|
||||||
|
data:data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//金币解锁
|
//金币解锁
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//打包时修改env的值即可
|
//打包时修改env的值即可
|
||||||
const env = 'zhangsong_local' //test,production,local
|
const env = 'php_production' //test,production,local
|
||||||
|
|
||||||
export const encryptKey = '1234567890123456' // http数据加解密的key
|
export const encryptKey = '1234567890123456' // http数据加解密的key
|
||||||
|
|
||||||
@@ -10,7 +10,9 @@ export const h5Config = {
|
|||||||
test: 'https://web-api.hnsiyao.cn',
|
test: 'https://web-api.hnsiyao.cn',
|
||||||
// local: 'http://192.168.1.21:8100',
|
// local: 'http://192.168.1.21:8100',
|
||||||
local: 'http://192.168.1.43:1333',
|
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 = {
|
export const AppConfig = {
|
||||||
@@ -18,7 +20,9 @@ export const AppConfig = {
|
|||||||
test: 'https://web-api.hnsiyao.cn',
|
test: 'https://web-api.hnsiyao.cn',
|
||||||
// local: 'http://192.168.1.21:8100',
|
// local: 'http://192.168.1.21:8100',
|
||||||
local: 'http://192.168.1.43:1333',
|
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() {
|
export function returnShareUrl() {
|
||||||
@@ -28,6 +32,9 @@ export function returnShareUrl() {
|
|||||||
if (env === 'production') {
|
if (env === 'production') {
|
||||||
return 'https://dj-h5.hnsiyao.cn'
|
return 'https://dj-h5.hnsiyao.cn'
|
||||||
}
|
}
|
||||||
|
if (env === 'php_production') {
|
||||||
|
return 'https://playlet.test.sxczgkj.com'
|
||||||
|
}
|
||||||
if (env === 'local') {
|
if (env === 'local') {
|
||||||
return AppConfig[env]
|
return AppConfig[env]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
|
|||||||
// http响应码不正确
|
// http响应码不正确
|
||||||
if (statusCode != 200 && statusCode != 204 && statusCode != 201) {
|
if (statusCode != 200 && statusCode != 204 && statusCode != 201) {
|
||||||
isShowErrorToast = true;
|
isShowErrorToast = true;
|
||||||
infoBox.showToast(data.message || "服务器异常");
|
infoBox.showToast(data.message||data.msg || "服务器异常");
|
||||||
return Promise.reject(bodyData); // 跳转到catch函数
|
return Promise.reject(bodyData); // 跳转到catch函数
|
||||||
}
|
}
|
||||||
if (bodyData.code == 401) {
|
if (bodyData.code == 401) {
|
||||||
@@ -118,7 +118,7 @@ function commonsProcess(showLoading, httpReqCallback, isreturm) {
|
|||||||
|
|
||||||
|
|
||||||
if (bodyData.code != 0) {
|
if (bodyData.code != 0) {
|
||||||
infoBox.showToast(data.message);
|
infoBox.showToast(data.message||data.msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user