Browse Source

【优化】 页面onshow 刷新 my

【修复】 首页图片显示不出来
【新增】 评卡详情上面的图片没显示
【修改】 保价不要了
【新增】 送评详情加个订单编号在发货单号上面,加上复制按钮
【优化】 费用明细 没有其他费用,不显示这个卡片
master
邓平艺 4 years ago
parent
commit
fd59fb45a4
  1. 7
      components/lf-table.vue
  2. 2
      config/index.js
  3. 27
      packages/ratingQueryDetail/ratingQueryDetail.vue
  4. 21
      packages/sonpingDetail/sonpingDetail.vue
  5. 23
      pages/index/index.vue

7
components/lf-table.vue

@ -7,7 +7,8 @@
</view> </view>
<view <view
class="headerTitle" class="headerTitle"
v-for="itemH in Header"
v-for="(itemH, indexH) in Header"
:key="indexH"
:style="{height: formRowHeight,width: itemH.width+'rpx', border: border ? '1px solid #F6F6F6' : 'none', 'background-color': headBgColor}"> :style="{height: formRowHeight,width: itemH.width+'rpx', border: border ? '1px solid #F6F6F6' : 'none', 'background-color': headBgColor}">
{{itemH.text}} {{itemH.text}}
</view> </view>
@ -16,8 +17,8 @@
暂无数据 暂无数据
</view> </view>
<view :style="{width: length + 'rpx'}"> <view :style="{width: length + 'rpx'}">
<view class="contentBox" v-for="(itemC,index) in Content" @click="clickList(itemC,index)">
<block v-for="(itemH,index2) in Header">
<view class="contentBox" v-for="(itemC,index) in Content" :key="index" @click="clickList(itemC,index)">
<block v-for="(itemH,index2) in Header" :key="index2">
<view class="keyBox" :style="{height: formRowHeight,width: itemH.width+'rpx', border: border ? '1px solid #F6F6F6' : 'none'}"> <view class="keyBox" :style="{height: formRowHeight,width: itemH.width+'rpx', border: border ? '1px solid #F6F6F6' : 'none'}">
{{itemC[itemH.key]}} {{itemC[itemH.key]}}
</view> </view>

2
config/index.js

