<template>
	<!-- 上传商品 商城的 -->
	<!-- adds -->
	<view class="addProjuct yicode">


		<!-- 表特和类目 -->
		<view class="noecellbox">
			<view class="title">产品名称</view>
			<view class="inputbox flex">
				<input class="input flex1" type="text" v-model="canform.title" value="" placeholder-class="plclass"
					placeholder="请填写产品名称" />
				<!-- <text class="text">{{canform.title.length}}/15</text> -->
				<!-- maxlength="15" -->
			</view>
		</view>

		<view class="briefIntroduction">
			<view class="title">产品描述</view>
			<textarea class="textarea" v-model="canform.intro" placeholder="请输入产品描述" />
		</view>

		<!-- 规格 库存 分类 -->
		<view class="Specificationsbox">
			<view class="splcsinfo flex ali-c jus-b">
				<view class="name">产品分类</view>
				<view class="ali-c">
					<text></text>
					<image class="imgs" src="/static/news/xiamassfd.png" mode=""></image>
				</view>
			</view>
			<view class="sort flex ali-c ">
				<view class="name">分类</view>

				<view class="inputs" @tap='pickerone'>
					<input type="text" disabled="disabled" v-model="cate_name" class="inpus" />
				</view>
				<view class="inputs inputs1" @tap='pickertow'>
					<input type="text" disabled="disabled" value="" v-model="parent_name" class="inpus" />
				</view>
				<lb-picker ref="picker" :list="goodsCate" :value='cate_name' range-key="label" :props="myProps"
					@confirm='confirm'></lb-picker>
				<lb-picker ref="picker1" :list="datachind" :value='parent_name' range-key="label" :props="myProps1"
					@confirm='confirm1'></lb-picker>
			</view>
		</view>
		<!-- end -->




		<view class="Specificationsbox">
			<view class="splcsinfo flex ali-c jus-b">
				<view class="name">商城分类</view>
				<view class="ali-c">
					<text></text>
					<image class="imgs" src="/static/news/xiamassfd.png" mode=""></image>
				</view>
			</view>
			<view class="sort flex ali-c ">
				<view class="name">商城分类</view>
				<picker @change="bindPickerChange" name="parent_id" :value="catindex" :range="shopCateData"
					range-key="cate_name">
					<view class="inputs">
						<input type="text" disabled="disabled" value="" v-model="shopcate_name" class="inpus" />
					</view>
				</picker>
			</view>
		</view>




		<!-- 添加产品图 -->
		<view class="addmigs">
			<view class="titlehe">添加商品主图</view>
			<robby-image-upload fileKeyName="img" :value="c_pics"
				:server-url="uploadurl1+'merchant.php/FileUpload/uploadify'" :form-data="c_formData"
				:server-url-delete-image="uploadurl1" @delete="c_delImage" @add="c_onImg" @move="onMove_c" :limit="1">
			</robby-image-upload>
		</view>
		<!-- 添加图片end -->


		<!-- 产品图片 -->

		<view class="noecellbox noecellboxtwo">
			<view class="title">产品库存</view>
			<view class="inputbox flex">
				<input class="input flex1" maxlength="15" type="number" v-model="canform.num" value=""
					placeholder-class="plclass" placeholder="请填写产品库存" />
			</view>
		</view>

		<view class="noecellbox noecellboxtwo">
			<view class="title">商城卖价 ￥</view>
			<view class="inputbox flex">
				<input class="input flex1" maxlength="15" type="number" v-model="canform.mall_price" value=""
					placeholder-class="plclass" placeholder="请填写产品商城价" />
			</view>
		</view>
		
		<view class="noecellbox noecellboxtwo">
			<view class="title">会员价(PLUS) ￥</view>
			<view class="inputbox flex">
				<input class="input flex1" maxlength="15" type="number" v-model="canform.min_price" value=""
					placeholder-class="plclass" placeholder="请填写产品会员价" />
			</view>
		</view>

		<view class="noecellbox noecellboxtwo">
			<view class="title">市场价 ￥</view>
			<view class="inputbox flex">
				<input class="input flex1" maxlength="15" type="number" v-model="canform.price" value=""
					placeholder-class="plclass" placeholder="请填写产品市场价" />
			</view>
		</view>

		<view class="noecellbox noecellboxtwo">
			<view class="title">代理价 ￥</view>
			<view class="inputbox flex">
				<input class="input flex1" maxlength="15" type="number" v-model="canform.is_agent_price" value=""
					placeholder-class="plclass" placeholder="请填写产品代理价" />
			</view>
		</view>


		<view class="noecellbox noecellboxtwo">
			<view class="title">运费 ￥</view>
			<view class="inputbox flex">
				<input class="input flex1" maxlength="15" type="number" v-model="canform.goods_freight" value=""
					placeholder-class="plclass" placeholder="请填写产品运费" />
			</view>
		</view>

		<view class="noecellbox noecellboxtwo">
			<view class="title">排序</view>
			<view class="inputbox flex">
				<input class="input flex1" type="number" v-model="canform.orderby" maxlength="3" value="0"
					placeholder-class="plclass" placeholder="请填写产品排序" />
			</view>
		</view>


		<view class="briefIntroduction">
			<view class="title">购买须知</view>
			<textarea class="textarea" v-model="canform.instructions" placeholder="请输入购买须知" />
		</view>


		<!-- photos 更多详情图 -->
		<!-- 添加产品图 -->
		<view class="addmigs ">
			<view class="titlehe">商品图册</view>
			<robby-image-upload fileKeyName="img" :value="c_picsTwo"
				:server-url="uploadurl1+'merchant.php/FileUpload/uploadify'" :form-data="c_formData"
				:server-url-delete-image="uploadurl1" @delete="c_delImagetwo" @add="c_onImgtwo" @move="onMove_ctwo"
				:limit="9"></robby-image-upload>
		</view>
		<!-- 添加图片end -->


		<!-- 先不用富文本 时间太赶了 -->
		<!-- 商品详情（编辑器插件） details -->
		<!-- 先不要 -->
		<!-- <view class="briefIntroduction">
			<view class="title">商品详情</view>
			<textarea class="textarea" v-model="canform.details" placeholder="请输入商品详情"/>
		</view> -->



		<view class="addmigs pt0s">
			<jinedit ref="jinedit"  placeholder="请输入商品详情内容" @editOk="editOk" fileKeyName="img"
				:uploadFileUrl="uploadurl1+'merchant.php/FileUpload/uploadify'"></jinedit>
				
				<!-- html="<p>aaa</p>" -->
		</view>

		<!-- 富文本 -->
		<view class="noecellbox" v-show="money_type==3">
			<view class="title">佣金金额</view>
			<view class="inputbox flex">
				<input class="input flex1" type="text" v-model="canform.money" value="" placeholder-class="plclass"
					placeholder="请填写产品名称" />
			</view>
		</view>

		<!-- 多选列表  勾选的位置 -->
		<view class="checkboxs">
			<view class="title">标识：</view>
			<!-- 表特和类目 -->
			<!-- ali-c flex flex-wrap -->
			<view class="chindlost ">
				<checkbox-group @change="checkboxChange">

					<label class="lableitem flex ali-c" v-for="(item,index) in listchind" :key="index">
						<view>
							<checkbox color="#FF6900" :value="item.value" :checked="item.checked" />
						</view>
						<view class="titles">{{item.name}}</view>
					</label>

					<view v-if="activity_type==1">
						<label class="lableitem flex ali-c" v-for="item of listissetkill" :key="index">
							<view>
								<checkbox color="#FF6900" :value="item.value" :checked="item.checked" />
							</view>
							<view class="titles">{{item.name}}</view>
						</label>
					</view>




					<!-- <view v-for="(item,index) in seckilltimelist">
						<label class="lableitem flex ali-c">
							<view>
								<checkbox color="#FF6900" value="is_seckill" :checked="false" />
							</view>
							<view class="titles">{{item.title}}</view>
						</label>
					</view>	-->

				</checkbox-group>

				<label class="lableitem flex ali-c">
					<view>
						<checkbox-group @change="changetuijian">
							<checkbox color="#FF6900" value="1" :checked="canform.is_tuijian==1" />
						</checkbox-group>
					</view>
					<view class="titles">是否首页展示</view>
				</label>
				
				<label class="lableitem flex ali-c">
					<view>
						<checkbox-group @change="changeviptag">
							<checkbox color="#FF6900" value="2" :checked="canform.is_member==2" />
						</checkbox-group>
					</view>
					<view class="titles">是否会员产品</view>
				</label>
				
				<label class="lableitem flex ali-c">
					<view>
						<checkbox-group @change="changedhshoptag">
							<checkbox color="#FF6900" value="2" :checked="canform.is_discount==2" />
						</checkbox-group>
					</view>
					<view class="titles">是否抵扣产品</view>
				</label>
				
				
			</view>



		</view>

		<!-- 单选列表 -->
		<view class="checkboxs" v-if="isshowsetkilltime">
			<view class="title">选择秒杀时段:</view>
			<picker-view :value="ischeckedtime" indicator-style="height: 50px;" style="width: 100%; height: 200px;"
				@change="pickerChange">
				<picker-view-column>
					<view v-for="(item,index) in seckilltimelist" :key="index"
						style="line-height: 50px; text-align: center;">{{item.title}}</view>
				</picker-view-column>
			</picker-view>
		</view>
		<!-- 多选end -->
		<view class="submits active" @tap="geteditOk">发布商品</view>
		<!-- create_goods -->

	</view>
