This commit is contained in:
18631081161 2025-03-14 12:23:48 +08:00
commit 3ec9bbe9d5
2 changed files with 7 additions and 25 deletions

30
main.js
View File

@ -216,39 +216,21 @@ updateManager.onUpdateFailed(function() {
// 新版本下载失败
})
// #endif
Vue.prototype.onBridgeReady = function(data) {
var x = {
"appId": "wx2421b1c4370ec43b", //公众号ID由商户传入
"timeStamp": "1395712654", //时间戳自1970年以来的秒数
"nonceStr": "e61463f8efa94090b1f366cccfbbb444", //随机串
"package": "prepay_id=u802345jgfjsdfgsdg888",
"signType": "MD5", //微信签名方式:
"paySign": "70EA570631E4BB79628FBCA90534C63FF7FADD89" //微信签名
};
WeixinJSBridge.invoke(
'getBrandWCPayRequest', data,
function(res) {
console.log(res);
if (res.err_msg == "get_brand_wcpay_request:ok") {
// 使用以上方式判断前端返回,微信团队郑重提示:
//res.err_msg将在用户支付成功后返回ok但并不保证它绝对可靠。
}
});
}
// 测试
const baseUrl = 'http://192.168.1.56/'
const baseUrl = 'https://manghe.zpc-xy.com'
const imageUrl = 'https://mh.shhuanmeng.com';
// 正式
// const baseUrl = 'https://bajiapi.onelight.vip'
Vue.prototype.siteBaseUrl = baseUrl + '/api/'
Vue.prototype.$z_img2 = baseUrl + '/zcq/'
Vue.prototype.$z_img2 = imageUrl + '/zcq/'
Vue.prototype.$baseUrl = baseUrl
// Vue.prototype.$img = url => baseUrl + '/static/web' + url
Vue.prototype.$img = url => 'https://mh.shhuanmeng.com' + '/static/web' + url
Vue.prototype.$img = url => imageUrl + '/static/web' + url
// Vue.prototype.$img1 = url => baseUrl + '/static/web' + url
Vue.prototype.$img1 = url => 'https://mh.shhuanmeng.com' + '/static/web/static/' + url
Vue.prototype.$img1 = url => imageUrl + '/static/web/static/' + url
Vue.prototype.$sys = () => uni.getSystemInfoSync()

2
package-lock.json generated
View File

@ -1,5 +1,5 @@
{
"name": "flyx",
"name": "yfs",
"lockfileVersion": 3,
"requires": true,
"packages": {