1263428893@qq.com 5 months ago
parent
commit
9ebaf99ac5
11 changed files with 147 additions and 35 deletions
  1. +5
    -0
      common/api.js
  2. +2
    -1
      common/config.js
  3. +9
    -0
      pages.json
  4. +18
    -3
      pages/auth/index.vue
  5. +24
    -11
      pages/home/index.vue
  6. +23
    -9
      pages/login/index.vue
  7. +44
    -0
      pages_subpack/notice/index.vue
  8. +2
    -1
      pages_subpack/order-detail/index.vue
  9. +18
    -9
      pages_subpack/record/index.vue
  10. +1
    -1
      pages_subpack/resume/index.vue
  11. +1
    -0
      util/request/requestInterceptors.js

+ 5
- 0
common/api.js View File

@ -69,3 +69,8 @@ export const getNotice = (params) => http.get('/employ-api/index/getNotice', {pa
export const updateRole = (params) => http.post('/employ-api/user/updateRole', params)
// 招聘方修改信息 传id修改
export const updateRoleBoss = (params) => http.post('/employ-api/user/updateRoleBoss', params)
// 公告列表
export const noticeList = (params) => http.get('/employ-api/index/noticeList', {params:params})
// 小程序-获取sessionKey
export const getSessionKey = (params) => http.get('/employ-api/user/getSessionKey', {params:params})

+ 2
- 1
common/config.js View File

@ -1,4 +1,5 @@
module.exports = {
// baseUrl: 'http://3fl8266127.qicp.vip'
baseUrl:"https://employadmin.hhlm1688.com"
// baseUrl:"https://employadmin.hhlm1688.com",
baseUrl:"http://augcl.natapp1.cc"
}

+ 9
- 0
pages.json View File

@ -220,6 +220,15 @@
"navigationBarBackgroundColor": "#FF7A31",
"navigationBarTextStyle": "white"
}
},
{
"path": "notice/index",
"style": {
"navigationBarTitleText": "公告详情",
"navigationStyle":"default",
"navigationBarBackgroundColor": "#FF7A31",
"navigationBarTextStyle": "white"
}
}
]
}


+ 18
- 3
pages/auth/index.vue View File

