提交
This commit is contained in:
103
甲情_甲意/miniprogram/pages/shouye/shouye.acss
Normal file
103
甲情_甲意/miniprogram/pages/shouye/shouye.acss
Normal file
@ -0,0 +1,103 @@
|
||||
.k1{
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
background-color: #efaab1b7;
|
||||
margin-top: 70rpx;
|
||||
|
||||
}
|
||||
.z1{
|
||||
font-size: 25px;
|
||||
font-weight: bolder;
|
||||
position: relative;
|
||||
color: #ffffff;
|
||||
top:15px;
|
||||
left:20px;
|
||||
}
|
||||
.box4 {
|
||||
display: inline-flex;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
background-color: pink;
|
||||
border-radius: 10%;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-shadow: -10px 10px 0px rgba(33, 2, 2, 0.1);
|
||||
position: relative;
|
||||
}
|
||||
.box5 {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
margin-left: 30rpx;
|
||||
top: 30rpx;
|
||||
}
|
||||
.text3{
|
||||
color: white;
|
||||
}
|
||||
.box6wai{
|
||||
width: 20%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.box6{
|
||||
width: 120rpx;
|
||||
height: 50rpx;
|
||||
border: 1px solid #4095e5;
|
||||
border-radius: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.dingwei{
|
||||
color:#4095e5;
|
||||
border:1px solid #4095e5;
|
||||
font-size: 12px;
|
||||
}
|
||||
.statues{
|
||||
font-size: 13px;
|
||||
width: 100rpx;
|
||||
background-color: #4095e5;
|
||||
color: white;
|
||||
}
|
||||
.text{
|
||||
font-weight: bolder;
|
||||
}
|
||||
.wenzi{
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.image{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.kuang{
|
||||
width: 90%;
|
||||
height: 240rpx;
|
||||
border: 3px solid #de868f;
|
||||
border-radius: 20px;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.messagebox{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
}
|
||||
.box2{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 20rpx;
|
||||
flex-direction: column;
|
||||
}
|
||||
.imageboxa{
|
||||
width: 30%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
64
甲情_甲意/miniprogram/pages/shouye/shouye.axml
Normal file
64
甲情_甲意/miniprogram/pages/shouye/shouye.axml
Normal file
@ -0,0 +1,64 @@
|
||||
<view>
|
||||
<view>
|
||||
<swiper
|
||||
previousMargin="0px"
|
||||
nextMargin="0px"
|
||||
indicator-dots="{{indicatorDots}}"
|
||||
autoplay="{{autoplay}}"
|
||||
vertical="{{vertical}}"
|
||||
interval="{{interval}}"
|
||||
circular="{{circular}}"
|
||||
duration="{{duration}}"
|
||||
>
|
||||
<swiper-item a:for="{{background}}" key="{{item}}" >
|
||||
<image mode="scaleToFill" src="{{item.image}}" style="width:100%;height:260px;" />
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box5">
|
||||
<view class="box4" onTap="shangmen">
|
||||
<text class="text3">上门预约</text>
|
||||
</view>
|
||||
<view class="box4"onTap="daodian" style="margin-left:20rpx">
|
||||
<text class="text3">到店服务</text>
|
||||
</view>
|
||||
<view class="box4" onTap="qiangdan" style="margin-left:20rpx">
|
||||
<text class="text3">专业培训</text>
|
||||
</view>
|
||||
<view class="box4"style="margin-left:20rpx" onTap="yuyue">
|
||||
<text class="text3">我的预约</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 店铺 -->
|
||||
<view class="k1">
|
||||
<text class="z1">推荐店铺</text>
|
||||
</view>
|
||||
<!-- 店铺界面 -->
|
||||
<view style="width:100%">
|
||||
<view class="box2" >
|
||||
<view class="kuang" a:for="{{ tuijian }}" a:key="{{index}}" a:if="{{ item.business.state==1 }}" data-num="{{item}}" onTap="dianpu">
|
||||
<view class="messagebox">
|
||||
<view class="imageboxa">
|
||||
<image class="image" mode="scaleToFill" src="{{item.business.businessAvatar}}" />
|
||||
</view>
|
||||
<view class="wenzi">
|
||||
<text class="text">{{item.business.businessName}}</text>
|
||||
<view>
|
||||
<text class="statues">接受预定</text>
|
||||
<text class="dingwei">{{item.business.startBusiness}}营业</text>
|
||||
</view>
|
||||
<view style="width:150px">
|
||||
<text style="color:rgb(125, 122, 122);font-size:12px">{{item.business.address}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box6wai">
|
||||
<view class="box6">
|
||||
<text style="font-size:13px;color:#4095e5" a:if="{{ item.business.storeStatus===1 }}">可预约</text>
|
||||
<text style="font-size:13px;color:#4095e5" a:if="{{ item.business.storeStatus===0 }}">已休息</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
103
甲情_甲意/miniprogram/pages/shouye/shouye.js
Normal file
103
甲情_甲意/miniprogram/pages/shouye/shouye.js
Normal file
@ -0,0 +1,103 @@
|
||||
import {url} from '../request';
|
||||
Page({
|
||||
data: {
|
||||
background: [
|
||||
{image:"../image/meijia1.jpg"},
|
||||
{image:"../image/meijia2.jpg"}
|
||||
],
|
||||
indicatorDots: true,
|
||||
autoplay: true,
|
||||
vertical: false,
|
||||
interval: 1000,
|
||||
circular: false,
|
||||
duration: 1500,
|
||||
tuijian:[],
|
||||
address: "",
|
||||
businessAvatar: "",
|
||||
businessImages: "",
|
||||
businessName: "",
|
||||
businessPhone: "",
|
||||
businessProfile: "",
|
||||
categoryId: 0,
|
||||
createTime: "",
|
||||
endBusiness: "",
|
||||
id: 0,
|
||||
isDelete: 0,
|
||||
startBusiness: "",
|
||||
state: 0,
|
||||
storeStatus: '',
|
||||
updateTime: "",
|
||||
userId: 0
|
||||
},
|
||||
onShow() {
|
||||
my.request({
|
||||
url: url + '/api/business/list',
|
||||
method: 'POST',
|
||||
data: {
|
||||
|
||||
},
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
console.log('Request succeeded:', res);
|
||||
if (res.data && res.data.data) {
|
||||
this.setData({
|
||||
tuijian: res.data.data, // 更新 tuijian 列表
|
||||
});
|
||||
} else {
|
||||
console.log('shibaile')
|
||||
}
|
||||
},
|
||||
fail: (error) => {
|
||||
console.error('Request failed', error);
|
||||
}
|
||||
});
|
||||
},
|
||||
dianpu(item) {
|
||||
const id = item.target.dataset.num
|
||||
// console.log('传递的数据:', id);
|
||||
const ID = id.business.id
|
||||
console.log(ID);
|
||||
const userId = id.business.userId
|
||||
const address = id.business.address
|
||||
const businessName = id.business.businessName
|
||||
const businessAvatar = id.business.businessAvatar
|
||||
const endBusiness = id.business.endBusiness
|
||||
const startBusiness = id.business.startBusiness
|
||||
const storeStatus = id.business.storeStatus
|
||||
const businessPhone =id.business.businessPhone
|
||||
|
||||
console.log('Address being passed: ', ID,address,businessName,businessAvatar,endBusiness,startBusiness,businessPhone);
|
||||
|
||||
my.navigateTo({
|
||||
url: `/pages/dianpuzhuye/dianpuzhuye?userId=${userId}
|
||||
&&address=${address}&&businessName=${businessName}
|
||||
&&businessAvatar=${businessAvatar}&&startBusiness=${startBusiness}
|
||||
&&endBusiness=${endBusiness}&&storeStatus=${storeStatus}
|
||||
&&id=${ID}&&businessPhone=${businessPhone}`,
|
||||
});
|
||||
},
|
||||
shangmen(){
|
||||
my.navigateTo({
|
||||
url:'/pages/shangmenyuyue/shangmenyuyue'
|
||||
})
|
||||
},
|
||||
daodian(){
|
||||
my.navigateTo({
|
||||
url:'/pages/daodianfuwu/daodianfuwu'
|
||||
})
|
||||
},
|
||||
qiangdan(){
|
||||
my.navigateTo({
|
||||
url:'/pages/kehushangmenyuyueqiangdan/kehushangmenyuyueqiangdan'
|
||||
})
|
||||
},
|
||||
yuyue(){
|
||||
my.navigateTo({
|
||||
url:'/pages/wodeyuyue/wodeyuyue'
|
||||
})
|
||||
}
|
||||
|
||||
})
|
5
甲情_甲意/miniprogram/pages/shouye/shouye.json
Normal file
5
甲情_甲意/miniprogram/pages/shouye/shouye.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"defaultTitle": "甲情甲意",
|
||||
"usingComponents": {},
|
||||
"styleIsolation": "apply-shared"
|
||||
}
|
Reference in New Issue
Block a user