cmy 1 рік тому
батько
коміт
ec96f52341
1 змінених файлів з 23 додано та 12 видалено
  1. 23 12
      pages/user/model/modelrz.vue

+ 23 - 12
pages/user/model/modelrz.vue

@@ -216,8 +216,9 @@
 		<view class="listBox">
 			<view class="list">
 				<view class="listItem">
-					<editor class="textarea" auto-height :maxlength='-1' @blur='changeMyask' type="text"
-						placeholder="自我评价\n\n本人从业***年,已经服务***名客户\n成长经历:\n从事母婴工作之前是做***行业的,于***年经过专业培训后进入母婴行业;先后学习了***\n性格特征:\n本人性格直爽,具有很强的服务意识,做事认真负责,擅长……类工作\n服务格言:\n全心全意服务好每一位客户" />
+					<editor id='editor' class="textarea" auto-height :maxlength='-1' @blur='changeMyask' type="text"
+						placeholder="自我评价\n\n本人从业***年,已经服务***名客户\n成长经历:\n从事母婴工作之前是做***行业的,于***年经过专业培训后进入母婴行业;先后学习了***\n性格特征:\n本人性格直爽,具有很强的服务意识,做事认真负责,擅长……类工作\n服务格言:\n全心全意服务好每一位客户" >
+						</editor>
 				</view>
 			</view>
 			<view class="con_box">
@@ -333,7 +334,7 @@
 					},
 					service_audit_imgs: [], //我的证书
 					service_imgs: [], //服务展示
-					no: ''
+					no: '',
 				},
 				typeList: [], //服务类型
 				timeTypeList: [], //时间类型
@@ -343,19 +344,25 @@
 				userModelData: {}, //保存获取的用户模板
 				modelid: '', //保存要预览的模板id
 				educationList: ['小学', '初中', '高中', '大专', '本科', '研究生', '博士'], //学历列表
-				areaList: ['是', '否']
+				areaList: ['是', '否'],
+				editorCtx:''
 			};
 		},
 		async onLoad(options) {
 			this.modelid = options.modelid
-			if (options.type == 1) {
-				this.type = 1;
-				await this.getUserCardInfo()
-			} else if (options.type == 2) {
-				this.type = 0
-			}
-			this.init()
-			console.log(this.jgList);
+			this.$nextTick(async ()=>{
+				if (options.type == 1) {
+					this.type = 1;
+					await this.getUserCardInfo()
+				} else if (options.type == 2) {
+					this.type = 0
+				}
+				this.init()
+			})
+		},
+		onReady() {
+			// 保存对象
+			uni.createSelectorQuery().select('#editor').context((res) => {this.editorCtx = res.context}).exec()
 		},
 		computed: {
 			// #ifdef H5
@@ -499,6 +506,7 @@
 					user_work_type_title: that.updata.word.title,
 					service_count: that.updata.service_count
 				}
+				
 				// console.log('baocun',data);
 				uni.setStorageSync('modeldata', data)
 				uni.navigateTo({
@@ -543,6 +551,9 @@
 								no: res.no,
 								service_count: res.service_count
 							})
+							this.editorCtx.setContents({
+								html:res.service_intro_content
+							})
 							// console.log(that.updata, 'that.updata');
 							resolve('初始化数据成功')
 						}