Commit 169f7a4e by 前端

Merge branch 'dev_v4.15.0' into 'develop'

Dev v4.15.0

See merge request !8
2 parents b3614ef9 09ef5155
...@@ -15,6 +15,7 @@ Page({ ...@@ -15,6 +15,7 @@ Page({
unPayMoneyList: ['0', '0.', '0.0', '0.00'], unPayMoneyList: ['0', '0.', '0.0', '0.00'],
canPay: false, canPay: false,
keyHidden: false, keyHidden: false,
// unpaid: false,
unpaid: true, unpaid: true,
showOrderInfo: false, showOrderInfo: false,
transactionReferenceNumber: '', transactionReferenceNumber: '',
...@@ -29,6 +30,7 @@ Page({ ...@@ -29,6 +30,7 @@ Page({
// openId: '', // openId: '',
outTradeNo: '', outTradeNo: '',
workWechatQrcode: '', workWechatQrcode: '',
qrcodeType: '',
userCollaborationName: '', userCollaborationName: '',
userCollaborationCheck: false userCollaborationCheck: false
}, },
...@@ -68,6 +70,12 @@ Page({ ...@@ -68,6 +70,12 @@ Page({
wx.$router.go('userCollaboration') wx.$router.go('userCollaboration')
// console.log(wx.$router.getRouterList()) // console.log(wx.$router.getRouterList())
}, },
navWarrantyCard() {
// console.log('navWebview')
// console.log(wx.$router.getRouterList())
wx.$router.go('warrantyCard')
},
handleRadio() { handleRadio() {
this.setData({ this.setData({
userCollaborationCheck: !this.data.userCollaborationCheck userCollaborationCheck: !this.data.userCollaborationCheck
...@@ -116,8 +124,8 @@ Page({ ...@@ -116,8 +124,8 @@ Page({
...op ...op
}) })
// 先取消获取质保卡 // 获取质保卡配置
// this.getwxQrcode() this.getwxQrcode()
//util.showLoading('加载中...') //util.showLoading('加载中...')
console.log(op) console.log(op)
...@@ -142,17 +150,16 @@ Page({ ...@@ -142,17 +150,16 @@ Page({
console.log(err) console.log(err)
}) })
}, },
// 获取企微二维码 // navWarrantyCard() {
navWarrantyCard() { // // moduleH5Url: {
// moduleH5Url: { // // uat: 'http://frontend.test.glsx.com.cn/dj-car-boutique-work-wechat/#/',
// uat: 'http://frontend.test.glsx.com.cn/dj-car-boutique-work-wechat/#/', // // prod: 'https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/'
// prod: 'https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/' // // },
// }, // let path = 'https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/'
let path = 'https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/' // wx.navigateTo({
wx.navigateTo({ // url: `/pages/webpage/webpage?path=${encodeURIComponent(path)}`
url: `/pages/webpage/webpage?path=${encodeURIComponent(path)}` // })
}) // },
},
getwxQrcode() { getwxQrcode() {
// let { merchantId: yqMerchantId } = this.data // let { merchantId: yqMerchantId } = this.data
let { merchantId: yqMerchantId } = this.data let { merchantId: yqMerchantId } = this.data
...@@ -163,9 +170,10 @@ Page({ ...@@ -163,9 +170,10 @@ Page({
let { returnCode, data } = res let { returnCode, data } = res
if (returnCode == '0') { if (returnCode == '0') {
if (data) { if (data) {
let { workWechatQrcode } = data let { workWechatQrcode, qrcodeType } = data
this.setData({ this.setData({
workWechatQrcode workWechatQrcode,
qrcodeType
}) })
} }
} }
...@@ -316,6 +324,7 @@ Page({ ...@@ -316,6 +324,7 @@ Page({
} }
}) })
}, },
// 支付成功获取订单回调信息 // 支付成功获取订单回调信息
successInfo() { successInfo() {
let { outTradeNo, orderInfoList, showOrderInfo } = this.data let { outTradeNo, orderInfoList, showOrderInfo } = this.data
......
...@@ -98,11 +98,17 @@ ...@@ -98,11 +98,17 @@
</view> </view>
</block> --> </block> -->
<view class="footerCon"> <view class="footerCon">
<!-- bindlongpress="navWebview" show-menu-by-longpress="true" -->
<!-- <image bindlongpress="navWarrantyCard" class="wxqrCon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/minizhibaoka.png" /> -->
<!-- <image show-menu-by-longpress="true" class="wxqrCon" src="https://dj.glsx.com.cn/dj-wxaqrcode/aeabc3a60a328e8c536588686eec016b.png" /> -->
<!-- wx:if="{{workWechatQrcode}}" --> <!-- wx:if="{{workWechatQrcode}}" -->
<block> <block wx:if="{{qrcodeType== 1}}">
<view bindtap="navWarrantyCard" class="wxTips">长按识别扫码领取质保卡</view> <view class="wxTips">长按识别扫码领取质保卡</view>
<!-- src="{{workWechatQrcode}}" --> <image bindlongpress="navWarrantyCard" class="wxqrCon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/minizhibaoka.png" />
<image show-menu-by-longpress="true" class="wxqrCon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/minizhibaoka.png" /> </block>
<block wx:if="{{qrcodeType== 2}}">
<view class="wxTips">长按识别添加客服</view>
<image show-menu-by-longpress="true" class="wxqrCon" src="{{workWechatQrcode}}" />
</block> </block>
<image class="logoIcon" src="../../../images/djLogin.png" /> <image class="logoIcon" src="../../../images/djLogin.png" />
</view> </view>
......
// packagesPayment/pages/warrantyCard/warrantyCard.js
Page({
/**
* 页面的初始数据
*/
data: {
webpageUrl: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
const accountInfo = wx.getAccountInfoSync()
console.log(accountInfo, 'accountInfo')
this.setData({
// webpageUrl: accountInfo.miniProgram.envVersion == 'release' ? 'https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/' : 'http://192.168.1.178:8080/#/detail?cardCode=211027-2201AAA01'
webpageUrl: accountInfo.miniProgram.envVersion == 'release' ? 'https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/' : 'https://frontend.test.glsx.com.cn/dj-car-boutique-work-wechat/#/'
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {}
})
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!-- packagesPayment/pages/warrantyCard/warrantyCard.wxml -->
<web-view src="{{webpageUrl}}" bindmessage="onMessage" />
/* packagesPayment/pages/warrantyCard/warrantyCard.wxss */
\ No newline at end of file \ No newline at end of file
{ {
"setting": { "setting": {
"compileHotReLoad": true, "compileHotReLoad": true,
"urlCheck": true "urlCheck": false
}, },
"condition": { "condition": {
"miniprogram": { "miniprogram": {
...@@ -266,6 +266,13 @@ ...@@ -266,6 +266,13 @@
"query": "scene=sceneId%3D9952", "query": "scene=sceneId%3D9952",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "质保h5页面",
"pathName": "packagesPayment/pages/warrantyCard/warrantyCard",
"query": "scene=sceneId%253D4",
"launchMode": "default",
"scene": null
} }
] ]
} }
......
// env:dev 现在用上面的 /**
// const domain = 'http://192.168.3.181:9182' *
// const domain = 'https://dj.dev.glsx.com.cn' 0本地
// env:uat 1开发
// const domain = 'https://dj.test.glsx.com.cn' 2测试
// env:prod 3生产环境
const domain = 'https://dj.glsx.com.cn' 4预发布环境
*/
const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync()
// console.log(systemInfo);
// console.log(accountInfo.miniProgram.envVersion)
//手动控制体验版环境的请求 true就依据下面index false就默认为2
const manual = false
const release = false
let index = 1
// 判断小程序环境
// develop:开发版(正常开发工具,测试时)
// trial:体验版
// release:正式版
// console.log( systemInfo.platform);
// console.log(accountInfo.miniProgram.envVersion);
if (systemInfo.platform != 'devtools') {
switch (accountInfo.miniProgram.envVersion) {
case 'develop':
// this.globalData.url = 'http://192.168.0.252:3000/api'; //
break
case 'trial':
index = manual ? index : 2
break
case 'release':
index = release ? index : 3
break
default:
index = 3
break
}
}
const domain_items = {
ip: 'http://192.168.3.181:9182',
dev: 'https://dj.dev.glsx.com.cn',
uat: 'https://dj.test.glsx.com.cn',
prod: 'https://dj.glsx.com.cn',
preRelease: 'https://dj.beta.glsx.com.cn'
}
const target = ['ip', 'dev', 'uat', 'prod','preRelease']
const domain= domain_items[target[index]]
const app = getApp() const app = getApp()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!