23 changed files with 220 additions and 345 deletions
Split View
Diff Options
-
1app.json
-
17pages/agent/detail/index.js
-
16pages/agent/edit/index.js
-
7pages/agent/factory/index.js
-
6pages/agent/order/index.js
-
52pages/agent/vehicles/index.js
-
7pages/agent/vehicles/index.json
-
25pages/agent/vehicles/index.wxml
-
1pages/agent/vehicles/index.wxss
-
75pages/api/ztb.js
-
2pages/article/article-item/index.wxml
-
2pages/article/detail/index.wxml
-
2pages/article/list/index.wxml
-
8pages/goods/ablility/index.js
-
127pages/goods/create/index.js
-
27pages/goods/detail/index.js
-
28pages/goods/index/index.js
-
9pages/mall/index/index.js
-
8pages/purchase/ability/index.js
-
23pages/purchase/create/index.js
-
37pages/shop/create/index.js
-
77pages/shop/detail/index.js
-
8pages/shop/index/index.js
@ -1,52 +0,0 @@ |
|||
// pages/agent/vehicles/index.js
|
|||
const request = require('../../../utils/request') //导入模块
|
|||
const util = require('../../../utils/util') |
|||
const event = require('../../../utils/event.js') |
|||
const app = getApp() |
|||
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
height: app.globalData.fragmentHeight, |
|||
loading: true, |
|||
plateList: [] |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.setData({ height: app.globalData.fragmentHeight }) |
|||
// /proxy-sell/get/his-car-info客户查看历史车辆
|
|||
request.get('/recycle-service/proxy-sell/get/his-car-info').then(result => { |
|||
this.setData({ plateList: result.data.records, loading: false }) |
|||
}).catch(err => { |
|||
//异常回调
|
|||
this.setData({ loading: false }) |
|||
util.showToast(err) |
|||
}) |
|||
}, |
|||
selectItem: function (e) { |
|||
var item = this.data.plateList[e.currentTarget.dataset.index] |
|||
event.emit('EventMessage', { what: 402, obj: item, desc: 'PlateChoose' }) |
|||
wx.navigateBack({ delta: 1 }) |
|||
}, |
|||
deleteItem: function (e) { |
|||
var item = this.data.plateList[e.currentTarget.dataset.index] |
|||
wx.showLoading({ title: '加载中', mask: true }) |
|||
// /proxy-sell/get/his-car-info客户查看历史车辆
|
|||
request.get('/recycle-service/proxy-sell/delete/his-car-info', { id: item.id }).then(result => { |
|||
this.data.plateList.splice(e.currentTarget.dataset.index, 1) |
|||
this.setData({ plateList: this.data.plateList }) |
|||
wx.hideLoading() |
|||
}).catch(err => { |
|||
//异常回调
|
|||
wx.hideLoading() |
|||
util.showToast(err) |
|||
}) |
|||
} |
|||
|
|||
}) |
|||
@ -1,7 +0,0 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"wux-cell-group": "/components/cell-group/index", |
|||
"wux-cell": "/components/cell/index", |
|||
"wux-button": "/components/button/index" |
|||
} |
|||
} |
|||
@ -1,25 +0,0 @@ |
|||
<!--pages/agent/vehicles/index.wxml--> |
|||
<cu-custom bgColor="bg-white" isBack="{{true}}"> |
|||
<view slot="content" style="color:black;font-size:36rpx">历史车辆</view> |
|||
</cu-custom> |
|||
|
|||
<scroll-view scroll-y style="height: {{height}}rpx"> |
|||
<view class="bg-white list-empty" style="height:{{height}}rpx" wx:if="{{!plateList.length}}"> |
|||
<view class="load-spinner text-gray" style="margin-bottom:24px" wx:if="{{loading}}" /> |
|||
<image class="img-empty" src="/assets/image/list_empty.png" wx:else></image> |
|||
<view class="text-empty">{{loading? '正在加载' : '暂无数据'}}</view> |
|||
</view> |
|||
<wux-cell-group wx:else> |
|||
<wux-cell wx:for="{{plateList}}" wx:key="index" data-index="{{index}}" bind:click="selectItem"> |
|||
<view slot="header"> |
|||
<view class="text-sg text-black text-bold" style="line-height:30rpx;">{{item.plateNumber}}</view> |
|||
<view class="flex" style="margin-top:18rpx"> |
|||
<view class="text-sg text-gray" style="line-height: 30rpx;width:150rpx">{{item.driverName}}</view> |
|||
<view class="text-sg text-gray" style="line-height: 30rpx;">{{item.driverPhone}}</view> |
|||
</view> |
|||
</view> |
|||
<wux-button slot="footer" outline type="assertive" size="small" data-index="{{index}}" bind:click="deleteItem">删除 |
|||
</wux-button> |
|||
</wux-cell> |
|||
</wux-cell-group> |
|||
</scroll-view> |
|||
@ -1 +0,0 @@ |
|||
/* pages/agent/vehicles/index.wxss */ |
|||
Write
Preview
Loading…
Cancel
Save