@ -55,23 +55,38 @@
</template>
<script>
import { appletLogin,userInfo,getSysText } from "@/common/api.js"
import { appletLogin,userInfo,getSysText,getSessionKey } from "@/common/api.js"
export default {
name : 'Auth',
data() {
return {
checked:[],
show:false,
sysList:[]
sysList:[],
code:""
}
},
mounted() {
this.onSysText()
this.onSessionKey()
},
filter:{
},
methods: {
onSessionKey(){
// let that = this
// uni.login({
// success(res) {
// that.code = res.code
// getSessionKey({code:that.code}).then(response=>{
// uni.setStorageSync('sessionKey',response.result)
// }).catch(error=>{
// })
// }
// })
},
getValueByName(name) {
const item = this.sysList.find((item) => item.name == name);
return item ? item.value : "";
@ -121,7 +136,7 @@
headimgurl:event.detail.userInfo.avatarUrl,
iv:event.detail.iv,
nickName:event.detail.userInfo.nickName,
session_key:"",
session_key:uni.getStorageSync('sessionKey'),
shareId:uni.getStorageSync('userId'),
vid:""
}


+ 24
- 11
pages/home/index.vue View File

@ -19,14 +19,13 @@
<view class="se-px-20">
<u-swiper height="300rpx" :indicator="true" style="background-color: #f5f5f5;height: 300rpx;" :list="swiperList" keyName="image" @change="change" @click="click"></u-swiper>
</view>
<view class="se-pt-10 se-bgc-white se-px-0 se-py-10 se-ta-l se-c-orange se-flex se-flex-ai-c se-fs-26">
<image class="se-a-80" src="@/static/image/aed60x.png" mode=""></image>
<text class="se-ml-10">今日有6个工作息新发布....</text>
<view class="se-pt-10 se-px-0 se-py-10 se-ta-l se-flex se-flex-ai-c se-fs-26">
<u-notice-bar direction="column" mode="link" @click="onNoticeDetail" :text="noticeList"></u-notice-bar>
</view>
</view>
<view class="se-my-20 se-bgc-white se-grid">
<navigator :url="`/pages_subpack/category/index?id=`+item.id" v-for="(item, index) in tabList" :key="index" class="se-flex-v-c se-pt-30 se-mb-20">
<image class="se-a-100 se-br-20 se-bgc-f5" :src="item.icon" mode=""></image>
<image class="se-a-100 se-bgc-f5" :src="item.icon" mode=""></image>
<text class="se-w-150 se-h-60 se-lh-30 se-c-black se-fs-22 se-ta-c se-mt-10 se-toe-2">{{item.name}}</text>
</navigator>
</view>
@ -72,7 +71,8 @@
rolelist,
industryList,
getSysText,
getNotice
getNotice,
noticeList
} from "@/common/api.js"
import enterpriseBox from "./component/enterprise.vue"
import masterBox from "./component/master.vue"
@ -84,6 +84,8 @@
},
data(){
return {
notice:[],
noticeList:[],
status:1,
list: [
"https://cdn.uviewui.com/uview/swiper/swiper1.png"
@ -131,14 +133,25 @@
that.onRolelist()
},
methods:{
onNoticeDetail(index){
uni.navigateTo({
url:"/pages_subpack/notice/index?id="+this.notice[index].id
})
},
onNotice(){
// let that = this
// let params={}
// getNotice(params).then(response=>{
// console.info(response)
// }).catch(error=>{
let that = this
let params={}
let arr=[]
noticeList(params).then(response=>{
console.info(response)
response.result.forEach(items=>{
arr.push(items.title)
})
that.noticeList = arr
that.notice = response.result
}).catch(error=>{
// })
})
},
onSysText(){
let that = this


+ 23
- 9
pages/login/index.vue View File

@ -40,7 +40,7 @@
</template>
<script>
import { updateUserInfo,bindPhone,userInfo } from "@/common/api.js"
import { updateUserInfo,bindPhone,userInfo,getSessionKey } from "@/common/api.js"
export default {
name : 'Login',
data() {
@ -48,17 +48,32 @@
nameUser:"",
imagUrl:"",
phone:"",
back:0
back:0,
code:""
}
},
onLoad(options) {
console.info(options)
// this.onSessionKey()
if(options.back==1){
this.back = options.back
this.onUserInfo()
}
},
methods: {
onSessionKey(){
// let that = this
// uni.login({
// success(res) {
// that.code = res.code
// getSessionKey({code:res.code}).then(response=>{
// uni.setStorageSync('sessionKey',response.result)
// }).catch(error=>{
// })
// }
// })
},
onUserInfo(){
let params={}
userInfo(params).then(response=>{
@ -87,12 +102,11 @@
code : detail.code,
encryptedData: detail.encryptedData,
iv:detail.iv,
sessionKey: uni.getStorageSync('sessionKey'),
openid:uni.getStorageSync('userInfo').appletOpenid
}
bindPhone(params).then((response) => {
console.info(response)
that.phone = response.result
let obj = JSON.parse(response.result)
that.phone = obj.phone_info.phoneNumber
}).catch(error=>{
})
@ -114,10 +128,10 @@
headimgurl:that.imagUrl,
nickName:that.nameUser,
openid:uni.getStorageSync('userInfo').appletOpenid,
phone:that.phone
phoneNumber:that.phone
}
// &&that.phone
if(that.imagUrl&&that.nameUser){
//
if(that.imagUrl&&that.nameUser&&that.phone){
updateUserInfo(params).then((response) => {
if(that.back==1){
uni.navigateBack({
@ -134,7 +148,7 @@
}else{
return uni.showToast({
icon:"none",
title:"头像和昵称不能为空!"
title:"头像,昵称和手机号不能为空!"
})
}
}


+ 44
- 0
pages_subpack/notice/index.vue View File

@ -0,0 +1,44 @@
<template>
<view class="se-p-20">
<view class="se-c-black se-fw-6 se-fs-28">
{{detail.title}}
</view>
<view class="se-mt-20">
<u-parse :content="detail.content" :previewImg="true"></u-parse>
</view>
</view>
</template>
<script>
import {
getNotice
} from "@/common/api.js"
export default {
data(){
return{
id:"",
detail:{}
}
},
onLoad(options) {
this.id = options.id
this.onNotice()
},
methods:{
onNotice(){
let that = this;
let params={
id:that.id
}
getNotice(params).then(response=>{
that.detail = response.result
}).catch(error=>{
})
}
}
}
</script>
<style>
</style>

+ 2
- 1
pages_subpack/order-detail/index.vue View File

@ -142,7 +142,8 @@
</view>
<view class="se-flex se-pt-30 se-flex-h-sb">
<view class="se-fs-24 se-display-ib">支付方式</view>
<view class="se-fs-24 se-display-ib"></view>
<view class="se-fs-24 se-display-ib" v-if="obj.payType==0">提前支付</view>
<view class="se-fs-24 se-display-ib" v-if="obj.payType==1">试用后支付</view>
</view>
<view class="se-flex se-pt-30 se-flex-h-sb">
<view class="se-fs-24 se-display-ib">工作时间</view>


+ 18
- 9
pages_subpack/record/index.vue View File

@ -52,14 +52,15 @@
<view class="se-b-b se-m-20 se-py-20 se-px-20 se-flex-h-sb" v-for="(items,indexs) in records" :key="indexs" @click="onMasterDetail(items)">
<view class="se-flex se-flex-v">
<view class="se-flex">
<text class="se-fw-6 se-c-33 se-fs-30">{{items.desc}}</text>
<text class="se-fw-6 se-c-33 se-fs-30">{{items.title}}</text>
</view>
<view class="se-c-text-third se-fs-22 se-mt-20">
<text >{{items.createTime}}</text>
</view>
</view>
<view class="se-c-33 se-fs-30 se-fw-5">
{{items.money}}
<view class="se-c-33 se-fs-30 se-fw-5" :class="items.type==0?'se-c-red':'se-c-green'">
{{items.type==0?'-':'+'}}
{{items.money}}
</view>
</view>
@ -100,27 +101,35 @@
}
},
mounted() {
this.startTime = this.$dayjs().valueOf();
this.startDate = this.$dayjs().format('YYYY-MM-DD')
this.startTime = this.$dayjs().subtract(1, 'day').valueOf();
this.startDate = this.$dayjs().subtract(1, 'day').format('YYYY-MM-DD')
this.endTime = this.$dayjs().valueOf();
this.endDate = this.$dayjs().format('YYYY-MM-DD')
console.info(this.$dayjs().format('YYYY-MM-DD'))
this.onPayLog();
},
onReachBottom() {
let that = this
that.pageNo = that.pageNo + 1
that.onPayLog()
},
methods:{
onPayLog(){
let that = this
let params = {
pageNo:that.pageNo,
pageSize:that.pageSize,
startTime:that.startTime,
endTime:that.endTime
startTime:that.startDate+" 00:00:00",
endTime:that.endDate+" 23:59:59"
}
payLog(params).then(response=>{
console.info("payLog",response)
that.money = response.result.money?response.result.money:0
that.moneyLog = response.result.moneyLog?response.result.moneyLog:0
that.records = response.result.log.records
if(that.pageNo==1){
that.records = response.result.log.records
}else{
that.records = that.records.concat(response.result.log.records)
}
}).catch(error=>{
})


+ 1
- 1
pages_subpack/resume/index.vue View File

@ -35,7 +35,7 @@
</view>
</u-form-item>
<u-form-item label="个人介绍" prop="introduce">
<u--textarea v-model="form.introduce" count maxlength="300" class="se-bgc-f5"
<u--textarea v-model="form.introduce" height="100" count maxlength="300" class="se-bgc-f5"
placeholder="请选择个人介绍"></u--textarea>
</u-form-item>
</view>


+ 1
- 0
util/request/requestInterceptors.js View File

@ -7,6 +7,7 @@ module.exports = (vm) => {
config.data = config.data || {}
config.header['X-Access-Token'] = uni.getStorageSync('token');
config.header['Content-Type'] = 'application/json'
// config.header['Content-Type'] = 'application/x-www-form-urlencoded'
return config
}, config => {
return Promise.reject(config)


Loading…
Cancel
Save