<template>
	<view class="enterForm">
		<loadlogo v-if="!loadlogo" />
		<view class="bgimgbox" v-if="loadlogo"><image class="bgimg" :src="imageRoot + 'demoBackImg.png'" mode=""></image></view>
		<view class="formbox" v-if="loadlogo">
			<view class="formdatabox">
				<view class="dis-flex f-26" style="padding-bottom: 20upx;">
					<view class="sign"></view>
					<view  style="padding-left: 20upx;flex: 0.45;">请填写活动详情</view>
					<view class="t-r" style="flex: 0.6;">
						<!-- 直接联系客服<text class="iconfont icon-right" style="font-size: 20upx;color: #999999;padding-left: 10upx;"></text> -->
					</view>
				</view>
				<view class="dis-flex f-24 formtitle">
					<view class="t-r" style="flex: 0.2;">
						<view class="dis-il-block" style="font-size: 20upx;color: #FF4444;float: left;">*</view>
						活动标题
					</view>
					<view  style="flex: 0.8;padding-left: 40upx;"><input class="uni-input f-24" placeholder="请输入活动名称" v-model="userInfo.title" /></view>
				</view>
				<view class="dis-flex f-24 formtitle">
					<view class="t-r" style="flex: 0.2;">
						<view class="dis-il-block" style="font-size: 20upx;color: #FF4444;float: left;">*</view>
						活动分类
					</view>
					<view  style="flex: 0.8;padding-left: 40upx;">
						<picker @change="bindPickerChange" :value="pickerindex" range-key="name" :range="catelist">
							<view class="uni-input">
								{{ activityName }}
								<view class="dis-il-block iconfont icon-right" style="float: right;font-size: 24upx;color: #6f6f6f;"></view>
							</view>
						</picker>
					</view>
				</view>
				<view class="dis-flex f-24 formtitle">
					<view class="t-r" style="flex: 0.2;line-height: 100upx;">
						<view class="dis-il-block" style="font-size: 20upx;color: #FF4444;float: left;">*</view>
						活动时间
					</view>
					<view class="dis-flex" style="flex: 0.8;padding-left: 40upx;">
						<w-picker
							:visible.sync="visiblec"
							mode="date"
							startYear="1970"
							endYear="2100"
							:value="userInfo.activestarttime"
							fields="minute"
							@confirm="onConfirmdete($event, 'region')"
							ref="date"
						></w-picker>
						<w-picker
							:visible.sync="visiblec2"
							mode="date"
							startYear="1970"
							endYear="2100"
							:value="userInfo.activeendtime"
							fields="minute"
							@confirm="onConfirmdeteTwo($event, 'region')"
							ref="date2"
						></w-picker>
						<view  style="flex: 0.8;">
							<view class="uni-input" style="height: 50upx;line-height: 50upx;" @tap="visble">{{ userInfo.activestarttime || '活动开始时间' }}</view>
							<!-- <view class="uni-input">
								—
							</view> -->
							<view class="uni-input" style="height: 50upx;line-height: 50upx;" @tap="visbleTwo">{{ userInfo.activeendtime || '活动结束时间' }}</view>
						</view>
						<view  style="height: 100upx;line-height: 100upx;flex: 0.2;"></view>
						<!-- <view class="uni-input"><text class="iconfont icon-right"
						style="float: right;font-size: 20upx;color: #999999;">-</view>
						<view class="uni-input" @tap="visiblec2 = true">{{endTime || '结束时间'}}<text class="iconfont icon-right"
						tyle="float: right;font-size: 20upx;color: #999999;">
						</text></view> -->
					</view>
				</view>
				<view class="dis-flex f-24 formtitle">
					<view class="t-r" style="flex: 0.2;line-height: 100upx;">
						<view class="dis-il-block" style="font-size: 20upx;color: #FF4444;float: left;">*</view>
						报名时间
					</view>
					<view class="dis-flex" style="flex: 0.8;padding-left: 40upx;">
						<w-picker
							:visible.sync="visiblec3"
							mode="date"
							startYear="1970"
							endYear="2100"
							:value="userInfo.enrollstarttime"
							fields="minute"
							@confirm="onConfirmdete3($event, 'region')"
							ref="date3"
						></w-picker>
						<w-picker
							:visible.sync="visiblec4"
							mode="date"
							startYear="1970"
							endYear="2100"
							:value="userInfo.enrollendtime"
							fields="minute"
							@confirm="onConfirmdete4($event, 'region')"
							ref="date4"
						></w-picker>
						<view  style="flex: 0.8;">
							<view class="uni-input" style="height: 50upx;line-height: 50upx;" @tap="visble3">{{ userInfo.enrollstarttime || '报名开始时间' }}</view>
							<!-- <view class="uni-input">
								—
							</view> -->
							<view class="uni-input" style="height: 50upx;line-height: 50upx;" @tap="visble4">{{ userInfo.enrollendtime || '报名结束时间' }}</view>
						</view>
						<view  style="height: 100upx;line-height: 100upx;flex: 0.2;"></view>
						<!-- <view class="uni-input"><text class="iconfont icon-right"
						style="float: right;font-size: 20upx;color: #999999;">-</view>
						<view class="uni-input" @tap="visiblec2 = true">{{endTime || '结束时间'}}<text class="iconfont icon-right"
						tyle="float: right;font-size: 20upx;color: #999999;">
						</text></view> -->
					</view>
				</view>
				<!-- 	<view class="dis-flex f-24 formtitle">
					<view class="t-r" style="flex: 0.2;">
						<view class="dis-il-block" style="font-size: 20upx;color: #FF4444;float: left;">*</view>
						姓名
					</view>
					<view  style="flex: 0.8;padding-left: 40upx;">
						 <input class="uni-input f-24"  placeholder="请输入姓名" />
					</view>
				</view>
				<view class="dis-flex f-24 formtitle">
					<view class="t-r" style="flex: 0.2;">
						<view class="dis-il-block" style="font-size: 20upx;color: #FF4444;float: left;">*</view>
						电话
					</view>
					<view  style="flex: 0.8;padding-left: 40upx;">
						 <input class="uni-input f-24"  placeholder="请输入联系电话" />
					</view>
				</view> -->
				<!-- <view class="dis-flex f-24 formtitle">
					<view class="t-r" style="flex: 0.2;">
						<view class="dis-il-block" style="font-size: 20upx;color: #FF4444;float: left;">*</view>
						所在城市
					</view>
					<view  style="flex: 0.8;padding-left: 40upx;">
						<w-picker :visible.sync="visiblec" mode="region" :value="[userInfo.provinceid || userInfo.pro_code,userInfo.areaid || userInfo.city_code,userInfo.distid || userInfo.area_code]"
						 default-type="value" :hide-area="false" @confirm="onConfirm($event,'region')" @cancel="onCancel" ref="region"></w-picker>
						<view class="uni-input" @tap="visble">{{ provinceidName }} {{ areaidName }} {{ distidName }}<text class="iconfont icon-right"
							 style="float: right;font-size: 20upx;color: #999999;">

							</text></view>

					</view>
				</view> -->
				<view class="dis-flex f-24 formtitle">
					<view class="t-r" style="flex: 0.2;">
						<view class="dis-il-block" style="font-size: 20upx;color: #FFFFFF;float: left;">*</view>
						地址类型
					</view>
					<view  style="flex: 0.8;padding-left: 40upx;">
						<picker @change="siteChange" :value="siteindex" range-key="name" :range="sitearray">
							<view class="uni-input">
								{{ sitearray[siteindex].name }}
								<view class="dis-il-block iconfont icon-right" style="float: right;font-size: 24upx;color: #6f6f6f;"></view>
							</view>
						</picker>
					</view>
				</view>
				<view class="dis-flex f-24 formtitle" v-if="siteindex == 1">
					<view class="t-r" style="flex: 0.2;">
						<view class="dis-il-block" style="font-size: 20upx;color: #FF4444;float: left;">*</view>
						活动地址
					</view>
					<view class="dis-flex" style="flex: 0.8;padding-left: 40upx;">
						<input class="f-24" style="flex: 0.8;" placeholder="请输入详细地址" v-model="userInfo.address" />
						<view class="dis-il-block" @click="getLocation" style="flex: 0.2;">
							<image style="width: 20upx;height: 20upx;padding-left: 10upx;" :src="imgfixUrls + 'merchant/where.svg'" />
							<span>定位</span>
						</view>
					</view>
				</view>
				<view class="dis-flex f-24 formtitle">
					<view class="t-r" style="flex: 0.2;">
						<!-- <view class="dis-il-block" style="font-size: 20upx;color: #FF4444;float: left;">*</view> -->
						活动规格
					</view>
					<view class="dis-flex" style="flex: 0.8;padding-left: 40upx;">
						<view class="timePickerView" @click="specificationShow">
							<!-- 	<picker mode="multiSelector" class="dataPicker" :range="typelist" @change="checkType" @columnchange="changeKey"
						 	 range-key="name" :value="typeIndex"> -->
							<view class="uni-input twoLevelList">
								规格设置

								<text class="iconfont icon-right" style="font-size: 20upx;color: #999999;float: right;"></text>
							</view>
							<!-- <view v-else class="uni-input twoLevelList">
								<view class="dis-il-block" style="width: 90%;">
									{{industryclass}}
								</view>
								<text class="iconfont icon-right" style="font-size: 20upx;color: #999999;float: right;"></text>
							</view> -->
							<!-- 			</picker> -->
							<span></span>
						</view>
					</view>
				</view>
			</view>
			<view class="formdatabox" style="margin-top: 20upx;">
				<view class="dis-flex f-26" style="padding-bottom: 20upx;">
					<view class="sign"></view>
					<view  style="padding-left: 20upx;flex: 0.45;">请填写报名规则</view>
				</view>
				<view class="dis-flex f-24 formtitle" v-if="specificationList.length == 0">
					<view class="t-r" style="flex: 0.2;">
						<view class="dis-il-block" style="font-size: 20upx;color: #FFFFFF;float: left;">*</view>
						报名价
					</view>
					<view class="dis-flex" style="flex: 0.8;padding-left: 40upx;">
						<input style="width: 100%;font-size: 24upx;" auto-height placeholder="报名价" placeholder-style="font-size:24upx" type="digit" v-model="userInfo.price" />
					</view>
				</view>
				<!-- <view class="dis-flex f-24 formtitle">
					<view class="t-r" style="flex: 0.2;">
						<view class="dis-il-block" style="font-size: 20upx;color: #FF4444;float: left;">*</view>
						微信号
					</view>
					<view  style="flex: 0.8;padding-left: 40upx;">
						 <input class="uni-input f-24"  placeholder="请输入微信号" v-model="userInfo.wx" />
					</view>
				</view> -->

				<view class="dis-flex f-24 formtitle" v-if="specificationList.length == 0">
					<view class="t-r" style="flex: 0.2;">
						<view class="dis-il-block" style="font-size: 20upx;color: #ffffff;float: left;">*</view>
						最大人数
					</view>
					<view  style="flex: 0.8;padding-left: 40upx;"><input class="uni-input f-24" placeholder="请填写最大报名人数" v-model="userInfo.maxpeoplenum" /></view>
				</view>
				<view class="dis-flex f-24 formtitle" v-if="specificationList.length == 0">
					<view class="t-r" style="flex: 0.2;">
						<view class="dis-il-block" style="font-size: 20upx;color: #ffffff;float: left;">*</view>
						最小人数
					</view>
					<view  style="flex: 0.8;padding-left: 40upx;"><input class="uni-input f-24" placeholder="请填写最小报名人数" v-model="userInfo.minpeoplenum" /></view>
				</view>
				<view class="dis-flex f-24 formtitle">
					<view class="t-r" style="flex: 0.2;">
						<view class="dis-il-block" style="font-size: 20upx;color: #FF4444;float: left;">*</view>
						报名表单
					</view>
					<view  style="flex: 0.8;padding-left: 40upx;">
						<picker @change="diyformChange" :value="diyformindex" range-key="title" :range="diyform">
							<view class="uni-input">
								{{ diyform[diyformindex].title }}
								<view class="dis-il-block iconfont icon-right" style="float: right;font-size: 24upx;color: #6f6f6f;"></view>
							</view>
						</picker>
					</view>
				</view>
			</view>
			<view class="formdatabox" style="margin-top: 20upx;">
				<view class="dis-flex f-26" style="padding-bottom: 20upx;">
					<view class="sign"></view>
					<view  style="padding-left: 20upx;flex: 0.45;">请添加活动图片</view>
					<view class="t-r" style="flex: 0.6;">
						<!-- 直接联系客服<text class="iconfont icon-right" style="font-size: 20upx;color: #999999;padding-left: 10upx;"></text> -->
					</view>
				</view>
				<view class="logobox">
					<view class="dis-il-block" style="font-size: 20upx;color: #FF4444;float: left;line-height: 70upx;padding-right: 10upx;">*</view>
					<span>活动图片</span>
					<view style="padding-left: 20upx;">
						<!-- 图片预览循环模板 -->
						<view class="userImgUpdataon" style="margin: 10upx;" v-if="userInfo.thumb">
							<image :src="userInfo.thumb" class="imgs" @click="lookimg(1, userInfo.thumb)" />
							<image :src="imgfixUrls + 'merchant/close.png'" class="close" @click="closeLogo" />
						</view>
						<!-- 图片预览循环模板 -->
						<view class="userImgUpdata" @click="uploadFiles(1, 1)" style="margin: 10upx;width: 180upx;min-width: 180upx;max-width: 180upx;" v-if="!userInfo.thumb">
							<image :src="imgfixUrls + 'merchant/addImg.svg'" class="img" />
						</view>
					</view>
				</view>

				<view class="logobox">
					<view class="dis-il-block" style="font-size: 20upx;color: #ffffff;float: left;line-height: 70upx;padding-right: 10upx;">*</view>
					<span>活动轮播图</span>
					<view class="dis-flex" style="flex-wrap: wrap;align-content: flex-center;align-items: center;justify-content: left;">
						<!-- 图片预览循环模板 -->
						<view class="userImgUpdataon" style="flex: auto;margin: 10upx;width: 180upx;min-width: 180upx;max-width: 180upx;" v-for="(item, index) in userInfo.advs">
							<image :src="item" class="imgs" style="width: 100%;" @click="lookimg(3, userInfo.advs, index)" />
							<image :src="imgfixUrls + 'merchant/close.png'" class="close" @click="closePreview(3, item)" />
						</view>
						<!-- 图片预览循环模板 -->
						<view
							class="userImgUpdata"
							style="flex: auto;margin: 10upx;width: 180upx;min-width: 180upx;max-width: 180upx;"
							v-if="userInfo.advs.length != 6"
							@click="uploadFiles(3, 6)"
						>
							<image :src="imgfixUrls + 'merchant/addImg.svg'" class="img" />
						</view>
					</view>
				</view>

				<view class="logobox">
					<view class="dis-il-block" style="font-size: 20upx;color: #FFFFFF;float: left;line-height: 70upx;padding-right: 10upx;">*</view>
					<span>活动图集</span>
					<view class="dis-flex" style="flex-wrap: wrap;align-content: flex-center;align-items: center;justify-content: left;">
						<!-- 图片预览循环模板 -->
						<view class="userImgUpdataon" style="flex: auto;margin: 10upx;width: 180upx;min-width: 180upx;max-width: 180upx;" v-for="(item, index) in userInfo.thumbs">
							<image :src="item" class="imgs" style="width: 100%;" @click="lookimg(2, userInfo.thumbs, index)" />
							<image :src="imgfixUrls + 'merchant/close.png'" class="close" @click="closePreview(2, item)" />
						</view>
						<!-- 图片预览循环模板 -->
						<view
							class="userImgUpdata"
							style="flex: auto;margin: 10upx;width: 180upx;min-width: 180upx;max-width: 180upx;"
							v-if="userInfo.thumbs.length != 6"
							@click="uploadFiles(2, 6)"
						>
							<image :src="imgfixUrls + 'merchant/addImg.svg'" class="img" />
						</view>
					</view>
				</view>
			</view>

			<view class="formdatabox" style="margin-top: 20upx;">
				<view class="dis-flex f-26" style="padding-bottom: 20upx;">
					<view class="sign"></view>
					<view  style="padding-left: 20upx;flex: 0.45;">活动介绍</view>
				</view>
				<view class="dis-flex f-24 formtitle">
					<view class="t-r" style="flex: 0.2;">
						<view class="dis-il-block" style="font-size: 20upx;color: #FF4444;float: left;">*</view>
						活动状态
					</view>
					<view  style="flex: 0.8;padding-left: 40upx;">
						<picker @change="stateChange" :value="stateindex" range-key="name" :range="statearray">
							<view class="uni-input">
								{{ statearray[stateindex].name }}
								<view class="dis-il-block iconfont icon-right" style="float: right;font-size: 24upx;color: #6f6f6f;"></view>
							</view>
						</picker>
					</view>
				</view>
				<view class="dis-flex f-24 formtitle">
					<view class="t-r" style="flex: 0.2;">
						<view class="dis-il-block" style="font-size: 20upx;color: #ffffff;float: left;">*</view>
						活动详情
					</view>
					<view class="dis-flex" style="flex: 0.8;padding-left: 40upx;">
						<view class="timePickerView" @click="richTextShow">
							<view class="uni-input twoLevelList">
								活动详情富文本
								<text class="iconfont icon-right" style="font-size: 20upx;color: #999999;float: right;"></text>
							</view>
							<span></span>
						</view>
					</view>
				</view>
				<view class="dis-flex f-24 formtitle">
					<view class="t-r" style="flex: 0.2;">
						<view class="dis-il-block" style="font-size: 20upx;color: #ffffff;float: left;">*</view>
						报名须知
					</view>
					<view class="dis-flex" style="flex: 0.8;padding-left: 40upx;">
						<view class="timePickerView" @click="richTextShowTwo">
							<view class="uni-input twoLevelList">
								报名须知富文本
								<text class="iconfont icon-right" style="font-size: 20upx;color: #999999;float: right;"></text>
							</view>
							<span></span>
						</view>
					</view>
				</view>
			</view>
			<view  style="position: relative;">
				<view class="t-c" style="width: 90vw;height: 80upx;line-height: 80upx;background-color: #FF4444;color: #FFFFFF;border-radius: 60upx;" @click="submit">提 交</view>
			</view>
		</view>
		<!-- #ifdef H5 -->
		<PopManager :show="isOpenLaction" :type="'bottom'" :overlay="'false'" :showOverlay="'false'">
			<view class="iframe-wid-hgt" :style="{ height: phoneHeight }" v-if="latlngs">
				<iframe
					id="mapPage"
					width="100%"
					height="100%"
					frameborder="0"
					:src="
						`https://apis.map.qq.com/tools/locpicker?search=1&type=1&key=KIQBZ-6OT3G-AOMQD-IHW6J-PEUDV-VCFAF&referer=myapp&coord=${latlngs.latitude},${
							latlngs.longitude
						}`
					"
				></iframe>
			</view>
			<view class="iframe-wid-hgt" :style="{ height: phoneHeight }" v-if="!latlngs">
				<iframe
					id="mapPage"
					width="100%"
					height="100%"
					frameborder="0"
					:src="`https://apis.map.qq.com/tools/locpicker?search=1&type=1&key=KIQBZ-6OT3G-AOMQD-IHW6J-PEUDV-VCFAF&referer=myapp`"
				></iframe>
			</view>
		</PopManager>
		<!-- #endif -->
		<PopManager :show="hangyeshow" :type="'bottom'" :overlay="'false'" :showOverlay="'false'" @clickmask="closeShareBottom">
			<view class="hangye dis-flex" v-if="Array.isArray(industry) && Array.isArray(industrysubdivide)">
				<view class="f-30 t-c" style="width: 100%;">当前地区暂无相关行业分类</view>
			</view>
			<view class="hangye dis-flex" v-else>
				<view  style="flex: 0.499;overflow: auto;">
					<view
						:class="item.checked ? 'industryclass-item classcheck f-28' : 'industryclass-item f-28'"
						v-for="(item, key, index) in industry"
						@click="clickindustry(key)"
					>
						{{ item.name }}
					</view>
				</view>
				<view  style="flex: 0.499;overflow: auto;">
					<view
						:class="item.checked ? 'industryclass-item isclasschecked f-28' : 'industryclass-item f-28'"
						v-for="(item, index) in industrysubdivide"
						@click="clickclass(item)"
					>
						{{ item.name }}
					</view>
				</view>
			</view>
			<!-- <view class="b-f dis-flex">
				
				<view class="flex-box">
					<button @click="confirm" style="width: 80%;height: 80%;font-size: 34upx;line-height: 70upx;height: 70upx;margin-bottom: 20upx;" type="warn">确定</button>
				</view>
			</view> -->
		</PopManager>
		<!-- 规格设置 -->
		<PopManager :show="specification" :type="'center'" :overlay="'false'" :showOverlay="'false'" @clickmask="specification = false">
			<view class="specificationClass">
				<view class="tilte f-w">
					规格设置
					<text class="f-20 col-9">(可点击下列规格进行修改)</text>
					<text class="iconfont icon-close" style="font-size: 30upx;float: right;" @click="specification = false"></text>
				</view>
				<view  style="height: 800upx;overflow: auto;">
					<view class="content" v-for="(item, index) in specificationList" :key="index" @click="modification(item, index)">
						<view
							class="iconfont icon-guanbishixin t-r"
							@click.stop="deletet(item, index)"
							style="font-size: 35upx;right: 0upx;top: 0upx;color: #999999;position: absolute;"
						></view>
						<view class="dis-flex content-item">
							<view  style="flex: 0.5;">规格名字:</view>
							<view class="t-r" style="flex: 0.5;">{{ item.name }}</view>
						</view>
						<view class="dis-flex content-item">
							<view  style="flex: 0.5;">报名价格:</view>
							<view class="t-r" style="flex: 0.5;">{{ item.price }}</view>
						</view>
						<view class="dis-flex content-item">
							<view  style="flex: 0.5;">最小报名人数:</view>
							<view class="t-r" style="flex: 0.5;">{{ item.minnum }}</view>
						</view>
						<view class="dis-flex content-item">
							<view  style="flex: 0.5;">最大报名人数:</view>
							<view class="t-r" style="flex: 0.5;">{{ item.maxnum }}</view>
						</view>
					</view>
					<view class="t-c col-9" style="line-height: 200upx;" v-if="specificationList.length == 0">暂无相关规格~</view>
				</view>
				<view class="specificationBtn" @click="addspecification">添加规格</view>
			</view>
			<PopManager :show="addspecificationshow" :type="'center'" :bottom="'-30%'" :overlay="'false'" :showOverlay="'false'" @clickmask="addspecificationshow = false">
				<view class="addspecificationshow">
					<view class="f-34 f-w p-b-20">
						添加规格
						<text style="float: right;" class="iconfont icon-close" @click="addspecificationshow = false"></text>
					</view>
					<view class="dis-flex" style="padding: 30upx 0 ;">
						<view class=" f-32" style="padding-right: 20upx;width: 150upx;">规格名</view>
						<view >
							<input
								class="uni-input t-r"
								v-if="addspecificationshow"
								v-model="addspecificationData.name"
								placeholder-style="font-size:30upx;"
								placeholder="请输入规格名字"
								adjust-position="true"
							/>
						</view>
					</view>
					<view class="dis-flex" style="padding: 30upx 0 ;">
						<view class=" f-32" style="padding-right: 20upx;width: 150upx;font-size: ;">报名费</view>
						<view >
							<input
								class="uni-input t-r"
								v-if="addspecificationshow"
								v-model="addspecificationData.price"
								placeholder-style="font-size:30upx;"
								type="digit"
								placeholder="请输入报名费"
								adjust-position="true"
							/>
						</view>
					</view>
					<view class="dis-flex" style="padding: 30upx 0 ;">
						<view class=" f-32" style="padding-right: 20upx;width: 150upx;">最小人数</view>
						<view >
							<input
								class="uni-input t-r"
								v-if="addspecificationshow"
								v-model="addspecificationData.minnum"
								type="number"
								placeholder-style="font-size:30upx;"
								placeholder="请输入最大报名人数"
								adjust-position="true"
							/>
						</view>
					</view>
					<view class="dis-flex" style="padding: 30upx 0 ;">
						<view class=" f-32" style="padding-right: 20upx;width: 150upx;">最大人数</view>
						<view >
							<input
								class="uni-input t-r"
								v-if="addspecificationshow"
								v-model="addspecificationData.maxnum"
								type="number"
								placeholder-style="font-size:30upx;"
								placeholder="请输入最大报名人数"
								adjust-position="true"
							/>
						</view>
					</view>
					<view class="addspecificationshow-btn" @click="addspecificationsAdd">确定</view>
				</view>
			</PopManager>
		</PopManager>

		<PopManager :show="richText" type="center" @clickmask="richText = false">
			<view class="b-f" style="width: 80vw;height: 80vh;border-radius: 10upx;overflow: auto;" v-if="userInfo.detail">
				<jinEdit placeholder="请输入内容" @editOk="editOk" uploadFileUrl="/#" :html="userInfo.detail"></jinEdit>
			</view>
		</PopManager>
		<PopManager :show="richTextTwo" type="center" @clickmask="richTextTwo = false">
			<!-- 移动端富文本组件 -->
			<view class="b-f" style="width: 80vw;height: 80vh;border-radius: 10upx;overflow: auto;" v-if="userInfo.enrolldetail">
				<jinEdit placeholder="请输入内容" @editOk="editOkTwo" uploadFileUrl="/#" :html="userInfo.enrolldetail"></jinEdit>
			</view>
		</PopManager>
		<!-- <phoneNavBar :checked="'入驻'"></phoneNavBar> -->
		<far-bottom></far-bottom>
	</view>
