소스 검색

feat: 添加个人中心广告,添加新模组

cmy 3 달 전
부모
커밋
199cbc06bb
4개의 변경된 파일564개의 추가작업 그리고 347개의 파일을 삭제
  1. 19 9
      pages/modelData/index.vue
  2. 76 0
      pages/modelData/modeltemplate/model_4.vue
  3. 400 337
      pages/user/model/modelrz.vue
  4. 69 1
      pages/userhome/user.vue

+ 19 - 9
pages/modelData/index.vue

@@ -6,6 +6,8 @@
 			:isShare='isShare' :isLook='isLook'></model2>
 		<model3 :shareNumber='shareNumber' @openImage='openImage' :isDefault='isDefault' v-else-if="modelId==5"  :templateDetail='templateData'
 			:isShare='isShare' :isLook='isLook'></model3>
+		<model4 :shareNumber='shareNumber' @openImage='openImage' :isDefault='isDefault' v-else-if="modelId==6"  :templateDetail='templateData'
+			:isShare='isShare' :isLook='isLook'></model4>
 		<template v-if="imageList.length>0">
 			<q-previewImage ref="previewImage" :urls="imageList" 
 				@close="close" @open="open"  @onLongpress="onLongpress"></q-previewImage>
@@ -17,6 +19,7 @@
 	import model1 from './modeltemplate/model_1.vue';
 	import model2 from './modeltemplate/model_2.vue'
 	import model3 from './modeltemplate/model_3.vue'
