Commit 6021515df0b2180afef9bc30f099f67ac3b5e4af

Authored by guzijian
1 parent 23b65fba

feat: 修改提示文字

garbage-removal/src/apis/order.js
1 1 import { request } from "@/utils/request";
2 2  
3 3 /**
4   - * @method 保存
  4 + * @method 保存
5 5 */
6   -export async function saveOrder( params,config) {
7   - return await request.post(
8   - `/order/add`,
9   - params,
10   - config
11   - );
  6 +export async function saveOrder(params, config) {
  7 + return await request.post(`/order/add`, params, config);
12 8 }
13 9  
14 10 /**
15   - * @method 单详情
  11 + * @method 单详情
16 12 */
17 13 export async function queryOrderDetail(id) {
18   - return await request.get(
19   - `/order/detail/${id}`
20   - );
  14 + return await request.get(`/order/detail/${id}`);
21 15 }
22 16  
23   -
24   -
25 17 /**
26   - * @method 单列表
  18 + * @method 单列表
27 19 */
28 20 export async function queryOrderList(data) {
29   - return await request.get(
30   - `/order/query/list?type=${data.type}&pageNo=${data.pageNo}&pageSize=${data.pageSize}`,
  21 + return await request.get(
  22 + `/order/query/list?type=${data.type}&pageNo=${data.pageNo}&pageSize=${data.pageSize}`
31 23 );
32 24 }
33 25  
34   -
35 26 /**
36   - * @method 修改单状态
  27 + * @method 修改单状态
37 28 */
38   -export async function updateOrder(params,config) {
39   - return await request.put(
40   - `/order/update`,
41   - params,
42   - config
43   - );
  29 +export async function updateOrder(params, config) {
  30 + return await request.put(`/order/update`, params, config);
44 31 }
45 32  
46 33 /**
47 34 * @method 上传图片
48 35 */
49   -export async function uploadImageUrlByType(params,config) {
50   - return await request.post(
51   - `/order/upload/imageUrl`,
52   - params,
53   - config
54   - );
  36 +export async function uploadImageUrlByType(params, config) {
  37 + return await request.post(`/order/upload/imageUrl`, params, config);
55 38 }
56 39  
57   -
58 40 /**
59 41 * @method 提交评价
60 42 */
61   -export async function uploadEvaluate(params,config) {
62   - return await request.post(
63   - `/order/evaluate`,
64   - params,
65   - config
66   - );
  43 +export async function uploadEvaluate(params, config) {
  44 + return await request.post(`/order/evaluate`, params, config);
67 45 }
... ...
garbage-removal/src/pages/home/clean/index.vue
... ... @@ -212,17 +212,17 @@ const handleCarInfo = () => {
212 212 const handleOderSure = () => {
213 213 let params = {
214 214 /**
215   - * 单地址
  215 + * 单地址
216 216 */
217 217 garOrderAddress: userAddress.value.garUserAddress,
218 218  
219 219 /**
220   - * 单详细地址
  220 + * 单详细地址
221 221 */
222 222 garOrderAddressDetails: userAddress.value.garRemark,
223 223  
224 224 /**
225   - * 单姓名
  225 + * 单姓名
226 226 */
227 227 garOrderContactName: userAddress.value.garUserContactName,
228 228 garOrderCarNumber: paramFrom.value.carNumber,
... ... @@ -234,7 +234,7 @@ const handleOderSure = () => {
234 234 garOrderTrashType: paramFrom.value.garbageType,
235 235  
236 236 /**
237   - * 单人电话
  237 + * 单人电话
238 238 */
239 239 garOrderContactTel: userAddress.value.garUserContactTel,
240 240  
... ... @@ -270,7 +270,7 @@ const handleOderSure = () => {
270 270 return;
271 271 }
272 272 saveOrder(params).then(res => {
273   - // TODO 单详情
  273 + // TODO 单详情
274 274 if (res.data.success) {
275 275 uni.$u.route({
276 276 type: "redirect",
... ...
garbage-removal/src/pages/order/detail/index.vue
... ... @@ -17,7 +17,7 @@
17 17 <text v-if="dataGram.garCancelFlag == 0" style="color: red;">请于交易完成后线下支付!!</text>
18 18 <view v-else style="display: flex; color:red;">
19 19 <u-icon name="close-circle" color="red"></u-icon>
20   - <text> &nbsp;&nbsp;单已被取消!原因:{{ dataGram.garReason }}</text>
  20 + <text> &nbsp;&nbsp;单已被取消!原因:{{ dataGram.garReason }}</text>
21 21 </view>
22 22 </view>
23 23 <!-- 派单信息 -->
... ... @@ -147,11 +147,11 @@
147 147 <view class="order-detail-bottom-box">
148 148 <view class=" order-detail-bottom-left">
149 149 <u-button v-if="dataGram.garOrderHandlerStatus === 0 && userType == '管理负责人'" @click="handleOderCancelClick()"
150   - shape="circle" color="#a9e08f" text="取消单"></u-button>
  150 + shape="circle" color="#a9e08f" text="取消单"></u-button>
151 151 </view>
152 152 <view class="order-detail-bottom-right">
153 153 <u-button v-if="dataGram.garOrderHandlerStatus === 0 && userType == '居民用户'" @click="handleOderCancelClick()"
154   - shape="circle" color="#a9e08f" text="取消单"></u-button>
  154 + shape="circle" color="#a9e08f" text="取消单"></u-button>
155 155 <u-button @click="handleOrder(orderId)"
156 156 v-if="dataGram.garOrderHandlerStatus === 0 && dataGram.handleFlag && dataGram.garCancelFlag === 0"
157 157 shape="circle" color="#a9e08f" text="处理派单"></u-button>
... ... @@ -201,7 +201,7 @@ const list = ref([
201 201 name: '长时间无人接单',
202 202 },
203 203 {
204   - name: '单信息填写有误',
  204 + name: '单信息填写有误',
205 205 },
206 206 {
207 207 name: '线下协商有问题',
... ... @@ -259,7 +259,7 @@ const handleOderCancelClick = () =&gt; {
259 259 }
260 260  
261 261 /**
262   - * 提交取消
  262 + * 提交取消
263 263 */
264 264 const submitFunction = (otherReason) => {
265 265 let reason = otherReason
... ... @@ -316,11 +316,11 @@ const handleEvaluate = (orderId, userType) =&gt; [
316 316 uni.$u.route(`pages/order/evaluate/index?orderId=${orderId}&userType=${userType}`)
317 317 ]
318 318  
319   -// 接收
  319 +// 接收
320 320 const handleOrder = (orderId) => {
321 321 updateOrder({ garOrderId: orderId, handleType: 0 }).then(res => {
322 322 if (res.data.success) {
323   - if (res.data.data === "单已经被别人接受啦") {
  323 + if (res.data.data === "单已经被别人接受啦") {
324 324 uni.$u.toast(res.data.data)
325 325 uni.$u.route({
326 326 type: "reLaunch",
... ...
garbage-removal/src/pages/order/swiper-list-item/index.vue
... ... @@ -88,7 +88,7 @@ const list = ref([
88 88 name: '长时间无人接单',
89 89 },
90 90 {
91   - name: '单信息填写有误',
  91 + name: '单信息填写有误',
92 92 },
93 93 {
94 94 name: '线下协商有问题',
... ... @@ -107,7 +107,7 @@ const dataList = ref([]);
107 107 const paging = ref(null);
108 108 const firstLoaded = ref(false)
109 109 /**
110   - * 取消
  110 + * 取消
111 111 * @param {string} orderId
112 112 */
113 113 const handleCancelOrder = (orderId) => {
... ... @@ -122,7 +122,7 @@ const selectClick = (index) =&gt; {
122 122 currentCancelName.value = index.name;
123 123 }
124 124 /**
125   - * 提交取消
  125 + * 提交取消
126 126 */
127 127 const submitFunction = (otherReason) => {
128 128 let reason = otherReason
... ... @@ -156,7 +156,7 @@ const handleClick = (orderId) =&gt; {
156 156 }
157 157  
158 158 /**
159   - * 单评价
  159 + * 单评价
160 160 * @param {*} orderId
161 161 */
162 162 const handleUserEvaluate = (orderId, userType) => {
... ...
garbage-removal/src/pages/order/upload/index.vue
... ... @@ -86,25 +86,12 @@ const handleSubmit = (id, type) =&gt; {
86 86 }
87 87  
88 88 const validateImage = () => {
89   -
90 89 for (let index = 0; index < fileList.value.length; index++) {
91 90 const str = fileList.value[index].url;
92   - // #ifdef H5
93   - if (str.startsWith("blob")) {
94   - return false;
95   - }
96   - // #endif
97   -
98   - // #ifdef MP-WEIXIN
99   - if (uni.$u.test.contains(str, "/tmp/")) {
  91 + if (!str.startsWith("/profile/upload")) {
100 92 return false;
101 93 }
102   - // #endif
103   -
104 94 }
105   - //
106   - // #ifdef
107   -
108 95 return true;
109 96 }
110 97  
... ...
garbage-removal/src/uview-plus/components/u-empty/u-empty.vue
1 1 <template>
2   - <view
3   - class="u-empty"
4   - :style="[emptyStyle]"
5   - v-if="show"
6   - >
7   - <u-icon
8   - v-if="!isSrc"
9   - :name="mode === 'message' ? 'chat' : `empty-${mode}`"
10   - :size="iconSize"
11   - :color="iconColor"
12   - margin-top="14"
13   - ></u-icon>
14   - <image
15   - v-else
16   - :style="{
17   - width: $u.addUnit(width),
18   - height: $u.addUnit(height),
19   - }"
20   - :src="icon"
21   - mode="widthFix"
22   - ></image>
23   - <text
24   - class="u-empty__text"
25   - :style="[textStyle]"
26   - >{{text ? text : icons[mode]}}</text>
  2 + <view class="u-empty" :style="[emptyStyle]" v-if="show">
  3 + <u-icon v-if="!isSrc" :name="mode === 'message' ? 'chat' : `empty-${mode}`" :size="iconSize" :color="iconColor"
  4 + margin-top="14"></u-icon>
  5 + <image v-else :style="{
  6 + width: $u.addUnit(width),
  7 + height: $u.addUnit(height),
  8 + }" :src="icon" mode="widthFix"></image>
  9 + <text class="u-empty__text" :style="[textStyle]">{{text ? text : icons[mode]}}</text>
27 10 <view class="u-empty__wrap" v-if="$slots.default || $slots.$default">
28 11 <slot />
29 12 </view>
... ... @@ -31,9 +14,9 @@
31 14 </template>
32 15  
33 16 <script>
34   - import props from './props.js';
35   - import mpMixin from '../../libs/mixin/mpMixin.js';
36 17 import mixin from '../../libs/mixin/mixin.js';
  18 +import mpMixin from '../../libs/mixin/mpMixin.js';
  19 +import props from './props.js';
37 20 /**
38 21 * empty 内容为空
39 22 * @description 该组件用于需要加载内容,但是加载的第一页数据就为空,提示一个"没有内容"的场景, 我们精心挑选了十几个场景的图标,方便您使用。
... ... @@ -50,7 +33,7 @@
50 33 * @property {Boolean} show 是否显示组件 (默认 true )
51 34 * @property {String | Number} marginTop 组件距离上一个元素之间的距离,默认px单位 (默认 0 )
52 35 * @property {Object} customStyle 定义需要用到的外部样式
53   - *
  36 + *
54 37 * @event {Function} click 点击组件时触发
55 38 * @event {Function} close 点击关闭按钮时触发
56 39 * @example <u-empty text="所谓伊人,在水一方" mode="list"></u-empty>
... ... @@ -66,7 +49,7 @@
66 49 search: '没有搜索结果',
67 50 address: '没有收货地址',
68 51 wifi: '没有WiFi',
69   - order: '单为空',
  52 + order: '单为空',
70 53 coupon: '没有优惠券',
71 54 favor: '暂无收藏',
72 55 permission: '无权限',
... ... @@ -103,27 +86,28 @@
103 86 </script>
104 87  
105 88 <style lang="scss" scoped>
106   - @import '../../libs/css/components.scss';
107   - $u-empty-text-margin-top:20rpx !default;
108   - $u-empty-slot-margin-top:20rpx !default;
  89 +@import '../../libs/css/components.scss';
  90 +$u-empty-text-margin-top: 20rpx !default;
  91 +$u-empty-slot-margin-top: 20rpx !default;
109 92  
110   - .u-empty {
  93 +.u-empty {
  94 + @include flex;
  95 + flex-direction: column;
  96 + justify-content: center;
  97 + align-items: center;
  98 +
  99 + &__text {
111 100 @include flex;
112   - flex-direction: column;
113 101 justify-content: center;
114 102 align-items: center;
115   -
116   - &__text {
117   - @include flex;
118   - justify-content: center;
119   - align-items: center;
120   - margin-top: $u-empty-text-margin-top;
121   - }
  103 + margin-top: $u-empty-text-margin-top;
122 104 }
123   - .u-slot-wrap {
124   - @include flex;
125   - justify-content: center;
126   - align-items: center;
127   - margin-top:$u-empty-slot-margin-top;
128   - }
  105 +}
  106 +
  107 +.u-slot-wrap {
  108 + @include flex;
  109 + justify-content: center;
  110 + align-items: center;
  111 + margin-top: $u-empty-slot-margin-top;
  112 +}
129 113 </style>
... ...