Commit ae1a9bb5 by zhangls

feat:v4.6功能开发

1 parent b6bce86c
......@@ -89,13 +89,19 @@ Component({
let { carSeriesId, letter } = this.data
// 处理可能车型没有数据的问题
let letterList = data ? Array.from(new Set([...data.map(e => e.letter)])) : []
console.log(letterList)
// console.log(letterList)
let brandList = letterList.map(e => {
let list = []
data.map(i => {
if (e === i.letter) {
let c_list = []
i.childs.map(c => {
// console.log(c)
// id: 2377
// letter: "Y"
// logoUrl: null
// name: "一汽红旗"
if (c.childs) {
c.childs.map(s => {
s.carChildsBrandId = c.id
......@@ -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
......@@ -233,6 +245,8 @@ Component({
},
choose(e) {
let { item, index, ind, cind, that } = e.currentTarget.dataset
// 如果是二级标题就不触发勾选逻辑
if (that.isTitle) return
let status = item.childs_list[cind].active
let { brandList } = this.data
brandList.map(i => {
......
......@@ -30,7 +30,7 @@
wx:for-item='c'
wx:for-index='cind'>
<view
class="list y-center child {{c.active?'active':''}}"
class="list y-center child {{c.active?'active':''}} {{c.isTitle?'title':''}}"
catchtap="choose"
data-index="{{index}}"
data-ind="{{ind}}"
......
......@@ -36,7 +36,7 @@
.child {
font-weight: normal;
padding-left: 82rpx;
padding-left: 96rpx;
font-size: 28rpx;
color: #888888;
position: relative;
......@@ -44,6 +44,11 @@
.child.active {
color: #3582ee;
}
.child.title {
color:#282829 ;
padding-left: 64rpx;
/* color: #3582ee; */
}
.child .icon {
display: none;
width: 32rpx;
......
{
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": false,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": false,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": false,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useIsolateContext": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"disableUseStrict": false,
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false,
"ignoreUploadUnusedFiles": true
},
"compileType": "miniprogram",
"libVersion": "2.23.4",
"appid": "wx570d9331f9ace0bd",
"projectname": "%E7%B2%BE%E5%93%81%E5%8D%87%E7%BA%A7",
"debugOptions": {
"hidedInDevtools": []
},
"scripts": {},
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"plugin": {
"list": []
},
"game": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": [
{
"id": 0,
"name": "分享组件",
"pathName": "tabComponents/pages/share/share",
"query": "",
"scene": null
},
{
"id": 1,
"name": "授权组件",
"pathName": "tabComponents/pages/authorize/authorize",
"query": "",
"scene": null
},
{
"id": -1,
"name": "时间范围选择器",
"pathName": "tabComponents/pages/time-horizon/time-horizon",
"query": "",
"scene": null
},
{
"id": -1,
"name": "cell",
"pathName": "tabComponents/pages/gl-cell/gl-cell",
"query": "",
"scene": null
},
{
"id": -1,
"name": "日历",
"pathName": "tabComponents/pages/calendar/calendar",
"query": "",
"scene": null
}
]
}
}
"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"urlCheck": false,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": false,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": false,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useIsolateContext": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"disableUseStrict": false,
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false,
"ignoreUploadUnusedFiles": true,
"useStaticServer": true
},
"compileType": "miniprogram",
"libVersion": "2.23.4",
"appid": "wx570d9331f9ace0bd",
"projectname": "%E7%B2%BE%E5%93%81%E5%8D%87%E7%BA%A7",
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"plugin": {
"list": []
},
"game": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": [
{
"id": 0,
"name": "分享组件",
"pathName": "tabComponents/pages/share/share",
"query": "",
"scene": null
},
{
"id": 1,
"name": "授权组件",
"pathName": "tabComponents/pages/authorize/authorize",
"query": "",
"scene": null
},
{
"id": -1,
"name": "时间范围选择器",
"pathName": "tabComponents/pages/time-horizon/time-horizon",
"query": "",
"scene": null
},
{
"id": -1,
"name": "cell",
"pathName": "tabComponents/pages/gl-cell/gl-cell",
"query": "",
"scene": null
},
{
"id": -1,
"name": "日历",
"pathName": "tabComponents/pages/calendar/calendar",
"query": "",
"scene": null
}
]
}
},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}
\ No newline at end of file
{
"setting": {},
"condition": {
"plugin": {
"list": []
"setting": {
"compileHotReLoad": true
},
"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": "tabMine/pages/index/index",
"query": "",
"scene": null
},
{
"name": "工单",
"pathName": "tabWorkOrder/pages/index/index",
"query": "",
"scene": null
},
{
"name": "新增工单",
"pathName": "tabWorkOrder/pages/createOrder/createOrder",
"query": "",
"scene": null
},
{
"name": "工单详情",
"pathName": "tabWorkOrder/pages/confirmOrder/confirmOrder",
"query": "orderCode=2203092231001774",
"scene": null,
"launchMode": "default"
},
{
"name": "工单确认",
"pathName": "tabWorkOrder/pages/confirmOrder/confirmOrder",
"query": "orderCode=2204201800204697",
"launchMode": "default",
"scene": 1011
},
{
"name": "预约",
"pathName": "tabDate/pages/index/index",
"query": "",
"scene": null
},
{
"name": "无账号",
"pathName": "pages/nothing/nothing",
"query": "",
"scene": null
},
{
"name": "订单完成施工",
"pathName": "tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail",
"query": "orderCode=2203141643241660",
"launchMode": "default",
"scene": null
},
{
"name": "经营数据",
"pathName": "tabOperating/pages/index/index",
"query": "",
"scene": null
},
{
"name": "累计营收",
"pathName": "tabOperating/pages/operatingShow/operatingShow",
"query": "",
"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
}
]
{
"name": "工单详情",
"pathName": "tabWorkOrder/pages/confirmOrder/confirmOrder",
"query": "orderCode=2203092231001774",
"launchMode": "default",
"scene": null
},
{
"name": "工单确认",
"pathName": "tabWorkOrder/pages/orderDetail/orderDetail",
"query": "orderCode=2204251404181500",
"launchMode": "default",
"scene": 1011
},
{
"name": "预约",
"pathName": "tabDate/pages/index/index",
"query": "",
"scene": null
},
{
"name": "无账号",
"pathName": "pages/nothing/nothing",
"query": "",
"scene": null
},
{
"name": "订单完成施工",
"pathName": "tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail",
"query": "orderCode=2203141643241660",
"launchMode": "default",
"scene": null
},
{
"name": "经营数据",
"pathName": "tabOperating/pages/index/index",
"query": "",
"scene": null
},
{
"name": "累计营收",
"pathName": "tabOperating/pages/operatingShow/operatingShow",
"query": "",
"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
......@@ -73,5 +73,10 @@ module.exports = {
/** 根据订单状态统计订单数*/
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 @@
</view>
</block>
</view>
<view class="qr-box">
<image src="../../images/kf.png" />
<!-- <view class="qr-box">
<image src="{{customerService}}" />
</view>
<view class="warranty-tips">建议让客户扫码关注客服查询质保</view>
<view class="warranty-tips">建议让客户扫码关注客服查询质保</view> -->
</view>
</block>
</view>
......
......@@ -10,7 +10,8 @@ Page({
...order_mixins.data,
qrFlag: true,
qrHeight: 107,
isYqdSuper: app.globalData.isYqdSuper
isYqdSuper: app.globalData.isYqdSuper,
customerService: '../../images/kf.png'
},
jumpUpdate() {
......@@ -54,7 +55,6 @@ Page({
onRoute(options) {
console.log(options)
if (options.orderCode) {
// console.log('5555555555555')
this.setData({
orderCode: options.orderCode
})
......@@ -66,6 +66,8 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
// debugger
if (options.orderCode) {
this.getOrderDetail(options.orderCode)
}
......@@ -119,8 +121,11 @@ Page({
warrantyCardList
})
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 {
wx.showModal({
title: '温馨提示',
......@@ -186,6 +191,26 @@ Page({
delete orderInfo.orderCode
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) {
let { url } = e.currentTarget.dataset
wx.previewImage({
......@@ -225,24 +250,24 @@ Page({
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {},
onReachBottom: function () {}
/**
* 去发表
*/
sendGrass: function () {
let o = this.data.orderInfo || {}
let code = o.orderCode
let list = o.subOrderList || []
let arr = []
arr.push(o.sellerMerchantName)
list.map(k => {
arr.push(k.upgradeGoodsName)
})
wx.navigateTo({
url: '/tabGrass/pages/release/index?code=' + code + '&topicNames=' + arr.toString()
})
}
// sendGrass: function () {
// let o = this.data.orderInfo || {}
// let code = o.orderCode
// let list = o.subOrderList || []
// let arr = []
// arr.push(o.sellerMerchantName)
// list.map(k => {
// arr.push(k.upgradeGoodsName)
// })
// wx.navigateTo({
// url: '/tabGrass/pages/release/index?code=' + code + '&topicNames=' + arr.toString()
// })
// }
// 获取种草详情
// getGrass: function (orderCode) {
......
......@@ -137,7 +137,7 @@
</view>
</block>
</view>
<block wx:if="{{warrantyCardList&&warrantyCardList.length}}">
<!-- <block wx:if="{{warrantyCardList&&warrantyCardList.length}}">
<view class="box">
<view class="title">质保详情</view>
<view class="warranty-box">
......@@ -156,6 +156,29 @@
</view>
<view class="warranty-tips">建议让客户扫码关注客服查询质保</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 wx:if="{{orderInfo.status == 6 || orderInfo.status== 4 || orderInfo.status == 2}}">
<view class="box">
......
......@@ -9,7 +9,8 @@ Page({
data: {
...order_mixins.data,
showTips: true,
isYqdSuper: app.globalData.isYqdSuper
isYqdSuper: app.globalData.isYqdSuper,
customerService: '../../images/kf.png'
},
jumpUpdate() {
let { orderInfo } = this.data
......@@ -145,8 +146,9 @@ Page({
})
// 去掉车主评价功能
// this.setQrBoxHeight()
if (data.status == 6) return
this.getQrCode(data)
// if (data.status == 6) return
// this.getQrCode(data)
this.getWorkWechatLiveQRCode()
} else {
wx.showModal({
title: '温馨提示',
......@@ -208,12 +210,39 @@ Page({
delete orderInfo.orderCode
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) {
let { url } = e.currentTarget.dataset
wx.previewImage({
urls: [url],
current: url
})
console.log(url)
if (url.includes('http')) {
wx.previewImage({
urls: [url],
current: url
})
} else {
// 重新请求图片
this.getWorkWechatLiveQRCode()
console.log('重新请求图片')
}
},
/**
* 生命周期函数--监听页面初次渲染完成
......
......@@ -128,9 +128,10 @@
</view>
</block>
</view>
<block wx:if="{{warrantyCardList&&warrantyCardList.length}}">
<!-- wx:if="{{warrantyCardList&&warrantyCardList.length}}" -->
<block>
<view class="box">
<view class="title">质保详情</view>
<view class="title">{{orderInfo.selectPayType==0? '客服' :'质保详情'}}</view>
<view class="warranty-box">
<block wx:for="{{warrantyCardList}}" wx:key="index">
<view class="warranty-card">
......@@ -143,9 +144,11 @@
</block>
</view>
<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 class="warranty-tips">建议让客户扫码关注客服查询质保</view>
</view>
</block>
<!-- <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!