From 8ea81cc28f3b94de45f682c99d89a65008455ff6 Mon Sep 17 00:00:00 2001 From: Ling53666 <14656070+ling53666@user.noreply.gitee.com> Date: Tue, 10 Dec 2024 18:35:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=BA=86=E5=B7=B2=E7=9F=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 甲情_甲意/.mini-ide/compileMode.json | 35 ++ 甲情_甲意/miniprogram/app.acss | 98 +---- 甲情_甲意/miniprogram/app.json | 5 +- 甲情_甲意/miniprogram/pages/denglu/denglu.js | 20 +- .../miniprogram/pages/denglutest/denglutest.acss | 44 +++ .../miniprogram/pages/denglutest/denglutest.axml | 7 + .../miniprogram/pages/denglutest/denglutest.js | 77 ++++ .../miniprogram/pages/denglutest/denglutest.json | 5 + .../pages/dianpuzhuye/dianpuzhuye.acss | 28 +- .../pages/dianpuzhuye/dianpuzhuye.axml | 11 +- .../miniprogram/pages/dianpuzhuye/dianpuzhuye.js | 50 ++- .../miniprogram/pages/gerenxinxi/gerenxinxi.acss | 89 ----- .../miniprogram/pages/gerenxinxi/gerenxinxi.axml | 19 - .../miniprogram/pages/gouwuche/gouwuche.acss | 9 +- .../miniprogram/pages/gouwuche/gouwuche.axml | 6 +- .../miniprogram/pages/gouwuche/gouwuche.js | 166 ++++---- 甲情_甲意/miniprogram/pages/image/dingwei.png | Bin 0 -> 8816 bytes .../miniprogram/pages/image/wiegouxuan.png | Bin 0 -> 6516 bytes .../miniprogram/pages/image/yigouxuan.png | Bin 0 -> 5367 bytes .../kehushangmenyuyueqiangdan.acss | 147 ++------ .../kehushangmenyuyueqiangdan.axml | 85 +++-- .../kehushangmenyuyueqiangdan.js | 75 +++- .../kehushangmenyuyueqiangdan.json | 7 +- .../miniprogram/pages/pingjia/pingjia.acss | 51 +++ .../miniprogram/pages/pingjia/pingjia.axml | 72 +++- .../miniprogram/pages/pingjia/pingjia.js | 3 + .../miniprogram/pages/pingjia/pingjia.json | 3 + .../pages/shangmenyuyue/shangmenyuyue.acss | 295 ++++----------- .../pages/shangmenyuyue/shangmenyuyue.axml | 152 +++----- .../pages/shangmenyuyue/shangmenyuyue.js | 79 ++-- .../pages/shangmenyuyue/shangmenyuyue.json | 5 +- .../pages/shangpinjiemian/shangpinjiemian.js | 3 +- 甲情_甲意/miniprogram/pages/shouye/shouye.js | 3 +- 甲情_甲意/miniprogram/pages/test/test.acss | 88 ----- 甲情_甲意/miniprogram/pages/test/test.axml | 39 -- 甲情_甲意/miniprogram/pages/test/test.js | 132 ------- 甲情_甲意/miniprogram/pages/test/test.json | 1 + 甲情_甲意/miniprogram/pages/test1/test1.acss | 97 +++++ 甲情_甲意/miniprogram/pages/test1/test1.axml | 48 +++ 甲情_甲意/miniprogram/pages/test1/test1.js | 217 +++++++++++ 甲情_甲意/miniprogram/pages/test1/test1.json | 10 + .../pages/wodedingdan/wodedingdan.acss | 111 +++--- .../pages/wodedingdan/wodedingdan.axml | 356 ++++++++---------- .../miniprogram/pages/wodedingdan/wodedingdan.js | 29 +- .../pages/wodepingjia/wodepingjia.acss | 26 +- .../pages/wodepingjia/wodepingjia.axml | 17 +- .../miniprogram/pages/wodepingjia/wodepingjia.js | 19 +- .../pages/wodeshoucang/wodeshoucang.acss | 356 +++++------------- .../pages/wodeshoucang/wodeshoucang.axml | 122 ++---- .../pages/wodeshoucang/wodeshoucang.js | 186 ++++++++- .../pages/wodeshoucang/wodeshoucang.json | 6 +- .../miniprogram/pages/wodeyuyue/wodeyuyue.acss | 137 ++----- .../miniprogram/pages/wodeyuyue/wodeyuyue.axml | 77 +--- .../miniprogram/pages/wodeyuyue/wodeyuyue.js | 45 ++- .../miniprogram/pages/wodeyuyue/wodeyuyue.json | 1 + .../pages/zhifujiemian/zhifujiemian.acss | 8 +- 56 files changed, 1871 insertions(+), 1906 deletions(-) create mode 100644 甲情_甲意/miniprogram/pages/denglutest/denglutest.acss create mode 100644 甲情_甲意/miniprogram/pages/denglutest/denglutest.axml create mode 100644 甲情_甲意/miniprogram/pages/denglutest/denglutest.js create mode 100644 甲情_甲意/miniprogram/pages/denglutest/denglutest.json create mode 100644 甲情_甲意/miniprogram/pages/image/dingwei.png create mode 100644 甲情_甲意/miniprogram/pages/image/wiegouxuan.png create mode 100644 甲情_甲意/miniprogram/pages/image/yigouxuan.png create mode 100644 甲情_甲意/miniprogram/pages/test1/test1.acss create mode 100644 甲情_甲意/miniprogram/pages/test1/test1.axml create mode 100644 甲情_甲意/miniprogram/pages/test1/test1.js create mode 100644 甲情_甲意/miniprogram/pages/test1/test1.json diff --git a/甲情_甲意/.mini-ide/compileMode.json b/甲情_甲意/.mini-ide/compileMode.json index 0f6fcb8..43d0b24 100644 --- a/甲情_甲意/.mini-ide/compileMode.json +++ b/甲情_甲意/.mini-ide/compileMode.json @@ -44,6 +44,41 @@ "title": "评价", "page": "pages/pingjia/pingjia", "launchMode": "common" + }, + { + "title": "我的收藏", + "page": "pages/wodeshoucang/wodeshoucang", + "launchMode": "common" + }, + { + "title": "pages/test/test", + "page": "pages/test/test", + "launchMode": "common" + }, + { + "title": "发布抢单", + "page": "pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan", + "launchMode": "common" + }, + { + "title": "我的预约", + "page": "pages/wodeyuyue/wodeyuyue", + "launchMode": "common" + }, + { + "title": "pages/test1/test1", + "page": "pages/test1/test1", + "launchMode": "common" + }, + { + "title": "店铺主页", + "page": "pages/dianpuzhuye/dianpuzhuye", + "launchMode": "common" + }, + { + "title": "登录测试", + "page": "pages/denglutest/denglutest", + "launchMode": "common" } ] } \ No newline at end of file diff --git a/甲情_甲意/miniprogram/app.acss b/甲情_甲意/miniprogram/app.acss index da00b23..905b31f 100644 --- a/甲情_甲意/miniprogram/app.acss +++ b/甲情_甲意/miniprogram/app.acss @@ -1,99 +1,5 @@ -/* page { - background-color: #ffffff; - box-sizing: border-box; - position: relative; - overflow-x: hidden; -} - -.page { - font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif; - font-size: 24rpx; - padding: 32rpx; - flex: 1; -} - -.page-description { - margin-bottom: 32rpx; -} - -.page-section { - background: #fff; - margin-bottom: 32rpx; -} - -.page-section-title { - padding: 16rpx 32rpx; -} - -.page-section-demo { - padding: 32rpx; -} - -.page-section-btns { - border-top: 1px solid #ddd; - display: flex; - justify-content: space-around; - align-items: center; -} - -.page-section-btns > view { - flex: 1; - height: 84rpx; - display: flex; - align-items: center; - justify-content: space-around; - color: #49a9ee; -} -.page-section-btns > view + view { - border-left: 1px solid #ddd; -} - - - -.bc_blue { - background-color: #49A9EE; -} - -.bc_red { - background-color: #F04134; -} - -.bc_yellow { - background-color: #FFBF00; -} - -.bc_green { - background-color: #00A854; -} - -.form-row { - display: flex; - align-items: center; - padding: 0 30rpx; - height: 88rpx; - align-items: center; -} - -.form-row-label { - width: 180rpx; - font-size: 34rpx; - margin-right: 10rpx; - text-align: left; - color: #000; -} - -.form-row-content { - flex: 1; - font-size: 34rpx; -} - -.form-line { - height: 1px; - background-color: #ddd; - margin-left: 30rpx; -} */ page{ - width: 100vw; /* 或者 750rpx */ + width: 100vw; height: auto; - overflow:hidden; /* 防止溢出 */ + overflow:hidden; } \ No newline at end of file diff --git a/甲情_甲意/miniprogram/app.json b/甲情_甲意/miniprogram/app.json index da1fcb4..3ac17e6 100644 --- a/甲情_甲意/miniprogram/app.json +++ b/甲情_甲意/miniprogram/app.json @@ -29,12 +29,13 @@ "pages/shangpinjiemian/shangpinjiemian", "pages/shangjiaruzhu/shangjiaruzhu", "pages/gouwuche/gouwuche", - "pages/gerenxinxi/gerenxinxi", "pages/dianpuzhuye/dianpuzhuye", "pages/index", "pages/test/test", "pages/meijiashirenzheng/meijiashirenzheng", - "pages/pingjia/pingjia" + "pages/pingjia/pingjia", + "pages/test1/test1", + "pages/denglutest/denglutest" ], "window": { "defaultTitle": "甲情甲意", diff --git a/甲情_甲意/miniprogram/pages/denglu/denglu.js b/甲情_甲意/miniprogram/pages/denglu/denglu.js index 067c674..645459e 100644 --- a/甲情_甲意/miniprogram/pages/denglu/denglu.js +++ b/甲情_甲意/miniprogram/pages/denglu/denglu.js @@ -1,5 +1,4 @@ import {url} from '../request' - Page({ data: { authCode: '', @@ -15,6 +14,22 @@ Page({ console.log(typeof authCode); console.log(authCode); + // my.setStorage({ + // key: 'userInfo', + // data: { + // username: username, + // avatarUrl: avatarUrl, + // cookie:setCookie, + // id:id + // }, + // success: function () { + + // console.log('用户信息已存储',cookie); + // }, + // fail: function (err) { + // console.error('存储失败:', err); + // } + // }); // 请求后端接口进行用户登录 my.request({ url: url + '/api/Alipay/parseCode', @@ -23,7 +38,8 @@ Page({ }, success: (res) => { const { username, avatarUrl,id} = res.data.data; - const setCookie = res.header['Set-Cookie']; + const setCookie = res.header['set-cookie'] || res.header['Set-Cookie']; + console.log('Set-Cookie:', setCookie+'这是这个码'); // 存储用户信息到本地存储 my.setStorage({ key: 'userInfo', diff --git a/甲情_甲意/miniprogram/pages/denglutest/denglutest.acss b/甲情_甲意/miniprogram/pages/denglutest/denglutest.acss new file mode 100644 index 0000000..a1c41fe --- /dev/null +++ b/甲情_甲意/miniprogram/pages/denglutest/denglutest.acss @@ -0,0 +1,44 @@ +page { + background-color: white; + } + .tupian{ + width: 500rpx; + height: 500rpx; + border-radius: 250rpx; + overflow: hidden; + margin-left: auto; + margin-right: auto; + display: block; + } + .wenzi{ +font-size: 40rpx; +display: flex; + justify-content: center; + align-items: center; + margin-top: 30px; + } + .container{ + display: flex; + flex-direction: column; + justify-content: flex-end; + align-items: center; + margin-top: 50px; + } + navigator { +background-color: blue; + color: #fff; + margin-bottom: 10rpx; +padding: 20rpx; + text-align: center; + } + + .navigator-hover { + background-color: lightskyblue; +color: #fff; + } + .image{ + width: 80rpx; + height: 80rpx; + position: relative; + left: 330rpx; + } \ No newline at end of file diff --git a/甲情_甲意/miniprogram/pages/denglutest/denglutest.axml b/甲情_甲意/miniprogram/pages/denglutest/denglutest.axml new file mode 100644 index 0000000..770f604 --- /dev/null +++ b/甲情_甲意/miniprogram/pages/denglutest/denglutest.axml @@ -0,0 +1,7 @@ + + + + 请完成授权以继续使用 + + + \ No newline at end of file diff --git a/甲情_甲意/miniprogram/pages/denglutest/denglutest.js b/甲情_甲意/miniprogram/pages/denglutest/denglutest.js new file mode 100644 index 0000000..00ff249 --- /dev/null +++ b/甲情_甲意/miniprogram/pages/denglutest/denglutest.js @@ -0,0 +1,77 @@ +import {url} from '../request' +Page({ + data: { + authCode: '', + }, + + Login() { + my.getAuthCode({ + + scopes: 'auth_user', + success: res => { + const authCode = res.authCode; + + console.log(typeof authCode); + console.log(authCode); + + my.setStorage({ + key: 'userInfo', + data: { + username: username, + avatarUrl: avatarUrl, + cookie:setCookie, + id:id + }, + success: function () { + + console.log('用户信息已存储',cookie); + }, + fail: function (err) { + console.error('存储失败:', err); + } + }); + // 请求后端接口进行用户登录 + // my.request({ + // url: url + '/api/Alipay/parseCode', + // data: { + // authCode, + // }, + // success: (res) => { + // const { username, avatarUrl,id} = res.data.data; + // const setCookie = res.header['set-cookie'] || res.header['Set-Cookie']; + // console.log('Set-Cookie:', setCookie+'这是这个码'); + // // 存储用户信息到本地存储 + // my.setStorage({ + // key: 'userInfo', + // data: { + // username: username, + // avatarUrl: avatarUrl, + // cookie:setCookie, + // id:id + // }, + // success: function () { + + // console.log('用户信息已存储',cookie); + // }, + // fail: function (err) { + // console.error('存储失败:', err); + // } + // }); + + + + // // 登录成功后的处理逻辑 + // console.log(res); + // my.alert({ + // title: '登录成功', + // }); + // my.navigateBack(); + // }, + // fail: (res) => { + // console.log("登录失败:", res); + // } + // }); + } + }); + }, +}); \ No newline at end of file diff --git a/甲情_甲意/miniprogram/pages/denglutest/denglutest.json b/甲情_甲意/miniprogram/pages/denglutest/denglutest.json new file mode 100644 index 0000000..1870a78 --- /dev/null +++ b/甲情_甲意/miniprogram/pages/denglutest/denglutest.json @@ -0,0 +1,5 @@ +{ + "defaultTitle": "登录测试", + "usingComponents": {}, + "styleIsolation": "apply-shared" +} diff --git a/甲情_甲意/miniprogram/pages/dianpuzhuye/dianpuzhuye.acss b/甲情_甲意/miniprogram/pages/dianpuzhuye/dianpuzhuye.acss index e6450ab..bacfb26 100644 --- a/甲情_甲意/miniprogram/pages/dianpuzhuye/dianpuzhuye.acss +++ b/甲情_甲意/miniprogram/pages/dianpuzhuye/dianpuzhuye.acss @@ -65,33 +65,26 @@ font-size: 13px; } .box3{ - width: 390px; + width: 100%; height: 1px; background-color: darkgrey; - position: relative; - top:50rpx; } /* 地址 */ .z8{ - position: relative; font-size: 12px; - top:60rpx; - left: 35rpx; + margin-left: 10rpx; } .image3{ width: 10px; height: 12px; - position: absolute; - top:395rpx; - left: 5px; + margin-left: 5rpx; } .box4{ - width: 390px; + width: 100%; height: 1px; background-color: darkgrey; - position: relative; - top:90rpx; + margin-top: 10rpx; } /* 推荐项目 */ .zt1{ @@ -180,7 +173,7 @@ width: 35px; height: 30px; position: relative; - top:15px; + top:24px; left: 20rpx; } .box5{ @@ -193,7 +186,7 @@ .t1{ position: relative; left: 90rpx; - bottom: 25rpx; + bottom: 30rpx; } .box6{ width: 130px; @@ -254,4 +247,11 @@ position: relative; left: 230rpx; bottom: 200rpx; +} +.diimage{ + width: 50rpx; + height: 50rpx; + position: relative; + left: 130rpx; + bottom: 25rpx; } \ No newline at end of file diff --git a/甲情_甲意/miniprogram/pages/dianpuzhuye/dianpuzhuye.axml b/甲情_甲意/miniprogram/pages/dianpuzhuye/dianpuzhuye.axml index 1c97f78..93db4a1 100644 --- a/甲情_甲意/miniprogram/pages/dianpuzhuye/dianpuzhuye.axml +++ b/甲情_甲意/miniprogram/pages/dianpuzhuye/dianpuzhuye.axml @@ -13,16 +13,18 @@ - 已休息 + + 已休息 营业中 营业时间:{{startBusiness}}-{{endBusiness}} + - - {{address}} - + + + {{address}} @@ -59,6 +61,7 @@ 评价 + 咨询 diff --git a/甲情_甲意/miniprogram/pages/dianpuzhuye/dianpuzhuye.js b/甲情_甲意/miniprogram/pages/dianpuzhuye/dianpuzhuye.js index f317054..735b3ec 100644 --- a/甲情_甲意/miniprogram/pages/dianpuzhuye/dianpuzhuye.js +++ b/甲情_甲意/miniprogram/pages/dianpuzhuye/dianpuzhuye.js @@ -1,3 +1,4 @@ +import { loadavg } from 'os'; import {url} from '../request' Page({ data: { @@ -37,6 +38,7 @@ Page({ const endBusiness = options.endBusiness; const storeStatus = options.storeStatus; const id = options.id + console.log(id,'zheyedesaksdas'); // Set them in data for use in the page this.setData({ userId: userId, @@ -66,6 +68,7 @@ Page({ }, dataType: 'json', success: (res) => { + console.log(id,'这是onload'); console.log('Request succeeded:', res); if (res.data && res.data.data) { this.setData({ @@ -81,6 +84,50 @@ Page({ }); this.meijiahsi(); }, + soucang() { + my.getStorage({ + key: 'userInfo', + success: (res) => { + const userInfo = res.data; + const businessId = this.data.id; // 获取 onLoad 中保存的 id + + if (userInfo && userInfo.cookie) { + my.request({ + url: url + '/api/collect/add', + method: 'POST', + data: { + businessId: businessId // 使用 businessId 来请求收藏 + }, + headers: { + 'content-type': 'application/json', + 'Cookie': userInfo.cookie, + }, + dataType: 'json', + success: (res) => { + my.alert({ + content: '收藏成功' + }); + console.log('收藏成功', res); + }, + fail: (error) => { + console.error('请求失败: ', JSON.stringify(error)); + my.alert({ content: '请求失败,请稍后重试' }); + }, + }); + } else { + my.alert({ + content: '您未登录,请先登录。', + success: () => { + my.navigateTo({ + url: '/pages/denglu/denglu', + }); + }, + }); + } + }, + }); + }, + meijiahsi(){ my.request({ url: url + '/api/manicurist/userQueryAll', @@ -130,5 +177,6 @@ Page({ url:`/pages/shangpinjiemian/shangpinjiemian?commoditiesPrice=${commoditiesPrice}&&commoditiesName=${commoditiesName}&&commoditiesImage=${commoditiesImage}&&ids=${ids}&&businessId=${businessId}` }) console.log(ids,businessId,commoditiesImage,commoditiesName,commoditiesPrice+'这是商品的') - } + }, + }); diff --git a/甲情_甲意/miniprogram/pages/gerenxinxi/gerenxinxi.acss b/甲情_甲意/miniprogram/pages/gerenxinxi/gerenxinxi.acss index bad9ebb..e69de29 100644 --- a/甲情_甲意/miniprogram/pages/gerenxinxi/gerenxinxi.acss +++ b/甲情_甲意/miniprogram/pages/gerenxinxi/gerenxinxi.acss @@ -1,89 +0,0 @@ -.box1{ - width:390px; - height: 900px; - background-color:#eec2c7; -} -/* 标题 */ -.text1 -{ - font-size: 20px; - font-weight: bolder; - color: black; - position: absolute; - top:10px; - left:140px; -} -.box2{ - width:350px; - height: 300px; - position: absolute; - background-color: #ffffff; - border-radius: 20px; - top:60px; - left:20px; -} -/* 头像 */ -.z1{ - font-size: 15px; - top:50px; - left:20px; - position: absolute; -} -.box2 image{ - border-radius: 50px; - width: 55px; - height: 55px; - top:30px; - left:260px; - position: absolute; -} -.x1{ - height: 1px; - width: 320px; - background-color: darkgrey; - position: absolute; - top:100px; - left:10px; -} -/* 昵称 */ -.z2{ - font-size: 15px; - top:150px; - left:20px; - position: absolute; -} -.z3{ - font-size: 15px; - top:150px; - left:220px; - position: absolute; -} -.x2{ - height: 1px; - width: 320px; - background-color: darkgrey; - position: absolute; - top:190px; - left:10px; -} -/* 地区 */ -.z4{ - font-size: 15px; - top:220px; - left:20px; - position: absolute; -} -.z5{ - font-size: 15px; - top:220px; - left:240px; - position: absolute; -} -.x3{ - height: 1px; - width: 320px; - background-color: darkgrey; - position: absolute; - top:260px; - left:10px; -} diff --git a/甲情_甲意/miniprogram/pages/gerenxinxi/gerenxinxi.axml b/甲情_甲意/miniprogram/pages/gerenxinxi/gerenxinxi.axml index f34ec69..e69de29 100644 --- a/甲情_甲意/miniprogram/pages/gerenxinxi/gerenxinxi.axml +++ b/甲情_甲意/miniprogram/pages/gerenxinxi/gerenxinxi.axml @@ -1,19 +0,0 @@ - - - 个人信息 - - - 头像 - - - - 昵称 - 爱美甲的仙女123 - - - 地区 - 哈尔滨 - - - - \ No newline at end of file diff --git a/甲情_甲意/miniprogram/pages/gouwuche/gouwuche.acss b/甲情_甲意/miniprogram/pages/gouwuche/gouwuche.acss index 071ed93..10700d4 100644 --- a/甲情_甲意/miniprogram/pages/gouwuche/gouwuche.acss +++ b/甲情_甲意/miniprogram/pages/gouwuche/gouwuche.acss @@ -61,10 +61,10 @@ .boxd { width: 100px; height: 40px; - position: relative; + position: absolute; border-radius: 30px; background-color: rgb(162, 12, 12); - left: 280rpx; + left: 570rpx; display: flex; align-items: center; justify-content: center; @@ -92,6 +92,9 @@ } .text3{ height: 20px; + width: 60px; position: absolute; - left: 60rpx; + left: 620rpx; + font-size:12px; + color:#a8b0b8 } diff --git a/甲情_甲意/miniprogram/pages/gouwuche/gouwuche.axml b/甲情_甲意/miniprogram/pages/gouwuche/gouwuche.axml index 2bec782..a9ea0f4 100644 --- a/甲情_甲意/miniprogram/pages/gouwuche/gouwuche.axml +++ b/甲情_甲意/miniprogram/pages/gouwuche/gouwuche.axml @@ -14,7 +14,10 @@ - + + @@ -27,6 +30,7 @@ + 移除购物车 diff --git a/甲情_甲意/miniprogram/pages/gouwuche/gouwuche.js b/甲情_甲意/miniprogram/pages/gouwuche/gouwuche.js index 2d1ecd2..4183def 100644 --- a/甲情_甲意/miniprogram/pages/gouwuche/gouwuche.js +++ b/甲情_甲意/miniprogram/pages/gouwuche/gouwuche.js @@ -1,10 +1,12 @@ -import {url} from '../request' +import { url } from '../request'; + Page({ data: { id: '', checked: false, // 全选的状态 productList: [], // 商品列表 - selectedItems: [] // 每个商品的选中状态 + selectedItems: [], // 每个商品的选中状态 + totalPrice: 0, // 总价 }, onShow() { @@ -20,9 +22,7 @@ Page({ my.request({ url: url + '/api/cart/selectByUserId', method: 'POST', - data: { - id: this.data.id, - }, + data: { id: this.data.id }, headers: { 'content-type': 'application/json', 'Cookie': userInfo.cookie, @@ -33,8 +33,6 @@ Page({ const cartItems = res.data.data; this.fetchProductDetails(cartItems); } - console.log(res); - console.log(this.data.id); }, fail: (error) => { console.error('请求失败: ', JSON.stringify(error)); @@ -54,7 +52,17 @@ Page({ }, }); }, - yichu(){ + + yichu(e) { + const cartId = e.currentTarget.dataset.id; // 获取商品的 cartId + if (!cartId) { + console.error('没有找到商品cartId'); + my.alert({ content: '商品ID未找到,请稍后重试' }); + return; + } + + console.log('需要移除的商品cartId:', cartId); + my.getStorage({ key: 'userInfo', success: (res) => { @@ -62,58 +70,87 @@ Page({ this.setData({ id: userInfo.id, // 获取 id }); - + // 发送请求移除商品 + if (userInfo && userInfo.cookie) { + my.request({ + url: url + '/api/cart/delete', + method: 'POST', + data: { id: cartId }, // 使用 cartId 作为参数 + headers: { 'content-type': 'application/json', 'Cookie': userInfo.cookie }, + dataType: 'json', + success: (res) => { + console.log(res); + if (res.data.code === 0) { + my.alert({ content: '成功移除商品' }); + console.log(res); + // 更新购物车 + this.updateCartList(); + } else { + my.alert({ content: '移除商品失败,请稍后重试' }); + console.log(res); + } + }, + fail: (error) => { + console.error('请求失败: ', JSON.stringify(error)); + my.alert({ content: '请求失败,请稍后重试' }); + }, + }); + } + }, + }); + }, + // 移除后更新 + updateCartList() { + my.getStorage({ + key: 'userInfo', + success: (res) => { + const userInfo = res.data; + if (userInfo && userInfo.cookie) { my.request({ - url: url + '/api/cart/delete', + url: url + '/api/cart/selectByUserId', // 获取最新的购物车数据 method: 'POST', - data: { - id: item.commoditiesId, - }, - headers: { + data: { + id: this.data.id + }, // 使用当前用户ID + headers: { 'content-type': 'application/json', - 'Cookie': userInfo.cookie, - }, + 'Cookie': userInfo.cookie + }, dataType: 'json', success: (res) => { - alert('成功移除商品') - console.log(res); + if (res.data.code === 0) { + const cartItems = res.data.data; + this.fetchProductDetails(cartItems, userInfo.id); + } else { + my.alert({ content: '获取购物车数据失败,请稍后重试' }); + } }, fail: (error) => { console.error('请求失败: ', JSON.stringify(error)); my.alert({ content: '请求失败,请稍后重试' }); }, }); - } else { - my.alert({ - content: '您未登录,请先登录。', - success: () => { - my.navigateTo({ - url: '/pages/denglu/denglu', - }); - }, - }); } }, }); }, - fetchProductDetails(cartItems) { + fetchProductDetails(cartItems, userId) { + console.log(cartItems, 'zheshiid'); const promises = cartItems.map((item) => { return new Promise((resolve, reject) => { my.request({ url: url + '/api/commodities/getById/commodities', method: 'GET', - data: { - id:item.commoditiesId - }, + data: { id: item.commoditiesId }, headers: { 'content-type': 'application/json' }, success: (res) => { if (res.data.code === 0) { - resolve(res.data.data); - console.log(res); - console.log('ajsdhjasoijdkas'); - console.log(this.data.id) + const productData = res.data.data; + productData.userId = userId; // 添加 userId + productData.cartId = item.id; // 将 cartId 添加到商品数据中 + resolve(productData); } else { reject(`商品信息获取失败: ${res.data.message}`); } @@ -124,49 +161,21 @@ Page({ }); }); }); - + Promise.all(promises) .then((productList) => { this.setData({ productList, - selectedItems: new Array(productList.length).fill(false), // 初始化所有商品的选中状态 + selectedItems: new Array(productList.length).fill(false), // 初始化所有商品的选中状态为 false }); + console.log(productList, '这是商品'); }) .catch((error) => { console.error('商品信息获取失败: ', error); my.alert({ content: '商品信息获取失败,请稍后重试' }); }); }, - onChange(value, e) { - console.log(value, e); -}, - // 全选控制 - toggleChange() { - const newChecked = !this.data.checked; - const selectedItems = new Array(this.data.productList.length).fill(newChecked); // 全选时,更新所有商品的选中状态 - this.setData({ - checked: newChecked, - selectedItems, - }); - }, - - // 单独控制每个商品的选中状态 - handleCheckedChange(e) { - console.log(e); // 打印出 e 对象,检查其结构 - const index = e.target.dataset.index; // 获取当前商品的索引 - if (index === undefined) { - console.error('e.target.dataset.index is undefined'); - return; - } - const selectedItems = [...this.data.selectedItems]; // 获取当前的选中状态 - selectedItems[index] = e.detail.value; // 更新该商品的选中状态 - this.setData({ - selectedItems, // 更新选中状态 - }); - }, - - // 计算总价 calculateTotalPrice() { const selectedItems = this.data.selectedItems; const productList = this.data.productList; @@ -180,5 +189,28 @@ Page({ totalPrice: totalPrice.toFixed(2), }); }, -}); + toggleChange() { + const newChecked = !this.data.checked; + const selectedItems = new Array(this.data.productList.length).fill(newChecked); + this.setData({ + checked: newChecked, + selectedItems, + }); + this.calculateTotalPrice(); + }, + + handleCheckedChange(e) { + const index = e.target.dataset.index; + if (index === undefined) { + console.error('e.target.dataset.index is undefined'); + return; + } + const selectedItems = [...this.data.selectedItems]; + selectedItems[index] = e.detail.value; + this.setData({ + selectedItems, + }); + this.calculateTotalPrice(); + }, +}); diff --git a/甲情_甲意/miniprogram/pages/image/dingwei.png b/甲情_甲意/miniprogram/pages/image/dingwei.png new file mode 100644 index 0000000000000000000000000000000000000000..9087b7950c2de3fac626bb998b81f4d5b593c06d GIT binary patch literal 8816 zcmcIq`8!na-#?S}lWmaf+e8c^+4rRphN!V+kP4y6zGOEQ8B3%_$W|BsO+A795Qh3d=}&F9)>9X@B7nMng}7c29byeR24mmhDDd&`8~hFiRLeW z)Z@i6gbsQSYDY8sI~C+G@S*n)@Y8%?HbsE<)l<)|?JZpzuuh|rJq_h4y$Bs!1>(s%xoyuxrY7H<(W8Y$C{LKIgWuPpfY<%&(l}NI zv^dOP_c$~b{4DYr*5QRdh5?uYK`4`Kn_jRw3EbF=aBk{cU-wqHRgOvnQ_=dEJYdRA zlysZ`li(_UiD{6G+P}sgo;SK$YThyYt9ykyo$T_w{-u?{<())2bSk)4^f+bxLJE`J zaX__7-)gCKalq)};-Z)D(#LsyezYp`I;Izh zZ&TkFZ6X3LC>9mu!hAjpjq4D5@f{LXMaO=Y*AZu}S4l5Y%S#8HlLx%Zz!Z`cvo))F z*b7W)C3zzI`3e&A7`W!a6B84&Cm<~BdMncuCikgDvgZLU5az(>b23)#M-b-a4So!M zZ1%{B=GCx8{KYHp8t;97wiN}IFnHtQgJ2*hc)kHsUf}I2?^XqG&3h=7cXwvei|8}r zcmC^j8LQUE+?SIhC%KE&km}lb{47pP{mR|mgCMxaGyu)a1(iw`<{cu;KbiPd7x~ukI!>{{f(I+{4n@$31y({4J`SqOEEW_M1ke-gGTdSU8&DRR9*f3 zFKn%SQrBX>pqr14q&_+=kZrvV)|82w5^2uTnT$WHw_^ORGG+(5hawDR)UA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%lXYcf_w(G%h2!+ zxh(wGKv+og%1KMRQ{yw!+MRt|>%2@YP^RXqt0ZkYc0wnDQ1jyv@cJGs1tGyC+Gm=d z1EKVD_@`i;Hz+MzRQIXJcy$*}`pg7@gyax+wHl6}Hw^(|(?-&`3I6)j&Foviy_fP* z_n*{?Tflwd%n6UhWYRF&?)V+}z2xZA6R|uHrr8aOt5e7$jh7g}CdC5ZKq|;jjvneI z1nlpUNTfe{ERIij{u=kui?9mCFDH%3My~ zQGnz`|1V~N(EnHq{=DXFd`#AdwkT;-1sc91XWj`8B7iV4{b>f!9i%AfW%i1Bi5KXf z^-!U~i(KZ!VDb|B6&K{J-~IeU8U@5!+~Ck2s(X$Df3bVz3`$flxOsEN%VvUJq*N&5 z27%as!PF^_YZ$ElF?mg=8U-E_fi%8-{H~B1bqA??N@XD8iltB7`EFb2y=GVai|J6V zgS<3j@$&1+_$_b??gM?An$O-Ya{rWhSKurW!%*0Zn+|WH>E;$|PJd6l0eQ_EM`hrh z0B}y|-(CR!i*!K7OZkb)m7jv-%nu-=R+>UPpg4bFzDT#Z`o2*zremIRZrkKJ^9PzEa%#P-`)`lLr0# z&!%`03pLcWIrnWTm@VQ`WFQ;3*NTi>t0*kryCq=Y0pwysbQyhgeM(UwBQF_*U?lN? z^;=m$lQ`o$mSClabF`43MK7e5Dn2slR-N9J%aZ2%E2D+R*iXoIAs+IU{W%9_)j3N6 zKWMy`IlO()sJVU>@;1Qs-IDjfeH%u literal 0 HcmV?d00001 diff --git a/甲情_甲意/miniprogram/pages/image/wiegouxuan.png b/甲情_甲意/miniprogram/pages/image/wiegouxuan.png new file mode 100644 index 0000000000000000000000000000000000000000..44dbf8d26d19be7e284f6a3c02f45fd4c005762c GIT binary patch literal 6516 zcma)hc|25K{P(rXIzwqjgPE}u*_T3gBaD5`zD6iS)*@>fYseB=LL>Xw$^MOu>}x`d zC407Hr+&BR_s{eE_xy41J@>xuS?)QX^LZ~fT3=V4k&c}X002f!4U8dp?fG}mQiJDm z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@Wi0d zSE1?n-Po)dfoK9Rz{vaz&ZW?XFa#pxu5z)6 zn>?rTsn3IrbKafpUR^qF zoZnKYui8)TZ)xhYE9QOo$U(oH1zBZ#C1;hxymX=)r*UaT${xlUiK8iDhH_8>G~`M< zgpzF;Ai(rOt?NPbn#@6!pw`7-NpyYFtVf^k?Ciz%0ExL9puaErr_tvN+%7DoC2Xqo zKhTk9=;lfnmI3YdZMm&=~&!{QnxvUz+}J_x0fgDq-Mn6hKo=7gM2P7ydt`%omaX literal 0 HcmV?d00001 diff --git a/甲情_甲意/miniprogram/pages/image/yigouxuan.png b/甲情_甲意/miniprogram/pages/image/yigouxuan.png new file mode 100644 index 0000000000000000000000000000000000000000..1e04e3f8e3fbf0ebacb849b53a2091dbadc7e5eb GIT binary patch literal 5367 zcmZu#XH-*7w>~*ZD4|2>#ZaV#UZn^GK?p@Uf{0Y5mw+N2PXq;|Hw6@5z|f@%iqb)8 zA}FGC2uKG31u0Ve@cr(OyY9L_X7*aMf6UCDz317_6K86yM~C7<0RTX!kJm9jwLO0a z6~*aXVN?0^)WB|<>s1 zEX3K#2)uB_bZ(48oC_l?ZkwZ6Q=66%kD=0<<)4iy0L^TkF+Y>__psNz+4{M`+6UYkO8b(uxlqHP`tND*m3hLt+!u7IspR^>&BE8ub&796!#C`6(!)N4Xqrg04C!Ff z;$q}e3}AjkGXhsQ(>7}Aigz&8gH7KpnwK9AIm&C1*$MT<Vp@9q{I`^*{36&`lA-My@s)E9jGWF0#S#Ytsn2K-7C zZ{Z@msfmf1Ym&o*SGo1<#u-r;8me>WlJ(N-sS@6`U&^7_(HV{P^%4x6HSy<(SO;c5 zanOnXl4O*Qcj>sGCS3FjzcBLI;S=XLhdP2y9H*Ra2MQmW_1P~8S#P0u;M-Ff;*)2Z zyzZRu0vU~q7r}6Ac=+(P8(Yb%ao9(!+_vUrKUJIfREp@&rD8b$+#@^gb&~(a2m7Hk z8)MgL`}3T=;J^fV)eWn61s#l~Uf%asgtR%L>;7O+_&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22R@Z9ZHb@bY0?Mjvc+*-4WO5#APKVGwYEs`%BTU9lT*GzeaCt5=}l(28U#^Fg1_5 z|5Z_z)#tR<&|$bxt(y1r^&B(6>|Uk&II?770QHo3q~dPoPyJD92bSHw98 z8C|jb#+z5vEfzL+u~>a>sFEMH(p;YKm-*aVgXJ(ddfTOyx%2!l8A#x9s{H4V&`xW4 zM$(Iu|Efs=*_O;QXDF6MFp*N8h8Hqu?@$SXJ&Xke)ez3uO0cu?EYDtYGB0Kw+%~+< z7Wr*NC%)_&jHJ7WZRGv~BM-h^%6+FX8hZlQ(Pa20)gsd_1U2+ioa6qCYoLne{6F$o z6RK;o^t~s8667Anf?MrBQ!LB&qzP!V6mmyBa92O*DVS#r8_Ad5#SrPy2ar`HFy!#(ZE|J0j literal 0 HcmV?d00001 diff --git a/甲情_甲意/miniprogram/pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan.acss b/甲情_甲意/miniprogram/pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan.acss index 54eedbf..e504cec 100644 --- a/甲情_甲意/miniprogram/pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan.acss +++ b/甲情_甲意/miniprogram/pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan.acss @@ -1,116 +1,43 @@ -/* 上门预约盒子 */ -.smyy{ - width: 390px; - height: 50px; - position: absolute; - background-color: #eec2c7; +.text{ + font-size: 23px; + margin-left: 20rpx; } -.smyy image{ - width: 30px; - height: 30px; - position: absolute; - left: 10px; - top: 10px; +.box{ + margin-top: 20rpx; } - -/* 《上门预约》 */ -.wsmyy{ - font-size: 25px; - font-weight: bold; - left: 120px; - top: 10px; - position: absolute; - color: black; +.box1{ + width: 100%; + height:100rpx; + border-top: 1px solid rgb(180, 177, 177); + display: flex; + align-items: center; + justify-content: space-between; } - -/* 《基本信息》 */ -.wjbxx{ - font-size: 20px; - font-weight: bold; - left: 20px; - top: 60px; - position: absolute; - color: black; +.ktext{ + font-size: 18px; + color: rgb(164, 161, 161); + margin-left: 10rpx; } - -/* 基本信息 的 内容框 */ -.information{ - width: 390px; - height: 500px; - top: 90px; - position: absolute; -} - -/* 基本信息要填的内容 */ -.wjb{ - font-size: 16px; - left: 25px; - top: 15px; - position: absolute; - color: grey; -} - -/* 输入内容 */ -.snr{ - width: 180px; - height: 40px; - position: absolute; - left: 210px; - top: 2px; -} - -/* 名称 */ -.mc{ - width: 390px; - height: 50px; - position: absolute; - border: 1px #d9d9d9 solid; -} - -/* 联系电话 */ -.lxdh{ - width: 390px; - height: 50px; - position: absolute; - top: 50px; - border: 1px #d9d9d9 solid; -} - -/* 项目 */ -.xm{ - width: 390px; - height: 50px; - position: absolute; - top: 100px; - border: 1px #d9d9d9 solid; -} - -/* 在店时间段 */ -.yysjd{ - width: 390px; - height: 50px; - position: absolute; - top: 150px; - border: 1px #d9d9d9 solid; -} - -/* 上门时间段 */ -.zdmjs{ - width: 390px; - height: 50px; - position: absolute; - top: 200px; - border: 1px #d9d9d9 solid; -} - -/* 提交申请按钮框 */ -.tjsq button{ - width: 200px; - height: 50px; - position: absolute; - border: none; - left: 100px; - top: 300px; +.submit{ + width: 80%; + height: 80rpx; + border: 1px solid #de868f; + border-radius: 40rpx; + display: flex; + justify-content: center; + align-items: center; background-color: #de868f; - border-radius: 15px; +} +.box2{ + display: flex; + justify-content: center; + margin-top: 100rpx; +} +.box3{ + width: 100%; + height:100rpx; + border: 1px solid rgb(180, 177, 177); + display: flex; + align-items: center; + justify-content: space-between; } \ No newline at end of file diff --git a/甲情_甲意/miniprogram/pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan.axml b/甲情_甲意/miniprogram/pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan.axml index 408b2d7..194e14d 100644 --- a/甲情_甲意/miniprogram/pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan.axml +++ b/甲情_甲意/miniprogram/pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan.axml @@ -1,48 +1,53 @@ - - - 上门预约抢单 - - -基本信息 - - - - - 名称 -
- -
+ + + 基本信息 - - 联系电话 -
- -
-
- - - 项目 -
- -
-
- - - 地址 -
- -
+ + 名称 + - - 预约时间段 -
- -
+ + 联系电话 + - - + + 地址 + + + + 项目 + + + + + + + 预约时间段 + + + + + + + 提交申请 + + \ No newline at end of file diff --git a/甲情_甲意/miniprogram/pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan.js b/甲情_甲意/miniprogram/pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan.js index cb73536..52b49be 100644 --- a/甲情_甲意/miniprogram/pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan.js +++ b/甲情_甲意/miniprogram/pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan.js @@ -1,4 +1,77 @@ Page({ - data: {}, + data: { + cityList: [ + { + label: '长甲', + children: [ + { + label: '贴钻款', + }, + { + label: '彩绘款', + }, + { + label: '猫眼款', + }, + { + label: '纯色款', + }, + ], + }, + { + label: '短甲', + children: [ + { + label: '贴钻款', + }, + { + label: '彩绘款', + }, + { + label: '猫眼款', + }, + { + label: '纯色款', + }, + ], + }, + { + label: '建构', + children: [ + { + label: '贴钻款', + }, + { + label: '彩绘款', + }, + { + label: '猫眼款', + }, + { + label: '纯色款', + }, + ], + }, + { + label: '本甲', + children: [ + { + label: '贴钻款', + }, + { + label: '彩绘款', + }, + { + label: '猫眼款', + }, + { + label: '纯色款', + }, + ], + }, + + ], + }, onLoad() {}, + }); diff --git a/甲情_甲意/miniprogram/pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan.json b/甲情_甲意/miniprogram/pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan.json index 89bb81c..7b777ea 100644 --- a/甲情_甲意/miniprogram/pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan.json +++ b/甲情_甲意/miniprogram/pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan.json @@ -1,4 +1,9 @@ { - "usingComponents": {}, + "defaultTitle": "发布抢单", + "usingComponents": { + "ant-date-picker": "antd-mini/es/DatePicker/index", + "ant-cascader-picker": "antd-mini/es/Picker/CascaderPicker/index", + "ant-list-item": "antd-mini/es/List/ListItem/index" + }, "styleIsolation": "apply-shared" } diff --git a/甲情_甲意/miniprogram/pages/pingjia/pingjia.acss b/甲情_甲意/miniprogram/pages/pingjia/pingjia.acss index e69de29..fd70c75 100644 --- a/甲情_甲意/miniprogram/pages/pingjia/pingjia.acss +++ b/甲情_甲意/miniprogram/pages/pingjia/pingjia.acss @@ -0,0 +1,51 @@ +/* 评价盒子 */ +.box { + width: 90%; + height: 150px; + border: 1px solid #de868f; + border-radius: 20rpx; + margin-top: 20rpx; +} +/* 标题部分 */ +.box1{ +width: 100%; +height: 50px; +display: flex; +justify-content: space-between +} +.text{ + display: inline-block; + font-weight: bold; + margin: 30rpx 0rpx 0rpx 30rpx; +} +.box2{ + display:inline-block; + position:relative; + +} +.text1{ + font-size: 12px; + color: #aea3a4 +} +.image{ + width: 60px; + height: 60px; + position: relative; + left: 30rpx; + border-radius: 20px; +} +.text2{ + position: relative; +} +.button { + background-color: #f3bfc1; /* Light pink background color */ + color: #000000; /* Text color */ + border-radius: 20px; /* Rounded edges */ + padding: 10px 20px; + font-size: 16px; + width: 90%; + margin-top: 50px; + display:flex; + flex-direction: column; + align-items: center +} \ No newline at end of file diff --git a/甲情_甲意/miniprogram/pages/pingjia/pingjia.axml b/甲情_甲意/miniprogram/pages/pingjia/pingjia.axml index f788f95..0118a83 100644 --- a/甲情_甲意/miniprogram/pages/pingjia/pingjia.axml +++ b/甲情_甲意/miniprogram/pages/pingjia/pingjia.axml @@ -1,5 +1,6 @@ - - + + + 提交评价或建议,鼓励美甲师和商家做得更好~ - - - + + + + + + + 您对美甲师满意吗? + + + 匿名提交 + + + + + + 美甲师制作 + 11月11日 16:37左右完成 + + + + 总体 + + + + + + + + + + + 您对商品/商家满意吗? + + + 匿名提交 + + + + + + 晓得美甲店 + + + + 总体 + + + + + + + 提交 \ No newline at end of file diff --git a/甲情_甲意/miniprogram/pages/pingjia/pingjia.js b/甲情_甲意/miniprogram/pages/pingjia/pingjia.js index cb73536..2d164e2 100644 --- a/甲情_甲意/miniprogram/pages/pingjia/pingjia.js +++ b/甲情_甲意/miniprogram/pages/pingjia/pingjia.js @@ -1,4 +1,7 @@ Page({ data: {}, onLoad() {}, + onChange(value, e) { + console.log(value, e); +}, }); diff --git a/甲情_甲意/miniprogram/pages/pingjia/pingjia.json b/甲情_甲意/miniprogram/pages/pingjia/pingjia.json index 25dc82d..834a4e8 100644 --- a/甲情_甲意/miniprogram/pages/pingjia/pingjia.json +++ b/甲情_甲意/miniprogram/pages/pingjia/pingjia.json @@ -1,6 +1,9 @@ { "defaultTitle": "评价", "usingComponents": { + "ant-checkbox": "antd-mini/es/Checkbox/index", + "ant-rate": "antd-mini/es/Rate/index", + "ant-icon": "antd-mini/es/Icon/index", "ant-notice": "antd-mini/es/NoticeBar/index" }, "styleIsolation": "apply-shared" diff --git a/甲情_甲意/miniprogram/pages/shangmenyuyue/shangmenyuyue.acss b/甲情_甲意/miniprogram/pages/shangmenyuyue/shangmenyuyue.acss index 678c815..d0b9a4d 100644 --- a/甲情_甲意/miniprogram/pages/shangmenyuyue/shangmenyuyue.acss +++ b/甲情_甲意/miniprogram/pages/shangmenyuyue/shangmenyuyue.acss @@ -1,235 +1,86 @@ -/* 搜索框的大盒子 */ -.sousuo{ + +.search-line { + display: flex; + align-items: center; + justify-content: center; + padding: 16px; +} +.cancel { + margin-left: 8px; +} +.image1{ + width: 30rpx; + height: 30rpx; +} +.box{ width: 100%; - height: 50px; + display: flex; /* 启用 Flexbox 布局 */ + flex-direction: column; /* 设置主轴为竖直方向 */ + align-items: center; /* 在交叉轴(水平方向)上居中对齐 */ + height: 100vh; } -.sousuo image{ - width: 30px; - height: 30px; - position: absolute; - left: 10px; - top: 10px; +.kuang{ +width: 90%; +height: 240rpx; +border: 1px solid #de868f; +border-radius: 20px; +margin-top: 20rpx; } -/* 搜索栏 */ -.ssl{ - width: 260px; - height: 40px; - position: absolute; - left: 64px; - top: 5px; - margin: 0 auto; - border: 1px #e5e5e5 solid; - border-radius: 20px; -} -.ssl image{ - width: 30px; - height: 30px; - position: absolute; - left: 10px; - top: 5px; +.image{ +width: 100px; +height: 100px; +border-radius: 20px; +position: relative; +top: 25rpx; +left: 20rpx; } -/* 搜索栏输入的内容 */ +.wenzi{ +width: 65%; +height: 200rpx; +position: relative; +left: 220rpx; +bottom: 180rpx; +} + +.text{ +font-weight: bolder; +margin-left: 10rpx; +position: relative; +top: 30rpx; +right: 10rpx; +} .box1{ - width: 100px; - height: 28px; - position: absolute; - left: 40px; - top: 5px; +font-size: 13px; +width: 100rpx; +background-color: #21a612; +margin-top: 20rpx; +margin-left: 10rpx; +color: white; +position: relative; +top: 88rpx; +right: 210rpx; } +.dingwei{ +position: relative; -/* 店铺筛选 */ -.shaixuan{ - width: 100%; - height: 50px; } - -/* 推荐店铺 */ -.tjdp{ - width: 90px; - height: 30px; - position: absolute; - left: 50px; - top: 70px; +.box2{ + display: flex; + justify-content: center; + align-items: center; + margin-top: 50rpx; + flex-direction: column; } - -/* 综合排序 */ -.zhpx{ - width: 90px; - height: 30px; - position: absolute; - left: 175px; - top: 70px; -} - -/* 筛选 */ -.sx{ - width: 90px; - height: 30px; - position: absolute; - left: 300px; - top: 70px; -} - -/* 店铺大盒子 */ -.dianpu{ - width: 100%; - height: 600px; -} - -/* a店铺 */ -.adianpu{ - width: 344px; - height: 120px; +.box4{ + width: 120rpx; + height: 50rpx; + border: 1px solid #21a612; + border-radius: 50px; + display: flex; + align-items: center; + justify-content: center; position: relative; - left: 2px; - top: 70px; - margin: auto; - border: 3px #de868f solid; - border-radius: 20px; -} -.adianpu image{ - width: 90px; - height: 90px; - position: absolute; - left: 10px; - top: 10px; - border-radius: 10px; -} - -/* a店铺名称 */ -.aname{ - font-size: 15px; - font-weight: bold; - left: 110px; - top: 15px; - position: absolute; - color: black; -} - -/* b店铺 */ -.bdianpu{ - width: 344px; - height: 120px; - position: absolute; - left: 22px; - top: 260px; - margin: auto; - border: 3px #de868f solid; - border-radius: 20px; -} -.bdianpu image{ - width: 90px; - height: 90px; - position: absolute; - left: 10px; - top: 10px; - border-radius: 10px; -} - -/* b店铺名称 */ -.aname{ - font-size: 15px; - font-weight: bold; - left: 110px; - top: 15px; - position: absolute; - color: black; -} - -/* c店铺 */ -.cdianpu{ - width: 344px; - height: 120px; - position: absolute; - left: 22px; - top: 400px; - margin: auto; - border: 3px #de868f solid; - border-radius: 20px; -} -.cdianpu image{ - width: 90px; - height: 90px; - position: absolute; - left: 10px; - top: 10px; - border-radius: 10px; -} - -/* c店铺名称 */ -.aname{ - font-size: 15px; - font-weight: bold; - left: 110px; - top: 15px; - position: absolute; - color: black; -} - -/* 可上门小框 */ -.ksm{ - width: 70px; - height: 26px; - position: absolute; - left: 255px; - top: 40px; - border: 2px #bfddc1 solid; - border-radius: 10px; -} - -/* 可上门小字 */ -.wksm{ - font-size: 12px; - left: 18px; - top: 6px; - position: absolute; - color:#7ab77d; -} - -/* 接受预约 */ -.yy1{ - width: 50px; - height: 25px; - position: absolute; - left: 110px; - top: 45px; - background-color: #58a55c; -} -.yy2{ - width: 60px; - height: 25px; - position: absolute; - left: 165px; - top: 45px; - background-color: #ffffff; - -} -.yy3{ - width: 10px; - height: 25px; - position: absolute; - left: 230px; - top: 45px; - background-color: #58a55c; -} - -/* 《预约》 */ -.wyy1{ - font-size: 12px; - color: #ffffff; -} -.wyy2{ - font-size: 12px; - color: #65ac68; -} - -/* 店铺地点 */ -.wdpdd{ - font-size: 12px; - left: 110px; - top: 85px; - position: absolute; - color: #9b9b9b; + left: 300rpx; } \ No newline at end of file diff --git a/甲情_甲意/miniprogram/pages/shangmenyuyue/shangmenyuyue.axml b/甲情_甲意/miniprogram/pages/shangmenyuyue/shangmenyuyue.axml index 0654e42..d28f379 100644 --- a/甲情_甲意/miniprogram/pages/shangmenyuyue/shangmenyuyue.axml +++ b/甲情_甲意/miniprogram/pages/shangmenyuyue/shangmenyuyue.axml @@ -1,116 +1,48 @@ - - - -
- -
-
-
- - - - 推荐店铺 - - - 综合排序 - - - 筛选 - - - - - - - - - - {{item.name}} - - 接受预约 - - - 08:00营业 - - - - 哈尔滨市呼兰区学院路街道288号 - - 可上门 - - - - - - - - - - + + + + + + {{item.name}} + {{item.statue}} + {{item.time}} + + {{item.address}} + + + 可上门 + - - 1231231231 - - --> + +
\ No newline at end of file diff --git a/甲情_甲意/miniprogram/pages/shangmenyuyue/shangmenyuyue.js b/甲情_甲意/miniprogram/pages/shangmenyuyue/shangmenyuyue.js index 7670dbf..d620bd5 100644 --- a/甲情_甲意/miniprogram/pages/shangmenyuyue/shangmenyuyue.js +++ b/甲情_甲意/miniprogram/pages/shangmenyuyue/shangmenyuyue.js @@ -1,36 +1,57 @@ Page({ data: { - value:'', - arr:[] - }, - shopName(e){ - console.log(e); - this.setData({ - value:e.detail.value - }) - }, - onSearch(){ - my.demo.callFunction({ - name:'querySelectByName', - data:{ - name:this.data.value + selectedCity:'', + + dianpu:[ + { + name:'小德美甲店铺', + statue:'接受预定', + image:'/pages/image/meijia1.jpg', + time:'8:00营业', + address:'哈尔滨市呼兰区学院路街道288号' }, - success:res=>{ - this.setData({ - arr:res.result.data - }) - } - }) + { + name:'小德美甲店铺', + statue:'接受预定', + image:'/pages/image/meijia1.jpg', + time:'8:00营业', + address:'哈尔滨市呼兰区学院路街道288号' + }, + { + name:'小德美甲店铺', + statue:'接受预定', + image:'/pages/image/meijia1.jpg', + time:'8:00营业', + address:'哈尔滨市呼兰区学院路街道288号' + }, + { + name:'小德美甲店铺', + statue:'接受预定', + image:'/pages/image/meijia1.jpg', + time:'8:00营业', + address:'哈尔滨市呼兰区学院路街道288号' + } + ] }, - onLoad() { - my.demo.callFunction({ - name:'queryAllShop', - success:res=>{ - console.log(res); + onShow(){ + my.getLocation({ + type: 1, // 获取包括省市区县数据 + success: (res) => { + console.log('定位成功:', res); this.setData({ - arr:res.result.data - }) + selectedCity: res.city // 将城市名称设置到 selectedCity + }); + }, + fail: (error) => { + console.error('定位失败:', error); + my.alert({ + title: '定位失败', + content: '无法获取当前位置,请检查定位权限设置。' + }); + this.setData({ + selectedCity: '定位失败' + }); } - }) - }, + }); + } }); diff --git a/甲情_甲意/miniprogram/pages/shangmenyuyue/shangmenyuyue.json b/甲情_甲意/miniprogram/pages/shangmenyuyue/shangmenyuyue.json index ef02a28..e3a47ed 100644 --- a/甲情_甲意/miniprogram/pages/shangmenyuyue/shangmenyuyue.json +++ b/甲情_甲意/miniprogram/pages/shangmenyuyue/shangmenyuyue.json @@ -1,5 +1,8 @@ { "defaultTitle": "上门预约", - "usingComponents": {}, + "usingComponents": { + "ant-icon": "antd-mini/es/Icon/index", + "ant-input": "antd-mini/es/Input/index" + }, "styleIsolation": "apply-shared" } diff --git a/甲情_甲意/miniprogram/pages/shangpinjiemian/shangpinjiemian.js b/甲情_甲意/miniprogram/pages/shangpinjiemian/shangpinjiemian.js index 8e38a60..c14f09c 100644 --- a/甲情_甲意/miniprogram/pages/shangpinjiemian/shangpinjiemian.js +++ b/甲情_甲意/miniprogram/pages/shangpinjiemian/shangpinjiemian.js @@ -64,8 +64,9 @@ this.checkUserLogin key: 'userInfo', success: (res) => { const userInfo = res.data; - + console.log(userInfo,userInfo.cookie); if (userInfo && userInfo.cookie) { + // 使用获取的 `cookie` 值 my.request({ url: url + '/api/cart/add', diff --git a/甲情_甲意/miniprogram/pages/shouye/shouye.js b/甲情_甲意/miniprogram/pages/shouye/shouye.js index 85be3dc..5770c88 100644 --- a/甲情_甲意/miniprogram/pages/shouye/shouye.js +++ b/甲情_甲意/miniprogram/pages/shouye/shouye.js @@ -57,8 +57,9 @@ Page({ }, dianpu(item) { const id = item.target.dataset.num - console.log('传递的数据:', id); + // console.log('传递的数据:', id); const ID = id.id + console.log(ID); const userId = id.userId const address = id.address const businessName = id.businessName diff --git a/甲情_甲意/miniprogram/pages/test/test.acss b/甲情_甲意/miniprogram/pages/test/test.acss index 9adf479..e69de29 100644 --- a/甲情_甲意/miniprogram/pages/test/test.acss +++ b/甲情_甲意/miniprogram/pages/test/test.acss @@ -1,88 +0,0 @@ -.box { - width: 100vw; - min-height: 100vh; /* 确保容器至少占满屏幕的高度 */ - background-color: #eec2c7; - overflow-y: auto; /* 允许竖直方向滚动 */ -} - -.box3 { - display: flex; - flex-direction: column; - background-color: rgba(252, 240, 240, 0.807); - border-radius: 20px; - padding: 10px; - margin-bottom: 80px; /* 留出一些空间给底部结算栏 */ -} - -.box1 { - width: 100%; - height: 170px; - display: flex; - flex-direction: row; -} - -.image { - width: 120px; - height: 120px; - border-radius: 10px; - position: relative; - left: 20px; - top: 20px; -} - -.box4 { - position: relative; - top: 80px; - left: 10px; - width: 25px; - height: 25px; -} - -.box5 { - position: relative; - left: 40px; - top:30px; -} - -.text { - padding: 5px; -} - -.container { - position: relative; - left: 85px; - top: 25px; -} - -.boxd { - width: 100px; - height: 40px; - position: relative; - border-radius: 30px; - background-color: rgb(162, 12, 12); - left: 140px; - display: flex; - align-items: center; - justify-content: center; -} - -.text1 { - color: #ffffff; - position: unset; -} - -.boxall { - display: flex; - align-items: center; - padding: 10px; - position: fixed; - bottom: 0; - left: 0; - width: 100%; - background-color: #fff; - box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); -} -.text2 { - position: relative; - left: 85px; -} diff --git a/甲情_甲意/miniprogram/pages/test/test.axml b/甲情_甲意/miniprogram/pages/test/test.axml index 6df41f6..e69de29 100644 --- a/甲情_甲意/miniprogram/pages/test/test.axml +++ b/甲情_甲意/miniprogram/pages/test/test.axml @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - {{item.commoditiesName}} - - - ¥{{item.commoditiesPrice}} - - - - - - - - - - - - 全选 - 合计:¥{{totalPrice}} - - 结算 - - - diff --git a/甲情_甲意/miniprogram/pages/test/test.js b/甲情_甲意/miniprogram/pages/test/test.js index 8b4c792..e69de29 100644 --- a/甲情_甲意/miniprogram/pages/test/test.js +++ b/甲情_甲意/miniprogram/pages/test/test.js @@ -1,132 +0,0 @@ -import {url} from '../request' -Page({ - data: { - id: '', - checked: false, // 全选的状态 - productList: [], // 商品列表 - checkValues: [] // 每个商品的选中状态 - }, - - onShow() { - my.getStorage({ - key: 'userInfo', - success: (res) => { - const userInfo = res.data; - this.setData({ - id: userInfo.id, // 获取 id - }); - - if (userInfo && userInfo.cookie) { - my.request({ - url: url + '/api/cart/selectByUserId', - method: 'POST', - data: { - id: this.data.id, - }, - headers: { - 'content-type': 'application/json', - 'Cookie': userInfo.cookie, - }, - dataType: 'json', - success: (res) => { - if (res.data.code === 0) { - const cartItems = res.data.data; - this.fetchProductDetails(cartItems); - } - }, - fail: (error) => { - console.error('请求失败: ', JSON.stringify(error)); - my.alert({ content: '请求失败,请稍后重试' }); - }, - }); - } else { - my.alert({ - content: '您未登录,请先登录。', - success: () => { - my.navigateTo({ - url: '/pages/denglu/denglu', - }); - }, - }); - } - }, - }); - }, - - fetchProductDetails(cartItems) { - const promises = cartItems.map((item) => { - return new Promise((resolve, reject) => { - my.request({ - url: url + '/api/commodities/getById/commodities', - method: 'GET', - data: { id: this.data.id }, - headers: { 'content-type': 'application/json' }, - success: (res) => { - if (res.data.code === 0) { - resolve(res.data.data); - } else { - reject(`商品信息获取失败: ${res.data.message}`); - } - }, - fail: (error) => { - reject(error); - }, - }); - }); - }); - - Promise.all(promises) - .then((productList) => { - this.setData({ - productList, - selectedItems: new Array(productList.length).fill(false), // 初始化所有商品的选中状态 - }); - }) - .catch((error) => { - console.error('商品信息获取失败: ', error); - my.alert({ content: '商品信息获取失败,请稍后重试' }); - }); - }, - onChange(value, e) { - console.log(value, e); -}, - - // 全选控制 - toggleChange() { - var checkboxes = document.getElementsByClassName('checkbox'); - for (var i = 0; i < checkboxes.length; i++) { - checkboxes[i].checked = true; // 设置为选中状态 - } - }, - - // 单独控制每个商品的选中状态 - handleCheckedChange(e) { - console.log(e); // 打印出 e 对象,检查其结构 - const index = e.target.dataset.index; // 获取当前商品的索引 - if (index === undefined) { - console.error('e.target.dataset.index is undefined'); - return; - } - const selectedItems = [...this.data.selectedItems]; // 获取当前的选中状态 - selectedItems[index] = e.detail.value; // 更新该商品的选中状态 - this.setData({ - selectedItems, // 更新选中状态 - }); - }, - - // 计算总价 - calculateTotalPrice() { - const selectedItems = this.data.selectedItems; - const productList = this.data.productList; - let totalPrice = 0; - selectedItems.forEach((selected, index) => { - if (selected) { - totalPrice += parseFloat(productList[index].commoditiesPrice); - } - }); - this.setData({ - totalPrice: totalPrice.toFixed(2), - }); - }, -}); - diff --git a/甲情_甲意/miniprogram/pages/test/test.json b/甲情_甲意/miniprogram/pages/test/test.json index 2d77e31..a8dbd4b 100644 --- a/甲情_甲意/miniprogram/pages/test/test.json +++ b/甲情_甲意/miniprogram/pages/test/test.json @@ -4,6 +4,7 @@ "ant-checkbox": "antd-mini/es/Checkbox/index", "stepper": "antd-mini/es/Stepper/index", "ant-checkbox-group": "antd-mini/es/Checkbox/CheckboxGroup/index", + "ant-swipe-action": "antd-mini/es/SwipeAction/index", "ant-stepper": "antd-mini/es/Stepper/index" }, "styleIsolation": "apply-shared" diff --git a/甲情_甲意/miniprogram/pages/test1/test1.acss b/甲情_甲意/miniprogram/pages/test1/test1.acss new file mode 100644 index 0000000..cf57c75 --- /dev/null +++ b/甲情_甲意/miniprogram/pages/test1/test1.acss @@ -0,0 +1,97 @@ +.box { + width: 100vw; + min-height: 100vh; /* 确保容器至少占满屏幕的高度 */ + background-color: #eec2c7; + overflow-y: auto; /* 允许竖直方向滚动 */ + width: 100vw; /* 或者 750rpx */ + height: auto; + overflow:hidden; /* 防止溢出 */ +} + +.box3 { + display: flex; + flex-direction: column; + background-color: rgba(252, 240, 240, 0.807); + border-radius: 20px; + padding: 10px; + margin-bottom: 80px; /* 留出一些空间给底部结算栏 */ +} + +.box1 { + width: 100%; + height: 170px; + display: flex; + flex-direction: row; +} + +.image { + width: 120px; + height: 120px; + border-radius: 10px; + position: relative; + left: 20px; + top: 20px; +} + +.box4 { + position: relative; + top: 80px; + left: 10px; + width: 25px; + height: 25px; +} + +.box5 { + height: 50px; + position: relative; + left: 40px; + top:30px; +} + +.text { + padding: 5px; +} + +.container { + position: relative; + left: 85px; + top: 25px; +} + +.boxd { + width: 100px; + height: 40px; + position: absolute; + border-radius: 30px; + background-color: rgb(162, 12, 12); + left: 570rpx; + display: flex; + align-items: center; + justify-content: center; +} + +.text1 { + color: #ffffff; + position: unset; +} + +.boxall { + display: flex; + align-items: center; + padding: 10px; + position: fixed; + bottom: 0; + left: 0; + width: 100%; + background-color: #fff; + box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); +} +.text2 { + position: relative; + left: 185rpx; +} +.text3{ + height: 20px; + position: absolute; + left: 650rpx; +} diff --git a/甲情_甲意/miniprogram/pages/test1/test1.axml b/甲情_甲意/miniprogram/pages/test1/test1.axml new file mode 100644 index 0000000..1b9f14b --- /dev/null +++ b/甲情_甲意/miniprogram/pages/test1/test1.axml @@ -0,0 +1,48 @@ + + + + + + + + + + + + {{item.commoditiesName}} + + + ¥{{item.commoditiesPrice}} + + + + + + 移除购物车 + + + + + + + + + 全选 + + 合计:¥{{totalPrice}} + + 结算 + + + diff --git a/甲情_甲意/miniprogram/pages/test1/test1.js b/甲情_甲意/miniprogram/pages/test1/test1.js new file mode 100644 index 0000000..12de1e8 --- /dev/null +++ b/甲情_甲意/miniprogram/pages/test1/test1.js @@ -0,0 +1,217 @@ +import {url} from '../request' +Page({ + data: { + id: '', + productList: [], // 商品列表 + selectedItems: [], // 每个商品的选中状态 + totalPrice: 0, // 总价 + checkAll: false, // 全选标志 + hhh:[] + }, + + onShow() { + my.getStorage({ + key: 'userInfo', + success: (res) => { + const userInfo = res.data; + this.setData({ + id: userInfo.id, // 获取 id + }); + + if (userInfo && userInfo.cookie) { + my.request({ + url: url + '/api/cart/selectByUserId', + method: 'POST', + data: { + id: this.data.id + }, + headers: { + 'content-type': 'application/json', + 'Cookie': userInfo.cookie, + }, + dataType: 'json', + success: (res) => { + console.log(res); + if (res.data.code === 0) { + const cartItems = res.data.data; + this.fetchProductDetails(cartItems); + } + }, + fail: (error) => { + console.error('请求失败: ', JSON.stringify(error)); + my.alert({ content: '请求失败,请稍后重试' }); + }, + }); + } else { + my.alert({ + content: '您未登录,请先登录。', + success: () => { + my.navigateTo({ + url: '/pages/denglu/denglu', + }); + }, + }); + } + }, + }); + }, + + // 获取商品详细信息 + fetchProductDetails(cartItems, userId) { + console.log(cartItems, 'zheshiid'); + const promises = cartItems.map((item) => { + return new Promise((resolve, reject) => { + my.request({ + url: url + '/api/commodities/getById/commodities', + method: 'GET', + data: { id: item.commoditiesId }, + headers: { 'content-type': 'application/json' }, + success: (res) => { + if (res.data.code === 0) { + const productData = res.data.data; + productData.userId = userId; // 添加 userId + productData.cartId = item.id; // 将 cartId 添加到商品数据中 + resolve(productData); + } else { + reject(`商品信息获取失败: ${res.data.message}`); + } + }, + fail: (error) => { + reject(error); + }, + }); + }); + }); + + Promise.all(promises) + .then((productList) => { + this.setData({ + productList, + selectedItems: new Array(productList.length).fill(false), // 初始化所有商品的选中状态为 false + }); + console.log(productList, '这是商品'); + }) + .catch((error) => { + console.error('商品信息获取失败: ', error); + my.alert({ content: '商品信息获取失败,请稍后重试' }); + }); + }, + + + // 计算 checkAll 是否选中 + checkAll() { + return this.data.selectedItems.every(item => item); // 如果所有项都选中,返回 true + }, + + // 处理单个复选框的选中状态变化 + onChange(event) { + const selectedItems = event.detail.value; // 获取选中的商品ID列表 + const updatedSelectedItems = this.data.productList.map((item, index) => { + return selectedItems.includes(item.id); // 更新每个商品的选中状态 + }); + this.setData({ + selectedItems: updatedSelectedItems + }); + }, + + // 处理全选框的选中状态变化 + onCheckAllChange(event) { + const allSelected = event.detail.value; // 获取全选框的状态 + const updatedSelectedItems = this.data.productList.map(() => allSelected); // 全选或全不选 + this.setData({ + selectedItems: updatedSelectedItems + }); + }, + + // 计算合计 + calculateTotalPrice() { + const total = this.data.productList.reduce((sum, item, index) => { + if (this.data.selectedItems[index]) { + sum += item.commoditiesPrice; // 累加选中商品的价格 + } + return sum; + }, 0); + this.setData({ + totalPrice: total.toFixed(2) // 保留两位小数 + }); + }, + + // 处理移除商品 + yichu(e) { + const cartId = e.currentTarget.dataset.id; // 获取商品的 cartId + if (!cartId) { + console.error('没有找到商品cartId'); + my.alert({ content: '商品ID未找到,请稍后重试' }); + return; + } + + console.log('需要移除的商品cartId:', cartId); + + my.getStorage({ + key: 'userInfo', + success: (res) => { + const userInfo = res.data; + this.setData({ + id: userInfo.id, // 获取 id + }); + // 发送请求移除商品 + if (userInfo && userInfo.cookie) { + my.request({ + url: url + '/api/cart/delete', + method: 'POST', + data: { id: cartId }, // 使用 cartId 作为参数 + headers: { 'content-type': 'application/json', 'Cookie': userInfo.cookie }, + dataType: 'json', + success: (res) => { + console.log(res); + if (res.data.code === 0) { + my.alert({ content: '成功移除商品' }); + console.log(res); + // 更新购物车 + this.updateCartList(); + } else { + my.alert({ content: '移除商品失败,请稍后重试' }); + console.log(res); + } + }, + fail: (error) => { + console.error('请求失败: ', JSON.stringify(error)); + my.alert({ content: '请求失败,请稍后重试' }); + }, + }); + } + }, + }); + }, + // 移除后更新 + updateCartList() { + my.getStorage({ + key: 'userInfo', + success: (res) => { + const userInfo = res.data; + + if (userInfo && userInfo.cookie) { + my.request({ + url: url + '/api/cart/selectByUserId', // 获取最新的购物车数据 + method: 'POST', + data: { id: this.data.id }, // 使用当前用户ID + headers: { 'content-type': 'application/json', 'Cookie': userInfo.cookie }, + dataType: 'json', + success: (res) => { + if (res.data.code === 0) { + const cartItems = res.data.data; + this.fetchProductDetails(cartItems, userInfo.id); + } else { + my.alert({ content: '获取购物车数据失败,请稍后重试' }); + } + }, + fail: (error) => { + console.error('请求失败: ', JSON.stringify(error)); + my.alert({ content: '请求失败,请稍后重试' }); + }, + }); + } + }, + }); + }, +}); \ No newline at end of file diff --git a/甲情_甲意/miniprogram/pages/test1/test1.json b/甲情_甲意/miniprogram/pages/test1/test1.json new file mode 100644 index 0000000..4ad1c8e --- /dev/null +++ b/甲情_甲意/miniprogram/pages/test1/test1.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "ant-checkbox": "antd-mini/es/Checkbox/index", + "stepper": "antd-mini/es/Stepper/index", + "ant-checkbox-group": "antd-mini/es/Checkbox/CheckboxGroup/index", + "ant-swipe-action": "antd-mini/es/SwipeAction/index", + "ant-stepper": "antd-mini/es/Stepper/index" + }, + "styleIsolation": "apply-shared" +} diff --git a/甲情_甲意/miniprogram/pages/wodedingdan/wodedingdan.acss b/甲情_甲意/miniprogram/pages/wodedingdan/wodedingdan.acss index 29b9816..90fa674 100644 --- a/甲情_甲意/miniprogram/pages/wodedingdan/wodedingdan.acss +++ b/甲情_甲意/miniprogram/pages/wodedingdan/wodedingdan.acss @@ -1,72 +1,53 @@ -.list { - display: flex; - flex-direction: column; -} -page{ - background-color: #f7f7f7; -} -.left{ - padding: 8px; - width:80px; - height: 80px; - border-radius: 10px; -} -.containercontent{ - margin: 15px 15px 0 15px; +.image{ + width: 60rpx; + height:60rpx; + border-radius: 50rpx; + margin-left: 10rpx; + margin-top: 10rpx; +} +.image1{ + width: 50rpx; + height:50rpx; +} +.box1{ + width: 90%; border: 1px solid #eec2c7; - border-radius: 10px; -} -.container{ - display: flex; - color: #333333; - border-radius: 10px; -} -.content { - margin-left: 10px; - line-height: 1.6; - width: 70%; -} -.title1{ - font-size: 18px; -} -.title2{ - font-size: 14px; - color: gray; -} -.title2right{ - float: right; - color: rgb(24, 23, 23); - font-size: 16px; - position: relative; - bottom: 50px; -} -.tar{ - width: 100%; - padding-bottom: 15px; -} -.tab1 { - width: 50px; - height: 20px; - border: 1px solid #eec2c7; - border-radius: 30px; - text-align: center; /* 水平居中 */ - line-height: 20px; /* 垂直居中 */ -} - -.tab2 { - margin-left: 10px; /* 给tab2添加一些间距 */ - width: 50px; - height: 20px; - border: 1px solid #eec2c7; - border-radius: 30px; - text-align: center; /* 水平居中 */ - line-height: 20px; /* 垂直居中 */ - background-color: #eec2c7; + border-radius: 20rpx; + height: 300rpx; + margin-bottom: 10rpx; } .box{ + width: 100%; display: flex; + flex-direction: column; + align-items: center; +} +.text{ position: relative; - left: 120px; - top: 20px; +} +.biaoti{ + display: flex; + justify-content: space-between; + align-items: center; +} +.biaoti1{ + display: flex; + align-items: center; +} +.image2{ + width: 160rpx; + height: 160rpx; + border-radius: 20rpx; + margin-top: 20rpx; + margin-left: 20rpx; +} +.textcss{ + width: 100rpx; + height: 40rpx; + display:flex; + justify-content: center; + border: 1px solid #eec2c7; + border-radius: 50px; + margin-left: 10rpx } \ No newline at end of file diff --git a/甲情_甲意/miniprogram/pages/wodedingdan/wodedingdan.axml b/甲情_甲意/miniprogram/pages/wodedingdan/wodedingdan.axml index 5436e7e..8b48c99 100644 --- a/甲情_甲意/miniprogram/pages/wodedingdan/wodedingdan.axml +++ b/甲情_甲意/miniprogram/pages/wodedingdan/wodedingdan.axml @@ -18,247 +18,203 @@ a:key="{{ index }}"> - - - - - - - - {{item.commoditiesVO.commoditiesName}} - - - {{item.sddcreateTime}} - - - - 下单时间:{{item.createTime}} - - - - - ¥{{item.commoditiesVO.commoditiesPrice}} - - 共1件 - - - - - + + + + + + + + + {{item.businessVO.businessName}} + + + 待支付 + 待使用 + 已完成 + 已取消 + - - {{item.state}} + + + + {{item.commoditiesVO.commoditiesName}} + 到店服务 + ¥{{item.commoditiesVO.commoditiesPrice}} - + + 地址:{{item.businessVO.address}} + +
- + - - - - - - - - {{item.commoditiesVO.commoditiesName}} - - - {{item.sddcreateTime}} - - - - 下单时间:{{item.createTime}} - - - - - ¥{{item.commoditiesVO.commoditiesPrice}} - - 共1件 - - - - - 取消 - - - 支付 - - - + + + + + + + + + {{item.businessVO.businessName}} + + + + 待支付 + + + + + + {{item.commoditiesVO.commoditiesName}} + 到店服务 + ¥{{item.commoditiesVO.commoditiesPrice}} + + + 取消 + + + 支付 - - {{item.state}} + + 剩余:20:34 - +
- - - - - - - - {{item.commoditiesVO.commoditiesName}} - - - {{item.sddcreateTime}} - - - - 下单时间:{{item.createTime}} - - - - - ¥{{item.commoditiesVO.commoditiesPrice}} - - 共1件 - - - - - 退款 - - - 完成 - - - + + + + + + + + + {{item.businessVO.businessName}} + + + + 待使用 + + + + + + {{item.commoditiesVO.commoditiesName}} + 到店服务 + ¥{{item.commoditiesVO.commoditiesPrice}} + + + 退款 + + + 完成 - - {{item.state}} + + 地址:{{item.businessVO.address}} - +
- - - - - - - - {{item.commoditiesVO.commoditiesName}} - - - {{item.sddcreateTime}} - - - - 下单时间:{{item.createTime}} - - - - - ¥{{item.commoditiesVO.commoditiesPrice}} - - 共1件 - - - - - + + + + + + + + + {{item.businessVO.businessName}} + + + + 已完成 - - {{item.state}} + + + + {{item.commoditiesVO.commoditiesName}} + 到店服务 + ¥{{item.commoditiesVO.commoditiesPrice}} - + + 地址:{{item.businessVO.address}} + +
- - - - - - - - {{item.commoditiesVO.commoditiesName}} - - - {{item.sddcreateTime}} - - - - 下单时间:{{item.createTime}} - - - - - ¥{{item.commoditiesVO.commoditiesPrice}} - - 共1件 - - - - - + + + + + + + + + {{item.businessVO.businessName}} + + + + 已取消 - - {{item.state}} + + + + {{item.commoditiesVO.commoditiesName}} + 到店服务 + ¥{{item.commoditiesVO.commoditiesPrice}} - + + 地址:{{item.businessVO.address}} + +
- - - - - - - - {{item.commoditiesVO.commoditiesName}} - - - {{item.sddcreateTime}} - - - - 下单时间:{{item.createTime}} - - - - - ¥{{item.commoditiesVO.commoditiesPrice}} - - 共1件 - - - - - + + + + + + + + + {{item.businessVO.businessName}} + + + + 退款 - - {{item.state}} + + + + {{item.commoditiesVO.commoditiesName}} + 到店服务 + ¥{{item.commoditiesVO.commoditiesPrice}} - + + 地址:{{item.businessVO.address}} + +
- diff --git a/甲情_甲意/miniprogram/pages/wodedingdan/wodedingdan.js b/甲情_甲意/miniprogram/pages/wodedingdan/wodedingdan.js index 245fd12..c2002e0 100644 --- a/甲情_甲意/miniprogram/pages/wodedingdan/wodedingdan.js +++ b/甲情_甲意/miniprogram/pages/wodedingdan/wodedingdan.js @@ -24,18 +24,14 @@ Page({ }, ], dingdan:[], - // dingdan:[ - // { - // number:'晓得美甲店', - // name:'半贴短甲彩绘', - // interpretation:'到店服务', - // dingdannumber:'2024-12-01', - // image:'https://th.bing.com/th/id/R.325f6147c21a518cbb7bb0b5f9f73c51?rik=I4jbDvbv9vOsfQ&riu=http%3a%2f%2fwww.guangyuanol.cn%2fuploads%2fallimg%2f200806%2f1505123236-7.jpg&ehk=vpA2a11wMlcWSGrdKXF93H0nahTK2ptXlnbudoulA9Y%3d&risl=&pid=ImgRaw&r=0', - // adress:' 思明区湖苑里24号', - // price:'100', - // state:'待确认', - // }, - // ] + paymentStatuses: [ + { paymentStatuses: '0', statue: '待支付' }, + { paymentStatuses: '1', statue: '待使用' }, + { paymentStatuses: '2', statue: '已取消' }, + { paymentStatuses: '3', statue: '已退款' }, + { paymentStatuses: '4', statue: '已完成' } + ] + }, onShow(){ my.getStorage({ @@ -56,7 +52,7 @@ Page({ endTime: "", id: "", pageSize: 10, - paymentStatus: 0, + paymentStatus: "", sortField: "", sortOrder: "", startTime: "" @@ -73,6 +69,8 @@ Page({ }) } + console.log('Response Set-Cookie:', res.header['Set-Cookie']); + console.log(res); console.log(this.data.dingdan); console.log(this.data.dingdan); @@ -118,6 +116,9 @@ alert(content) { title: content, }); }, - +getPaymentStatusText(status) { + const statusObj = this.paymentStatuses.find(item => item.paymentStatuses === status.toString()); + return statusObj ? statusObj.statue : '未知状态'; // 如果找不到对应状态,返回 '未知状态' +}, }); diff --git a/甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.acss b/甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.acss index 36d8a63..537a248 100644 --- a/甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.acss +++ b/甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.acss @@ -16,15 +16,16 @@ page{ } .containercontent{ - margin: 15px 15px 0 15px; + margin: 0px 15px 10px 15px; border: 1px solid #eec2c7; border-radius: 10px; + overflow:hidden; } .container{ color: #333333; border-radius: 10px; - height: 120px; + height: 150px; } .content { margin-left: 10px; @@ -87,10 +88,16 @@ page{ } .swiper-item { - display: flex; /* 启用 Flexbox 布局 */ - flex-direction: column; /* 设置为竖直方向排列子元素 */ - height: 100%; /* 确保swiper-item的高度占满父容器 */ + display: flex; + flex-direction: column; + height: auto; /* 自动适应内容高度 */ + min-height: 100%; /* 或设置最小高度占满父容器 */ } + +.swiper { + height: auto; /* 根据内容自动调整 */ +} + .tab1 { width: 50px; height: 20px; @@ -99,9 +106,10 @@ page{ text-align: center; /* 水平居中 */ line-height: 20px; /* 垂直居中 */ } -.box{ - display: flex; +.box1{ position: relative; - left: 170px; - top: 30px; + display: flex; + justify-content: flex-end; + bottom: 70rpx; + margin-right: 10rpx; } diff --git a/甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.axml b/甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.axml index 0478123..647333f 100644 --- a/甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.axml +++ b/甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.axml @@ -19,7 +19,7 @@ - + CC @@ -40,28 +40,27 @@ - + 晓得美甲店 - + 下单时间:2024-12-02 分享一下你真实体验吧 - - - 评价 - - + + + 评价 + + - diff --git a/甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.js b/甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.js index 6072397..99b158c 100644 --- a/甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.js +++ b/甲情_甲意/miniprogram/pages/wodepingjia/wodepingjia.js @@ -17,18 +17,7 @@ Page({ image:'https://c-ssl.dtstatic.com/uploads/blog/202305/08/20230508112951_78480.thumb.400_0.jpeg' } ], - // dingdan:[ - // { - // number:'晓得美甲店', - // name:'半贴短甲彩绘', - // interpretation:'到店服务', - // dingdannumber:'2024-12-01', - // image:'https://th.bing.com/th/id/R.325f6147c21a518cbb7bb0b5f9f73c51?rik=I4jbDvbv9vOsfQ&riu=http%3a%2f%2fwww.guangyuanol.cn%2fuploads%2fallimg%2f200806%2f1505123236-7.jpg&ehk=vpA2a11wMlcWSGrdKXF93H0nahTK2ptXlnbudoulA9Y%3d&risl=&pid=ImgRaw&r=0', - // adress:' 思明区湖苑里24号', - // price:'100', - // state:'待确认', - // }, - // ] + }, // onShow(){ // my.getStorage({ @@ -112,6 +101,10 @@ alert(content) { title: content, }); }, - +pingjia(){ + my.navigateTo({ + url:'/pages/pingjia/pingjia' + }) +} }); diff --git a/甲情_甲意/miniprogram/pages/wodeshoucang/wodeshoucang.acss b/甲情_甲意/miniprogram/pages/wodeshoucang/wodeshoucang.acss index b7b5158..a28e925 100644 --- a/甲情_甲意/miniprogram/pages/wodeshoucang/wodeshoucang.acss +++ b/甲情_甲意/miniprogram/pages/wodeshoucang/wodeshoucang.acss @@ -1,268 +1,112 @@ -/* 我的收藏盒子 */ -.wdsc{ - width: 390px; - height: 50px; - position: absolute; - background-color: #eec2c7; +/* 给css变量的默认底色,用来兜底使用 */ +.t-swipe { + width: 100%; + margin: 0 auto; + background-color: var(--color-background); + margin-top: 40rpx; } -.wdsc image{ - width: 30px; - height: 30px; - position: absolute; - left: 10px; - top: 10px; +.t-swipe-item { + font-size: 32rpx; + color: #333333; + height: 100%vw; } -/* 《我的收藏》 */ -.wwdsc{ - font-size: 25px; - font-weight: bold; - left: 150px; - top: 10px; +.t-swipe-item-con { + height: 300rpx; + line-height: 300rpx; + width: 100%; +} +.t-swipe-item-con-view { + background-color: var(--color-card); + text-indent: 1em; + position: relative; + height: 100%; + color: var(--color-text-primary); +} +.t-swipe-item-con-view::after { + content: ''; position: absolute; - color: #ffffff; + bottom: 0; + left: 0; + width: 100%; + height: 1px; + max-height: 1px; + min-height: 1px; + transform: scaleY(0.5); + background-color: var(--color-border); +} +.t-swipe-item-con-btn { + display: flex; + justify-content: center; + align-items: center; +} +.t-swipe-item-con-btn-icon { + font-size: 32px; +} +.left-slot { + display: flex; + align-items: center; + justify-content: center; + width: 100%; +} +.box{ + width: 100%; + display: flex; /* 启用 Flexbox 布局 */ + flex-direction: column; /* 设置主轴为竖直方向 */ + align-items: center; /* 在交叉轴(水平方向)上居中对齐 */ + +} + .kuang{ + width: 75%; + height: 240rpx; + border: 1px solid #de868f; + margin-top: 30rpx; + margin-left: 25rpx; + border-radius: 20px; } -/* 收藏店铺盒子 */ +.image{ + width: 100px; + height: 100px; + border-radius: 20px; + position: relative; + top: 25rpx; +} + +.wenzi{ + width: 65%; + height: 180rpx; + position: relative; + left: 220rpx; + bottom: 450rpx; +} + +.text{ + font-weight: bolder; + margin-left: 10rpx; + position: relative; + top: 30rpx; + right: 10rpx; +} .box1{ - width: 100%; - height: 350px; - position: absolute; - top: 55px; - border: 1px #d4d4d4 solid; + font-size: 13px; + width: 100rpx; + background-color: cornflowerblue; + margin-top: 20rpx; + margin-left: 10rpx; + color: white; + position: relative; + top: 88rpx; + right: 210rpx; } - -/* 收藏美甲师盒子 */ -.box2{ - width: 100%; - height: 550px; - position: absolute; - top: 405px; - border: 1px #d4d4d4 solid; -} - -/* 《收藏店铺》 《收藏美甲师》 */ -.p1{ - font-size: 20px; - position: absolute; - left: 20px; - top: 10px; -} - - -/* a店铺 */ -.adianpu{ - width: 344px; - height: 120px; - position: absolute; - left: 22px; - top: 50px; - margin: auto; - border: 3px #de868f solid; - border-radius: 20px; -} -.adianpu image{ - width: 90px; - height: 90px; - position: absolute; - left: 10px; - top: 10px; - border-radius: 10px; -} - -/* a店铺名称 */ -.aname{ - font-size: 15px; - font-weight: bold; - left: 110px; - top: 15px; - position: absolute; - color: black; -} - -/* b店铺 */ -.bdianpu{ - width: 344px; - height: 120px; - position: absolute; - left: 22px; - top: 200px; - margin: auto; - border: 3px #de868f solid; - border-radius: 20px; -} -.bdianpu image{ - width: 90px; - height: 90px; - position: absolute; - left: 10px; - top: 10px; - border-radius: 10px; -} - - -/* b店铺名称 */ -.aname{ - font-size: 15px; - font-weight: bold; - left: 110px; - top: 15px; - position: absolute; - color: black; -} - -/* 可预定小框 */ -.ksm{ - width: 70px; - height: 26px; - position: absolute; - left: 255px; - top: 40px; - border: 1px #4095e5 solid; - border-radius: 10px; -} - -/* 可预定 休息中 小字 */ -.wksm{ - font-size: 12px; - left: 18px; - top: 6px; - position: absolute; - color: #4095e5; -} - -/* 接受预约 */ -.yy1{ - width: 50px; - height: 25px; - position: absolute; - left: 110px; - top: 45px; - background-color: #4095e5; -} -.yy2{ - width: 60px; - height: 25px; - position: absolute; - left: 165px; - top: 45px; - background-color: #ffffff; +.dingwei{ + position: relative; + } .yy3{ width: 10px; - height: 25px; - position: absolute; - left: 230px; - top: 45px; + height: 20px; + position: relative; + left: 210rpx; + bottom: 70rpx; background-color: #4095e5; } - -/* 《预约》 */ -.wyy1{ - font-size: 12px; - color: #ffffff; -} -.wyy2{ - font-size: 12px; - color: #4095e5; -} - -/* 店铺地点 */ -.wdpdd{ - font-size: 12px; - left: 110px; - top: 85px; - position: absolute; - color: #9b9b9b; -} - -/* 收藏美甲师两个盒子 */ -.box3{ - width: 100%; - height: 90px; - position: absolute; -} -.box3 image{ - width: 70px; - height: 70px; - position: absolute; - left: 10px; - top: 10px; - border-radius: 50px; -} -.box4{ - width: 100%; - height: 120px; - position: absolute; - top: 90px; -} -.box41{ - width: 80px; - height: 80px; - position: absolute; - left: 10px; - top: 30px; -} -.box41 image{ - width: 80px; - height: 80px; - position: absolute; -} -.box42{ - width: 80px; - height: 80px; - position: absolute; - left: 110px; - top: 30px; -} -.box42 image{ - width: 80px; - height: 80px; - position: absolute; -} -.box43{ - width: 80px; - height: 80px; - position: absolute; - left: 210px; - top: 30px; -} -.box43 image{ - width: 80px; - height: 80px; - position: absolute; -} - -/* 美甲师个人信息 作品展示 */ -.p2{ - font-size: 14px; - position: absolute; - left: 90px; - top: 15px; -} -.p3{ - font-size: 14px; - position: absolute; - left: 90px; - top: 35px; -} -.p4{ - font-size: 14px; - position: absolute; - left: 90px; - top: 55px; -} -.p5{ - font-size: 15px; - position: absolute; - font-weight: bold; - left: 20px; - top: 5px; -} - -.box5{ - width: 100%; - height: 210px; - position: relative; - top: 40px; - border: 1px #e8e8e8 solid; -} \ No newline at end of file diff --git a/甲情_甲意/miniprogram/pages/wodeshoucang/wodeshoucang.axml b/甲情_甲意/miniprogram/pages/wodeshoucang/wodeshoucang.axml index 7a438f4..f154368 100644 --- a/甲情_甲意/miniprogram/pages/wodeshoucang/wodeshoucang.axml +++ b/甲情_甲意/miniprogram/pages/wodeshoucang/wodeshoucang.axml @@ -1,94 +1,34 @@ - - - - - 我的收藏 - - - - - 收藏店铺 - - - - - - 小德美甲店铺 - - 接受预约 + + + + + + + + + + + + {{item.data.businessName}} + {{item.data.businessImages}} + + {{item.data.startBusiness}}营业 + + + {{item.data.address}} + + + + + + + + - - 08:00营业 - - - - 哈尔滨市呼兰区学院路街道288号 - - 可预定 - - - - - - 花花美甲店铺 - - 接受预约 - - - 09:30营业 - - - - 哈尔滨市呼兰区学院路街道288号 - - 休息中 - - - - - - - 收藏美甲师 - - - - 姓名: UU - 评分: 5.0 - 粉丝量: 831 - - - - - - - - - - - - 作品展示 - - - - - - - 姓名: 清清 - 评分: 5.0 - 粉丝量: 9999.99w - - - - - - - - - 作品展示 - - - - - diff --git a/甲情_甲意/miniprogram/pages/wodeshoucang/wodeshoucang.js b/甲情_甲意/miniprogram/pages/wodeshoucang/wodeshoucang.js index cb73536..265f1fe 100644 --- a/甲情_甲意/miniprogram/pages/wodeshoucang/wodeshoucang.js +++ b/甲情_甲意/miniprogram/pages/wodeshoucang/wodeshoucang.js @@ -1,4 +1,186 @@ +import { url } from '../request'; + Page({ - data: {}, - onLoad() {}, + data: { + rightBtns: [ + { + text: '取消收藏', + bgColor: '#CCCCCC', + color: '#fff', + width: 200, + }, + ], + soucang: [], // 收藏的列表 + collectedData: [], // 存储每个 id 请求的数据 + swipeIndex: -1, + shuzhi: '', // 当前点击的收藏 id + }, + + onButtonTap(event) { + const storeId = event.currentTarget.dataset.id; + console.log('点击了店铺ID:', storeId); + this.setData({ + shuzhi: storeId + }); + }, + + onShow() { + my.getStorage({ + key: 'userInfo', + success: (res) => { + const userInfo = res.data; + if (userInfo && userInfo.cookie) { + my.request({ + url: url + '/api/collect/list', + method: 'POST', + data: {}, + headers: { + 'content-type': 'application/json', + 'Cookie': userInfo.cookie, + }, + dataType: 'json', + success: (res) => { + console.log(res); + const soucang = res.data.data || []; + this.setData({ soucang }); + + // 从返回的 data 数组中提取 id 并存储到 collectedData 中 + const collectedIds = soucang.map(item => item.id); // 提取 id + this.setData({ + collectedData: collectedIds // 存储 id + }); + + // 你可以在这里继续调用其他函数,进行数据处理或页面渲染 + this.fetchCollectedData(soucang); + }, + fail: (error) => { + console.error('请求失败: ', JSON.stringify(error)); + my.alert({ content: '请求失败,请稍后重试' }); + }, + }); + } else { + my.alert({ + content: '您未登录,请先登录。', + success: () => { + my.navigateTo({ + url: '/pages/denglu/denglu', + }); + }, + }); + } + }, + }); + }, + + // 获取每个 id 的数据 + fetchCollectedData(soucang) { + const requests = soucang.map(item => { + return new Promise((resolve, reject) => { + console.log("发送 id:", item.businessId); + my.request({ + url: url + '/api/business/userGetById', // 正确的接口 + method: 'GET', + data: { + id: item.businessId, // 传递 id 作为参数 + }, + headers: { + 'content-type': 'application/json', + }, + success: (res) => { + console.log(res, 'id:', item.businessId); + if (res.data) { + // 将 businessId 和返回的数据一起存储 + resolve({ + businessId: item.id, // 添加 businessId + data: res.data.data, // 返回请求结果的数据 + }); + } else { + reject('请求数据为空'); + } + }, + fail: (error) => { + reject('请求失败: ' + error); + }, + }); + }); + }); + + // 等待所有请求完成 + Promise.all(requests) + .then(results => { + console.log('所有请求完成', results); + // 更新 collectedData,保存 businessId 和对应的数据 + this.setData({ + collectedData: results, // 存储 {businessId, data} 结构的数据 + }); + }) + .catch(error => { + console.error('请求失败:', error); + my.alert({ content: '部分数据请求失败,请稍后重试' }); + }); + }, + + quxiao() { + const number = this.data.shuzhi; + console.log('取消收藏 id:', number); + my.request({ + url: url + '/api/collect/delete', // 正确的接口 + method: 'POST', + data: { + id: number // 传递 id 作为参数 + }, + headers: { + 'content-type': 'application/json', + }, + success: (res) => { + if (number) { + my.alert({ content: '取消收藏成功。' }); + this.updateCartList(); + } else { + my.alert({ content: '请先点击一下要取消收藏的店铺' }); + } + }, + fail: (error) => { + my.alert({ content: '请求失败,请稍后重试' }); + }, + }); + }, + updateCartList() { + my.getStorage({ + key: 'userInfo', + success: (res) => { + const userInfo = res.data; + if (userInfo && userInfo.cookie) { + my.request({ + url: url + '/api/collect/list', + method: 'POST', + data: {}, + headers: { + 'content-type': 'application/json', + 'Cookie': userInfo.cookie, + }, + dataType: 'json', + success: (res) => { + console.log(res); + const soucang = res.data.data || []; + this.setData({ soucang }); + + // 从返回的 data 数组中提取 id 并存储到 collectedData 中 + const collectedIds = soucang.map(item => item.id); // 提取 id + this.setData({ + collectedData: collectedIds // 存储 id + }); + + // 你可以在这里继续调用其他函数,进行数据处理或页面渲染 + this.fetchCollectedData(soucang); + }, + fail: (error) => { + console.error('请求失败: ', JSON.stringify(error)); + my.alert({ content: '请求失败,请稍后重试' }); + }, + }); + } + }, + }); + }, }); diff --git a/甲情_甲意/miniprogram/pages/wodeshoucang/wodeshoucang.json b/甲情_甲意/miniprogram/pages/wodeshoucang/wodeshoucang.json index 89bb81c..b7eb2b8 100644 --- a/甲情_甲意/miniprogram/pages/wodeshoucang/wodeshoucang.json +++ b/甲情_甲意/miniprogram/pages/wodeshoucang/wodeshoucang.json @@ -1,4 +1,8 @@ { - "usingComponents": {}, + "defaultTitle": "我的收藏", + "usingComponents": { + "ant-swipe-action": "antd-mini/es/SwipeAction/index", + "ant-icon": "antd-mini/es/Icon/index" + }, "styleIsolation": "apply-shared" } diff --git a/甲情_甲意/miniprogram/pages/wodeyuyue/wodeyuyue.acss b/甲情_甲意/miniprogram/pages/wodeyuyue/wodeyuyue.acss index dd01e88..026203e 100644 --- a/甲情_甲意/miniprogram/pages/wodeyuyue/wodeyuyue.acss +++ b/甲情_甲意/miniprogram/pages/wodeyuyue/wodeyuyue.acss @@ -1,118 +1,43 @@ -/* 大盒子 */ .box{ width: 100%; - height: 100%; + border-top: 1px solid #999192; + margin-top: 20rpx; + display: flex; + flex-direction: column; } - -/* 我的预约盒子 */ -.wdyy{ - width: 390px; - height: 50px; - position: absolute; - background-color: #eec2c7; +.image{ + width: 120rpx; + height: 120rpx; + margin-top: 20rpx; } -.wdyy image{ - width: 30px; - height: 30px; - position: absolute; - left: 10px; - top: 10px; -} - -/* 《我的预约》 */ -.wwdyy{ - font-size: 25px; - font-weight: bold; - left: 150px; - top: 10px; - position: absolute; - color: black; -} - -/* 三个预约盒子 */ -.box1{ +.biaoti{ width: 100%; - height: 210px; - top: 50px; + height: 200rpx; +} +.text{ position: relative; - border: 1px #d9d9d9 solid; } - -/* 从上到下三个盒子 */ -.box2{ - width: 100%; - height: 80px; +.neirong{ + margin-left: 20rpx; + width: 200px; } -.box2 image{ - width: 80px; - height: 80px; - position: absolute; - top: 10px; - left: 10px; +.shijian{ + display: flex; + justify-content: space-between; + margin-top:20rpx; + margin-left:20rpx; + width:100% } -.box3{ - width: 100%; - height: 80px; +.image1{ + width: 50rpx; + height: 50rpx; + margin-top: 20rpx; position: relative; - top: 80px; + left: 330rpx; } -.box3 image{ - width: 20px; - height: 20px; - position: absolute; - top: 18px; - left: 320px; -} -.box4{ - width: 100%; - height: 50px; - position: relative; - top: 80px; -} - -/* 预约提示 */ -.p1{ - font-size: 15px; - font-weight: bold; - position: absolute; - left: 100px; - top: 20px; -} -.p2{ - font-size: 12px; - position: absolute; - left: 100px; - top: 50px; -} - -/* 预约内容 */ -.p3{ - font-size: 15px; - font-weight: bold; - position: absolute; - left: 20px; - top: 20px; -} -.p4{ - font-size: 15px; - font-weight: bold; - position: absolute; - left: 20px; - top: 50px; -} - -/* 下单日期和情况 */ -.p5{ - font-size: 15px; - font-weight: bold; - position: absolute; - left: 20px; - top: 10px; -} -.p6{ - font-size: 15px; - font-weight: bold; - position: absolute; - right: 40px; - top: 10px; +.yemian{ + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; } \ No newline at end of file diff --git a/甲情_甲意/miniprogram/pages/wodeyuyue/wodeyuyue.axml b/甲情_甲意/miniprogram/pages/wodeyuyue/wodeyuyue.axml index c067360..6410d1a 100644 --- a/甲情_甲意/miniprogram/pages/wodeyuyue/wodeyuyue.axml +++ b/甲情_甲意/miniprogram/pages/wodeyuyue/wodeyuyue.axml @@ -1,61 +1,24 @@ - - - - - - - 我的预约 - - - - - - 甲甲温馨提示: - 您预约的小德美甲店铺-纯色半贴甲片款式订单… - - 预约时间: 13:30-14:00 - - 指定美甲师: UU - - 2024/06/18 - 正在进行中… + + + + + {{item.name}} + + {{item.neirong}} + + + + + 我的预约:{{item.shijian}} + + + 指定美甲师:{{item.meijiashi}} + - - - - - - - 甲甲温馨提示: - 您预约的爱尚美甲店铺-贴钻半贴甲片款式订单… - - 预约时间: 09:30-10:00 - - 指定美甲师: 梨儿 - - 2024/05/15 - 已完成… - + + {{item.data}} + {{item.status}} - - - - - - 甲甲温馨提示: - 您预约的爱尚美甲店铺-纯色半贴甲片款式订单… - - 预约时间: 11:30-12:00 - - 指定美甲师: 梨儿 - - 2024/04/03 - 已完成… - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/甲情_甲意/miniprogram/pages/wodeyuyue/wodeyuyue.js b/甲情_甲意/miniprogram/pages/wodeyuyue/wodeyuyue.js index cb73536..589c8ec 100644 --- a/甲情_甲意/miniprogram/pages/wodeyuyue/wodeyuyue.js +++ b/甲情_甲意/miniprogram/pages/wodeyuyue/wodeyuyue.js @@ -1,4 +1,47 @@ Page({ - data: {}, + data: { + yuyue:[ + { + name:'佳佳温馨提示:', + neirong:'您预约的小德美甲店铺-纯色半贴甲片款式订单…', + time:'13:00-14:00', + meijiashi:'梨儿', + data:'2024/06/18', + status:'正在进行中...' + }, + { + name:'佳佳温馨提示:', + neirong:'您预约的小德美甲店铺-纯色半贴甲片款式订单…', + time:'13:00-14:00', + meijiashi:'梨儿', + data:'2024/06/18', + status:'正在进行中...' + }, + { + name:'佳佳温馨提示:', + neirong:'您预约的小德美甲店铺-纯色半贴甲片款式订单…', + time:'13:00-14:00', + meijiashi:'梨儿', + data:'2024/06/18', + status:'正在进行中...' + }, + { + name:'佳佳温馨提示:', + neirong:'您预约的小德美甲店铺-纯色半贴甲片款式订单…', + time:'13:00-14:00', + meijiashi:'梨儿', + data:'2024/06/18', + status:'正在进行中...' + }, + { + name:'佳佳温馨提示:', + neirong:'您预约的小德美甲店铺-纯色半贴甲片款式订单…', + time:'13:00-14:00', + meijiashi:'梨儿', + data:'2024/06/18', + status:'正在进行中...' + } + ] + }, onLoad() {}, }); diff --git a/甲情_甲意/miniprogram/pages/wodeyuyue/wodeyuyue.json b/甲情_甲意/miniprogram/pages/wodeyuyue/wodeyuyue.json index 89bb81c..9607b66 100644 --- a/甲情_甲意/miniprogram/pages/wodeyuyue/wodeyuyue.json +++ b/甲情_甲意/miniprogram/pages/wodeyuyue/wodeyuyue.json @@ -1,4 +1,5 @@ { + "defaultTitle": "我的预约", "usingComponents": {}, "styleIsolation": "apply-shared" } diff --git a/甲情_甲意/miniprogram/pages/zhifujiemian/zhifujiemian.acss b/甲情_甲意/miniprogram/pages/zhifujiemian/zhifujiemian.acss index d8f415c..842d943 100644 --- a/甲情_甲意/miniprogram/pages/zhifujiemian/zhifujiemian.acss +++ b/甲情_甲意/miniprogram/pages/zhifujiemian/zhifujiemian.acss @@ -1,10 +1,10 @@ /* 顶部 */ .Box{ - width: 390px; + width: 100%; height: 800px; } .Box1{ - width: 390px; + width: 100%; height: 50px; background-color: #eec2c7; } @@ -16,7 +16,7 @@ } /* 商品信息 */ .Box2{ - width: 390px; + width: 100%; height: 710px; background-color: darkgray; position: absolute; @@ -75,7 +75,7 @@ } /* 价格框 */ .Box3{ - width: 350px; + width: 90%; height: 160px; background-color: darkgrey; top:90px;