第一次提交

This commit is contained in:
2023-02-18 16:24:17 +08:00
parent dceb736e33
commit 53aeac7bfe
1270 changed files with 45215 additions and 0 deletions

View File

@@ -0,0 +1,207 @@
// pages/mechanism/mechanism.js
//获取应用实例
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
navHeight: '',
menuButtonInfo: {},
searchMarginTop: 0, // 搜索框上边距
searchWidth: 0, // 搜索框宽度
searchHeight: 0, // 搜索框高度
page:1,
search: ''
},
/**
* 监听搜索内容
*/
changeSearch: function(e) {
let that = this;
var inputSearch = e.detail.value;
that.setData({
search: inputSearch
})
app.console(inputSearch+"================="+'22dddddddddddddddddddddd2')
// this.dataRefresh()
this.getMechanismList();
},
back(){
wx.navigateBack()
},
//机构详情跳转
mechanism(e){
app.console("================="+'dddddddddddddddd')
wx.navigateTo({
url: "/pages/institutions/institutions?id=" + e.currentTarget.dataset.id,
})
},
Seemore(){
console.log('点击了查看更多');
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
menuButtonInfo: wx.getMenuButtonBoundingClientRect()
})
console.log(this.data.menuButtonInfo)
const { top, width, height, right } = this.data.menuButtonInfo
wx.getSystemInfo({
success: (res) => {
const { statusBarHeight } = res
const margin = top - statusBarHeight
this.setData({
navHeight: (height + statusBarHeight + (margin * 2) ),
searchMarginTop: statusBarHeight + margin, // 状态栏 + 胶囊按钮边距
searchHeight: height, // 与胶囊按钮同高
searchWidth: right - width // 胶囊按钮右边坐标 - 胶囊按钮宽度 = 按钮左边可使用宽度
})
},
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getMechanismList();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
//this.getOrderList();
var that = this;
wx.request({
url: app.buildUrl("/app/Goddesswechat/getOrderList"),
header: app.getRequestHeader(),
method:'POST',
data: {
version_number: app.globalData.version_number,
uid:wx.getStorageSync('uid'),
token:wx.getStorageSync('token'),
page:1,
page_size:10,
style: that.data.status[ that.data.currentType ]
},
success: (res)=> {
var resp = res.data;
if(resp.erro==0){
that.setData({
page:1,
order_list:resp.order,
});
wx.stopPullDownRefresh({
success: (res) => {},
})
}
}
});
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
this.getMechanismList();
},
//机构列表
getMechanismList: function () {
var that = this;
wx.request({
url: app.buildUrl("/app/Goddesswechat/getMechanismList"),
header: app.getRequestHeader(),
method:'POST',
data: {
version_number: app.globalData.version_number,
uid:wx.getStorageSync('uid'),
token:wx.getStorageSync('token'),
page:'1',
page_size:500,
city:'',
style_id:'',
serach_name:this.data.search,
px_type:'',
lng:'',
lat:'',
},
success: function (res) {
var resp = res.data;
if(resp.erro==0){
that.setData({
lists:resp.lists
});
// if(that.data.page==1){
// that.setData({
// lists:resp.lists,
// page:that.data.page+1
// });
// }else{
// that.setData({
// lists:that.data.lists.concat(resp.lists),
// page:that.data.page+1
// });
// }
}
}
});
},
})

View File

@@ -0,0 +1,6 @@
{
"usingComponents": {
},
"navigationStyle": "custom"
}

View File

