diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index f81d5f4..dd7ee12 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -24,7 +24,7 @@ "type" : "uni-app:app-ios" }, { - "playground" : "standard", + "playground" : "custom", "type" : "uni-app:app-android" } ] diff --git a/App.vue b/App.vue index 21dc623..d405e0a 100644 --- a/App.vue +++ b/App.vue @@ -150,7 +150,7 @@ .commonPage, .commonPageBox { - height: 100vh; + height: calc(100vh - 50px); } diff --git a/config/baseUrl.js b/config/baseUrl.js index 548f755..dda5358 100644 --- a/config/baseUrl.js +++ b/config/baseUrl.js @@ -5,19 +5,19 @@ if (process.env.NODE_ENV === 'development') { // baseUrl = "http://localhost:7001/"; // socketUrl = "ws://localhost:6001/"; // baseUrl = "https://twin-ui.com/demo/"; - baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境 - // baseUrl = "https://api.nuttyreading.com/"; // 线上正式 - // baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑 + baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境 + // baseUrl = "https://api.nuttyreading.com/"; // 线上正式 + // baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑 // baseUrl = "http://59.110.212.44:9200/pb/"; // baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑 // baseUrl = "http://192.168.110.110:9200/pb/"; - // baseUrl = "http://192.168.110.38:9200/pb/"; // 吴春磊笔记本1 + // baseUrl = "http://192.168.110.38:9200/pb/"; // 吴春磊笔记本1 // socketUrl = "ws://8.129.186.35:6001/"; } else if (process.env.NODE_ENV === 'production') { // 生产环境11 // baseUrl = "http://59.110.212.44:9100/pb/"; - // baseUrl = "https://testapi.nuttyreading.com/"; - baseUrl = "https://api.nuttyreading.com/"; //1 + baseUrl = "https://testapi.nuttyreading.com/"; + // baseUrl = "https://api.nuttyreading.com/"; //1 // baseUrl = "ws://twin-ui.com:6001/"; // socketUrl = "ws://twin-ui.com:6001/"; } @@ -60,4 +60,4 @@ export default Object.assign({ phoneRegular, mailRegular, passwordRegular -}, courtConfig); +}, courtConfig); \ No newline at end of file diff --git a/config/utils.js b/config/utils.js index 59ed9c1..a715cec 100644 --- a/config/utils.js +++ b/config/utils.js @@ -263,47 +263,57 @@ export const checkBookRight = function(data,callback) { // 单独微信支付 export const setWXPay = function(payInfo, callback) { + console.log('都走这个接口', payInfo) + // payInfo = { + // "orderSn": "20240524123456789101112131415167", + // "buyOrderId": 15, + // "totalAmount": "38" + // } $http.request({ - url: "/pay/placeAnOrder/shoppingPay", + url: "pay/placeAnOrder/shoppingPay", method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 - data:payInfo, + data: { + ...payInfo, + appName: 'medicine' + }, header: { //默认 无 说明:请求头1 'Content-Type': 'application/json' }, }).then(res => { - console.log(res,'resshoppingPay') - if(res.code === 0){ + console.log(res, 'resshoppingPay') + if (res.code === 0) { + console.log('接下来走微信接口啦') let payData = { - provider : 'wxpay', + provider: 'wxpay', orderInfo: { - "appid": res.paramMap.appid , // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致 - "noncestr": res.Map.noncestr, // 随机字符串 - "package": res.Map.package, // 固定值 - "partnerid": res.paramMap.mchid, // 微信支付商户号 - "prepayid": res.Map.prepayid, // 统一下单订单号 - "timestamp": res.Map.timestamp, // 时间戳(单位:秒) - "signType": "SHA256-RSA", - "sign": res.Map.sign - }, - success(res) { - callback && callback({ - success: true, - data: res - }); - console.log('success:' + JSON.stringify(res)); - }, - fail(err) { - callback && callback({ - success: false, - data: err - }); - console.log('fail:' + JSON.stringify(err)); - - } + "appid": res.paramMap.appid, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致 + "noncestr": res.Map.noncestr, // 随机字符串 + "package": res.Map.package, // 固定值 + "partnerid": res.paramMap.mchid, // 微信支付商户号 + "prepayid": res.Map.prepayid, // 统一下单订单号 + "timestamp": res.Map.timestamp, // 时间戳(单位:秒) + "signType": "SHA256-RSA", + "sign": res.Map.sign + }, + success(res) { + callback && callback({ + success: true, + data: res + }); + console.log('success:' + JSON.stringify(res)); + }, + fail(err) { + callback && callback({ + success: false, + data: err + }); + console.log('微信错误fail:' + JSON.stringify(err)); + + } } // console.log(payData) - if(payData.orderInfo.prepayid != '' && payData.orderInfo.prepayid != undefined){ - uni.requestPayment(payData); + if (payData.orderInfo.prepayid != '' && payData.orderInfo.prepayid != undefined) { + uni.requestPayment(payData); } } }) diff --git a/pages.json b/pages.json index 0db91c8..7074500 100644 --- a/pages.json +++ b/pages.json @@ -8,6 +8,12 @@ "style": { "navigationBarTitleText": "首页" } + },{ + "path": "pages/user/login", + "style": { + "navigationBarTitleText": "登录", + "enablePullDownRefresh": false // 禁止下拉刷新 + } }, { "path": "pages/mine/vip/index", @@ -102,13 +108,7 @@ "navigationBarTitleText": "注册" } }, - { - "path": "pages/user/login", - "style": { - "navigationBarTitleText": "登录", - "enablePullDownRefresh": false // 禁止下拉刷新 - } - }, + { "path": "pages/user/healthLog", "style": { diff --git a/pages/bookShop/orderList.vue b/pages/bookShop/orderList.vue index 9e959f3..2b647ea 100644 --- a/pages/bookShop/orderList.vue +++ b/pages/bookShop/orderList.vue @@ -1,6 +1,7 @@ @@ -240,12 +240,12 @@ export default { type: 2, value: "0", }, - { - text: "微信", - imgUrl: require("@/static/icon/pay_2.png"), - type: 1, - value: "1", - }, + // { + // text: "微信", + // imgUrl: require("@/static/icon/pay_2.png"), + // type: 1, + // value: "1", + // }, { text: "天医币", imgUrl: require("@/static/icon/pay_3.png"), @@ -560,7 +560,7 @@ export default { let data = { paymentMethod: this.payType, //1微信2支付宝3苹果支付4虚拟币 - orderMoney: this.dataInfo.fee, //订单金额 + orderMoney: this.dataInfo.lastFee, //订单金额 realMoney: this.dataInfo.lastFee, //实际金额 shippingMoney: 0, //运费 jfDeduction: 0, //积分抵扣 diff --git a/static/customicons.ttf b/static/customicons.ttf new file mode 100644 index 0000000..a3c8ab9 Binary files /dev/null and b/static/customicons.ttf differ diff --git a/unpackage/debug/android_debug.apk b/unpackage/debug/android_debug.apk index f607d2d..35aa471 100644 Binary files a/unpackage/debug/android_debug.apk and b/unpackage/debug/android_debug.apk differ