浏览代码

小程序修改食堂样式

wrh 2 年之前
父节点
当前提交
2eb4e886f1

+ 16 - 7
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/commentList/commentList.js

@@ -25,19 +25,28 @@ Page({
 		// 餐厅ID
 		canteenId: '',
 		// 食品ID
-		dishesId: ''
+		dishesId: '',
+		height: '93vh'
 	},
 
 	/**
 	 * 生命周期函数--监听页面加载
 	 */
 	onLoad: function (options) {
-		this.setData({
-			commentCount: options.commentCount,
-			compliment: options.compliment,
-			canteenId: options.canteenId,
-			dishesId: options.dishesId
-		})
+		if (options.commentCount != undefined && options.compliment != undefined) {
+			this.setData({
+				commentCount: options.commentCount,
+				compliment: options.compliment,
+				canteenId: options.canteenId,
+				dishesId: options.dishesId
+			})
+		} else {
+			this.setData({
+				canteenId: options.canteenId,
+				dishesId: options.dishesId,
+				height: '100vh'
+			})
+		}
 		this.getCommentById();
 	},
 	imageError(e) {

+ 2 - 2
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/commentList/commentList.wxml

@@ -1,7 +1,7 @@
 <wxs module="filter" src="./util.wxs"></wxs>
 <view>
-	<view class="top-cont">此菜品上周共获得<span>{{compliment}}</span>次点赞,获得<span>{{commentCount}}</span>次评论!</view>
-	<scroll-view class="content" scroll-y="true" style="height: 93vh;" bindscrolltolower="scrollBottom">
+	<view wx:if="{{compliment}}" class="top-cont">此菜品上周共获得<span>{{compliment}}</span>次点赞,获得<span>{{commentCount}}</span>次评论!</view>
+	<scroll-view class="content" scroll-y="true" style="height: {{height}};" bindscrolltolower="scrollBottom">
 		<view wx:for="{{commentList}}" wx:key="index" class="cont-width">
 			<image class="logo" src="{{item.imgUrl ? item.imgUrl :'/pages/images/user_logo.png'}}" alt="" binderror="imageError" data-index="{{index}}"></image>
 			<view class="right">

+ 108 - 105
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/ourCanteen/ourCanteen.wxss

@@ -1,164 +1,167 @@
 /* index */
 scroll-view ::-webkit-scrollbar {
-	display:none;
-	width:0;
-	height:0;
-	color:transparent;
+	display: none;
+	width: 0;
+	height: 0;
+	color: transparent;
 }
 
-page{
-  height: 100%;
-  background: #F5F5F5;
+page {
+	height: 100%;
+	background: #F5F5F5;
 }
 
-.head-bg{
-  width: 100%;
-  height:375rpx;
-  background-size: 100% 100%;
+.head-bg {
+	width: 100%;
+	height: 375rpx;
+	background-size: 100% 100%;
 }
 
-.navTitle{
+.navTitle {
 	width: 100%;
 	height: 160rpx;
 	display: flex;
 	align-items: center;
-  }
-  .navTitle t-icon{
-    margin-top: 15rpx;
-	  width: 48rpx; 
-	  color: #fff;
-  }
-  .navTitle .title{
-    margin-top: 15rpx;
-    width: 100%;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-	  font-size: 38rpx;
-	  font-family: PingFang SC;
-	  color: #FFFFFF;
-  }
-
-.tab{
-  margin-top: 12rpx;
-  padding-left: 20rpx;
-  padding-right: 20rpx;
-  height: 100rpx;
-  display: flex;
-  justify-content: space-between;
-}
-
-.tab-item{
-  font-size: 35rpx;
-  text-align: center;
-  line-height: 80rpx;
-  height: 80rpx;
-  border-bottom: 6rpx solid #F5F5F5 ;
-  display: flex;
-  justify-content: center;
-  flex-direction: row;
-}
-
-.tab-item.active{
-  color: #508FF4;
-  font-weight: bold;
-  border-bottom: 7rpx solid #508FF4;
+}
+
+.navTitle t-icon {
+	margin-top: 15rpx;
+	width: 48rpx;
+	color: #fff;
+}
+
+.navTitle .title {
+	margin-top: 15rpx;
+	width: 100%;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	font-size: 38rpx;
+	font-family: PingFang SC;
+	color: #FFFFFF;
+}
+
+.tab {
+	margin-top: 12rpx;
+	padding-left: 20rpx;
+	padding-right: 20rpx;
+	height: 100rpx;
+	display: flex;
+	justify-content: space-between;
+}
+
+.tab-item {
+	font-size: 35rpx;
+	text-align: center;
+	line-height: 80rpx;
+	height: 80rpx;
+	border-bottom: 6rpx solid #F5F5F5;
+	display: flex;
+	justify-content: center;
+	flex-direction: row;
+}
+
+.tab-item.active {
+	color: #508FF4;
+	font-weight: bold;
+	border-bottom: 7rpx solid #508FF4;
 }
 
 .swiper-content {
-  height: 64vh;
+	height: 64vh;
 }
 
 .swiper-content swiper {
-  height: 100%;
+	height: 100%;
 }
 
 /* canteen */
 .content {
-  height: 100%;
+	height: 100%;
 }
 
 .content .cont-width {
-  width: 90%;
-  margin: 20rpx auto;
-  margin-bottom: 50rpx;
-  height: 480rpx;
-  background: #fff;
-  border-radius: 20px 20px 10px 10px;
+	width: 90%;
+	margin: 20rpx auto;
+	margin-bottom: 50rpx;
+	height: 480rpx;
+	background: #fff;
+	border-radius: 20px 20px 10px 10px;
 }
 
 .cont-width .cont-bg {
-  height: 62%;
-  width: 100%;
-  border-radius: 20px 20px 0 0;
+	height: 62%;
+	width: 100%;
+	border-radius: 20px 20px 0 0;
 }
 
-.cont-name{
-  margin-top: 20rpx;
-  
+.cont-name {
+	margin-top: 20rpx;
+
 }
 
 .cont-width .cont-name,
 .cont-width .cont-time {
-  font-size: 30rpx;
-  height: 12%;
-  padding: 0 0 0 10rpx;
-  margin-left: 15rpx;
+	font-size: 30rpx;
+	height: 12%;
+	padding: 0 0 0 10rpx;
+	margin-left: 15rpx;
 }
 
 .cont-width .cont-name view {
-  font-size: 30rpx;
-  height: 15%;
-  display: inline-block;
+	font-size: 30rpx;
+	height: 15%;
+	display: inline-block;
 }
 
 .cont-width .cont-name .title {
-  font-size: 30rpx;
-  color: #333333;
-  font-weight: 600;
+	font-size: 34rpx;
+	color: #333333;
+	font-weight: 600;
 }
 
 .cont-width .cont-name .time {
-  margin-left: 30rpx;
-  height: 20rpx;
+	margin-left: 30rpx;
+	height: 20rpx;
 	line-height: 20rpx;
 	font-size: 25rpx;
-  padding: 10rpx 20rpx;
-  text-align: center;
-  color: #508FF4;
-  background: #E8F1FF;
-  border: 2rpx solid #518FF4;
-  border-radius: 20rpx;
+	padding: 10rpx 20rpx;
+	text-align: center;
+	color: #508FF4;
+	background: #E8F1FF;
+	border: 2rpx solid #518FF4;
+	border-radius: 20rpx;
 }
-.cont-width .cont-time span{
-  display: block;
-  float: left;
-  width: 300rpx;
-  color: #666666;
+
+.cont-width .cont-time span {
+	display: block;
+	float: left;
+	width: 300rpx;
+	color: #666666;
 }
 
 
 
 /* notice */
 .notice-content {
-  height: 950rpx;
-  background-size: 100% 100%;
-  /* padding-top: 3.75rem; */
-  padding-bottom: 1.875rem;
-  /* padding-left: 2.5rem; */
-  margin-top: 0.9375rem;
+	height: 950rpx;
+	background-size: 100% 100%;
+	/* padding-top: 3.75rem; */
+	padding-bottom: 1.875rem;
+	/* padding-left: 2.5rem; */
+	margin-top: 0.9375rem;
 }
 
 .notice-content .text {
-  padding-top: 155rpx;
-  padding-bottom: 30rpx;
-  padding-left: 75rpx;
-  margin: 10rpx auto;
-  line-height: 50rpx;
-  width: 80%;
+	padding-top: 155rpx;
+	padding-bottom: 30rpx;
+	padding-left: 75rpx;
+	margin: 10rpx auto;
+	line-height: 50rpx;
+	width: 80%;
 }
 
 .notice-content .text view {
-  font-size: 30rpx;
-  margin-bottom: 10rpx;
+	font-size: 30rpx;
+	margin-bottom: 10rpx;
 }

+ 136 - 96
nngkxxdp/src/main/resources/static/nnzwminiapp/pagesPublic/pages/menu/menu.js

@@ -4,7 +4,8 @@ import {
 } from "../api/request"
 
 import {
-	getMenu, like
+	getMenu,
+	like
 } from "../api/menu-api"
 
 const FormData = require('./formData.js')
@@ -75,35 +76,39 @@ Page({
 		wx.setStorageSync('token', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuaWNrTmFtZSI6Inp3cSIsImlkIjoiMSIsImV4cCI6NjE2NjczNTIyODB9.Q-66k-RipE4Lo2IFOov_YbQcD5CIzkH1O0FW9gYn8Jk')
 		like(params).then(res => {
 			if (res.data.result) {
-				switch(this.data.selectTimeNode) {
+				switch (this.data.selectTimeNode) {
 					case 0: {
 						var canteen = this.data.menuCanteen
 						canteen.breakfastCanteen[parentIndex].list[subIndex].liked = !canteen.breakfastCanteen[parentIndex].list[subIndex].liked
 						this.setData({
 							'menuCanteen': canteen
 						})
-					};break;
-					case 1: {
-						var canteen = this.data.menuCanteen
-						canteen.lunchCanteen[parentIndex].list[subIndex].liked = !canteen.lunchCanteen[parentIndex].list[subIndex].liked
-						this.setData({
-							'menuCanteen': canteen
-						})
-					};break;
-					case 2: {
-						var canteen = this.data.menuCanteen
-						canteen.dinnerCanteen[parentIndex].list[subIndex].liked = !canteen.dinnerCanteen[parentIndex].list[subIndex].liked
-						this.setData({
-							'menuCanteen': canteen
-						})
-					};break;
-					case 3: {
-						var canteen = this.data.menuCanteen
-						canteen.takeoutCanteen[parentIndex].list[subIndex].liked = !canteen.takeoutCanteen[parentIndex].list[subIndex].liked
-						this.setData({
-							'menuCanteen': canteen
-						})
-					};break;
+					};
+					break;
+				case 1: {
+					var canteen = this.data.menuCanteen
+					canteen.lunchCanteen[parentIndex].list[subIndex].liked = !canteen.lunchCanteen[parentIndex].list[subIndex].liked
+					this.setData({
+						'menuCanteen': canteen
+					})
+				};
+				break;
+				case 2: {
+					var canteen = this.data.menuCanteen
+					canteen.dinnerCanteen[parentIndex].list[subIndex].liked = !canteen.dinnerCanteen[parentIndex].list[subIndex].liked
+					this.setData({
+						'menuCanteen': canteen
+					})
+				};
+				break;
+				case 3: {
+					var canteen = this.data.menuCanteen
+					canteen.takeoutCanteen[parentIndex].list[subIndex].liked = !canteen.takeoutCanteen[parentIndex].list[subIndex].liked
+					this.setData({
+						'menuCanteen': canteen
+					})
+				};
+				break;
 				}
 			}
 		})
@@ -303,7 +308,7 @@ Page({
 			'canteenId': this.data.canteenId
 		}
 		getMenu(params).then(res => {
-			if (!(res.data.data&&res.data.data.length != 0)) {
+			if (!(res.data.data && res.data.data.length != 0)) {
 				this.setData({
 					'menuCanteen': {
 						'breakfastCanteen': [],
@@ -323,7 +328,7 @@ Page({
 			var lunch = []
 			var dinner = []
 			var takeout = []
-			for(var i = 0;i<menuList.length;i++) {
+			for (var i = 0; i < menuList.length; i++) {
 				if (menuList[i].timeName == '早餐') {
 					breakfast = menuList[i].foods
 				}
@@ -338,82 +343,117 @@ Page({
 				}
 			}
 			var breakfastCanteen = []
-				var lunchCanteen = []
-				var dinnerCanteen = []
-				var takeoutCanteen = []
-				for (var j = 0;j<breakfast.length;j++) {
-					var index = -1;
-					if (breakfastCanteen.length != 0) {
-						index = breakfastCanteen.findIndex((item)=>item.type == breakfast[j].typeName)
-					}
-					if (index == -1) {
-						var tmpList = []
-						tmpList.push(breakfast[j])
-						breakfastCanteen.push({
-							'type': breakfast[j].typeName,
-							'list': tmpList
-						})
-					} else {
-						breakfastCanteen[index].list.push(breakfast[j])
-					}
+			var lunchCanteen = []
+			var dinnerCanteen = []
+			var takeoutCanteen = []
+			for (var j = 0; j < breakfast.length; j++) {
+				var index = -1;
+				if (breakfastCanteen.length != 0) {
+					index = breakfastCanteen.findIndex((item) => item.type == breakfast[j].typeName)
 				}
-				for (var j = 0;j<lunch.length;j++) {
-					var index = -1;
-					if (lunchCanteen.length != 0) {
-						index = lunchCanteen.findIndex((item)=>item.type == lunch[j].typeName)
-					}
-					if (index == -1) {
-						var tmpList = []
-						tmpList.push(lunch[j])
-						lunchCanteen.push({
-							'type': lunch[j].typeName,
-							'list': tmpList
-						})
-					} else {
-						lunchCanteen[index].list.push(lunch[j])
-					}
+				if (index == -1) {
+					var tmpList = []
+					tmpList.push(breakfast[j])
+					breakfastCanteen.push({
+						'type': breakfast[j].typeName,
+						'list': tmpList
+					})
+				} else {
+					breakfastCanteen[index].list.push(breakfast[j])
 				}
-				for (var j = 0;j<dinner.length;j++) {
-					var index = -1;
-					if (dinnerCanteen.length != 0) {
-						index = dinnerCanteen.findIndex((item)=>item.type == dinner[j].typeName)
-					}
-					if (index == -1) {
-						var tmpList = []
-						tmpList.push(dinner[j])
-						dinnerCanteen.push({
-							'type': dinner[j].typeName,
-							'list': tmpList
-						})
-					} else {
-						dinnerCanteen[index].list.push(dinner[j])
-					}
+			}
+			for (var j = 0; j < lunch.length; j++) {
+				var index = -1;
+				if (lunchCanteen.length != 0) {
+					index = lunchCanteen.findIndex((item) => item.type == lunch[j].typeName)
 				}
-				for (var j = 0;j<takeout.length;j++) {
-					var index = -1;
-					if (takeoutCanteen.length != 0) {
-						index = takeoutCanteen.findIndex((item)=>item.type == takeout[j].typeName)
-					}
-					if (index == -1) {
-						var tmpList = []
-						tmpList.push(takeout[j])
-						takeoutCanteen.push({
-							'type': takeout[j].typeName,
-							'list': tmpList
-						})
-					} else {
-						takeoutCanteen[index].list.push(takeout[j])
-					}
+				if (index == -1) {
+					var tmpList = []
+					tmpList.push(lunch[j])
+					lunchCanteen.push({
+						'type': lunch[j].typeName,
+						'list': tmpList
+					})
+				} else {
+					lunchCanteen[index].list.push(lunch[j])
+				}
+			}
+			for (var j = 0; j < dinner.length; j++) {
+				var index = -1;
+				if (dinnerCanteen.length != 0) {
+					index = dinnerCanteen.findIndex((item) => item.type == dinner[j].typeName)
+				}
+				if (index == -1) {
+					var tmpList = []
+					tmpList.push(dinner[j])
+					dinnerCanteen.push({
+						'type': dinner[j].typeName,
+						'list': tmpList
+					})
+				} else {
+					dinnerCanteen[index].list.push(dinner[j])
+				}
+			}
+			for (var j = 0; j < takeout.length; j++) {
+				var index = -1;
+				if (takeoutCanteen.length != 0) {
+					index = takeoutCanteen.findIndex((item) => item.type == takeout[j].typeName)
+				}
+				if (index == -1) {
+					var tmpList = []
+					tmpList.push(takeout[j])
+					takeoutCanteen.push({
+						'type': takeout[j].typeName,
+						'list': tmpList
+					})
+				} else {
+					takeoutCanteen[index].list.push(takeout[j])
+				}
+			}
+			this.setData({
+				'menuCanteen': {
+					'breakfastCanteen': breakfastCanteen,
+					'lunchCanteen': lunchCanteen,
+					'dinnerCanteen': dinnerCanteen,
+					'takeoutCanteen': takeoutCanteen
 				}
+			})
+		})
+	},
+	gotoComment(e) {
+		console.log(e);
+		wx.navigateTo({
+			url: '/pages/commentList/commentList?dishesId=' + e.currentTarget.dataset.id + '&canteenId=' + this.data.canteenId
+		})
+	},
+	imageError(e) {
+		let temp = this.data.menuCanteen;
+		switch (e.currentTarget.dataset.name) {
+			case "breakfastCanteen":
+				temp.breakfastCanteen[e.currentTarget.dataset.index].list[e.currentTarget.dataset.subindex].imgurl = '';
 				this.setData({
-					'menuCanteen': {
-						'breakfastCanteen': breakfastCanteen,
-						'lunchCanteen': lunchCanteen,
-						'dinnerCanteen': dinnerCanteen,
-						'takeoutCanteen': takeoutCanteen
-					}
+					menuCanteen: temp
 				})
-		})
+				break;
+			case "lunchCanteen":
+				temp.lunchCanteen[e.currentTarget.dataset.index].list[e.currentTarget.dataset.subindex].imgurl = '';
+				this.setData({
+					menuCanteen: temp
+				})
+				break;
+			case "dinnerCanteen":
+				temp.dinnerCanteen[e.currentTarget.dataset.index].list[e.currentTarget.dataset.subindex].imgurl = '';
+				this.setData({
+					menuCanteen: temp
+				})
+				break;
+			case "takeoutCanteen":
+				temp.takeoutCanteen[e.currentTarget.dataset.index].list[e.currentTarget.dataset.subindex].imgurl = '';
+				this.setData({
+					menuCanteen: temp
+				})
+				break;
+		}
 	},
 
 	/**

+ 228 - 228
nngkxxdp/src/main/resources/static/nnzwminiapp/pagesPublic/pages/menu/menu.wxml

@@ -1,233 +1,233 @@
 <wxs module="filter" src="./util.wxs"></wxs>
 <view>
-  <!-- 头部 -->
-  <view class="head-bg">
-    <image style="width:100%;height:100%" mode="scaleToFill" src="{{imgUrl}}index_bg.png"></image>
-  </view>
-  <!-- 弹窗 -->
-  <view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>
-  <view class="evaluate" wx:if="{{showModal}}">
-    <view class="conment-release">
-      <view class="title">
-        <image src="{{baseUrl + '/' + dishesDetails.imgurl}}" alt="" class="image"></image>
-        <view class="contl">{{dishesDetails.dishesName}}</view>
-      </view>
-      <view class="score">
-        <view style="font-weight: 600;">评分:</view>
-        <view>
-          <image style="width: 30rpx;height: 30rpx;margin: 0 5rpx;" wx:for="{{starsList}}" wx:key="index" bindtap="chooseStars" data-index="{{index}}" src="{{item}}" alt="" />
-        </view>
-      </view>
-      <view class="message">
-        <view style="font-weight: 600;">评论:</view>
-        <textarea bindinput='blurEvaluation' cols="30" rows="10" placeholder="说说菜品亮点和不足吧(不少于10字)"></textarea>
-      </view>
-      <view class="upload">
-        <view style="position: relative;width: 120rpx;" wx:for="{{imgList}}" wx:key="index">
-          <image style="width: 80rpx;height: 80rpx;" src="{{item}}" alt="" />
-          <view class="uploadDelete" bindtap="deleteFile" data-index="{{index}}">X</view>
-        </view>
-        <view wx:if="{{imgList.length < 4}}" class="photo" bindtap="choosePhoto">
-          <image style="width: 40rpx;height: 35rpx;" src="{{imgUrl}}photo.png" alt=""></image>
-          <p style="margin-top: 4rpx;font-size: 20rpx;">上传照片</p>
-        </view>
-      </view>
-      <view class="release">
-        <view bindtap="postComment">发布</view>
-      </view>
-    </view>
-    <image src="{{imgUrl}}close.png" bindtap="closeItem" class="close"></image>
-    <!-- <button bindtap="closeItem">点我可以关掉对话框</button> -->
-  </view>
-  <!-- 弹窗结尾 -->
-  <!-- content -->
-  <view style="position: relative;width: 100%;">
-    <view class="content" style="position: absolute;width: 100%;top: -20rpx;">
-      <!-- title -->
-      <view class="title">
-        <view style="font-size: 38rpx;">食堂菜单</view>
-        <view style="height:100%;display: flex;align-items: center;justify-content: center;">
-          <image style="width:45rpx;height:45rpx;padding-right:5rpx;" mode="aspectFit" src="{{imgUrl}}feedback.png">
-          </image>
-          <view style="font-size: 27rpx;font-weight: 500;color: #222222;">反馈</view>
-        </view>
-      </view>
-      <!-- 日期 -->
-      <view class="years">{{dateStr.startWeek == dateStr.endWeek?dateStr.startWeek:dateStr.startWeek + "-" + dateStr.endWeek}}</view>
-      <view class="week">
-        <view>一</view>
-        <view>二</view>
-        <view>三</view>
-        <view>四</view>
-        <view>五</view>
-        <view style="color: #aaaaaa;">六</view>
-        <view style="color: #aaaaaa;">七</view>
-      </view>
-      <view class="date">
-        <view wx:for="{{dateStr.weekList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="{{dateSelectIndex == index?'click':''}}" bindtap="selectDate" data-item="{{index}}" style="font-size: 32rpx;height: 50rpx;width: 50rpx;display: flex;align-items: center;justify-content: center;border-radius: 4rpx;{{index >= 5 && dateSelectIndex != index?'color:#aaaaaa':'' }}">{{filter.getDate(item)}}
-        </view>
-      </view>
-      <!-- tip -->
-      <view>
-        <view style="background-image: url({{imgUrl}}tips.png);margin-bottom: 30rpx;" class="tips">小贴士:请在当天11点后查看菜品!</view>
-      </view>
-      <!-- 菜单 -->
-      <view class="variety">
-        <!-- 左侧时间 -->
-        <view class="time-solt">
-          <view class="taps-title">
-            <view class="{{selectTimeNode==0 ? 'click time-node' : 'time-node'}}" bindtap="tapTimeNode" data-item="{{0}}">
-              <image style="height:45rpx;width:45rpx;" src="{{imgUrl}}breakfast.png" mode="aspectFit"></image>
-              <view style="padding-left:10rpx">早餐</view>
-            </view>
-            <view class="{{selectTimeNode==1 ? 'click time-node' : 'time-node'}}" bindtap="tapTimeNode" data-item="{{1}}">
-              <image style="height:45rpx;width:45rpx;" src="{{imgUrl}}lunch.png" mode="aspectFit"></image>
-              <view style="padding-left:10rpx">中餐</view>
-            </view>
-            <view class="{{selectTimeNode==2 ? 'click time-node' : 'time-node'}}" bindtap="tapTimeNode" data-item="{{2}}">
-              <image style="height:45rpx;width:45rpx;" src="{{imgUrl}}lunch.png" mode="aspectFit"></image>
-              <view style="padding-left:10rpx">晚餐</view>
-            </view>
-            <view class="{{selectTimeNode==3 ? 'click takeout-all' : 'takeout-all'}}" bindtap="tapTimeNode" data-item="{{3}}">
-              <view class="takeout">
-                <image style="height:45rpx;width:45rpx;" src="{{imgUrl}}take_out.png" mode="aspectFit"></image>
-                <view style="padding-left:10rpx">外卖预告</view>
-              </view>
-              <view class="sale-time">
-                <view>售卖时间</view>
-                <view>{{filter.getTakeoutTime(menuOrigin)}}</view>
-                <!-- <view>节日前一天:15:30</view> -->
-              </view>
-            </view>
-          </view>
-          <!-- taps-title结尾 -->
-        </view>
-        <!-- 左侧时间结尾 -->
-        <!-- 菜品 -->
-        <view class="food-all">
-          <!-- 早餐 -->
-          <view class="food-type" wx:if="{{selectTimeNode==0}}">
-            <!-- 菜品分类 -->
-            <view wx:for="{{menuCanteen.breakfastCanteen}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="food-width">
-              <view class="food-title">{{item.type}}</view>
-              <view class="food-type">
-                <!-- 1 -->
-                <view wx:for="{{item.list}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex" class="food-item">
-                  <image src="{{baseUrl + '/' + subItem.imgurl}}" alt="" class="image"></image>
-                  <view class="cont">
-                    <p>{{subItem.dishesName}}</p>
-                    <view class="comment">
-                      <view bindtap="openItem" data-item="{{subItem}}" id="comentBtn">
-                        <image src="{{imgUrl}}discuss.png" alt=""></image>
-                        <view class="comment-word">评论</view>
-                      </view>
-                      <view id="fabulousBtn" bindtap="clickLike" data-parent="{{index}}" data-index="{{subIndex}}" data-item="{{subItem}}">
-                        <image src="{{subItem.liked==1?imgUrl+'thumb2.png':imgUrl+'thumb.png'}}" alt=""></image>
-                        <view class="comment-word">点赞</view>
-                      </view>
-                    </view>
-                  </view>
-                </view>
-                <!-- 1 -->
-              </view>
-            </view>
-            <!-- 菜品分类结尾 -->
-          </view>
-          <!-- 早餐结尾 -->
-          <!-- 中餐 -->
-          <view class="food-type" wx:if="{{selectTimeNode==1}}">
-            <!-- 菜品分类 -->
-            <view wx:for="{{menuCanteen.lunchCanteen}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="food-width">
-              <view class="food-title">{{item.type}}</view>
-              <view class="food-type">
-                <!-- 1 -->
-                <view wx:for="{{item.list}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex" class="food-item">
-                  <image src="{{baseUrl + '/' + subItem.imgurl}}" alt="" class="image"></image>
-                  <view class="cont">
-                    <p>{{subItem.dishesName}}</p>
-                    <view class="comment">
-                      <view id="comentBtn">
-                        <image src="{{imgUrl}}discuss.png" alt=""></image>
-                        <view bindtap="openItem" data-item="{{subItem}}" class="comment-word">评论</view>
-                      </view>
-                      <view id="fabulousBtn">
-                        <image src="{{subItem.liked==1?imgUrl+'thumb2.png':imgUrl+'thumb.png'}}" alt=""></image>
-                        <view bindtap="clickLike" data-parent="{{index}}" data-index="{{subIndex}}" data-item="{{subItem}}" class="comment-word">点赞</view>
-                      </view>
-                    </view>
-                  </view>
-                </view>
-                <!-- 1 -->
-              </view>
-            </view>
-            <!-- 菜品分类结尾 -->
-          </view>
-          <!-- 中餐结尾 -->
-          <!-- 晚餐 -->
-          <view class="food-type" wx:if="{{selectTimeNode==2}}">
-            <!-- 菜品分类 -->
-            <view wx:for="{{menuCanteen.dinnerCanteen}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="food-width">
-              <view class="food-title">{{item.type}}</view>
-              <view class="food-type">
-                <!-- 1 -->
-                <view wx:for="{{item.list}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex" class="food-item">
-                  <image src="{{baseUrl + '/' + subItem.imgurl}}" alt="" class="image"></image>
-                  <view class="cont">
-                    <p>{{subItem.dishesName}}</p>
-                    <view class="comment">
-                      <view id="comentBtn">
-                        <image src="{{imgUrl}}discuss.png" alt=""></image>
-                        <view bindtap="openItem" data-item="{{subItem}}" class="comment-word">评论</view>
-                      </view>
-                      <view id="fabulousBtn">
-                        <image src="{{subItem.liked==1?imgUrl+'thumb2.png':imgUrl+'thumb.png'}}" alt=""></image>
-                        <view bindtap="clickLike" data-parent="{{index}}" data-index="{{subIndex}}" data-item="{{subItem}}" class="comment-word">点赞</view>
-                      </view>
-                    </view>
-                  </view>
-                </view>
-                <!-- 1 -->
-              </view>
-            </view>
-            <!-- 菜品分类结尾 -->
-          </view>
-          <!-- 晚餐结尾 -->
-          <!-- 外卖 -->
-          <view class="food-type" wx:if="{{selectTimeNode==3}}">
-            <!-- 菜品分类 -->
-            <view wx:for="{{menuCanteen.takeoutCanteen}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="food-width">
-              <view class="food-title">{{item.type}}</view>
-              <view class="food-type">
-                <!-- 1 -->
-                <view wx:for="{{item.list}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex" class="food-item">
-                  <image src="{{baseUrl + '/' + subItem.imgurl}}" alt="" class="image"></image>
-                  <view class="cont">
-                    <p>{{subItem.dishesName}}</p>
-                    <view class="comment">
-                      <view id="comentBtn">
-                        <image src="{{imgUrl}}discuss.png" alt=""></image>
-                        <view bindtap="openItem" data-item="{{subItem}}" class="comment-word">评论</view>
-                      </view>
-                      <view id="fabulousBtn">
-                        <image src="{{subItem.liked==1?imgUrl+'thumb2.png':imgUrl+'thumb.png'}}" alt=""></image>
-                        <view bindtap="clickLike" data-parent="{{index}}" data-index="{{subIndex}}" data-item="{{subItem}}" class="comment-word">点赞</view>
-                      </view>
-                    </view>
-                  </view>
-                </view>
-                <!-- 1 -->
-              </view>
-            </view>
-            <!-- 菜品分类结尾 -->
-          </view>
-          <!-- 外卖结尾 -->
-        </view>
-        <!-- 菜品结尾 -->
-      </view>
-      <!-- 菜单结尾 -->
-    </view>
-    <!-- content结尾 -->
-  </view>
+	<!-- 头部 -->
+	<view class="head-bg">
+		<image style="width:100%;height:100%" mode="scaleToFill" src="{{imgUrl}}index_bg.png"></image>
+	</view>
+	<!-- 弹窗 -->
+	<view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>
+	<view class="evaluate" wx:if="{{showModal}}">
+		<view class="conment-release">
+			<view class="title">
+				<image src="{{baseUrl + '/' + dishesDetails.imgurl}}" alt="" class="image"></image>
+				<view class="contl">{{dishesDetails.dishesName}}</view>
+			</view>
+			<view class="score">
+				<view style="font-weight: 600;">评分:</view>
+				<view>
+					<image style="width: 30rpx;height: 30rpx;margin: 0 5rpx;" wx:for="{{starsList}}" wx:key="index" bindtap="chooseStars" data-index="{{index}}" src="{{item}}" alt="" />
+				</view>
+			</view>
+			<view class="message">
+				<view style="font-weight: 600;">评论:</view>
+				<textarea bindinput='blurEvaluation' cols="30" rows="10" placeholder="说说菜品亮点和不足吧(不少于10字)"></textarea>
+			</view>
+			<view class="upload">
+				<view style="position: relative;width: 120rpx;" wx:for="{{imgList}}" wx:key="index">
+					<image style="width: 80rpx;height: 80rpx;" src="{{item}}" alt="" />
+					<view class="uploadDelete" bindtap="deleteFile" data-index="{{index}}">X</view>
+				</view>
+				<view wx:if="{{imgList.length < 4}}" class="photo" bindtap="choosePhoto">
+					<image style="width: 40rpx;height: 35rpx;" src="{{imgUrl}}photo.png" alt=""></image>
+					<p style="margin-top: 4rpx;font-size: 20rpx;">上传照片</p>
+				</view>
+			</view>
+			<view class="release">
+				<view bindtap="postComment">发布</view>
+			</view>
+		</view>
+		<image src="{{imgUrl}}close.png" bindtap="closeItem" class="close"></image>
+		<!-- <button bindtap="closeItem">点我可以关掉对话框</button> -->
+	</view>
+	<!-- 弹窗结尾 -->
+	<!-- content -->
+	<view style="position: relative;width: 100%;">
+		<view class="content" style="position: absolute;width: 100%;top: -20rpx;">
+			<!-- title -->
+			<view class="title">
+				<view style="font-size: 38rpx;">食堂菜单</view>
+				<view style="height:100%;display: flex;align-items: center;justify-content: center;">
+					<image style="width:45rpx;height:45rpx;padding-right:5rpx;" mode="aspectFit" src="{{imgUrl}}feedback.png">
+					</image>
+					<view style="font-size: 27rpx;font-weight: 500;color: #222222;">反馈</view>
+				</view>
+			</view>
+			<!-- 日期 -->
+			<view class="years">{{dateStr.startWeek == dateStr.endWeek?dateStr.startWeek:dateStr.startWeek + "-" + dateStr.endWeek}}</view>
+			<view class="week">
+				<view>一</view>
+				<view>二</view>
+				<view>三</view>
+				<view>四</view>
+				<view>五</view>
+				<view style="color: #aaaaaa;">六</view>
+				<view style="color: #aaaaaa;">七</view>
+			</view>
+			<view class="date">
+				<view wx:for="{{dateStr.weekList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="{{dateSelectIndex == index?'click':''}}" bindtap="selectDate" data-item="{{index}}" style="font-size: 32rpx;height: 50rpx;width: 50rpx;display: flex;align-items: center;justify-content: center;border-radius: 4rpx;{{index >= 5 && dateSelectIndex != index?'color:#aaaaaa':'' }}">{{filter.getDate(item)}}
+				</view>
+			</view>
+			<!-- tip -->
+			<view>
+				<view style="background-image: url({{imgUrl}}tips.png);margin-bottom: 30rpx;" class="tips">小贴士:请在当天11点后查看菜品!</view>
+			</view>
+			<!-- 菜单 -->
+			<view class="variety">
+				<!-- 左侧时间 -->
+				<view class="time-solt">
+					<view class="taps-title">
+						<view class="{{selectTimeNode==0 ? 'click time-node' : 'time-node'}}" bindtap="tapTimeNode" data-item="{{0}}">
+							<image style="height:45rpx;width:45rpx;" src="{{imgUrl}}breakfast.png" mode="aspectFit"></image>
+							<view style="padding-left:10rpx">早餐</view>
+						</view>
+						<view class="{{selectTimeNode==1 ? 'click time-node' : 'time-node'}}" bindtap="tapTimeNode" data-item="{{1}}">
+							<image style="height:45rpx;width:45rpx;" src="{{imgUrl}}lunch.png" mode="aspectFit"></image>
+							<view style="padding-left:10rpx">中餐</view>
+						</view>
+						<view class="{{selectTimeNode==2 ? 'click time-node' : 'time-node'}}" bindtap="tapTimeNode" data-item="{{2}}">
+							<image style="height:45rpx;width:45rpx;" src="{{imgUrl}}lunch.png" mode="aspectFit"></image>
+							<view style="padding-left:10rpx">晚餐</view>
+						</view>
+						<view class="{{selectTimeNode==3 ? 'click takeout-all' : 'takeout-all'}}" bindtap="tapTimeNode" data-item="{{3}}">
+							<view class="takeout">
+								<image style="height:45rpx;width:45rpx;" src="{{imgUrl}}take_out.png" mode="aspectFit"></image>
+								<view style="padding-left:10rpx">外卖预告</view>
+							</view>
+							<view class="sale-time">
+								<view>售卖时间</view>
+								<view>{{filter.getTakeoutTime(menuOrigin)}}</view>
+								<!-- <view>节日前一天:15:30</view> -->
+							</view>
+						</view>
+					</view>
+					<!-- taps-title结尾 -->
+				</view>
+				<!-- 左侧时间结尾 -->
+				<!-- 菜品 -->
+				<view class="food-all">
+					<!-- 早餐 -->
+					<view class="food-type" wx:if="{{selectTimeNode==0}}">
+						<!-- 菜品分类 -->
+						<view wx:for="{{menuCanteen.breakfastCanteen}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="food-width">
+							<view class="food-title">{{item.type}}</view>
+							<view class="food-type">
+								<!-- 1 -->
+								<view wx:for="{{item.list}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex" class="food-item">
+									<image bindtap="gotoComment" data-id="{{subItem.id}}" src="{{subItem.imgurl ? baseUrl + '/' + subItem.imgurl : imgUrl + 'empty-dish-pic.png'}}" binderror="imageError" data-name="breakfastCanteen" data-index="{{index}}" data-subIndex="{{subIndex}}" alt="" class="image"></image>
+									<view class="cont">
+										<p>{{subItem.dishesName}}</p>
+										<view class="comment">
+											<view bindtap="openItem" data-item="{{subItem}}" id="comentBtn">
+												<image src="{{imgUrl}}discuss.png" alt=""></image>
+												<view class="comment-word">评论</view>
+											</view>
+											<view id="fabulousBtn" bindtap="clickLike" data-parent="{{index}}" data-index="{{subIndex}}" data-item="{{subItem}}">
+												<image src="{{subItem.liked==1?imgUrl+'thumb2.png':imgUrl+'thumb.png'}}" alt=""></image>
+												<view class="comment-word">点赞</view>
+											</view>
+										</view>
+									</view>
+								</view>
+								<!-- 1 -->
+							</view>
+						</view>
+						<!-- 菜品分类结尾 -->
+					</view>
+					<!-- 早餐结尾 -->
+					<!-- 中餐 -->
+					<view class="food-type" wx:if="{{selectTimeNode==1}}">
+						<!-- 菜品分类 -->
+						<view wx:for="{{menuCanteen.lunchCanteen}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="food-width">
+							<view class="food-title">{{item.type}}</view>
+							<view class="food-type">
+								<!-- 1 -->
+								<view wx:for="{{item.list}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex" class="food-item">
+									<image bindtap="gotoComment" data-id="{{subItem.id}}" src="{{subItem.imgurl ? baseUrl + '/' + subItem.imgurl : imgUrl + 'empty-dish-pic.png'}}" binderror="imageError" data-name="lunchCanteen" data-index="{{index}}" data-subIndex="{{subIndex}}" class="image" />
+									<view class="cont">
+										<p>{{subItem.dishesName}}</p>
+										<view class="comment">
+											<view id="comentBtn">
+												<image src="{{imgUrl}}discuss.png" alt=""></image>
+												<view bindtap="openItem" data-item="{{subItem}}" class="comment-word">评论</view>
+											</view>
+											<view id="fabulousBtn">
+												<image src="{{subItem.liked==1?imgUrl+'thumb2.png':imgUrl+'thumb.png'}}" alt=""></image>
+												<view bindtap="clickLike" data-parent="{{index}}" data-index="{{subIndex}}" data-item="{{subItem}}" class="comment-word">点赞</view>
+											</view>
+										</view>
+									</view>
+								</view>
+								<!-- 1 -->
+							</view>
+						</view>
+						<!-- 菜品分类结尾 -->
+					</view>
+					<!-- 中餐结尾 -->
+					<!-- 晚餐 -->
+					<view class="food-type" wx:if="{{selectTimeNode==2}}">
+						<!-- 菜品分类 -->
+						<view wx:for="{{menuCanteen.dinnerCanteen}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="food-width">
+							<view class="food-title">{{item.type}}</view>
+							<view class="food-type">
+								<!-- 1 -->
+								<view wx:for="{{item.list}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex" class="food-item">
+									<image bindtap="gotoComment" data-id="{{subItem.id}}" src="{{subItem.imgurl ? baseUrl + '/' + subItem.imgurl : imgUrl + 'empty-dish-pic.png'}}" binderror="imageError" data-name="dinnerCanteen" data-index="{{index}}" data-subIndex="{{subIndex}}" alt="" class="image" />
+									<view class="cont">
+										<p>{{subItem.dishesName}}</p>
+										<view class="comment">
+											<view id="comentBtn">
+												<image src="{{imgUrl}}discuss.png" alt=""></image>
+												<view bindtap="openItem" data-item="{{subItem}}" class="comment-word">评论</view>
+											</view>
+											<view id="fabulousBtn">
+												<image src="{{subItem.liked==1?imgUrl+'thumb2.png':imgUrl+'thumb.png'}}" alt=""></image>
+												<view bindtap="clickLike" data-parent="{{index}}" data-index="{{subIndex}}" data-item="{{subItem}}" class="comment-word">点赞</view>
+											</view>
+										</view>
+									</view>
+								</view>
+								<!-- 1 -->
+							</view>
+						</view>
+						<!-- 菜品分类结尾 -->
+					</view>
+					<!-- 晚餐结尾 -->
+					<!-- 外卖 -->
+					<view class="food-type" wx:if="{{selectTimeNode==3}}">
+						<!-- 菜品分类 -->
+						<view wx:for="{{menuCanteen.takeoutCanteen}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="food-width">
+							<view class="food-title">{{item.type}}</view>
+							<view class="food-type">
+								<!-- 1 -->
+								<view wx:for="{{item.list}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex" class="food-item">
+									<image bindtap="gotoComment" data-id="{{subItem.id}}" src="{{subItem.imgurl ? baseUrl + '/' + subItem.imgurl : imgUrl + 'empty-dish-pic.png'}}" binderror="imageError" data-name="takeoutCanteen" data-index="{{index}}" data-subIndex="{{subIndex}}" alt="" class="image" />
+									<view class="cont">
+										<p>{{subItem.dishesName}}</p>
+										<view class="comment">
+											<view id="comentBtn">
+												<image src="{{imgUrl}}discuss.png" alt=""></image>
+												<view bindtap="openItem" data-item="{{subItem}}" class="comment-word">评论</view>
+											</view>
+											<view id="fabulousBtn">
+												<image src="{{subItem.liked==1?imgUrl+'thumb2.png':imgUrl+'thumb.png'}}" alt=""></image>
+												<view bindtap="clickLike" data-parent="{{index}}" data-index="{{subIndex}}" data-item="{{subItem}}" class="comment-word">点赞</view>
+											</view>
+										</view>
+									</view>
+								</view>
+								<!-- 1 -->
+							</view>
+						</view>
+						<!-- 菜品分类结尾 -->
+					</view>
+					<!-- 外卖结尾 -->
+				</view>
+				<!-- 菜品结尾 -->
+			</view>
+			<!-- 菜单结尾 -->
+		</view>
+		<!-- content结尾 -->
+	</view>
 
 
 

+ 29 - 21
nngkxxdp/src/main/resources/static/nnzwminiapp/pagesPublic/pages/menu/menu.wxss

@@ -15,8 +15,8 @@
 }
 
 .content .title {
-  margin-top: 35rpx;
-  margin-bottom: 15rpx;
+	margin-top: 35rpx;
+	margin-bottom: 15rpx;
 	display: flex;
 	justify-content: space-between;
 	padding: 5rpx 2.5%;
@@ -40,16 +40,17 @@
 .content .week,
 .content .date {
 	width: 95%;
-  height: 60rpx;
-  align-items: center;
+	height: 60rpx;
+	align-items: center;
 	margin: 20rpx auto;
 	margin-bottom: 10rpx;
 	color: #333;
 	display: flex;
 	justify-content: space-around;
 }
+
 .content .week view {
-  font-size: 32rpx;
+	font-size: 32rpx;
 }
 
 
@@ -146,7 +147,7 @@
 }
 
 .conment-release .title .contl {
-  font-weight: 600;
+	font-weight: 600;
 	width: 70%;
 	display: flex;
 	flex-direction: column;
@@ -156,7 +157,8 @@
 	letter-spacing: 2rpx;
 	color: #333;
 }
-.contl{
+
+.contl {
 	font-size: 36rpx;
 }
 
@@ -168,7 +170,7 @@
 }
 
 .conment-release .message {
-  margin-top: 20rpx;
+	margin-top: 20rpx;
 	display: flex;
 	height: 190rpx;
 }
@@ -191,8 +193,8 @@
 }
 
 .conment-release .upload {
-  align-items: center;
-  justify-content: center;
+	align-items: center;
+	justify-content: center;
 	margin-top: 10rpx;
 	display: flex;
 }
@@ -219,11 +221,11 @@
 	background-color: rgba(0, 0, 0, 0.548);
 	top: -10rpx;
 	right: -20rpx;
-	width: 20rpx!important;
-	height: 20rpx!important;
+	width: 20rpx !important;
+	height: 20rpx !important;
 	color: white;
 	font-size: 15rpx;
-	border-radius: 50%!important;
+	border-radius: 50% !important;
 }
 
 .conment-release .upload view p {
@@ -238,9 +240,9 @@
 }
 
 .conment-release .release view {
-  display: flex;
-  align-items: center;
-  justify-content: center;
+	display: flex;
+	align-items: center;
+	justify-content: center;
 	height: 80rpx;
 	width: 180rpx;
 	font-size: 27rpx;
@@ -260,7 +262,7 @@
 .content .variety .time-solt {
 	width: 32%;
 	/* background: #EFEFEF; */
-	background: #fff
+	background: #F7F8F8;
 }
 
 .content .variety .time-solt .time-node {
@@ -278,19 +280,25 @@
 }
 
 .content .variety .time-solt .time-node.click {
-	background: #eee;
-	/* font-style: italic; */
+	/* background: #eee; */
+	background: #fff;
+	font-weight: 600;
+	font-style: italic;
 }
 
 .content .variety .time-solt .takeout-all.click {
-	background: #eee;
-	/* font-style: italic; */
+	/* background: #eee; */
+	background: #fff;
+	font-weight: 600;
+	font-style: italic;
 }
 
 .content .variety .time-solt .sale-time {
 	margin-left: 20rpx;
 	color: #666;
 	font-size: 25rpx;
+	font-style: normal !important;
+	font-weight: 500 !important;
 }
 
 .content .variety .time-solt .sale-time view {