this is lastest update

This commit is contained in:
chen-xin-zhi 2025-03-24 11:30:22 +08:00
parent 316e4848ff
commit 56b474f407
4 changed files with 88 additions and 71 deletions

View File

@ -130,9 +130,10 @@
const cancelBookingOrder = ref(null) const cancelBookingOrder = ref(null)
const deleteBookingOrder = ref(null) const deleteBookingOrder = ref(null)
const advanceOrderList = ref([]) const advanceOrderList = ref([])
const tempAdvanceOrderList = ref([])
const isShowMask = ref(false) const isShowMask = ref(false)
const bkgUrl = ref(bookUrl + '/photoProductsOrderDetail/bkg.png') const bkgUrl = ref(bookUrl + '/photoProductsOrderDetail/bkg.png')
onLoad((options) => { onLoad(() => {
getFonts() getFonts()
}) })
@ -204,12 +205,14 @@
} }
} }
} }
await getAdvanceOrder() if (index === 0) {
if (index == 1) { advanceOrderList.value = tempAdvanceOrderList.value
advanceOrderList.value = advanceOrderList.value.filter(item => item.orderStatus === '待发货')
} }
if (index == 2) { if (index === 1) {
advanceOrderList.value = advanceOrderList.value.filter(item => item.orderStatus === '交易成功') advanceOrderList.value = tempAdvanceOrderList.value.filter(item => item.orderStatus === '待发货')
}
if (index === 2) {
advanceOrderList.value = tempAdvanceOrderList.value.filter(item => item.orderStatus === '交易成功')
} }
} }
@ -311,6 +314,7 @@
} }
}) })
advanceOrderList.value = res.data.data advanceOrderList.value = res.data.data
tempAdvanceOrderList.value = res.data.data
console.log('订单列表打印==================>') console.log('订单列表打印==================>')
advanceOrderList.value.forEach(order => { advanceOrderList.value.forEach(order => {
if (order.orderStatus === '待支付') { if (order.orderStatus === '待支付') {

View File

@ -129,6 +129,7 @@
const cookie = wx.getStorageSync("cookie") // const cookie = wx.getStorageSync("cookie") //
const bkgUrl = ref(clothesRentUrl + '/clothesRentOrderList/bkg.png') const bkgUrl = ref(clothesRentUrl + '/clothesRentOrderList/bkg.png')
const orderList = ref([]) const orderList = ref([])
const tempOrderList = ref([])
let wxPayTimer = null; let wxPayTimer = null;
let loading = false; let loading = false;
@ -176,6 +177,7 @@
} }
}) })
orderList.value = res.data.data orderList.value = res.data.data
tempOrderList.value = res.data.data
dealTimeout() dealTimeout()
orderList.value.forEach(order => { orderList.value.forEach(order => {
startCountdown(order) startCountdown(order)
@ -194,10 +196,11 @@
color.value[i] = '#323232' color.value[i] = '#323232'
} }
} }
await getRentOrderList()
if (point.value !== 0) { if (point.value !== 0) {
orderList.value = orderList.value.filter(item => item.orderStatus === orderStatusList[point.value]) orderList.value = tempOrderList.value.filter(item => item.orderStatus === orderStatusList[point.value])
} } else {
orderList.value = tempOrderList.value
}
} }

View File

