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 0000000..9087b79
Binary files /dev/null and b/甲情_甲意/miniprogram/pages/image/dingwei.png differ
diff --git a/甲情_甲意/miniprogram/pages/image/wiegouxuan.png b/甲情_甲意/miniprogram/pages/image/wiegouxuan.png
new file mode 100644
index 0000000..44dbf8d
Binary files /dev/null and b/甲情_甲意/miniprogram/pages/image/wiegouxuan.png differ
diff --git a/甲情_甲意/miniprogram/pages/image/yigouxuan.png b/甲情_甲意/miniprogram/pages/image/yigouxuan.png
new file mode 100644
index 0000000..1e04e3f
Binary files /dev/null and b/甲情_甲意/miniprogram/pages/image/yigouxuan.png differ
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;