Commit bb07f5ed by 张立顺

v4.11.0 功能开发

1 parent 588189ba
...@@ -2,6 +2,16 @@ const restapi = require('/utils/restapi.js') ...@@ -2,6 +2,16 @@ const restapi = require('/utils/restapi.js')
const utilapi = require('/utils/util.js') const utilapi = require('/utils/util.js')
let app_timer = null let app_timer = null
import router from './router/index.js' import router from './router/index.js'
import * as Sentry from './utils/sentry-miniapp.wx.min'
// 先屏蔽不上sentry功能
// import * as Sentry from 'sentry-miniapp'
const accountInfo = wx.getAccountInfoSync()
// console.log(Sentry)
// 初始化 Sentry 生产环境再开启
// accountInfo.miniProgram.envVersion == 'release' &&
Sentry.init({
dsn: 'https://bcc13d39aab94cba95ce03b65035b5a5@sentry.glsx.com.cn/25'
})
//app.js //app.js
App({ App({
// 当小程序初始化完成时,会触发 onLaunch(全局只触发一次) // 当小程序初始化完成时,会触发 onLaunch(全局只触发一次)
......
...@@ -15,7 +15,7 @@ Page({ ...@@ -15,7 +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: true, unpaid: false,
showOrderInfo: false, showOrderInfo: false,
transactionReferenceNumber: '', transactionReferenceNumber: '',
dataTime: '', dataTime: '',
...@@ -25,9 +25,10 @@ Page({ ...@@ -25,9 +25,10 @@ Page({
{ name: 'tradeNo', label: '流水号', info: '' }, { name: 'tradeNo', label: '流水号', info: '' },
{ name: 'payTime', label: '支付时间', info: '' } { name: 'payTime', label: '支付时间', info: '' }
], ],
// openId: 'oQ6Sh5cGirPd55Oc1J1oJSRpboFM', openId: 'oQ6Sh5cGirPd55Oc1J1oJSRpboFM',
openId: '', // openId: '',
outTradeNo: '' outTradeNo: '',
workWechatQrcode:''
}, },
/** /**
...@@ -35,7 +36,7 @@ Page({ ...@@ -35,7 +36,7 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
// console.log('app', app.globalData.login()) // console.log('app', app.globalData.login())
console.log(options) // console.log(aa)
this.gteOpenId() this.gteOpenId()
wx.hideHomeButton({ wx.hideHomeButton({
...@@ -64,9 +65,9 @@ Page({ ...@@ -64,9 +65,9 @@ Page({
// scene: 'sceneId%3D4' // scene: 'sceneId%3D4'
// } // }
console.log(options.scene) // console.log(options.scene)
let id = decodeURIComponent(options.scene).split('=')[1] let id = decodeURIComponent(options.scene).split('=')[1]
console.log(id) // console.log(id)
//获取门店信息 //获取门店信息
this.getMerthcantInfo(id) this.getMerthcantInfo(id)
...@@ -83,11 +84,11 @@ Page({ ...@@ -83,11 +84,11 @@ Page({
// 发送 res.code 到后台换取 openId, sessionKey, unionId // 发送 res.code 到后台换取 openId, sessionKey, unionId
var self = this var self = this
// self.globalData.code = res.code // self.globalData.code = res.code
console.log('login', res) // console.log('login', res)
console.log(api) // console.log(api)
// restapi.jsTestLogin(res.code, self.globalData.appId, function (response) { // restapi.jsTestLogin(res.code, self.globalData.appId, function (response) {
api.authOpenId({ code: res.code, appId: app.globalData.appId }, function (response) { api.authOpenId({ code: res.code, appId: app.globalData.appId }, function (response) {
console.log('response', response) // console.log('response', response)
let { returnCode, data } = response let { returnCode, data } = response
if (returnCode == 0) { if (returnCode == 0) {
self.setData({ self.setData({
...@@ -117,6 +118,7 @@ Page({ ...@@ -117,6 +118,7 @@ Page({
this.setData({ this.setData({
...op ...op
}) })
this.getwxQrcode()
//util.showLoading('加载中...') //util.showLoading('加载中...')
console.log(op) console.log(op)
// this.getInfo(op) // this.getInfo(op)
...@@ -125,6 +127,25 @@ Page({ ...@@ -125,6 +127,25 @@ Page({
} }
) )
}, },
// 获取企微二维码
getwxQrcode() {
// let { merchantId: yqMerchantId } = this.data
// let { merchantId: yqMerchantId } = this.data
api.yqMerchantDetail({ yqMerchantId:'44211025' }, res => {
console.log(res)
let { returnCode, data } = res
if (returnCode == '0') {
if (data) {
let {workWechatQrcode} = data
this.setData({
workWechatQrcode
})
}
}
})
},
// 隐藏键盘 // 隐藏键盘
handleHiddenKey() { handleHiddenKey() {
this.setData({ this.setData({
...@@ -160,12 +181,12 @@ Page({ ...@@ -160,12 +181,12 @@ Page({
} }
// console.log(/^(\d+\.?\d{0,2})$/.test(money), money, 'money') // console.log(/^(\d+\.?\d{0,2})$/.test(money), money, 'money')
console.log(/^(\d{0,7}\.?\d{0,2})$/.test(money), money, 'money') // console.log(/^(\d{0,7}\.?\d{0,2})$/.test(money), money, 'money')
if (/^(\d{0,6}\.?\d{0,2})$/.test(money)) { if (/^(\d{0,6}\.?\d{0,2})$/.test(money)) {
// 此处控制的是如果没有小数点,首位不能为类似于 01、02的金额 // 此处控制的是如果没有小数点,首位不能为类似于 01、02的金额
if (money.indexOf('.') < 0 && money != '') { if (money.indexOf('.') < 0 && money != '') {
console.log(parseFloat(money)) // console.log(parseFloat(money))
money = parseFloat(money).toString() money = parseFloat(money).toString()
} }
// 金额0不能给支付 // 金额0不能给支付
...@@ -182,7 +203,7 @@ Page({ ...@@ -182,7 +203,7 @@ Page({
const { payMoney, merchantId, openId, unPayMoneyList } = this.data const { payMoney, merchantId, openId, unPayMoneyList } = this.data
if (payMoney === '' || unPayMoneyList.includes(payMoney)) return if (payMoney === '' || unPayMoneyList.includes(payMoney)) return
// this.wxPayment(payMoney) // this.wxPayment(payMoney)
console.log(Number(payMoney), '付款') // console.log(Number(payMoney), '付款')
let params = { let params = {
merchantId, merchantId,
openId, openId,
...@@ -196,7 +217,7 @@ Page({ ...@@ -196,7 +217,7 @@ Page({
params, params,
res => { res => {
util.hideLoading() util.hideLoading()
console.log(res) // console.log(res)
let { returnCode, data } = res let { returnCode, data } = res
if (returnCode == 0) { if (returnCode == 0) {
...@@ -243,7 +264,7 @@ Page({ ...@@ -243,7 +264,7 @@ Page({
timeStamp: row.timeStamp, timeStamp: row.timeStamp,
signType: 'MD5', signType: 'MD5',
success: function (res) { success: function (res) {
console.log(res) // console.log(res)
// 查询订单信息 // 查询订单信息
// util.showLoading('加载中...') // util.showLoading('加载中...')
wx.setNavigationBarTitle({ wx.setNavigationBarTitle({
......
...@@ -85,8 +85,12 @@ ...@@ -85,8 +85,12 @@
<view class="info">{{item.info}}</view> <view class="info">{{item.info}}</view>
</view> </view>
</block> --> </block> -->
<image class="logoIcon" src="../../../images/djLogin.png" /> <view class="footerCon">
<block wx:if="{{workWechatQrcode}}">
<view class="wxTips">扫码领取质保卡</view>
<image class="wxqrCon" src="{{workWechatQrcode}}" />
</block>
<image class="logoIcon" src="../../../images/djLogin.png" /></view>
</view> </view>
</view> </view>
<!-- <navigator open-type="exit" target="miniProgram">退出小程序</navigator> -->
...@@ -271,10 +271,29 @@ ...@@ -271,10 +271,29 @@
white-space: nowrap; white-space: nowrap;
} }
.logoIcon { .footerCon {
/* text-align: center; */
margin-top: auto; margin-top: auto;
margin-bottom: 200rpx; margin-bottom: 200rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.wxTips {
font-size: 26rpx;
color: #999999;
/* line-height: 36rpx; */
}
.wxqrCon {
width: 306rpx;
height: 305rpx;
margin: 12rpx 0 84rpx;
}
.logoIcon {
/* text-align: center; */
width: 200rpx; width: 200rpx;
height: 50rpx; height: 50rpx;
} }
\ No newline at end of file \ No newline at end of file
...@@ -66,5 +66,23 @@ module.exports = { ...@@ -66,5 +66,23 @@ module.exports = {
success, success,
fail fail
) )
},
/** 获取园区店加微二维码 */
yqMerchantDetail: function (params, success, fail) {
restapi.req(
'/web-dj-weapp/smartcarlife/yqMerchant/getYqMerchantConfig',
// JSON.stringify(code),
params,
{
'content-type': 'application/x-www-form-urlencoded'
},
// 'POST',
'GET',
'json',
'text',
success,
fail
)
} }
} }
// const restapi = require('../utils/util.js') // const restapi = require('../utils/util.js')
const domain = 'https://dj.test.glsx.com.cn' // const domain = 'https://dj.test.glsx.com.cn'
const domain = 'https://dj.dev.glsx.com.cn'
// import restapi from '../utils/restapi.js' // import restapi from '../utils/restapi.js'
// console.log(restapi) // console.log(restapi)
// const restapi = require('../utils/restapi.js') // const restapi = require('../utils/restapi.js')
const restapi = {} const restapi = {}
restapi.req = request restapi.req = request
console.log(restapi.req) // console.log(restapi.req)
/** /**
* 通用请求 * 通用请求
* url: 请求路径 * url: 请求路径
...@@ -30,7 +31,8 @@ function request(url, data, header, method, dataType, responseType, success, fai ...@@ -30,7 +31,8 @@ function request(url, data, header, method, dataType, responseType, success, fai
setHeader(header) setHeader(header)
var that = this var that = this
wx.request({ wx.request({
url: 'https://dj.test.glsx.com.cn' + url, // url: 'https://dj.dev.glsx.com.cn' + url,
url: domain + url,
data: data, data: data,
header: header, header: header,
timeout: timeout, timeout: timeout,
...@@ -163,5 +165,22 @@ module.exports = { ...@@ -163,5 +165,22 @@ module.exports = {
success, success,
fail fail
) )
},
/** 获取园区店加微二维码 */
yqMerchantDetail: function (params, success, fail) {
restapi.req(
'/web-dj-weapp/smartcarlife/yqMerchant/getYqMerchantConfig',
// JSON.stringify(code),
params,
{
'content-type': 'application/x-www-form-urlencoded'
},
// 'POST',
'GET',
'json',
'text',
success,
fail
)
} }
} }
{ {
"description": "项目配置文件", "description": "项目配置文件",
"packOptions": { "packOptions": {
"ignore": [] "ignore": [],
"include": []
}, },
"setting": { "setting": {
"urlCheck": true, "urlCheck": true,
...@@ -45,10 +46,6 @@ ...@@ -45,10 +46,6 @@
"libVersion": "2.8.3", "libVersion": "2.8.3",
"appid": "wx06d1198e751435d1", "appid": "wx06d1198e751435d1",
"projectname": "dj-scrm-weapp-smartshop", "projectname": "dj-scrm-weapp-smartshop",
"debugOptions": {
"hidedInDevtools": []
},
"isGameTourist": false,
"simulatorType": "wechat", "simulatorType": "wechat",
"simulatorPluginLibVersion": {}, "simulatorPluginLibVersion": {},
"condition": { "condition": {
...@@ -261,5 +258,9 @@ ...@@ -261,5 +258,9 @@
} }
] ]
} }
},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 4
} }
} }
\ No newline at end of file \ No newline at end of file
{ {
"setting": {}, "setting": {},
"condition": { "condition": {
"plugin": {
"list": []
},
"game": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"id": 0,
"name": "服务顾问首页", "name": "服务顾问首页",
"pathName": "packageIndex/pages/servicerAdviser/index/index", "pathName": "packageIndex/pages/servicerAdviser/index/index",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "个人中心", "name": "个人中心",
"pathName": "pages/tab/personal/personal", "pathName": "pages/tab/personal/personal",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "顾问列表", "name": "顾问列表",
"pathName": "packageIndex/pages/servicerAdviser/servicers/servicers", "pathName": "packageIndex/pages/servicerAdviser/servicers/servicers",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "爱车追踪", "name": "爱车追踪",
"pathName": "packageSmartPlus/pages/vehicleTracking/index/index", "pathName": "packageSmartPlus/pages/vehicleTracking/index/index",
"query": "protocolId=31004447", "query": "protocolId=31004447",
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "云防盗", "name": "云防盗",
"pathName": "packageSmartPlus/pages/cloudSecurity/index/index", "pathName": "packageSmartPlus/pages/cloudSecurity/index/index",
"query": "protocolId=31004447", "query": "protocolId=31004447",
"scene": null "scene": null
}, },
{ {
"id": 5,
"name": "行车轨迹", "name": "行车轨迹",
"pathName": "packageSmartPlus/pages/journey/index/index", "pathName": "packageSmartPlus/pages/journey/index/index",
"query": "userId=31004447&time=2020-04-21&activeDuration=1", "query": "userId=31004447&time=2020-04-21&activeDuration=1",
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "设备绑定首页", "name": "设备绑定首页",
"pathName": "packageSmartPlus/pages/bindingDevice/index/index", "pathName": "packageSmartPlus/pages/bindingDevice/index/index",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "绑定设备", "name": "绑定设备",
"pathName": "packageSmartPlus/pages/bindingDevice/bind/bind", "pathName": "packageSmartPlus/pages/bindingDevice/bind/bind",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "我的设备", "name": "我的设备",
"pathName": "packageSmartPlus/pages/bindingDevice/devices/devices", "pathName": "packageSmartPlus/pages/bindingDevice/devices/devices",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "车联网+", "name": "车联网+",
"pathName": "pages/tab/smartplus/smartplus", "pathName": "pages/tab/smartplus/smartplus",
"query": "", "query": "",
...@@ -89,35 +70,30 @@ ...@@ -89,35 +70,30 @@
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "index", "name": "index",
"pathName": "pages/tab/index/index", "pathName": "pages/tab/index/index",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"id": 12,
"name": "122913", "name": "122913",
"pathName": "pages/tab/index/index", "pathName": "pages/tab/index/index",
"query": "merchantId=44184848", "query": "merchantId=44184848",
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "chakan ", "name": "chakan ",
"pathName": "packageIndex/pages/servicerAdviser/viewActivity/viewActivity", "pathName": "packageIndex/pages/servicerAdviser/viewActivity/viewActivity",
"query": "merchantId=122913", "query": "merchantId=122913",
"scene": null "scene": null
}, },
{ {
"id": 14,
"name": "兼容旧版首页", "name": "兼容旧版首页",
"pathName": "packageIndex/pages/index/index", "pathName": "packageIndex/pages/index/index",
"query": "merchantId=44184848&source=old", "query": "merchantId=44184848&source=old",
"scene": 1011 "scene": 1011
}, },
{ {
"id": 15,
"name": "秒杀活动", "name": "秒杀活动",
"pathName": "packageIndex/pages/remindService/activity/activity", "pathName": "packageIndex/pages/remindService/activity/activity",
"query": "id=333", "query": "id=333",
...@@ -130,7 +106,6 @@ ...@@ -130,7 +106,6 @@
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "packagePersonal/pages/boutiqueComment/boutiqueComment", "name": "packagePersonal/pages/boutiqueComment/boutiqueComment",
"pathName": "packagePersonal/pages/boutiqueComment/boutiqueComment", "pathName": "packagePersonal/pages/boutiqueComment/boutiqueComment",
"query": "", "query": "",
...@@ -143,35 +118,30 @@ ...@@ -143,35 +118,30 @@
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "packagePersonal/pages/boutiqueDetail/boutiqueDetail", "name": "packagePersonal/pages/boutiqueDetail/boutiqueDetail",
"pathName": "packagePersonal/pages/boutiqueDetail/boutiqueDetail", "pathName": "packagePersonal/pages/boutiqueDetail/boutiqueDetail",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "packagePersonal/pages/error/error", "name": "packagePersonal/pages/error/error",
"pathName": "packagePersonal/pages/error/error", "pathName": "packagePersonal/pages/error/error",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "packagePersonal/pages/boutique/boutique", "name": "packagePersonal/pages/boutique/boutique",
"pathName": "packagePersonal/pages/boutique/boutique", "pathName": "packagePersonal/pages/boutique/boutique",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "packagePersonal/pages/boutique/boutique", "name": "packagePersonal/pages/boutique/boutique",
"pathName": "packagePersonal/pages/boutique/boutique", "pathName": "packagePersonal/pages/boutique/boutique",
"query": "orderCode=2007071702209842", "query": "orderCode=2007071702209842",
"scene": null "scene": null
}, },
{ {
"id": -1,
"name": "packagePersonal/pages/boutique/boutique", "name": "packagePersonal/pages/boutique/boutique",
"pathName": "packagePersonal/pages/boutique/boutique", "pathName": "packagePersonal/pages/boutique/boutique",
"query": "orderCode=2007071702209842", "query": "orderCode=2007071702209842",
...@@ -277,8 +247,8 @@ ...@@ -277,8 +247,8 @@
"name": "二维码进入", "name": "二维码进入",
"pathName": "packagesPayment/pages/QRPayment/QRPayment", "pathName": "packagesPayment/pages/QRPayment/QRPayment",
"query": "scene=sceneId%3D4", "query": "scene=sceneId%3D4",
"scene": null, "launchMode": "default",
"launchMode": "default" "scene": null
}, },
{ {
"name": "", "name": "",
...@@ -289,5 +259,6 @@ ...@@ -289,5 +259,6 @@
} }
] ]
} }
} },
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
} }
\ No newline at end of file \ No newline at end of file
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// const domain = 'http://192.168.3.181:9182' // const domain = 'http://192.168.3.181:9182'
// const domain = 'https://dj.dev.glsx.com.cn' // const domain = 'https://dj.dev.glsx.com.cn'
// env:uat // env:uat
// const domain = 'https://dj.test.glsx.com.cn' const domain = 'https://dj.test.glsx.com.cn'
// env:prod // env:prod
const domain = 'https://dj.glsx.com.cn' // const domain = 'https://dj.glsx.com.cn'
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!