Jelajahi Sumber

个人优势

lifanagju_citu 7 bulan lalu
induk
melakukan
508dc85ef0

+ 13 - 0
api/user.js

@@ -294,6 +294,19 @@ export const savePersonPortrait = (data) => {
   })
 }
 
+// 保存个人优势
+export const saveResumeAdvantage = (data) => {
+  return request({
+    url: '/app-api/menduner/system/person/resume/advantage/save',
+    method: 'POST',
+    data,
+    custom: {
+      auth: true,
+      showLoading: false
+    }
+  })
+}
+
 // 修改头像
 export const updatePersonAvatar = (avatar) => {
   return request({

+ 6 - 0
pages.json

@@ -54,6 +54,12 @@
 						"navigationBarTitleText": "在线简历"
 					}
 				},
+				{
+					"path": "resumeOnline/advantage",
+					"style": {
+						"navigationBarTitleText": "个人优势"
+					}
+				},
 				{
 					"path": "resumeOnline/portrait",
 					"style": {

+ 50 - 0
pagesA/resumeOnline/advantage.vue

@@ -0,0 +1,50 @@
+<!--  -->
+<template>
+  <view style="padding: 20rpx 30rpx;">
+    <textarea
+      placeholder-style="color:#F76260"
+      placeholder="请填写您的个人优势..."
+      auto-focus
+      maxlength="300"
+      v-model="advantage"
+      style="border: 1rpx solid gray; width: 100%; min-height: 300px;"
+    ></textarea>
+    <view class="f-horizon-center">
+      <button type="primary" size="default" class="send-button"  @click="submit">提 交</button>
+    </view>
+  </view>
+</template>
+
+<script setup>
+import { saveResumeAdvantage } from '@/api/user'
+import { ref } from 'vue'
+import { userStore } from '@/store/user'; const useUserStore = userStore()
+
+const advantage = ref('')
+// 获取基础信息-
+function getBaseInfo () {
+  const baseInfo = useUserStore.baseInfo
+  advantage.value = baseInfo?.advantage || ''
+}
+
+// 获取基础信息
+getBaseInfo()
+// 提交
+const submit = async () => {
+  if (!advantage.value) {
+    uni.showToast({ title: '请填写您的个人优势', icon: 'none' })
+    return
+  }
+  await saveResumeAdvantage({ content: advantage.value })
+  uni.showToast({ title: '编辑成功', icon: 'success' })
+  await useUserStore.getInfo()
+  //
+  setTimeout(() => {
+		uni.navigateBack({
+			delta: 1,
+		})
+	}, 1000);
+}
+</script>
+<style lang="scss" scoped>
+</style>

+ 1 - 0
pagesA/resumeOnline/index.vue

@@ -59,6 +59,7 @@
           color="#666"
           custom-prefix="iconfont"
           size="18"
+          @tap="handleTo('advantage')"
         ></uni-icons>
       </view>
       <view class="ellipsis-2 text px-20">{{ baseInfo.advantage ? baseInfo.advantage : '请填写您的个人优势...' }}</view>

+ 2 - 2
pagesA/resumeOnline/portrait.vue

@@ -66,8 +66,8 @@ const handleCancelSelect = (nameCn) => {
 const select = ref([])
 // 获取基础信息
 function getBaseInfo () {
-  const { tagList } = useUserStore.baseInfo
-  select.value = tagList?.length ? tagList : []
+  const baseInfo = useUserStore.baseInfo
+  select.value = baseInfo?.tagList?.length ? tagList : []
 }
 
 // 获取基础信息