浏览代码

fix:延时修改

jianghaili 9 月之前
父节点
当前提交
817e65f05c
共有 2 个文件被更改,包括 553 次插入440 次删除
  1. 211 173
      my/feedback/index.vue
  2. 342 267
      my/publish/workhistory.vue

+ 211 - 173
my/feedback/index.vue

@@ -1,189 +1,227 @@
 <template>
-	<view class="page" style="background-color: #ffffff;">
-		<view class="feedback-title">
-			<text>问题和意见</text>
-			<text @tap="chooseMsg">快速键入</text>
-		</view>
-		<view class="feedback-body"><textarea placeholder="请详细描述你的问题和意见..." v-model="sendDate.content"
-				class="feedback-textare" /></view>
-		<view class="feedback-title"><text>联系方式</text></view>
-		<view class="feedback-body"><input class="feedback-input" v-model="sendDate.contact" placeholder="方便我们联系你 " />
-		</view>
+  <view class="page-box">
+    <navBar title="我要反馈" color="#000" />
+    <view class="page-content">
+      <view class="page" style="background-color: #ffffff">
+        <view class="feedback-title">
+          <text>问题和意见</text>
+          <text @tap="chooseMsg">快速键入</text>
+        </view>
+        <view class="feedback-body">
+          <textarea
+            placeholder="请详细描述你的问题和意见..."
+            v-model="sendDate.content"
+            class="feedback-textare"
+          />
+        </view>
+        <view class="feedback-title"><text>联系方式</text></view>
+        <view class="feedback-body"
+          ><input
+            class="feedback-input"
+            v-model="sendDate.contact"
+            placeholder="方便我们联系你 "
+          />
+        </view>
 