@ -11,7 +11,7 @@ module.exports = (() => {
config.Timeout = 10000 // 请求超时时间,单位 ms config.Timeout = 10000 // 请求超时时间,单位 ms
// 基础服务器地址 // 基础服务器地址
config.BASE_URL = 'http://127.0.0.1:8000' // 开发环境
config.BASE_URL = 'https://qxk.leadfyy.com' // 开发环境
// config.BASE_URL = '' // 生产环境 // config.BASE_URL = '' // 生产环境

27
packages/ratingQueryDetail/ratingQueryDetail.vue

@ -1,18 +1,11 @@
<template> <template>
<view class="flex-col page"> <view class="flex-col page">
<view class="flex-col group_4"> <view class="flex-col group_4">
<!-- <view class="flex-col section_2">
<view class="flex-col section_2" v-if="imageList.length > 0">
<view class="flex-row equal-division"> <view class="flex-row equal-division">
<image
src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/62677e395a7e3f03107ffc5f/62677e4a35a7e10011e93a80/16509497793576171527.png"
class="equal-division-item"
/>
<image
src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/62677e395a7e3f03107ffc5f/62677e4a35a7e10011e93a80/16509497793686883881.png"
class="equal-division-item image_7"
/>
<image :src="item" class="equal-division-item" v-for="(item, index) in imageList" :key="index" />
</view> </view>
</view> -->
</view>
<view class="flex-col section_3"> <view class="flex-col section_3">
<view class="flex-row"> <view class="flex-row">
<text class="text_2">编号</text> <text class="text_2">编号</text>
@ -94,6 +87,15 @@
details: {}, details: {},
}; };
}, },
computed: {
imageList(){
let list = [];
if(this.details.images){
list = String(this.details.images).split(',').splice(0, 2);
}
return list;
}
},
onLoad(options){ onLoad(options){
if(this.$valueType(options.data) !== 'undefined'){ if(this.$valueType(options.data) !== 'undefined'){
this.details = JSON.parse(decodeURIComponent(options.data)); this.details = JSON.parse(decodeURIComponent(options.data));
@ -110,12 +112,15 @@
}; };
</script> </script>
<style scoped lang="css">
<style scoped lang="scss">
.equal-division-item { .equal-division-item {
flex: 1 1 330rpx; flex: 1 1 330rpx;
border-radius: 10rpx; border-radius: 10rpx;
width: 330rpx; width: 330rpx;
height: 396rpx; height: 396rpx;
&:nth-child(2n){
margin-left: 25rpx;
}
} }
.left-text-wrapper { .left-text-wrapper {
width: 82rpx; width: 82rpx;

21
packages/sonpingDetail/sonpingDetail.vue

@ -1,7 +1,14 @@
<template> <template>
<view class="flex-col page"> <view class="flex-col page">
<view class="flex-col group_4"> <view class="flex-col group_4">
<view class="flex-row section_2">
<view class="flex-row section_2">
<view class="flex-row group_5">
<text class="text_2">订单编号</text>
<text class="text_3">{{ details.order.order_num || '暂无编号' }}</text>
</view>
<text class="text_4" style="color: #999999;" @click="setClipboardData(details.order.order_num || '')">复制</text>
</view>
<view class="flex-row section_2" style="padding-top: 0;">
<view class="flex-row group_5"> <view class="flex-row group_5">
<text class="text_2">发货单号</text> <text class="text_2">发货单号</text>
<text class="text_3">{{ details.order.back_express_numb || '暂无单号' }}</text> <text class="text_3">{{ details.order.back_express_numb || '暂无单号' }}</text>
@ -19,7 +26,7 @@
class="image_6" class="image_6"
/> />
</view> </view>
<view class="justify-between group_8" @click="details.order.amount && $url('/packages/sonpingDetail/expenseDetail?id='+ id)">
<view class="justify-between group_8" @click="details.order.amount && $url('/packages/sonpingDetail/expenseDetail?id='+ id)" v-if="details.order.amount">
<view class="flex-row"> <view class="flex-row">
<text class="text_7">费用</text> <text class="text_7">费用</text>
<text class="text_8">{{ details.order.amount || '暂无' }}</text> <text class="text_8">{{ details.order.amount || '暂无' }}</text>
@ -95,10 +102,10 @@
<text class="text_25">是否快评</text> <text class="text_25">是否快评</text>
<text class="text_26">{{ ['否','是'][details.order.is_fast] }}</text> <text class="text_26">{{ ['否','是'][details.order.is_fast] }}</text>
</view> </view>
<view class="flex-row group_22">
<!-- <view class="flex-row group_22">
<text class="text_27">保价</text> <text class="text_27">保价</text>
<text class="text_28">暂无</text> <text class="text_28">暂无</text>
</view>
</view> -->
<view class="flex-col group_23"> <view class="flex-col group_23">
<view class="flex-col"> <view class="flex-col">
<view class="flex-row"> <view class="flex-row">
@ -184,6 +191,12 @@
await changOrderAddress({order_id: this.details.order.order_id, addr_id: this.address.id}); await changOrderAddress({order_id: this.details.order.order_id, addr_id: this.address.id});
this.$msg('地址修改成功'); this.$msg('地址修改成功');
this.getGradingDetail(); this.getGradingDetail();
},
//
setClipboardData(data){
uni.setClipboardData({
data: data
})
} }
} }
}; };

23
pages/index/index.vue

@ -167,9 +167,16 @@
rateIndex: 0, rateIndex: 0,
user: {}, user: {},
dots: {}, dots: {},
evaluated_order: []
evaluated_order: [],
showCount: 0
}; };
}, },
onShow(){
this.showCount++;
if(this.showCount > 1){
this.getUserCenterDetail();
}
},
async onLoad(query){ async onLoad(query){
if(query && query.q){ if(query && query.q){
const q = decodeURIComponent(query.q); const q = decodeURIComponent(query.q);
@ -207,12 +214,14 @@
async getUserCenterDetail(){ async getUserCenterDetail(){
let res = await my(); let res = await my();
uni.setStorageSync('userInfo', res.data.datas.user);
this.user = res.data.datas.user;
this.dots = res.data.datas.dots;
let evaluated_order = res.data.datas.evaluated_order;
evaluated_order.forEach(item => item.itemImage = String(item.images).split(',')[0]);
this.evaluated_order = evaluated_order;
if(this.$isRight(res)){
uni.setStorageSync('userInfo', res.data.datas.user);
this.user = res.data.datas.user;
this.dots = res.data.datas.dots;
let evaluated_order = res.data.datas.evaluated_order;
evaluated_order.forEach(item => item.itemImage = String(item.itemImage).split(',')[0]);
this.evaluated_order = evaluated_order;
}
}, },
nextToGrading(){ nextToGrading(){
if(!this.isConsentAgreement) return this.$msg('请先阅读并同意协议'); if(!this.isConsentAgreement) return this.$msg('请先阅读并同意协议');

Loading…
Cancel
Save