Commit e3950b7b by 前端

Merge branch 'develop' into 'master'

Develop

See merge request !36
2 parents 7a2ebd63 080db002
...@@ -44,6 +44,8 @@ module.exports = { ...@@ -44,6 +44,8 @@ module.exports = {
}, },
/** 根据商户号获取员工列表信息(转化人员) */ /** 根据商户号获取员工列表信息(转化人员) */
getConversionEmployeeList(data) { getConversionEmployeeList(data) {
// 0->2.0 1->1.1 2->1.2 3->1.3 场景对应
data.sceneList = [1]
return api.post('dj.api.smartcarlife.employee.getByMerchantId', data) return api.post('dj.api.smartcarlife.employee.getByMerchantId', data)
}, },
/** 根据园区店商户号获取绑定4S店列表 */ /** 根据园区店商户号获取绑定4S店列表 */
...@@ -132,7 +134,9 @@ module.exports = { ...@@ -132,7 +134,9 @@ module.exports = {
}, },
// 获取订单信息 // 获取订单信息
getWorkList(data) { getWorkList(data) {
return api.post('dj.api.smartcarlife.order.search', data) params = data || {}
params.sceneType = 1
return api.post('dj.api.smartcarlife.order.search', params)
}, },
// 获取园区店开通的场景入口 // 获取园区店开通的场景入口
getYqMerchantSceneConfigAPI(data) { getYqMerchantSceneConfigAPI(data) {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* 2测试 * 2测试
* 3生产环境 * 3生产环境
*/ */
export let env = 3 export let env = 2
// 配置预发布的小程序aapId // 配置预发布的小程序aapId
// export const preReleaseAppId = 'wx24ebae5768e74138' // export const preReleaseAppId = 'wx24ebae5768e74138'
......
import api from '~/utils/request/request.js' import api from '~/utils/request/request.js'
export default { export default {
getCarBrandList(data = {}) { getCarBrandList(data = {}) {
...@@ -25,6 +24,7 @@ export default { ...@@ -25,6 +24,7 @@ export default {
/** 根据商户号获取员工列表信息 */ /** 根据商户号获取员工列表信息 */
getEmployeeList(data) { getEmployeeList(data) {
let params = data || {} let params = data || {}
params.sceneList = [0]
return api.post('dj.api.smartcarlife.employee.getByMerchantId', params) return api.post('dj.api.smartcarlife.employee.getByMerchantId', params)
}, },
/** 查询权益订单详情 */ /** 查询权益订单详情 */
...@@ -52,5 +52,4 @@ export default { ...@@ -52,5 +52,4 @@ export default {
let params = data || {} let params = data || {}
return api.post('dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.print', params) return api.post('dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.print', params)
} }
} }
// packageEquity/pages/carQuotation/CarQuotationPay/CarQuotationPay.js // packageEquity/pages/carQuotation/CarQuotationPay/CarQuotationPay.js
import { getOrderDetail, updateOrderStatus, getQuotationInfoById } from '../../../api' import { getOrderDetail, updateOrderStatus, getQuotationInfoById } from '../../../api'
import { createQrcodeImage } from '~/api/api' import { createQrcodeImage } from '~/api/api'
import { setWebSocket } from '~/store/index'
let time = null let time = null
Page({ Page({
/** /**
...@@ -33,6 +34,24 @@ Page({ ...@@ -33,6 +34,24 @@ Page({
this.getDetail() this.getDetail()
}) })
}, },
createQRCode(text) {
console.log(text)
let size = 0
try {
const info = wx.getSystemInfoSync()
let scale = info.windowWidth / 750 //不同屏幕下QRcode的适配比例;设计稿是750宽
let width = 300 * scale
size = width
} catch (e) {
size = 150
}
let _img = qrcode.createQrCodeImg(text, {
size: parseInt(size)
})
this.setData({
qr: _img
})
},
// getOrderDetail() { // getOrderDetail() {
// // console.log(wx.$router, 'wx.$router') // // console.log(wx.$router, 'wx.$router')
// let _this = this // let _this = this
...@@ -135,7 +154,9 @@ Page({ ...@@ -135,7 +154,9 @@ Page({
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) {}, onLoad(options) {
setWebSocket()
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
......
...@@ -28,6 +28,7 @@ Page({ ...@@ -28,6 +28,7 @@ Page({
}) })
}, },
onLoad(options) { onLoad(options) {
let { windowWidth, windowHeight } = wx.getSystemInfoSync()
if (options.writeOffCode) { if (options.writeOffCode) {
this.writeOffCode = options.writeOffCode this.writeOffCode = options.writeOffCode
} }
...@@ -36,7 +37,7 @@ Page({ ...@@ -36,7 +37,7 @@ Page({
this.canvasCtx = wx.createCanvasContext('signature', that) this.canvasCtx = wx.createCanvasContext('signature', that)
// 设置线的样式 // 设置线的样式
this.canvasCtx.setFillStyle('white') this.canvasCtx.setFillStyle('white')
this.canvasCtx.fillRect(0, 0, 600, 600) this.canvasCtx.fillRect(0, 0, windowWidth, windowHeight)
this.canvasCtx.setLineCap('round') this.canvasCtx.setLineCap('round')
this.canvasCtx.setLineJoin('round') this.canvasCtx.setLineJoin('round')
// 初始化颜色 // 初始化颜色
...@@ -145,6 +146,17 @@ Page({ ...@@ -145,6 +146,17 @@ Page({
canvasId: 'signature', canvasId: 'signature',
fileType: 'jpg', fileType: 'jpg',
success(res) { success(res) {
// //将图片保存到本地相册
// wx.saveImageToPhotosAlbum({
// filePath: res.tempFilePath,
// success(res) {
// // wx.$util.showToast('已将图片保存到本地相册', res)
// },
// fail(err) {
// wx.$util.showToast('失败', err)
// console.log(err)
// }
// })
if (res.tempFilePath) { if (res.tempFilePath) {
that.toUploadImage(res.tempFilePath) that.toUploadImage(res.tempFilePath)
} }
......
...@@ -153,6 +153,7 @@ Page({ ...@@ -153,6 +153,7 @@ Page({
return return
} }
wx.$util.showLoading() wx.$util.showLoading()
api api
.selectAccountLogin({ .selectAccountLogin({
id id
...@@ -162,6 +163,7 @@ Page({ ...@@ -162,6 +163,7 @@ Page({
if (data) { if (data) {
app.globalData.YQorderSetting = null app.globalData.YQorderSetting = null
wx.$util.setUserInfo(data.loginUserInfoList[0]) wx.$util.setUserInfo(data.loginUserInfoList[0])
app.globalData.YQorderSetting = null
// console.log(data.loginUserInfoList[0]) // console.log(data.loginUserInfoList[0])
checkYqdSuper(app, data.loginUserInfoList[0]) checkYqdSuper(app, data.loginUserInfoList[0])
const SCENE = wx.$SCENE const SCENE = wx.$SCENE
...@@ -178,6 +180,7 @@ Page({ ...@@ -178,6 +180,7 @@ Page({
wx.$router.reLaunch(`${target}.${name}`, query) wx.$router.reLaunch(`${target}.${name}`, query)
wx.$SCENE = null wx.$SCENE = null
} else { } else {
// 超管默认开通所有场景 // 超管默认开通所有场景
if (isSuper) { if (isSuper) {
// 0 会员权益/升级 1 精品升级 // 0 会员权益/升级 1 精品升级
...@@ -211,7 +214,6 @@ Page({ ...@@ -211,7 +214,6 @@ Page({
} }
}) })
} }
// app.
getYQorderInfo() getYQorderInfo()
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
......
...@@ -144,6 +144,20 @@ ...@@ -144,6 +144,20 @@
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "新建工单",
"pathName": "tabWorkOrder/pages/createOrder/createOrder",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "全屏签名",
"pathName": "packageEquity/pages/carQuotation/fullSignture/fullSignture",
"query": "",
"launchMode": "default",
"scene": null
} }
] ]
} }
......
...@@ -97,6 +97,11 @@ export const getYQorderInfo = () => { ...@@ -97,6 +97,11 @@ export const getYQorderInfo = () => {
// console.log(res) // console.log(res)
let { code, data } = res let { code, data } = res
if (code == 0) { if (code == 0) {
// console.log(data);
// debugger
console.log(data.yqPhoneConfig,'data.yqPhoneConfig');
console.log(typeof data.yqPhoneConfig,'data.yqPhoneConfig');
// 过滤园区店是否需要屏蔽手机号选项 // 过滤园区店是否需要屏蔽手机号选项
let filterYqPhoneConfig = JSON.parse(data.yqPhoneConfig) let filterYqPhoneConfig = JSON.parse(data.yqPhoneConfig)
// console.log(filterYqPhoneConfig) // console.log(filterYqPhoneConfig)
...@@ -173,7 +178,7 @@ export const checkScene = options => { ...@@ -173,7 +178,7 @@ export const checkScene = options => {
} }
} }
/** 查询微信和pos订单是否已支付成功 */ /** 查询pos订单是否已支付成功 */
export const setWebSocket = () => { export const setWebSocket = () => {
api.getWsUrl().then(res => { api.getWsUrl().then(res => {
console.log(res.data) console.log(res.data)
......
...@@ -4,9 +4,11 @@ import api from '~/utils/request/request.js' ...@@ -4,9 +4,11 @@ import api from '~/utils/request/request.js'
module.exports = { module.exports = {
/** 工单列表 */ /** 工单列表 */
getWorkList(data) { getWorkList(data) {
let params = data || {}
params.sceneType = 1
return api.post('dj.api.smartcarlife.order.search', { return api.post('dj.api.smartcarlife.order.search', {
pageSize: 10, pageSize: 10,
...data ...params
}) })
}, },
...@@ -74,6 +76,8 @@ module.exports = { ...@@ -74,6 +76,8 @@ module.exports = {
/** 根据订单状态统计订单数*/ /** 根据订单状态统计订单数*/
statByStatus(data) { statByStatus(data) {
data = data || {}
data.sceneType = 1
return api.post('dj.api.smartcarlife.order.statByStatus', data) return api.post('dj.api.smartcarlife.order.statByStatus', data)
}, },
......
...@@ -595,7 +595,7 @@ Page({ ...@@ -595,7 +595,7 @@ Page({
// app . // app .
getYQorderInfo() getYQorderInfo()
.then(merchantSettingInfo => { .then(merchantSettingInfo => {
// console.log(merchantSettingInfo) console.log(merchantSettingInfo,'merchantSettingInfo')
let dictionaryObj = { let dictionaryObj = {
carTypeRequiredFlag: 'carBrand', carTypeRequiredFlag: 'carBrand',
standNoRequiredFlag: 'standNo', standNoRequiredFlag: 'standNo',
...@@ -607,7 +607,7 @@ Page({ ...@@ -607,7 +607,7 @@ Page({
requiredList.push(dictionaryObj[key]) requiredList.push(dictionaryObj[key])
} }
} }
// console.log(merchantSettingInfo.yqPhoneConfig,'merchantSettingInfo.yqPhoneConfig'); console.log(merchantSettingInfo.yqPhoneConfig,'merchantSettingInfo.yqPhoneConfig');
// console.log(deepClone(merchantSettingInfo.yqPhoneConfig), 'deepClone(merchantSettingInfo.yqPhoneConfig)') // console.log(deepClone(merchantSettingInfo.yqPhoneConfig), 'deepClone(merchantSettingInfo.yqPhoneConfig)')
this.setData({ this.setData({
requiredList: [...new Set(requiredList)], requiredList: [...new Set(requiredList)],
......
...@@ -94,7 +94,7 @@ class Request { ...@@ -94,7 +94,7 @@ class Request {
getData(data, method, noSignAttr) { getData(data, method, noSignAttr) {
let sessionId = util.getSessionId() let sessionId = util.getSessionId()
if (sessionId) data['sessionId'] = sessionId if (sessionId) data['sessionId'] = sessionId
console.log(data,'request'); // console.log(data,'request');
data['v'] = '1.0.0' data['v'] = '1.0.0'
data['method'] = method data['method'] = method
data['format'] = 'json' data['format'] = 'json'
...@@ -104,7 +104,7 @@ class Request { ...@@ -104,7 +104,7 @@ class Request {
// 兼容线上appkey和secret不一样的情况 // 兼容线上appkey和secret不一样的情况
let djapi = data.method.includes('dj.api') let djapi = data.method.includes('dj.api')
let scmrapi = data.method.includes('scrm.api') let scmrapi = data.method.includes('scrm.api')
console.log(scmrapi,'scmrapi'); // console.log(scmrapi,'scmrapi');
const appKey = scmrapi?scrmSecretKey.appKey:djapi?secretKey.appKey:'' const appKey = scmrapi?scrmSecretKey.appKey:djapi?secretKey.appKey:''
const secret = scmrapi?scrmSecretKey.secret:djapi?secretKey.secret:'' const secret = scmrapi?scrmSecretKey.secret:djapi?secretKey.secret:''
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!