Commit bb07f5ed by 张立顺

v4.11.0 功能开发

1 parent 588189ba
......@@ -2,6 +2,16 @@ const restapi = require('/utils/restapi.js')
const utilapi = require('/utils/util.js')
let app_timer = null
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({
// 当小程序初始化完成时,会触发 onLaunch(全局只触发一次)
......
......@@ -15,7 +15,7 @@ Page({
unPayMoneyList: ['0', '0.', '0.0', '0.00'],
canPay: false,
keyHidden: false,
unpaid: true,
unpaid: false,
showOrderInfo: false,
transactionReferenceNumber: '',
dataTime: '',
......@@ -25,9 +25,10 @@ Page({
{ name: 'tradeNo', label: '流水号', info: '' },
{ name: 'payTime', label: '支付时间', info: '' }
],
// openId: 'oQ6Sh5cGirPd55Oc1J1oJSRpboFM',
openId: '',
outTradeNo: ''
openId: 'oQ6Sh5cGirPd55Oc1J1oJSRpboFM',
// openId: '',
outTradeNo: '',
workWechatQrcode:''
},
/**
......@@ -35,7 +36,7 @@ Page({
*/
onLoad: function (options) {
// console.log('app', app.globalData.login())
console.log(options)
// console.log(aa)
this.gteOpenId()
wx.hideHomeButton({
......@@ -64,9 +65,9 @@ Page({
// scene: 'sceneId%3D4'
// }
console.log(options.scene)
// console.log(options.scene)
let id = decodeURIComponent(options.scene).split('=')[1]
console.log(id)
// console.log(id)
//获取门店信息
this.getMerthcantInfo(id)
......@@ -83,11 +84,11 @@ Page({
// 发送 res.code 到后台换取 openId, sessionKey, unionId
var self = this
// self.globalData.code = res.code
console.log('login', res)
console.log(api)
// console.log('login', res)
// console.log(api)
// restapi.jsTestLogin(res.code, self.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
if (returnCode == 0) {
self.setData({
......@@ -117,6 +118,7 @@ Page({
this.setData({
...op
})
this.getwxQrcode()
//util.showLoading('加载中...')
console.log(op)
// this.getInfo(op)
......@@ -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() {
this.setData({
......@@ -160,12 +181,12 @@ Page({
}
// 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)) {
// 此处控制的是如果没有小数点,首位不能为类似于 01、02的金额
if (money.indexOf('.') < 0 && money != '') {
console.log(parseFloat(money))
// console.log(parseFloat(money))
money = parseFloat(money).toString()
}
// 金额0不能给支付
......@@ -182,7 +203,7 @@ Page({
const { payMoney, merchantId, openId, unPayMoneyList } = this.data
if (payMoney === '' || unPayMoneyList.includes(payMoney)) return
// this.wxPayment(payMoney)
console.log(Number(payMoney), '付款')
// console.log(Number(payMoney), '付款')
let params = {
merchantId,
openId,
......@@ -196,7 +217,7 @@ Page({
params,
res => {
util.hideLoading()
console.log(res)
// console.log(res)
let { returnCode, data } = res
if (returnCode == 0) {
......@@ -243,7 +264,7 @@ Page({
timeStamp: row.timeStamp,
signType: 'MD5',
success: function (res) {
console.log(res)
// console.log(res)
// 查询订单信息
// util.showLoading('加载中...')
wx.setNavigationBarTitle({
......
......@@ -85,8 +85,12 @@
<view class="info">{{item.info}}</view>
</view>
</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>
<!-- <navigator open-type="exit" target="miniProgram">退出小程序</navigator> -->
/* packagesPayment/pages/QRPayment/QRPayment.wxss */
.clearfix::after {
content: '';
display: table;
clear: both;
content: '';
display: table;
clear: both;
}
.pay-container {
padding: 0 62rpx;
height: 100%;
padding: 0 62rpx;
height: 100%;
}
.pay-header {
height: 260rpx;
display: flex;
align-items: center;
/* flex-direction: row; */
/* flex-direction: column; */
/* flex-wrap: wrap; */
height: 260rpx;
display: flex;
align-items: center;
/* flex-direction: row; */
/* flex-direction: column; */
/* flex-wrap: wrap; */
}
.pay-header .shopIcon {
height: 88rpx;
width: 88rpx;
height: 88rpx;
width: 88rpx;
}
.pay-header .company {
display: flex;
justify-content: space-between;
height: 88rpx;
flex-direction: column;
margin-left: 20rpx;
display: flex;
justify-content: space-between;
height: 88rpx;
flex-direction: column;
margin-left: 20rpx;
}
.company-name {
font-size: 32rpx;
color: #333;
font-weight: 600;
font-size: 32rpx;
color: #333;
font-weight: 600;
}
.company-yqd {
font-size: 28rpx;
color: #666;
font-size: 28rpx;
color: #666;
}
.pay-money-title {
font-size: 28rpx;
font-size: 28rpx;
}
.pay-input-wrapper {
margin-top: 12rpx;
position: relative;
display: flex;
height: 100rpx;
line-height: 100rpx;
align-items: center;
justify-content: flex-end;
/* flex-direction: row-reverse; */
margin-top: 12rpx;
position: relative;
display: flex;
height: 100rpx;
line-height: 100rpx;
align-items: center;
justify-content: flex-end;
/* flex-direction: row-reverse; */
}
.pay-input-wrapper:after {
content: " ";
position: absolute;
left: -50%;
right: -50%;
bottom: 0;
border-bottom: 1px solid rgb(235, 237, 240);
transform: scaleX(.5);
content: " ";
position: absolute;
left: -50%;
right: -50%;
bottom: 0;
border-bottom: 1px solid rgb(235, 237, 240);
transform: scaleX(.5);
}
.deletKey {
display: flex;
align-items: center;
justify-content: center;
display: flex;
align-items: center;
justify-content: center;
}
.pay-after-icon {
/* margin-left: auto; */
color: #999;
/* margin-left: auto; */
color: #999;
}
.pay-money {
font-size: 72rpx;
font-weight: bold;
font-size: 72rpx;
font-weight: bold;
}
.pay-icon {
font-size: 32rpx;
font-weight: bold;
margin-right: auto;
font-size: 32rpx;
font-weight: bold;
margin-right: auto;
}
.pay-money {
margin-right: 4rpx;
margin-right: 4rpx;
}
.deletIcon {
width: 54rpx;
height: 42rpx;
width: 54rpx;
height: 42rpx;
}
.pay-cursor {
width: 6rpx;
height: 66rpx;
background: #1AAD19;
border-radius: 6rpx;
animation: twinkling 1.5s infinite;
width: 6rpx;
height: 66rpx;
background: #1AAD19;
border-radius: 6rpx;
animation: twinkling 1.5s infinite;
}
@keyframes twinkling {
0% {
opacity: 0;
}
0% {
opacity: 0;
}
90% {
opacity: .8;
}
90% {
opacity: .8;
}
100% {
opacity: 1;
}
100% {
opacity: 1;
}
}
.keyboard {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 999;
height: 0;
background: #f7f7f7;
transition: height 0.3s;
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 999;
height: 0;
background: #f7f7f7;
transition: height 0.3s;
}
.hind_box {
height: 456rpx;
height: 456rpx;
}
.key-box {
display: flex;
padding-left: 16rpx;
padding-bottom: 16rpx;
padding-bottom: calc(16rpx + constant(safe-area-inset-bottom));
padding-bottom: calc(16rpx + env(safe-area-inset-bottom));
display: flex;
padding-left: 16rpx;
padding-bottom: 16rpx;
padding-bottom: calc(16rpx + constant(safe-area-inset-bottom));
padding-bottom: calc(16rpx + env(safe-area-inset-bottom));
}
.number-box {
flex: 3;
flex: 3;
}
.number-box .key {
float: left;
margin: 16rpx 16rpx 0 0;
width: calc(100% / 3 - 16rpx);
height: 90rpx;
border-radius: 10rpx;
line-height: 90rpx;
text-align: center;
font-size: 40rpx;
font-weight: bold;
background-color: #fff;
float: left;
margin: 16rpx 16rpx 0 0;
width: calc(100% / 3 - 16rpx);
height: 90rpx;
border-radius: 10rpx;
line-height: 90rpx;
text-align: center;
font-size: 40rpx;
font-weight: bold;
background-color: #fff;
}
.number-box .key.key-zero {
width: calc((100% / 3) * 2 - 16rpx);
width: calc((100% / 3) * 2 - 16rpx);
}
.keyboard .number-box-hover {
/* 临时定义颜色 */
background-color: #e1e1e1 !important;
/* 临时定义颜色 */
background-color: #e1e1e1 !important;
}
.btn-box {
flex: 1;
flex: 1;
}
.btn-box .key {
margin: 16rpx 16rpx 0 0;
height: 90rpx;
border-radius: 10rpx;
line-height: 90rpx;
text-align: center;
font-size: 40rpx;
font-weight: bold;
background-color: #fff;
margin: 16rpx 16rpx 0 0;
height: 90rpx;
border-radius: 10rpx;
line-height: 90rpx;
text-align: center;
font-size: 40rpx;
font-weight: bold;
background-color: #fff;
}
.btn-box .pay_btn {
height: 298rpx;
line-height: 298rpx;
font-weight: normal;
background-color: #1AAD19;
color: #fff;
font-size: 32rpx;
height: 298rpx;
line-height: 298rpx;
font-weight: normal;
background-color: #1AAD19;
color: #fff;
font-size: 32rpx;
}
.btn-box .pay_btn.pay-btn-display {
background-color: #9ED99D !important;
background-color: #9ED99D !important;
}
.btn-box .pay_btn.pay-btn-hover {
background-color: #179B16;
background-color: #179B16;
}
.success-Container {
padding: 100rpx 76rpx 0;
text-align: center;
background-color: #fff;
height: 100vh;
padding: 100rpx 76rpx 0;
text-align: center;
background-color: #fff;
height: 100vh;
}
.amountOfMoney {
font-size: 80rpx;
font-weight: 600;
font-size: 80rpx;
font-weight: 600;
}
.success-tips {
display: flex;
align-items: center;
justify-content: center;
display: flex;
align-items: center;
justify-content: center;
}
.successIcon {
width: 32rpx;
height: 32rpx;
margin-right: 20rpx;
width: 32rpx;
height: 32rpx;
margin-right: 20rpx;
}
.orderInfo {
display: flex;
justify-content: space-between;
display: flex;
justify-content: space-between;
}
.success-Container {
box-sizing: border-box;
display: flex;
flex-direction: column;
/* justify-content: center; */
align-items: center;
box-sizing: border-box;
display: flex;
flex-direction: column;
/* justify-content: center; */
align-items: center;
}
.success-Container .line {
height: 1px;
width: 100%;
margin: 28rpx 0;
background: #E5E5E5;
height: 1px;
width: 100%;
margin: 28rpx 0;
background: #E5E5E5;
}
.success-Container .orderInfo {
width: 100%;
margin-bottom: 28rpx;
width: 100%;
margin-bottom: 28rpx;
}
.success-Container .label {
font-size: 26rpx;
color: #999;
font-size: 26rpx;
color: #999;
}
.success-Container .info {
font-size: 26rpx;
color: #333;
flex: 1;
text-align: right;
max-width: 80%;
overflow: hidden;
text-overflow: ellipsis;
/* display: -webkit-box; */
white-space: nowrap;
font-size: 26rpx;
color: #333;
flex: 1;
text-align: right;
max-width: 80%;
overflow: hidden;
text-overflow: ellipsis;
/* display: -webkit-box; */
white-space: nowrap;
}
.footerCon {
margin-top: auto;
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; */
margin-top: auto;
margin-bottom: 200rpx;
width: 200rpx;
height: 50rpx;
/* text-align: center; */
width: 200rpx;
height: 50rpx;
}
\ No newline at end of file
......@@ -66,5 +66,23 @@ module.exports = {
success,
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 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'
// console.log(restapi)
// const restapi = require('../utils/restapi.js')
const restapi = {}
restapi.req = request
console.log(restapi.req)
// console.log(restapi.req)
/**
* 通用请求
* url: 请求路径
......@@ -30,7 +31,8 @@ function request(url, data, header, method, dataType, responseType, success, fai
setHeader(header)
var that = this
wx.request({
url: 'https://dj.test.glsx.com.cn' + url,
// url: 'https://dj.dev.glsx.com.cn' + url,
url: domain + url,
data: data,
header: header,
timeout: timeout,
......@@ -163,5 +165,22 @@ module.exports = {
success,
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": "项目配置文件",
"packOptions": {
"ignore": []
"ignore": [],
"include": []
},
"setting": {
"urlCheck": true,
......@@ -45,10 +46,6 @@
"libVersion": "2.8.3",
"appid": "wx06d1198e751435d1",
"projectname": "dj-scrm-weapp-smartshop",
"debugOptions": {
"hidedInDevtools": []
},
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
......@@ -261,5 +258,9 @@
}
]
}
},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 4
}
}
\ No newline at end of file
{
"setting": {},
"condition": {
"plugin": {
"list": []
},
"game": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": [
{
"id": 0,
"name": "服务顾问首页",
"pathName": "packageIndex/pages/servicerAdviser/index/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "个人中心",
"pathName": "pages/tab/personal/personal",
"query": "",
"scene": null
},
{
"id": -1,
"name": "顾问列表",
"pathName": "packageIndex/pages/servicerAdviser/servicers/servicers",
"query": "",
"scene": null
},
{
"id": -1,
"name": "爱车追踪",
"pathName": "packageSmartPlus/pages/vehicleTracking/index/index",
"query": "protocolId=31004447",
"scene": null
},
{
"id": -1,
"name": "云防盗",
"pathName": "packageSmartPlus/pages/cloudSecurity/index/index",
"query": "protocolId=31004447",
"scene": null
},
{
"id": 5,
"name": "行车轨迹",
"pathName": "packageSmartPlus/pages/journey/index/index",
"query": "userId=31004447&time=2020-04-21&activeDuration=1",
"scene": null
},
{
"id": -1,
"name": "设备绑定首页",
"pathName": "packageSmartPlus/pages/bindingDevice/index/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "绑定设备",
"pathName": "packageSmartPlus/pages/bindingDevice/bind/bind",
"query": "",
"scene": null
},
{
"id": -1,
"name": "我的设备",
"pathName": "packageSmartPlus/pages/bindingDevice/devices/devices",
"query": "",
"scene": null
},
{
"id": -1,
"name": "车联网+",
"pathName": "pages/tab/smartplus/smartplus",
"query": "",
......@@ -89,35 +70,30 @@
"scene": null
},
{
"id": -1,
"name": "index",
"pathName": "pages/tab/index/index",
"query": "",
"scene": null
},
{
"id": 12,
"name": "122913",
"pathName": "pages/tab/index/index",
"query": "merchantId=44184848",
"scene": null
},
{
"id": -1,
"name": "chakan ",
"pathName": "packageIndex/pages/servicerAdviser/viewActivity/viewActivity",
"query": "merchantId=122913",
"scene": null
},
{
"id": 14,
"name": "兼容旧版首页",
"pathName": "packageIndex/pages/index/index",
"query": "merchantId=44184848&source=old",
"scene": 1011
},
{
"id": 15,
"name": "秒杀活动",
"pathName": "packageIndex/pages/remindService/activity/activity",
"query": "id=333",
......@@ -130,7 +106,6 @@
"scene": null
},
{
"id": -1,
"name": "packagePersonal/pages/boutiqueComment/boutiqueComment",
"pathName": "packagePersonal/pages/boutiqueComment/boutiqueComment",
"query": "",
......@@ -143,35 +118,30 @@
"scene": null
},
{
"id": -1,
"name": "packagePersonal/pages/boutiqueDetail/boutiqueDetail",
"pathName": "packagePersonal/pages/boutiqueDetail/boutiqueDetail",
"query": "",
"scene": null
},
{
"id": -1,
"name": "packagePersonal/pages/error/error",
"pathName": "packagePersonal/pages/error/error",
"query": "",
"scene": null
},
{
"id": -1,
"name": "packagePersonal/pages/boutique/boutique",
"pathName": "packagePersonal/pages/boutique/boutique",
"query": "",
"scene": null
},
{
"id": -1,
"name": "packagePersonal/pages/boutique/boutique",
"pathName": "packagePersonal/pages/boutique/boutique",
"query": "orderCode=2007071702209842",
"scene": null
},
{
"id": -1,
"name": "packagePersonal/pages/boutique/boutique",
"pathName": "packagePersonal/pages/boutique/boutique",
"query": "orderCode=2007071702209842",
......@@ -277,8 +247,8 @@
"name": "二维码进入",
"pathName": "packagesPayment/pages/QRPayment/QRPayment",
"query": "scene=sceneId%3D4",
"scene": null,
"launchMode": "default"
"launchMode": "default",
"scene": null
},
{
"name": "",
......@@ -289,5 +259,6 @@
}
]
}
}
},
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
}
\ No newline at end of file
......@@ -2,9 +2,9 @@
// const domain = 'http://192.168.3.181:9182'
// const domain = 'https://dj.dev.glsx.com.cn'
// env:uat
// const domain = 'https://dj.test.glsx.com.cn'
const domain = 'https://dj.test.glsx.com.cn'
// env:prod
const domain = 'https://dj.glsx.com.cn'
// const domain = 'https://dj.glsx.com.cn'
const app = getApp()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!