From ffdb535fecd6ea569535e6a5240c216a3c7da986 Mon Sep 17 00:00:00 2001 From: chen-xin-zhi <3588068430@qq.com> Date: Mon, 24 Feb 2025 09:34:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E4=BA=86=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E7=B1=BB=E5=95=86=E5=93=81=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 7 + pages/testPage/testPage.vue | 13 + pages/workshop/component/images/add.png | Bin 0 -> 523 bytes pages/workshop/component/images/cha.png | Bin 0 -> 449 bytes pages/workshop/component/images/sub.png | Bin 0 -> 426 bytes pages/workshop/component/images/yyxz.png | Bin 0 -> 946 bytes pages/workshop/component/timeSelect.vue | 410 ++++++++++++ pages/workshop/component/tip.vue | 51 ++ pages/workshop/productmain/productmain.vue | 40 +- unpackage/dist/dev/mp-weixin/app.js | 1 + unpackage/dist/dev/mp-weixin/app.json | 1 + .../dev/mp-weixin/assets/add.606d1732.png | Bin 0 -> 523 bytes .../dev/mp-weixin/assets/cha.7ad5739e.png | Bin 0 -> 449 bytes .../dev/mp-weixin/assets/sub.142560ee.png | Bin 0 -> 426 bytes .../dev/mp-weixin/assets/yyxz.0429cda7.png | Bin 0 -> 946 bytes unpackage/dist/dev/mp-weixin/common/assets.js | 9 + .../productmain/testproductmain.js | 1 + .../dist/dev/mp-weixin/pages/login/login.js | 25 + .../dist/dev/mp-weixin/pages/login/login.wxml | 2 +- .../dist/dev/mp-weixin/pages/login/login.wxss | 492 ++++++++++++++- .../order/product-waitpay/product-waitpay.js | 14 +- .../product-waitpay/product-waitpay.wxml | 2 +- .../product-waitpay/product-waitpay.wxss | 2 +- .../order/singleGoodOrder/singleGoodOrder.js | 15 +- .../singleGoodOrder/singleGoodOrder.wxml | 2 +- .../singleGoodOrder/singleGoodOrder.wxss | 2 +- .../dev/mp-weixin/pages/testPage/testPage.js | 16 + .../mp-weixin/pages/testPage/testPage.json | 6 + .../mp-weixin/pages/testPage/testPage.wxml | 1 + .../mp-weixin/pages/testPage/testPage.wxss | 0 .../pages/workshop/component/timePopUp.js | 146 ++++- .../pages/workshop/component/timePopUp.wxml | 2 +- .../pages/workshop/component/timePopUp.wxss | 11 +- .../pages/workshop/component/timePopUp2.js | 3 - .../pages/workshop/component/timeSelect.js | 173 ++++++ .../pages/workshop/component/timeSelect.json | 7 + .../pages/workshop/component/timeSelect.wxml | 1 + .../pages/workshop/component/timeSelect.wxss | 581 ++++++++++++++++++ .../mp-weixin/pages/workshop/component/tip.js | 18 + .../pages/workshop/component/tip.json | 4 + .../pages/workshop/component/tip.wxml | 1 + .../pages/workshop/component/tip.wxss | 435 +++++++++++++ .../pages/workshop/productmain/productmain.js | 40 +- .../workshop/productmain/productmain.json | 2 +- .../workshop/productmain/productmain.wxml | 2 +- .../workshop/productmain/productmain.wxss | 2 +- unpackage/dist/dev/mp-weixin/timePopUp.js | 143 ----- 47 files changed, 2455 insertions(+), 228 deletions(-) create mode 100644 pages/testPage/testPage.vue create mode 100644 pages/workshop/component/images/add.png create mode 100644 pages/workshop/component/images/cha.png create mode 100644 pages/workshop/component/images/sub.png create mode 100644 pages/workshop/component/images/yyxz.png create mode 100644 pages/workshop/component/timeSelect.vue create mode 100644 pages/workshop/component/tip.vue create mode 100644 unpackage/dist/dev/mp-weixin/assets/add.606d1732.png create mode 100644 unpackage/dist/dev/mp-weixin/assets/cha.7ad5739e.png create mode 100644 unpackage/dist/dev/mp-weixin/assets/sub.142560ee.png create mode 100644 unpackage/dist/dev/mp-weixin/assets/yyxz.0429cda7.png create mode 100644 unpackage/dist/dev/mp-weixin/common/assets.js create mode 100644 unpackage/dist/dev/mp-weixin/pages/testPage/testPage.js create mode 100644 unpackage/dist/dev/mp-weixin/pages/testPage/testPage.json create mode 100644 unpackage/dist/dev/mp-weixin/pages/testPage/testPage.wxml create mode 100644 unpackage/dist/dev/mp-weixin/pages/testPage/testPage.wxss delete mode 100644 unpackage/dist/dev/mp-weixin/pages/workshop/component/timePopUp2.js create mode 100644 unpackage/dist/dev/mp-weixin/pages/workshop/component/timeSelect.js create mode 100644 unpackage/dist/dev/mp-weixin/pages/workshop/component/timeSelect.json create mode 100644 unpackage/dist/dev/mp-weixin/pages/workshop/component/timeSelect.wxml create mode 100644 unpackage/dist/dev/mp-weixin/pages/workshop/component/timeSelect.wxss create mode 100644 unpackage/dist/dev/mp-weixin/pages/workshop/component/tip.js create mode 100644 unpackage/dist/dev/mp-weixin/pages/workshop/component/tip.json create mode 100644 unpackage/dist/dev/mp-weixin/pages/workshop/component/tip.wxml create mode 100644 unpackage/dist/dev/mp-weixin/pages/workshop/component/tip.wxss delete mode 100644 unpackage/dist/dev/mp-weixin/timePopUp.js diff --git a/pages.json b/pages.json index 103d48b..ada062a 100644 --- a/pages.json +++ b/pages.json @@ -1,5 +1,12 @@ { "pages": [ + { + "path" : "pages/testPage/testPage", + "style" : + { + "navigationBarTitleText" : "" + } + }, { "path" : "pages/test/test", "style" : diff --git a/pages/testPage/testPage.vue b/pages/testPage/testPage.vue new file mode 100644 index 0000000..ea38051 --- /dev/null +++ b/pages/testPage/testPage.vue @@ -0,0 +1,13 @@ + + + + + diff --git a/pages/workshop/component/images/add.png b/pages/workshop/component/images/add.png new file mode 100644 index 0000000000000000000000000000000000000000..fbe2eea96c78d4264ad109083f688c40cefb2817 GIT binary patch literal 523 zcmV+m0`&cfP)Px#1am@3R0s$N2z&@+hyVZqwMj%lRA_ntkMl90Vc>%4~-VbmP zu(Pm{OX(50uXL5gwc)xeFIAEQ(+gY5Axi|u1meoRYi=P33zuwU@?d`5%zNzn@fdby zcj%lGyhB9fH_2O)w^^3`XfzthVGiG``~eAouh!b{&nLCW=lmpjZjAW@02SXhFXU5} zW#96FHhGXdbIyGM^er0zfQUR)tJO$d=K+9ZJx$ZkD&_yt4e~w^k&kNSNgB2CfWr6u zb3PpF!Eqd8Hk)CwSYR|7VK5lHc@5Q_5AwbU^1cZ2z9@B`pG+o&vHgCJ?RJYaO<{~d ztyU|{old8SqUgo-OKnoC)#|_UoO5u_6~=eF-K*-Ck{^%9g|YQ|jrn|zBuNlO5xU)O zVQ#C{dR6^W^26bdm za$l)bF7mMoc@fzHxUklq)a&(SK7X_$aY>#4+yMAR^2!)!gu0oLgLK2-ro+h#@y{ zfUmf-)aG!1h?G4XxrOtlr%AaHAL3s7!%3~vLK?&Rskdxp@TolMnbOde{ zSdy@Iu2o=Z;#xU2fu$AHc)(pCx1w52Bng;XVa@iN3{0(fN?Nf8$O5Jy{crRdr+dl< zQtTjO!S3K$K#B}x(dfelQY0XY$8QVD<3C@q>W@TqH>0|vRz1|Io-C-IZmFKIs-E)K z#Fgf}*5A$}aojqtvGgH{%SDTA!f*KW_f%8oiI&@vW(7N00000NkvXXu0mjfJ+!-* literal 0 HcmV?d00001 diff --git a/pages/workshop/component/images/sub.png b/pages/workshop/component/images/sub.png new file mode 100644 index 0000000000000000000000000000000000000000..09296b116a26f64eb4711610157cd3d4d3a55055 GIT binary patch literal 426 zcmeAS@N?(olHy`uVBq!ia0vp^`XJ1~1|*BsC$9lgjKx9jP7LeL$-D$|Sc;uILpXq- zh9ji|C>P@C;uw%-zEg$h|#R&H)VZSU@jUdyhe&AQnz^{CE))E&&? zhONEP8-%T685-4d?Jf_;s9Qav6hwwQ2kR589?{N3*4y4~|9z0sS! zyzf5yt6lrp3cQP=A9Sud+JF3U^Us<(_6JTcfV|l^nH#(ps_tT7NHcRuD`0q#Vq`hX zZ~1u@ZBw;v2D8tuD{5hmKmIJD*F$&5?@pc=PsX#0qT4`S0AcEbkC}$@Tuna?#f^7xWaT& z-Bf8SgF>{;-P+@4;ymB2GTg{I>Ahl$w5iI{Z?fCgy{?{AtE#q5?7qp_e@PoF6nCy< zIeO*Z=g`o-rB-uw8Jx@i3(Ts!+utwD@Zg=a@8vnWtN9)H4@mxdc>AilTwBBxbBj~z Q!0=}9boFyt=akR{00399$p8QV literal 0 HcmV?d00001 diff --git a/pages/workshop/component/images/yyxz.png b/pages/workshop/component/images/yyxz.png new file mode 100644 index 0000000000000000000000000000000000000000..b9dd0e2070925aba6dfe572d3f62ba8e02b03ade GIT binary patch literal 946 zcmV;j15NyiP) z6G0H}o*?Cm#d-qw2 zS(7a>;(za&XQn+oKbz#GMGdZ|d#>aZp_%rz@6wvtOmS3Z>g;Z}Lg^E~pdF^{_&vC0 z)6Oq=b+vFf% zSrB+xkhO~nvt_l#euFz={BnAt3usG)3m;r?eRc1*nh#n#vyO2=atD2I!2!jHl1eE2mAlT_d-~z7w3I%7Y!$Cjwr+b3xBdXA}1mdVf=6*N`G9_0& z7k>vk#9V!hOXNPdA;zy~kuJy*yb&L*4hv#bDkpID=RsbOAvjM>hhT~%8J7=;U5BVp zYK=mmRt2M}20G>WTNMiOK9bTtm}5{TtjHvW8X(*&D-skEPMrb`%Y9Wzms+E;e5Q@J zefF^*Muy$o?entv)Oh zlpf;6+54u~8mk%n#&=b2PpD48Qi!o{Bkh}zQ{M**%uOz{gb%h*#5ja;thH%sx-~H6 z%}aY{B80VnE5 + + + + + + + + ¥99 + 请选择 + + + + 当前日期:{{appointmentDateVOList[appIdx].specificDate}} + + 剩余预约人数:{{ restNumber }} + + + 预约须知 + + + + + + 星期二 + {{item.specificDate.substring(5)}} + + + + + + + {{item.timeSlot}} + + + + + + + 数量 + + + + {{cnt}} + + + + + + 下一步 + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/workshop/component/tip.vue b/pages/workshop/component/tip.vue new file mode 100644 index 0000000..7834195 --- /dev/null +++ b/pages/workshop/component/tip.vue @@ -0,0 +1,51 @@ + + + + + \ No newline at end of file diff --git a/pages/workshop/productmain/productmain.vue b/pages/workshop/productmain/productmain.vue index 4cfccda..3e29fae 100644 --- a/pages/workshop/productmain/productmain.vue +++ b/pages/workshop/productmain/productmain.vue @@ -66,7 +66,7 @@ - + @@ -75,24 +75,24 @@ import { ref,onMounted } from 'vue' import { onLoad } from "@dcloudio/uni-app"; import { baseUrl } from '../../../api/request'; -import timePopUpVue from '../component/timePopUp.vue'; +import timeSelectVue from '../component/timeSelect.vue'; import emitter from '../../../utils/emitter' //导入emitter传值组件 const pid = ref(0) //商品id const cookie = wx.getStorageSync("cookie") //请求头 const productObject = ref({}) const popup = ref(null) //弹窗对象 -const specificDate = ref('') //渲染最近可预约日期 -const specificTime = ref('') //渲染最近可预约时间段 +const pObj = {} onMounted(()=>{ - emitter.on('close',()=>{ + emitter.on('closeTimeDialog',()=>{ close() }) }) onLoad((options)=>{ pid.value = JSON.parse(options.info) getProduct() + getBookingNumberMap() }) -const getProduct = async() =>{ +const getProduct = async () =>{ const res = await uni.request({ url: baseUrl + '/goods/service/list/id', method: 'POST', @@ -105,9 +105,6 @@ 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', @@ -116,17 +113,40 @@ const getProduct = async() =>{ return; } } + +let countMap = new Map() + +const getBookingNumberMap = async () => { + const res = await uni.request({ + url: baseUrl + '/pending/list/advance/count', + method: 'POST', + data: { + id: pid.value + }, + header: { + cookie + } + }) + countMap = res.data.data + console.log(countMap) +} + const close =()=> { //关闭弹窗 popup.value.close() } const loadPop =()=> { + emitter.emit('getGoodData', productObject.value) + emitter.emit('getBookingNumberMap', countMap) popup.value.open('bottom') //从底部弹 } + + +