Browse Source

小程序食堂菜单进入展示当天菜单,印象南岸样式

zwq 2 years ago
parent
commit
aa3eeb31f7

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

@@ -277,6 +277,9 @@ Page({
 		var nowMonth = now.getMonth(); //当前月
 		var nowDay = now.getDate(); //当前日
 		var nowDayOfWeek = now.getDay(); //今天是本周的第几天
+		this.setData({
+			dateSelectIndex: nowDayOfWeek - 1
+		})
 		var startWeek = this.formatDate(new Date(nowYear, nowMonth, nowDay - nowDayOfWeek + 1));
 		var endWeek = this.formatDate(new Date(nowYear, nowMonth, nowDay + (6 - nowDayOfWeek + 1)));
 		var nowDate = this.formatDate(now)
@@ -467,9 +470,6 @@ Page({
 	onLoad: function (options) {
 		this.initDate()
 		this.setData({
-			dateSelectIndex: 0
-		})
-		this.setData({
 			'canteenId': options.canteenId,
 			canteenName: options.canteenName
 		})

+ 1 - 1
nngkxxdp/src/main/resources/static/nnzwminiapp/pagesPublic/pages/yxnaJfh/yxnaJfh.wxml

@@ -22,7 +22,7 @@
 			<view style="width: 30rpx;height: 30rpx;top: 46rpx;left: 526rpx;background: #9CE7DB;border-radius: 50%;position: absolute;" bindtap="toXsj"></view>
 			<view class="title" style="width: 191rpx;top: -85rpx;left: 535rpx;" bindtap="toQxn">新世纪-千禧年</view>
 			<view style="width: 30rpx;height: 30rpx;background: #9CE7DB;border-radius: 50%;position: absolute;top: 14rpx;left: 662rpx;" bindtap="toQxn"></view>
-			<view style="width: 6rpx;height: {{ documentList.length&&documentList.length1?documentList.length*720 + 37 + 'rpx':documentList.length==0?'0vh':'100vh' }};background: #13352D;border-radius: 1px;position: absolute;top: 140rpx;left: 220rpx;"></view>
+			<view style="width: 6rpx;height: {{ documentList.length&&documentList.length>1?documentList.length*720 + 37 + 'rpx':documentList.length==0?'0vh':'100vh' }};background: #13352D;border-radius: 1px;position: absolute;top: 140rpx;left: 220rpx;"></view>
 		</view>
 	</view>
 	<view wx:for="{{ documentList }}" wx:for-item="item" wx:for-index="index" wx:key="index" class="con-width">