1263428893@qq.com 3 months ago
parent
commit
c3cf843f98
5 changed files with 107 additions and 45 deletions
  1. +4
    -0
      common/api.js
  2. +2
    -2
      common/config.js
  3. +56
    -30
      pages_subpack/release/component/enterprise.vue
  4. +44
    -12
      pages_subpack/release/component/master.vue
  5. +1
    -1
      util/request/responseInterceptors.js

+ 4
- 0
common/api.js View File

@ -74,3 +74,7 @@ export const noticeList = (params) => http.get('/employ-api/index/noticeList', {
// 小程序-获取sessionKey // 小程序-获取sessionKey
export const getSessionKey = (params) => http.get('/employ-api/user/getSessionKey', {params:params}) export const getSessionKey = (params) => http.get('/employ-api/user/getSessionKey', {params:params})
// 求职者修改信息 传id修改
export const addTask2 = (params) => http.post('/employ-api/user/addTask2', params)

+ 2
- 2
common/config.js View File

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

+ 56
- 30
pages_subpack/release/component/enterprise.vue View File

@ -14,11 +14,15 @@
<u-form-item labelWidth="0" prop="title"> <u-form-item labelWidth="0" prop="title">
<u--input v-model="form.title" placeholder="请在此输入标题"></u--input> <u--input v-model="form.title" placeholder="请在此输入标题"></u--input>
</u-form-item> </u-form-item>
<u-form-item label="工作地点" prop="area" @click="handleAreaChange">
<u--input @click="handleAreaChange" readonly v-model="form.area" placeholder="请选择工作地点"
<u-form-item label="工作地点" prop="area" @click="handleAreaChange()">
<u--input readonly v-model="form.area" placeholder="请选择工作地点"
border="none"></u--input> border="none"></u--input>
<u-icon @click="handleAreaChange" slot="right" name="arrow-right"></u-icon>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
<!-- <u-form-item label="请选择地址" class="se-b-b" prop="area" @click="handleAreaChange()">
<u--input readonly v-model="form.area" placeholder="请选择地址" border="none"></u--input>
<u-icon slot="right" name="arrow-right" ></u-icon>
</u-form-item> -->
<!-- <u-form-item label="详细地址" prop="address"> <!-- <u-form-item label="详细地址" prop="address">
<u--textarea v-model="form.address" count <u--textarea v-model="form.address" count
placeholder="请输入详细地址"></u--textarea> placeholder="请输入详细地址"></u--textarea>
@ -123,6 +127,7 @@
</template> </template>
<script> <script>
import QQMapWX from "@/util/qqmap-wx-jssdk.min.js"
import { addTask,industryList,industryById } from "@/common/api.js" import { addTask,industryList,industryById } from "@/common/api.js"
import citySelect from '@/components/cityselect/index.vue' import citySelect from '@/components/cityselect/index.vue'
export default { export default {
@ -148,30 +153,26 @@
showType: false, showType: false,
typeList: [], typeList: [],
form: { form: {
title:"宜佳营业员",
area:'河北省-秦皇岛市-抚宁区',
title:"",
area:'',
address:'', address:'',
industryId:"1865294357074157570",
industryName:"建筑",
settlement:'0',
industryId:"",
industryName:"",
settlement:'',
date:"", date:"",
dateMin:"2016-02-01 09:00:00",
dateMax:"2016-12-05 18:00:00",
mobile: '13189698114',
dateMin:"",
dateMax:"",
mobile: '',
typeId: '', typeId: '',
typeName:"", typeName:"",
salary:'', salary:'',
dayMoney:"300",
salaryMin: '6000',
salaryMax: '8000',
introduce: '宜佳营业员,每天工作8个小时,上班轻松!',
fileList: [
{
url: "https://tennis-oss.xzaiyp.top/2024-12-31/4b65131c-41f8-4714-a31e-491d08dfb8c4.jpg"
}
],
latitude:'12.34',
longitude:"146.74"
dayMoney:"",
salaryMin: '',
salaryMax: '',
introduce: '',
fileList: [],
latitude:'',
longitude:""
}, },
rules: { rules: {
title:[ title:[
@ -339,7 +340,36 @@
this.showMaxDate = false this.showMaxDate = false
}, },
handleAreaChange(){ handleAreaChange(){
this.showPicker = true
const that = this;
wx.chooseLocation({
// type: 'wgs84',
success: function (res) {
const qqmapsdk = new QQMapWX({
key: 'TT7BZ-Z3LW4-KOAUB-KWHOA-SBJJ6-Y5B6R' //
});
uni.showLoading({
title:"获取中...."
})
qqmapsdk.reverseGeocoder({
location: {
latitude: res.latitude,
longitude: res.longitude
},
success: function(response) {
console.log('逆地理编码结果:', response);
uni.hideLoading()
that.form.longitude = response.result.location.lng
that.form.latitude = response.result.location.lat
that.form.area = response.result.address
},
fail: function(error) {
uni.hideLoading()
console.error('逆地理编码失败:', error);
}
});
}
})
// this.showPicker = true
}, },
handleCityChange(e) { handleCityChange(e) {
console.info(e) console.info(e)
@ -376,12 +406,9 @@
this.$refs.uForm.validateField('typeId') this.$refs.uForm.validateField('typeId')
}, },
submit() { submit() {
console.info(this.form)
this.$refs.uForm.validate().then(res => { this.$refs.uForm.validate().then(res => {
this.onaddTask() this.onaddTask()
// uni.$u.toast('')
}).catch(errors => { }).catch(errors => {
// uni.$u.toast('')
}) })
}, },
@ -391,8 +418,6 @@
"bossPhone": that.form.mobile,// "bossPhone": that.form.mobile,//
"dayMoney": that.form.dayMoney,// "dayMoney": that.form.dayMoney,//
"endTime": that.form.dateMax, "endTime": that.form.dateMax,
// "industryId": that.form.industryId,
// "industryName": that.form.industryName,
"industryId": that.form.typeId, "industryId": that.form.typeId,
"industryName": that.form.typeName, "industryName": that.form.typeName,
"latitude": that.form.latitude, "latitude": that.form.latitude,
@ -406,12 +431,13 @@
"workDetail": that.form.introduce, "workDetail": that.form.introduce,
"workPic": that.form.fileList.map(item => item.url).join(','),// "workPic": that.form.fileList.map(item => item.url).join(','),//
} }
// let p={"bossPhone":"13189698115","dayMoney":"500","endTime":"2016-01-01 00:00:00","industryId":"1865299999310622721","industryName":"","latitude":28.23529,"longitude":112.93134,"moneymax":"15000","moneymin":"12000","payType":"1","startTime":"2015-01-01 00:00:00","title":"","workAddress":"517","workDetail":"","workPic":"https://tennis-oss.xzaiyp.top/2025-02-19/341d669a-ef66-4abb-8b98-ac71c08814c9.jpg"}
addTask(params).then(response=>{ addTask(params).then(response=>{
console.info("response",response) console.info("response",response)
uni.$u.toast("提交成功!") uni.$u.toast("提交成功!")
setTimeout(()=>{ setTimeout(()=>{
uni.switchTab({
url:"/pages/home/index"
uni.navigateBack({
delta:1
}) })
},1500) },1500)
}).catch(error=>{ }).catch(error=>{


+ 44
- 12
pages_subpack/release/component/master.vue View File

@ -15,8 +15,8 @@
<u--input @click="handleindustryChange" readonly v-model="form.industry" placeholder="请选择行业" border="none"></u--input> <u--input @click="handleindustryChange" readonly v-model="form.industry" placeholder="请选择行业" border="none"></u--input>
<u-icon @click="handleindustryChange" slot="right" name="arrow-right"></u-icon> <u-icon @click="handleindustryChange" slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
<u-form-item label="所属工种" class="se-b-b" prop="type" @click="handleTypeChange">
<u--input @click="handleTypeChange" v-model="form.type" readonly placeholder="请选择工种"
<u-form-item label="所属工种" class="se-b-b" prop="typeName" @click="handleTypeChange">
<u--input @click="handleTypeChange" v-model="form.typeName" readonly placeholder="请选择工种"
border="none"></u--input> border="none"></u--input>
<u-icon @click="handleTypeChange" slot="right" name="arrow-right"></u-icon> <u-icon @click="handleTypeChange" slot="right" name="arrow-right"></u-icon>
</u-form-item> </u-form-item>
@ -45,9 +45,9 @@
<u--input v-model="form.salaryMax" type="number" class="se-w-200" placeholder="最大值"></u--input> <u--input v-model="form.salaryMax" type="number" class="se-w-200" placeholder="最大值"></u--input>
</view> </view>
</u-form-item> </u-form-item>
<u-form-item label="日薪" prop="dailywage">
<u-form-item label="日薪" prop="dayMoney">
<view class="se-flex se-flex-h-c"> <view class="se-flex se-flex-h-c">
<u--input v-model="form.dailywage" type="number" class="se-w-200" placeholder="固定值"></u--input>
<u--input v-model="form.dayMoney" type="number" class="se-w-200" placeholder="固定值"></u--input>
</view> </view>
</u-form-item> </u-form-item>
<!-- <u-form-item label="时间" prop="date"> <!-- <u-form-item label="时间" prop="date">
@ -87,7 +87,7 @@
<script> <script>
import QQMapWX from "@/util/qqmap-wx-jssdk.min.js" import QQMapWX from "@/util/qqmap-wx-jssdk.min.js"
import { industryById,industryList } from "@/common/api.js"
import { industryById,industryList,addTask2 } from "@/common/api.js"
export default { export default {
components:{ components:{
@ -139,11 +139,11 @@
dateMax:"", dateMax:"",
mobile: '', mobile: '',
typeId:"", typeId:"",
type: '',
typeName: '',
salary:'', salary:'',
salaryMin: '', salaryMin: '',
salaryMax: '', salaryMax: '',
dailywage:'',
dayMoney:'',
introduce: '', introduce: '',
longitude:'', longitude:'',
latitude:'' latitude:''
@ -343,17 +343,49 @@
}, },
typeSelect(e) { typeSelect(e) {
this.form.typeId = e.id this.form.typeId = e.id
this.form.type = e.name
this.form.typeName = e.name
this.$refs.uForm.validateField('type') this.$refs.uForm.validateField('type')
}, },
submit() { submit() {
console.info(this.form)
this.$refs.uForm.validate().then(res => {
uni.$u.toast('校验通过')
let that = this
that.$refs.uForm.validate().then(res => {
that.onAddTask()
}).catch(errors => { }).catch(errors => {
// uni.$u.toast('') // uni.$u.toast('')
}) })
}
},
onAddTask(){
let that = this
let params ={
"bossPhone": that.form.mobile,//
"dayMoney": that.form.dayMoney,//
// "endTime": that.form.dateMax,
"industryId": that.form.typeId,
"industryName": that.form.typeName,
"latitude": that.form.latitude,
"longitude": that.form.longitude,
"moneymax": that.form.salaryMax,//
"moneymin": that.form.salaryMin,//
"payType": that.form.settlement,// 0 1
// "startTime": that.form.dateMin,
// "title": that.form.title,//
"workAddress": that.form.area,//
"workDetail": that.form.introduce,
// "workPic": that.form.fileList.map(item => item.url).join(','),//
}
// let p={"bossPhone":"13189698115","dayMoney":"500","endTime":"2016-01-01 00:00:00","industryId":"1865299999310622721","industryName":"","latitude":28.23529,"longitude":112.93134,"moneymax":"15000","moneymin":"12000","payType":"1","startTime":"2015-01-01 00:00:00","title":"","workAddress":"517","workDetail":"","workPic":"https://tennis-oss.xzaiyp.top/2025-02-19/341d669a-ef66-4abb-8b98-ac71c08814c9.jpg"}
addTask2(params).then(response=>{
// console.info("response",response)
// uni.$u.toast("")
// setTimeout(()=>{
// uni.navigateBack({
// delta:1
// })
// },1500)
}).catch(error=>{
})
},
}, },
onReady() { onReady() {
this.$refs.uForm.setRules(this.rules) this.$refs.uForm.setRules(this.rules)


+ 1
- 1
util/request/responseInterceptors.js View File

@ -50,6 +50,6 @@ module.exports = (vm) => {
}) })
return; return;
} }
return Promise.reject(response)
// return Promise.reject(response)
}) })
} }

Loading…
Cancel
Save