-		<button style="" class="feedback-submit" @tap="send">提交</button>
-	</view>
+        <button style="" class="feedback-submit" @tap="send">提交</button>
+      </view>
+    </view>
+  </view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				msgContents: ['界面显示错乱', '启动缓慢,卡出翔了', 'UI无法直视,丑哭了', '偶发性崩溃'],
-				stars: [1, 2, 3, 4, 5],
-				imageList: [],
-				sendDate: {
-					score: 5,
-					content: '',
-					contact: ''
-				}
-			};
-		},
-		onLoad() {
-			let deviceInfo = {
-				appid: plus.runtime.appid,
-				imei: plus.device.imei, //设备标识
-				p: plus.os.name === 'Android' ? 'a' : 'i', //平台类型,i表示iOS平台,a表示Android平台。
-				md: plus.device.model, //设备型号
-				app_version: plus.runtime.version,
-				plus_version: plus.runtime.innerVersion, //基座版本号
-				os: plus.os.version,
-				net: '' + plus.networkinfo.getCurrentType()
-			};
-			this.sendDate = Object.assign(deviceInfo, this.sendDate);
-		},
-		methods: {
-			close(e) {
-				this.imageList.splice(e, 1);
-			},
-			chooseMsg() {
-				//快速输入
-				uni.showActionSheet({
-					itemList: this.msgContents,
-					success: res => {
-						this.sendDate.content = this.msgContents[res.tapIndex];
-					}
-				});
-			},
-			chooseImg() {
-				//选择图片
-				uni.chooseImage({
-					sourceType: ['camera', 'album'],
-					sizeType: 'compressed',
-					count: 8 - this.imageList.length,
-					success: res => {
-						this.imageList = this.imageList.concat(res.tempFilePaths);
-					}
-				});
-			},
-			chooseStar(e) {
-				//点击评星
-				this.sendDate.score = e;
-			},
-			previewImage() {
-				//预览图片
-				uni.previewImage({
-					urls: this.imageList
-				});
-			},
-			send() {
-				//发送反馈
-				console.log(JSON.stringify(this.sendDate));
+import navBar from "@/components/nav-bar/index.vue";
 
-				if (!this.sendDate.content) {
-					uni.showToast({
-						icon: 'none',
-						title: '请输入反馈内容'
-					});
-					return;
-				}
-				if (!this.sendDate.contact) {
-					uni.showToast({
-						icon: 'none',
-						title: '请填写QQ或邮箱'
-					});
-					return;
-				}
-				this.$queue.showLoading('加载中...');
-				this.$Request.postJson('/app/message/insertMessage', {
-					title: this.sendDate.contact,
-					content: JSON.stringify(this.sendDate),
-					state: 2
-				}).then(res => {
-					if (res.code === 0) {
-						uni.showToast({
-							title: '投诉成功'
-						});
-						setTimeout(function() {
-							uni.navigateBack();
-						}, 1000);
-					} else {
-						uni.hideLoading();
-						uni.showModal({
-							showCancel: false,
-							title: '投诉失败',
-							content: res.msg
-						});
-					}
-				});
-			}
-		}
-	};
-</script>
-
-<style>
-	@font-face {
-		font-family: uniicons;
-		font-weight: normal;
-		font-style: normal;
-		src: url('https://img-cdn-qiniu.dcloud.net.cn/fonts/uni.ttf') format('truetype');
-	}
+export default {
+  data() {
+    return {
+      msgContents: [
+        "界面显示错乱",
+        "启动缓慢,卡出翔了",
+        "UI无法直视,丑哭了",
+        "偶发性崩溃",
+      ],
+      stars: [1, 2, 3, 4, 5],
+      imageList: [],
+      sendDate: {
+        score: 5,
+        content: "",
+        contact: "",
+      },
+    };
+  },
+  components: {
+    navBar,
+  },
+  onLoad() {
+    let deviceInfo = {
+      appid: plus.runtime.appid,
+      imei: plus.device.imei, //设备标识
+      p: plus.os.name === "Android" ? "a" : "i", //平台类型,i表示iOS平台,a表示Android平台。
+      md: plus.device.model, //设备型号
+      app_version: plus.runtime.version,
+      plus_version: plus.runtime.innerVersion, //基座版本号
+      os: plus.os.version,
+      net: "" + plus.networkinfo.getCurrentType(),
+    };
+    this.sendDate = Object.assign(deviceInfo, this.sendDate);
+  },
+  methods: {
+    close(e) {
+      this.imageList.splice(e, 1);
+    },
+    chooseMsg() {
+      //快速输入
+      uni.showActionSheet({
+        itemList: this.msgContents,
+        success: (res) => {
+          this.sendDate.content = this.msgContents[res.tapIndex];
+        },
+      });
+    },
+    chooseImg() {
+      //选择图片
+      uni.chooseImage({
+        sourceType: ["camera", "album"],
+        sizeType: "compressed",
+        count: 8 - this.imageList.length,
+        success: (res) => {
+          this.imageList = this.imageList.concat(res.tempFilePaths);
+        },
+      });
+    },
+    chooseStar(e) {
+      //点击评星
+      this.sendDate.score = e;
+    },
+    previewImage() {
+      //预览图片
+      uni.previewImage({
+        urls: this.imageList,
+      });
+    },
+    send() {
+      //发送反馈
+      console.log(JSON.stringify(this.sendDate));
 
-	page {
-		background-color: #F5F5F5 !important;
-	}
-
-	view {
-		font-size: 28upx;
-	}
+      if (!this.sendDate.content) {
+        uni.showToast({
+          icon: "none",
+          title: "请输入反馈内容",
+        });
+        return;
+      }
+      if (!this.sendDate.contact) {
+        uni.showToast({
+          icon: "none",
+          title: "请填写QQ或邮箱",
+        });
+        return;
+      }
+      this.$queue.showLoading("加载中...");
+      this.$Request
+        .postJson("/app/message/insertMessage", {
+          title: this.sendDate.contact,
+          content: JSON.stringify(this.sendDate),
+          state: 2,
+        })
+        .then((res) => {
+          if (res.code === 0) {
+            uni.showToast({
+              title: "投诉成功",
+            });
+            setTimeout(function () {
+              uni.navigateBack();
+            }, 1000);
+          } else {
+            uni.hideLoading();
+            uni.showModal({
+              showCancel: false,
+              title: "投诉失败",
+              content: res.msg,
+            });
+          }
+        });
+    },
+  },
+};
+</script>
 