+	import model4 from './modeltemplate/model_4.vue'
 	export default {
 		props: {
 			// 浏览数量
@@ -52,22 +55,29 @@
 		components: {
 			model1,
 			model2,
-			model3
+			model3,
+			model4
 		},
 		computed: {
 			imageList() {
 				try{
 					let templateData = this.templateData;
 					let arr = [];
-					if(templateData.service_intro_imgs && templateData.service_intro_imgs.length > 0){
-						arr = [...templateData.service_intro_imgs]
-					}
-					if (templateData.service_audit_imgs && templateData.service_audit_imgs.length > 0) {
-						arr = arr.concat(templateData.service_audit_imgs)
-					}
-					if (templateData.service_imgs && templateData.service_imgs.length > 0) {
-						arr = arr.concat(templateData.service_imgs)
+					if(templateData.modelType==0){
+						if(templateData.service_intro_imgs && templateData.service_intro_imgs.length > 0){
+							arr = [...templateData.service_intro_imgs]
+						}
+						if (templateData.service_audit_imgs && templateData.service_audit_imgs.length > 0) {
+							arr = arr.concat(templateData.service_audit_imgs)
+						}
+						if (templateData.service_imgs && templateData.service_imgs.length > 0) {
+							arr = arr.concat(templateData.service_imgs)
+						}
+					}else if(templateData.modelType==1){
+						arr = arr.concat(templateData.model_imgs)
 					}
+					
+					
 					return arr
 				}catch(e){
 					console.log(e,'eeee')

+ 76 - 0
pages/modelData/modeltemplate/model_4.vue

@@ -0,0 +1,76 @@
+<template>
+	<view class="mone">
+		<template v-for="ls in cardInfo.model_imgs">
+			<image :src="ls" class="image" mode="widthFix"></image>
+		</template>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+	} from 'vuex';
+	export default {
+		props: {
+			// 浏览数量
+			shareNumber: {
+				type: Number,
+				default:0
+			},
+			// 是否显示默认数据
+			isDefault: {
+				type: Boolean,
+				default: true
+			},
+			isShare: {
+				type: Boolean,
+				default: false
+			},
+			//1为模板2为用户
+			isLook: {
+				type: Number,
+				default: 0
+			},
+			templateDetail: {
+				type: Object,
+				default: () => {
+					return {}
+				}
+			},
+		},
+		data() {
+			return {
+				defaults: {
+					model_imgs: [
+						'https://api.myjie.cn/resource/user/user1/fw1.png',
+						'https://api.myjie.cn/resource/user/user1/fw2.png',
+						'https://api.myjie.cn/resource/user/user1/fw3.png',
+						'https://api.myjie.cn/resource/user/user1/fw4.png'
+					],
+				}
+			}
+		},
+		computed: {
+			...mapState(['baseURL']),
+			cardInfo() {
+				if (this.isDefault) {
+					return this.defaults
+				} else {
+					console.log(this.templateDetail,'this.templateDetail')
+					return this.templateDetail
+				}
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.mone {
+		display: flex;
+		flex-direction: column;
+		line-height: 0;
+		.image{
+			width: 750rpx;
+		}
+	}
+</style>

+ 400 - 337
pages/user/model/modelrz.vue

@@ -3,290 +3,318 @@
 		<view class="errorIf" v-if="dataInitError">
 			初始化数据失败请重新填写数据
 		</view>
-		<view class="item-name">
-			上传头像
+		<view class="table flex">
+			<text class="table-text" @click="updata.modelType=0" :class="{action:updata.modelType==0}">
+				图文模式
+			</text>
+			<text class="table-text" @click="updata.modelType=1" :class="{action:updata.modelType==1}">
+				纯图模式
+			</text>
 		</view>
-		<view class="con_box">
-			<view class="con_image">
-				<image class="img" @click="navCroper(400,400,'one')"
-					:src="updata.avatar||`../../../static/image/upImg.png`">
-				</image>
+		<template v-if="updata.modelType==0">
+			<view class="item-name">
+				上传头像
 			</view>
-		</view>
-		<view class="item-name">
-			基本信息
-		</view>
-		<view class="listBox">
-			<view class="list">
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="font-color-red font-size-sm">✲</text> <text class="title">真实姓名</text>
-					</view>
-					<view class="right flex">
-						<input class="input" v-model="updata.name" type="text" placeholder="请填写真实姓名"
-							placeholder-class="placeholder" />
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="font-color-red font-size-sm">✲</text><text class="title">手机号</text>
-					</view>
-					<view class="right flex">
-						<input class="input" v-model="updata.phone" type="text" placeholder="请填写手机号"
-							placeholder-class="placeholder" />
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="font-color-red font-size-sm">✲</text><text class="title">身份证号</text>
-					</view>
-					<view class="right flex">
-						<input class="input" v-model="updata.cardId" type="text" placeholder="请填写身份证号"
-							placeholder-class="placeholder" />
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">从业时长</text>
-					</view>
-					<view class="right flex">
-						<input class="input" v-model="updata.work_year" type="number" placeholder="请填写从业时长"
-							placeholder-class="placeholder" />
-					</view>
+			<view class="con_box">
+				<view class="con_image">
+					<image class="img" @click="navCroper(400,400,'one')"
+						:src="updata.avatar||`../../../static/image/upImg.png`">
+					</image>
 				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">籍贯</text>
+			</view>
+			<view class="item-name">
+				基本信息
+			</view>
+			<view class="listBox">
+				<view class="list">
+					<view class="flex listItem">
+						<view class="flex titleBox">
+							<text class="font-color-red font-size-sm">✲</text> <text class="title">真实姓名</text>
+						</view>
+						<view class="right flex">
+							<input class="input" v-model="updata.name" type="text" placeholder="请填写真实姓名"
+								placeholder-class="placeholder" />
+						</view>
 					</view>
-					<!-- <view class="right flex">
-						<pickerAddress @change="changeAncestralPlace">
-							{{
-								updata.ancestral_place||'请选择籍贯'
-							}}
-						</pickerAddress>
-					</view> -->
-					<view class="right flex">
-						<picker class="input" :range='jgList' mode="selector" @change="changeAncestralPlace"
-							range-key="name">
-							<view>
-								{{updata.ancestral_place||'选择籍贯'}}
-							</view>
-						</picker>
+					<view class="flex listItem">
+						<view class="flex titleBox">
+							<text class="font-color-red font-size-sm">✲</text><text class="title">手机号</text>
+						</view>
+						<view class="right flex">
+							<input class="input" v-model="updata.phone" type="text" placeholder="请填写手机号"
+								placeholder-class="placeholder" />
+						</view>
 					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">学历</text>
+					<view class="flex listItem">
+						<view class="flex titleBox">
+							<text class="font-color-red font-size-sm">✲</text><text class="title">身份证号</text>
+						</view>
+						<view class="right flex">
+							<input class="input" v-model="updata.cardId" type="text" placeholder="请填写身份证号"
+								placeholder-class="placeholder" />
+						</view>
 					</view>
-					<view class="right flex">
-						<picker class="input" :range='educationList' mode="selector" @change="changeEducation">
-							<view>
-								{{updata.education||'选择学历'}}
-							</view>
-						</picker>
+					<view class="flex listItem">
+						<view class="flex titleBox">
+							<text class="title">从业时长</text>
+						</view>
+						<view class="right flex">
+							<input class="input" v-model="updata.work_year" type="number" placeholder="请填写从业时长"
+								placeholder-class="placeholder" />
+						</view>
 					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">民族</text>
+					<view class="flex listItem">
+						<view class="flex titleBox">
+							<text class="title">籍贯</text>
+						</view>
+						<!-- <view class="right flex">
+							<pickerAddress @change="changeAncestralPlace">
+								{{
+									updata.ancestral_place||'请选择籍贯'
+								}}
+							</pickerAddress>
+						</view> -->
+						<view class="right flex">
+							<picker class="input" :range='jgList' mode="selector" @change="changeAncestralPlace"
+								range-key="name">
+								<view>
+									{{updata.ancestral_place||'选择籍贯'}}
+								</view>
+							</picker>
+						</view>
 					</view>
-					<view class="right flex">
-						<input class="input" v-model="updata.minority" type="text" placeholder="请填写民族"
-							placeholder-class="placeholder" />
+					<view class="flex listItem">
+						<view class="flex titleBox">
+							<text class="title">学历</text>
+						</view>
+						<view class="right flex">
+							<picker class="input" :range='educationList' mode="selector" @change="changeEducation">
+								<view>
+									{{updata.education||'选择学历'}}
+								</view>
+							</picker>
+						</view>
 					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">身高</text>
+					<view class="flex listItem">
+						<view class="flex titleBox">
+							<text class="title">民族</text>
+						</view>
+						<view class="right flex">
+							<input class="input" v-model="updata.minority" type="text" placeholder="请填写民族"
+								placeholder-class="placeholder" />
+						</view>
 					</view>
-					<view class="right flex">
-						<input class="input" v-model="updata.height" type="number" placeholder="请填写身高"
-							placeholder-class="placeholder" />
-						<text class="margin-l-10 flex-shrink-false">厘米</text>
+					<view class="flex listItem">
+						<view class="flex titleBox">
+							<text class="title">身高</text>
+						</view>
+						<view class="right flex">
+							<input class="input" v-model="updata.height" type="number" placeholder="请填写身高"
+								placeholder-class="placeholder" />
+							<text class="margin-l-10 flex-shrink-false">厘米</text>
+						</view>
 					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">体重</text>
+					<view class="flex listItem">
+						<view class="flex titleBox">
+							<text class="title">体重</text>
+						</view>
+						<view class="right flex">
+							<input class="input" v-model="updata.weight" type="number" placeholder="请填写体重"
+								placeholder-class="placeholder" />
+							<text class="margin-l-10">kg</text>
+						</view>
 					</view>
-					<view class="right flex">
-						<input class="input" v-model="updata.weight" type="number" placeholder="请填写体重"
-							placeholder-class="placeholder" />
-						<text class="margin-l-10">kg</text>
+					<!-- <view class="flex listItem">
+						<view class="flex titleBox">
+							<text class="title">出生日期</text>
+						</view>
+						<view class="right flex">
+							<picker class="input" value='2000-01-01' mode="date" @change="changetime">
+								<view>
+									{{updata.time||'请选择日期'}}
+								</view>
+							</picker>
+						</view>
+					</view> -->
+					<view class="flex listItem">
+						<view class="flex titleBox">
+							<text class="font-color-red font-size-sm">✲</text><text class="title">职业</text>
+						</view>
+						<view class="right flex">
+							<picker class="input" :range='workTypeList' range-key='title' mode="selector"
+								@change="changeWorkType">
+								<view>
+									{{updata.word.title||'选择职业'}}
+								</view>
+							</picker>
+						</view>
 					</view>
-				</view>
-				<!-- <view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">出生日期</text>
+					<view class="flex listItem">
+						<view class="flex titleBox">
+							<text class="font-color-red font-size-sm">✲</text><text class="title">收费类型</text>
+						</view>
+						<view class="right flex">
+							<picker class="input" :value="updata.timetype.ind" :range='timeTypeList' range-key='title'
+								mode="selector" @change="changetimetype">
+								<view>
+									{{updata.timetype.title||'收费时间类型'}}
+								</view>
+							</picker>
+						</view>
 					</view>
-					<view class="right flex">
-						<picker class="input" value='2000-01-01' mode="date" @change="changetime">
-							<view>
-								{{updata.time||'请选择日期'}}
-							</view>
-						</picker>
+					<view class="flex listItem">
+						<view class="flex titleBox">
+							<text class="font-color-red font-size-sm">✲</text><text class="title">最低价</text>
+						</view>
+						<view class="right flex">
+							<input class="input" v-model="updata.minMoney" type="number" placeholder="请输入最低收费价"
+								placeholder-class="placeholder" />
+						</view>
 					</view>
-				</view> -->
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="font-color-red font-size-sm">✲</text><text class="title">职业</text>
+					<view class="flex listItem">
+						<view class="flex titleBox">
+							<text class="font-color-red font-size-sm">✲</text><text class="title">最高价</text>
+						</view>
+						<view class="right flex">
+							<input class="input" v-model="updata.maxMoney" type="number" placeholder="请输入最高收费价"
+								placeholder-class="placeholder" />
+						</view>
 					</view>
-					<view class="right flex">
-						<picker class="input" :range='workTypeList' range-key='title' mode="selector"
-							@change="changeWorkType">
-							<view>
-								{{updata.word.title||'选择职业'}}
-							</view>
-						</picker>
+					<view class="flex listItem">
+						<view class="flex titleBox">
+							<text class="font-color-red font-size-sm">✲</text><text class="title">服务次数</text>
+						</view>
+						<view class="right flex">
+							<input class="input" v-model="updata.service_count" type="number" placeholder="请输入已经服务的数量"
+								placeholder-class="placeholder" />
+						</view>
 					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="font-color-red font-size-sm">✲</text><text class="title">收费类型</text>
+					<view class="flex listItem">
+						<view class="flex titleBox">
+							<text class="title">服务区域</text>
+						</view>
+						<view class="right flex">
+							<picker class="input" range-key='title' :range='areaType' mode="selector"
+								@change="changeAreaType">
+								<view>
+									{{areaType[actionAreaType].title}}
+								</view>
+							</picker>
+						</view>
 					</view>
-					<view class="right flex">
-						<picker class="input" :value="updata.timetype.ind" :range='timeTypeList' range-key='title'
-							mode="selector" @change="changetimetype">
-							<view>
-								{{updata.timetype.title||'收费时间类型'}}
+					<view class="flex listItem" v-if="actionAreaType==1">
+						<view class="flex titleBox">
+							<text class="font-color-red font-size-sm">✲</text><text class="title">服务区域</text>
+						</view>
+						<view class="right">
+							<view class="citylist">
+								<view class="flex margin-b-20" v-for="(item,ind) in updata.onCity" :key="ind">
+									<view></view>
+									<view>
+										{{item.province+item.city+item.district}}
+										<text class="margin-l-10 del" @click="updata.onCity.splice(ind,1)">
+											删除
+										</text>
+									</view>
+								</view>
+								<view class="flex">
+									<view></view>
+									<pickerAddress class="buttom" @change="onCityClick">添加地区</pickerAddress>
+								</view>
 							</view>
-						</picker>
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="font-color-red font-size-sm">✲</text><text class="title">最低价</text>
-					</view>
-					<view class="right flex">
-						<input class="input" v-model="updata.minMoney" type="number" placeholder="请输入最低收费价"
-							placeholder-class="placeholder" />
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="font-color-red font-size-sm">✲</text><text class="title">最高价</text>
-					</view>
-					<view class="right flex">
-						<input class="input" v-model="updata.maxMoney" type="number" placeholder="请输入最高收费价"
-							placeholder-class="placeholder" />
-					</view>
-				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="font-color-red font-size-sm">✲</text><text class="title">服务次数</text>
+			
+						</view>
 					</view>
-					<view class="right flex">
-						<input class="input" v-model="updata.service_count" type="number" placeholder="请输入已经服务的数量"
-							placeholder-class="placeholder" />
+					<view class="flex listItem">
+						<view class="flex titleBox">
+							<text class="font-color-red font-size-sm">✲</text><text class="title">服务内容</text>
+						</view>
+						<view class="right">
+							<checkbox-group @change="checkTypeChange">
+								<label class="flex timetype margin-b-10" v-for="(item,ind) in typeList" :key="item.id">
+									<view class="margin-r-10">{{item.title}}</view>
+									<view>
+										<checkbox :value="`${item.id}`" :checked="item.checked" />
+									</view>
+								</label>
+							</checkbox-group>
+						</view>
 					</view>
 				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="title">服务区域</text>
-					</view>
-					<view class="right flex">
-						<picker class="input" range-key='title' :range='areaType' mode="selector"
-							@change="changeAreaType">
-							<view>
-								{{areaType[actionAreaType].title}}
-							</view>
-						</picker>
+			</view>
+			<view class="item-name">
+				自我展示
+			</view>
+			<view class="listBox">
+				<view class="list">
+					<view class="listItem">
+						<editor id='editor' class="textarea" auto-height :maxlength='-1' @input='changeMyask' type="text"
+							placeholder="自我评价\n\n本人从业***年,已经服务***名客户\n成长经历:\n从事母婴工作之前是做***行业的,于***年经过专业培训后进入母婴行业;先后学习了***\n性格特征:\n本人性格直爽,具有很强的服务意识,做事认真负责,擅长……类工作\n服务格言:\n全心全意服务好每一位客户">
+						</editor>
 					</view>
 				</view>
-				<view class="flex listItem" v-if="actionAreaType==1">
-					<view class="flex titleBox">
-						<text class="font-color-red font-size-sm">✲</text><text class="title">服务区域</text>
+				<view class="con_box">
+					<view class="con_image" v-for="(item,ind) in updata.imageList">
+						<image class="img" @click="navCroper(400,400,'tab',ind)" :src="item"></image>
+						<image @click="updata.imageList.splice(ind,1)" class="tip" src="../../../static/icon/goodsExit.png"
+							mode="scaleToFill"></image>
 					</view>
-					<view class="right">
-						<view class="citylist">
-							<view class="flex margin-b-20" v-for="(item,ind) in updata.onCity" :key="ind">
-								<view></view>
-								<view>
-									{{item.province+item.city+item.district}}
-									<text class="margin-l-10 del" @click="updata.onCity.splice(ind,1)">
-										删除
-									</text>
-								</view>
-							</view>
-							<view class="flex">
-								<view></view>
-								<pickerAddress class="buttom" @change="onCityClick">添加地区</pickerAddress>
-							</view>
-						</view>
-
+					<view class="con_image">
+						<image class="img" @click="navCroper(400,400,'all')" src="../../../static/image/upImg.png"></image>
 					</view>
 				</view>
-				<view class="flex listItem">
-					<view class="flex titleBox">
-						<text class="font-color-red font-size-sm">✲</text><text class="title">服务内容</text>
+			</view>
+			<view class="item-name">
+				我的证书
+			</view>
+			<view class="listBox">
+				<view class="con_box">
+					<view class="con_image" v-for="(item,ind) in updata.service_audit_imgs">
+						<image class="img" @click="navCroper(400,400,'audit',ind)" :src="item"></image>
+						<image @click="updata.service_audit_imgs.splice(ind,1)" class="tip"
+							src="../../../static/icon/goodsExit.png" mode="scaleToFill"></image>
 					</view>
-					<view class="right">
-						<checkbox-group @change="checkTypeChange">
-							<label class="flex timetype margin-b-10" v-for="(item,ind) in typeList" :key="item.id">
-								<view class="margin-r-10">{{item.title}}</view>
-								<view>
-									<checkbox :value="`${item.id}`" :checked="item.checked" />
-								</view>
-							</label>
-						</checkbox-group>
+					<view class="con_image">
+						<image class="img" @click="navCroper(400,400,'auditall')" src="../../../static/image/upImg.png">
+						</image>
 					</view>
 				</view>
 			</view>
-		</view>
-		<view class="item-name">
-			自我展示
-		</view>
-		<view class="listBox">
-			<view class="list">
-				<view class="listItem">
-					<editor id='editor' class="textarea" auto-height :maxlength='-1' @input='changeMyask' type="text"
-						placeholder="自我评价\n\n本人从业***年,已经服务***名客户\n成长经历:\n从事母婴工作之前是做***行业的,于***年经过专业培训后进入母婴行业;先后学习了***\n性格特征:\n本人性格直爽,具有很强的服务意识,做事认真负责,擅长……类工作\n服务格言:\n全心全意服务好每一位客户">
-					</editor>
-				</view>
+			<view class="item-name">
+				服务展示
 			</view>
-			<view class="con_box">
-				<view class="con_image" v-for="(item,ind) in updata.imageList">
-					<image class="img" @click="navCroper(400,400,'tab',ind)" :src="item"></image>
-					<image @click="updata.imageList.splice(ind,1)" class="tip" src="../../../static/icon/goodsExit.png"
-						mode="scaleToFill"></image>
-				</view>
-				<view class="con_image">
-					<image class="img" @click="navCroper(400,400,'all')" src="../../../static/image/upImg.png"></image>
+			<view class="listBox">
+				<view class="con_box">
+					<view class="con_image" v-for="(item,ind) in updata.service_imgs">
+						<image class="img" @click="navCroper(400,400,'service',ind)" :src="item"></image>
+						<image @click="updata.service_imgs.splice(ind,1)" class="tip"
+							src="../../../static/icon/goodsExit.png" mode="scaleToFill"></image>
+					</view>
+					<view class="con_image">
+						<image class="img" @click="navCroper(400,400,'serviceall')" src="../../../static/image/upImg.png">
+						</image>
+					</view>
 				</view>
 			</view>
-		</view>
-		<view class="item-name">
-			我的证书
-		</view>
-		<view class="listBox">
-			<view class="con_box">
-				<view class="con_image" v-for="(item,ind) in updata.service_audit_imgs">
-					<image class="img" @click="navCroper(400,400,'audit',ind)" :src="item"></image>
-					<image @click="updata.service_audit_imgs.splice(ind,1)" class="tip"
-						src="../../../static/icon/goodsExit.png" mode="scaleToFill"></image>
-				</view>
-				<view class="con_image">
-					<image class="img" @click="navCroper(400,400,'auditall')" src="../../../static/image/upImg.png">
-					</image>
-				</view>
+		</template>
+		<template v-else-if="updata.modelType==1">
+			<view class="item-name">
+				展示图片
 			</view>
-		</view>
-		<view class="item-name">
-			服务展示
-		</view>
-		<view class="listBox">
-			<view class="con_box">
-				<view class="con_image" v-for="(item,ind) in updata.service_imgs">
-					<image class="img" @click="navCroper(400,400,'service',ind)" :src="item"></image>
-					<image @click="updata.service_imgs.splice(ind,1)" class="tip"
-						src="../../../static/icon/goodsExit.png" mode="scaleToFill"></image>
-				</view>
-				<view class="con_image">
-					<image class="img" @click="navCroper(400,400,'serviceall')" src="../../../static/image/upImg.png">
-					</image>
+			<view class="listBox">
+				<view class="con_box">
+					<view class="con_image" v-for="(item,ind) in updata.model_imgs">
+						<image class="img" @click="navCroper(400,400,'model',ind)" :src="item"></image>
+						<image @click="updata.model_imgs.splice(ind,1)" class="tip"
+							src="../../../static/icon/goodsExit.png" mode="scaleToFill"></image>
+					</view>
+					<view class="con_image">
+						<image class="img" @click="navCroper(400,400,'modelall')" src="../../../static/image/upImg.png">
+						</image>
+					</view>
 				</view>
 			</view>
-		</view>
+		</template>
 		<view class="base-buttom flex">
 			<view class="updata flex flex-center" :class="{ 'bg-gray': loding }" @click="loding ? '' : confirm()">
 				提交
@@ -332,6 +360,7 @@
 				jgList: AllAddress,
 				// 上传数据
 				updata: {
+					modelType:0,//模板类型0为老类型,1为纯图片
 					is_global: 0, //是否全国0是否1是是
 					is_wm: '', //是否海外
 					avatar: '', //用户头像
@@ -362,6 +391,7 @@
 					},
 					service_audit_imgs: [], //我的证书
 					service_imgs: [], //服务展示
+					model_imgs: [], //服务展示
 					no: '',
 				},
 				typeList: [], //服务类型
@@ -385,8 +415,8 @@
 						title: '全国',
 						type: 3
 					}
-				], //学历列表
-				editorCtx: '',
+				], 
+				editorCtx: '',//保存详情页面数据
 				actionAreaType: 1
 			};
 		},
@@ -571,6 +601,7 @@
 						service_audit_imgs: that.updata.service_audit_imgs,
 						service_project_ar: pushar,
 						service_imgs: that.updata.service_imgs,
+						model_imgs: that.updata.model_imgs,
 						no: that.updata.no,
 						user_work_type_title: that.updata.word.title,
 						service_count: that.updata.service_count,
@@ -610,7 +641,8 @@
 									}
 								};
 								that.updata = Object.assign(that.updata, {
-									is_wm: res.is_china == 0 ? '是' : '否',
+									modelType:res.modelType==null?0:res.modelType,//保存模板类型
+									is_wm: res.is_china == 0 ? '是' : '否',//是否海外
 									avatar: res.avatar, //用户头像
 									name: res.name, //用户名称
 									phone: res.mobile, //手机号
@@ -627,6 +659,7 @@
 									work_year: res.work_year, //从业时长
 									service_audit_imgs: res.service_audit_imgs, //我的证书
 									service_imgs: res.service_imgs, //服务展示
+									model_imgs: res.model_imgs, //服务展示
 									no: res.no,
 									service_count: res.service_count,
 									weight: res.weight * 1,
@@ -738,6 +771,10 @@
 										that.updata.service_imgs.splice(ind, 1, urldata.img)
 									} else if (type == 'serviceall') {
 										that.updata.service_imgs.push(urldata.img)
+									}else if (type == 'model') {
+										that.updata.model_imgs.splice(ind, 1, urldata.img)
+									} else if (type == 'modelall') {
+										that.updata.model_imgs.push(urldata.img)
 									}
 								})
 							}
