去掉微信支付

This commit is contained in:
2024-06-19 17:29:22 +08:00
parent fc5f6415b9
commit a397fafd14
9 changed files with 73 additions and 57 deletions

View File

@@ -24,7 +24,7 @@
"type" : "uni-app:app-ios" "type" : "uni-app:app-ios"
}, },
{ {
"playground" : "standard", "playground" : "custom",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
} }
] ]

View File

@@ -150,7 +150,7 @@
.commonPage, .commonPage,
.commonPageBox { .commonPageBox {
height: 100vh; height: calc(100vh - 50px);
} }

View File

@@ -5,19 +5,19 @@ if (process.env.NODE_ENV === 'development') {
// baseUrl = "http://localhost:7001/"; // baseUrl = "http://localhost:7001/";
// socketUrl = "ws://localhost:6001/"; // socketUrl = "ws://localhost:6001/";
// baseUrl = "https://twin-ui.com/demo/"; // baseUrl = "https://twin-ui.com/demo/";
baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境 baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式 // baseUrl = "https://api.nuttyreading.com/"; // 线上正式
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑 // baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
// baseUrl = "http://59.110.212.44:9200/pb/"; // baseUrl = "http://59.110.212.44:9200/pb/";
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑 // baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
// baseUrl = "http://192.168.110.110:9200/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/"; // socketUrl = "ws://8.129.186.35:6001/";
} else if (process.env.NODE_ENV === 'production') { } else if (process.env.NODE_ENV === 'production') {
// 生产环境11 // 生产环境11
// baseUrl = "http://59.110.212.44:9100/pb/"; // baseUrl = "http://59.110.212.44:9100/pb/";
// baseUrl = "https://testapi.nuttyreading.com/"; baseUrl = "https://testapi.nuttyreading.com/";
baseUrl = "https://api.nuttyreading.com/"; //1 // baseUrl = "https://api.nuttyreading.com/"; //1
// baseUrl = "ws://twin-ui.com:6001/"; // baseUrl = "ws://twin-ui.com:6001/";
// socketUrl = "ws://twin-ui.com:6001/"; // socketUrl = "ws://twin-ui.com:6001/";
} }

View File

