提交
This commit is contained in:
97
甲情_甲意/miniprogram/pages/test1/test1.acss
Normal file
97
甲情_甲意/miniprogram/pages/test1/test1.acss
Normal file
@ -0,0 +1,97 @@
|
||||
.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;
|
||||
}
|
||||
.box6{
|
||||
width: 120rpx;
|
||||
height: 50rpx;
|
||||
border: 1px solid #4095e5;
|
||||
border-radius: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
bottom: 300rpx;
|
||||
left: 530rpx;
|
||||
}
|
||||
.dingwei{
|
||||
position: relative;
|
||||
|
||||
}
|
||||
.statues{
|
||||
font-size: 13px;
|
||||
width: 100rpx;
|
||||
background-color: #4095e5;
|
||||
margin-top: 20rpx;
|
||||
margin-left: 10rpx;
|
||||
color: white;
|
||||
position: relative;
|
||||
|
||||
}
|
||||
.text{
|
||||
font-weight: bolder;
|
||||
margin-left: 10rpx;
|
||||
position: relative;
|
||||
top: 30rpx;
|
||||
right: 10rpx;
|
||||
}
|
||||
.wenzi{
|
||||
width: 65%;
|
||||
height: 200rpx;
|
||||
position: relative;
|
||||
left: 220rpx;
|
||||
bottom: 180rpx;
|
||||
}
|
||||
.image{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 20px;
|
||||
position: relative;
|
||||
top: 25rpx;
|
||||
left: 20rpx;
|
||||
}
|
||||
.kuang{
|
||||
width: 90%;
|
||||
height: 240rpx;
|
||||
border: 3px solid #de868f;
|
||||
border-radius: 20px;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.box2{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 20rpx;
|
||||
flex-direction: column;
|
||||
}
|
58
甲情_甲意/miniprogram/pages/test1/test1.axml
Normal file
58
甲情_甲意/miniprogram/pages/test1/test1.axml
Normal file
@ -0,0 +1,58 @@
|
||||
<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}}" data-num="{{item}}" onTap="dianpu">
|
||||
<image class="image" mode="scaleToFill" src="{{item.businessAvatar}}" />
|
||||
<view class="wenzi">
|
||||
<text class="text">{{item.businessName}}</text>
|
||||
<view style="width:120px;position:relative;top:40rpx;right:10rpx">
|
||||
<text class="statues">{{item.businessImages}}</text>
|
||||
<text class="dingwei" style=";color:#4095e5;border:1px solid #4095e5;font-size: 12px;">{{item.startBusiness}}营业</text>
|
||||
</view>
|
||||
<view style="width:150px">
|
||||
<text class="dingwei" style="width:150rpx;top:50rpx;width:200rpx;height:100rpx;font-size:12px;color: #9b9b9b;">{{item.address}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box6">
|
||||
<text style="font-size:13px;color:#4095e5" a:if="{{ item.storeStatus===1 }}">可预约</text>
|
||||
<text style="font-size:13px;color:#4095e5" a:if="{{ item.storeStatus===0 }}">已休息</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
98
甲情_甲意/miniprogram/pages/test1/test1.js
Normal file
98
甲情_甲意/miniprogram/pages/test1/test1.js
Normal file
@ -0,0 +1,98 @@
|
||||
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
|
||||
},
|
||||
onLoad() {
|
||||
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.id
|
||||
console.log(ID);
|
||||
const userId = id.userId
|
||||
const address = id.address
|
||||
const businessName = id.businessName
|
||||
const businessAvatar = id.businessAvatar
|
||||
const endBusiness = id.endBusiness
|
||||
const startBusiness = id.startBusiness
|
||||
const storeStatus = id.storeStatus
|
||||
const businessPhone =id.businessPhone
|
||||
console.log('Address being passed: ', ID,address,businessName,businessAvatar,endBusiness,startBusiness,businessPhone);
|
||||
|
||||
my.navigateTo({
|
||||
url: `/pages/test/test?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/test1/test1.json
Normal file
5
甲情_甲意/miniprogram/pages/test1/test1.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
},
|
||||
"styleIsolation": "apply-shared"
|
||||
}
|
Reference in New Issue
Block a user