Commit 1c25b1a0 by 前端

Merge branch 'develop' into 'master'

Develop

See merge request !26
2 parents e19534fd 88252bf1
......@@ -9,6 +9,7 @@
* 1开发
* 2测试
* 3生产环境
* 4预发布
*/
let index = 2
......@@ -43,7 +44,8 @@ export const envIndex = index
const createOrderPosterImgUrl = {
develop: `http://192.168.1.178:9528/dj-scrm-wx-work-main-zhangls/#/orderDetailPoster?`,
trial: `http://frontend.test.glsx.com.cn/dj-car-boutique-work-wechat/#/orderDetailPoster?`,
release: `https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/orderDetailPoster?`
release: `https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/orderDetailPoster?`,
preRelease: `https://dj.beta.glsx.com.cn/dj-car-boutique-work-wechat/#/orderDetailPoster?`
}
const target = ['ip', 'develop', 'trial', 'release', 'preRelease']
// 订单详情地址
......
......@@ -58,7 +58,11 @@ const secretKey_items = {
prod: {
appKey: 'd7ffc3346fc9a45bccaaa35300d59022',
secret: '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353'
}
},
preRelease: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
},
}
const domain_items = {
// ip: 'http://192.168.2.59:8292',
......@@ -66,9 +70,10 @@ const domain_items = {
// ip: 'http://192.168.2.3:8292',
dev: 'https://dj.dev.glsx.com.cn',
uat: 'https://dj.test.glsx.com.cn',
prod: 'https://dj.glsx.com.cn'
prod: 'https://dj.glsx.com.cn',
preRelease: 'https://dj.beta.glsx.com.cn'
}
const target = ['ip', 'dev', 'uat', 'prod']
const target = ['ip', 'dev', 'uat', 'prod', 'preRelease']
// console.log(domain_items[target[index]]);
module.exports = {
domain: domain_items[target[index]],
......
......@@ -12,11 +12,13 @@ Page({
data: {
authToast: false, // 是否显示授权提示框
authType: true, // 授权类型(true:授权用户信息;false:授权手机号)
payFail: false,
sceneId: '',
ajaxing: false,
paySuccess: false,
posterUrl: '',
sceneType: true //默认是1.1的支付场景
sceneType: true, //默认是1.1的支付场景
miniProgramParams: {}
},
onLogin() {
......@@ -31,6 +33,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options, 'options')
wx.hideHomeButton({
success: function () {
// console.log('隐藏成功!')
......@@ -40,7 +43,8 @@ Page({
// 是别的小程序 跳转过来的
if (options.orderCode) {
this.setData({
otherOrderCode: options.orderCode
otherOrderCode: options.orderCode,
miniProgramParams: options
})
}
// 开发用
......@@ -161,6 +165,7 @@ Page({
title: message || returnCode == -1 ? '发起支付失败' : '订单支付失败',
icon: 'error'
})
this.payFail()
}
})
},
......@@ -168,7 +173,7 @@ Page({
// 调用微信支付
wxPayment: function (row) {
let _this = this
let { otherOrderCode } = this.data
let { otherOrderCode, miniProgramParams } = this.data
if (this.data.ajaxing) {
return false
}
......@@ -192,14 +197,22 @@ Page({
})
if (otherOrderCode) {
// 跳转回对应的小程序
let path = miniProgramParams?.path ? miniProgramParams.path : 'packageShopmall/packageMine/pages/order/index/index',
params = ''
for (const key in miniProgramParams) {
params += `${key}=${miniProgramParams[key]}&`
}
return wx.navigateToMiniProgram({
appId: 'wxe10067a63c1856ac',
path: 'packageShopmall/packageMine/pages/order/index/index',
path: path + '?' + params,
// appId: 'wxe10067a63c1856ac',
// path: 'pages/sceneIndex/sceneIndex',
extraData: {
// foo: 'bar'
},
// extraData: {
// // foo: 'bar'
// ...miniProgramParams
// },
// envVersion: envName,
envVersion: 'trial',
success(res) {
......@@ -219,10 +232,7 @@ Page({
title: '支付失败',
icon: 'error'
})
// wx.showToast({
// title: '支付请求失败',
// icon: 'error'
// })
_this.setPayFail()
}
})
},
......@@ -264,6 +274,11 @@ Page({
)
}
},
setPayFail (){
this.setData({
payFail:true
})
} ,
getOrderDetail(item) {
console.log(item, 'item')
......@@ -282,16 +297,19 @@ Page({
if (data?.payOrder == null || data.payOrder.payStatus == 1) {
this.getInfo(item)
} else {
this.setPayFail()
wx.showToast({
title: message || '订单已失效',
icon: 'error'
})
}
} else if (errId == '-5003') {
this.setPayFail()
wx.showToast({
title: '订单已失效',
icon: 'error'
})
} else {
wx.showToast({
title: '请求失败',
......@@ -299,15 +317,5 @@ Page({
})
}
})
// ,
// res => {
// // else {
// // util.showToast('系统异常')
// // }
// }
// )
}
// })
})
<!-- 支付 -->
<!-- wx:if="{{orderInfo}}" -->
<block wx:if="{{paySuccess}}">
<!-- 不是scrm跳转过来的 -->
<block wx:if="{{paySuccess && !otherOrderCode}}">
<view class="poster">
<image
show-menu-by-longpress="true"
......@@ -16,5 +17,14 @@
<image class="logoIcon" src="../../../images/djLogin.png" />
</view>
</block>
<block wx:if="{{payFail }}">
<view class="faliCon">
<image
class="faliConImg"
src="./image/failIcon.png" />
</view>
<view class="failTips" >支付失败</view>
<view class="failTipsLabel" >支付遇到问题,请尝试重新支付。</view>
</block>
<!-- <auth-setting auth='{{authToast}}' type='{{authType}}' /> -->
......@@ -52,4 +52,33 @@
width: 200rpx;
height: 50rpx;
}
.faliCon {
/* margin-top: 200rpx; */
margin: 200rpx auto 30rpx;
width: 88rpx;
height: 88rpx;
}
.faliConImg {
width: 100%;
height: 100%;
}
.failTips {
font-family: PingFangSC-SNaNrpxibold;
font-weight: 600;
font-size: 40rpx;
color: #1B233D;
text-align: center;
}
.failTipsLabel {
margin-top: 12rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 24rpx;
color: #7A8299;
text-align: center;
}
\ No newline at end of file
{
"setting": {
"compileHotReLoad": true,
"urlCheck": false
"urlCheck": true
},
"condition": {
"miniprogram": {
......@@ -274,6 +274,17 @@
"query": "scene=sceneId%253D4",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "packagesPayment/pages/payment/index",
"query": "",
"launchMode": "default",
"scene": 1037,
"referrerInfo": {
"appId": "wxe10067a63c1856ac",
"extraData": "{\"orderId\":\"222\",\"path\":\"loading\"}"
}
}
]
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!