@@ -263,47 +263,57 @@ export const checkBookRight = function(data,callback) {
// 单独微信支付 // 单独微信支付
export const setWXPay = function(payInfo, callback) { export const setWXPay = function(payInfo, callback) {
console.log('都走这个接口', payInfo)
// payInfo = {
// "orderSn": "20240524123456789101112131415167",
// "buyOrderId": 15,
// "totalAmount": "38"
// }
$http.request({ $http.request({
url: "/pay/placeAnOrder/shoppingPay", url: "pay/placeAnOrder/shoppingPay",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档 method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data:payInfo, data: {
...payInfo,
appName: 'medicine'
},
header: { //默认 无 说明请求头1 header: { //默认 无 说明请求头1
'Content-Type': 'application/json' 'Content-Type': 'application/json'
}, },
}).then(res => { }).then(res => {
console.log(res,'resshoppingPay') console.log(res, 'resshoppingPay')
if(res.code === 0){ if (res.code === 0) {
console.log('接下来走微信接口啦')
let payData = { let payData = {
provider : 'wxpay', provider: 'wxpay',
orderInfo: { orderInfo: {
"appid": res.paramMap.appid , // 微信开放平台 - 应用 - AppId注意和微信小程序、公众号 AppId 可能不一致 "appid": res.paramMap.appid, // 微信开放平台 - 应用 - AppId注意和微信小程序、公众号 AppId 可能不一致
"noncestr": res.Map.noncestr, // 随机字符串 "noncestr": res.Map.noncestr, // 随机字符串
"package": res.Map.package, // 固定值 "package": res.Map.package, // 固定值
"partnerid": res.paramMap.mchid, // 微信支付商户号 "partnerid": res.paramMap.mchid, // 微信支付商户号
"prepayid": res.Map.prepayid, // 统一下单订单号 "prepayid": res.Map.prepayid, // 统一下单订单号
"timestamp": res.Map.timestamp, // 时间戳(单位:秒) "timestamp": res.Map.timestamp, // 时间戳(单位:秒)
"signType": "SHA256-RSA", "signType": "SHA256-RSA",
"sign": res.Map.sign "sign": res.Map.sign
}, },
success(res) { success(res) {
callback && callback({ callback && callback({
success: true, success: true,
data: res data: res
}); });
console.log('success:' + JSON.stringify(res)); console.log('success:' + JSON.stringify(res));
}, },
fail(err) { fail(err) {
callback && callback({ callback && callback({
success: false, success: false,
data: err data: err
}); });
console.log('fail:' + JSON.stringify(err)); console.log('微信错误fail:' + JSON.stringify(err));
} }
} }
// console.log(payData) // console.log(payData)
if(payData.orderInfo.prepayid != '' && payData.orderInfo.prepayid != undefined){ if (payData.orderInfo.prepayid != '' && payData.orderInfo.prepayid != undefined) {
uni.requestPayment(payData); uni.requestPayment(payData);
} }
} }
}) })

View File

@@ -8,6 +8,12 @@
"style": { "style": {
"navigationBarTitleText": "首页" "navigationBarTitleText": "首页"
} }
},{
"path": "pages/user/login",
"style": {
"navigationBarTitleText": "登录",
"enablePullDownRefresh": false // 禁止下拉刷新
}
}, },
{ {
"path": "pages/mine/vip/index", "path": "pages/mine/vip/index",
@@ -102,13 +108,7 @@
"navigationBarTitleText": "注册" "navigationBarTitleText": "注册"
} }
}, },
{
"path": "pages/user/login",
"style": {
"navigationBarTitleText": "登录",
"enablePullDownRefresh": false // 禁止下拉刷新
}
},
{ {
"path": "pages/user/healthLog", "path": "pages/user/healthLog",
"style": { "style": {

View File

@@ -1,6 +1,7 @@
<template> <template>
<view <view
class="container commonPageBox commonDetailPage" style="background-color: #f6f7fb" class="container commonPageBox commonDetailPage"
style="background-color: #f6f7fb"
> >
<!-- 公共组件-每个页面必须引入 --> <!-- 公共组件-每个页面必须引入 -->
<public-module></public-module> <public-module></public-module>
@@ -1580,4 +1581,9 @@ export default {
color: #9b9b9b; color: #9b9b9b;
font-size: 26rpx; font-size: 26rpx;
} }
/deep/.commonDetailPage{
.uni-app--showtabbar uni-page-wrapper::after {
height: 0 !important;
}
}
</style> </style>

View File

@@ -165,9 +165,9 @@
<text class="total">{{ dataInfo.lastFee }}</text> <text class="total">{{ dataInfo.lastFee }}</text>
</text> </text>
<text style="color: #333; margin-left: 10rpx" <!-- <text style="color: #333; margin-left: 10rpx"
>原价{{ dataInfo.fee }}</text >原价{{ dataInfo.fee }}</text
> > -->
</view> </view>
</template> </template>
</common-goods-nav> </common-goods-nav>
@@ -240,12 +240,12 @@ export default {
type: 2, type: 2,
value: "0", value: "0",
}, },
{ // {
text: "微信", // text: "微信",
imgUrl: require("@/static/icon/pay_2.png"), // imgUrl: require("@/static/icon/pay_2.png"),
type: 1, // type: 1,
value: "1", // value: "1",
}, // },
{ {
text: "天医币", text: "天医币",
imgUrl: require("@/static/icon/pay_3.png"), imgUrl: require("@/static/icon/pay_3.png"),
@@ -560,7 +560,7 @@ export default {
let data = { let data = {
paymentMethod: this.payType, //1微信2支付宝3苹果支付4虚拟币 paymentMethod: this.payType, //1微信2支付宝3苹果支付4虚拟币
orderMoney: this.dataInfo.fee, //订单金额 orderMoney: this.dataInfo.lastFee, //订单金额
realMoney: this.dataInfo.lastFee, //实际金额 realMoney: this.dataInfo.lastFee, //实际金额
shippingMoney: 0, //运费 shippingMoney: 0, //运费
jfDeduction: 0, //积分抵扣 jfDeduction: 0, //积分抵扣

BIN
static/customicons.ttf Normal file

Binary file not shown.

Binary file not shown.