Browse Source

2023-4-25

cmy 1 year ago
parent
commit
bf111fb39a

+ 0 - 10
api/order.js

@@ -1,10 +0,0 @@
-import request from '@/utils/request'
-import {upFilse} from '@/utils/request'
-//上传图片
-export function upload(data) {
-	return upFilse({
-		url: '/api/upload/image',
-		method: 'post',
-		data
-	});
-}

+ 10 - 2
api/set.js

@@ -1,9 +1,17 @@
 import request from '@/utils/request'
-
+import {upFilse} from '@/utils/request'
+//上传图片
+export function upload(data) {
+	return upFilse({
+		url: '/api/user/qiniuUpload',
+		method: 'post',
+		data
+	});
+}
 // 修改用户信息
 export function userEdit(data) {
 	return request({
-		url: '/api/user/edit',
+		url: '/api/user/setUserInfo',
 		method: 'post',
 		data
 	});

+ 5 - 5
pages.json

@@ -154,7 +154,7 @@
 				}
 			},
 			{
-				"path": "model/mymodel",
+				"path": "model/modelrz",
 				"style": {
 					"navigationBarTitleText": "资料认证"
 				}
@@ -166,15 +166,15 @@
 				}
 			},
 			{
-				"path": "model/defaultmodel",
+				"path": "model/modelList",
 				"style": {
-					"navigationBarTitleText": "当前模板"
+					"navigationBarTitleText": "模板列表"
 				}
 			},
 			{
-				"path": "model/modelList",
+				"path": "model/mymodellist",
 				"style": {
-					"navigationBarTitleText": "模板列表"
+					"navigationBarTitleText": "我的模板"
 				}
 			},
 			{

+ 2 - 2
pages/index/index.vue

@@ -23,7 +23,7 @@
 				</navigator>
 			</view>
 			<view class="hot-list">
-				<view class="item" v-for="item in rmList" @click="navTo('/pages/user/model/model?mtype=' + item.id)">
+				<view class="item" v-for="item in rmList">
 					<view class="hot-image-box">
 						<image class="hot-image" :src="item.img" mode="widthFix"></image>
 					</view>
@@ -61,7 +61,7 @@
 			</view>
 
 			<view class="list-box">
-				<view class="list" v-for="(item,index) in navList.orderList" @click="navTo('/pages/user/model/model?mtype=' + item.id)">
+				<view class="list" v-for="(item,index) in navList.orderList">
 					<view class="list-image-box">
 						<image class="list-image" :src="item.img" mode="widthFix"></image>
 					</view>

+ 6 - 9
pages/set/set.vue

@@ -1,6 +1,5 @@
 <template>
 	<view class="container">
-
 		<view class="listBox">
 			<view class="row flex" @click="navTo('/pages/set/userinfo')">
 				<text class="tit">头像</text>
@@ -19,13 +18,13 @@
 						<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
 					</view>
 				</view>
-				<view class="flex listItem" @click="navTo('/pages/set/phone')">
+				<view class="flex listItem" >
 					<view class="flex titleBox">
 						<text class="title">手机号</text>
 					</view>
 					<view class="right flex">
-						<text>{{userInfo.phone}}</text>
-						<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
+						<text>{{userInfo.mobile}}</text>
+						<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
 					</view>
 				</view>
 				<!-- <view class="flex listItem" @click="navTo('/pages/user/realName/realNameAuthentication')">
@@ -37,7 +36,7 @@
 						<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
 					</view>
 				</view> -->
-				<view class="flex listItem" @click="navTo('/pages/set/password')">
+				<!-- <view class="flex listItem" @click="navTo('/pages/set/password')">
 					<view class="flex titleBox">
 						<text class="title">修改密码</text>
 					</view>
@@ -45,7 +44,7 @@
 						<text></text>
 						<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
 					</view>
-				</view>
+				</view> -->
 				<!-- #ifdef APP -->
 				<view class="flex listItem" @click="$refs.inputDialog.open()">
 					<view class="flex titleBox">
@@ -73,10 +72,8 @@
 
 <script>
 	import {
+		logout,
 		uploads
-	} from '@/api/user.js';
-	import {
-		logout
 	} from '@/api/set.js';
 	import {
 		mapMutations,

+ 2 - 4
pages/set/userinfo.vue

@@ -44,11 +44,9 @@
 	import {
 		mapState,
 	} from 'vuex';
-	import {
-		upload
-	} from '@/api/order.js';
 	import {
 		userEdit,
+		upload
 	} from '@/api/set.js';
 
 	export default {
@@ -70,7 +68,7 @@
 					filename: ''
 				}).then(data => {
 					console.log("data", data);
-					this.userInfo.avatar = data[0].url;
+					this.userInfo.avatar = data[0].img;
 				})
 			},
 			confirm() {

+ 0 - 265
pages/user/model/defaultmodel.vue

@@ -1,265 +0,0 @@
-<template>
-	<view class="content ">
-		<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>
-			</view>
-		</view>
-		<view class="base-buttom" :class="{ 'bg-gray': loding }" @click="loding ? '' : confirm()">提交</view>
-	</view>
-</template>
-
-<script>
-	import {
-		subTypeAudit
-	} from '@/api/model.js';
-
-	import {
-		mapState
-	} from "vuex"
-	export default {
-		data() {
-			return {
-				// 上传数据
-				updata:{
-					service_audit_imgs: [], //服务图片
-				},
-				loding: false, //是否载入中
-
-			};
-		},
-		onLoad(options) {
-			this.init()
-		},
-		computed: {
-			// #ifdef H5
-			...mapState(['urlFile']),
-			// #endif
-			...mapState(['baseURL']),
-		},
-		methods: {
-			// 初始化
-			init() {
-				const that = this;
-			},
-			upLoad(path) {
-				// #ifdef H5
-				console.log(path, 'h5');
-				// #endif
-				uni.showLoading({
-					title: '图片上传中',
-					mask: true
-				});
-				return new Promise((resolve, error) => {
-					uni.uploadFile({
-						url: this.baseURL + '/api/user/upload', //仅为示例,非真实的接口地址
-						filePath: path,
-						name: 'file',
-						header: {
-							"token": uni.getStorageSync('token')
-						},
-						success: (uploadFileRes) => {
-							if ("string" === typeof uploadFileRes.data) {
-								resolve(JSON.parse(uploadFileRes.data).data)
-							} else {
-								resolve(uploadFileRes.data.data)
-							}
-						},
-						complete() {
-							uni.hideLoading()
-						}
-					});
-				})
-			},
-			// 图片裁切
-			/**
-			 * @param {Number} w 裁切宽度比例
-			 * @param {Number} h 裁切高度比例
-			 * @param {Number} mw 图片最小宽度
-			 * @param {Number} mh 图片最小高度
-			 * @param {String} url url修改
-			 */
-			navCroper(w, h, type, ind) {
-				let that = this;
-				let tt = (type == 'upimg' ? 2 : 1)
-				this.onImg(tt).then((url) => {
-					uni.navigateTo({
-						url: `../realName/cropper?width=${w}&height=${h}`,
-						events: {
-							uploadSuccess(res) {
-								that.upLoad(res).then((urldata) => {
-									 if (type == 'audit') {
-										that.updata.service_audit_imgs.splice(ind, 1, urldata.img)
-									}else if (type == 'auditall') {
-										that.updata.service_audit_imgs.push( urldata.img)
-									}
-								})
-							}
-						},
-						success: function(res) {
-							// 通过eventChannel向被打开页面传送数据
-							res.eventChannel.emit('urlNext', {
-								url
-							})
-						}
-					})
-				})
-			},
-			onImg(type) {
-				const _this = this
-				return new Promise((ok, erro) => {
-					// 判断是否需要选择
-					if (type == 1) {
-						uni.showActionSheet({
-							itemList: ['拍照', '选择一张照片'],
-							success: function(res) {
-								_this.chooseImage(res.tapIndex).then((url) => {
-									ok(url)
-								}).catch((res) => {
-									erro(res)
-								})
-							},
-							fail: function(res) {
-								erro(res)
-								console.log(res.errMsg);
-							}
-						});
-					}
-					// 判断是否只需要拍照
-					if (type == 2) {
-						_this.chooseImage(0).then((url) => {
-							ok(url)
-						}).catch((res) => {
-							erro(res)
-						})
-					}
-				})
-
-			},
-			chooseImage: function(index) {
-				const _this = this
-				return new Promise((ok, error) => {
-					// 从相册/相机选择
-					// 如需直接开相机或直接选相册,请只使用一个选项
-					const sourceType = index === 0 ? ['camera'] : ['album']
-					uni.chooseImage({
-						count: 1, //默认9
-						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
-						sourceType: sourceType,
-						success: function(res) {
-							ok(res.tempFilePaths[0])
-						},
-						fail(e) {
-							uni.showModal({
-								title: '文件打开错误',
-								content: '请设置授权文件存储权限',
-								showCancel: false,
-							});
-							error(e)
-						}
-					});
-				})
-
-			},
-
-			// 实名认证
-			confirm(e) {
-				const that = this;
-				if (that.updata.service_audit_imgs.length==0) {
-					uni.showModal({
-						title: '错误',
-						content: '请选择上传认证图片',
-						showCancel: false,
-					});
-					return
-				}
-				that.loding = true;
-				subTypeAudit({
-						user_work_type_id:that.updata.word.id,
-					})
-					.then((e) => {
-						that.loding = false;
-						this.$api.msg(e.msg);
-					})
-					.catch(err => {
-						this.loding = false;
-						console.log(err);
-					});
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	.content,
-	page {
-		min-height: 100%;
-	}
-
-	.content {
-		padding-bottom: 150rpx;
-	}
-
-	.item-name {
-		margin: $page-row-spacing;
-		font-size: $font-lg;
-		font-weight: bold;
-		color: $font-color-dark;
-	}
-
-	.con_box {
-		margin: $page-row-spacing;
-
-		.con_image {
-			width: 150rpx;
-			height: 150rpx;
-			display: inline-block;
-			margin-right: 20rpx;
-			position: relative;
-
-			.img {
-				width: 100%;
-				height: 100%;
-			}
-
-			.tip {
-				position: absolute;
-				top: -10rpx;
-				right: -10rpx;
-				width: 30rpx;
-				height: 30rpx;
-				background-color: #FFF;
-				border-radius: 99rpx;
-			}
-		}
-	}
-
-	.listBox {
-		margin: $page-row-spacing;
-		margin-top: 30rpx;
-		border-radius: 20rpx;
-		overflow: hidden;
-		background-color: #FFFFFF;
-	}
-	.bg-gray {
-		background-color: $color-gray;
-	}
-
-	.base-buttom {
-		position: fixed;
-		bottom: 30rpx;
-		right: 0rpx;
-		left: 0rpx;
-	}
-</style>

+ 15 - 1
pages/user/model/modelList.vue

@@ -38,6 +38,8 @@
 	export default {
 		data() {
 			return {
+				ishot:0,//判断是否热门
+				isrecommend:0,//判断是否推荐
 				// 商品列表
 				navList: {
 					state: 1,
@@ -50,6 +52,17 @@
 			};
 		},
 		onLoad: function(option) {
+			if(option.isrecommend){
+				uni.setNavigationBarTitle({
+					title:'精品推荐'
+				})
+				this.isrecommend = option.isrecommend
+			}else if(option.ishot){
+				uni.setNavigationBarTitle({
+					title:'热门装扮'
+				})
+				this.ishot = option.ishot
+			}
 			this.getShowTemplateList();
 		},
 		// 滚动到底部
@@ -77,7 +90,8 @@
 				// 修改当前对象状态为加载中
 				navItem.loadingType = 'loading';
 				getShowTemplateList({
-						is_recommend: 1,
+						is_recommend: this.isrecommend,
+						is_hot: this.ishot,
 						page: navItem.page,
 						pageSize: navItem.limit
 					})

+ 743 - 0
pages/user/model/modelrz.vue

@@ -0,0 +1,743 @@
+<template>
+	<view class="content ">
+
+		<view class="item-name">
+			上传头像
+		</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>
+		<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>
+				<view class="flex listItem">
+					<view class="flex titleBox">
+						<text class="title">籍贯</text>
+					</view>
+					<view class="right flex">
+						<input class="input" v-model="updata.ancestral_place" type="number" 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.education" type="number" 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.minority" type="number" placeholder="请填写民族"
+							placeholder-class="placeholder" />
+					</view>
+				</view>
+				<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 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='timeTypeList' range-key='title' mode="selector"
+							@change="changetimetype">
+							<view>
+								{{updata.timetype.title||'收费时间类型'}}
+							</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 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>
+				</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">
+						<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>
+		<view class="item-name">
+			自评
+		</view>
+		<view class="listBox">
+			<view class="list">
+				<view class="listItem">
+					<textarea auto-height :maxlength='-1' v-model="updata.mymask" type="text" placeholder="请填写自评内容"
+						placeholder-class="placeholder" />
+				</view>
+			</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>
+			</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>
+			</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>
+			</view>
+		</view>
+		<view class="base-buttom" :class="{ 'bg-gray': loding }" @click="loding ? '' : confirm()">提交</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getServiceTimeTypeList,
+		getServiceTypeList,
+		subInfoAudit,
+		getUserWorkTypeList
+	} from '@/api/model.js';
+
+	import {
+		isCardNo
+	} from '@/utils/rocessor.js';
+	import {
+		mapState
+	} from "vuex"
+
+	import pickerAddress from '@/components/wangding-pickerAddress/wangding-pickerAddress.vue';
+
+	export default {
+		components: {
+			pickerAddress
+		},
+		data() {
+			return {
+				// 上传数据
+				updata:{
+					avatar: '', //用户头像
+					name: '', //用户名称
+					phone: '', //手机号
+					cardId: '', //身份证号
+					minMoney: '',//最低价
+					maxMoney: '',//最高价
+					checkedType: [], //选中的服务类型
+					time: '', //出生日期
+					timetype: {
+						title: '',
+						code:''
+					}, //选中的时间类型
+					onCity: [], //选中的城市
+					mymask:'',//自评
+					imageList: [], //自评上传图片列表
+					ancestral_place:'',//籍贯
+					education:'',//学历
+					ancestral_place:'',//籍贯
+					minority:'',//民族
+					
+					work_year:'',//从业时长
+					word: {
+						title: '',
+						id:''
+					},
+					service_audit_imgs: [], //我的证书
+					service_imgs: [], //服务展示
+				},
+				typeList: [], //服务类型
+				timeTypeList: [], //时间类型
+				workTypeList: [], //工作类型
+				loding: false, //是否载入中
+
+			};
+		},
+		onLoad(options) {
+			this.init()
+		},
+		computed: {
+			// #ifdef H5
+			...mapState(['urlFile']),
+			// #endif
+			...mapState(['baseURL']),
+		},
+		methods: {
+			// 初始化
+			init() {
+				const that = this;
+				getServiceTimeTypeList().then(
+					(res) => {
+						that.timeTypeList = res.data.list
+						that.updata.timetype=that.timeTypeList[0];
+						console.log(res);
+					}
+				).catch(
+					(res) => {
+						console.log(res);
+					}
+				)
+				getServiceTypeList().then(
+					(res) => {
+						that.typeList = res.data.list
+						console.log(res);
+					}
+				).catch(
+					(res) => {
+						console.log(res);
+					}
+				)
+				getUserWorkTypeList().then(
+					(res) => {
+						console.log(res);
+						that.workTypeList = res.data.list
+						that.updata.word=that.workTypeList[0]
+					}
+				).catch(
+					(res) => {
+						console.log(res);
+					}
+				)
+			},
+			// 选中的服务类型
+			checkTypeChange(type) {
+				this.updata.checkedType = type.detail.value;
+				console.log(type)
+			},
+			// 选中的工作类型
+			changeWorkType(type){
+				this.updata.word =  this.workTypeList[type.detail.value];
+				console.log(this.updata.word)
+			},
+			// 选择时间类型
+			changetimetype(res) {
+				this.updata.timetype = this.timeTypeList[res.detail.value];
+			},
+			// 时间选择
+			changetime(time) {
+				this.updata.time = time.detail.value;
+				console.log(time);
+			},
+			// 选择省市区
+			onCityClick({
+				data
+			}) {
+				let address = {};
+				address.province = data[0];
+				address.city = data[1];
+				address.district = data[2];
+				this.updata.onCity.push(address)
+				console.log(this.onCity, 'cs');
+			},
+			upLoad(path) {
+				// #ifdef H5
+				console.log(path, 'h5');
+				// #endif
+				uni.showLoading({
+					title: '图片上传中',
+					mask: true
+				});
+				return new Promise((resolve, error) => {
+					uni.uploadFile({
+						url: this.baseURL + '/api/user/qiniuUpload', //仅为示例,非真实的接口地址
+						filePath: path,
+						name: 'file',
+						header: {
+							"token": uni.getStorageSync('token')
+						},
+						success: (uploadFileRes) => {
+							if ("string" === typeof uploadFileRes.data) {
+								resolve(JSON.parse(uploadFileRes.data).data)
+							} else {
+								resolve(uploadFileRes.data.data)
+							}
+						},
+						complete() {
+							uni.hideLoading()
+						}
+					});
+				})
+			},
+			// 图片裁切
+			/**
+			 * @param {Number} w 裁切宽度比例
+			 * @param {Number} h 裁切高度比例
+			 * @param {Number} mw 图片最小宽度
+			 * @param {Number} mh 图片最小高度
+			 * @param {String} url url修改
+			 */
+			navCroper(w, h, type, ind) {
+				let that = this;
+				let tt = (type == 'upimg' ? 2 : 1)
+				this.onImg(tt).then((url) => {
+					uni.navigateTo({
+						url: `../realName/cropper?width=${w}&height=${h}`,
+						events: {
+							uploadSuccess(res) {
+								that.upLoad(res).then((urldata) => {
+									console.log(urldata);
+									if (type == 'one') {
+										that.updata.avatar = urldata.img
+									} else if (type == 'all') {
+										that.updata.imageList.push(urldata.img)
+									} else if (type == 'tab') {
+										that.updata.imageList.splice(ind, 1, urldata.img)
+									}else if (type == 'audit') {
+										that.updata.service_audit_imgs.splice(ind, 1, urldata.img)
+									}else if (type == 'auditall') {
+										that.updata.service_audit_imgs.push( urldata.img)
+									}else if (type == 'service') {
+										that.updata.service_imgs.splice(ind, 1, urldata.img)
+									}else if (type == 'serviceall') {
+										that.updata.service_imgs.push( urldata.img)
+									}
+								})
+							}
+						},
+						success: function(res) {
+							// 通过eventChannel向被打开页面传送数据
+							res.eventChannel.emit('urlNext', {
+								url
+							})
+						}
+					})
+				})
+			},
+			onImg(type) {
+				const _this = this
+				return new Promise((ok, erro) => {
+					// 判断是否需要选择
+					if (type == 1) {
+						uni.showActionSheet({
+							itemList: ['拍照', '选择一张照片'],
+							success: function(res) {
+								_this.chooseImage(res.tapIndex).then((url) => {
+									ok(url)
+								}).catch((res) => {
+									erro(res)
+								})
+							},
+							fail: function(res) {
+								erro(res)
+								console.log(res.errMsg);
+							}
+						});
+					}
+					// 判断是否只需要拍照
+					if (type == 2) {
+						_this.chooseImage(0).then((url) => {
+							ok(url)
+						}).catch((res) => {
+							erro(res)
+						})
+					}
+				})
+
+			},
+			chooseImage: function(index) {
+				const _this = this
+				return new Promise((ok, error) => {
+					// 从相册/相机选择
+					// 如需直接开相机或直接选相册,请只使用一个选项
+					const sourceType = index === 0 ? ['camera'] : ['album']
+					uni.chooseImage({
+						count: 1, //默认9
+						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+						sourceType: sourceType,
+						success: function(res) {
+							ok(res.tempFilePaths[0])
+						},
+						fail(e) {
+							uni.showModal({
+								title: '文件打开错误',
+								content: '请设置授权文件存储权限',
+								showCancel: false,
+							});
+							error(e)
+						}
+					});
+				})
+
+			},
+
+			// 实名认证
+			confirm(e) {
+				const that = this;
+				if (!that.updata.avatar) {
+					uni.showModal({
+						title: '错误',
+						content: '请上传头像',
+						showCancel: false,
+					});
+					return
+				}
+				
+				if (!that.updata.name) {
+					uni.showModal({
+						title: '错误',
+						content: '请填写姓名',
+						showCancel: false,
+					});
+					return
+				}
+				if (!that.updata.cardId) {
+					uni.showModal({
+						title: '错误',
+						content: '请填写身份证号',
+						showCancel: false,
+					});
+					return
+				}else if(!isCardNo(that.updata.cardId)){
+					uni.showModal({
+						title: '错误',
+						content: '请填写正确的身份证号',
+						showCancel: false,
+					});
+					return
+				}
+				if (!that.updata.phone) {
+					uni.showModal({
+						title: '错误',
+						content: '请填写手机号',
+						showCancel: false,
+					});
+					return
+				}
+				if (!that.updata.timetype.code) {
+					uni.showModal({
+						title: '错误',
+						content: '请选择收费时间类型',
+						showCancel: false,
+					});
+					return
+				}
+				if (!that.updata.minMoney) {
+					uni.showModal({
+						title: '错误',
+						content: '请填写最低收费价',
+						showCancel: false,
+					});
+					return
+				}
+				if (!that.updata.maxMoney) {
+					uni.showModal({
+						title: '错误',
+						content: '请填写最高收费价',
+						showCancel: false,
+					});
+					return
+				}
+				if (that.updata.onCity.length==0) {
+					uni.showModal({
+						title: '错误',
+						content: '请选择服务区域',
+						showCancel: false,
+					});
+					return
+				}
+				if (that.updata.checkedType.length==0) {
+					uni.showModal({
+						title: '错误',
+						content: '请选择服务内容',
+						showCancel: false,
+					});
+					return
+				}
+				that.loding = true;
+				subInfoAudit({
+						avatar:that.updata.avatar,
+						name:that.updata.name,
+						mobile:that.updata.phone,
+						idcard:that.updata.cardId,
+						service_type:that.updata.timetype.code,
+						service_min_price:that.updata.minMoney,
+						service_max_price:that.updata.maxMoney,
+						service_area:that.updata.onCity.map((arr)=>{
+							return arr.district
+						}),
+						service_project:that.updata.checkedType,
+						service_intro_content:that.updata.mymask,
+						service_intro_imgs:that.updata.imageList,
+						work_year:that.updata.work_year,
+						ancestral_place:that.updata.ancestral_place,
+						education:that.updata.education,
+						minority:that.updata.minority,
+						service_audit_imgs:that.updata.service_audit_imgs,
+						service_imgs:that.updata.service_imgs,
+						user_work_type_id:that.updata.word.id,
+					})
+					.then((e) => {
+						that.loding = false;
+						this.$api.msg(e.msg);
+					})
+					.catch(err => {
+						this.loding = false;
+						console.log(err);
+					});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.content,
+	page {
+		min-height: 100%;
+	}
+
+	.content {
+		padding-bottom: 150rpx;
+	}
+
+	.item-name {
+		margin: $page-row-spacing;
+		font-size: $font-lg;
+		font-weight: bold;
+		color: $font-color-dark;
+	}
+
+	.con_box {
+		margin: $page-row-spacing;
+
+		.con_image {
+			width: 150rpx;
+			height: 150rpx;
+			display: inline-block;
+			margin-right: 20rpx;
+			position: relative;
+
+			.img {
+				width: 100%;
+				height: 100%;
+			}
+
+			.tip {
+				position: absolute;
+				top: -10rpx;
+				right: -10rpx;
+				width: 30rpx;
+				height: 30rpx;
+				background-color: #FFF;
+				border-radius: 99rpx;
+			}
+		}
+	}
+
+	.listBox {
+		margin: $page-row-spacing;
+		margin-top: 30rpx;
+		border-radius: 20rpx;
+		overflow: hidden;
+		background-color: #FFFFFF;
+	}
+
+	.list {
+		.input {
+			text-align: right;
+			font-size: $font-base;
+			color: $color-gray;
+			width: 100%;
+		}
+
+		.listItem {
+			padding: 35rpx 40rpx;
+			border-bottom: 1px solid $page-color-light;
+		}
+
+		.listIconImg {
+			width: 36rpx;
+		}
+
+		.right {
+			color: $font-color-light;
+			font-size: $font-base;
+			flex-grow: 1;
+			justify-content: flex-end;
+
+			.timetype {
+				width: 100%;
+				justify-content: flex-end;
+			}
+
+			.citylist {
+				.del {
+					color: $color-red;
+					font-size: $font-sm;
+					border: 1px solid $color-red;
+					border-radius: 10rpx;
+					line-height: 1;
+					padding: 5rpx 15rpx;
+				}
+			}
+
+			.img {
+				width: 26rpx;
+			}
+
+			.buttom {
+				color: $base-color;
+				border: 1px solid $base-color;
+				border-radius: 10rpx;
+				line-height: 1;
+				padding: 10rpx 20rpx;
+			}
+		}
+
+		.titleBox {
+			.title {
+				color: $font-color-base;
+				font-size: $font-base;
+			}
+		}
+	}
+
+	.bg-gray {
+		background-color: $color-gray;
+	}
+
+	.base-buttom {
+		position: fixed;
+		bottom: 30rpx;
+		right: 0rpx;
+		left: 0rpx;
+	}
+</style>

+ 5 - 7
pages/user/model/mymodel.vue → pages/user/model/mymodellist.vue

@@ -32,8 +32,7 @@
 		share
 	} from '@/api/wx';
 	import {
-		getBannerList,
-		getShowTemplateList
+		userShowTemplateList
 	} from '@/api/model.js';
 	export default {
 		data() {
@@ -50,15 +49,15 @@
 			};
 		},
 		onLoad: function(option) {
-			this.getShowTemplateList();
+			this.getList();
 		},
 		// 滚动到底部
 		onReachBottom() {
-			this.getShowTemplateList();
+			this.getList();
 		},
 		methods: {
 			// 获取模板列表
-			getShowTemplateList(source) {
+			getList(source) {
 				//这里是将订单挂载到tab列表下
 				let navItem = this.navList;
 				let state = navItem.state;
@@ -76,8 +75,7 @@
 				}
 				// 修改当前对象状态为加载中
 				navItem.loadingType = 'loading';
-				getShowTemplateList({
-						is_recommend: 1,
+				userShowTemplateList({
 						page: navItem.page,
 						pageSize: navItem.limit
 					})

+ 1 - 1
pages/user/money/pay.vue

@@ -54,7 +54,7 @@
 	} from '@/api/wallet.js';
 	import {
 		orderPay
-	} from '@/api/order.js';
+	} from '@/api/set.js';
 	// #ifdef H5
 	import weixinObj from "@/plugin/jweixin-module/index.js";
 	// #endif

+ 2 - 2
pages/userhome/user.vue

@@ -79,7 +79,7 @@
 								<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
 							</view>
 						</view> -->
-						<view class="flex listItem" @click="navTo('/pages/user/myCart/myCart')">
+						<view class="flex listItem" @click="navTo('/pages/user/model/mymodellist')">
 							<view class="flex titleBox">
 								<image class="listIconImg" src="../../static/icon/mymodel.png" mode="widthFix"></image>
 								<text class="title">已购模板</text>
@@ -217,7 +217,7 @@
 			navcard() {
 				// 判断是否已经认证
 				if (this.user.work_type_id <=0) {
-					this.navTo('/pages/user/model/mymodel')
+					this.navTo('/pages/user/model/modelrz')
 				} else {
 					if (this.user.show_template_code) {
 						this.navTo('/pages/user/model/defaultmodel?code=' + this.user.show_template_code)