cmy 2 سال پیش
والد
کامیت
3ee42274e0
6فایلهای تغییر یافته به همراه228 افزوده شده و 115 حذف شده
  1. 2 2
      pages/index/index.vue
  2. 1 1
      pages/public/register.vue
  3. 66 38
      pages/user/model/model.vue
  4. 1 1
      pages/user/model/modelList.vue
  5. 153 70
      pages/user/model/modelrz.vue
  6. 5 3
      pages/userhome/user.vue

+ 2 - 2
pages/index/index.vue

@@ -152,7 +152,7 @@
 			let url = currentPage.route; //当前页面url
 			let item = currentPage.options; //如果要获取url中所带的参数可以查看options
 			let shareObj = {
-				title: this.shareData.title, // 默认是小程序的名称(可以写slogan等)
+				title: "母婴界严选", // 默认是小程序的名称(可以写slogan等)
 				path: url, // 默认是当前页面,必须是以‘/’开头的完整路径
 				imageUrl: this.shareData.img,
 				desc: this.shareData.synopsis,
@@ -422,7 +422,7 @@
 					.list-title {
 						color: $font-color-dark;
 						font-size: $font-base;
-						margin-bottom: 10rpx;
+						margin-bottom: 20rpx;
 					}
 					.list-money {
 						.money {

+ 1 - 1
pages/public/register.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="container">
-		<view class="loginTitle"><text>注册绿津</text></view>
+		<view class="loginTitle"><text>注册母婴界严选</text></view>
 		<view class="login_text">
 			<view class="login_input flex">
 				<view class="login_img">

+ 66 - 38
pages/user/model/model.vue

@@ -139,15 +139,22 @@
 		</view>
 		<view class="create-model-ts">
 		</view>
-		<button type="default" class="fxmp" open-type="share" v-if="!shareId && modelInfo.is_use== 1 && !is_yl && userInfo.info_audit_status == 1 && !look">
-			<view class="">
-				分享名片
+		<view class="fxmp flex">
+			<button class="share" type="default" open-type="share"
+				v-if="!shareId && modelInfo.is_use== 1 && !is_yl && userInfo.work_type_id >0 && !look">
+				<view class="">
+					分享名片
+				</view>
+			</button>
+			<view class="nav-model" @click="navto('/pages/user/model/modelrz?type=1')">
+				修改名片
 			</view>
-		</button>
-		<view class="ljrz" v-if="userInfo.info_audit_status != 1" @click="navto('/pages/user/model/modelrz')">
+		</view>
+
+		<view class="ljrz" v-if="userInfo.work_type_id <=0" @click="navto('/pages/user/model/modelrz')">
 			立即认证
 		</view>
-		<view class="create-model flex" v-if="!shareId && !is_yl && userInfo.info_audit_status == 1 && look">
+		<view class="create-model flex" v-if="!shareId && !is_yl && userInfo.work_type_id >0 && look">
 			<view class="price-show">
 				模板费用:<text>{{modelInfo.price*1}}</text>
 			</view>
@@ -197,7 +204,7 @@
 		onLoad(opt) {
 			// this.getUserCardInfo()
 			this.mtype = opt.mtype
-			if(opt.look && opt.look == 1) {
+			if (opt.look && opt.look == 1) {
 				this.look = false
 			}
 			if (opt.uid) {
@@ -242,14 +249,14 @@
 			let pages = getCurrentPages(); //获取加载的页面
 			let currentPage = pages[pages.length - 2]; //获取当前页面的对象
 			// console.log(currentPage.route)
-			if(currentPage.route == 'pages/public/wxLogin') {
+			if (currentPage.route == 'pages/public/wxLogin') {
 				uni.switchTab({
-					url:'/pages/index/index'
+					url: '/pages/index/index'
 				})
 			}
 		},
 		methods: {
-			...mapMutations('user',['setUserInfo']),
+			...mapMutations('user', ['setUserInfo']),
 			navto(url) {
 				uni.navigateTo({
 					url
@@ -259,9 +266,9 @@
 				const that = this;
 				getUser({}).then((e) => {
 					that.setUserInfo(e.data)
-					if(e.data.info_audit_status == 1 && that.shareId == '') {
+					if (e.data.work_type_id >0 && that.shareId == '') {
 						that.getUserCardInfo()
-					}else {
+					} else {
 						that.cardInfo = {
 							name: '佚名',
 							avatar: 'https://api.myjie.cn/resource/icon/base/f.png',
@@ -277,28 +284,35 @@
 							service_max_price: 200,
 							service_time_type_title: '每小时',
 							service_intro_content: '高级育婴师证|高级催乳师证|早产儿护理师母婴护理证|金牌月嫂证|产后恢复师证|公共营养师证|月子药膳调理师证|国际宝宝睡眠咨询师证|普通话二级甲等|中央广播电视大学学历|学前教育专业,深耕幼教十年,技能全面,性格活泼,有亲和力,做事干净利落,有很强的责任心。对宝宝有爱心,体贴新手妈妈。专业技能熟练。应急能力强。让家人放心、产妇舒心的坐好月子。',
-							service_intro_imgs: ['https://api.myjie.cn/resource/icon/base/pj1.png','https://api.myjie.cn/resource/icon/base/pj2.png','https://api.myjie.cn/resource/icon/base/pj3.png','https://api.myjie.cn/resource/icon/base/pj4.png'],
-							service_audit_imgs: ['https://api.myjie.cn/resource/icon/base/zs1.png','https://api.myjie.cn/resource/icon/base/zs2.png','https://api.myjie.cn/resource/icon/base/zs3.png','https://api.myjie.cn/resource/icon/base/zs4.png'],
+							service_intro_imgs: ['https://api.myjie.cn/resource/icon/base/pj1.png',
+								'https://api.myjie.cn/resource/icon/base/pj2.png',
+								'https://api.myjie.cn/resource/icon/base/pj3.png',
+								'https://api.myjie.cn/resource/icon/base/pj4.png'
+							],
+							service_audit_imgs: ['https://api.myjie.cn/resource/icon/base/zs1.png',
+								'https://api.myjie.cn/resource/icon/base/zs2.png',
+								'https://api.myjie.cn/resource/icon/base/zs3.png',
+								'https://api.myjie.cn/resource/icon/base/zs4.png'
+							],
 							service_project_ar: [{
-								title: '婴幼儿睡眠管理',
-								content: '如:日夜颠倒、睡眠不规律、乳头混淆、奶睡、抱睡等问题,帮助宝爸宝妈规律孩子作息、解决婴幼儿喂养困扰,培养良好的生活、学习习惯。'
-							},{
-								title: '特色月子餐',
-								content: '套用客户的一句话“养眼、养心更养胃”!家常菜、面食、点心、甜品、靓汤、五谷杂粮粥、婴幼儿花样辅食等。'
-							},
-							{
-								title: '早产儿特殊护理',
-								content: '包括早产儿基础护理、安全喂养方法、追赶性生长、消化与免疫系统等技能,根据宝宝具体情况给予早产儿家长的科学入户指导。'
-							},
-							{
-								title: '0-6岁早期教育',
-								content: '在婴孩最敏感最能接受的时期进行事半功倍的适时教育,针对不同年龄段的孩子,开发婴幼儿潜能的教育,为孩子多元化和健康人格打下良好基础。'
-							}
+									title: '婴幼儿睡眠管理',
+									content: '如:日夜颠倒、睡眠不规律、乳头混淆、奶睡、抱睡等问题,帮助宝爸宝妈规律孩子作息、解决婴幼儿喂养困扰,培养良好的生活、学习习惯。'
+								}, {
+									title: '特色月子餐',
+									content: '套用客户的一句话“养眼、养心更养胃”!家常菜、面食、点心、甜品、靓汤、五谷杂粮粥、婴幼儿花样辅食等。'
+								},
+								{
+									title: '早产儿特殊护理',
+									content: '包括早产儿基础护理、安全喂养方法、追赶性生长、消化与免疫系统等技能,根据宝宝具体情况给予早产儿家长的科学入户指导。'
+								},
+								{
+									title: '0-6岁早期教育',
+									content: '在婴孩最敏感最能接受的时期进行事半功倍的适时教育,针对不同年龄段的孩子,开发婴幼儿潜能的教育,为孩子多元化和健康人格打下良好基础。'
+								}
 							]
 						}
 					}
-				}).catch((e) => {
-				})
+				}).catch((e) => {})
 			},
 			gobuy() {
 				let that = this
@@ -328,9 +342,10 @@
 								cancelText: '关闭',
 								confirmText: '查看模板',
 								success: res => {
-									if(res.confirm){
+									if (res.confirm) {
 										uni.reLaunch({
-											url: '/pages/user/model/model?mtype='+that.mtype,
+											url: '/pages/user/model/model?mtype=' +
+												that.mtype,
 										});
 									}
 								},
@@ -565,7 +580,7 @@
 				height: 270rpx;
 				background-color: #fff;
 				margin-bottom: 30rpx;
-				box-shadow: 0px 0px 20rpx 0px rgba(50,50,52,0.6);
+				box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.6);
 			}
 
 
@@ -803,10 +818,20 @@
 	}
 
 	.fxmp {
-		padding: 0;
-		border-radius: 0;
-		&::after {
-			border: none;
+		width: 750rpx;
+		.share {
+			width: 50%;
+			padding: 0;
+			border-radius: 0;
+			&::after {
+				border: none;
+			}
+		}
+
+		.nav-model {
+			background-color: #FFF;
+			color: $base-color;
+			width: 50%;
 		}
 	}
 
@@ -838,6 +863,7 @@
 		font-weight: 500;
 		text-align: center;
 		line-height: 98rpx;
+
 		.price-show {
 			font-size: 32rpx;
 			font-weight: 500;
@@ -866,6 +892,7 @@
 			background: #f65486;
 		}
 	}
+
 	.yl {
 		position: fixed;
 		bottom: 0;
@@ -879,6 +906,7 @@
 		font-size: 34rpx;
 		background-color: #f65486;
 	}
+
 	.ljrz {
 		position: fixed;
 		width: 750rpx;
@@ -890,4 +918,4 @@
 		background-color: #f65486;
 		color: #fff;
 	}
-</style>
+</style>

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

@@ -177,7 +177,7 @@
 					.list-title {
 						color: $font-color-dark;
 						font-size: $font-base;
-						margin-bottom: 10rpx;
+						margin-bottom: 20rpx;
 					}
 
 					.list-money {

+ 153 - 70
pages/user/model/modelrz.vue

@@ -6,7 +6,8 @@
 		</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 class="img" @click="navCroper(400,400,'one')"
+					:src="updata.avatar||`../../../static/image/upImg.png`">
 				</image>
 			</view>
 		</view>
@@ -56,7 +57,7 @@
 						<text class="title">籍贯</text>
 					</view>
 					<view class="right flex">
-						<input class="input" v-model="updata.ancestral_place" type="number" placeholder="请填写籍贯"
+						<input class="input" v-model="updata.ancestral_place" type="text" placeholder="请填写籍贯"
 							placeholder-class="placeholder" />
 					</view>
 				</view>
@@ -65,7 +66,7 @@
 						<text class="title">学历</text>
 					</view>
 					<view class="right flex">
-						<input class="input" v-model="updata.education" type="number" placeholder="请填写学历"
+						<input class="input" v-model="updata.education" type="text" placeholder="请填写学历"
 							placeholder-class="placeholder" />
 					</view>
 				</view>
@@ -74,7 +75,7 @@
 						<text class="title">民族</text>
 					</view>
 					<view class="right flex">
-						<input class="input" v-model="updata.minority" type="number" placeholder="请填写民族"
+						<input class="input" v-model="updata.minority" type="text" placeholder="请填写民族"
 							placeholder-class="placeholder" />
 					</view>
 				</view>
@@ -108,8 +109,8 @@
 						<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">
+						<picker class="input" :value="updata.timetype.ind" :range='timeTypeList' range-key='title'
+							mode="selector" @change="changetimetype">
 							<view>
 								{{updata.timetype.title||'收费时间类型'}}
 							</view>
@@ -186,13 +187,12 @@
 			</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>
+					<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>
+					<image class="img" @click="navCroper(400,400,'all')" src="../../../static/image/upImg.png"></image>
 				</view>
 			</view>
 		</view>
@@ -202,13 +202,13 @@
 		<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>
+					<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>
+					<image class="img" @click="navCroper(400,400,'auditall')" src="../../../static/image/upImg.png">
+					</image>
 				</view>
 			</view>
 		</view>
@@ -218,13 +218,13 @@
 		<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>
+					<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>
+					<image class="img" @click="navCroper(400,400,'serviceall')" src="../../../static/image/upImg.png">
+					</image>
 				</view>
 			</view>
 		</view>
@@ -237,7 +237,8 @@
 		getServiceTimeTypeList,
 		getServiceTypeList,
 		subInfoAudit,
-		getUserWorkTypeList
+		getUserWorkTypeList,
+		getUserCardInfo
 	} from '@/api/model.js';
 
 	import {
@@ -256,31 +257,30 @@
 		data() {
 			return {
 				// 上传数据
-				updata:{
+				updata: {
 					avatar: '', //用户头像
 					name: '', //用户名称
 					phone: '', //手机号
 					cardId: '', //身份证号
-					minMoney: '',//最低价
-					maxMoney: '',//最高价
+					minMoney: '', //最低价
+					maxMoney: '', //最高价
 					checkedType: [], //选中的服务类型
 					time: '', //出生日期
 					timetype: {
 						title: '',
-						code:''
+						code: '',
+						ind: 0 //默认0
 					}, //选中的时间类型
 					onCity: [], //选中的城市
-					mymask:'',//自评
+					mymask: '', //自评
 					imageList: [], //自评上传图片列表
-					ancestral_place:'',//籍贯
-					education:'',//学历
-					ancestral_place:'',//籍贯
-					minority:'',//民族
-					
-					work_year:'',//从业时长
+					ancestral_place: '', //籍贯
+					education: '', //学历
+					minority: '', //民族
+					work_year: '', //从业时长
 					word: {
 						title: '',
-						id:''
+						id: ''
 					},
 					service_audit_imgs: [], //我的证书
 					service_imgs: [], //服务展示
@@ -289,10 +289,16 @@
 				timeTypeList: [], //时间类型
 				workTypeList: [], //工作类型
 				loding: false, //是否载入中
+				type: 0, //0为新增,1为修改
+				userModelData: {} //保存获取的用户模板
 
 			};
 		},
-		onLoad(options) {
+		async onLoad(options) {
+			if (options.type == 1) {
+				this.type = 1;
+				await this.getUserCardInfo()
+			}
 			this.init()
 		},
 		computed: {
@@ -307,9 +313,21 @@
 				const that = this;
 				getServiceTimeTypeList().then(
 					(res) => {
-						that.timeTypeList = res.data.list
-						that.updata.timetype=that.timeTypeList[0];
-						console.log(res);
+						that.timeTypeList = res.data.list.map((arr) => {
+							return arr
+						})
+						if (that.type == 0) {
+							that.updata.timetype = that.timeTypeList[0];
+						} else
+						if (that.type == 1) {
+							for (let i = 0; i < that.timeTypeList.length; i++) {
+								if (that.timeTypeList[i].code == that.userModelData.service_type) {
+									that.updata.timetype = that.timeTypeList[i]
+									that.updata.timetype.ind = i;
+									break
+								}
+							}
+						}
 					}
 				).catch(
 					(res) => {
@@ -319,7 +337,17 @@
 				getServiceTypeList().then(
 					(res) => {
 						that.typeList = res.data.list
-						console.log(res);
+						if (that.type == 1) {
+							console.log(that.userModelData.service_project_ar,'that.userModelData.service_project');
+							for (let i = 0; i < that.userModelData.service_project_ar.length; i++) {
+								for (let a = 0; a < that.typeList.length; a++) {
+									if (+that.typeList[a].id == +that.userModelData.service_project_ar[i].id) {
+										that.typeList[a].checked = true;
+									}
+								}
+							}
+						}
+						console.log(res,'服务');
 					}
 				).catch(
 					(res) => {
@@ -330,7 +358,18 @@
 					(res) => {
 						console.log(res);
 						that.workTypeList = res.data.list
-						that.updata.word=that.workTypeList[0]
+						if (that.type == 0) {
+							that.updata.word = that.workTypeList[0];
+
+						} else if (that.type == 1) {
+							for (let i = 0; i < that.workTypeList.length; i++) {
+								console.log(that.userModelData.user_work_type_id,'word',that.workTypeList[i].id);
+								if (that.workTypeList[i].id == that.userModelData.user_work_type_id) {
+									that.updata.word = that.workTypeList[i];
+									break
+								}
+							}
+						}
 					}
 				).catch(
 					(res) => {
@@ -338,14 +377,58 @@
 					}
 				)
 			},
+			getUserCardInfo() {
+				const that = this;
+				return new Promise((resolve,reject) => {
+					getUserCardInfo().then(
+						(data) => {
+							const res = data.data;
+							// 存储返回用户数据
+							that.userModelData = res;
+							that.updata = Object.assign(that.updata, {
+								avatar: res.avatar, //用户头像
+								name: res.name, //用户名称
+								phone: res.mobile, //手机号
+								cardId: res.idcard, //身份证号
+								minMoney: res.service_min_price, //最低价
+								maxMoney: res.service_max_price, //最高价
+								time: res.birthday, //出生日期
+								onCity: res.service_area_all.map((arr) => {
+									return {
+										province: arr[0].name,
+										city: arr[1].name,
+										district: arr[2].name
+									}
+								}), //选中的城市
+								mymask: res.service_intro_content, //自评
+								imageList: res.service_intro_imgs, //自评上传图片列表
+								ancestral_place: res.ancestral_place, //籍贯
+								education: res.education, //学历
+								minority: res.minority, //民族
+					
+								work_year: res.work_year, //从业时长
+								service_audit_imgs: res.service_audit_imgs, //我的证书
+								service_imgs: res.service_imgs, //服务展示
+							})
+							console.log(that.updata,'that.updata');
+							resolve('初始化数据成功')
+						}
+					).catch(
+						(res) => {
+							reject(res)
+						}
+					)
+				})
+				
+			},
 			// 选中的服务类型
 			checkTypeChange(type) {
 				this.updata.checkedType = type.detail.value;
 				console.log(type)
 			},
 			// 选中的工作类型
-			changeWorkType(type){
-				this.updata.word =  this.workTypeList[type.detail.value];
+			changeWorkType(type) {
+				this.updata.word = this.workTypeList[type.detail.value];
 				console.log(this.updata.word)
 			},
 			// 选择时间类型
@@ -421,14 +504,14 @@
 										that.updata.imageList.push(urldata.img)
 									} else if (type == 'tab') {
 										that.updata.imageList.splice(ind, 1, urldata.img)
-									}else if (type == 'audit') {
+									} 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') {
+									} 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)
+									} else if (type == 'serviceall') {
+										that.updata.service_imgs.push(urldata.img)
 									}
 								})
 							}
@@ -510,7 +593,7 @@
 					});
 					return
 				}
-				
+
 				if (!that.updata.name) {
 					uni.showModal({
 						title: '错误',
@@ -526,7 +609,7 @@
 						showCancel: false,
 					});
 					return
-				}else if(!isCardNo(that.updata.cardId)){
+				} else if (!isCardNo(that.updata.cardId)) {
 					uni.showModal({
 						title: '错误',
 						content: '请填写正确的身份证号',
@@ -566,7 +649,7 @@
 					});
 					return
 				}
-				if (that.updata.onCity.length==0) {
+				if (that.updata.onCity.length == 0) {
 					uni.showModal({
 						title: '错误',
 						content: '请选择服务区域',
@@ -574,7 +657,7 @@
 					});
 					return
 				}
-				if (that.updata.checkedType.length==0) {
+				if (that.updata.checkedType.length == 0) {
 					uni.showModal({
 						title: '错误',
 						content: '请选择服务内容',
@@ -584,26 +667,26 @@
 				}
 				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)=>{
+						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,
+						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;

+ 5 - 3
pages/userhome/user.vue

@@ -213,16 +213,17 @@
 			this.getUser();
 		},
 		methods: {
+			...mapMutations('user', ['setUserInfo']),
 			// 跳转卡片页面
 			navcard() {
 				// 判断是否已经认证
 				if (this.user.work_type_id <=0) {
 					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)
+					if (this.user.show_template_id) {
+						this.navTo('/pages/user/model/model?mtype=' + this.user.show_template_id+'&look=1')
 					}else{
-						this.navTo('/pages/user/model/defaultmodel')
+						this.navTo('/pages/user/model/model')
 					}
 				}
 			},
@@ -245,6 +246,7 @@
 				const that = this;
 				getUser({}).then((e) => {
 					this.user = e.data;
+					this.setUserInfo(e.data)
 				}).catch((e) => {
 					console.log(e, 'sj');
 				})