+<style lang="scss" scoped>
+@font-face {
+  font-family: uniicons;
+  font-weight: normal;
+  font-style: normal;
+  src: url("https://img-cdn-qiniu.dcloud.net.cn/fonts/uni.ttf") format("truetype");
+}
 
-	/*问题反馈*/
-	.feedback-title {
-		display: flex;
-		flex-direction: row;
-		justify-content: space-between;
-		align-items: center;
-		padding: 20upx;
-		color: #8f8f94;
-		font-size: 28upx;
-	}
+page {
+  .page-box {
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    right: 0;
+    top: 0;
+    overflow: hidden;
+    display: flex;
+    flex-direction: column;
+    .page-content {
+      flex: 1;
+      overflow: hidden;
+      overflow-y: auto;
+    }
+  }
+}
 
-	.feedback-star-view.feedback-title {
-		justify-content: flex-start;
-		margin: 0;
-	}
+view {
+  font-size: 28upx;
+}
 
-	.feedback-body {
-		font-size: 32upx;
-		padding: 16upx;
-		margin: 16upx;
-		border-radius: 16upx;
-		background: #FFFFFF;
-		/* color: #FFF; */
-	}
+/*问题反馈*/
+.feedback-title {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  align-items: center;
+  padding: 20upx;
+  color: #8f8f94;
+  font-size: 28upx;
+}
 
-	.feedback-textare {
-		height: 200upx;
-		font-size: 34upx;
-		line-height: 50upx;
-		width: 100%;
-		box-sizing: border-box;
-		padding: 20upx 30upx 0;
+.feedback-star-view.feedback-title {
+  justify-content: flex-start;
+  margin: 0;
+}
 
-	}
+.feedback-body {
+  font-size: 32upx;
+  padding: 16upx;
+  margin: 16upx;
+  border-radius: 16upx;
+  background: #ffffff;
+  /* color: #FFF; */
+}
 
-	.feedback-input {
-		font-size: 32upx;
-		height: 60upx;
-		padding: 15upx 20upx;
-		line-height: 60upx;
-	}
+.feedback-textare {
+  height: 200upx;
+  font-size: 34upx;
+  line-height: 50upx;
+  width: 100%;
+  box-sizing: border-box;
+  padding: 20upx 30upx 0;
+}
 
+.feedback-input {
+  font-size: 32upx;
+  height: 60upx;
+  padding: 15upx 20upx;
+  line-height: 60upx;
+}
 
-	.feedback-submit {
-		background: #016BF6;
-		color: #ffffff;
-		margin: 20upx;
-		margin-top: 32upx;
-	}
-</style>
+.feedback-submit {
+  background: #016bf6;
+  color: #ffffff;
+  margin: 20upx;
+  margin-top: 32upx;
+}
+</style>

+ 342 - 267
my/publish/workhistory.vue

@@ -1,17 +1,29 @@
 <template>
-	<view>
-		<view class="box" v-if="resumesClassify==1">
-			<view class="flex align-center justify-between">
-				<view class=" text-bold" style="width: 150rpx;">公司名称</view>
-				<view class="flex align-center">
-					<u-input v-model="resumesTitle" placeholder="请输入公司名称" placeholder-style="color:#999999;" />
-					<view class="margin-left-sm">
-						<image src="../../static/images/my/right_icon.png" style="width: 12upx;height: 21upx;"></image>
-					</view>
-				</view>
-			</view>
-			<view class="margin-tb" style="width: 100%;height: 1rpx;background: #F2F2F2;"></view>
-			<!-- <view class="flex align-center justify-between">
+  <view class="page-box">
+    <navBar title="工作信息" color="#000" />
+    <view class="page-content">
+      <view class="box" v-if="resumesClassify == 1">
+        <view class="flex align-center justify-between">
+          <view class="text-bold" style="width: 150rpx">公司名称</view>
+          <view class="flex align-center">
+            <u-input
+              v-model="resumesTitle"
+              placeholder="请输入公司名称"
+              placeholder-style="color:#999999;"
+            />
+            <view class="margin-left-sm">
+              <image
+                src="../../static/images/my/right_icon.png"
+                style="width: 12upx; height: 21upx"
+              ></image>
+            </view>
+          </view>
+        </view>
+        <view
+          class="margin-tb"
+          style="width: 100%; height: 1rpx; background: #f2f2f2"
+        ></view>
+        <!-- <view class="flex align-center justify-between">
 				<view class=" text-bold" style="width: 150rpx;">项目名称</view>
 				<view class="flex align-center">
 					<u-input v-model="resumesProject" placeholder="请输入项目名称" placeholder-style="color:#999999;" />