@ -140,6 +140,7 @@
let orderStatusList = ['全部', '待支付', '待发货', '待收货', '已退款'] let orderStatusList = ['全部', '待支付', '待发货', '待收货', '已退款']
const cookie = wx.getStorageSync('cookie') const cookie = wx.getStorageSync('cookie')
const orderList = ref([]) const orderList = ref([])
const tempOrderList = ref([])
const orderNumber = ref('') const orderNumber = ref('')
const isHiddenInput = ref(true) const isHiddenInput = ref(true)
const status = ref(0) const status = ref(0)
@ -210,8 +211,10 @@
} }
await getMyOrder() await getMyOrder()
if (point.value !== 0) { if (point.value !== 0) {
orderList.value = orderList.value.filter(item => item.orderStatus === orderStatusList[point.value]) orderList.value = tempOrderList.value.filter(item => item.orderStatus === orderStatusList[point.value])
} } else {
orderList.value = tempOrderList.value
}
} }
@ -228,10 +231,11 @@
color.value[i] = '#323232' color.value[i] = '#323232'
} }
} }
await getMyOrder()
if (point.value !== 0) { if (point.value !== 0) {
orderList.value = orderList.value.filter(item => item.orderStatus === orderStatusList[point.value]) orderList.value = tempOrderList.value.filter(item => item.orderStatus === orderStatusList[point.value])
} } else {
orderList.value = tempOrderList.value
}
} }
const getMyOrder = async () => { const getMyOrder = async () => {
@ -249,6 +253,7 @@
}) })
console.log(res.data.data) console.log(res.data.data)
orderList.value = res.data.data orderList.value = res.data.data
tempOrderList.value = res.data.data
dealTimeout() dealTimeout()
orderList.value.forEach(order => { orderList.value.forEach(order => {
if (order.orderStatus === '待支付') { if (order.orderStatus === '待支付') {

View File

@ -12,23 +12,23 @@
</view> </view>
</view> </view>
<carousel class="pos_2" :img-list="imgList" url-key="url" @selected="selectedBanner"/> <carousel class="pos_2" :img-list="imgList" url-key="url"/>
<!-- 类别列表 --> <!-- 类别列表 -->
<view class="flex-col justify-start items-center section_4 pos_3"> <view class="flex-col justify-start items-center section_4 pos_3">
<!-- <view class="flex-col"> --> <!-- <view class="flex-col"> -->
<view class="my-aside"> <view class="my-aside">
<view class="flex-col items-center self-stretch group" <view class="flex-col items-center self-stretch group"
v-for="(item, index) in sort" v-for="(item, index) in typeList"
:key="index" :key="index"
@click="changeTypes(item , index)" @click="changeTypes(item , index)"
> >
<image <image
:style="changeImgStyle(index)" :style="changeImgStyle(index)"
class="image_3" mode="aspectFill" class="image_3" mode="aspectFill"
:src="publicPath + item.imgurl" :src="publicPath + typeImgUrl[index]"
/> />
<text class="font_2 text_4" :style="FontsStyle(index)">{{ item.name }}</text> <text class="font_2 text_4" :style="FontsStyle(index)">{{ item }}</text>
</view> </view>
</view> </view>
<!-- </view> --> <!-- </view> -->
@ -36,7 +36,7 @@
<!-- 商品列表 --> <!-- 商品列表 -->
<view class="flex-col pos_5"> <view class="flex-col pos_5">
<view class="good-list"> <view class="good-list">
<view class="flex-row list-item mt-9" v-for="(item, index) in productList" :key="index" @click="goToProduct(item)"> <view class="flex-row list-item mt-9" v-for="(item, index) in goodList" :key="index" @click="goToProduct(item)">
<image <image
class="self-center image_4" mode="aspectFill" class="self-center image_4" mode="aspectFill"
:src="publicPath + item.goodImg.split(';')[0]" :src="publicPath + item.goodImg.split(';')[0]"
@ -68,6 +68,7 @@ import carousel from '@/components/vear-carousel/vear-carousel'
import { workshopUrl } from '../../../common/globalImagesUrl'; import { workshopUrl } from '../../../common/globalImagesUrl';
import { storeHomeUrl } from '../../../common/globalImagesUrl'; import { storeHomeUrl } from '../../../common/globalImagesUrl';
import { publicPath } from '../../../common/globalImagesUrl'; import { publicPath } from '../../../common/globalImagesUrl';
import { all } from 'mathjs';
const bkgUrl = ref(storeHomeUrl + '/main/bkg.png') const bkgUrl = ref(storeHomeUrl + '/main/bkg.png')
const currentColor = ref(0); const currentColor = ref(0);
const sort = ref([{}]) // const sort = ref([{}]) //
@ -76,21 +77,28 @@ const productList = ref([{}]) //类别下对应的商品
const cookie = wx.getStorageSync("cookie") const cookie = wx.getStorageSync("cookie")
const imgList = ref([]) // const imgList = ref([]) //
const carouseList = ref([]) // const carouseList = ref([]) //
const allGoodList = ref(null)
const typeList = ref(null)
const goodList = ref(null)
const typeImgUrl = ref(null)
let pointIdx = 0;
const product_type = ref({ const product_type = ref({
type: "材料包" type: "材料包"
}) })
onLoad( async (options)=>{ onLoad((options)=>{
getFonts() getFonts()
await Getsort() // await Getsort()
await changeTypes( sort.value[0] , 0 ) // // await changeTypes( sort.value[0] , 0 ) //
await getCarouseList() getAllGoods()
getCarouseList()
}) })
onPullDownRefresh( async ()=>{ // onPullDownRefresh( ()=>{ //
await Getsort() // await Getsort()
await changeTypes( sort.value[0] , 0 ) // // await changeTypes( sort.value[0] , 0 ) //
await getCarouseList() getAllGoods()
getCarouseList()
setTimeout(()=>{ setTimeout(()=>{
uni.stopPullDownRefresh() // uni.stopPullDownRefresh() //
},1000) },1000)
@ -148,30 +156,46 @@ const Getsort = async ()=>{
} }
// console.log('==>',res.data.data); // console.log('==>',res.data.data);
} }
//
const changeTypes = async (item , index) =>{
currentColor.value = index const goToSearch = () => {
product_type.value.type = item.name uni.navigateTo({
const res = await uni.request({ url: '../../workshop/searchGood/searchGood?type=1'
url: baseUrl + '/category/list/type',
method: 'POST',
data: {
id : item.id
},
header:{
cookie,
}
})
if(res.data.code === 1) {
productList.value = res.data.data[item.id]
} else {
uni.showToast({ //
title: '更改类别错误',
icon: 'none',
duration: 2000
}) })
} }
const getAllGoods = async () => {
const res = await uni.request({
url: baseUrl + '/global/getAllGoods',
method: 'GET'
})
allGoodList.value = Object.entries(res.data.data)
typeList.value = allGoodList.value.map(item => item[0])
typeImgUrl.value = allGoodList.value.map(item => item[1].image)
goodList.value = allGoodList.value[0][1].goodLabelVOList
}
//
const changeTypes = async (item , index) =>{
currentColor.value = index
product_type.value.type = item.name
if (pointIdx === index) return
pointIdx = index
goodList.value = allGoodList.value[pointIdx][1].goodLabelVOList
} }
// //
const FontsStyle = (index) => ({ const FontsStyle = (index) => ({
color: currentColor.value === index ? '#C35C5D' : '#727272' color: currentColor.value === index ? '#C35C5D' : '#727272'
@ -196,25 +220,6 @@ const goToProduct = (item) => {
const goToSearch = () => {
uni.navigateTo({
url: '../../workshop/searchGood/searchGood?type=1'
})
}