Browse Source

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

lifanagju_citu 6 tháng trước cách đây
mục cha
commit
b51b57ba24

+ 18 - 0
App.vue

@@ -1,6 +1,24 @@
 <script>
+import { onShareAppMessage,onShareTimeline } from '@dcloudio/uni-app'
 	export default {
 		onLaunch: function() {
+			
+			wx.showShareMenu({
+				withShareTicket: true,
+				menus: ['shareAppMessage', 'shareTimeline']
+			})
+			onShareAppMessage(() => {
+				return {
+					title: '门墩儿 专注顶尖招聘',
+					path: '/pages/index/position'
+				}
+			})
+			onShareTimeline(() => {
+				return {
+					title: '门墩儿 专注顶尖招聘',
+					path: '/pages/index/position'
+				}
+			})
 			console.log('App Launch')
 			uni.setStorageSync('firstOpen', true)
 

+ 13 - 0
api/user.js

@@ -334,3 +334,16 @@ export const getJobAdvertisedShareQrcode = (data) => {
     }
   })
 }
+
+// 保存简易基本信息
+export const savePersonSimpleInfo = (data) => {
+  return request({
+    url: '/app-api/menduner/system/person/resume/info/simple/save',
+    method: 'POST',
+    data,
+    custom: {
+      auth: true,
+      showLoading: false
+    }
+  })
+}

+ 3 - 2
components/Advertisement/index.vue

@@ -21,7 +21,8 @@ const emit = defineEmits(['login'])
 
 const current = ref(0)
 const inputDialog = ref()