</template>

<script>
import App from '@/common/js/app.js';
import wPicker from '@/components/w-picker/w-picker.vue';
import PopManager from '@/components/template/PopManager';
import phoneNavBar from '@/components/template/phoneNavBar';
import Loadlogo from '@/components/template/loadlogo.vue';
import jinEdit from '@/components/jin-edit/jin-edit.vue';
// #ifdef H5
import wxApi from '@/common/js/wxApi.js';
// #endif
export default {
	data() {
		return {
			provinceidName: '',
			areaidName: '',
			distidName: '',
			visiblec: false,
			visiblec2: false,
			visiblec3: false,
			visiblec4: false,
			address: '',
			lblis: {},
			klis: false,
			isOpenLaction: false,
			userInfo: {
				thumbs: [],
				thumb: '',
				advs: [],
				activeendtime: '',
				activestarttime: '',
				enrollstarttime: '',
				specarray: [],
				detail: '',
				enrolldetail: '',
				addresstype: '0',
				optionArray: '',
				enrollendtime: ''
			},
			phoneHeight: null,
			latlngs: null,
			owenscitylist: [],
			hangyeshow: false,
			hangYe: true,
			industryclass: '',
			industry: [],
			industrysubdivide: [],
			industryAll: {},
			loadlogo: false,
			pickerarray: ['上架', '下架', '2', '3'],
			pickerindex: 0,
			goodsinfo: {},
			sid: '',
			oldDistid: '',
			uploadlength: 0,
			localIds: [],
			specification: false,
			specificationList: [],
			addspecificationshow: false,
			addspecificationData: {
				name: '',
				price: '',
				maxnum: '',
				minnum: ''
			},
			richText: false,
			richTextVter: '',
			richTextTwo: false,
			richTextVterTwo: '',
			catelist: [],
			diyform: [],
			activityName: '',
			flagIndex: 0,
			flag: false,
			diyformindex: 0,
			statearray: [
				{
					name: '上架',
					id: 1
				},
				{
					name: '下架',
					id: 0
				}
			],
			sitearray: [
				{
					name: '商户店内',
					id: 0
				},
				{
					name: '其他地址',
					id: 1
				}
			],
			stateindex: 0,
			siteindex: 0,
			flag: false
		};
	},
	components: {
		wPicker,
		PopManager,
		phoneNavBar,
		jinEdit,
		Loadlogo
	},
	onHide() {},
	onLoad(e) {
		let _this = this;
		if (e.id) {
			_this.id = e.id;
		}
		if (uni.getSystemInfoSync().system.indexOf('Android') === -1) {
			_this.flag = true;
		} else {
			_this.flag = false;
		}
		_this.sid = e.sid;

		uni.getSystemInfo({
			success(res) {
				_this.phoneHeight = res.windowHeight + 'px';
			}
		});
		_this.owenscitylist = uni.getStorageSync('cityList');
		_this.latlngs = uni.getStorageSync('curLoction');
		_this.getenter(_this.id);
	},
	onShow() {
		let _this = this;
		// #ifdef H5
		window.addEventListener( //定位功能多次复用，建议封装为api，定位功能有多次触发的bug，建议做一个防抖功能，因为每一处的处理不一致，我时间来不及了，交给你了。
			'message',
			function(event) {
				// 接收位置信息，用户选择确认位置点后选点组件会触发该事件，回传用户的位置信息
				let loc = event.data;
				if (_this.klis) {
					return;
				}
				if (loc && loc.module == 'locationPicker') {
					//防止其他应用也会向该页面post信息，需判断module是否为'locationPicker'
					console.log('location', loc);
					// _this.thelat = loc.latlng.lat;
					_this.userInfo.address = loc.poiaddress;
					_this.userInfo.lat = loc.latlng.lat;
					_this.userInfo.lng = loc.latlng.lng;
					_this.isOpenLaction = false;
					_this.lblis = {
						lat: loc.latlng.lat,
						lng: loc.latlng.lng,
						detailed_address: loc.poiaddress
					};
					_this.getloctions(_this.lblis);
				}
				_this.klis = true;
				setTimeout(() => {
					_this.klis = false;
				}, 1000);
			},
			false
		);
		// #endif
		//#ifdef APP-PLUS
		if(_this.userInfo.address){
			_this.lblis.address = _this.userInfo.address;
		}
		//#endif
	},
	methods: {
		deletet(item, index) {
			let _this = this;
			App.showError(
				`确定删除规格${item.name}`,
				data => {
					if (data.confirm) {
						_this.specificationList.splice(index, 1);
					}
				},
				true
			);
		},
		siteChange(e) {
			this.siteindex = e.detail.value;
			this.userInfo.addresstype = this.sitearray[this.siteindex].id + '';
		},
		// 上下架
		stateChange(e) {
			this.stateindex = e.detail.value;
			this.userInfo.status = this.statearray[this.stateindex].id;
		},
		diyformChange(e) {
			this.diyformindex = e.detail.value;
			this.userInfo.diyformid = this.diyform[this.diyformindex].id;
		},
		modification(item, index) {
			let _this = this;
			_this.addspecificationData = item;
			_this.addspecificationshow = true;
			_this.flag = true;
			_this.flagIndex = index;
		},
		addspecificationsAdd() {
			let _this = this;
			for (let i in _this.addspecificationData) {
				if (!_this.addspecificationData[i]) {
					uni.showToast({
						icon: 'none',
						title: '请完善规格信息'
					});
					return;
				}
			}
			if (_this.flag) {
				// debugger
				this.specificationList.splice(_this.flagIndex, 1, _this.addspecificationData);
				_this.flag = false;
				uni.showToast({
					title: '修改成功'
				});
			} else {
				this.specificationList.push(_this.addspecificationData);
				uni.showToast({
					title: '规格添加成功'
				});
			}
			_this.addspecificationData = {
				name: '',
				price: '',
				maxnum: '',
				minnum: ''
			};
			_this.addspecificationshow = false;
		},
		richTextShow() {
			this.richText = true;
		},
		richTextShowTwo() {
			this.richTextTwo = true;
		},
		editOk(res) {
			console.log(res.html);
			this.userInfo.detail = res.html;
			this.richText = false;
		},
		editOkTwo(res) {
			console.log(res.html);
			this.userInfo.enrolldetail = res.html;
			this.richTextTwo = false;
		},
		addspecification() {
			this.addspecificationshow = true;
			this.addspecificationData = {
				name: '',
				price: '',
				maxnum: '',
				minnum: ''
			};
		},
		specificationShow() {
			console.log(11111);
			this.specification = true;
		},
		// 活动结束时间
		onConfirmdeteTwo(e) {
			this.userInfo.activeendtime = e.value;
			// let date = new Date(e.value).getTime();
			// console.log(e, date);
		},
		// 活动开始时间
		onConfirmdete(e) {
			console.log(this.getDataTime(e.value));
			this.userInfo.activestarttime = e.value;
			// let date = new Date(e.value).getTime();
			// console.log(e, date);
		},
		// 报名结束时间
		onConfirmdete4(e) {
			this.userInfo.enrollendtime = e.value;
			// let date = new Date(e.value).getTime();
			// console.log(e, date);
		},
		// 报名开始时间
		onConfirmdete3(e) {
			this.userInfo.enrollstarttime = e.value;
			// let date = new Date(e.value).getTime();
			// console.log(e, date);
		},
		getDataTime(timeValue) {
			// debugger
			let ontime;
			if (this.flag) {
				ontime = timeValue.replace(/-/g, '/');
			} else {
				ontime = timeValue;
			}
			let date = new Date(ontime);
			let time = date.getTime();
			time = time / 1000;
			return time;
		},
		submit() {
			let _this = this;
			_this.userInfo.optionArray = '';
			let data = JSON.parse(JSON.stringify(_this.userInfo));
			let param;
			if (_this.specificationList) {
				let jsonString = JSON.stringify(_this.specificationList);
				let base64 = new this.$util.Base64();
				param = base64.encode(jsonString);
				// Object.assign(data, {
				// 	optionArray: param
				// })
				data['optionArray'] = param;
			}
			// debugger
			data.sid = _this.sid;
			if (_this.id) {
				data.id = _this.id;
			}
			// data.activestarttime = new Date(data.activestarttime).getTime();
			// data.activeendtime = new Date(data.activeendtime).getTime();
			// data.enrollstarttime = new Date(data.enrollstarttime).getTime();
			// data.enrollendtime = new Date(data.enrollendtime).getTime();
			if (data.detail == '<div></div>') {
				data.detail = '';
			}
			if (data.enrolldetail == '<div></div>') {
				data.enrolldetail = '';
			}
			console.log(data);
			if (!data.activestarttime || !data.activeendtime || !data.enrollstarttime || !data.enrollendtime) {
				uni.showToast({
					icon: 'none',
					title: '请完善活动资料1'
				});

				return;
			}

			data.activestarttime = _this.userInfo.activestarttime;
			data.activeendtime = _this.userInfo.activeendtime;
			data.enrollstarttime = _this.userInfo.enrollstarttime;
			data.enrollendtime = _this.userInfo.enrollendtime;

			if (!_this.userInfo.minpeoplenum) {
				_this.userInfo.minpeoplenum = 0;
			}
			if (!_this.userInfo.maxpeoplenum) {
				_this.userInfo.maxpeoplenum = 0;
			}
			if (!_this.userInfo.price) {
				_this.userInfo.price = 0;
			}
			data.status = _this.statearray[_this.stateindex].id;

			console.log(data);
			if (!data.title || !data.activestarttime || !data.activeendtime || !data.enrollstarttime || !data.enrollendtime) {
				console.log(data);
				// 此处ios端口的时间数据会被多规格数据干掉,原因未知,重新赋值一次
				data.activestarttime = _this.userInfo.activestarttime;
				data.activeendtime = _this.userInfo.activeendtime;
				data.enrollstarttime = _this.userInfo.enrollstarttime;
				data.enrollendtime = _this.userInfo.enrollendtime;
				if (!data.activestarttime || !data.activeendtime || !data.enrollstarttime || !data.enrollendtime) {
					console.log(data);
					uni.showToast({
						icon: 'none',
						title: '请完善活动信息'
					});
					return;
				} else {
					App._post_form(
						`&p=activity&do=createActivityApi`,
						data,
						res => {
							console.log(res, '提交结果');
							if (res.errno == 0) {
								uni.showToast({
									title: res.message
								});
								setTimeout(() => {
									App.navigationTo({
										url: 'pages/subPages/merchant/merchantOrder/merchantOrder'
									});
								}, 1000);
							}
						},
						false,
						() => {}
					);
					return;
				}
				return;
			}
			// for (let key in data) {
			// 	if (key == 'title' || key == 'activestarttime' || key == 'activeendtime' || key == 'enrollstarttime' || key == 'enrollendtime') {
			// 		if (!data[key]) {

			// 		}
			// 	}
			// }
			App._post_form(
				`&p=activity&do=createActivityApi`,
				data,
				res => {
					console.log(res, '提交结果');
					if (res.errno == 0) {
						uni.showToast({
							title: res.message
						});
						setTimeout(() => {
							App.navigationTo({
								url: 'pages/subPages/merchant/merchantOrder/merchantOrder'
							});
						}, 1000);
					}
				},
				false,
				() => {}
			);
		},
		bindPickerChange(e) {
			// debugger
			this.pickerindex = e.detail.value;
			this.userInfo.cateid = this.catelist[this.pickerindex].id;
			this.activityName = this.catelist[this.pickerindex].name;
			console.log(e, this.activityName, this.catelist[this.pickerindex].name);
		},
		clickclass(item) {
			// console.log(item);
			for (let key in this.industryAll) {
				this.industryAll[key].map(items => {
					items.checked = false;
					if (items.id == item.id) {
						items.checked = true;
						this.industryclass = items.name;
						this.userInfo.two_class = items.id;
						this.industrysubdivide = this.industryAll[key];
						this.confirm();
					}
				});
			}

			// this.industryAll.map((items,indexs)=>{
			// 	items.twotype.map((itemss,indexss)=>{
			// 		itemss.checked = false;
			// 		if(item.id == itemss.id){
			// 			itemss.checked = true;
			// 			this.industryclass = item.name
			// 		}
			// 	})
			// })

			this.loadlogo = false;
			this.loadlogo = true;
		},
		clickindustry(keys) {
			for (let key in this.industry) {
				this.industry[key].checked = false;
				if (keys == key) {
					this.industry[keys].checked = true;
					this.userInfo.one_class = this.industry[keys].id;
				}
			}
			for (let key in this.industryAll) {
				if (keys == key) {
					this.industrysubdivide = this.industryAll[keys];
				}
			}
			// console.log(item);
			this.loadlogo = false;
			this.loadlogo = true;
		},
		addtime(value) {
			let time = value * 1000;
			if (typeof time == 'undefined') {
				return '';
			} else {
				let date = new Date(parseInt(time));
				let y = date.getFullYear();
				let MM = date.getMonth() + 1;
				MM = MM < 10 ? '0' + MM : MM;
				let d = date.getDate();
				d = d < 10 ? '0' + d : d;
				let h = date.getHours();
				h = h < 10 ? '0' + h : h;
				let m = date.getMinutes();
				m = m < 10 ? '0' + m : m;
				let s = date.getSeconds();
				s = s < 10 ? '0' + s : s;
				return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
			}
		},
		getenter(id) {
			let _this = this;
			App._post_form(
				`&p=activity&do=createActivityPage&id=${id || ''}&sid=${_this.sid || ''}`,
				{},
				res => {
					console.log(res, '活动初始化');
					_this.catelist = res.data.catelist;
					_this.diyform = res.data.diyform;
					let add = {
						title: '无表单',
						id: ''
					};
					_this.diyform.unshift(add);
					// _this.activityName = res.data.catelist[0].name;
					if (res.data.activity) {
						_this.userInfo = res.data.activity;
					} else {
						_this.userInfo.detail = '<div></div>';
						_this.userInfo.enrolldetail = '<div></div>';
						_this.pickerindex = 0;
						_this.userInfo.cateid = _this.catelist[0].id;
						_this.activityName = _this.catelist[0].name;
						return;
					}

					if (!_this.userInfo.detail) {
						_this.userInfo.detail = '<div></div>';
						// _this.userInfo.enrolldetail = '<div></div>';
					}
					if (!_this.userInfo.enrolldetail) {
						// _this.userInfo.detail = '<div></div>';
						_this.userInfo.enrolldetail = '<div></div>';
					}
					_this.siteindex = res.data.activity.addresstype;
					if (_this.userInfo.cateid) {
						_this.catelist.map((item, index) => {
							if (item.id == _this.userInfo.cateid) {
								_this.pickerindex = index;
								_this.activityName = item.name;
							}
						});
					}
					if (_this.userInfo.diyformid) {
						_this.diyform.map((item, index) => {
							if (item.id == _this.userInfo.diyformid) {
								_this.diyformindex = index;
							}
						});
					}
					_this.stateindex = res.data.activity.status == 1 ? 0 : 1;
					if (_this.userInfo.activeendtime) {
						_this.userInfo.activeendtime = _this.addtime(Number(_this.userInfo.activeendtime));
						_this.userInfo.activestarttime = _this.addtime(Number(_this.userInfo.activestarttime));
						_this.userInfo.enrollendtime = _this.addtime(Number(_this.userInfo.enrollendtime));
						_this.userInfo.enrollstarttime = _this.addtime(Number(_this.userInfo.enrollstarttime));
					}
					if (_this.userInfo.specarray) {
						_this.specificationList = _this.userInfo.specarray;
					}
					console.log(_this.userInfo.activeendtime, _this.userInfo.activestarttime, _this.userInfo.enrollendtime, _this.userInfo.enrollstarttime);
				},
				false,
				() => {
					_this.loadlogo = true;
					// console.log('行业加载完')
				}
			);
		},
		lookimg(type, url, index) {
			if (type == 1) {
				let img = [];
				img.push(url);
				uni.previewImage({
					urls: img,
					current: 0
				});
			} else {
				uni.previewImage({
					urls: url,
					current: index
				});
			}
		},
		closePreview(type, url) {
			let _this = this;
			if (type == 2) {
				for (let i = 0; i < _this.userInfo.thumbs.length; i++) {
					if (url == _this.userInfo.thumbs[i]) {
						_this.userInfo.thumbs.splice(i, 1);
						// _this.userInfo.thumbs.splice(i, 1);
					}
				}
			} else {
				for (let i = 0; i < _this.userInfo.advs.length; i++) {
					if (url == _this.userInfo.advs[i]) {
						_this.userInfo.advs.splice(i, 1);
						// _this.userInfo.thumbs.splice(i, 1);
					}
				}
			}
		},
		closeLogo() {
			this.userInfo.logo = '';
			this.userInfo.thumb = '';
		},
		uplodephone(length, localIds, type) {
			let _this = this;
			wxApi.uoloadIg(localIds[length], data => {
				if (data.errMsg === 'uploadImage:ok') {
					uni.showLoading({});
					let requestData = {
						upload_type: 2,
						id: data.serverId
					};
					App._post_form(
						'&do=uploadFiles',
						requestData,
						res => {
							if (res.errno === 0) {
								let num = length + 1;
								// uni.setTimeout(_this.uoloadIgs(length, ids, resImg, type), 500);
								// setTimeout(()=>{
								// 	_this.uplodephone(_this.uploadlength,_this.localIds);
								// },100)
								// uni.showToast({
								// 	title:'chengg',
								// 	icon:'none'
								// })
								if (type == 2) {
									_this.userInfo.thumbs.push(res.data.img);
								} else {
									_this.userInfo.advs.push(res.data.img);
								}

								if (num < _this.uploadlength) {
									uni.setTimeout(_this.uplodephone(num, _this.localIds, type), 500);
								}
								// _this.userInfo.thumbs.push(res.data.image);
							}
						},
						false,
						() => {
							uni.hideLoading();
						}
					);
				} else {
					uni.hideLoading();
					App.showError('上传失败');
				}
			});
		},
		// 文件上传接口
		async uploadFiles(type, num) {
			let _this = this;
			// _this.uoloadIgs(i, 0, res, type);
			// #ifdef H5
			if(App.getClientType() == 2){
				let res = await App.browser_upload(num);
			    if(type == 1){
					for (let i = 0; i < res.tempFilePaths.length; i++) {
						let aa = await App._upLoad(res.tempFilePaths[i]);
						_this.userInfo.thumb = aa.data.img;
						_this.userInfo.logo = aa.data.image;
					}
				}else{
					for (let i = 0; i < res.tempFilePaths.length; i++) {
						let aa = await App._upLoad(res.tempFilePaths[i]);
						if (type == 2) {
							_this.userInfo.thumbs.push(aa.data.img);
							// _this.userInfo.thumbs.push(aa.data.image);
							console.log(_this.userInfo, aa.data.img);
						}
						if (type == 3) {
							_this.userInfo.advs.push(aa.data.img);
							// _this.userInfo.thumbs.push(aa.data.image);
							console.log(_this.userInfo, aa.data.img);
						}
					}
				}
				return
			}
			if (type == 2) {
				wxApi.choseImage(res => {
					// let length
					_this.localIds = res.localIds;
					_this.uploadlength = res.localIds.length;
					_this.uplodephone(0, _this.localIds, type);
				}, 6);
			} else if (type == 1) {
				wxApi.choseImage(res => {
					let length = res.localIds.length;
					res.localIds.map(item => {
						wxApi.uoloadIg(item, data => {
							if (data.errMsg === 'uploadImage:ok') {
								uni.showLoading({});
								let requestData = {
									upload_type: 2,
									id: data.serverId
								};
								App._post_form(
									'&do=uploadFiles',
									requestData,
									res => {
										if (res.errno === 0) {
											if (type == 1) {
												_this.userInfo.thumb = res.data.img;
												_this.userInfo.logo = res.data.image;
											}
											if (type == 2) {
												_this.userInfo.thumbs.push(res.data.img);
												// _this.userInfo.thumbs.push(res.data.image);
											}
										}
									},
									false,
									() => {
										uni.hideLoading();
									}
								);
							} else {
								uni.hideLoading();
								App.showError('上传失败');
							}
						});
					});
				});
			} else {
				wxApi.choseImage(res => {
					// let length
					_this.localIds = res.localIds;
					_this.uploadlength = res.localIds.length;
					_this.uplodephone(0, _this.localIds, type);
				}, 6);
			}

			// #endif
			// #ifndef H5
			if (type == 1) {
				wx.chooseImage({
					count: 1,
					sourceType: ['album', 'camera'],
					success: async function(res) {
						// console.log(_this.userInfo.havestore, _this.page, '-------');
						for (let i = 0; i < res.tempFilePaths.length; i++) {
							let aa = await App._upLoad(res.tempFilePaths[i]);
							_this.userInfo.thumb = aa.data.img;
							_this.userInfo.logo = aa.data.image;
						}
					}
				});
			} else {
				wx.chooseImage({
					count: 6,
					sourceType: ['album', 'camera'],
					success: async function(res) {
						// console.log(_this.userInfo.havestore, _this.page, '-------');
						for (let i = 0; i < res.tempFilePaths.length; i++) {
							let aa = await App._upLoad(res.tempFilePaths[i]);
							if (type == 2) {
								_this.userInfo.thumbs.push(aa.data.img);
								// _this.userInfo.thumbs.push(aa.data.image);
								console.log(_this.userInfo, aa.data.img);
							}
							if (type == 3) {
								_this.userInfo.advs.push(aa.data.img);
								// _this.userInfo.thumbs.push(aa.data.image);
								console.log(_this.userInfo, aa.data.img);
							}
						}
					}
				});
			}

			// #endif
		},
		showThePic() {
			this.hangYe = !this.hangYe;
			this.hangyeshow = !this.hangyeshow;
		},
		closeShareBottom() {
			this.hangyeshow = !this.hangyeshow;
			this.hangYe = !this.hangYe;
		},
		onCancel() {},
		cancel() {
			this.hangyeshow = false;
		},
		confirm() {
			this.hangyeshow = false;
		},
		getcityclass() {
			// let _this = this;
			// let data = {
			// 	provinceid:this.userInfo.provinceid,
			// 	areaid:this.userInfo.areaid,
			// 	distid:this.userInfo.distid
			// }
			// App._post_form(
			// 	`&p=yellowpage&do=area2cate`,
			// 	data,
			// 	res => {
			// 		console.log(res,'更换地区结果');
			// 		_this.industry = res.data.parents;
			// 		for(let key  in _this.industry){
			// 				_this.industry[key].checked = false;
			// 		  };
			// 		  console.log(_this.industry,'测试自动');
			// 		_this.industryAll = res.data.childrens;
			// 		for(let key  in _this.industryAll){
			// 				_this.industryAll[key].map(item=>{
			// 					item.checked = false;
			// 					if(item.id == _this.userInfo.two_class){
			// 						_this.industrysubdivide = [];
			// 						_this.loadlogo = false;
			// 						_this.loadlogo = true;
			// 					}
			// 				})
			// 				console.log(_this.industryAll,'还地区')
			// 		  };
			// 		  _this.userInfo.one_class = '';
			// 		  _this.userInfo.two_class = '';
			// 		   _this.industryclass = '';
			// 		  if(Array.isArray(res.data.childrens) || Array.isArray(res.data.parents)){
			// 			  _this.industrysubdivide = res.data.childrens;
			// 			  _this.industryclass = '当前地区暂无行业分类';
			// 			  if(_this.oldDistid !== _this.userInfo.distid){
			// 			  	uni.showToast({
			// 			  		title:'当前地区暂无行业分类',
			// 			  									icon:'none'
			// 			  	});
			// 			  }
			// 		  }else{
			// 			  console.log(_this.oldDistid,_this.userInfo.distid,777777)
			// 			  if(_this.oldDistid !== _this.userInfo.distid){
			// 				  uni.showToast({
			// 				  	title:'更换地区请重新选择当前地区行业',
			// 				  	icon:'none'
			// 				  });
			// 			  }
			// 		  }
			// 		  _this.loadlogo = false;
			// 		  _this.loadlogo = true;
			// 		// App.navigationTo({
			// 		// 	url: 'pages/mainPages/payment/payment?orderid=' + res.data.orderid
			// 		// });
			// 	},
			// 	false,
			// 	() => {
			// 	}
			// );
		},
		onConfirm(e) {
			console.log(e);
			let _this = this;
			this.provinceidName = e.obj.province.label;
			this.areaidName = e.obj.city.label;
			this.distidName = e.obj.area.label;
			this.oldDistid = this.userInfo.distid;
			this.userInfo.provinceid = e.value[0];
			this.userInfo.areaid = e.value[1];
			this.userInfo.distid = e.value[2];
			this.getcityclass();
		},
		visble() {
			this.visiblec = true;
		},
		visbleTwo() {
			this.visiblec2 = true;
		},
		visble3() {
			this.visiblec3 = true;
		},
		visble4() {
			this.visiblec4 = true;
		},
		getLocation() {
			let _this = this;
			// #ifdef MP-WEIXIN
			uni.chooseLocation({
				keyword: '',
				success: function(e) {
					_this.userInfo.address = e.address;
					_this.userInfo.lat = e.latitude;
					_this.userInfo.lng = e.longitude;
					_this.lblis.lat = e.latitude;
					_this.lblis.lng = e.longitude;
					_this.lblis.address = e.address;
					// console.log(e);
					// _this.onkoc = 0;
					_this.getloctions(_this.lblis);
				}
			});
			// #endif
			// #ifdef H5
			_this.isOpenLaction = true;
			// #endif
			//#ifdef APP-PLUS
				App.navigationTo({
					url: 'pages/subPages2/map/index'
				});
			//#endif
		},
		getloctions(lblis) {
			let _this = this;
			// console.log(_this.owenscitylist);
			App._post_form(`&p=member&do=lng2areaid&lng=${lblis.lng}&lat=${lblis.lat}`, {}, res => {
				// _this.userInfo.address = lblis.address;
				console.log(_this.userInfo.distid, res.data.countyid, '666666');
				_this.oldDistid = _this.userInfo.distid;
				_this.userInfo.provinceid = res.data.provinceid;
				_this.userInfo.distid = res.data.countyid;
				_this.userInfo.areaid = res.data.cityid;
				_this.owenscitylist.map((item, index) => {
					if (item.id == _this.userInfo.provinceid) {
						_this.provinceidName = item.name;
						item.area.map(items => {
							if (items.id == _this.userInfo.areaid) {
								_this.areaidName = items.name;
								items.dist.map(itemss => {
									if (itemss.id == _this.userInfo.distid) {
										_this.distidName = itemss.name;
										this.getcityclass();
									}
								});
							}
						});
					}
				});
			});
		}
	}
};
</script>

