Sfoglia il codice sorgente

预约修改,食谱添加图片

zouling 7 mesi fa
parent
commit
8826d69bd1

+ 5 - 5
a/code.vue

@@ -97,7 +97,7 @@
 	import popUp from "@/components/order/popup.vue"
 	import stepBar from "@/components/order/stepbar.vue"
 	import navBar from "@/components/toptab/navbar.vue"
-	import {getReservatDetail,getReservatDel} from "@/api/mine/order.js"
+	import {getReservatDetailh5,getReservatRemoveh5} from "@/api/mine/order.js"
 	import { selectDictValue } from '@/utils/common.js';
 	import {getDictionaryFn} from "@/api/mine/register.js"
 	import QR from "@/utils/wxqrcode.js" // 二维码生成器 
@@ -129,8 +129,8 @@
 		}
 	},
 	onLoad: function(e) {
-		this.id=base64.decode(e.id);
-		// this.id=e.id;
+		// this.id=base64.decode(e.id);
+		this.id=e.id;
 		this.init()
 		this.getDataFn()
 	},
@@ -163,7 +163,7 @@
 				confirmText: '确认',
 				success: function(res) {
 					if (res.confirm) {
-						getReservatDel(that.id).then(res=>{
+						getReservatRemoveh5(that.id).then(res=>{
 							if(res.code==200){
 								that.$toast('取消成功')
 								setTimeout(function(){
@@ -197,7 +197,7 @@
 			});
 		},
 		getDataFn(){
-			getReservatDetail(this.id).then(res=>{
+			getReservatDetailh5(this.id).then(res=>{
 				if(res.code==200){
 					if(res.data){
 						this.datainfo=res.data;

+ 23 - 1
api/mine/order.js

@@ -10,7 +10,7 @@ export function getReservatTime(data) {
 // 新增预约
 export function getReservatAdd(data) {
   return request({
-    'url': '/system/reservat',
+    'url': '/system/reservat/add',
     'method': 'post',
 	'data':data
   })
@@ -23,6 +23,28 @@ export function getReservatList(data) {
 	'data':data
   })
 }
+// 查询预约信息列表
+export function getReservatListNoPage(data) {
+  return request({
+    'url': '/system/reservat/listNoPage',
+    'method': 'get',
+	'data':data
+  })
+}
+// 查询预约信息详情
+export function getReservatDetailh5(data) {
+  return request({
+    'url': '/system/reservat/detail/'+data,
+    'method': 'get',
+  })
+}
+// 取消预约
+export function getReservatRemoveh5(data) {
+  return request({
+    'url': '/system/reservat/remove/'+data,
+    'method': 'get',
+  })
+}
 // 审核
 export function getReservatSh(data) {
   return request({

+ 18 - 6
components/toptab/navbar.vue

@@ -1,12 +1,12 @@
 <template>
 	<view>
 		<image :src="navbg" class="navbg"></image>
-		<uni-nav-bar :left-icon="leftflag?'left':''" :title="navtit" color="#ffffff"  :background-color="bgColor" :border="navborder" statusBar='true' fixed="true" @clickLeft='getBack'>
-			<!-- <block slot="default">
-				<view class="navtit">
-					<view>{{navtit}}</view>
+		<uni-nav-bar :left-icon="leftflag?'left':''" :title="navtit" color="#ffffff"  :background-color="bgColor" :border="navborder" statusBar='true' fixed="true" @clickLeft='getBack' @clickRight='getDetail'>
+			<block slot="right" v-if="rtype&&rtype=='come'">
+				<view class="right">
+					<view>预约信息</view>
 				</view>
-			</block> -->
+			</block>
 		</uni-nav-bar>
 	</view>
 </template>
@@ -26,6 +26,12 @@
 					return false
 				}
 			},
+			rtype:{
+				type: String,
+				default () {
+					return ''
+				}
+			},
 			navtit:'',
 			leftflag:{
 				type: Boolean,
@@ -49,6 +55,9 @@
 				}
 				
 			},
+			getDetail(){
+				this.$emit('getDetail')
+			},
 		}
 	}
 </script>
@@ -56,5 +65,8 @@
 <style scoped lang="scss">
 .navbg{width: 100%;height: 692rpx;position: fixed;left: 0;right: 0;top: 0;z-index: 1;}
 .navtit{display: flex;align-items: center;justify-content: center;font-size: 30rpx;color: #ffffff;width: 100%;
-}	
+}
+.right{position: absolute;right: 0;padding: 0 16rpx 0 26rpx;border-radius: 28rpx 0 0 28rpx;height: 56rpx;line-height: 56rpx;font-weight: bold;
+font-size: 24rpx;background-color: #7DC7FE;
+color: #FFFFFF;}
 </style>

+ 1 - 1
pages.json

@@ -28,7 +28,7 @@
 	{
 	  "path": "pages/order/info",
 	  "style": {
-	    "navigationBarTitleText": "信息录入",
+	    "navigationBarTitleText": "扫码开门",
 			"h5":{
 				"titleNView":false
 			}

+ 4 - 1
pages/order/come.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="yybox">
-	  <nav-bar navtit="来访预约"></nav-bar>
+	  <nav-bar navtit="来访预约" rtype="come" @getDetail="getSerch"></nav-bar>
 	  <view class="yydet">
 		  <!-- 顶部选填情况 -->
 		  <view class="flex0">
@@ -258,6 +258,9 @@
 			this.adrtype=this.adrlist[val].dictLabel
 			this.datainfo.appointmentSite=this.adrlist[val].dictValue
 		},
+		getSerch(){
+			this.$tab.navigateTo('/pages/order/search')
+		},
 		getFaceFn(){
 			this.$tab.navigateTo('/pages/order/face')
 		},

+ 94 - 27
pages/order/info.vue

@@ -1,25 +1,54 @@
 <template>
-  <view class="ysec">
-    <uni-forms ref="form" :value="user" >
-		<view class="yttit">信息开门</view>
-		<view class="ysecbox">
-			<uni-forms-item name="username" label="姓名">
-			  <uni-easyinput :inputBorder="false"  v-model="username" placeholder="请输入姓名" />
-			</uni-forms-item>
-			<uni-forms-item name="phonenumber" label="手机号码">
-			  <uni-easyinput :inputBorder="false" type="number"  v-model="phonenumber" placeholder="请输入手机号码" />
-			</uni-forms-item>
-			<uni-forms-item name="code" label="验证码">
-			  <uni-easyinput :inputBorder="false" v-model="code" placeholder="请输入验证码" />
-					<view class="line flex0"></view>
-					<view v-if="timefalg" class="code act">{{time}}秒</view>
-					<view v-else @click="getCode" class="code">获取验证码</view>
-			</uni-forms-item>
+	<view :style="'padding-top:'+nvaHeight+'px;padding-bottom:40rpx'">
+		<view class="navbox">
+			<uni-nav-bar  title="扫码开门" color="#ffffff"   :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">
+			</uni-nav-bar>
 		</view>
-      
-      <view class="rbtn" @click="submit">开门</view>
-    </uni-forms>
-  </view>
+		<!-- 主体 -->
+		<image :src="navbg" class="navbg"></image>
+		<view class="yymain">
+			<image :src="tlogo" class="tlogo"></image>
+			<view class="ysec">
+			  <uni-forms ref="form" :value="user" >
+					<view class="yttit">填写信息</view>
+					<view class="ynum flexcc">
+						<view class="ynlist">
+							<image :src="tabaimg" class="ynimg"></image>
+							<view class="yntit">扫描二维码</view>
+							<image :src="line" class="ynline"></image>
+						</view>
+						<view class="ynlist">
+							<image :src="tabbimg" class="ynimg"></image>
+							<view class="yntit">填写信息</view>
+							<image :src="line" class="ynline"></image>
+						</view>
+						<view class="ynlist">
+							<image :src="tabcimg" class="ynimg"></image>
+							<view class="yntit">点击开门</view>
+						</view>
+					</view>
+					<view class="ysecbox">
+						<uni-forms-item name="username" label="姓名">
+						  <uni-easyinput :inputBorder="false"  v-model="username" placeholder="请输入姓名" />
+						</uni-forms-item>
+						<uni-forms-item name="phonenumber" label="手机号码">
+						  <uni-easyinput :inputBorder="false" type="number"  v-model="phonenumber" placeholder="请输入手机号码" />
+						</uni-forms-item>
+						<uni-forms-item name="code" label="验证码">
+						  <uni-easyinput :inputBorder="false" v-model="code" placeholder="请输入验证码" />
+								<view class="line flex0"></view>
+								<view v-if="timefalg" class="code act">{{time}}秒</view>
+								<view v-else @click="getCode" class="code">获取验证码</view>
+						</uni-forms-item>
+					</view>
+			    
+			    <view class="rbtn" @click="submit">开门</view>
+				<view class="rtip">※ 温馨提示:请按流程完善信息后即可开门</view>
+				<image :src="flogo" class="flogo"></image>
+			  </uni-forms>
+			</view>
+		</view>
+	</view>
 </template>
 
 <script>
@@ -29,6 +58,13 @@
 	  components:{},
     data() {
       return {
+		navbg:require("@/static/images/navbg.png"),
+		tabaimg:require("@/static/images/order/one.png"),
+		tabbimg:require("@/static/images/order/two.png"),
+		tabcimg:require("@/static/images/order/three.png"),
+		tlogo:require("@/static/images/order/tlogo.png"),
+		flogo:require("@/static/images/order/flogo.png"),
+		line:require("@/static/images/order/line.png"),
 		timefalg:false,
 		time:'',
 		username:'',
@@ -36,15 +72,30 @@
 		code:'',
 		user:{},
 		equipmentName:"",//设备id,
+		nvaHeight:44,
+		backgroundColor: "transparent",
       }
     },
     onReady() {
     },
+	onPageScroll(e) {
+		var scrollTop = Number(e.scrollTop);
+		if (scrollTop > 0) {
+			this.backgroundColor = '#0491FD'
+		} else {
+			this.backgroundColor = 'transparent'
+		}
+	},
 	onLoad:function(e){
 		var type=e.adr;
 		if(type==1){
 			this.equipmentName='后门抓拍一体机1';
 		}
+		uni.getSystemInfo({
+			success: (e) => {
+				this.nvaHeight = Number(e.statusBarHeight)+44;
+			}
+		})
 		// this.equipmentName=e.adr;
 	},
     methods: {
@@ -136,12 +187,28 @@
   // page {
   //   background-color: #f5f5f5;
   // }
-  .ysec{padding-top: 10rpx; 
-	.rbtn{width: 680rpx;height: 90rpx;background: $com-cd3;border-radius: 42rpx;text-align: center;line-height: 90rpx;font-size: 28rpx;font-weight: bold;color: #FFFEFE;margin: 70rpx auto 0;}
-	.yttit{font-size: 28rpx;font-weight: bold;background-color: #f1f1f1;color: $com-cd3;min-height: 72rpx;display: flex;align-items: center;padding: 0rpx 60rpx;box-sizing: border-box;position: relative;
-		&::before{content: '';width: 6rpx;height: 34rpx;background: $com-cd3;border-radius: 4rpx;position: absolute;top: 50%;transform: translateY(-50%);left: 34rpx;}
+  .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;	}
+  .navbg{width: 100%;height: 692rpx;}	
+  .yymain{flex: 1;z-index: 2;position: relative;padding: 24rpx 34rpx;}
+  .tlogo{width: 506rpx;height: 168rpx;margin-bottom: 36rpx;}
+  .flogo{width: 254rpx;height: 68rpx;margin: 0 auto;}
+.ynum{margin-bottom: 24rpx;
+	.ynlist{flex: 1;position: relative;display: flex;flex-direction: column;align-items: center;padding: 20rpx 0;
+		.ynimg{width: 42rpx;height: 42rpx;margin-bottom: 12rpx;}
+		.yntit{font-weight: 500;font-size: 24rpx;color: #0391FD;}
+		.ynline{width: 102rpx;height: 18rpx;position: absolute;right: 0;transform: translateX(51rpx);}
+	}
+	
+}
+  .rtip{font-weight: 500;margin-bottom: 48rpx;text-align: center;
+font-size: 20rpx;
+color: #0391FD;}
+  .ysec{border-radius: 14rpx;background-color: #ffffff;padding: 8rpx 28rpx 40rpx;
+	.rbtn{width: 100%;height: 90rpx;background: $com-cd3;border-radius: 14rpx;text-align: center;line-height: 90rpx;font-size: 28rpx;font-weight: bold;color: #FFFEFE;margin: 70rpx auto 20rpx;}
+	.yttit{font-size: 28rpx;font-weight: bold;color: #161616;;min-height: 72rpx;display: flex;align-items: center;padding: 0rpx 26rpx;box-sizing: border-box;position: relative;
+		&::before{content: '';width: 6rpx;height: 34rpx;background: $com-cd3;border-radius: 4rpx;position: absolute;top: 50%;transform: translateY(-50%);left: 0rpx;}
 	}
-	.ysecbox{padding:0 34rpx;background: #ffffff;}
+	// .ysecbox{padding:0 34rpx;background: #ffffff;}
   }
   .searchlist{
 	  padding: 0 30rpx;margin-top: 30rpx;
@@ -150,13 +217,13 @@
 	.code{font-size: 26rpx;color: $com-cd3;font-weight: 500;
 		&.act{color: #666666;}
 	} 
-.ysec /deep/ .uni-forms .uni-forms-item{padding: 20rpx 16rpx 20rpx;border-bottom: 2rpx solid #E6E6E6;margin-bottom: 0;}
+.ysec /deep/ .uni-forms .uni-forms-item{padding: 8rpx 26rpx 8rpx;margin-bottom: 0;border: 2rpx solid #0391FD;margin-bottom: 24rpx;border-radius: 6rpx;}
 .ysec /deep/ .uni-forms-item__label{flex: 0 0 auto;width: auto !important;font-size: 28rpx;font-weight: bold;position: relative;color: #343434;}
 .ysec /deep/ .uni-textarea-placeholder{font-size: 28rpx;color: #DDDDDD !important;}
 .ysec /deep/ .uni-easyinput__placeholder-class{font-size: 28rpx;color: #DDDDDD;}
 .ysec /deep/ .uni-forms-item__content{display: flex;align-items: center;flex-direction: row;}
 .ysec /deep/ .uni-easyinput{flex: 1;text-align: right;}
-.ysec /deep/  .uni-forms-item:last-child{border-bottom: none;}
+// .ysec /deep/  .uni-forms-item:last-child{border-bottom: none;}
 .ysec /deep/ .uni-easyinput__content-input{font-size: 28rpx;}
  .ysec /deep/ .uni-forms-item__error{margin-top:20rpx;left: auto;right: 0;}
 </style>

+ 33 - 11
pages/order/search.vue

@@ -6,12 +6,18 @@
 			<uni-forms-item name="phonenumber" label="预约电话">
 			  <uni-easyinput :inputBorder="false" type="number"  v-model="phonenumber" placeholder="请输入预约的手机号码" />
 			</uni-forms-item>
-			<uni-forms-item name="code" label="验证码">
+			<!-- <uni-forms-item name="code" label="验证码">
 			  <uni-easyinput :inputBorder="false" v-model="code" placeholder="请输入验证码" />
 					<view class="line flex0"></view>
 					<view v-if="timefalg" class="code act">{{time}}秒</view>
 					<view v-else @click="getCode" class="code">获取验证码</view>
-			</uni-forms-item>
+			</uni-forms-item> -->
+			<view style="padding: 20rpx 16rpx;">
+			        <liu-slider-verify ref="verify" @change='change'></liu-slider-verify>
+			        <!-- <view style="margin-top: 30rpx;">是否成功:{{obj && obj.state}}</view>
+			        <view style="margin-top: 20rpx;">验证次数:{{obj && obj.verification}}</view> -->
+			        <!-- <button style="margin-top: 30rpx;" @click="reset">重置</button> -->
+			    </view>
 		</view>
       
       <view class="rbtn" @click="submit">查询</view>
@@ -26,7 +32,7 @@
 
 <script>
 	import * as base64 from "base-64"
-	import { getReservatList } from "@/api/mine/order.js"
+	import { getReservatListNoPage } from "@/api/mine/order.js"
 	import {sendSmsFn} from "@/api/login.js"
 	import yList from "@/components/order/list.vue"
   export default {
@@ -46,7 +52,8 @@
 		reachflag: true,
 		wtdt:'',
 		listflag:false,
-		backflag:false
+		backflag:false,
+		codeflag: false,
       }
     },
     onReady() {
@@ -71,9 +78,19 @@
 		}
 	},
     methods: {
+		 change(e) {
+		    // console.log('验证信息:', e)
+		    // console.log('验证是否成功:' + e.state)
+		    // console.log('验证次数:' + e.verification)
+		    this.codeflag = e.state
+		},
+		//重置
+		reset() {
+		    this.$refs.verify.initialization()
+		},
 		getDetail(data){
-			var s=base64.encode(data)
-			this.$tab.navigateTo('/a/code?id='+s)
+			// var s=base64.encode(data)
+			this.$tab.navigateTo('/a/code?id='+data)
 		},
 		getCode(){
 			var that=this;
@@ -120,7 +137,8 @@
 				pageSize:this.pageSize,
 				pageNum: this.pageNum,
 			}
-			getReservatList(params).then(res=>{
+			getReservatListNoPage(params).then(res=>{
+				this.reset()
 				if(res.code==200){
 					var list=res.rows;
 					this.listflag=true;
@@ -166,10 +184,10 @@
 			that.$toast("请输入手机号")
 			return
 		}
-		if (!this.code) {
-			that.$toast("请输入验证码")
-			return
-		}
+		// if (!this.code) {
+		// 	that.$toast("请输入验证码")
+		// 	return
+		// }
 		// if(this.code!=this.newcode){
 		// 	that.$toast("验证码错误,请重新输入")
 		// 	return
@@ -179,6 +197,10 @@
 			that.$toast("请输入正确的手机号")
 			return
 		}
+		if(!this.codeflag){
+			that.$toast("请拖动滑块验证")
+			return
+		}
 		this.getDataFn()
       }
     }

BIN
static/images/order/flogo.png


BIN
static/images/order/line.png


BIN
static/images/order/one.png


BIN
static/images/order/three.png


BIN
static/images/order/tlogo.png


BIN
static/images/order/two.png


+ 2 - 0
static/style.css

@@ -12,6 +12,7 @@
 .flexdc{display: flex;flex-direction: column;}
 .flexcdc{display: flex;align-items: center;flex-direction: column;}
 .flexccc{display: flex;align-items: center;flex-direction: column;justify-content: center;}
+.flexcw{display: flex;flex-wrap: wrap;}
 
 .clearf::after {
   content: "";
@@ -120,6 +121,7 @@ color: #FFFFFF;display: flex;align-items: center;justify-content: center;}
 .lh24{line-height: 48rpx;}
 
 
+.pl7{padding-left: 14rpx;}
 .pl8{padding-left: 16rpx;}
 .pl10{padding-left: 20rpx !important;}
 .pl16{padding-left: 32rpx;}

+ 8 - 0
uni_modules/liu-slider-verify/changelog.md

@@ -0,0 +1,8 @@
+## 1.0.3(2023-06-13)
+增加预览二维码
+## 1.0.2(2023-05-12)
+增加示例,优化组件
+## 1.0.1(2023-04-14)
+增加示例
+## 1.0.0(2023-03-29)
+初版发布

+ 169 - 0
uni_modules/liu-slider-verify/components/liu-slider-verify/liu-slider-verify.vue

@@ -0,0 +1,169 @@
+<template>
+	<view class="slider-verify" :style="'background-color:'+sBgColor" @touchend="touchend">
+		<view class="slider-prompt" :style="success?'color:'+sColor:'color:'+dColor">{{success?'验证通过':'拖动滑块验证'}}</view>
+		<view class="slider-bg" :style="{'transform':'translateX('+oldx+'px)',backgroundColor:dBgColor}"></view>
+		<movable-area class="slider-area" :animation="true">
+			<movable-view :style="{borderColor:success?sBgColor:dBgColor}"
+				:class="{'movable-btn':true,'movable-success':success}" :x="x" direction="horizontal" @change="onMove"
+				:disabled="isDisable">
+			</movable-view>
+		</movable-area>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			//是否禁止拖动
+			disabled: {
+				type: Boolean,
+				default: false
+			},
+			//偏移量
+			offset: {
+				type: Number,
+				default: 3
+			},
+			//滑动轨道默认背景色
+			dBgColor: {
+				type: String,
+				default: '#f0f0f0'
+			},
+			//滑动轨道滑过背景色
+			sBgColor: {
+				type: String,
+				default: '#72c13f'
+			},
+			//默认文字颜色
+			dColor: {
+				type: String,
+				default: '#8a8a8a'
+			},
+			//成功文字颜色
+			sColor: {
+				type: String,
+				default: '#FFFFFF'
+			}
+		},
+		data() {
+			return {
+				x: 0,
+				oldx: 0,
+				success: false, //是否验证成功
+				verification: 0, //验证次数
+				isDisable: this.disabled,
+				screenWidth: 0
+			};
+		},
+		mounted() {
+			const systemInfo = uni.getSystemInfoSync()
+			this.screenWidth = systemInfo.screenWidth
+		},
+		methods: {
+			onMove(e) {
+				this.oldx = e.detail.x
+			},
+			touchend() {
+				if (this.success || (this.oldx < 1 && this.oldx != 0.1)) return
+				this.x = this.oldx
+				var promptW = 0
+				var onTrackW = 0
+				uni.createSelectorQuery().in(this).select(".slider-prompt").boundingClientRect(data => {
+					if (data.width > 0) {
+						promptW = data.width
+						uni.createSelectorQuery().in(this).select(".movable-btn").boundingClientRect(data => {
+							if (data.width > 0) {
+								onTrackW = data.width
+								if (this.oldx != 0.1) this.verification++
+								if (this.oldx > (promptW - onTrackW - this.offset)) {
+									this.success = true
+									this.isDisable = true
+									this.verificationSuccess(true)
+								} else {
+									this.$nextTick(() => {
+										this.x = 0
+										this.oldx = 0
+									})
+									this.verificationSuccess(false)
+								}
+							}
+						}).exec()
+					}
+				}).exec()
+			},
+			verificationSuccess(state) {
+				let obj = {
+					state: state,
+					verification: this.verification
+				}
+				this.$emit("change", obj)
+			},
+			//重置初始化状态
+			initialization() {
+				this.x = 0
+				this.oldx = 0.1
+				this.verification = 0
+				this.success = false
+				this.isDisable = false
+				this.touchend()
+			}
+		}
+	}
+</script>
+
+<style scoped>
+	.slider-verify {
+		position: relative;
+		width: 100%;
+		height: 80rpx;
+		overflow: hidden;
+	}
+
+	.slider-prompt {
+		width: 100%;
+		height: 100%;
+		position: absolute;
+		left: 0;
+		top: 0;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		font-size: 32rpx;
+		z-index: 99;
+	}
+
+	.slider-bg {
+		width: 100%;
+		height: 100%;
+		position: absolute;
+		top: 0;
+		left: 0;
+	}
+
+	.slider-area {
+		position: absolute;
+		top: 0;
+		left: 0;
+		height: 100%;
+		width: 100%;
+		z-index: 999;
+	}
+
+	.movable-btn {
+		width: 100rpx;
+		height: 100%;
+		box-sizing: border-box;
+		background-color: #FFFFFF;
+		border: solid 1px;
+		background-image: url(../../static/go-right.png);
+		background-position: center;
+		background-size: 34rpx auto;
+		background-repeat: no-repeat;
+	}
+
+	.movable-success {
+		border: solid 1px;
+		background-image: url(../../static/success.png);
+		background-size: 40rpx auto;
+	}
+</style>

+ 6 - 0
uni_modules/liu-slider-verify/license.md

@@ -0,0 +1,6 @@
+### 1、本插件可免费下载使用;
+### 2、未经许可,严禁复制本插件派生同类插件上传插件市场;
+### 3、未经许可,严禁在插件市场恶意复制抄袭本插件进行违规获利;
+### 4、对本软件的任何使用都必须遵守这些条款,违反这些条款的个人或组织将面临法律追究。
+
+

+ 85 - 0
uni_modules/liu-slider-verify/package.json

@@ -0,0 +1,85 @@
+{
+	"id": "liu-slider-verify",
+	"displayName": "滑块验证、滑动验证",
+	"version": "1.0.3",
+	"description": "简单好用的滑块验证,支持偏移量(也就是说无需滑动到最右边),支持禁用、重置、轨道、文字颜色修改等",
+	"keywords": [
+        "滑块验证",
+        "滑动验证",
+        "验证",
+        "滑块",
+        "拖动"
+    ],
+	"repository": "",
+	"engines": {
+		"HBuilderX": "^3.1.0"
+	},
+	"dcloudext": {
+		"type": "component-vue",
+		"sale": {
+			"regular": {
+				"price": "0.00"
+			},
+			"sourcecode": {
+				"price": "0.00"
+			}
+		},
+		"contact": {
+			"qq": ""
+		},
+		"declaration": {
+			"ads": "无",
+			"data": "无",
+			"permissions": "无"
+		},
+		"npmurl": ""
+	},
+	"uni_modules": {
+		"dependencies": [],
+		"encrypt": [],
+		"platforms": {
+			"cloud": {
+				"tcb": "y",
+				"aliyun": "y"
+			},
+			"client": {
+				"Vue": {
+					"vue2": "y",
+					"vue3": "u"
+				},
+				"App": {
+					"app-vue": "u",
+					"app-nvue": "u"
+				},
+				"H5-mobile": {
+					"Safari": "y",
+					"Android Browser": "y",
+					"微信浏览器(Android)": "y",
+					"QQ浏览器(Android)": "y"
+				},
+				"H5-pc": {
+					"Chrome": "u",
+					"IE": "u",
+					"Edge": "u",
+					"Firefox": "u",
+					"Safari": "u"
+				},
+				"小程序": {
+					"微信": "y",
+					"阿里": "u",
+					"百度": "u",
+					"字节跳动": "u",
+					"QQ": "u",
+					"钉钉": "u",
+					"快手": "u",
+					"飞书": "u",
+					"京东": "u"
+				},
+				"快应用": {
+					"华为": "u",
+					"联盟": "u"
+				}
+			}
+		}
+	}
+}

+ 54 - 0
uni_modules/liu-slider-verify/readme.md

@@ -0,0 +1,54 @@
+# liu-Slider-verify适用于uni-app项目的登陆等需求的滑块验证
+### 本组件兼容小程序、H5,app
+### 介绍:简单好用的滑块验证,支持偏移量(也就是说无需滑动到最右边)
+# --- 扫码预览、关注我们 ---
+
+## 扫码关注公众号,查看更多插件信息,预览插件效果! 
+
+![](https://uni.ckapi.pro/uniapp/publicize.png)
+
+### 使用示例
+``` 
+<template>
+	<view style="margin: 64rpx 32rpx;">
+		<liu-slider-verify ref="verify" @change='change'></liu-slider-verify>
+		<view style="margin-top: 30rpx;">是否成功:{{obj && obj.state}}</view>
+		<view style="margin-top: 20rpx;">验证次数:{{obj && obj.verification}}</view>
+		<button style="margin-top: 30rpx;" @click="reset">重置</button>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				obj: ''
+			};
+		},
+		methods: {
+			//验证回调
+			change(e) {
+				console.log('验证信息:', e)
+				console.log('验证是否成功:' + e.state)
+				console.log('验证次数:' + e.verification)
+				this.obj = e
+			},
+			//重置
+			reset() {
+				this.$refs.verify.initialization()
+			}
+		}
+	}
+</script>
+```
+
+### 属性说明
+| 名称                         | 类型            | 默认值                 | 描述             |
+| ----------------------------|--------------- | ---------------------- | ---------------|
+| disabled                    | Boolean        | false             		| 是否禁止拖动
+| offset                      | Number         | 3             		    | 偏移量(也就是说无需滑动到最右边)
+| dBgColor                    | String         | #f0f0f0                | 滑动轨道默认背景色
+| sBgColor                    | String         | #72c13f                | 滑动轨道滑过背景色
+| dColor                      | String         | #8a8a8a             	| 默认文字颜色
+| sColor                      | String         | #FFFFFF             	| 成功文字颜色
+| @change                     | Function       |              	        | 验证回调

BIN
uni_modules/liu-slider-verify/static/go-right.png


BIN
uni_modules/liu-slider-verify/static/success.png


+ 77 - 0
utils/common.js

@@ -1,3 +1,8 @@
+import config from '@/config'
+import { getToken } from '@/utils/auth'
+import errorCode from '@/utils/errorCode'
+let timeout = 10000
+const baseUrl = config.baseUrl
 /**
 * 显示消息提示框
 * @param content 提示的标题
@@ -109,4 +114,76 @@ export function tansParams(params) {
     }
   }
   return result
+}
+
+//上传图片
+export function uploadmore(api, filePaths, successUp, failUp, i, length, files, callback) {
+	const isToken = (config.headers || {}).isToken === false
+	config.header = config.header || {}
+	if (getToken() && !isToken) {
+	  config.header['Authorization'] = 'Bearer ' + getToken()
+	}
+	// get请求映射params参数
+	if (config.params) {
+	  let url = config.url + '?' + tansParams(config.params)
+	  url = url.slice(0, -1)
+	  config.url = url
+	}
+	
+	uni.showLoading({
+		title: '上传中'
+	})
+	var failfile = [];
+	uni.uploadFile({
+		timeout: config.timeout || timeout,
+		url: baseUrl + api, //仅为示例,非真实的接口地址
+		filePath: filePaths[i],
+		name: 'file',
+		header: config.header,
+		formData: config.formData,
+		success: function(resp) {
+			uni.hideLoading();
+			let result = JSON.parse(resp.data)
+			const code = result.code || 200
+			const msg = errorCode[code] || result.msg || errorCode['default']
+			// console.log(result.fileName,8)
+			if (result.code == 200) {
+				successUp++;
+				files[i] = result.fileName;
+			} else if(result.code==401) {
+				showConfirm("登录状态已过期,您可以继续留在该页面,或者重新登录?").then(res => {
+				  if (res.confirm) {
+				    store.dispatch('LogOut').then(res => {
+				      uni.reLaunch({ url: '/pages/login/login' })
+				    })
+				  }
+				})
+				callback('无效的会话,或者会话已过期,请重新登录。');
+			}else{
+				failfile = failfile.concat(filePaths[i])
+				failUp++;
+			}
+		},
+		fail: function(res) {
+			uni.hideLoading();
+			failfile = failfile.concat(filePaths[i])
+			failUp++;
+		},
+		complete: function(rsp) {
+			console.log(rsp, filePaths[i])
+			uni.hideLoading();
+			i++;
+			if (i == length) {
+				uni.showToast({
+					title: '上传成功',
+					icon: 'none',
+					duration: 2000
+				});
+				callback(files);
+			} else { //递归调用upload函数
+				uploadmore(api, filePaths, successUp, failUp, i, length, files, callback);
+			}
+		}
+	});
+
 }

+ 49 - 3
work/pages/yyorder/menu.vue

@@ -32,6 +32,13 @@
 						<view class="tit bgb">晚餐</view>
 						<view class="txt">{{ite.menuFoodDetailDi||"无"}}</view>
 					</view>
+					<!-- 图片 -->
+					<view v-if="ite.imgs&&ite.imgs.length" class="ckimgs">
+						<block v-for="(pite,idx) in ite.imgs" :key="idx">
+							<image class="cimg" v-if="idx<3" :src="baseUrl+pite"  @click="getPreview(idx,ite.imgs)"></image>
+						</block>
+						<image class="cright" :src="mright" @click="getPreview(3,ite.imgs)" v-if="ite.imgs.length>3"></image>
+					</view>
 			  	</view>
 			  </view>
 			  <image :src="cfotimg" class="cfotimg"></image> 
@@ -44,6 +51,8 @@
 import {getMenuRecordList,getMenuList} from "@/api/mine/order.js"
 import {getDictionaryFn} from "@/api/mine/register.js"
 import { selectDictLabel } from '@/utils/common.js';
+import config from '@/config.js';
+	const baseUrl = config.baseUrl;
   export default {
 	data(){
 		return{
@@ -59,6 +68,8 @@ import { selectDictLabel } from '@/utils/common.js';
 			cooke:require("@/work/static/yuy/menue.png"), 
 			cookf:require("@/work/static/yuy/menuf.png"), 
 			cookg:require("@/work/static/yuy/menug.png"), 
+			mright:require("@/work/static/yuy/mright.png"), 
+			baseUrl:"",
 			list:[],
 			startDate:'',
 			endDate:'',
@@ -69,6 +80,9 @@ import { selectDictLabel } from '@/utils/common.js';
 		this.init()
 		this.getWeeksDay()
 	},
+	created() {
+		this.baseUrl=baseUrl;
+	},
 	methods:{
 		kaType(data, list) {
 			return selectDictLabel(list, data);
@@ -113,6 +127,24 @@ import { selectDictLabel } from '@/utils/common.js';
 		 
 			return month + '-' + day;
 		},
+		getPreview(idx,arr) {
+			console.log(arr)
+			var newArr=[];
+			arr.forEach(ite=>{
+				var ds=this.baseUrl+ite
+				newArr.push(ds)
+			})
+			uni.previewImage({
+				urls: newArr,
+				current:idx,
+				success: function(data) {
+					
+				},
+				fail: function(err) {
+					
+				}
+			});
+		},
 		getDataFn() {
 			var params = {
 				// pageSize: this.pageSize,
@@ -135,10 +167,20 @@ import { selectDictLabel } from '@/utils/common.js';
 					// 		this.wtdt = '到底了~';
 					// 	}
 					// }
+					var data=JSON.parse(JSON.stringify(res.rows))
+					var newArr=[];
+					data.forEach(ite=>{
+						var obj=JSON.parse(JSON.stringify(ite));
+						var a=ite.menuFoodDetailBkPhoto?ite.menuFoodDetailBkPhoto.split(','):[];
+						var b=ite.menuFoodDetailLuPhoto?ite.menuFoodDetailLuPhoto.split(','):[];
+						var c=ite.menuFoodDetailDiPhoto?ite.menuFoodDetailDiPhoto.split(','):[];
+						obj.imgs=a.concat(b).concat(c);
+						newArr.push(obj)
+					})
 					if (this.pageNum == 1) {
-						this.list = res.rows;
+						this.list = newArr;
 					} else {
-						this.list = this.list.concat(res.rows)
+						this.list = this.list.concat(newArr)
 					}
 				} else {
 					this.$toast(res.msg)
@@ -185,5 +227,9 @@ import { selectDictLabel } from '@/utils/common.js';
 		}
 	}
 }
-
+.ckimgs{padding:8rpx 0 16rpx 14rpx;display: flex;align-items: center;}
+.cimg{
+	width: 136rpx;height: 88rpx;margin-right: 32rpx;
+}
+.cright{width: 16rpx;height: 16rpx;flex: 0 0 auto;}
 </style>

+ 122 - 2
work/pages/yyorder/menuadd.vue

@@ -41,10 +41,38 @@
 						<view class="label">午餐:</view>
 						<textarea auto-height="true" v-model="ite.menuFoodDetailLu" class="textarea" maxlength='-1' placeholder="请输入或粘贴午餐菜品,用“,”隔开…"></textarea>
 					</view>
+					<view class="ckpho">
+						<view class="ckadd" @click="getphotoFn(idx,'lu')">
+							<image :src="addimg" ></image>
+							<view class="cktit">添加午餐照片</view>
+						</view>
+						<block v-if="ite.menuFoodDetailLuPhoto&&ite.menuFoodDetailLuPhoto.length">
+							<view class="flexcw mb12">
+								<view class="ckimgs" v-for="(itep,idxp) in ite.menuFoodDetailLuPhoto" :key="idxp">
+									<image :src="cdelimg" class="cdelimg" @click="getDel(idx,idxp,'lu')"></image>
+									<image :src="baseUrl+itep" @click="getPreview(idxp,ite.menuFoodDetailLuPhoto)" class="ckimg"></image>
+								</view>
+							</view>
+						</block>
+					</view>
 					<view class="cooktit">
 						<view class="label">晚餐:</view>
 						<textarea auto-height="true" v-model="ite.menuFoodDetailDi" class="textarea" maxlength='-1' placeholder="请输入或粘贴晚餐菜品,用“,”隔开…"></textarea>
 					</view>
+					<view class="ckpho">
+						<view class="ckadd" @click="getphotoFn(idx,'di')">
+							<image :src="addimg" ></image>
+							<view class="cktit">添加晚餐照片</view>
+						</view>
+						<block v-if="ite.menuFoodDetailDiPhoto&&ite.menuFoodDetailDiPhoto.length">
+							<view class="flexcw mb12">
+								<view class="ckimgs" v-for="(itep,idxp) in ite.menuFoodDetailDiPhoto" :key="idxp">
+									<image :src="cdelimg" class="cdelimg" @click="getDel(idx,idxp,'di')"></image>
+									<image :src="baseUrl+itep" @click="getPreview(idxp,ite.menuFoodDetailDiPhoto)" class="ckimg"></image>
+								</view>
+							</view>
+						</block>
+					</view>
 				</view>	
 			</uni-forms>
 			<view class="btns">
@@ -60,6 +88,10 @@
 	import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
 	import {getMenuAdd} from "@/api/mine/order.js"
 	import {getDictionaryFn} from "@/api/mine/register.js"
+	import { uploadPhoto } from '@/api/system/user.js';
+	import {uploadmore} from '@/utils/common.js';
+	import config from '@/config.js';
+	const baseUrl = config.baseUrl;
 	export default {
 		components: {},
 		data() {
@@ -67,6 +99,7 @@
 				navbg:require("@/static/images/navbg.png"),
 				upimg:require("@/work/static/yuy/up.png"),
 				delimg:require("@/work/static/yuy/delw.png"),
+				cdelimg:require("@/work/static/yuy/cdel.png"),
 				addimg:require("@/work/static/yuy/add.png"),
 				backgroundColor: "transparent",
 				datainfo:{},
@@ -74,6 +107,7 @@
 				marTop: 0, //距离顶部的距离
 				stubarHeight: 0, //
 				userId:this.$store.state.user.userId,
+				baseUrl:'',
 				weeklist:[],//食谱日期,
 				menuFoodList:[],//食谱
 				color:'#0391FD',
@@ -94,6 +128,9 @@
 				this.backgroundColor = 'transparent'
 			}
 		},
+		created() {
+			this.baseUrl=baseUrl;
+		},
 		onUnload() {
 			
 		},
@@ -129,14 +166,81 @@
 							return {
 								menuFoodTime: v.dictLabel,	
 								menuFoodDetailBk: '',	
+								menuFoodDetailBkPhoto: [],	
 								menuFoodDetailLu: '',	
+								menuFoodDetailLuPhoto: [],	
 								menuFoodDetailDi: '',	
+								menuFoodDetailDiPhoto: [],	
 								isUse: 'Y',	
 							}
 						})
 					}
 				})
 			},
+			getPreview(idx,arr) {
+				var newArr=[];
+				arr.forEach(ite=>{
+					var ds=this.baseUrl+ite
+					newArr.push(ds)
+				})
+				uni.previewImage({
+					urls: newArr,
+					current:idx,
+					success: function(data) {
+						
+					},
+					fail: function(err) {
+						
+					}
+				});
+			},
+			getDel(idx,idxp,type){
+				var obj=JSON.parse(JSON.stringify(this.menuFoodList[idx]));
+				var that=this;
+				uni.showModal({
+					title: '确认删除',
+					content: "是否确认删除",
+					cancelText: '取消',
+					confirmText: '确认',
+					success: function(res) {
+						if (res.confirm) {
+							if(type=='bk'){
+								obj.menuFoodDetailBkPhoto.splice(idxp,1)
+							}else if(type=='lu'){
+								obj.menuFoodDetailLuPhoto.splice(idxp,1)
+							}else if(type=='di'){
+								obj.menuFoodDetailDiPhoto.splice(idxp,1)
+							}
+							that.menuFoodList.splice(idx,1,obj)
+						} else if (res.cancel) {
+						}
+					}
+				});
+			},
+			getphotoFn(idx,type) {
+				var that = this;
+				var obj=JSON.parse(JSON.stringify(this.menuFoodList[idx]));
+				uni.chooseImage({
+					// count: 1, //默认9
+					// sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					// sourceType: ['camera'], //从相册选择
+					success: function(res) {
+						let img= res.tempFilePaths;
+						let imglen = res.tempFilePaths.length;
+						var fuwufile = [];
+						uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
+							if(type=='bk'){
+								obj.menuFoodDetailBkPhoto=obj.menuFoodDetailBkPhoto.concat(rs);
+							}else if(type=='lu'){
+								obj.menuFoodDetailLuPhoto=obj.menuFoodDetailLuPhoto.concat(rs);
+							}else if(type=='di'){
+								obj.menuFoodDetailDiPhoto=obj.menuFoodDetailDiPhoto.concat(rs);
+							}
+							that.menuFoodList.splice(idx,1,obj)
+						})
+					}
+				});
+			},
 			getBack() {
 				uni.navigateBack({
 					delta: 1
@@ -147,8 +251,12 @@
 				var foodlist=JSON.parse(JSON.stringify(this.menuFoodList));
 				var newArr=[];
 				foodlist.forEach(ite=>{
-					if(ite.menuFoodDetailLu||ite.menuFoodDetailDi){
-						newArr.push(ite)
+					var obj=JSON.parse(JSON.stringify(ite));
+					obj.menuFoodDetailBkPhoto=ite.menuFoodDetailBkPhoto.join(',')
+					obj.menuFoodDetailLuPhoto=ite.menuFoodDetailLuPhoto.join(',')
+					obj.menuFoodDetailDiPhoto=ite.menuFoodDetailDiPhoto.join(',')
+					if(ite.menuFoodDetailBk||ite.menuFoodDetailLu||ite.menuFoodDetailDi||obj.menuFoodDetailBkPhoto||obj.menuFoodDetailLuPhoto||obj.menuFoodDetailDiPhoto){
+						newArr.push(obj)
 					}
 				})
 				if(newArr.length<1){
@@ -225,4 +333,16 @@ color: #161616;display: flex;align-items: center;padding-left:26rpx;box-sizing:
 		&.btnb{background: #0391FD;color: #ffffff;}
 	}
 }
+.ckpho{
+	.ckadd{display: flex;align-items: center;width: 100%;height: 78rpx;background: #EBF6FF;justify-content: center;margin-bottom: 26rpx;
+border-radius: 3px;
+		image{width: 18rpx;height: 18rpx;margin-right: 14rpx;}
+		.cktit{font-weight: 500;font-size: 26rpx;color: #0391FD;}
+	}
+	.ckimgs{position: relative;margin: 0 28rpx 10rpx 0;
+		.cdelimg{position: absolute;width: 22rpx;height: 24rpx;right: -11rpx;top: -11rpx;z-index: 1;}
+		.ckimg{width: 136rpx;height: 100rpx;}
+		&:nth-of-type(4n){margin-right: 0;}
+	}
+}
 </style>

+ 126 - 1
work/pages/yyorder/menuput.vue

@@ -20,10 +20,38 @@
 						<view class="label">午餐:</view>
 						<textarea auto-height="true" v-model="datainfo.menuFoodDetailLu" class="textarea" maxlength='-1' placeholder="请输入或粘贴午餐菜品,用“,”隔开…"></textarea>
 					</view>
+					<view class="ckpho">
+						<view class="ckadd" @click="getphotoFn('lu')">
+							<image :src="addimg" ></image>
+							<view class="cktit">添加午餐照片</view>
+						</view>
+						<block v-if="datainfo.menuFoodDetailLuPhoto&&datainfo.menuFoodDetailLuPhoto.length">
+							<view class="flexcw mb12">
+								<view class="ckimgs" v-for="(itep,idxp) in datainfo.menuFoodDetailLuPhoto" :key="idxp">
+									<image :src="cdelimg" class="cdelimg" @click="getDel(idxp,'lu')"></image>
+									<image :src="baseUrl+itep" @click="getPreview(idxp,datainfo.menuFoodDetailLuPhoto)" class="ckimg"></image>
+								</view>
+							</view>
+						</block>
+					</view>
 					<view class="cooktit">
 						<view class="label">晚餐:</view>
 						<textarea auto-height="true" v-model="datainfo.menuFoodDetailDi" class="textarea" maxlength='-1' placeholder="请输入或粘贴晚餐菜品,用“,”隔开…"></textarea>
 					</view>
+					<view class="ckpho">
+						<view class="ckadd" @click="getphotoFn('di')">
+							<image :src="addimg" ></image>
+							<view class="cktit">添加晚餐照片</view>
+						</view>
+						<block v-if="datainfo.menuFoodDetailDiPhoto&&datainfo.menuFoodDetailDiPhoto.length">
+							<view class="flexcw mb12">
+								<view class="ckimgs" v-for="(itep,idxp) in datainfo.menuFoodDetailDiPhoto" :key="idxp">
+									<image :src="cdelimg" class="cdelimg" @click="getDel(idxp,'di')"></image>
+									<image :src="baseUrl+itep" @click="getPreview(idxp,datainfo.menuFoodDetailDiPhoto)" class="ckimg"></image>
+								</view>
+							</view>
+						</block>
+					</view>
 					<view class="cooktita flexc mb10">
 						<view class="label" style="flex: 1;">是否启用:</view>
 						<switch :checked="datainfo.isUse=='Y'" @change="getChange"/>
@@ -43,6 +71,9 @@
 	import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
 	import {getMenuAdd,getMenuDetail,getMenuPut} from "@/api/mine/order.js"
 	import {getDictionaryFn} from "@/api/mine/register.js"
+	import {uploadmore} from '@/utils/common.js';
+	import config from '@/config.js';
+	const baseUrl = config.baseUrl;
 	export default {
 		components: {},
 		data() {
@@ -50,6 +81,7 @@
 				navbg:require("@/static/images/navbg.png"),
 				upimg:require("@/work/static/yuy/up.png"),
 				delimg:require("@/work/static/yuy/delw.png"),
+				cdelimg:require("@/work/static/yuy/cdel.png"),
 				addimg:require("@/work/static/yuy/add.png"),
 				backgroundColor: "transparent",
 				datainfo:{},
@@ -59,6 +91,7 @@
 				userId:this.$store.state.user.userId,
 				patype:'edit',
 				id:'',
+				baseUrl:'',
 				color:'#0391FD',
 				users: [{
 				  text: '启用',
@@ -79,6 +112,9 @@
 		},
 		onUnload() {
 			
+		},
+		created() {
+			this.baseUrl=baseUrl;
 		},
 		onLoad: function(e) {
 			if(e.data){
@@ -104,10 +140,81 @@
 			getMenuDetail(){
 				getMenuDetail(this.id).then(res=>{
 					if(res.code==200){
-						this.datainfo=res.data
+						var data=JSON.parse(JSON.stringify(res.data));
+						var BkPhoto=res.data.menuFoodDetailBkPhoto;
+						var LuPhoto=res.data.menuFoodDetailLuPhoto;
+						var DiPhoto=res.data.menuFoodDetailDiPhoto;
+						data.menuFoodDetailBkPhoto=BkPhoto ? BkPhoto.split(','):[];
+						data.menuFoodDetailLuPhoto=LuPhoto ? LuPhoto.split(','):[];
+						data.menuFoodDetailDiPhoto=DiPhoto ? DiPhoto.split(','):[];
+						this.datainfo=JSON.parse(JSON.stringify(data))
 					}
 				})
 			},
+			getPreview(idx,arr) {
+				var newArr=[];
+				arr.forEach(ite=>{
+					var ds=this.baseUrl+ite
+					newArr.push(ds)
+				})
+				uni.previewImage({
+					urls: newArr,
+					current:idx,
+					success: function(data) {
+						
+					},
+					fail: function(err) {
+						
+					}
+				});
+			},
+			getDel(idxp,type){
+				var obj=JSON.parse(JSON.stringify(this.datainfo));
+				var that=this;
+				uni.showModal({
+					title: '确认删除',
+					content: "是否确认删除",
+					cancelText: '取消',
+					confirmText: '确认',
+					success: function(res) {
+						if (res.confirm) {
+							if(type=='bk'){
+								obj.menuFoodDetailBkPhoto.splice(idxp,1)
+							}else if(type=='lu'){
+								obj.menuFoodDetailLuPhoto.splice(idxp,1)
+							}else if(type=='di'){
+								obj.menuFoodDetailDiPhoto.splice(idxp,1)
+							}
+							that.datainfo=JSON.parse(JSON.stringify(obj))
+						} else if (res.cancel) {
+						}
+					}
+				});
+			},
+			getphotoFn(type) {
+				var that = this;
+				uni.chooseImage({
+					// count: 1, //默认9
+					// sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					// sourceType: ['camera'], //从相册选择
+					success: function(res) {
+						let img= res.tempFilePaths;
+						let imglen = res.tempFilePaths.length;
+						var fuwufile = [];
+						uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
+							var obj=JSON.parse(JSON.stringify(that.datainfo));
+							if(type=='bk'){
+								obj.menuFoodDetailBkPhoto=obj.menuFoodDetailBkPhoto.concat(rs);
+							}else if(type=='lu'){
+								obj.menuFoodDetailLuPhoto=obj.menuFoodDetailLuPhoto.concat(rs);
+							}else if(type=='di'){
+								obj.menuFoodDetailDiPhoto=obj.menuFoodDetailDiPhoto.concat(rs);
+							}
+							that.datainfo=JSON.parse(JSON.stringify(obj))
+						})
+					}
+				});
+			},
 			getChange(e){
 				var val=e.detail.value;
 				if(val==false){
@@ -124,6 +231,12 @@
 			getSubmit(){
 				var that=this;
 				var params=JSON.parse(JSON.stringify(this.datainfo));
+				var BkPhoto=params.menuFoodDetailBkPhoto;
+				var LuPhoto=params.menuFoodDetailLuPhoto;
+				var DiPhoto=params.menuFoodDetailDiPhoto;
+				params.menuFoodDetailBkPhoto=BkPhoto&&BkPhoto.length?BkPhoto.join(','):'';
+				params.menuFoodDetailLuPhoto=LuPhoto&&LuPhoto.length?LuPhoto.join(','):'';
+				params.menuFoodDetailDiPhoto=DiPhoto&&DiPhoto.length?DiPhoto.join(','):'';
 				getMenuPut(params).then(res=>{
 					if(res.code==200){
 						that.$toast("修改成功")
@@ -183,4 +296,16 @@ color: #161616;display: flex;align-items: center;padding: 0rpx 26rpx;box-sizing:
 		&.btnb{background: #0391FD;color: #ffffff;}
 	}
 }
+.ckpho{
+	.ckadd{display: flex;align-items: center;width: 100%;height: 78rpx;background: #EBF6FF;justify-content: center;margin-bottom: 26rpx;
+border-radius: 3px;
+		image{width: 18rpx;height: 18rpx;margin-right: 14rpx;}
+		.cktit{font-weight: 500;font-size: 26rpx;color: #0391FD;}
+	}
+	.ckimgs{position: relative;margin: 0 28rpx 10rpx 0;
+		.cdelimg{position: absolute;width: 22rpx;height: 24rpx;right: -11rpx;top: -11rpx;z-index: 1;}
+		.ckimg{width: 136rpx;height: 100rpx;}
+		&:nth-of-type(4n){margin-right: 0;}
+	}
+}
 </style>

BIN
work/static/yuy/cdel.png


BIN
work/static/yuy/mright.png