@@ -0,0 +1,67 @@
<!--pages/mechanism/mechanism.wxml-->
<view>
<!-- 搜索栏 -->
<view class="custom-bar" style="height:{{navHeight}}px">
<view class="custom-bar__wrapper" style="margin-top:{{searchMarginTop}}px; height: {{searchHeight}}px;width: {{searchWidth}}px" >
<view style="height:24rpx;width:24rpx;border-right: 2px solid black;border-top: 2px solid black;transform: rotate(-135deg);margin-left:10px" bindtap="back"></view>
<view class="search-group">
<icon class="icon-small searchicon" type="search" size="38rpx"></icon>
<input class="search-group__input" bindblur='changeSearch' bindconfirm='changeSearch' bindinput='changeSearch' placeholder="搜索"/>
</view>
</view>
</view>
<!-- 顶部排序 -->
<!-- <view style="display:flex;justify-content: space-around;margin-bottom:23rpx;margin-top:{{navHeight}}px;font-size:24rpx;color: #585858;">
<view >西安市</view>
<view>智能排序</view>
<view>分类</view>
</view> -->
<view class="order-list" style="margin-top: 160rpx;" wx:if="{{lists.length}}">
<view wx:for="{{lists}}" wx:key="{{index}}" wx:for-item="item">
<view class="recommend" bindtap="mechanism" data-id="{{item.id}}">
<view class="red-image">
<image
src="{{item.wechat_logo}}">
</image>
</view>
<view class="red-tit">
<view style="font-size: 30rpx;color: #333333;font-weight:700">{{item.mechanism_name}}</view>
<view style="font-size: 24rpx;color: #A5A5A5;">{{item.address}}</view>
<view style="font-size: 20rpx;color: #A5A5A5;display:flex">
<view class="Grade" wx:for="aaaaa" wx:key="index">
<view class="Star">
<image src="../image/Star.png"></image>
</view>
</view>
<text style="margin:0 40rpx 0 7rpx">{{item.score}}</text>
<text>已预约{{item.appointment}}</text>
</view>
</view>
</view>
<!-- <view style="margin-left:150rpx">
<view class="headline">
<text>抢</text>
<text style="font-size: 18rpx;font-family: PingFang SC;margin-left:18rpx;">【除皱瘦脸】瘦脸针·国产瘦脸加强版80-正...</text>
<text style="font-size: 18rpx;color:#FF4A4A;margin-left:117rpx;">¥99</text>
</view>
<view class="headline">
<text>抢</text>
<text style="font-size: 18rpx;font-family: PingFang SC;margin-left:18rpx;">【除皱瘦脸】瘦脸针·国产瘦脸加强版80-正...</text>
<text style="font-size: 18rpx;color:#FF4A4A;margin-left:117rpx;">¥99</text>
</view>
</view>
<view class="Residuals" bindtap="Seemore">
查看其他3个相关产品
<view class="jiantou"></view>
</view> -->
</view>
</view>
</view>

View File

@@ -0,0 +1,130 @@
/* pages/mechanism/mechanism.wxss */
/* 推荐图片 */
/* .mechanism {
} */
.recommend {
box-sizing: border-box;
display: flex;
width: 750rpx;
}
.recommend:nth-child(1){
border-top: 1px solid #D6D6D6;
border-bottom: 1px solid #D6D6D6;
}
.red-image {
width: 80rpx;
height: 80rpx;
margin: 38rpx 28rpx 41rpx 41rpx;
}
.red-image image {
width: 100%;
height: 100%;
border-radius: 50%;
}
.red-tit {
margin: 24rpx 0;
}
.Grade {
display: flex;
}
.Star {
width: 23rpx;
height: 22rpx;
margin-right: 4rpx;
}
.Star image {
width: 100%;
height: 100%;
}
/* 标题 */
.headline {
display: flex;
width: 576rpx;
height: 57rpx;
line-height: 57rpx;
border-bottom: 1px solid #E9E9E9;
}
.headline text:first-child{
width: 28rpx;
height: 27rpx;
background: #FF576E;
border-radius: 5rpx;
font-size: 14rpx;
color: #ffffff;
text-align: center;
line-height: 27rpx;
margin-top:16rpx ;
}
/* 剩余产品 */
.Residuals{
position: relative;
font-size: 18rpx;
color: #00B1AE;
text-align: center;
margin-top: 25rpx;
}
.jiantou{
position: absolute;
top: 10rpx;
left: 465rpx;
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid #00B1AE;
}
/* _______________________________________ */
view {
box-sizing: border-box;
overflow: hidden;
}
.custom-bar {
/* background-color: #aaa; */
position: fixed;
left: 0;
top: 0;
width: 100%;
}
.custom-bar__wrapper {
padding: 0 10rpx;
display: flex;
justify-content: center;
align-items: center;
}
.search-group {
width: 100%;
height: 100%;
display: flex;
justify-content: flex-start;
align-items: center;
/* border: 1px solid #666; */
border-radius: 60rpx;
/* padding: 0 10rpx; */
padding-left: 25rpx;
background: #F5F5F5;
}
.search-group > input {
font-size: 25rpx;
width: 800rpx;
}
.search-group > image {
height: 32rpx;
width: 32rpx;
margin-right: 20rpx
}
.order-list{
width: 100%;
}