</template>

<script>
	// https://ext.dcloud.net.cn/plugin?id=326

	// import { goods_type, goods_paren, create_goods} from "@/utils/api/store.js";
	import robbyImageUpload from '@/components/plan-image-upload/up_img'; //上传资质图片组件

	import {
		getGoodsCate,
		addEditGoods,
		goodsDetails,
		shopCate as shopCatemethod
	} from "@/utils/api/api.js";

	import jinedit from "@/components/jinedit/jinedit.vue";

	import {
		getActivityList
	} from '@/utils/api/merchant.js';



	export default {
		components: {
			jinedit,
			robbyImageUpload
		},
		computed: {
			staticUrl() { //静态资源地址
				return this.$store.state.staticUrl;
			},
			uploadurl() {
				return this.$store.state.uploadurl;
			}
		},
		data() {
			return {
				catindex: 0,
				shopcate_name: "",

				ischeckedtime: [0],
				money_type: "", //佣金
				myProps: {
					label: 'value',
					value: 'cate_id',
				},
				myProps1: {
					label: 'value',
					value: 'cate_id',
				},
				title: "", //产品标题
				imageData: [], //主图
				imageData1: [], //详情图
				// serverUrl: 'api/Store/goods_picture',//上传图片的地址
				serverUrl: 'api/File_upload/uploadify', //上传图片的地址
				serverUrlDeleteImage: 'api/Store/del_goodsPicture',
				formData: {
					"imgtype": "comment"
				},
				indexsss: 0,

				listchind: [{
						name: "是否新产品",
						value: "is_new",
						checked: false
					},
					{
						name: "是否热卖产品",
						value: "is_hot",
						checked: false
					},
					// {name:"是否秒杀产品",value:"is_seckill",checked:false,status:1},	/*  */
				],
				seckilltimelist: [], //秒杀时间列表
				isshowsetkilltime: false, //是否显示秒杀时间
				listissetkill: [{
					name: "是否秒杀产品",
					value: "is_seckill",
					checked: false
				}, ],

				activity_type: 0, //判断是否可以秒杀

				index: 0,
				idx: 0,
				idj: 0,
				ff: "",

				// serverUrl:  'up_img',
				// DelServelUrl: 'del_img',
				icp: "", //上传的图片 原来的


				//表单的数据
				canform: {
					goods_id: "", //修改传值产品id
					title: "", //产品名称
					intro: "", //产品描述
					cate_id: "", //	产品分类
					photo: "", //产品图片
					num: "", //库存 num
					price: "", // 市场价
					mall_price: "", //商城价
					min_price:"",//会员价
					is_agent_price: "", //代理价
					goods_freight: 0, //运费
					orderby: 100, //排序
					shopcate_id: 0, //商城分类id
					instructions: "", //购买须知
					photos: "", //更多详情图
					details: '', ///商品详情（编辑器插件）
					is_new: "0", //0 1 是否新产品
					is_hot: "0", //0 1 是否热卖产品
					is_tuijian: "0", //0 1是否首页推荐 
					is_member:"1",//是否是会员产品 1否 2是
					is_discount:"1",//是否抵扣专区商品:1=否,2=是
					is_seckill: "0", //0 1 是否秒杀产品
					activity_id: '0', //秒杀activity_id
					activity_list: '', //秒杀列表

					action: "add", //方式（添加：add，修改:edit）
					money: '',
				},
				goodsCate: [],
				shopCate: [],
				cate_name: "", //一级分类的名称
				parent_name: "", //二级分类的名称
				datachind: [], //分类的二级数据的
				c_photos: [], //主图的数据 单张的 存储数据 提交的数据需要转换
				c_photosTwo: [], //更多图里面的数据
				c_pics: [], //主图的数据
				c_picsTwo: [], //更多详情图
				issubmit: true, //重复提交开关

				selchildList: [], //勾选列表选中的值

				isjiumodelshop: {}, //修改信息的时候 默认的信息

				shopCateData: [], //商城分类


			};
		},
		computed: {
			uploadurl1() {
				return this.$store.state.uploadurl1;
			},
			//上传图片传的参数
			c_formData() {
				let obj = {
					model: "goods",
					user_token: this.$store.state.token,
				}
				return obj;
			}
		},
		onLoad(opdata) {
			this.money_type = opdata.money_type
			this.activity_type = opdata.activity_type

			if (opdata.id != "" && opdata.id != undefined) {
				this.canform.goods_id = opdata.id; //修改的商品id
				this.canform.action = "edit";

				uni.setNavigationBarTitle({
					title: "编辑产品"
				})
			}

			//获取下拉分类选择
			this.goods_type();

			// 获取秒杀时间段
			this.getActivityListfun()
		},
		methods: {
			//是否推荐
			changetuijian(e) {
				console.info(e, "eee");
				if (e.target.value.indexOf("1") != -1) { //选中了
					this.canform.is_tuijian = "1";
				} else {
					this.canform.is_tuijian = "0";
				}
			},
			changeviptag(e){
				if (e.target.value.indexOf("2") != -1) { //选中了
					this.canform.is_member = "2";
				} else {
					this.canform.is_member = "1";
				}
			},
			changedhshoptag(e){
				if (e.target.value.indexOf("2") != -1) { //选中了
					this.canform.is_discount = "2";
				} else {
					this.canform.is_discount = "1";
				}
			},
			confirm(e) {
				console.log(e)
				this.cate_name = e.item.value;
				this.datachind = e.item.children; //二级分类
			},
			confirm1(e) {
				console.log(e)
				this.parent_name = e.item.value;
				this.canform.cate_id = e.item.cate_id;
			},
			pickerone() {
				this.$refs.picker.show() // 显示
			},
			pickertow() {
				this.$refs.picker1.show() // 显示
			},

			// 秒杀列表
			async getActivityListfun() {
				let res = await getActivityList({
					audit: 1,
				})
				if (res.code == 0) {
					console.log(res, 3333)
					this.seckilltimelist = res.data.head

				}
			},
			//获取原来的商品详情信息
			async goodsDetailsfun() {
				let res = await goodsDetails({
					goods_id: this.canform.goods_id,
				});
				if (res.code == 0) {

					console.log("-------------------------------------------")
					console.log(res,"商品详情66")
					console.log("-------------------------------------------")

					this.isjiumodelshop = res.data; //赋值

					this.canform.title = res.data.title;
					this.canform.intro = res.data.intro;
					this.canform.price = (res.data.price / 100).toFixed(2); // 市场价
					this.canform.mall_price = (res.data.mall_price / 100).toFixed(2); //商城价
					this.canform.min_price = (res.data.f_min_price / 100).toFixed(2); //会员价
					this.canform.is_agent_price = (res.data.is_agent_price / 100).toFixed(2); //代理价
					this.canform.goods_freight = (res.data.goods_freight / 100).toFixed(2); //运费
					this.canform.orderby = res.data.orderby; //排序
					this.canform.shopcate_id = res.data.shopcate_id; //商城分类id
					this.canform.instructions = res.data.instructions; //购买须知
					this.canform.details = res.data.details; ///商品详情（编辑器插件）
					this.canform.num = res.data.num; //库存 num
					this.canform.cate_id = res.data.cate_id; //产品分类 
					this.canform.money = res.data.money; //佣金
					this.canform.activity_id = res.data.activity_id;
					this.canform.is_tuijian = res.data.is_tuijian ? res.data.is_tuijian : '0'; //是否推荐 是否首页推荐
					this.canform.is_member = res.data.is_member?res.data.is_member:"1";
					this.canform.is_discount = res.data.is_discount?res.data.is_discount:"1";
					
					
					
					//处理分类初始值
					for (let i = 0; i < this.goodsCate.length; i++) {
						let itemone = this.goodsCate[i].children;
						for (let j = 0; j < this.goodsCate[i].children.length; j++) {
							// console.info(this.goodsCate[i].children[j],"111111");
							let itemtwo = this.goodsCate[i].children[j];
							if (itemtwo.cate_id == this.canform.cate_id) {
								// console.info("111这个才是",itemtwo);

								this.datachind = itemone; //二级赋值
								this.cate_name = this.goodsCate[i].value; //一级名称
								this.parent_name = itemtwo.value; //二级名称

							}
						}
					}



					//处理产品主图
					this.c_pics = [{
						code: 0,
						data: res.data.photo,
						msg: "success",
						time: "1587021474"
					}];
					this.c_photos = [res.data.photo]; //初始化
					//处理产品图列表
					let photos = res.data.photos;
					this.c_picsTwo = photos.map((item, index) => {
						let obj = {
							code: 0,
							data: "",
							msg: "success",
							time: "1587021687",
						};
						obj.data = item.photo;
						this.c_photosTwo.push(item.photo); //默认值
						return obj;
					});
					//photos


					// is_new:"0",//0 1 是否新产品
					// is_hot:"0",//0 1 是否热卖产品

					//处理复选

					let listchind = [{
							name: "是否新产品",
							value: "is_new",
							checked: res.data.is_new == 1 ? true : false
						},
						{
							name: "是否热卖产品",
							value: "is_hot",
							checked: res.data.is_hot == 1 ? true : false
						},
					];

					// console.log(res.activity_list=="49,",res.data.activity_list);

					let listissetkill = [{
						name: "是否秒杀产品",
						value: "is_seckill",
						checked: res.data.activity_list == "49," ? true : false
					}]

					this.listissetkill = listissetkill;

					this.listchind = listchind;


					if (res.data.activity_list == '49,') {
						this.listissetkill[0].checked = true
						this.isshowsetkilltime = true

						console.log(this.seckilltimelist);
						console.log(this.canform.activity_id)

						let indexlist = this.seckilltimelist.filter((item, index) => {
							if (item.activity_id == this.canform.activity_id) {
								return item
							}
						})

						console.log(indexlist)

						let temparr = indexlist[0]
						let index = this.seckilltimelist.indexOf(temparr)
						console.log(index)
						this.ischeckedtime[0] = index
					}


					//处理商城分类本地初始值
					this.shopCateData.forEach((item, index) => {
						if (item.cate_id == this.canform.shopcate_id) {
							this.catindex = index;
							this.shopcate_name = item.cate_name;

						}
					})

					//2021年8月24日11:08:58 change
					if(res.data.is_new==1){
						this.selchildList.push("is_new");
					}
					if(res.data.is_hot==1){
						this.selchildList.push("is_hot");
					}
					
					this.$refs.jinedit.initval(this.canform.details);//初始化html

				} else {
					this.$api.msg(res.msg);
				}
			},
			onEditorReady() {
				uni.createSelectorQuery().select('#editor').context((res) => {
					this.editorCtx = res.context
				}).exec()
			},
			undo() {
				this.editorCtx.undo()
			},
			initdata() {
				this.imageData = []; //主图
				this.imageData1 = []; //详情图
			},
			// 获取商城商品分类 在用
			async goods_type() {
				let res = await getGoodsCate({

				})
				if (res.code == 0) {
					this.goodsCate = res.data.goodsCate; //二级商品分类
					this.shopCate = res.data.shopCate; //商家分类

					this.shopCatemethodFun();


				} else {

				}
			},
			//获取商城分类
			async shopCatemethodFun() {
				let res = await shopCatemethod({

				});
				if (res.code == 0) {
					this.shopCateData = res.data;
				}

				//请求初始化的数据信息
				if (this.canform.goods_id != "" && this.canform.goods_id != undefined) {
					this.goodsDetailsfun();
				}
			},
			geteditOk() { //1.xxx
				this.$refs.jinedit.release(true);
			},
			//富文本处理完毕 事件 获取最后的html 数据 子组件调用的
			editOk(e) { //2.xxxx
				console.info("col666", e.html);

				//调用完毕 调用 create_goods
				let htaltag = e.html
				let newStr = htaltag.replace(new RegExp(/\"/g), "");
				// console.log(newStr);
				this.canform.details = newStr; //e.html
				
				console.info("this.canform.details",this.canform.details);

				this.create_goods();
			},
			//添加商品事件
			async create_goods() { //3.xxxx

				//首先先把富文本组件的数据同步到父组件
				//this.$refs.jinedit.release(true);



				if (this.issubmit == true) {
					this.issubmit = false;



					if (this.c_photos.length != 0) {
						this.canform.photo = this.c_photos[0]; //主图单张
					}


					if (this.c_photosTwo.length != 0) {
						this.canform.photos = this.c_photosTwo.join(";"); //更多详情图 列表
					}

					let selchildList = this.selchildList;

					console.log(selchildList)

					selchildList.forEach((item, index) => { //勾选的两个
						if (item == "is_new") {
							this.canform.is_new = "1";
						}
						if (item == "is_hot") {
							this.canform.is_hot = "1";
						}
						// if(item=="is_seckill"){
						// 	this.canform.is_seckill= "1";
						// }	
					})

					// console.info(this.canform,"canform");
					// return false;

					//添加
					console.log(this.canform.mall_price)
					console.log(this.canform.price)

					if (parseFloat(this.canform.price) < parseFloat(this.canform.mall_price)) {
						this.$api.msg('商城价格不能大于市场价格');
						this.issubmit = true;
						return;
					}

					this.canform.is_tuijian = parseInt(this.canform.is_tuijian);
					this.canform.is_member  = parseInt(this.canform.is_member);
					this.canform.is_discount =  parseInt(this.canform.is_discount);
					console.info("i", this.canform);
					console.info("this.canform.is_tuijian", this.canform.is_tuijian);
					// return false;


					let res = await addEditGoods(this.canform)
					console.info("res", res);

					this.issubmit = true;
					if (res.code == 0) {
						this.$api.msg(res.msg);

						this.initdata(); //初始化数据
						// //商品列表
						// uni.navigateTo({
						// 	url: '/pages/ProductManage/ProductManage'
						// });

						setTimeout(() => {
							uni.navigateBack({

							})
						}, 1000)
					} else {
						this.$api.msg(res.msg);

					}

					this.issubmit = true;
				}

			},

			//多选 勾选 列表
			checkboxChange(e) {
				this.isshowsetkilltime = e.detail.value.indexOf('is_seckill') == -1 ? false : true;
				// if(e.detail.value.indexOf('is_seckill')!=-1){
				// 	this.getActivityListfun();
				// }
				if (this.isshowsetkilltime) {
					this.canform.activity_list = "49,"
				} else {
					this.canform.activity_list = ""
				}

				console.log(this.canform.activity_list)
				this.selchildList = e.detail.value;
			},
			//单选框
			pickerChange(e) {
				// console.log(e)
				// console.log(this.seckilltimelist[e.detail.value[0]].activity_id)
				this.canform.activity_id = this.seckilltimelist[e.detail.value[0]].activity_id;


			},
			// 改变下拉选项 一级的
			//商城分类
			bindPickerChange(event) {
				console.info(event.detail.value);
				this.catindex = event.detail.value;
				this.shopcate_name = this.shopCateData[event.detail.value].cate_name;
				this.canform.shopcate_id = this.shopCateData[event.detail.value].cate_id;
			},
			//图片上传
			c_delImage(e) {
				let arr = []
				for (let k in e.allImages) {
					arr[k] = e.allImages[k].id
				}
				this.c_photos = arr
			},
			c_onImg(e) {
				console.info(e);
				this.c_pics = e.allImages
				const obj = e.allImages
				for (let index in obj) {
					let id = obj[index].data
					this.c_photos[index] = id
				}
				console.log(this.c_photos)
			},
			onMove_c(e) {
				this.c_pics = e
				const obj = e
				for (let index in obj) {
					let id = obj[index].data
					this.c_photos[index] = id
				}

			},
			//更多详情图
			c_delImagetwo(e) {
				let arr = []
				for (let k in e.allImages) {
					arr[k] = e.allImages[k].id
				}
				this.c_photosTwo = arr
			},
			c_onImgtwo(e) {
				this.c_picsTwo = e.allImages
				const obj = e.allImages
				for (let index in obj) {
					let id = obj[index].data
					this.c_photosTwo[index] = id
				}
			},
			onMove_ctwo(e) {
				this.c_picsTwo = e
				const obj = e
				for (let index in obj) {
					let id = obj[index].data
					this.c_photosTwo[index] = id
				}
			},

		}
	}
</script>

<style lang="scss">
	@import "./addProjuct.scss"
</style>
