diff --git a/node/model/module/llf_db.js b/node/model/module/llf_db.js
index 58f4b866ffe3a75451216ceec43c57c933719362..83e97cbeda4c770199dbe9549e36e1bf6d89521e 100644
--- a/node/model/module/llf_db.js
+++ b/node/model/module/llf_db.js
@@ -28,22 +28,22 @@ const LoginSchema = new mongoose.Schema({
//密码
password: {
type: String,
- require:true,
+ require: true,
},
//用户账号
- userImg:{
- type:String,
- default:'https://img.zcool.cn/community/01cfd95d145660a8012051cdb52093.png@2o.png'
+ userImg: {
+ type: String,
+ default: 'https://img.zcool.cn/community/01cfd95d145660a8012051cdb52093.png@2o.png'
},
//用户签名
- usertag:{
- type:String,
+ usertag: {
+ type: String,
},
// 手机号
- phone:{
- type:String,
- required:true
- },
+ phone: {
+ type: String,
+ required: true
+ },
//创建时间
createdAt: {
type: Date, // 字段类型
@@ -55,14 +55,14 @@ const LoginSchema = new mongoose.Schema({
default: Date.now, // 默认值
},
//用户积分
- userScore:{
- type:Number,
- default:0
+ userScore: {
+ type: Number,
+ default: 0
},
//用户等级
- userLevel:{
- type:Number,
- default:1
+ userLevel: {
+ type: Number,
+ default: 1
}
})
@@ -71,15 +71,41 @@ const RefreshTokenSchema = new mongoose.Schema({
userId: { type: mongoose.Schema.Types.ObjectId, ref: 'User', required: true },
token: { type: String, required: true },
expiresAt: { type: Date, required: true },
- });
-
-
-
+});
+
+
+//陪护模型
+const CleanSchema = new mongoose.Schema({
+ Cleanimg: String,
+ Cleantitle: String,
+ CleanPrice: String,
+ CleanNum: Number,
+ CleanType: Number,
+ service: String, //商品服务
+ CleanDescription: String, //商品描述
+ CleanMeal: String, //套餐
+ CleanRemark: String,//备注
+})
+const StewardSchema = new mongoose.Schema({
+ Stewardimg: String,
+ Stewardtitle: String,
+ StewardUser: String,
+ StewardPassword: String,
+ StewardTag: Array,
+ StewardAddress: String,
+ StewardAge: Number,
+ StewardWork: String,
+ StewardIntroduce: String,
+ StewardType: Number,
+ StewardImgs: Array,
- const RefreshToken = mongoose.model('RefreshToken', RefreshTokenSchema, 'RefreshToken');
+})
+const RefreshToken = mongoose.model('RefreshToken', RefreshTokenSchema, 'RefreshToken');
const LoginModel = mongoose.model('Login', LoginSchema, 'Login');
+const CleanModel = mongoose.model('Clean', CleanSchema, 'Clean');
+const StewardModel = mongoose.model('Steward', StewardSchema, 'Steward');
// 创建用户
// LoginModel.create({
@@ -89,5 +115,34 @@ const LoginModel = mongoose.model('Login', LoginSchema, 'Login');
// })
+
+// CleanModel.create({
+// Cleanimg: "https://img0.baidu.com/it/u=3797557470,34549791&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",
+// Cleantitle: "宠物洗澡",
+// CleanPrice: "100",
+// CleanNum: "100",
+// CleanType: 1,
+// service: "洗澡",
+// CleanDescription: "宠物洗澡",
+// })
+
+
+// StewardModel.create({
+// Stewardimg: "https://img95.699pic.com/photo/50118/9032.jpg_wh860.jpg",
+// Stewardtitle: "王阿姨",
+// StewardUser: "adminwang",
+// StewardPassword: "123456",
+// StewardTag: ["月嫂陪护", "热情", "细心",'服务态度好'],
+// StewardAddress: "北京市丰台区",
+// StewardAge: 20,
+// StewardWork: "3",
+// StewardIntroduce: "我是月嫂,孕期配护",
+// StewardType: 3,
+// StewardImgs: ["https://ts1.cn.mm.bing.net/th/id/R-C.229e3f0528e2d485e55bbe9f33f5445d?rik=MQXoLbqe%2fCr4hw&riu=http%3a%2f%2f13960979.s21i.faiusr.com%2f2%2fABUIABACGAAgjaGL_AUorNLOnQYw6Ac46Ac.jpg&ehk=3Ijsu%2b3taF1uIRKiJjLy%2fr3f136LFZAz%2bAis4ak4WbQ%3d&risl=&pid=ImgRaw&r=0","https://oss.boluoyunyu.com/uploads/ueditor/20220422/1650611402984359.jpg",'https://www.duoxiwa.com/resource/images/89646d43e1ef4f318bb83c2d36028fb1_2.jpg'],
+
+// })
+
+
+
// 暴露文件
-module.exports = {RefreshToken,LoginModel }
+module.exports = { RefreshToken, LoginModel, CleanModel, StewardModel }
diff --git a/node/routes/llf_api.js b/node/routes/llf_api.js
index a1588cae96588287a3aaf18db3058c5d6ebd1f35..65782b8c54f3386c12c451b2ca320c33b028fe95 100644
--- a/node/routes/llf_api.js
+++ b/node/routes/llf_api.js
@@ -2,7 +2,7 @@ var express = require('express');
var router = express.Router();
var jwt = require('jsonwebtoken')
-let { LoginModel, RefreshToken } = require('../model/module/llf_db')
+let { LoginModel, RefreshToken, CleanModel, StewardModel } = require('../model/module/llf_db')
/* GET home page. */
@@ -39,7 +39,7 @@ router.post('/login', async (req, res) => {
const newRefreshToken = new RefreshToken({ userId: user._id, token: refreshToken, expiresAt: new Date(Date.now() + REFRESH_TOKEN_EXPIRES_IN_MS) });
await newRefreshToken.save();
- res.json({ returncode: 200, accessToken, refreshToken,user });
+ res.json({ returncode: 200, accessToken, refreshToken, user });
} else {
res.status(401).json({ message: 'Invalid credentials' });
}
@@ -140,4 +140,59 @@ router.get("/protectedData", (req, res) => {
});
+router.get('/cleanList', async (req, res) => {
+ const data = await CleanModel.find()
+ console.log(data);
+ res.send({
+ code: 200,
+ returncode: 0,
+ data
+ })
+})
+
+router.get('/cleanDetail', async (req, res) => {
+ const id = req.query.id
+ console.log(id);
+ const data = await CleanModel.findById({ _id: id })
+ console.log(data);
+ res.send({
+ code: 200,
+ returncode: 0,
+ data
+ })
+})
+
+router.get('/getStewart', async (req, res) => {
+ const data = await StewardModel.find()
+ console.log(data);
+ res.send({
+ code: 200,
+ returncode: 0,
+ data
+ })
+})
+
+router.get('/stewartDetail', async (req, res) => {
+ const id = req.query.id
+ console.log(id);
+ const data = await StewardModel.findById({ _id: id })
+ console.log(data);
+ res.send({
+ code: 200,
+ returncode: 0,
+ data
+ })
+})
+
+router.get('/stewartlist', async (req, res) => {
+
+ const data = await StewardModel.find({ StewardType: 3 })
+ console.log(data);
+ res.send({
+ code: 200,
+ returncode: 0,
+ data
+ })
+})
+
module.exports = router;
diff --git a/vite-project/components.d.ts b/vite-project/components.d.ts
index 9bebc029304d550d129e5b1b8ee490a0678a495c..6ada770dda3553514021d0d2a333ac87a3586130 100644
--- a/vite-project/components.d.ts
+++ b/vite-project/components.d.ts
@@ -11,23 +11,16 @@ declare module 'vue' {
RouterView: typeof import('vue-router')['RouterView']
VanAddressList: typeof import('vant/es')['AddressList']
VanButton: typeof import('vant/es')['Button']
- VanCell: typeof import('vant/es')['Cell']
VanCellGroup: typeof import('vant/es')['CellGroup']
- VanConfigProvider: typeof import('vant/es')['ConfigProvider']
- VanDialog: typeof import('vant/es')['Dialog']
+ VanCheckbox: typeof import('vant/es')['Checkbox']
VanField: typeof import('vant/es')['Field']
VanForm: typeof import('vant/es')['Form']
VanGrid: typeof import('vant/es')['Grid']
VanGridItem: typeof import('vant/es')['GridItem']
VanIcon: typeof import('vant/es')['Icon']
- VanImage: typeof import('vant/es')['Image']
- VanList: typeof import('vant/es')['List']
VanNavBar: typeof import('vant/es')['NavBar']
- VanPopover: typeof import('vant/es')['Popover']
VanPopup: typeof import('vant/es')['Popup']
- VanRate: typeof import('vant/es')['Rate']
VanSearch: typeof import('vant/es')['Search']
- VanShareSheet: typeof import('vant/es')['ShareSheet']
VanSticky: typeof import('vant/es')['Sticky']
VanSwipe: typeof import('vant/es')['Swipe']
VanSwipeItem: typeof import('vant/es')['SwipeItem']
@@ -36,6 +29,7 @@ declare module 'vue' {
VanTabbar: typeof import('vant/es')['Tabbar']
VanTabbarItem: typeof import('vant/es')['TabbarItem']
VanTabs: typeof import('vant/es')['Tabs']
- VanWatermark: typeof import('vant/es')['Watermark']
+ VanTag: typeof import('vant/es')['Tag']
+ VanUploader: typeof import('vant/es')['Uploader']
}
}
diff --git a/vite-project/src/assets/iconfont/demo_index.html b/vite-project/src/assets/iconfont/demo_index.html
index 6274fbcaaacfbf6db5327bdfd25a4b4515e59042..98fd072776998fbf5e2510486976c554293e639d 100644
--- a/vite-project/src/assets/iconfont/demo_index.html
+++ b/vite-project/src/assets/iconfont/demo_index.html
@@ -54,6 +54,42 @@
+
+
+ 3.1-客服
+ 
+
+
+
+
+ wxb工具
+ 
+
+
+
+
+ 微信支付
+ 
+
+
+
+
+ 钟表
+ 
+
+
+
+
+ 爱心
+ 
+
+
+
+
+ 化学
+ 
+
+
09安全、保障
@@ -144,9 +180,9 @@
@font-face {
font-family: 'iconfont';
- src: url('iconfont.woff2?t=1709105946659') format('woff2'),
- url('iconfont.woff?t=1709105946659') format('woff'),
- url('iconfont.ttf?t=1709105946659') format('truetype');
+ src: url('iconfont.woff2?t=1710298973478') format('woff2'),
+ url('iconfont.woff?t=1710298973478') format('woff'),
+ url('iconfont.ttf?t=1710298973478') format('truetype');
}
第二步:定义使用 iconfont 的样式
@@ -172,6 +208,60 @@
+
+
+
+ 3.1-客服
+
+ .icon-kefu
+
+
+
+
+
+
+ wxb工具
+
+ .icon-wxbgongju
+
+
+
+
+
+
+ 微信支付
+
+ .icon-weixinzhifu
+
+
+
+
+
+
+ 钟表
+
+ .icon-zhongbiao
+
+
+
+
+
+
+ 爱心
+
+ .icon-aixin
+
+
+
+
+
+
+ 化学
+
+ .icon-huaxue
+
+
+
@@ -307,6 +397,54 @@
+
+
+
+
+ 3.1-客服
+ #icon-kefu
+
+
+
+
+
+
+ wxb工具
+ #icon-wxbgongju
+
+
+
+
+
+
+ 微信支付
+ #icon-weixinzhifu
+
+
+
+
+
+
+ 钟表
+ #icon-zhongbiao
+
+
+
+
+
+
+ 爱心
+ #icon-aixin
+
+
+
+
+
+
+ 化学
+ #icon-huaxue
+
+
diff --git a/vite-project/src/assets/iconfont/iconfont.css b/vite-project/src/assets/iconfont/iconfont.css
index eea4fde87d9797d44d69a9df39c521ac71bd57c5..1ba7b068aaf80f264a9545085d9eaf2e536e0034 100644
--- a/vite-project/src/assets/iconfont/iconfont.css
+++ b/vite-project/src/assets/iconfont/iconfont.css
@@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 4447308 */
- src: url('iconfont.woff2?t=1709105946659') format('woff2'),
- url('iconfont.woff?t=1709105946659') format('woff'),
- url('iconfont.ttf?t=1709105946659') format('truetype');
+ src: url('iconfont.woff2?t=1710298973478') format('woff2'),
+ url('iconfont.woff?t=1710298973478') format('woff'),
+ url('iconfont.ttf?t=1710298973478') format('truetype');
}
.iconfont {
@@ -13,6 +13,30 @@
-moz-osx-font-smoothing: grayscale;
}
+.icon-kefu:before {
+ content: "\e600";
+}
+
+.icon-wxbgongju:before {
+ content: "\e61b";
+}
+
+.icon-weixinzhifu:before {
+ content: "\e650";
+}
+
+.icon-zhongbiao:before {
+ content: "\e619";
+}
+
+.icon-aixin:before {
+ content: "\eca1";
+}
+
+.icon-huaxue:before {
+ content: "\e918";
+}
+
.icon-anquanbaozhang:before {
content: "\e88c";
}
diff --git a/vite-project/src/assets/iconfont/iconfont.js b/vite-project/src/assets/iconfont/iconfont.js
index 15ba36528cbca14c637fd3bc3583107e8b34c4c9..32bf491b9cfaf56270201f24a52d19afb91c64b6 100644
--- a/vite-project/src/assets/iconfont/iconfont.js
+++ b/vite-project/src/assets/iconfont/iconfont.js
@@ -1 +1 @@
-window._iconfont_svg_string_4447308=' ',function(l){var a=(a=document.getElementsByTagName("script"))[a.length-1],c=a.getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var t,h,i,e,o,n=function(a,c){c.parentNode.insertBefore(a,c)};if(c&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}t=function(){var a,c=document.createElement("div");c.innerHTML=l._iconfont_svg_string_4447308,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(a=document.body).firstChild?n(c,a.firstChild):a.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(t,0):(h=function(){document.removeEventListener("DOMContentLoaded",h,!1),t()},document.addEventListener("DOMContentLoaded",h,!1)):document.attachEvent&&(i=t,e=l.document,o=!1,s(),e.onreadystatechange=function(){"complete"==e.readyState&&(e.onreadystatechange=null,d())})}function d(){o||(o=!0,i())}function s(){try{e.documentElement.doScroll("left")}catch(a){return void setTimeout(s,50)}d()}}(window);
\ No newline at end of file
+window._iconfont_svg_string_4447308=' ',function(l){var a=(a=document.getElementsByTagName("script"))[a.length-1],c=a.getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var t,h,i,o,e,d=function(a,c){c.parentNode.insertBefore(a,c)};if(c&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}t=function(){var a,c=document.createElement("div");c.innerHTML=l._iconfont_svg_string_4447308,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(a=document.body).firstChild?d(c,a.firstChild):a.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(t,0):(h=function(){document.removeEventListener("DOMContentLoaded",h,!1),t()},document.addEventListener("DOMContentLoaded",h,!1)):document.attachEvent&&(i=t,o=l.document,e=!1,n(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,p())})}function p(){e||(e=!0,i())}function n(){try{o.documentElement.doScroll("left")}catch(a){return void setTimeout(n,50)}p()}}(window);
\ No newline at end of file
diff --git a/vite-project/src/assets/iconfont/iconfont.json b/vite-project/src/assets/iconfont/iconfont.json
index 6e78fe0895e848e2024a4b98db18c007bc1a0253..7daa1aa13e3dcd03f65869d526c16d64472919a7 100644
--- a/vite-project/src/assets/iconfont/iconfont.json
+++ b/vite-project/src/assets/iconfont/iconfont.json
@@ -5,6 +5,48 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
+ {
+ "icon_id": "219393",
+ "name": "3.1-客服",
+ "font_class": "kefu",
+ "unicode": "e600",
+ "unicode_decimal": 58880
+ },
+ {
+ "icon_id": "591722",
+ "name": "wxb工具",
+ "font_class": "wxbgongju",
+ "unicode": "e61b",
+ "unicode_decimal": 58907
+ },
+ {
+ "icon_id": "781032",
+ "name": "微信支付",
+ "font_class": "weixinzhifu",
+ "unicode": "e650",
+ "unicode_decimal": 58960
+ },
+ {
+ "icon_id": "5091284",
+ "name": "钟表",
+ "font_class": "zhongbiao",
+ "unicode": "e619",
+ "unicode_decimal": 58905
+ },
+ {
+ "icon_id": "6775644",
+ "name": "爱心",
+ "font_class": "aixin",
+ "unicode": "eca1",
+ "unicode_decimal": 60577
+ },
+ {
+ "icon_id": "35599889",
+ "name": "化学",
+ "font_class": "huaxue",
+ "unicode": "e918",
+ "unicode_decimal": 59672
+ },
{
"icon_id": "1727278",
"name": "09安全、保障",
diff --git a/vite-project/src/assets/iconfont/iconfont.ttf b/vite-project/src/assets/iconfont/iconfont.ttf
index 2104b9235a9fa8e961f45f315304ed9d32a799d8..6b5f7860c4fd64d5e7026400c0864ec98d7daf9b 100644
Binary files a/vite-project/src/assets/iconfont/iconfont.ttf and b/vite-project/src/assets/iconfont/iconfont.ttf differ
diff --git a/vite-project/src/assets/iconfont/iconfont.woff b/vite-project/src/assets/iconfont/iconfont.woff
index 8f12b3d1878b17fbef9d3ceb4faf2e7c8d280d5e..0043ad9da85b1283fc73ae70fd3e3ce4833cdb37 100644
Binary files a/vite-project/src/assets/iconfont/iconfont.woff and b/vite-project/src/assets/iconfont/iconfont.woff differ
diff --git a/vite-project/src/assets/iconfont/iconfont.woff2 b/vite-project/src/assets/iconfont/iconfont.woff2
index 1306797b4e24c5e0b4f57999026b76926b007244..85bd5f465e35e02767fddb05c4724a538b96517b 100644
Binary files a/vite-project/src/assets/iconfont/iconfont.woff2 and b/vite-project/src/assets/iconfont/iconfont.woff2 differ
diff --git a/vite-project/src/component/CommonList.vue b/vite-project/src/component/CommonList.vue
index d75101c82a5e1089e5aadae320ee7bf1c1113e8e..1fdc41e3cc87d5380c915a2aae74e345df5bc3f7 100644
--- a/vite-project/src/component/CommonList.vue
+++ b/vite-project/src/component/CommonList.vue
@@ -25,12 +25,13 @@
import { ref } from 'vue';
const props = defineProps({
- imageUrl: String,
- title: String,
- priceText: String,
- transactionCount: Number,
+ CleanList:{
+ type:Array,
+ required:false
+ }
});
+ console.log(props.CleanList);
const onBuyClicked = () => {
// 在此处添加购买逻辑,例如触发事件或者调用外部方法
emit('buy-clicked');
@@ -44,54 +45,7 @@
\ No newline at end of file
diff --git a/vite-project/src/component/CommonTab.vue b/vite-project/src/component/CommonTab.vue
index 5f9a0bb945259bbba1a2017fc53ba05881354a45..9f671956061775113fd6b2f000580c8de0dec8b4 100644
--- a/vite-project/src/component/CommonTab.vue
+++ b/vite-project/src/component/CommonTab.vue
@@ -1,7 +1,6 @@
-<<<<<<< HEAD
@@ -10,12 +9,6 @@
-=======
-
-
-
-
->>>>>>> d60373f (lws)
@@ -37,11 +30,11 @@ const props = defineProps({
const activeTab = ref(0);
-// 处理点击事件
-function handleClickTab(event) {
- const tabIndex = event.name;
- // 这里可以执行自定义逻辑,如显示Toast等
- console.log('Clicked on tab:', tabIndex);
+const emit = defineEmits(['tab-change']);
+
+function handleClickTab(tabIndex) {
+ console.log('Clicked on tab:', tabIndex);
+ emit('tab-change', tabIndex); // 发送一个自定义事件,携带tab的索引
}
diff --git a/vite-project/src/router/index.ts b/vite-project/src/router/index.ts
index de36bb9cba14bb73bfb3caf9d314a19e8dcbeba3..cf98566bf0ae2c0be79ac49ba10eacc84ef6dc47 100644
--- a/vite-project/src/router/index.ts
+++ b/vite-project/src/router/index.ts
@@ -4,6 +4,8 @@ const Login = () => import("views/LoginView.vue");
const Home = () => import("views/Home/HomeView.vue");
const HomeServer = () => import("views/Home/HomeServerView.vue");
const HomeDetail = () => import("views/Home/HomeDetail.vue");
+const HomePay = () => import("views/Home/Homepay.vue");
+const HomePostpartum=import("views/Home/Homepostpartum.vue");
const Circle = () => import("views/Hjc/CircleView.vue");
const StoreView = () => import("views/StoreView.vue");
const MesageView = () => import("views/MessageView.vue");
@@ -111,11 +113,21 @@ const router = createRouter({
name: "homeDetail",
component: HomeDetail,
},
+ {
+ path: "/homepay",
+ name: "homepay",
+ component: HomePay,
+ },
{
path: "/homeAccompany",
name: "homeAccompany",
component: HomeAccompany,
},
+ {
+ path: "/homepostpartum",
+ name: "homepostpartum",
+ component: HomePostpartum,
+ },
{
path: "/store",
name: "store",
@@ -196,7 +208,24 @@ const router = createRouter({
{ path: "/tui", component: () => import("views/MyView/TuiView.vue") }, //退货
{ path: "/jia", component: () => import("views/Home/JiaView.vue") }, //家电维修
{ path: "/select", component: () => import("views/Home/SelectView.vue") }, //预约
+ { path: "/select1", component: () => import("views/Home/SelectView1.vue") }, //预约1
],
});
+
+
+// 添加全局前置守卫
+router.beforeEach((to, from, next) => {
+ // 获取存储的Token
+ const token = localStorage.getItem("refresh_token");
+
+ // 如果Token不存在且目标路由不是登录页
+ if (!token && to.path !== '/login') {
+ next('/login'); // 强制跳转到登录页
+ } else {
+ next(); // 允许继续导航
+ }
+});
+
+
export default router;
diff --git a/vite-project/src/stores/counter.ts b/vite-project/src/stores/counter.ts
deleted file mode 100644
index b6757ba5723c5b89b35d011b9558d025bbcde402..0000000000000000000000000000000000000000
--- a/vite-project/src/stores/counter.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { ref, computed } from 'vue'
-import { defineStore } from 'pinia'
-
-export const useCounterStore = defineStore('counter', () => {
- const count = ref(0)
- const doubleCount = computed(() => count.value * 2)
- function increment() {
- count.value++
- }
-
- return { count, doubleCount, increment }
-})
diff --git a/vite-project/src/views/Home/HomeAccompany.vue b/vite-project/src/views/Home/HomeAccompany.vue
index ae22f57fcfbf10d957183c1ae5d20949a685ac7b..7eb13987060beb6b6a9e20c569bb5cf154e1673b 100644
--- a/vite-project/src/views/Home/HomeAccompany.vue
+++ b/vite-project/src/views/Home/HomeAccompany.vue
@@ -14,14 +14,14 @@
请选择
-
+
选择服务套餐
- 30天满月呵护
+ {{ showlist.title }}
-
-
+
+
+
+
+
+
+
+
+
+
+
选择套餐
+
+
+
+
{{ item.title }}
+
{{ item.price }}元起
+
+
+
+
+
+
\ No newline at end of file
diff --git a/vite-project/src/views/Home/HomeDetail.vue b/vite-project/src/views/Home/HomeDetail.vue
index fa733d906e0df2a88b8ad23e5698768fdfe12760..e6c0b3e1eb66780df3cfa56b4ec7e4775ec62865 100644
--- a/vite-project/src/views/Home/HomeDetail.vue
+++ b/vite-project/src/views/Home/HomeDetail.vue
@@ -1,25 +1,20 @@
-
+
+
+
-
成交123123 数
+
成交{{ detailList.CleanNum }} 数
分享
@@ -57,14 +52,14 @@
@@ -140,7 +135,6 @@
-
@@ -149,7 +143,12 @@
import CommonNav from '../../component/CommonNavBar.vue'
import CommonSwipe from '../../component/CommonSwipe.vue'
import CommonTab from '../../component/CommonTab.vue'
-import { ref } from 'vue'
+import { useRouter, useRoute } from 'vue-router'
+import axiosInstance from '../../axios/index.ts'
+import { onMounted, ref } from 'vue'
+const router = useRouter()
+const route = useRoute()
+const accessToken = localStorage.getItem('access_token')
const images = ref([
{ id: 1, src: 'https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg', alt: '手机' },
@@ -163,12 +162,50 @@ const myTabs = ref([
{ id: 4, title: '常见问题' }
])
+const selectedOption = ref(null); // 用于记录当前选中的选项
+const optionlist = ref([
+ { id: 1, title: '日常家电清洗三小时', price: 59, time: 1, },
+ { id: 2, title: '日常家电清洗二小时', price: 59, time: 1, },
+ { id: 3, title: '日常家电清洗一小时', price: 59, time: 1, }
+])
+
+
+function selectItem(item) {
+ selectedOption.value = item;
+ console.log(selectedOption.value, '111');
+}
+
+function isActiveItem(item) {
+ return selectedOption.value === item;
+}
+
const show = ref(false);
const showPopup = () => {
show.value = true;
};
+const routerId = ref('')
+onMounted(() => {
+ const id = route.query.id
+ routerId.value = id
+ getDetailList(id)
+})
+const detailList = ref({})
+const getDetailList = async (id) => {
+ console.log(id);
+ const { data } = await axiosInstance.get(`/llfAPi/cleanDetail?id=${id}`, { headers: { 'Authorization': `Bearer ${accessToken}` } })
+ detailList.value = data.data
+}
+
+
+const handleRouterSelectVime = () => {
+ const selectedOptionStringified = JSON.stringify(selectedOption.value);
+ console.log(selectedOptionStringified, '333');
+ console.log(routerId.value, '222');
+
+ router.push({ path: '/select1', query: { id: routerId.value, selectedOption: selectedOptionStringified } })
+}
@@ -179,6 +216,16 @@ const showPopup = () => {
height: 100%;
}
+.detail_img {
+ width: 100%;
+ height: 220px;
+}
+
+.detail_img img {
+ width: 100%;
+ height: 100%;
+}
+
.detail_option {
width: 100%;
height: 90px;
@@ -215,6 +262,11 @@ const showPopup = () => {
border-radius: 10px;
}
+.active-border {
+ border: 1px solid red;
+ outline: none;
+}
+
.detail_option ul li p {
width: 100%;
height: 30%;
@@ -451,4 +503,5 @@ const showPopup = () => {
border: none;
color: white;
background-color: rgb(146, 153, 17);
-}
\ No newline at end of file
+}
+
\ No newline at end of file
diff --git a/vite-project/src/views/Home/HomeServerView.vue b/vite-project/src/views/Home/HomeServerView.vue
index c76ff65732aca577266f6b04681f2e99bd49940b..641d933a4667102d93494bd50f8199deb4cbac67 100644
--- a/vite-project/src/views/Home/HomeServerView.vue
+++ b/vite-project/src/views/Home/HomeServerView.vue
@@ -1,43 +1,40 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+ {{ item.Cleantitle }}
+
+
+
{{ item.CleanPrice }}元起
+
+
+
成交 {{ item.CleanNum }} 单
+
立即购买
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/vite-project/src/views/Home/HomeView.vue b/vite-project/src/views/Home/HomeView.vue
index 0ee6700a02c0c72bba3e109726497c033d152c57..2605c9cacd2c9e7e30743ca7f79c82e7e7568883 100644
--- a/vite-project/src/views/Home/HomeView.vue
+++ b/vite-project/src/views/Home/HomeView.vue
@@ -6,34 +6,36 @@
- xxxxxxxxxxxxxxxxxx
+ 河北省保定市莲池区
-
- 家电清洗
+
+
+ 家电清洗
-
+
+
全屋保洁
-
+
甲醛检测
-
+
家电维修
-
+
星级保洁
-
+
贴心陪护
@@ -50,7 +52,7 @@
-
热销服务
+
案例展示
更多
@@ -72,20 +74,20 @@
-
+
在线预约
-
+
多远服务
-
+
专业服务
-
- 在线预约
+
+ 双重保障
@@ -98,58 +100,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
家里清洁服务
+
{{ item.Cleantitle }}
-
¥999
-
已服务100次
+
¥{{ item.CleanPrice }}
+
已服务{{ item.CleanNum }}次
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/vite-project/src/views/home/butlerHotel.vue b/vite-project/src/views/home/butlerHotel.vue
index b02f3d33684549a0ca138c3ce7adcbf0d31f5786..e017b6fc57f29d48376e2d1c611aa46166769674 100644
--- a/vite-project/src/views/home/butlerHotel.vue
+++ b/vite-project/src/views/home/butlerHotel.vue
@@ -3,155 +3,42 @@
-
-
-
-
-
-
-
-
张三
-
- 河北人
- |
- 35
- |
- 5年经验
-
-
-
-
详情
-
-
-
-
-
-
-
-
-
-
-
里斯
-
- 河北人
- |
- 35
- |
- 5年经验
-
-
-
-
详情
-
-
-
-
-
-
-
-
-
-
-
王五
-
- 河北人
- |
- 35
- |
- 5年经验
-
-
-
-
详情
-
-
-
-
-
-
-
-
-
-
-
李峰
-
- 河北人
- |
- 35
- |
- 5年经验
-
-
-
-
详情
+
+
+
+
-
-
-
-
-
-
-
+
+
{{ item.Stewardtitle }}
+
+ {{ item.StewardAddress }}
+ |
+ {{ item.StewardAge }}
+ |
+ {{ item.StewardWork }}年经验
-
-
张峰
-
- 河北人
- |
- 35
- |
- 5年经验
-
-
+
-
详情
+
详情
@@ -159,27 +46,81 @@