Browse Source

Merge branch 'master' of https://git.citupro.com/zhengnaiwen_citu/menduner-uniapp

zhengnaiwen_citu 8 months ago
parent
commit
c8b60ed6d4
4 changed files with 79 additions and 21 deletions
  1. 51 4
      pages/index/communicate.vue
  2. 0 4
      pages/index/crowdsourcing.vue
  3. 3 3
      pages/index/my.vue
  4. 25 10
      pagesA/info/index.vue

+ 51 - 4
pages/index/communicate.vue

@@ -1,12 +1,59 @@
 <template>
-  <view class="nodata-img-parent">
-    <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
-  </view>
+  <layout-page class="ss-m-x-15">
+    <SwiperAd :list="swiperAdListTest"></SwiperAd>
+    <view class="card">
+			<uni-list>
+				<uni-list-item v-for="item in list" :clickable="true" :key="item.title" :title="item.title" showArrow :rightText="item.rightTex || ''" @click="handleToLink(item)"></uni-list-item>
+			</uni-list>
+		</view>
+  </layout-page>
 </template>
 
 <script setup>
+import SwiperAd from '@/components/SwiperAd'
+import layoutPage from '@/layout'
+import { swiperAdListTest } from '@/utils/testData'
+import { getAccessToken } from '@/utils/request'
+import { showAuthModal } from '@/hooks/useModal'
+
+const list = [
+	{	title: '附件简历',	path: '/pagesA/resume/index'	},					
+	{ title: '我的收藏', path: '/pagesA/collect/index' },
+	{ title: '前往门墩儿甄选商城', appId: 'wx6decdf12f9e7a061' },
+	{ title: '切换为招聘者', rightTex: '我要招人' }
+]
+
+// 列表跳转
+const handleToLink = (item) => {
+	if (item.appId) {
+		uni.navigateToMiniProgram({
+			appId: item.appId,
+			// extraData: {} // 要传递的数据
+		})
+		return
+	}
+	if (!item.path) return
+  if (!getAccessToken()) {
+		uni.showToast({
+			title: '请先登录',
+			icon: 'none'
+		})
+		showAuthModal()
+		return
+	}
+	uni.navigateTo({
+		url: item.path
+	})
+}
 </script>
 
 <style scoped lang="scss">
-
+::v-deep .uni-list-item{
+	height: 140rpx !important;
+	line-height: 140rpx !important;
+}
+::v-deep .uni-list-item__content-title{
+	font-size: 32rpx !important;
+	font-weight: 500;
+}
 </style>

+ 0 - 4
pages/index/crowdsourcing.vue

@@ -240,10 +240,6 @@ $defaultColor: #999;
 		}
 		&-carousel {
 			padding: 24rpx;
-			height: 300rpx;
-			&-box {
-				@include box;
-			}
 		}
 		&-recommend {
 			padding: 24rpx;

+ 3 - 3
pages/index/my.vue

@@ -94,9 +94,9 @@ const handleTap = () => {
 		showAuthModal()
 		return
 	}
-	// uni.navigateTo({
-	// 	url: '/pagesA/info/index'
-	// })
+	uni.navigateTo({
+		url: '/pagesA/info/index'
+	})
 }
 
 // 退出登录

+ 25 - 10
pagesA/info/index.vue

@@ -3,9 +3,9 @@
 		<uni-forms ref="form" :modelValue="formData" :rules="rules" validateTrigger="bind" label-width="105px" label-align="right">
 			<uni-forms-item label="头像" name="avatar" class="f-straight">
         <view style="display: flex;flex-wrap: wrap;">
-          <view class="upload-img" v-if="formData.avatar" @click="handlePreviewImage">
-            <uni-icons size="30" type="clear" color="#00897B" style="position: absolute;right: -11px; top: -11px; z-index: 9" @click="formData.avatar = ''"></uni-icons>
-            <image :src="formData.avatar" mode="contain" style="width: 200rpx;height: 200rpx;"></image>
+          <view class="upload-img" v-if="formData?.avatar" @click="handlePreviewImage">
+            <uni-icons size="30" type="clear" color="#fe574a" style="position: absolute;right: -11px; top: -11px; z-index: 9" @click="formData.avatar = ''"></uni-icons>
+            <image :src="formData?.avatar" mode="contain" style="width: 200rpx;height: 200rpx;"></image>
           </view>
           <view v-else class="upload-file" @click="uploadPhotos">
             <uni-icons type="plusempty" size="50" color="#f1f1f1"></uni-icons>
@@ -70,9 +70,25 @@ const form = ref()
 const sexData = ref([])
 const map = { text: 'label', value: 'value' }
 const useUserStore = userStore()
+
 const formData = ref({})
 const getInfo = () => {
-  formData.value = cloneDeep(useUserStore?.baseInfo)
+  formData.value = cloneDeep(useUserStore?.baseInfo) || {
+    avatar: '',
+    name: '',
+    sex: '',
+    regId: '',
+    birthday: '',
+    phone: '',
+    email: '',
+    eduType: '',
+    firstWorkTime: '',
+    expType: '',
+    jobType: '',
+    jobStatus: '',
+    maritalStatus: '',
+    areaId: ''
+  }
 }
 getInfo()
 
@@ -153,13 +169,12 @@ const rules = {
 const submit = async () => {
   const valid = await unref(form).validate()
   if (!valid) return
-  console.log(formData.value.avatar, formData.value)
 
-  // await updatePersonAvatar(formData.value.avatar)
-  // await saveBaseInfo(formData.value)
-  // uni.showToast({ title: '编辑成功', icon: 'success' })
-  // useUserStore.getInfo()
-  // getInfo()
+  await updatePersonAvatar(formData.value.avatar)
+  await saveBaseInfo(formData.value)
+  uni.showToast({ title: '编辑成功', icon: 'success' })
+  await useUserStore.getInfo()
+  getInfo()
 }
 </script>