-const swiperList = [{ url: 'https://minio.citupro.com/dev/menduner/advertisement.jpg', path: '' }]
+const swiperList = [{ url: 'https://minio.menduner.com/dev/menduner/advertisement.jpg', path: '' }]
+const currentPage = getCurrentPages()[0].route
 
 const closeAdd = () => {
   inputDialog.value.close()
@@ -34,7 +35,7 @@ const openDialog = () => {
 
 const skipLink = () => {
 	closeAdd()
-	emit('login')
+	if (currentPage !== 'pages/login/index') emit('login')
 }
 
 const swiperChange = (e) => {

+ 2 - 3
components/PositionList/index.vue

@@ -8,9 +8,8 @@
           <view class="titleBox my-5">
             <view style="display: flex;align-items: center;">
               <view v-if="item.job?.hire" class="iconfont icon-a-1_zhaopin ss-m-r-10" style="color: #e03506; font-size: 25px;"></view>
-              <!-- <view v-if="item.job.name.indexOf('style')" v-html="item.job.name" class="job-name" style=""></view> -->
-              <rich-text v-if="item.job?.name?.indexOf('style')" class="job-name" :nodes="item.job.name"></rich-text>
-              <view v-else class="job-name" style="">{{item.job?.name}}</view>
+              <rich-text v-if="item.job?.name?.indexOf('style') !== -1" class="job-name" :nodes="item.job.name"></rich-text>
+              <view v-else class="job-name">{{item.job?.name}}</view>
             </view>
             <span v-if="!item.job?.payFrom && !item.job?.payTo" class="salary-text">面议</span>
             <span v-else class="salary-text">{{ item.job?.payFrom }}-{{ item.job?.payTo }}{{ item.job?.payName ? '/' + item.job?.payName : '' }}</span>

+ 0 - 2
main.js

@@ -17,7 +17,6 @@ app.$mount()
 import { createSSRApp } from 'vue'
 import App from './App.vue'
 import { createPinia } from 'pinia'
-import share from './mixins/share'
 import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
 const pinia = createPinia()
 pinia.use(piniaPluginPersistedstate)
@@ -25,7 +24,6 @@ pinia.use(piniaPluginPersistedstate)
 export function createApp() {
   const app = createSSRApp(App)
   app.use(pinia)
-  app.mixin(share)
 
   return {
     app

+ 0 - 22
mixins/share.js

@@ -1,22 +0,0 @@
-export default {
-  created() {
-    //#ifdef MP-WEIXIN
-    wx.showShareMenu({
-      withShareTicket: true,
-      menus: ['shareAppMessage', 'shareTimeline']
-    })
-    //#endif
-  },
-  onShareAppMessage() {
-    return {
-      title: '门墩儿 专注顶尖招聘',
-      path: '/pages/index/position'
-    }
-  },
-  onShareTimeline() {
-    return {
-      title: '门墩儿 专注顶尖招聘',
-      path: '/pages/index/position'
-    }
-  }
-}

+ 3 - 4
pages/index/crowdsourcing.vue

@@ -63,10 +63,9 @@ onLoad(() => {
 	getList()
 })
 const swiperAdList = [
-  'https://minio.citupro.com/dev/menduner/miniProgram/banner1.gif',
-  'https://minio.citupro.com/dev/menduner/miniProgram/banner2.jpg',
-  'https://minio.citupro.com/dev/menduner/miniProgram/banner3.jpg',
-	'https://minio.citupro.com/dev/menduner/miniProgram/banner4.jpg'
+  'https://minio.menduner.com/dev/menduner/banner/IHG.gif',
+  'https://minio.menduner.com/dev/menduner/banner/Marriott.jpg',
+  'https://minio.menduner.com/dev/menduner/banner/UrCove.jpg'
 ]
 const items = reactive([])
 const pageInfo = ref({

+ 2 - 2
pages/index/my.vue

@@ -63,7 +63,7 @@
 			<uni-popup ref="inputDialog" type="dialog">
 				<view class="shareQrCodePopupContent">
 					<view>请前往网页版{{ dialogType ? '门墩儿招聘' : '门墩儿商城' }}</view>
-					<uni-link class="ss-m-t-10" :href="dialogType ? 'http://menduner.citupro.com:7878' : 'http://menduner.citupro.com:7878/mall'" text="点击复制网页地址" color="#00897B" fontSize="16" copyTips="已复制,请在电脑端打开"></uni-link>
+					<uni-link class="ss-m-t-10" :href="dialogType ? 'https://www.menduner.com' : 'https://www.menduner.com/mall'" text="点击复制网页地址" color="#00897B" fontSize="16" copyTips="已复制,请在电脑端打开"></uni-link>
 				</view>
 			</uni-popup>
 		</view>
@@ -242,7 +242,7 @@ const handleLogoutConfirm = () => {
 
 <style scoped lang="scss">
 .pb-150 {
-	padding-bottom: 150px;
+	padding-bottom: 100px;
 }
 .img-box {
   width: 150rpx;

+ 22 - 6
pages/index/position.vue

@@ -45,7 +45,7 @@
         <uni-popup ref="inputDialog" type="dialog">
           <view class="shareQrCodePopupContent">
             <view class="ss-m-b-10">请前往网页版门墩儿查看</view>
-            <uni-link href="http://menduner.citupro.com:7878" text="点击复制网页地址" color="#00897B" fontSize="16" copyTips="已复制,请在电脑端打开"></uni-link>
+            <uni-link href="https://www.menduner.com" text="点击复制网页地址" color="#00897B" fontSize="16" copyTips="已复制,请在电脑端打开"></uni-link>
           </view>
         </uni-popup>
       </view>
@@ -62,7 +62,7 @@ import AdvertisePop from '@/components/Advertisement'
 import { dealDictObjData } from '@/utils/position'
 import { getJobAdvertisedSearch } from '@/api/position'
 import { showAuthModal } from '@/hooks/useModal'
-import { onShow, onLoad } from '@dcloudio/uni-app'
+import { onShow, onLoad, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
 import layoutPage from '@/layout'
 import Navbar from '@/components/Navbar'
 import { getRewardEventList } from '@/utils/eventList'
@@ -76,16 +76,32 @@ onShow(() => {
 })
 
 onLoad(() => {
+  
+  wx.showShareMenu({
+    withShareTicket: true,
+    menus: ['shareAppMessage', 'shareTimeline']
+  })
+  onShareAppMessage(() => {
+    return {
+      title: '门墩儿 专注顶尖招聘',
+      path: '/pages/index/position'
+    }
+  })
+  onShareTimeline(() => {
+    return {
+      title: '门墩儿 专注顶尖招聘',
+      path: '/pages/index/position'
+    }
+  })
   if (!uni.getStorageSync('token')) getRewardEventList()
 })
 
 const inputDialog = ref()
 const more = ref('more')
 const swiperAdList = [
-  'https://minio.citupro.com/dev/menduner/miniProgram/banner1.gif',
-  'https://minio.citupro.com/dev/menduner/miniProgram/banner2.jpg',
-  'https://minio.citupro.com/dev/menduner/miniProgram/banner3.jpg',
-  'https://minio.citupro.com/dev/menduner/miniProgram/banner4.jpg'
+  'https://minio.menduner.com/dev/menduner/banner/IHG.gif',
+  'https://minio.menduner.com/dev/menduner/banner/Marriott.jpg',
+  'https://minio.menduner.com/dev/menduner/banner/UrCove.jpg'
 ]
 const filterList = ref([
   { label: '城市', dictType: 'areaTreeDataExtend', key: 'areaIds', map: { text: 'name', value: 'id' } },

+ 21 - 5
pages/index/welfare.vue

@@ -87,6 +87,13 @@
         </view>
       </scroll-view>
 		</view>
+
+    <uni-popup ref="inputDialog" type="dialog">
+      <view class="shareQrCodePopupContent">
+        <view class="ss-m-b-10">请前往网页版门墩儿商城兑换</view>
+        <uni-link href="https://www.menduner.com/mall" text="点击复制网页地址" color="#00897B" fontSize="16" copyTips="已复制,请在电脑端打开"></uni-link>
+      </view>
+    </uni-popup>
 	</layout-page>
 </template>
 
@@ -105,6 +112,7 @@ import { onShow } from '@dcloudio/uni-app'
 import { userStore } from '@/store/user'
 import { showAuthModal } from '@/hooks/useModal'
 
+const inputDialog = ref()
 const useUserStore = userStore()
 // 设置自定义tabBar选中值
 
@@ -118,16 +126,17 @@ const getTask = async () => {
 // 商品列表
 const goodsList = [
   { name: '房券-高端酒店房券', point: 12000, url: 'https://minio.menduner.com/dev/menduner/hotalRoomVoucher.png' },
-  { name: '门墩儿酒店英语学习年卡', point: 8000, url: 'https://minio.menduner.com/dev/menduner/englishCourses.png' },
+  { name: '门墩儿酒店英语学习年卡', point: 8000, url: 'https://minio.menduner.com/dev/menduner/englishCourses.jpg' },
   { name: '红酒-经典年份葡萄酒', point: 5000, url: 'https://minio.menduner.com/dev/menduner/redWine.png' },
   { name: '瑞幸咖啡券-瑞幸咖啡精致享受券', point: 2000, url: 'https://minio.menduner.com/dev/menduner/coffee.png' },
   { name: '减压捏捏乐', point: 500, url: 'https://minio.menduner.com/dev/menduner/pinchMusic.png' }
 ]
 const handleClickGoods = () => {
-  uni.showToast({
-    icon: 'none',
-    title: '请前往网页版门墩儿商城兑换'
-  })
+  // uni.showToast({
+  //   icon: 'none',
+  //   title: '请前往网页版门墩儿商城兑换'
+  // })
+  inputDialog.value.open()
 }
 
 // 连续签到天数
@@ -249,6 +258,13 @@ function handleTo (page) {
 </script>
 
 <style scoped lang="scss">
+.shareQrCodePopupContent {
+	width: 75vw;
+	padding: 40rpx;
+	margin-bottom: 20rpx;
+	text-align: center;
+	background-color: #fff;
+}
 .box {
   overflow: hidden;
   height: 100vh;

+ 86 - 4
pages/login/index.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="ss-p-30 head-box">
-    <view class="head-title">欢迎来到门墩儿,登录/注册领积分</view>
+    <view class="head-title">欢迎来到门墩儿,新用户注册领积分</view>
     <view class="head-subtitle ss-m-t-30 justify-center">未注册的手机号,验证后自动注册账号</view>
 
     <view class="ss-m-t-60">
@@ -32,7 +32,7 @@
         <button v-else class="wxLogon" type="text" :plain="true" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">微信一键登录</button>
       </view> -->
 
-      <button class="send-button" @tap="handleLogin"> 登录/注册 </button>
+      <button class="send-button" @tap="handleLogin"> 注册 </button>
       <view class="agreement-box ss-flex ss-row-center">
         <uni-icons size="20" :type="protocol ? 'checkbox-filled' : 'circle'" :color="protocol ? '#00897B' : '#ccc'" @tap="protocol = !protocol"></uni-icons>
         <view class="color-999 ss-flex ss-col-center ss-m-l-8 font-size-13">
@@ -49,6 +49,42 @@
     </view>
 
     <AdvertisePop></AdvertisePop>
+
+    <uni-popup ref="popup" background-color="#fff" type="bottom" :is-mask-click="false">
+      <view style="padding: 20px;">
+        <view class="text-center ss-m-b-50 font-size-20 color-primary">请完善您的基本信息</view>
+        <uni-forms
+          ref="baseInfoRef"
+          v-model="formData"
+          :rules="formRules"
+          validateTrigger="bind"
+          label-width="75px"
+          labelAlign="center"
+        >
+          <uni-forms-item name="name" label="姓名" required>
+            <uni-easyinput placeholder="请输入姓名" v-model="formData.name" :inputBorder="false" type="text"></uni-easyinput>
+          </uni-forms-item>
+          <uni-forms-item name="phone" label="联系电话" required>
+            <uni-easyinput placeholder="请输入联系电话" v-model="formData.phone" :inputBorder="false" type="number"></uni-easyinput>
+          </uni-forms-item>
+          <uni-forms-item name="sex" label="性别" required>
+            <uni-data-picker v-model="formData.sex" :localdata="dictObj.sex" :clear-icon="false" popup-title="请选择性别" :map="{ text: 'label', value: 'value' }"></uni-data-picker>
+          </uni-forms-item>
+          <uni-forms-item name="jobStatus" label="求职状态" required>
+            <uni-data-picker v-model="formData.jobStatus" :localdata="dictObj.jobStatus" :clear-icon="false" popup-title="请选择求职状态" :map="{ text: 'label', value: 'value' }"></uni-data-picker>
+          </uni-forms-item>
+          <uni-forms-item name="expType" label="工作经验" required>
+            <uni-data-picker v-model="formData.expType" :localdata="dictObj.exp" :clear-icon="false" popup-title="请选择工作经验" :clear="false" :map="{ text: 'label', value: 'value' }"></uni-data-picker>
+          </uni-forms-item>
+          <uni-forms-item name="eduType" label="最高学历" required>
+            <uni-data-picker v-model="formData.eduType" :localdata="dictObj.edu" :clear-icon="false" popup-title="请选择最高学历" :clear="false" :map="{ text: 'label', value: 'value' }"></uni-data-picker>
+          </uni-forms-item>
+        </uni-forms>
+      </view>
+      <view class="f-horizon-center">
+				<button type="primary" size="default" class="send-button"  @click="submit">提 交</button>
+			</view>
+		</uni-popup>
   </view>
 </template>
 
@@ -62,10 +98,15 @@ import { onLoad } from '@dcloudio/uni-app'
 import { useIM } from '@/hooks/useIM'
 import { watch } from 'vue'
 import AdvertisePop from '@/components/Advertisement'
+import { dictObj } from '@/utils/position.js'
+import { savePersonSimpleInfo } from '@/api/user'
 
 const useUserStore = userStore()
 const smsLoginRef = ref()
 const protocol = ref(false)
+const popup = ref()
+const baseInfoRef = ref()
+const formData = ref({})
 const state = ref({
   isMobileEnd: false, // 手机号输入完毕
   codeText: '获取验证码',
@@ -79,6 +120,26 @@ const state = ref({
     phone: mobile
   }
 })
+const formRules = {
+	name:{
+		rules: [{required: true, errorMessage: '请输入姓名' }]
+	},
+  phone:{
+		rules: [{required: true, errorMessage: '请输入联系电话' }]
+	},
+	sex : {
+		rules: [{required: true, errorMessage: '请选择您的性别' }]
+	},
+  expType: {
+		rules: [{required: true, errorMessage: '请选择您的工作年限' }]
+	},
+  eduType: {
+		rules: [{required: true, errorMessage: '请选择您的最高学历' }]
+	},
+  jobStatus: {
+		rules: [{required: true, errorMessage: '请选择您的求职状态' }]
+	}
+}
 
 const { resetConfig } = useIM()
 watch(() => useUserStore?.accountInfo?.userId, (newVal, oldVal) => {
@@ -132,7 +193,28 @@ const handleLogin = async () => {
     })
     return
   }
-  await useUserStore.handleShareUserRegister(state.value.sms)
+  const result = await useUserStore.handleShareUserRegister(state.value.sms)
+  if (!result || !Object.keys(result).length) return
+  
+  uni.showToast({ icon: 'none', title: '请先完善信息' })
+  formData.value.phone = state.value.sms.phone
+  popup.value.open()
+}
+
+const submit = async () => {
+  const validate = await unref(baseInfoRef).validate()
+  if (!validate) return uni.showToast({ title: '请将信息补充完整', icon: 'none' })
+  try {
+    await savePersonSimpleInfo(formData.value)
+    uni.showToast({ title: '保存成功', icon: 'none' })
+    await useUserStore.getInfo()
+    await useUserStore.getUserInfo()
+    uni.switchTab({
+      url: '/pages/index/position'
+    })
+  } catch (err) {
+    uni.showToast({ title: err.msg || '保存失败', icon: 'none' })
+  }
 }
 
 
@@ -140,7 +222,7 @@ const handleLogin = async () => {
 //   uni.showToast({ title: '请先阅读并同意用户协议和隐私政策', icon: 'none' })
 // }
 
-// 微信登录
+// // 微信登录
 // const getPhoneNumber = async (e) => {
 //   if (e?.detail?.errMsg !== 'getPhoneNumber:ok') {
 //     uni.showToast({ title: '微信登录失败', icon: 'none' })

+ 1 - 1
pagesA/integral/index.vue

@@ -29,7 +29,7 @@
       <uni-popup ref="inputDialog" type="dialog">
         <view class="shareQrCodePopupContent">
           <view class="ss-m-b-10">请前往网页版门墩儿商城查看</view>
-          <uni-link href="http://menduner.citupro.com:7878/mall" text="点击复制网页地址" color="#00897B" fontSize="16" copyTips="已复制,请在电脑端打开"></uni-link>
+          <uni-link href="https://www.menduner.com/mall" text="点击复制网页地址" color="#00897B" fontSize="16" copyTips="已复制,请在电脑端打开"></uni-link>
         </view>
       </uni-popup>
     </view>

+ 15 - 11
store/user.js

@@ -77,20 +77,24 @@ export const userStore = defineStore('user', {
     },
     // 扫码注册登录
     async handleShareUserRegister (query) {
-      const { data, code } = await shareUserRegister(query)
-      console.log(data, 'data----share-register')
-      if (code === 0) {
+      try {
+        const { data, code } = await shareUserRegister(query)
+        if (code === 0) {
+          uni.showToast({
+            title: '登录成功'
+          })
+          this.accountInfo = data
+          this.getInfo()
+          this.getUserInfo()
+          closeAuthModal()
+        }
+        return Promise.resolve(data);
+      } catch (err) {
         uni.showToast({
-          title: '登录成功'
+          icon: 'none',
+          title: err.msg
         })
       }
-      this.accountInfo = data
-      this.getInfo()
-      this.getUserInfo()
-      closeAuthModal()
-      uni.switchTab({
-        url: '/pages/index/position'
-      })
     },
     // 获取人才信息
     async getInfo() {

+ 2 - 1
utils/config.js

@@ -1,5 +1,6 @@
 // export const baseUrl = 'http://menduner.citupro.com:7878'
-export const baseUrl = 'https://menduner.citupro.com:2443'
+// export const baseUrl = 'https://menduner.citupro.com:2443'
+export const baseUrl = 'https://www.menduner.com'
 
 // 租户id
 export const tenantId = '155'