@@ -21,265 +33,328 @@
 				</view>
 			</view>
 			<view class="margin-tb" style="width: 100%;height: 1rpx;background: #F2F2F2;"></view> -->
-			<view class="flex align-center justify-between">
-				<view class=" text-bold" style="width: 150rpx;">担任岗位</view>
-				<view class="text-right flex align-center ">
-					<u-input v-model="resumesPost" placeholder="请输入岗位名称" placeholder-style="color:#999999;;" />
-					<view class="margin-left-sm">
-						<image src="../../static/images/my/right_icon.png" style="width: 12upx;height: 21upx;"></image>
-					</view>
-				</view>
-			</view>
-			<view class="margin-tb" style="width: 100%;height: 1rpx;background: #F2F2F2;"></view>
-			<view class="flex align-center justify-between">
-				<view class=" text-bold" style="width: 150rpx;">在职时间</view>
-				<view class="text-right flex align-center ">
-					<view :style="resumesTime1?'':'color: gray;'" @click="show=true">{{resumesTime1?resumesTime1:'请选择开始时间'}}</view>
-					<span style="padding: 0 10rpx 0 10rpx;">至</span>
-					<view :style="resumesTime2?'':'color: gray;'" @click="show2=true">{{resumesTime2?resumesTime2:'请选择结束时间'}}</view>
-					<view class="margin-left-sm">
-						<image src="../../static/images/my/right_icon.png" style="width: 12upx;height: 21upx;"></image>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="box" v-if="resumesClassify==2">
-			<view class="flex align-center justify-between">
-				<view class=" text-bold" style="width: 150rpx;">项目名称</view>
-				<view class="flex align-center">
-					<u-input v-model="resumesTitle" placeholder="请输入项目名称" placeholder-style="color:#999999;" />
-					<view class="margin-left-sm">
-						<image src="../../static/images/my/right_icon.png" style="width: 12upx;height: 21upx;"></image>
-					</view>
-				</view>
-			</view>
-			<view class="margin-tb" style="width: 100%;height: 1rpx;background: #F2F2F2;"></view>
-			<view class="flex align-center justify-between">
-				<view class=" text-bold" style="width: 150rpx;">担任岗位</view>
-				<view class="text-right flex align-center ">
-					<u-input v-model="resumesPost" placeholder="请输入担任岗位" placeholder-style="color:#999999;;" />
-					<view class="margin-left-sm">
-						<image src="../../static/images/my/right_icon.png" style="width: 12upx;height: 21upx;"></image>
-					</view>
-				</view>
-			</view>
-			<view class="margin-tb" style="width: 100%;height: 1rpx;background: #F2F2F2;"></view>
-			<view class="flex align-center justify-between" >
-				<view class=" text-bold" style="width: 150rpx;">项目时间</view>
-				<view class="text-right flex align-center ">
-					<view :style="resumesTime1?'':'color: gray;'" @click="show=true">{{resumesTime1?resumesTime1:'请选择开始时间'}}</view>
-					<span style="padding: 0 10rpx 0 10rpx;">至</span>
-					<view :style="resumesTime2?'':'color: gray;'" @click="show2=true">{{resumesTime2?resumesTime2:'请选择结束时间'}}</view>
-					<view class="margin-left-sm">
-						<image src="../../static/images/my/right_icon.png" style="width: 12upx;height: 21upx;"></image>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="box">
-			<view class=" text-bold">工作内容</view>
-			<view class="padding-tb-sm">
-				<u-input v-model="resumesContent" type="textarea" height="300" placeholder="添加工作经历,向企业全面展示你的能力"
-					inputAlign="text-alight:left" />
-			</view>
-		</view>
-		<view class="btn" @click="submit">保存</view>
-		<u-picker v-model="show" mode="time" @confirm="Dataconfirm"></u-picker>
-		<u-picker v-model="show2" mode="time" @confirm="Dataconfirm2"></u-picker>
-	</view>
+        <view class="flex align-center justify-between">
+          <view class="text-bold" style="width: 150rpx">担任岗位</view>
+          <view class="text-right flex align-center">
+            <u-input
+              v-model="resumesPost"
+              placeholder="请输入岗位名称"
+              placeholder-style="color:#999999;;"
+            />
+            <view class="margin-left-sm">
+              <image
+                src="../../static/images/my/right_icon.png"
+                style="width: 12upx; height: 21upx"
+              ></image>
+            </view>
+          </view>
+        </view>
+        <view
+          class="margin-tb"
+          style="width: 100%; height: 1rpx; background: #f2f2f2"
+        ></view>
+        <view class="flex align-center justify-between">
+          <view class="text-bold" style="width: 150rpx">在职时间</view>
+          <view class="text-right flex align-center">
+            <view :style="resumesTime1 ? '' : 'color: gray;'" @click="show = true">{{
+              resumesTime1 ? resumesTime1 : "请选择开始时间"
+            }}</view>
+            <span style="padding: 0 10rpx 0 10rpx">至</span>
+            <view :style="resumesTime2 ? '' : 'color: gray;'" @click="show2 = true">{{
+              resumesTime2 ? resumesTime2 : "请选择结束时间"
+            }}</view>
+            <view class="margin-left-sm">
+              <image
+                src="../../static/images/my/right_icon.png"
+                style="width: 12upx; height: 21upx"
+              ></image>
+            </view>
+          </view>
+        </view>
+      </view>
+      <view class="box" v-if="resumesClassify == 2">
+        <view class="flex align-center justify-between">
+          <view class="text-bold" style="width: 150rpx">项目名称</view>
+          <view class="flex align-center">
+            <u-input
+              v-model="resumesTitle"
+              placeholder="请输入项目名称"
+              placeholder-style="color:#999999;"
+            />
+            <view class="margin-left-sm">
+              <image
+                src="../../static/images/my/right_icon.png"
+                style="width: 12upx; height: 21upx"
+              ></image>
+            </view>
+          </view>
+        </view>
+        <view
+          class="margin-tb"
+          style="width: 100%; height: 1rpx; background: #f2f2f2"
+        ></view>
+        <view class="flex align-center justify-between">
+          <view class="text-bold" style="width: 150rpx">担任岗位</view>
+          <view class="text-right flex align-center">
+            <u-input
+              v-model="resumesPost"
+              placeholder="请输入担任岗位"
+              placeholder-style="color:#999999;;"
+            />
+            <view class="margin-left-sm">
+              <image
+                src="../../static/images/my/right_icon.png"
+                style="width: 12upx; height: 21upx"
+              ></image>
+            </view>
+          </view>
+        </view>
+        <view
+          class="margin-tb"
+          style="width: 100%; height: 1rpx; background: #f2f2f2"
+        ></view>
+        <view class="flex align-center justify-between">
+          <view class="text-bold" style="width: 150rpx">项目时间</view>
+          <view class="text-right flex align-center">
+            <view :style="resumesTime1 ? '' : 'color: gray;'" @click="show = true">{{
+              resumesTime1 ? resumesTime1 : "请选择开始时间"
+            }}</view>
+            <span style="padding: 0 10rpx 0 10rpx">至</span>
+            <view :style="resumesTime2 ? '' : 'color: gray;'" @click="show2 = true">{{
+              resumesTime2 ? resumesTime2 : "请选择结束时间"
+            }}</view>
+            <view class="margin-left-sm">
+              <image
+                src="../../static/images/my/right_icon.png"
+                style="width: 12upx; height: 21upx"
+              ></image>
+            </view>
+          </view>
+        </view>
+      </view>
+      <view class="box">
+        <view class="text-bold">工作内容</view>
+        <view class="padding-tb-sm">
+          <u-input
+            v-model="resumesContent"
+            type="textarea"
+            height="300"
+            placeholder="添加工作经历,向企业全面展示你的能力"
+            inputAlign="text-alight:left"
+          />
+        </view>
+      </view>
+      <view class="btn" @click="submit">保存</view>
+      <u-picker v-model="show" mode="time" @confirm="Dataconfirm"></u-picker>
+      <u-picker v-model="show2" mode="time" @confirm="Dataconfirm2"></u-picker>
+    </view>
+  </view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				show2:false,
-				resumesTitle: '',
-				resumesProject:'',//项目名称
-				resumesPost: '',
-				resumesTime: '',
-				resumesTime1: '',
-				resumesTime2: '',
-				resumesContent: '',
-				resumesCompanyList: [],
-				resumesWorkList: [],
-				show: false,
-				resumesClassify: '',
-				index:'',
-			}
-		},
-		onLoad(option) {
-			if (option.state) {
-				this.resumesClassify = option.state
-				if (option.state == 2) {
-					uni.setNavigationBarTitle({
-						title: '项目经验'
-					});
-					if (uni.getStorageSync("resumesWorkList")) { //项目经验
-						this.resumesWorkList = uni.getStorageSync("resumesWorkList")
-						if(option.index!=1){
-							this.index = option.index
-							let obj = JSON.parse(option.list)
-							this.resumesTitle = obj.resumesTitle
-							this.resumesProject = obj.resumesProject
-							this.resumesPost = obj.resumesPost
-							this.resumesContent = obj.resumesContent
-							let time = obj.resumesTime.split(' - ')
-							this.resumesTime1 = time[0]
-							this.resumesTime2 = time[1]
-							this.$forceUpdate()
-						}
-					}
-				}else{
-					if (uni.getStorageSync("resumesCompanyList")) { //工作经验
-						this.resumesCompanyList = uni.getStorageSync("resumesCompanyList")
-						if(option.index){
-							this.index = option.index
-							let obj = JSON.parse(option.list)
-							this.resumesTitle = obj.resumesTitle
-							this.resumesProject = obj.resumesProject
-							this.resumesPost = obj.resumesPost
-							this.resumesContent = obj.resumesContent
-							let time = obj.resumesTime.split(' - ')
-							this.resumesTime1 = time[0]
-							this.resumesTime2 = time[1]
-							this.$forceUpdate()
-						}
-					}
-				}
-			}
-			
-			
-			
-		},
-		onShow() {
-
-		},
-		methods: {
-			Dataconfirm2(e) {
-				this.resumesTime2 = e.year + '-' + e.month + '-' + e.day
-			
-			},
-			Dataconfirm(e) {
-				this.resumesTime1 = e.year + '-' + e.month + '-' + e.day
-
-			},
-			submit() {
-				this.resumesTime = this.resumesTime1 + ' - ' + this.resumesTime2
-				if (this.resumesClassify == 1 && !this.resumesTitle) {
-					uni.showToast({
-						title: '请输入公司名称',
-						icon: 'none',
-						duration: 1000
-					})
-					return
-				}
-				// if (!this.resumesProject) {
-				// 	uni.showToast({
-				// 		title: '请输入项目名称',
-				// 		icon: 'none',
-				// 		duration: 1000
-				// 	})
-				// 	return
-				// }
-				if (!this.resumesPost) {
-					uni.showToast({
-						title: '请输入岗位名称 ',
-						icon: 'none',
-						duration: 1000
-					})
-					return
-				}
-				if (!this.resumesTime1) {
-					uni.showToast({
-						title: '请选择开始时间',
-						icon: 'none',
-						duration: 1000
-					})
-					return
-				}
-				if (!this.resumesTime2) {
-					uni.showToast({
-						title: '请选择结束时间',
-						icon: 'none',
-						duration: 1000
-					})
-					return
-				}
-				if (!this.resumesContent) {
-					uni.showToast({
-						title: '添加工作经历向企业全面展示你的能力',
-						icon: 'none',
-						duration: 1000
-					})
-					return
-				}
-				if (this.resumesClassify == '1') {
-					let data = {
-						resumesTitle: this.resumesTitle,
-						resumesPost: this.resumesPost,
-						resumesTime: this.resumesTime,
-						resumesContent: this.resumesContent,
-						resumesClassify: this.resumesClassify,
-						resumesProject: this.resumesProject
-					}
-					if(this.index && this.index!=''){
-						this.resumesCompanyList[this.index] = data
-					}else{
-						this.resumesCompanyList.push(data)
-					}
-					uni.setStorageSync("resumesCompanyList", this.resumesCompanyList)
-				} else if (this.resumesClassify == '2') {
-					let data = {
-						resumesTitle: this.resumesTitle,
-						resumesPost: this.resumesPost,
-						resumesTime: this.resumesTime,
-						resumesContent: this.resumesContent,
-						resumesClassify: this.resumesClassify,
-						resumesProject: this.resumesProject
-					}
-					if(this.index && this.index!=''){
-						this.resumesWorkList[this.index] = data
-					}else{
-						this.resumesWorkList.push(data)
-					}
-					uni.setStorageSync("resumesWorkList", this.resumesWorkList)
-				}
-				this.index = ''
-				this.resumesTitle = ''
-				this.resumesProject = ''
-				this.resumesPost = ''
-				this.resumesContent = ''
-				this.resumesTime1 = ''
-				this.resumesTime2 = ''
-				uni.navigateBack()
-			}
-		}
-	}
+import navBar from "@/components/nav-bar/index.vue";
+export default {
+  data() {
+    return {
+      show2: false,
+      resumesTitle: "",
+      resumesProject: "", //项目名称
+      resumesPost: "",
+      resumesTime: "",
+      resumesTime1: "",
+      resumesTime2: "",
+      resumesContent: "",
+      resumesCompanyList: [],
+      resumesWorkList: [],
+      show: false,
+      resumesClassify: "",
+      index: "",
+    };
+  },
+  components: {
+    navBar,
+  },
+  onLoad(option) {
+    if (option.state) {
+      this.resumesClassify = option.state;
+      if (option.state == 2) {
+        uni.setNavigationBarTitle({
+          title: "项目经验",
+        });
+        if (uni.getStorageSync("resumesWorkList")) {
+          //项目经验
+          this.resumesWorkList = uni.getStorageSync("resumesWorkList");
+          if (option.index != 1) {
+            this.index = option.index;
+            let obj = JSON.parse(option.list);
+            this.resumesTitle = obj.resumesTitle;
+            this.resumesProject = obj.resumesProject;
+            this.resumesPost = obj.resumesPost;
+            this.resumesContent = obj.resumesContent;
+            let time = obj.resumesTime.split(" - ");
+            this.resumesTime1 = time[0];
+            this.resumesTime2 = time[1];
+            this.$forceUpdate();
+          }
+        }
+      } else {
+        if (uni.getStorageSync("resumesCompanyList")) {
+          //工作经验
+          this.resumesCompanyList = uni.getStorageSync("resumesCompanyList");
+          if (option.index) {
+            this.index = option.index;
+            let obj = JSON.parse(option.list);
+            this.resumesTitle = obj.resumesTitle;
+            this.resumesProject = obj.resumesProject;
+            this.resumesPost = obj.resumesPost;
+            this.resumesContent = obj.resumesContent;
+            let time = obj.resumesTime.split(" - ");
+            this.resumesTime1 = time[0];
+            this.resumesTime2 = time[1];
+            this.$forceUpdate();
+          }
+        }
+      }
+    }
+  },
+  onShow() {},
+  methods: {
+    Dataconfirm2(e) {
+      this.resumesTime2 = e.year + "-" + e.month + "-" + e.day;
+    },
+    Dataconfirm(e) {
+      this.resumesTime1 = e.year + "-" + e.month + "-" + e.day;
+    },
+    submit() {
+      this.resumesTime = this.resumesTime1 + " - " + this.resumesTime2;
+      if (this.resumesClassify == 1 && !this.resumesTitle) {
+        uni.showToast({
+          title: "请输入公司名称",
+          icon: "none",
+          duration: 1000,
+        });
+        return;
+      }
+      // if (!this.resumesProject) {
+      // 	uni.showToast({
+      // 		title: '请输入项目名称',
+      // 		icon: 'none',
+      // 		duration: 1000
+      // 	})
+      // 	return
+      // }
+      if (!this.resumesPost) {
+        uni.showToast({
+          title: "请输入岗位名称 ",
+          icon: "none",
+          duration: 1000,
+        });
+        return;
+      }
+      if (!this.resumesTime1) {
+        uni.showToast({
+          title: "请选择开始时间",
+          icon: "none",
+          duration: 1000,
+        });
+        return;
+      }
+      if (!this.resumesTime2) {
+        uni.showToast({
+          title: "请选择结束时间",
+          icon: "none",
+          duration: 1000,
+        });
+        return;
+      }
+      if (!this.resumesContent) {
+        uni.showToast({
+          title: "添加工作经历向企业全面展示你的能力",
+          icon: "none",
+          duration: 1000,
+        });
+        return;
+      }
+      if (this.resumesClassify == "1") {
+        let data = {
+          resumesTitle: this.resumesTitle,
+          resumesPost: this.resumesPost,
+          resumesTime: this.resumesTime,
+          resumesContent: this.resumesContent,
+          resumesClassify: this.resumesClassify,
+          resumesProject: this.resumesProject,
+        };
+        if (this.index && this.index != "") {
+          this.resumesCompanyList[this.index] = data;
+        } else {
+          this.resumesCompanyList.push(data);
+        }
+        uni.setStorageSync("resumesCompanyList", this.resumesCompanyList);
+      } else if (this.resumesClassify == "2") {
+        let data = {
+          resumesTitle: this.resumesTitle,
+          resumesPost: this.resumesPost,
+          resumesTime: this.resumesTime,
+          resumesContent: this.resumesContent,
+          resumesClassify: this.resumesClassify,
+          resumesProject: this.resumesProject,
+        };
+        if (this.index && this.index != "") {
+          this.resumesWorkList[this.index] = data;
+        } else {
+          this.resumesWorkList.push(data);
+        }
+        uni.setStorageSync("resumesWorkList", this.resumesWorkList);
+      }
+      this.index = "";
+      this.resumesTitle = "";
+      this.resumesProject = "";
+      this.resumesPost = "";
+      this.resumesContent = "";
+      this.resumesTime1 = "";
+      this.resumesTime2 = "";
+      uni.navigateBack();
+    },
+  },
+};
 </script>
 
