From f5427eeb16cadd3b0534454ab3c92df6f0ec1536 Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期日, 02 七月 2023 16:49:13 +0800 Subject: [PATCH] 图片地址替换 --- pages/customer-page/customer-index/customer-index.vue | 73 +++++++++++++++++++++++++++--------- 1 files changed, 55 insertions(+), 18 deletions(-) diff --git a/pages/customer-page/customer-index/customer-index.vue b/pages/customer-page/customer-index/customer-index.vue index 499b969..e7df02e 100644 --- a/pages/customer-page/customer-index/customer-index.vue +++ b/pages/customer-page/customer-index/customer-index.vue @@ -4,7 +4,7 @@ <view class="customer-index-body"> <!-- 寰呴鍙栧拰杞彂鎻愮叅鍗� --> <view class="wait-collection" - style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/customerbanner.png') no-repeat;background-size:contain"> + :style="{ backgroundImage: `url(${onlineurl}/appimg/image/banner/customerbanner.png)`, backgroundSize: 'contain', backgroundRepeat: 'no-repeat' }"> </view> <view style="position: relative;top: -120px;"> <u-empty mode="data" @@ -20,38 +20,54 @@ @click="cardBodyClick(item)"> <view class="first-line"> <view class="dispatch-receive"> - <view class="dispatch">{{ item.filedName }}</view> + <view class="dispatch">{{ item.filedName||'' }}</view> </view> - <view class="point-number"> - <text class="residue">{{ item.cars2 }}</text> - <text>/{{ item.carNum }}</text> + <view class="point-number" + v-if="roleType == 1"> + <text class="residue">{{ item.cars2||'' }}</text> + <text>/{{ item.carNum ||''}}</text> </view> </view> <view class="second-line"> <view class="coal-name"> - <view class="">{{ item.coalName }}</view> + <view class="">{{ item.coalName ||''}}</view> <view class="black-bar"></view> <view class="coal-type" - v-if="item.orderType">{{ item.orderType }}</view> + v-if="item.orderType">{{ item.orderType||'' }}</view> </view> </view> <view class="third-line"> <view class="time-icon"> <view - style="width: 24rpx;height: 24rpx;li ne-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clock.png') no-repeat;background-size: cover"> + :style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/carNO.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'24rpx',height:'24rpx',lineHeight:'24rpx'}"> + </view> + </view> + <view class="car-num">{{ item.carNos||item.carNo||''}}</view> + </view> + <view class="third-line"> + <view class="time-icon"> + <view + :style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/clock.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'24rpx',height:'24rpx',lineHeight:'24rpx'}"> </view> </view> <view class="send-date">{{ item.sendDate }}</view> </view> <view class="fourth-line"> <view class="receive" - @click.stop="receiveClick(item)"> + @click.stop="receiveClick(item)" + v-if="item.orderType!=='澶栬喘'"> <view class="button-image">棰嗗彇</view> </view> <view class="forward" - @click.stop="forwardClick(item)"> + @click.stop="forwardClick(item)" + v-if="item.orderType!=='澶栬喘'"> <view class="button-image">杞彂</view> </view> + <!-- <view class="forward" + @click.stop="validateClick(index)" + v-if='roleType===4'> + <view class="button-image">楠岃川</view> + </view> --> </view> </view> </view> @@ -102,7 +118,7 @@ <view class="fourth"> <view class="fourth-icon"> <view - style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clock.png') no-repeat;background-size: cover"> + :style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/clock.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'24rpx',height:'24rpx',lineHeight:'24rpx'}"> </view> </view> <view class="senddate">{{ item.sendDate }}</view> @@ -110,7 +126,7 @@ <view class="fourth"> <view class="fourth-icon"> <view - style="width: 26rpx;height: 26rpx;line-height: 26rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/carnNUm.png') no-repeat;background-size: cover;"> + :style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/carnNUm.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'26rpx',height:'26rpx',lineHeight:'26rpx'}"> </view> </view> <view class="senddate">{{ item.orderCode }}</view> @@ -146,6 +162,7 @@ </template> <script> + import { onlineurl } from '@/api/request.js' import card from '@/components/card/card.vue'; import combinedTitle from '@/components/combined-title/combined-title.vue'; import { customerId } from '@/utils/status'; @@ -172,7 +189,7 @@ computed: { roleType() { return uni.getStorageSync('roleType'); - } + }, }, data() { return { @@ -199,7 +216,8 @@ carNum: "", // 鍓╀綑鐨勬彁鐓ゅ崟鏁伴噺 carNumSurplus: '', - canClick: false + canClick: false, + onlineurl: '' }; }, onLoad() {}, @@ -210,6 +228,7 @@ init() { this.GetOrderPlan(); this.getJhOrderPlanDataPage(); + this.onlineurl = onlineurl; }, // 鑾峰彇鍙戣繍璁″垝鍒楄〃 GetOrderPlan() { @@ -313,7 +332,7 @@ // 鎻愮叅鍗曡鎯� cardBodyClick(v) { uni - .navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&code=${v.code}&cars2=${v.cars2}` }); + .navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&code=${v.code}&cars2=${v.cars2?v.cars2:""}` }); }, // 鐐瑰嚮鍘嗗彶鎻愮叅鍗曡幏鍙栬鎯� faYundetail(v) { @@ -326,7 +345,12 @@ if (obj.cars2 == 0) return this.$u.toast('璇峰厛棰嗗彇鍚庡啀杞彂'); uni .navigateTo({ url: `/pages/public-page/forward/forward?orderPlanId=${obj.id}&carNumSurplus1=${obj.carNumSurplus1}&carNum=${obj.carNum}&cars2=${obj.cars2}` }); - } + }, + // 楠岃川 + validateClick(index) { + uni + .navigateTo({ url: `/pages/driver-page/driver-index/bill-of-lading-details/selectOrderPlan/selectOrderPlan?index=${index}` }); + }, } }; </script> @@ -552,7 +576,7 @@ } .third-line { - width: 40%; + width: 80%; height: vww(30); margin-left: vww(15); display: flex; @@ -568,13 +592,26 @@ font-weight: 300; color: #515151; } + + .car-num { + color: #515151; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + .time-icon { + width: 24rpx; + height: 24rpx; + line-height: 24rpx; + } } .fourth-line { width: 100%; height: vww(30); @include flex; - justify-content: flex-start; + justify-content: flex-end; position: relative; bottom: vww(10); left: 25%; -- Gitblit v1.9.1