Commit fa1045ae by zhangzhen

细节优化

parent 11667d02
......@@ -41,3 +41,8 @@ export const getListByIds=(data)=>{
let url=`/store/queryByStoreIds`
return http.post(url,data)
}
export const getStoreActivity=(data)=>{
let url=`/activity/query`
return http.get(url,data)
}
......@@ -413,6 +413,7 @@
getDictItem
} from "@/utils/tools.js"
import {
getStoreActivity,
listSortDistance,
roomInfo
} from "@/api/store.js";
......@@ -1074,6 +1075,13 @@
}
})
},
onGetStoreActivity(){
getStoreActivity({
storeId: this.id
}).then(res=>{
console.log(res)
})
},
// 获取房间信息相关
onLoading() {
roomInfo({
......@@ -1100,6 +1108,7 @@
if (this.roomInfo.roomLabelList && this.roomInfo.roomLabelList.length) {
this.roomLabelList = this.roomInfo.roomLabelList
}
this.onGetStoreActivity()
this.onGetSortDistance()
}
})
......
......@@ -4,17 +4,29 @@
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="list-item" @tap="onNavToOrderInfo(item)">
<view class="flex-between part-1">
<view class="">
<text class="text-title">{{item.name}}</text>
</view>
<view class="flex-row">
<text class="text-bold text-xl" :class="item.sign=='income'?'text-red':'text-black'">{{ item.price !== 0? payStatus[item.sign||'expenditure']:''}}</text>
<text class="text-black text-bold text-lg" >{{item.price}}</text>
<text class="text-title text-gray text-lg">充值金额</text>
<text class="text-bold text-black">{{item.rechargeAmount}}</text>
</view>
<view class="flex-col">
<view v-if="item.giveType.includes(1)" class="flex-row">
<text>赠送金额</text>
<text class="text-pink text-bold text-lg" >{{item.giveAmount}}</text>
</view>
<view v-if="item.giveType.includes(2)" class="flex-row">
<text>赠送时长</text>
<text class="text-pink text-bold text-lg" >{{item.duration}}小时</text>
</view>
<view v-if="item.giveType.includes(3)" class="flex-row">
<text>赠送优惠券</text>
<text class="text-pink text-bold text-lg" >{{item.consumerCouponIds||''}}1张</text>
</view>
</view>
</view>
<view class="flex-between part-1">
<text>{{item.createTime}}</text>
<text>{{item.payType}}</text>
<text>{{item.rechargeDate}}</text>
<text>{{payTypeEnum[item.payType]}}</text>
</view>
</view>
</view>
......@@ -132,7 +144,12 @@ import NoLogin from "@/components/noLogin/noLogin"
uni.hideLoading()
if (res.data.code == 200) {
if(this.queryParams.pageNum ==1){
this.list = res.data.rows
this.list = res.data.rows.map(item=> {
return {
...item,
giveType: item.giveType.split(',').map(v=>Number(v))
}
})
}else{
this.list = [...this.list,...res.data.rows]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment