Merge remote-tracking branch 'origin/master'
# Conflicts: # pages/book/photoProductsOrderDetail/photoProductsOrderDetail.vue # pages/store-home/main/testMain.vue
This commit is contained in:
commit
d10118b75e
|
@ -130,8 +130,11 @@
|
|||
const cancelBookingOrder = ref(null)
|
||||
const deleteBookingOrder = ref(null)
|
||||
const advanceOrderList = ref([])
|
||||
const tempAdvanceOrderList = ref([])
|
||||
const isShowMask = ref(false)
|
||||
onLoad((options) => {
|
||||
const bkgUrl = ref(bookUrl + '/photoProductsOrderDetail/bkg.png')
|
||||
onLoad(() => {
|
||||
getFonts()
|
||||
})
|
||||
|
||||
|
@ -203,12 +206,14 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
await getAdvanceOrder()
|
||||
if (index == 1) {
|
||||
advanceOrderList.value = advanceOrderList.value.filter(item => item.orderStatus === '待发货')
|
||||
if (index === 0) {
|
||||
advanceOrderList.value = tempAdvanceOrderList.value
|
||||
}
|
||||
if (index == 2) {
|
||||
advanceOrderList.value = advanceOrderList.value.filter(item => item.orderStatus === '交易成功')
|
||||
if (index === 1) {
|
||||
advanceOrderList.value = tempAdvanceOrderList.value.filter(item => item.orderStatus === '待发货')
|
||||
}
|
||||
if (index === 2) {
|
||||
advanceOrderList.value = tempAdvanceOrderList.value.filter(item => item.orderStatus === '交易成功')
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -310,6 +315,7 @@
|
|||
}
|
||||
})
|
||||
advanceOrderList.value = res.data.data
|
||||
tempAdvanceOrderList.value = res.data.data
|
||||
console.log('订单列表打印==================>')
|
||||
advanceOrderList.value.forEach(order => {
|
||||
if (order.orderStatus === '待支付') {
|
||||
|
|
|
@ -130,6 +130,7 @@
|
|||
const point = ref(0)
|
||||
const cookie = wx.getStorageSync("cookie") //请求头
|
||||
const orderList = ref([])
|
||||
const tempOrderList = ref([])
|
||||
|
||||
let wxPayTimer = null;
|
||||
let loading = false;
|
||||
|
@ -181,6 +182,7 @@
|
|||
}
|
||||
})
|
||||
orderList.value = res.data.data
|
||||
tempOrderList.value = res.data.data
|
||||
dealTimeout()
|
||||
orderList.value.forEach(order => {
|
||||
startCountdown(order)
|
||||
|
@ -199,10 +201,11 @@
|
|||
color.value[i] = '#323232'
|
||||
}
|
||||
}
|
||||
await getRentOrderList()
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -140,6 +140,7 @@
|
|||
let orderStatusList = ['全部', '待支付', '待发货', '待收货', '已退款']
|
||||
const cookie = wx.getStorageSync('cookie')
|
||||
const orderList = ref([])
|
||||
const tempOrderList = ref([])
|
||||
const orderNumber = ref('')
|
||||
const isHiddenInput = ref(true)
|
||||
const status = ref(0)
|
||||
|
@ -209,8 +210,10 @@
|
|||
}
|
||||
await getMyOrder()
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -227,10 +230,11 @@
|
|||
color.value[i] = '#323232'
|
||||
}
|
||||
}
|
||||
await getMyOrder()
|
||||
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 () => {
|
||||
|
@ -248,6 +252,7 @@
|
|||
})
|
||||
console.log(res.data.data)
|
||||
orderList.value = res.data.data
|
||||
tempOrderList.value = res.data.data
|
||||
dealTimeout()
|
||||
orderList.value.forEach(order => {
|
||||
if (order.orderStatus === '待支付') {
|
||||
|
|
|
@ -12,23 +12,23 @@
|
|||
</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"> -->
|
||||
<view class="my-aside">
|
||||
<view class="flex-col items-center self-stretch group"
|
||||
v-for="(item, index) in sort"
|
||||
v-for="(item, index) in typeList"
|
||||
:key="index"
|
||||
@click="changeTypes(item , index)"
|
||||
>
|
||||
<image
|
||||
:style="changeImgStyle(index)"
|
||||
class="image_3" mode="aspectFill"
|
||||
:src="publicPath + item.imgurl"
|
||||
/>
|
||||
<text class="font_2 text_4" :style="FontsStyle(index)">{{ item.name }}</text>
|
||||
<image
|
||||
:style="changeImgStyle(index)"
|
||||
class="image_3" mode="aspectFill"
|
||||
:src="publicPath + typeImgUrl[index]"
|
||||
/>
|
||||
<text class="font_2 text_4" :style="FontsStyle(index)">{{ item }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- </view> -->
|
||||
|
@ -36,7 +36,7 @@
|
|||
<!-- 商品列表 -->
|
||||
<view class="flex-col pos_5">
|
||||
<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
|
||||
class="self-center image_4" mode="aspectFill"
|
||||
:src="publicPath + item.goodImg.split(';')[0]"
|
||||
|
@ -65,6 +65,7 @@ import { baseUrl, testUrl , suiUrl} from '@/api/request';
|
|||
import { onLoad,onPullDownRefresh } from '@dcloudio/uni-app';
|
||||
import { getFonts } from '../../../common/globalFont';
|
||||
import carousel from '@/components/vear-carousel/vear-carousel'
|
||||
import { all } from 'mathjs';
|
||||
import { workshopUrl, bkgPubilcPath, storeHomeUrl, publicPath } from '../../../common/globalImagesUrl';
|
||||
const bkgUrl = ref(storeHomeUrl + '/main/bkg.png')
|
||||
const currentColor = ref(0);
|
||||
|
@ -74,21 +75,28 @@ const productList = ref([{}]) //类别下对应的商品
|
|||
const cookie = wx.getStorageSync("cookie")
|
||||
const imgList = 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({
|
||||
type: "材料包"
|
||||
})
|
||||
|
||||
onLoad( async (options)=>{
|
||||
onLoad((options)=>{
|
||||
getFonts()
|
||||
await Getsort()
|
||||
await changeTypes( sort.value[0] , 0 ) //首先获取最开始的类别
|
||||
await getCarouseList()
|
||||
// await Getsort()
|
||||
// await changeTypes( sort.value[0] , 0 ) //首先获取最开始的类别
|
||||
getAllGoods()
|
||||
getCarouseList()
|
||||
})
|
||||
onPullDownRefresh( async ()=>{ //下拉刷新
|
||||
await Getsort()
|
||||
await changeTypes( sort.value[0] , 0 ) //首先获取最开始的类别
|
||||
await getCarouseList()
|
||||
onPullDownRefresh( ()=>{ //下拉刷新
|
||||
// await Getsort()
|
||||
// await changeTypes( sort.value[0] , 0 ) //首先获取最开始的类别
|
||||
getAllGoods()
|
||||
getCarouseList()
|
||||
setTimeout(()=>{
|
||||
uni.stopPullDownRefresh() //停止下拉刷新
|
||||
},1000)
|
||||
|
@ -146,30 +154,46 @@ const Getsort = async ()=>{
|
|||
}
|
||||
// console.log('获取商品分类==>',res.data.data);
|
||||
}
|
||||
//更改类别
|
||||
const changeTypes = async (item , index) =>{
|
||||
currentColor.value = index
|
||||
product_type.value.type = item.name
|
||||
const res = await uni.request({
|
||||
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 goToSearch = () => {
|
||||
uni.navigateTo({
|
||||
url: '../../workshop/searchGood/searchGood?type=1'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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) => ({
|
||||
color: currentColor.value === index ? '#C35C5D' : '#727272'
|
||||
|
@ -194,25 +218,6 @@ const goToProduct = (item) => {
|
|||
|
||||
|
||||
|
||||
const goToSearch = () => {
|
||||
uni.navigateTo({
|
||||
url: '../../workshop/searchGood/searchGood?type=1'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user