-<style lang="less">
-	page {
-		background: #F2F2F7;
-	}
-
-	.box {
-		background: #FFFFFF;
-		border-radius: 24upx;
-		margin: 30upx;
-		padding: 30upx;
-	}
+<style lang="less" scoped>
+page {
+  background: #f2f2f7;
+}
+.page-box {
+  position: absolute;
+  left: 0;
+  bottom: 0;
+  right: 0;
+  top: 0;
+  overflow: hidden;
+  display: flex;
+  flex-direction: column;
+  .page-content {
+    flex: 1;
+    overflow: hidden;
+    overflow-y: auto;
+  }
+}
 
+.box {
+  background: #ffffff;
+  border-radius: 24upx;
+  margin: 30upx;
+  padding: 30upx;
+}
 
-	.btn {
-		background: #016BF6;
-		border-radius: 10upx;
-		text-align: center;
-		// margin-top: 30upx;
-		padding: 30upx 0upx;
-		color: #FFFFFF;
-		// font-weight: bold;
-		// letter-spacing: 2rpx;
-		margin: 30upx;
-	}
+.btn {
+  background: #016bf6;
+  border-radius: 10upx;
+  text-align: center;
+  // margin-top: 30upx;
+  padding: 30upx 0upx;
+  color: #ffffff;
+  // font-weight: bold;
+  // letter-spacing: 2rpx;
+  margin: 30upx;
+}
 </style>