Commit ae1a9bb5 by zhangls

feat:v4.6功能开发

1 parent b6bce86c
...@@ -89,13 +89,19 @@ Component({ ...@@ -89,13 +89,19 @@ Component({
let { carSeriesId, letter } = this.data let { carSeriesId, letter } = this.data
// 处理可能车型没有数据的问题 // 处理可能车型没有数据的问题
let letterList = data ? Array.from(new Set([...data.map(e => e.letter)])) : [] let letterList = data ? Array.from(new Set([...data.map(e => e.letter)])) : []
console.log(letterList) // console.log(letterList)
let brandList = letterList.map(e => { let brandList = letterList.map(e => {
let list = [] let list = []
data.map(i => { data.map(i => {
if (e === i.letter) { if (e === i.letter) {
let c_list = [] let c_list = []
i.childs.map(c => { i.childs.map(c => {
// console.log(c)
// id: 2377
// letter: "Y"
// logoUrl: null
// name: "一汽红旗"
if (c.childs) { if (c.childs) {
c.childs.map(s => { c.childs.map(s => {
s.carChildsBrandId = c.id s.carChildsBrandId = c.id
...@@ -108,7 +114,13 @@ Component({ ...@@ -108,7 +114,13 @@ Component({
} }
} }
}) })
c_list = [...c_list, ...c.childs] let carSecondInfo = {
carChildsBrandId: c.id,
carChildsBrandName: c.name,
name: c.name,
isTitle: true
}
c_list = [...c_list, carSecondInfo, ...c.childs]
} }
}) })
i.childs_list = c_list i.childs_list = c_list
...@@ -233,6 +245,8 @@ Component({ ...@@ -233,6 +245,8 @@ Component({
}, },
choose(e) { choose(e) {
let { item, index, ind, cind, that } = e.currentTarget.dataset let { item, index, ind, cind, that } = e.currentTarget.dataset
// 如果是二级标题就不触发勾选逻辑
if (that.isTitle) return
let status = item.childs_list[cind].active let status = item.childs_list[cind].active
let { brandList } = this.data let { brandList } = this.data
brandList.map(i => { brandList.map(i => {
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
wx:for-item='c' wx:for-item='c'
wx:for-index='cind'> wx:for-index='cind'>
<view <view
class="list y-center child {{c.active?'active':''}}" class="list y-center child {{c.active?'active':''}} {{c.isTitle?'title':''}}"
catchtap="choose" catchtap="choose"
data-index="{{index}}" data-index="{{index}}"
data-ind="{{ind}}" data-ind="{{ind}}"
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
.child { .child {
font-weight: normal; font-weight: normal;
padding-left: 82rpx; padding-left: 96rpx;
font-size: 28rpx; font-size: 28rpx;
color: #888888; color: #888888;
position: relative; position: relative;
...@@ -44,6 +44,11 @@ ...@@ -44,6 +44,11 @@
.child.active { .child.active {
color: #3582ee; color: #3582ee;
} }
.child.title {
color:#282829 ;
padding-left: 64rpx;
/* color: #3582ee; */
}
.child .icon { .child .icon {
display: none; display: none;
width: 32rpx; width: 32rpx;
......
{ {
"description": "项目配置文件", "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"packOptions": { "packOptions": {
"ignore": [] "ignore": [],
}, "include": []
"setting": { },
"urlCheck": false, "setting": {
"es6": true, "urlCheck": false,
"enhance": true, "es6": true,
"postcss": true, "enhance": true,
"preloadBackgroundData": false, "postcss": true,
"minified": true, "preloadBackgroundData": false,
"newFeature": false, "minified": true,
"coverView": true, "newFeature": false,
"nodeModules": false, "coverView": true,
"autoAudits": false, "nodeModules": false,
"showShadowRootInWxmlPanel": true, "autoAudits": false,
"scopeDataCheck": false, "showShadowRootInWxmlPanel": true,
"uglifyFileName": false, "scopeDataCheck": false,
"checkInvalidKey": true, "uglifyFileName": false,
"checkSiteMap": false, "checkInvalidKey": true,
"uploadWithSourceMap": true, "checkSiteMap": false,
"compileHotReLoad": false, "uploadWithSourceMap": true,
"lazyloadPlaceholderEnable": false, "compileHotReLoad": false,
"useMultiFrameRuntime": true, "lazyloadPlaceholderEnable": false,
"useApiHook": true, "useMultiFrameRuntime": true,
"useApiHostProcess": true, "useApiHook": true,
"babelSetting": { "useApiHostProcess": true,
"ignore": [], "babelSetting": {
"disablePlugins": [], "ignore": [],
"outputPath": "" "disablePlugins": [],
}, "outputPath": ""
"useIsolateContext": false, },
"userConfirmedBundleSwitch": false, "useIsolateContext": false,
"packNpmManually": false, "userConfirmedBundleSwitch": false,
"packNpmRelationList": [], "packNpmManually": false,
"minifyWXSS": true, "packNpmRelationList": [],
"disableUseStrict": false, "minifyWXSS": true,
"minifyWXML": true, "disableUseStrict": false,
"showES6CompileOption": false, "minifyWXML": true,
"useCompilerPlugins": false, "showES6CompileOption": false,
"ignoreUploadUnusedFiles": true "useCompilerPlugins": false,
}, "ignoreUploadUnusedFiles": true,
"compileType": "miniprogram", "useStaticServer": true
"libVersion": "2.23.4", },
"appid": "wx570d9331f9ace0bd", "compileType": "miniprogram",
"projectname": "%E7%B2%BE%E5%93%81%E5%8D%87%E7%BA%A7", "libVersion": "2.23.4",
"debugOptions": { "appid": "wx570d9331f9ace0bd",
"hidedInDevtools": [] "projectname": "%E7%B2%BE%E5%93%81%E5%8D%87%E7%BA%A7",
}, "simulatorType": "wechat",
"scripts": {}, "simulatorPluginLibVersion": {},
"isGameTourist": false, "condition": {
"simulatorType": "wechat", "search": {
"simulatorPluginLibVersion": {}, "list": []
"condition": { },
"search": { "conversation": {
"list": [] "list": []
}, },
"conversation": { "plugin": {
"list": [] "list": []
}, },
"plugin": { "game": {
"list": [] "list": []
}, },
"game": { "gamePlugin": {
"list": [] "list": []
}, },
"gamePlugin": { "miniprogram": {
"list": [] "list": [
}, {
"miniprogram": { "id": 0,
"list": [ "name": "分享组件",
{ "pathName": "tabComponents/pages/share/share",
"id": 0, "query": "",
"name": "分享组件", "scene": null
"pathName": "tabComponents/pages/share/share", },
"query": "", {
"scene": null "id": 1,
}, "name": "授权组件",
{ "pathName": "tabComponents/pages/authorize/authorize",
"id": 1, "query": "",
"name": "授权组件", "scene": null
"pathName": "tabComponents/pages/authorize/authorize", },
"query": "", {
"scene": null "id": -1,
}, "name": "时间范围选择器",
{ "pathName": "tabComponents/pages/time-horizon/time-horizon",
"id": -1, "query": "",
"name": "时间范围选择器", "scene": null
"pathName": "tabComponents/pages/time-horizon/time-horizon", },
"query": "", {
"scene": null "id": -1,
}, "name": "cell",
{ "pathName": "tabComponents/pages/gl-cell/gl-cell",
"id": -1, "query": "",
"name": "cell", "scene": null
"pathName": "tabComponents/pages/gl-cell/gl-cell", },
"query": "", {
"scene": null "id": -1,
}, "name": "日历",
{ "pathName": "tabComponents/pages/calendar/calendar",
"id": -1, "query": "",
"name": "日历", "scene": null
"pathName": "tabComponents/pages/calendar/calendar", }
"query": "", ]
"scene": null }
} },
] "editorSetting": {
} "tabIndent": "insertSpaces",
} "tabSize": 2
}
} }
\ No newline at end of file \ No newline at end of file
{ {
"setting": {}, "setting": {
"condition": { "compileHotReLoad": true
"plugin": { },
"list": [] "condition": {
"miniprogram": {
"list": [
{
"name": "我的",
"pathName": "tabMine/pages/index/index",
"query": "",
"scene": null
}, },
"game": { {
"list": [] "name": "工单",
"pathName": "tabWorkOrder/pages/index/index",
"query": "",
"scene": null
}, },
"gamePlugin": { {
"list": [] "name": "新增工单",
"pathName": "tabWorkOrder/pages/createOrder/createOrder",
"query": "",
"scene": null
}, },
"miniprogram": { {
"list": [ "name": "工单详情",
{ "pathName": "tabWorkOrder/pages/confirmOrder/confirmOrder",
"name": "我的", "query": "orderCode=2203092231001774",
"pathName": "tabMine/pages/index/index", "launchMode": "default",
"query": "", "scene": null
"scene": null },
}, {
{ "name": "工单确认",
"name": "工单", "pathName": "tabWorkOrder/pages/orderDetail/orderDetail",
"pathName": "tabWorkOrder/pages/index/index", "query": "orderCode=2204251404181500",
"query": "", "launchMode": "default",
"scene": null "scene": 1011
}, },
{ {
"name": "新增工单", "name": "预约",
"pathName": "tabWorkOrder/pages/createOrder/createOrder", "pathName": "tabDate/pages/index/index",
"query": "", "query": "",
"scene": null "scene": null
}, },
{ {
"name": "工单详情", "name": "无账号",
"pathName": "tabWorkOrder/pages/confirmOrder/confirmOrder", "pathName": "pages/nothing/nothing",
"query": "orderCode=2203092231001774", "query": "",
"scene": null, "scene": null
"launchMode": "default" },
}, {
{ "name": "订单完成施工",
"name": "工单确认", "pathName": "tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail",
"pathName": "tabWorkOrder/pages/confirmOrder/confirmOrder", "query": "orderCode=2203141643241660",
"query": "orderCode=2204201800204697", "launchMode": "default",
"launchMode": "default", "scene": null
"scene": 1011 },
}, {
{ "name": "经营数据",
"name": "预约", "pathName": "tabOperating/pages/index/index",
"pathName": "tabDate/pages/index/index", "query": "",
"query": "", "scene": null
"scene": null },
}, {
{ "name": "累计营收",
"name": "无账号", "pathName": "tabOperating/pages/operatingShow/operatingShow",
"pathName": "pages/nothing/nothing", "query": "",
"query": "", "scene": null
"scene": null },
}, {
{ "name": "",
"name": "订单完成施工", "pathName": "pages/wxLogin/wxLogin",
"pathName": "tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail", "query": "",
"query": "orderCode=2203141643241660", "scene": null
"launchMode": "default", },
"scene": null {
}, "name": "首页",
{ "pathName": "/tabIndex/pages/index/index",
"name": "经营数据", "query": "",
"pathName": "tabOperating/pages/index/index", "scene": null
"query": "", },
"scene": null {
}, "name": "",
{ "pathName": "test/pages/test",
"name": "累计营收", "query": "",
"pathName": "tabOperating/pages/operatingShow/operatingShow", "launchMode": "default",
"query": "", "scene": null
"scene": null
},
{
"name": "",
"pathName": "pages/wxLogin/wxLogin",
"query": "",
"scene": null
},
{
"name": "首页",
"pathName": "/tabIndex/pages/index/index",
"query": "",
"scene": null
},
{
"name": "",
"pathName": "test/pages/test",
"query": "",
"launchMode": "default",
"scene": null
}
]
} }
]
} }
},
"projectname": "dj-car-boutique-work-wechat",
"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
...@@ -73,5 +73,10 @@ module.exports = { ...@@ -73,5 +73,10 @@ module.exports = {
/** 根据订单状态统计订单数*/ /** 根据订单状态统计订单数*/
statByStatus(data) { statByStatus(data) {
return api.post('dj.api.smartcarlife.order.statByStatus', data) return api.post('dj.api.smartcarlife.order.statByStatus', data)
},
/** 获取企微活码 */
getWorkWechatLiveQRCode(data) {
return api.post('dj.api.smartcarlife.order.getWorkWechatLiveQRCode', data)
} }
} }

65 KB | W: | H:

34.3 KB | W: | H:

tabWorkOrder/images/kf.png
tabWorkOrder/images/kf.png
tabWorkOrder/images/kf.png
tabWorkOrder/images/kf.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -151,10 +151,10 @@ ...@@ -151,10 +151,10 @@
</view> </view>
</block> </block>
</view> </view>
<view class="qr-box"> <!-- <view class="qr-box">
<image src="../../images/kf.png" /> <image src="{{customerService}}" />
</view> </view>
<view class="warranty-tips">建议让客户扫码关注客服查询质保</view> <view class="warranty-tips">建议让客户扫码关注客服查询质保</view> -->
</view> </view>
</block> </block>
</view> </view>
......
...@@ -10,7 +10,8 @@ Page({ ...@@ -10,7 +10,8 @@ Page({
...order_mixins.data, ...order_mixins.data,
qrFlag: true, qrFlag: true,
qrHeight: 107, qrHeight: 107,
isYqdSuper: app.globalData.isYqdSuper isYqdSuper: app.globalData.isYqdSuper,
customerService: '../../images/kf.png'
}, },
jumpUpdate() { jumpUpdate() {
...@@ -54,7 +55,6 @@ Page({ ...@@ -54,7 +55,6 @@ Page({
onRoute(options) { onRoute(options) {
console.log(options) console.log(options)
if (options.orderCode) { if (options.orderCode) {
// console.log('5555555555555')
this.setData({ this.setData({
orderCode: options.orderCode orderCode: options.orderCode
}) })
...@@ -66,6 +66,8 @@ Page({ ...@@ -66,6 +66,8 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log(options)
// debugger
if (options.orderCode) { if (options.orderCode) {
this.getOrderDetail(options.orderCode) this.getOrderDetail(options.orderCode)
} }
...@@ -119,8 +121,11 @@ Page({ ...@@ -119,8 +121,11 @@ Page({
warrantyCardList warrantyCardList
}) })
this.setQrBoxHeight() this.setQrBoxHeight()
if (data.status == 6) return // 超时关闭的不显示客服码和
this.getQrCode(data) data.status != 10 && this.getWorkWechatLiveQRCode()
// 已评价的就不再显示评价码
data.status != 6 && this.getQrCode(data)
// if (data.status == 6) return
} else { } else {
wx.showModal({ wx.showModal({
title: '温馨提示', title: '温馨提示',
...@@ -186,6 +191,26 @@ Page({ ...@@ -186,6 +191,26 @@ Page({
delete orderInfo.orderCode delete orderInfo.orderCode
wx.$router.redirectTo('createOrder', orderInfo) wx.$router.redirectTo('createOrder', orderInfo)
}, },
getWorkWechatLiveQRCode() {
let { orderCode, customerPhone, selectPayType } = this.data.orderInfo
console.log(orderCode, customerPhone, selectPayType)
// 订单状态 0-升级订单 1-战败订单
let orderType = selectPayType == 0 ? 1 : 2
api
.getWorkWechatLiveQRCode({ orderCode, customerPhone, orderType })
.then(result => {
let { code, data: url } = result
console.log(url)
if (code == 0) {
this.setData({
customerService: url
})
}
})
.catch(err => {
console.log(err)
})
},
previewImage(e) { previewImage(e) {
let { url } = e.currentTarget.dataset let { url } = e.currentTarget.dataset
wx.previewImage({ wx.previewImage({
...@@ -225,24 +250,24 @@ Page({ ...@@ -225,24 +250,24 @@ Page({
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () {}, onReachBottom: function () {}
/** /**
* 去发表 * 去发表
*/ */
sendGrass: function () { // sendGrass: function () {
let o = this.data.orderInfo || {} // let o = this.data.orderInfo || {}
let code = o.orderCode // let code = o.orderCode
let list = o.subOrderList || [] // let list = o.subOrderList || []
let arr = [] // let arr = []
arr.push(o.sellerMerchantName) // arr.push(o.sellerMerchantName)
list.map(k => { // list.map(k => {
arr.push(k.upgradeGoodsName) // arr.push(k.upgradeGoodsName)
}) // })
wx.navigateTo({ // wx.navigateTo({
url: '/tabGrass/pages/release/index?code=' + code + '&topicNames=' + arr.toString() // url: '/tabGrass/pages/release/index?code=' + code + '&topicNames=' + arr.toString()
}) // })
} // }
// 获取种草详情 // 获取种草详情
// getGrass: function (orderCode) { // getGrass: function (orderCode) {
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
</view> </view>
</block> </block>
</view> </view>
<block wx:if="{{warrantyCardList&&warrantyCardList.length}}"> <!-- <block wx:if="{{warrantyCardList&&warrantyCardList.length}}">
<view class="box"> <view class="box">
<view class="title">质保详情</view> <view class="title">质保详情</view>
<view class="warranty-box"> <view class="warranty-box">
...@@ -156,6 +156,29 @@ ...@@ -156,6 +156,29 @@
</view> </view>
<view class="warranty-tips">建议让客户扫码关注客服查询质保</view> <view class="warranty-tips">建议让客户扫码关注客服查询质保</view>
</view> </view>
</block> -->
<!-- wx:if="{{warrantyCardList&&warrantyCardList.length}}" -->
<block wx:if="{{orderInfo.status != 10}}">
<view class="box">
<view class="title">{{orderInfo.selectPayType==0? '客服' :'质保详情'}}</view>
<view class="warranty-box">
<block wx:for="{{warrantyCardList}}" wx:key="index">
<view class="warranty-card">
<view class="name text-hide">{{item.goodsName}}</view>
<view class="value">
质保期
<text>{{item.warrantyPeriod}}年</text>
</view>
</view>
</block>
</view>
<view class="qr-box">
<image bindtap="previewImage" data-url="{{customerService}}" src="{{customerService}}" />
</view>
<view class="warranty-tips">
{{orderInfo.selectPayType==0? '建议让客户扫码关注客服号领取礼包' :'建议让客户扫码关注客服查询质保'}}
</view>
</view>
</block> </block>
<block wx:if="{{orderInfo.status == 6 || orderInfo.status== 4 || orderInfo.status == 2}}"> <block wx:if="{{orderInfo.status == 6 || orderInfo.status== 4 || orderInfo.status == 2}}">
<view class="box"> <view class="box">
......
...@@ -9,7 +9,8 @@ Page({ ...@@ -9,7 +9,8 @@ Page({
data: { data: {
...order_mixins.data, ...order_mixins.data,
showTips: true, showTips: true,
isYqdSuper: app.globalData.isYqdSuper isYqdSuper: app.globalData.isYqdSuper,
customerService: '../../images/kf.png'
}, },
jumpUpdate() { jumpUpdate() {
let { orderInfo } = this.data let { orderInfo } = this.data
...@@ -145,8 +146,9 @@ Page({ ...@@ -145,8 +146,9 @@ Page({
}) })
// 去掉车主评价功能 // 去掉车主评价功能
// this.setQrBoxHeight() // this.setQrBoxHeight()
if (data.status == 6) return // if (data.status == 6) return
this.getQrCode(data) // this.getQrCode(data)
this.getWorkWechatLiveQRCode()
} else { } else {
wx.showModal({ wx.showModal({
title: '温馨提示', title: '温馨提示',
...@@ -208,12 +210,39 @@ Page({ ...@@ -208,12 +210,39 @@ Page({
delete orderInfo.orderCode delete orderInfo.orderCode
wx.$router.redirectTo('createOrder', orderInfo) wx.$router.redirectTo('createOrder', orderInfo)
}, },
getWorkWechatLiveQRCode() {
let { orderCode, customerPhone, selectPayType } = this.data.orderInfo
console.log(orderCode, customerPhone, selectPayType)
// 订单状态 0-升级订单 1-战败订单
let orderType = selectPayType == 0 ? 1 : 2
api
.getWorkWechatLiveQRCode({ orderCode, customerPhone, orderType })
.then(result => {
let { code, data: url } = result
if (code == 0) {
this.setData({
customerService: url
})
}
})
.catch(err => {
console.log(err)
})
},
previewImage(e) { previewImage(e) {
let { url } = e.currentTarget.dataset let { url } = e.currentTarget.dataset
wx.previewImage({ console.log(url)
urls: [url], if (url.includes('http')) {
current: url wx.previewImage({
}) urls: [url],
current: url
})
} else {
// 重新请求图片
this.getWorkWechatLiveQRCode()
console.log('重新请求图片')
}
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
......
...@@ -128,9 +128,10 @@ ...@@ -128,9 +128,10 @@
</view> </view>
</block> </block>
</view> </view>
<block wx:if="{{warrantyCardList&&warrantyCardList.length}}"> <!-- wx:if="{{warrantyCardList&&warrantyCardList.length}}" -->
<block>
<view class="box"> <view class="box">
<view class="title">质保详情</view> <view class="title">{{orderInfo.selectPayType==0? '客服' :'质保详情'}}</view>
<view class="warranty-box"> <view class="warranty-box">
<block wx:for="{{warrantyCardList}}" wx:key="index"> <block wx:for="{{warrantyCardList}}" wx:key="index">
<view class="warranty-card"> <view class="warranty-card">
...@@ -143,9 +144,11 @@ ...@@ -143,9 +144,11 @@
</block> </block>
</view> </view>
<view class="qr-box"> <view class="qr-box">
<image src="../../images/kf.png" /> <image bindtap="previewImage" data-url="{{customerService}}" src="{{customerService}}" />
</view>
<view class="warranty-tips">
{{orderInfo.selectPayType==0? '建议让客户扫码关注客服号领取礼包' :'建议让客户扫码关注客服查询质保'}}
</view> </view>
<view class="warranty-tips">建议让客户扫码关注客服查询质保</view>
</view> </view>
</block> </block>
<!-- <block wx:if="{{orderInfo.status == 6 || orderInfo.status== 4 || orderInfo.status == 2}}"> <!-- <block wx:if="{{orderInfo.status == 6 || orderInfo.status== 4 || orderInfo.status == 2}}">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!