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": { "setting": {
"urlCheck": false, "urlCheck": false,
...@@ -39,17 +40,13 @@ ...@@ -39,17 +40,13 @@
"minifyWXML": true, "minifyWXML": true,
"showES6CompileOption": false, "showES6CompileOption": false,
"useCompilerPlugins": false, "useCompilerPlugins": false,
"ignoreUploadUnusedFiles": true "ignoreUploadUnusedFiles": true,
"useStaticServer": true
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.23.4", "libVersion": "2.23.4",
"appid": "wx570d9331f9ace0bd", "appid": "wx570d9331f9ace0bd",
"projectname": "%E7%B2%BE%E5%93%81%E5%8D%87%E7%BA%A7", "projectname": "%E7%B2%BE%E5%93%81%E5%8D%87%E7%BA%A7",
"debugOptions": {
"hidedInDevtools": []
},
"scripts": {},
"isGameTourist": false,
"simulatorType": "wechat", "simulatorType": "wechat",
"simulatorPluginLibVersion": {}, "simulatorPluginLibVersion": {},
"condition": { "condition": {
...@@ -107,5 +104,9 @@ ...@@ -107,5 +104,9 @@
} }
] ]
} }
},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
} }
} }
\ No newline at end of file \ No newline at end of file
{ {
"setting": {}, "setting": {
"condition": { "compileHotReLoad": true
"plugin": {
"list": []
},
"game": {
"list": []
},
"gamePlugin": {
"list": []
}, },
"condition": {
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
...@@ -34,13 +27,13 @@ ...@@ -34,13 +27,13 @@
"name": "工单详情", "name": "工单详情",
"pathName": "tabWorkOrder/pages/confirmOrder/confirmOrder", "pathName": "tabWorkOrder/pages/confirmOrder/confirmOrder",
"query": "orderCode=2203092231001774", "query": "orderCode=2203092231001774",
"scene": null, "launchMode": "default",
"launchMode": "default" "scene": null
}, },
{ {
"name": "工单确认", "name": "工单确认",
"pathName": "tabWorkOrder/pages/confirmOrder/confirmOrder", "pathName": "tabWorkOrder/pages/orderDetail/orderDetail",
"query": "orderCode=2204201800204697", "query": "orderCode=2204251404181500",
"launchMode": "default", "launchMode": "default",
"scene": 1011 "scene": 1011
}, },
...@@ -96,5 +89,7 @@ ...@@ -96,5 +89,7 @@
} }
] ]
} }
} },
"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
console.log(url)
if (url.includes('http')) {
wx.previewImage({ wx.previewImage({
urls: [url], urls: [url],
current: 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!