@@ -836,6 +873,7 @@
 				}
 				that.loding = true;
 				subInfoAudit({
+						modelType:that.updata.modelType,
 						is_china: that.actionAreaType,
 						avatar: that.updata.avatar,
 						name: that.updata.name,
@@ -856,6 +894,7 @@
 						minority: that.updata.minority,
 						service_audit_imgs: that.updata.service_audit_imgs,
 						service_imgs: that.updata.service_imgs,
+						model_imgs: that.updata.model_imgs,
 						user_work_type_id: that.updata.word.id,
 						service_count: that.updata.service_count,
 						weight: that.updata.weight,
@@ -887,93 +926,104 @@
 			// 认证
 			rendl() {
 				const that = this;
-				if (!that.updata.avatar) {
-					uni.showModal({
-						title: '错误',
-						content: '请上传头像',
-						showCancel: false,
-					});
-					return false
-				}
-
-				if (!that.updata.name) {
-					uni.showModal({
-						title: '错误',
-						content: '请填写姓名',
-						showCancel: false,
-					});
-					return false
-				}
-				if (!that.updata.cardId) {
-					uni.showModal({
-						title: '错误',
-						content: '请填写身份证号',
-						showCancel: false,
-					});
-					return
-				} else if (!isCardNo(that.updata.cardId)) {
-					uni.showModal({
-						title: '错误',
-						content: '请填写正确的身份证号',
-						showCancel: false,
-					});
-					return false
-				}
-				if (!that.updata.phone) {
-					uni.showModal({
-						title: '错误',
-						content: '请填写手机号',
-						showCancel: false,
-					});
-					return false
-				}
-				if (!that.updata.timetype.code) {
-					uni.showModal({
-						title: '错误',
-						content: '请选择收费时间类型',
-						showCancel: false,
-					});
-					return false
-				}
-				if (!that.updata.minMoney) {
-					uni.showModal({
-						title: '错误',
-						content: '请填写最低收费价',
-						showCancel: false,
-					});
-					return false
-				}
-				if (!that.updata.maxMoney) {
-					uni.showModal({
-						title: '错误',
-						content: '请填写最高收费价',
-						showCancel: false,
-					});
-					return false
-				}
-				if (!that.updata.is_wm) {
-					uni.showModal({
-						title: '错误',
-						content: '请选择服务区域是否海外',
-						showCancel: false,
-					});
-					return
-				}
-				if (that.actionAreaType == 1 && that.updata.onCity.length == 0) {
-					uni.showModal({
-						title: '错误',
-						content: '请选择服务区域',
-						showCancel: false,
-					});
-					return false
-				}
-				if (that.updata.checkedType.length == 0) {
-					uni.showModal({
-						title: '错误',
-						content: '请选择服务内容',
-						showCancel: false,
-					});
-					return false
+				if(that.updata.modelType==0){
+					if (!that.updata.avatar) {
+						uni.showModal({
+							title: '错误',
+							content: '请上传头像',
+							showCancel: false,
+						});
+						return false
+					}
+					
+					if (!that.updata.name) {
+						uni.showModal({
+							title: '错误',
+							content: '请填写姓名',
+							showCancel: false,
+						});
+						return false
+					}
+					if (!that.updata.cardId) {
+						uni.showModal({
+							title: '错误',
+							content: '请填写身份证号',
+							showCancel: false,
+						});
+						return
+					} else if (!isCardNo(that.updata.cardId)) {
+						uni.showModal({
+							title: '错误',
+							content: '请填写正确的身份证号',
+							showCancel: false,
+						});
+						return false
+					}
+					if (!that.updata.phone) {
+						uni.showModal({
+							title: '错误',
+							content: '请填写手机号',
+							showCancel: false,
+						});
+						return false
+					}
+					if (!that.updata.timetype.code) {
+						uni.showModal({
+							title: '错误',
+							content: '请选择收费时间类型',
+							showCancel: false,
+						});
+						return false
+					}
+					if (!that.updata.minMoney) {
+						uni.showModal({
+							title: '错误',
+							content: '请填写最低收费价',
+							showCancel: false,
+						});
+						return false
+					}
+					if (!that.updata.maxMoney) {
+						uni.showModal({
+							title: '错误',
+							content: '请填写最高收费价',
+							showCancel: false,
+						});
+						return false
+					}
+					if (!that.updata.is_wm) {
+						uni.showModal({
+							title: '错误',
+							content: '请选择服务区域是否海外',
+							showCancel: false,
+						});
+						return
+					}
+					if (that.actionAreaType == 1 && that.updata.onCity.length == 0) {
+						uni.showModal({
+							title: '错误',
+							content: '请选择服务区域',
+							showCancel: false,
+						});
+						return false
+					}
+					if (that.updata.checkedType.length == 0) {
+						uni.showModal({
+							title: '错误',
+							content: '请选择服务内容',
+							showCancel: false,
+						});
+						return false
+					}
+				}else if(that.updata.modelType==1){
+					if (that.updata.model_imgs.length == 0) {
+						uni.showModal({
+							title: '错误',
+							content: '请上传展示图片',
+							showCancel: false,
+						});
+						return false
+					}
 				}
 				return true
 			}
@@ -1137,4 +1187,17 @@
 		color: #F65486;
 		padding: 30rpx;
 	}
+	.table{
+		.table-text{
+			color:#F65486;
+			text-align: center;
+			flex-grow: 1;
+			padding: 30rpx;
+			border: 1px solid #F65486;
+			&.action{
+				background-color: #F65486;
+				color: #FFFFFF;
+			}
+		}
+	}
 </style>

+ 69 - 1
pages/userhome/user.vue

@@ -210,6 +210,13 @@
 				</view>
 			</view>
 		</scroll-view>
+		<uni-popup ref="popup" type="center">
+			<swiper class="alertBox" :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
+				<swiper-item v-for="ls in ggList">
+					<image @click="openXcx(ls)" class="alertImage" :src="ls.img" mode="scaleToFill"></image>
+				</swiper-item>
+			</swiper>
+		</uni-popup>
 	</view>
 </template>
 <script>
@@ -236,6 +243,9 @@
 		saveUrl,
 		interceptor
 	} from '@/utils/loginUtils.js';
+	import {
+		getBannerList
+	} from '@/api/model.js';
 	export default {
 		data() {
 			return {
@@ -244,6 +254,7 @@
 					nickname: '', //昵称
 				},
 				shareData: {},
+				ggList: [] //弹窗广告列表
 			};
 		},
 		computed: {
@@ -260,12 +271,57 @@
 		},
 		// 创建时获取分享信息
 		onLoad() {
+			this.getGG();
 		},
 		onShow() {
 			this.getUser();
 		},
 		methods: {
 			...mapMutations('user', ['setUserInfo']),
+			getGG() {
+				getBannerList({
+					page_id: 73
+				}).then(
+					(res) => {
+						this.ggList = res.data.list.map((re) => {
+							if (re.data.length > 0) {
+								const json = JSON.parse(re.data)
+								for (var i = 0; i < json.length; i++) {
+									const item = json[i]
+									const key = item.code;
+									re[key] = item[key] ? item[key] : ''
+								}
+							}
+							return re
+						})
+						this.$refs.popup.open()
+						console.log(this.ggList)
+					}
+				).catch(
+					(res) => {
+						console.log(res);
+					}
+				)
+			},
+			// 打开小程序
+			openXcx(item) {
+				// #ifdef MP
+				if (item.wxcode.length > 0) {
+					wx.navigateToMiniProgram({
+						appId: item.wxcode,
+						path: item.url,
+					})
+				} else {
+					if (item.url == '') {
+						this.$refs.popup.close()
+					} else {
+						uni.navigateTo({
+							url: item.url
+						})
+					}
+				}
+				// #endif
+			},
 			// 激活验证码
 			openCode() {
 				uni.showModal({
@@ -285,7 +341,7 @@
 								console.log(e)
 								uni.showToast({
 									title: e.msg,
-									icon:"error"
+									icon: "error"
 								});
 							})
 						}
@@ -565,4 +621,16 @@
 		position: relative;
 		padding-bottom: 20rpx;
 	}
+
+	.alertBox {
+
+		width: 479rpx;
+		height: 832rpx;
+
+		.alertImage {
+			border-radius: 20rpx;
+			width: 479rpx;
+			height: 832rpx;
+		}
+	}
 </style>