<style>
page {
	background-color: #f7f7f7;
}
</style>
<style lang="scss" scoped>
.enterForm {
	// padding: 30upx;
	.bgimgbox {
		.bgimg {
			width: 100vw;
			height: 25vh;
		}
	}
	.formbox {
		padding: 30upx;
		padding-bottom: 130upx;
		// height: 50vh;
		position: relative;
		.formdatabox {
			padding: 30upx;
			width: 84vw;
			background-color: #ffffff;
			border-radius: 15upx;
			position: relative;
			top: -340upx;
			.sign {
				height: 28upx;
				margin-top: 5upx;
				width: 8upx;
				background-color: #ff4444;
				border-radius: 30%;
				flex: 0.014;
			}
		}
		.logobox {
			span {
				font-size: 24upx;
			}
			.userImgUpdataon {
				width: 180upx;
				margin: 20upx 0;
				height: 180upx;
				border-radius: 10upx;
				border: 1upx solid #cccccc;
				position: relative;
				overflow: hidden;
				.imgs {
					width: 180upx;
					height: 180upx;
				}
				.close {
					position: absolute;
					width: 30upx;
					height: 30upx;
					right: 10upx;
					top: 10upx;
				}
			}
			.userImgUpdata {
				width: 180upx;
				margin: 20upx 0;
				height: 180upx;
				border-radius: 10upx;
				border: 1upx solid #cccccc;
				position: relative;
				.img {
					width: 80upx;
					height: 80upx;
					position: absolute;
					left: 50%;
					top: 30%;
					transform: translate(-50%);
				}
			}
		}
		.formtitle {
			padding: 25upx 10upx;
			background-color: #fafafa;
			margin-top: 20upx;
			border-radius: 10upx;
		}
	}
	.iframe-wid-hgt {
		width: 100vw;
	}
	.hangye {
		height: 40vh;
		width: 100vw;
		box-sizing: border-box;
		padding: 30upx;
		background-color: #ffffff;
		border-radius: 15upx 15upx 0 0;
		.industryclass-item {
			padding: 20upx;
			margin: 15upx;
			text-align: center;
			border-radius: 15upx;
		}
		.classcheck {
			background-color: #f7f7f7;
		}
		.isclasschecked {
			background-color: #ff4444;
			color: #ffffff;
		}
	}
	.timePickerView {
		width: 100%;
	}
}
.specificationClass {
	width: 80vw;
	height: 1000upx;
	border-radius: 20upx;
	background-color: #f7f7f7;
	padding: 30upx;
	.title {
		padding: 20upx 0;
		color: #6f6f6f;
	}
	.content {
		background-color: #ffffff;
		border-radius: 10upx;
		margin-top: 20upx;
		padding: 40upx 20upx 20upx;
		position: relative;
		.content-item {
			border-bottom: 1upx solid #f1f1f1;
			color: #000000;
			height: 60upx;
			line-height: 60upx;
			font-size: 28upx;
		}
	}
	.specificationBtn {
		width: 70vw;
		margin: auto;
		height: 80upx;
		line-height: 80upx;
		background-color: #ff4444;
		color: #ffffff;
		margin-top: 50upx;
		border-radius: 15upx;
		text-align: center;
		font-size: 30upx;
		transition: transform 0.3s ease-out;
	}
	.specificationBtn:active {
		background-color: #bc3434;
	}
}
.addspecificationshow {
	width: 70vw;
	// height: 500upx;
	background-color: #ffffff;
	border-radius: 15upx;
	padding: 30upx;
	border: 1upx solid #ff4444;
	.addspecificationshow-btn {
		width: 100%;
		height: 80upx;
		color: #ffffff;
		text-align: center;
		font-size: 36upx;
		line-height: 80upx;
		background-color: #ff4444;
		transition: transform 0.3s ease-out;
		border-radius: 10upx;
	}
}
</style>
