From 0fd87acc485ba676eb8f27cc7701765d24ab2223 Mon Sep 17 00:00:00 2001 From: yuanteng0011 <1876787513@qq.com> Date: Thu, 9 Jan 2025 10:50:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=B1=BB=E5=95=86=E5=93=81?= =?UTF-8?q?=E3=80=81=E8=B4=AD=E7=89=A9=E8=BD=A6=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 41 +- common/global.js | 28 +- pages.json | 24 +- .../Shopping-cart/productmain/productmain.vue | 5 +- .../productmain/testproductmain.vue | 683 ++++++++++++++++++ pages/mine/main/main.vue | 84 +-- pages/mine/mineorders/mineorders.vue | 36 +- .../product-paysuccess/product-paysuccess.vue | 4 +- .../order/product-waitpay/product-waitpay.vue | 8 +- pages/store-home/main/main.vue | 5 +- pages/store-home/main/testMain.vue | 236 +++--- pages/workshop/component/testTimePopUp.vue | 418 +++++++++++ pages/workshop/component/timePopUp.vue | 538 ++++++++------ pages/workshop/productmain/productmain.vue | 9 +- 14 files changed, 1700 insertions(+), 419 deletions(-) create mode 100644 pages/Shopping-cart/productmain/testproductmain.vue create mode 100644 pages/workshop/component/testTimePopUp.vue diff --git a/App.vue b/App.vue index 2f21178..e027018 100644 --- a/App.vue +++ b/App.vue @@ -1,3 +1,42 @@ \ No newline at end of file + + + + + \ No newline at end of file diff --git a/common/global.js b/common/global.js index f3a8c85..59f28ca 100644 --- a/common/global.js +++ b/common/global.js @@ -1,36 +1,48 @@ -export const stateList = [ +//订单状态数组 +export const stateList = [ { state: '待支付', img: 'https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FFybMDtHR-dengdaifukuan.png', - msg: '等待买家付款' + msg: '等待买家付款', + tips: '请于15分钟内付款,超时订单将自动关闭' }, { state: '待发货', img: 'https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FEOzVqolp-fahuo.png', - msg: '等待卖家发货' + msg: '等待卖家发货', + tips: '耐心等待工艺品发货~' }, { state: '已退款', img: 'https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FlPnvgqCp-yituikuan.png', - msg: '订单已经退款' + msg: '订单已经退款', + tips: '希望下次能让君满意' }, { state: '待收货', img: 'https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FEOzVqolp-fahuo.png', - msg: '商品已发货,注意查收' + msg: '商品已发货,注意查收', + tips: '非遗工艺品马上到手啦,耐心点' }, { state: '交易成功', img: '', - msg: '订单完成,感谢您的支持' + msg: '订单完成,感谢您的支持', + tips: '感谢您的支持' }, { state: '交易关闭', img: 'https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FaHDhacaI-dengdaifukuan.png', - msg: '您的订单已关闭' + msg: '您的订单已关闭', + tips: '下次看好了之后再买哦' } ] export const stateMap = new Map() stateList.forEach((item)=>{ stateMap.set(item.state,item) -}) \ No newline at end of file +}) +//获取选中日期是星期几方法 +export const weekDay = function(time) { + let datelist = ['周日','周一','周二','周三','周四','周五','周六',] + return datelist[new Date(time).getDay()]; +} diff --git a/pages.json b/pages.json index 38245e6..24c49c7 100644 --- a/pages.json +++ b/pages.json @@ -211,8 +211,28 @@ { "navigationBarTitleText" : "" } + }, + { + "path" : "pages/Shopping-cart/productmain/testproductmain", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/workshop/component/testTimePopUp", + "style" : + { + "navigationBarTitleText" : "" + } } ], + "plugins" : { + "logisticsPlugin" : { + "version": "2.3.0", + "provider": "wx9ad912bf20548d92" + } + }, "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "uni-app", @@ -231,12 +251,12 @@ "text":"首页" }, { - "pagePath": "pages/store-home/main/main", + "pagePath": "pages/store-home/main/testMain", "iconPath": "./static/store.png", "text":"商城" }, { - "pagePath": "pages/Shopping-cart/productmain/productmain", + "pagePath": "pages/Shopping-cart/productmain/testproductmain", "iconPath": "./static/shopcar.png", "text":"购物车" }, diff --git a/pages/Shopping-cart/productmain/productmain.vue b/pages/Shopping-cart/productmain/productmain.vue index 8117579..f7d6ecc 100644 --- a/pages/Shopping-cart/productmain/productmain.vue +++ b/pages/Shopping-cart/productmain/productmain.vue @@ -319,7 +319,10 @@ const editOrSettle = async ()=>{ //去结算或者删除状态方法 showCancel: false, success: (e)=>{ if(e.confirm) { - deleteProduct(res.data.data) + // getProductCart() //重新获取购物车信息 + uni.reLaunch({ + url: '/pages/Shopping-cart/productmain/productmain' + }) } } }) diff --git a/pages/Shopping-cart/productmain/testproductmain.vue b/pages/Shopping-cart/productmain/testproductmain.vue new file mode 100644 index 0000000..f5c8fde --- /dev/null +++ b/pages/Shopping-cart/productmain/testproductmain.vue @@ -0,0 +1,683 @@ + + + + + diff --git a/pages/mine/main/main.vue b/pages/mine/main/main.vue index 1a850bc..9b7b98f 100644 --- a/pages/mine/main/main.vue +++ b/pages/mine/main/main.vue @@ -95,49 +95,49 @@ diff --git a/pages/workshop/component/testTimePopUp.vue b/pages/workshop/component/testTimePopUp.vue new file mode 100644 index 0000000..1471f9f --- /dev/null +++ b/pages/workshop/component/testTimePopUp.vue @@ -0,0 +1,418 @@ + + + + + diff --git a/pages/workshop/component/timePopUp.vue b/pages/workshop/component/timePopUp.vue index e1fd091..3677763 100644 --- a/pages/workshop/component/timePopUp.vue +++ b/pages/workshop/component/timePopUp.vue @@ -1,114 +1,147 @@ @@ -130,46 +189,53 @@ const getProduct = async ()=>{ .ml-13 { margin-left: 24.38rpx; } -.mt-5 { - margin-top: 9.38rpx; +.mt-63 { + margin-top: 118.13rpx; +} +.mt-9 { + margin-top: 16.88rpx; } .ml-21 { margin-left: 39.38rpx; } .page { - padding-bottom: 18.75rpx; + padding-top: 28.13rpx; + background-color: #ffffff; + border-radius: 37.5rpx 37.5rpx 0rpx 0rpx; width: 100%; overflow-y: auto; overflow-x: hidden; height: 100%; } -.section { - padding: 28.13rpx 0; - background-color: #ffffff; - border-radius: 37.5rpx 37.5rpx 0rpx 0rpx; -} .group { + padding-bottom: 9.38rpx; +} +.group_2 { padding: 0 30rpx; } -.image { +.group_3 { + margin-bottom: 5.01rpx; +} +.image-wrapper { border-radius: 5.63rpx; + // background-image: url('https://ide.code.fun/api/image?token=677b3b47797f850011f57419&name=f41b64b57071affd8eecfaa15a455af2.png'); + background-size: 100% 100%; + background-repeat: no-repeat; width: 195rpx; height: 204.38rpx; } -.group_2 { +.group_5 { margin-bottom: 5.29rpx; padding-bottom: 28.86rpx; width: 157.8rpx; } -.group_3 { +.group_6 { margin-left: 17.51rpx; line-height: 29.7rpx; } .font { font-size: 37.5rpx; font-family: FZSongKeBenXiuKaiS-R-GB; - line-height: 45rpx; - color: #323232; } .text_2 { color: #c35c5d; @@ -200,31 +266,57 @@ const getProduct = async ()=>{ right: 0; bottom: 28.03rpx; } +.group_4 { + margin-top: 5.63rpx; + width: 176.25rpx; +} .image_2 { margin-right: 20.63rpx; - margin-top: 5.63rpx; width: 37.5rpx; height: 37.5rpx; } -.section_2 { +.image_3 { + border-radius: 9.38rpx 0rpx 0rpx 9.38rpx; + width: 45.21rpx; + height: 48.13rpx; +} +.text-wrapper { + padding: 14.74rpx 0 14.66rpx; + background-color: #ffffff; + width: 58.41rpx; + height: 48.13rpx; +} +.text_4 { + color: #323232; + font-size: 26.25rpx; + font-family: Open Sans; + line-height: 18.73rpx; +} +.image_4 { + border-radius: 0rpx 9.38rpx 9.38rpx 0rpx; + width: 45.21rpx; + height: 48.13rpx; +} +.section { padding: 30.53rpx 21.86rpx 30.36rpx; background-color: #ffffff; border-radius: 28.13rpx; } -.text_4 { +.text_5 { color: #000000; line-height: 36.62rpx; } -.text_5 { +.text_6 { margin-right: 16.14rpx; line-height: 25.43rpx; } -.group_4 { - padding: 0 20.63rpx 35.63rpx; +.divider { + background-color: #d9d9d9; + height: 1.88rpx; } -.group_5 { - padding: 31.76rpx 7.5rpx 0; - border-top: solid 1.88rpx #d9d9d9; +.view { + margin-left: 20.63rpx; + margin-right: 26.27rpx; } .font_3 { font-size: 30rpx; @@ -232,51 +324,78 @@ const getProduct = async ()=>{ line-height: 27.07rpx; color: #000000; } -.text_6 { +.text_7 { + margin-left: 29.31rpx; + margin-top: 29.89rpx; line-height: 28.01rpx; } -.view { - margin-right: 7.5rpx; - padding: 35.98rpx 0 35.87rpx 20rpx; - background-color: #faddde; - border-radius: 18.75rpx; +.section_1 { + padding: 30rpx 0; + background-color: #FBDEDF; + border-radius: 10rpx; + align-self: stretch; + margin: 26.47rpx 28.13rpx 0 28.13rpx; } -.group_10 { - // margin-left: 11.78rpx; +.group_1 { + margin-left: 11.78rpx; margin-right: 14.83rpx; } .font_4 { - font-size: 30rpx; + // font-size: 30rpx; font-family: FZSongKeBenXiuKaiS-R-GB; line-height: 27.07rpx; - color: #c35c5d; + color: #000000; } -.text_7 { - // border: 1px solid red; - margin-right: 20rpx; +.text_8 { line-height: 27.3rpx; + margin-left: 30rpx; } .grid { - margin-top: 75rpx; + margin-top: 60rpx; width: 605.63rpx; +} +.list_2 { height: 228.75rpx; + display: grid; + grid-template-rows: repeat(2, minmax(0, 1fr)); + grid-template-columns: repeat(2, minmax(0, 1fr)); + row-gap: 54rpx; + column-gap: 102rpx; + overflow-y: auto; + overflow-x: hidden; } -.grid-item { - background-color: #fbdedf; - border-radius: 18.75rpx; - background-image: url('https://ide.code.fun/api/image?token=67582be6797f850011f1edb7&name=5f9759dd4fc5b6049913f513ad7248f2.png'); - background-size: 100% 100%; - background-repeat: no-repeat; - width: 253.13rpx; +//处理时间段数组长度小于2的情况 +.list_temp { + height: 105.75rpx; + display: grid; + grid-template-rows: repeat(2, minmax(0, 1fr)); + grid-template-columns: repeat(2, minmax(0, 1fr)); + row-gap: 54rpx; + column-gap: 102rpx; + overflow-y: auto; + overflow-x: hidden; } -.pos_1 { - position: absolute; - left: 3.75rpx; - top: 0; +.pos_temp3 { + position: absolute; + left: 50%; + top: 52.99rpx; + transform: translateX(-50%); } -.section_4 { - background-image: url('https://ide.code.fun/api/image?token=67582be6797f850011f1edb7&name=5f9759dd4fc5b6049913f513ad7248f2.png'); - background-size: 100% 100%; +.pos_temp5 { + position: absolute; + left: 74.53rpx; + bottom: -14.94rpx; +} +.group_temp7 { + margin-top: 97.5rpx; + padding: 0 22.5rpx; +} +//到这里结束 +.section_3 { + background-image: url('https://ide.code.fun/api/image?token=677b3b47797f850011f57419&name=5f9759dd4fc5b6049913f513ad7248f2.png'); + background-color: #ffffff; + border-radius: 26rpx; + background-size: 100% 100%; background-repeat: no-repeat; height: 90rpx; } @@ -286,7 +405,7 @@ const getProduct = async ()=>{ line-height: 20.04rpx; color: #000000; } -.text_11 { +.text_12 { width: 150rpx; } .pos_3 { @@ -300,116 +419,59 @@ const getProduct = async ()=>{ left: 74.53rpx; bottom: 12.06rpx; } -.grid-item_2 { - background-color: #ffffff; - border-radius: 18.75rpx; - background-image: url('https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FVQSWQJrq-selectbox.png'); - background-size: 100% 100%; - background-repeat: no-repeat; - width: 253.13rpx; +.group_7 { + margin-top: 60rpx; + padding: 0 22.5rpx; } -.pos_14 { - position: absolute; - right: 0; - top: 0; -} -.pos_4 { - position: absolute; - right: 42.83rpx; - top: 20.74rpx; -} -.pos_6 { - position: absolute; - left: 50%; - bottom: 13.93rpx; - transform: translateX(-50%); -} -.grid-item_3 { - padding: 54.62rpx 0 8.31rpx; - background-color: #ffffff; - border-radius: 18.75rpx; - width: 253.13rpx; -} -.pos_15 { - position: absolute; - left: 0; - top: 138.75rpx; -} -.text-wrapper { - padding: 22.61rpx 0 47.34rpx; - background-image: url('https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FVQSWQJrq-selectbox.png'); - background-size: 100% 100%; - background-repeat: no-repeat; - width: 256.88rpx; -} -.pos_7 { - position: absolute; - left: 3.75rpx; - right: -7.5rpx; - top: 0; -} -.pos_11 { - position: absolute; - right: 0; - top: 138.75rpx; -} -.pos_8 { - position: absolute; - right: 39.67rpx; - top: 18.86rpx; -} -.pos_9 { - position: absolute; - left: 50%; - bottom: 8.31rpx; - transform: translateX(-50%); -} -.group_6 { - margin-top: 97.5rpx; - padding-bottom: 9.38rpx; - border-bottom: solid 1.88rpx #d9d9d9; -} -.section_5 { - margin-left: 22.5rpx; - margin-right: 11.27rpx; - padding: 12.66rpx 14.42rpx 27.9rpx; +.section_4 { + margin-left: 20.63rpx; + margin-right: 9.38rpx; + // padding: 12.66rpx 13.54rpx 76.65rpx 16.29rpx; background-color: #ffffff; } -.text_12 { +.text_13 { line-height: 28.01rpx; } -.group_7 { - margin-right: 13.74rpx; +.text_14 { + line-height: 28.84rpx; } -.section_6 { - margin: 43.13rpx 46.88rpx 0 41.25rpx; - padding: 25.28rpx 6.62rpx 38.19rpx 12.13rpx; +.section_5 { + margin-top: 54.38rpx; + padding: 32.23rpx 10.56rpx 91.29rpx 17.57rpx; background-color: #fff2f2f5; border-radius: 18.75rpx; } -.section_7 { - position: fixed; - left: 0; - right: 0; - bottom: 0; - // border: 1px solid red; - margin-left: 7.5rpx; - margin-right: 5.63rpx; +.font_6 { + font-size: 30rpx; + font-family: FZSongKeBenXiuKaiS-R-GB; + line-height: 35.63rpx; + color: #323232; +} +.text_1 { + margin-left: 2.12rpx; +} +.section_6 { + margin-left: 15rpx; + margin-top: 88.13rpx; padding: 16.88rpx 0; background-color: #ffffff; } -.section_8 { +.section_7 { padding: 26.14rpx 0 25.07rpx; background-color: #fbdedf; border-radius: 46.88rpx; width: 618.75rpx; } -.text_13 { - margin-left: 240.94rpx; +.text_15 { + // margin-left: 260.94rpx; + margin: 0 auto; line-height: 27.54rpx; } -.text_14 { +.text_16 { line-height: 27.54rpx; } +.text_8:first-child { + margin-left: 0rpx; +} @import url(../../../common/css/global.css); diff --git a/pages/workshop/productmain/productmain.vue b/pages/workshop/productmain/productmain.vue index 292db9e..4cfccda 100644 --- a/pages/workshop/productmain/productmain.vue +++ b/pages/workshop/productmain/productmain.vue @@ -18,8 +18,8 @@ - 最近可预约时间:2024.11.11 - 9:30 - 10:30 + 最近可预约时间:{{ specificDate }} + {{ specificTime }} @@ -81,6 +81,8 @@ const pid = ref(0) //商品id const cookie = wx.getStorageSync("cookie") //请求头 const productObject = ref({}) const popup = ref(null) //弹窗对象 +const specificDate = ref('') //渲染最近可预约日期 +const specificTime = ref('') //渲染最近可预约时间段 onMounted(()=>{ emitter.on('close',()=>{ close() @@ -103,6 +105,9 @@ const getProduct = async() =>{ }) if(res.data.code === 1) { productObject.value = res.data.data + specificDate.value = res.data.data.appointmentDateVOList[0].specificDate //最近可预约日期 + specificTime.value = res.data.data.appointmentDateVOList[0].timePeriodVOList[0].timeSlot //最近可预约时间 + console.log('商品对象为--->',productObject.value); } else { uni.showToast({ icon: 'error',