Browse Source

11

branch-lsr
1263428893@qq.com 7 months ago
parent
commit
14a781a93b
83 changed files with 1304 additions and 1091 deletions
  1. +1
    -0
      .gitignore
  2. +37
    -1
      common/api.js
  3. +3
    -2
      common/config.js
  4. +2
    -0
      main.js
  5. +7
    -1
      manifest.json
  6. +10
    -12
      pages.json
  7. +35
    -7
      pages/auth/index.vue
  8. +34
    -15
      pages/home/component/enterprise.vue
  9. +15
    -12
      pages/home/component/master.vue
  10. +121
    -45
      pages/home/index.vue
  11. +10
    -0
      pages/identity/index.vue
  12. +108
    -5
      pages/login/index.vue
  13. +43
    -10
      pages/user/index.vue
  14. +90
    -25
      pages_subpack/business-settled/component/enterprise.vue
  15. +87
    -31
      pages_subpack/business-settled/component/person.vue
  16. +49
    -25
      pages_subpack/feedback/index.vue
  17. +17
    -0
      pages_subpack/master-detail/index.vue
  18. +130
    -83
      pages_subpack/master-settled/index.vue
  19. +37
    -10
      pages_subpack/payment/index.vue
  20. +66
    -24
      pages_subpack/record/index.vue
  21. +179
    -62
      pages_subpack/release/component/enterprise.vue
  22. +75
    -43
      pages_subpack/release/component/master.vue
  23. +0
    -2
      pages_subpack/release/index.vue
  24. +8
    -1
      pages_subpack/system/index.vue
  25. +18
    -2
      pages_subpack/wallet/component/recharge.vue
  26. +19
    -4
      pages_subpack/wallet/component/withdrawal.vue
  27. +21
    -3
      pages_subpack/wallet/index.vue
  28. +34
    -22
      pages_subpack/work-detail/index.vue
  29. +0
    -224
      static/app-plus/mp-html/js/handler.js
  30. +0
    -19
      static/app-plus/mp-html/js/uni.webview.min.js
  31. +0
    -1
      static/app-plus/mp-html/local.html
  32. +0
    -363
      static/common/js/touch-emulator.js
  33. BIN
      static/image/46502.png
  34. BIN
      static/image/46518.png
  35. BIN
      static/image/46524.png
  36. BIN
      static/image/46525.png
  37. BIN
      static/image/46662.png
  38. BIN
      static/image/47761.png
  39. BIN
      static/image/4777.png
  40. BIN
      static/image/47822.png
  41. BIN
      static/image/47961.png
  42. BIN
      static/image/59.png
  43. BIN
      static/image/6584.png
  44. BIN
      static/image/6588.png
  45. BIN
      static/image/7822.png
  46. BIN
      static/image/aed60x.png
  47. BIN
      static/image/banner.png
  48. BIN
      static/image/header.png
  49. BIN
      static/image/home.png
  50. BIN
      static/image/home_selected.png
  51. BIN
      static/image/logo.png
  52. BIN
      static/image/nav1.png
  53. BIN
      static/image/nav2.png
  54. BIN
      static/image/nav3.png
  55. BIN
      static/image/nav4.png
  56. BIN
      static/image/nav5.png
  57. BIN
      static/image/nav6.png
  58. BIN
      static/image/nav7.png
  59. BIN
      static/image/nav8.png
  60. BIN
      static/image/order.png
  61. BIN
      static/image/order_selected.png
  62. BIN
      static/image/pencil.png
  63. BIN
      static/image/piao.png
  64. BIN
      static/image/release_btn.png
  65. BIN
      static/image/setting.png
  66. BIN
      static/image/success.png
  67. BIN
      static/image/user.png
  68. BIN
      static/image/user_selected.png
  69. BIN
      static/image/wall.png
  70. BIN
      static/image/wechat.png
  71. BIN
      static/uview/common/favicon.ico
  72. BIN
      static/uview/common/gray-logo.png
  73. BIN
      static/uview/common/logo.png
  74. BIN
      static/uview/example/component.png
  75. BIN
      static/uview/example/component_select.png
  76. BIN
      static/uview/example/js.png
  77. BIN
      static/uview/example/js_bak.png
  78. BIN
      static/uview/example/js_select.png
  79. BIN
      static/uview/example/template.png
  80. BIN
      static/uview/example/template_select.png
  81. +1
    -0
      util/qqmap-wx-jssdk.min.js
  82. +5
    -19
      util/request/requestInterceptors.js
  83. +42
    -18
      util/request/responseInterceptors.js

+ 1
- 0
.gitignore View File

@ -0,0 +1 @@
/unpackage

+ 37
- 1
common/api.js View File

@ -9,4 +9,40 @@ export const fetchMenu = (params, config = {}) => http.post('/ebapi/public_api/i
* 登录的接口
*/
// 微信登录接口
export const wxLogin = (params) => http.get('/api/login/login', {params:params})
export const appletLogin = (params) => http.get('/employ-api/user/login', {params:params})
// 招聘方填写信息
export const roleBoss = (params) => http.post('/employ-api/user/roleBoss', params)
// 求职者填写信息
export const role = (params) => http.post('/employ-api/user/role', params)
// 首页行业菜单
export const industryList = (params) => http.get('/employ-api/index/industryList', {params:params})
// 获取banner列表
export const bannerList = (params) => http.post('/employ-api/index/bannerList', params)
// 招聘大厅列表查询
export const taskList = (params) => http.get('/employ-api/index/taskList', {params:params})
// 求职大厅列表查询
export const rolelist = (params) => http.get('/employ-api/index/rolelist1', {params:params})
// 公司发布任务
export const addTask = (params) => http.post('/employ-api/user/addTask', params)
// 根据行业id查询工种
export const industryById = (params) => http.get('/employ-api/index/getIndustryById', {params:params})
// tb_user_role-通过id查询
export const getTaskById = (params) => http.get('/employ-api/user/getTaskById', {params:params})
// 我的头像昵称,平台客户电话等信息
export const userInfo = (params) => http.post('/employ-api/index/index', params)
// 帮助与反馈
export const addSuggest = (params) => http.post('/employ-api/index/addSuggest', params)
// 余额日志
export const payLog = (params) => http.post('/employ-api/pay/log', params)
// 充值支付
export const payRecharge = (params) => http.post('/employ-api/pay/payRecharge', params)
// 提现
export const withdrawal = (params) => http.post('/employ-api/pay/withdrawal', params)
// 招聘方订单分页列表查询
export const bossOrderList = (params) => http.post('/employ-api/order/bossOrderList', params)
// 发起聘请,等待师傅确认
export const orderTask = (params) => http.post('/employ-api/order/addTask', params)

+ 3
- 2
common/config.js View File

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

+ 2
- 0
main.js View File

@ -11,6 +11,7 @@ import mixin from './common/mixin'
Vue.prototype.$store = store
Vue.config.productionTip = false
App.mpType = 'app'
@ -36,4 +37,5 @@ const app = new Vue({
// 引入请求封装
require('./util/request/index')(app)
app.$mount()

+ 7
- 1
manifest.json View File

@ -96,7 +96,13 @@
},
"quickapp" : {},
"mp-weixin" : {
"appid" : "wx81ac70f6f1ae8854",
"appid" : "wx6931d85f7371b032",
"permission" : {
"scope.userLocation" : {
"desc" : "将获取你的具体位置信息,用于帮助用户浏览所在位置的"
}
},
"requiredPrivateInfos" : [ "getLocation", "chooseLocation" ],
"setting" : {
"urlCheck" : false,
"es6" : false,


+ 10
- 12
pages.json View File

@ -1,34 +1,34 @@
{
"pages": [
{
"path": "pages/user/index",
"path": "pages/home/index",
"style": {
"navigationBarTitleText": "我的",
"navigationBarTitleText": "首页",
"navigationStyle":"default",
"navigationBarBackgroundColor": "#FF7A31",
"navigationBarTextStyle": "white"
"navigationBarTextStyle": "white",
"enablePullDownRefresh": true,
"onReachBottomDistance": 100
}
},
{
"path": "pages/order/index",
"path": "pages/user/index",
"style": {
"navigationBarTitleText": "订单",
"navigationBarTitleText": "我的",
"navigationStyle":"default",
"navigationBarBackgroundColor": "#FF7A31",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/home/index",
"path": "pages/order/index",
"style": {
"navigationBarTitleText": "首页",
"navigationBarTitleText": "订单",
"navigationStyle":"default",
"navigationBarBackgroundColor": "#FF7A31",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/identity/index",
"style": {
@ -197,9 +197,7 @@
]
}
],
"preloadRule": {
},
"globalStyle": {
"navigationBarBackgroundColor": "#ffffff",
"backgroundColor": "#f5f5f5",


+ 35
- 7
pages/auth/index.vue View File

@ -9,10 +9,10 @@
</view>
<view class="se-pb-200 se-pos-cb se-w-p-100">
<view @click="onLogin()" class="se-mx-80 se-br-40 se-flex-h-c se-h-80 se-lh-80 se-ta-c se-fs-32 se-c-white se-bgc-green">
<button @getuserinfo="onLogin" open-type="getUserInfo" class="se-mx-80 se-br-40 se-flex-h-c se-h-80 se-lh-80 se-ta-c se-fs-32 se-c-white se-bgc-green">
<image class="se-w-45 se-h-35" src="@/static/image/wechat.png" mode=""></image>
<text class="se-ml-10">微信登录</text>
</view>
</button>
<!-- <view class="se-mx-80 se-br-40 se-mt-40 se-flex-h-c se-h-80 se-lh-80 se-ta-c se-fs-32 se-c-66 se-bgc-f5">
<text>手机验证码登录</text>
</view> -->
@ -54,7 +54,7 @@
</template>
<script>
import { fetchMenu,wxLogin } from "@/common/api.js"
import { appletLogin,userInfo } from "@/common/api.js"
export default {
name : 'Auth',
data() {
@ -75,7 +75,8 @@
this.show=false;
this.checked=['1'];
},
onLogin(){
onLogin(event){
console.info(event)
let that = this
if(that.checked.length==0){
return uni.showToast({
@ -92,11 +93,38 @@
if(res.errMsg != "login:ok"){
return
}
wxLogin({ code : res.code }).then((response) => {
let params={
code : res.code,
encryptedData: event.detail.encryptedData,
headimgurl:event.detail.userInfo.avatarUrl,
iv:event.detail.iv,
nickName:event.detail.userInfo.nickName,
session_key:"",
shareId:uni.getStorageSync('userId'),
vid:""
}
appletLogin(params).then((response) => {
console.info(`response`,response)
uni.hideLoading()
uni.setStorageSync('token', response.result.token)
that.commit('setUserInfo',{userInfo:response.result.userInfo,token:response.result.token})
}).catch(() =>{
uni.setStorageSync('company', response.result.company)
uni.setStorageSync('boss', response.result.boss)
uni.setStorageSync('worker', response.result.worker)
uni.setStorageSync('userInfo', response.result.userInfo)
userInfo({}).then(response=>{
if(!response.result.headImage && !response.result.nickName){
uni.navigateTo({
url:"/pages/login/index"
})
}else{
uni.navigateTo({
url:"/pages/identity/index"
})
}
}).catch(err=>{
})
}).catch((error) =>{
})
}


+ 34
- 15
pages/home/component/enterprise.vue View File

@ -35,37 +35,38 @@
<screenWork :filterData='filterData' :defaultIndex='defaultIndex' @onSelected='onSelected' @onIntellect="onIntellect"></screenWork>
-->
<view class="se-mt-10">
<view class="se-m-20 se-br-20 se-bs-b se-bgc-white se-py-20 se-px-30" v-for="(items,indexs) in 10" :key="indexs" @click="onMasterDetail(items)">
<view class="se-flex se-flex-h-sb">
<view class="se-m-20 se-br-20 se-bs-b se-bgc-white se-py-20 se-px-30" v-for="(items,indexs) in rolelist" :key="indexs">
<view class="se-flex se-flex-h-sb" @click.capture="onMasterDetail(items)">
<view class="se-flex">
<view class="se-a-80">
<image class="se-a-80 se-br-p-50" src="https://cdn.uviewui.com/uview/album/1.jpg" mode=""></image>
<image class="se-a-80 se-br-p-50 se-bgc-f5" :src="items.headImage" mode=""></image>
</view>
<view class="se-ml-20 se-flex se-flex-v-c se-flex-ai-fs">
<text class="se-fw-6 se-c-black se-fs-30">李华生</text>
<text class="se-fs-24 se-c-text-third">-汉族</text>
<text class="se-fw-6 se-c-black se-fs-30">{{items.userName}}</text>
<text class="se-fs-24 se-c-text-third">{{items.gender==1?'':'女'}}-汉族</text>
</view>
<view class="se-flex se-flex-h-c">
<view class="se-py-10 se-px-20 se-br-12 se-fs-22 se-c-orange se-bgc-ffd se-ml-20 se-fw-6" >
装配电工
{{items.industryName}}
</view>
</view>
</view>
<view class="se-c-orange se-fs-32 se-fw-6">
12-18k
{{items.moneyMin}}-{{items.moneyMax}}
</view>
</view>
<view>
<!-- <view>
<text class="se-c-text-third se-fs-22 se-mt-10">09月23日 16:20</text>
</view>
</view> -->
<view class="se-flex se-flex-h-sb">
<text class="se-c-text-sub se-fs-24">光伏设备装配电工</text>
<view class="se-flex se-flex-h-c se-py-10 se-px-20 se-br-12 se-fs-22 se-c-orange se-bgc-ffd se-fw-6">
<text class="se-c-text-sub se-fs-24">{{items.detail}}</text>
<view @click.capture="onCustomerService(items.phone)" class="se-flex se-flex-h-c se-py-10 se-px-20 se-br-12 se-fs-22 se-c-orange se-bgc-ffd se-fw-6">
<u-icon color="#FF7A31" name="phone-fill"></u-icon>
<text class="se-ml-5">联系他</text>
</view>
</view>
</view>
<u-empty v-if="rolelist && rolelist.length==0" mode="list"></u-empty>
</view>
<view class="release-box" @click="toNavigator()">
<image class="se-a-70 se-br-p-50" src="@/static/image/release_btn.png" mode=""></image>
@ -77,6 +78,7 @@
<script>
// import screenWork from "./screen-work.vue"
export default{
props:["rolelist"],
components:{
// screenWork
},
@ -85,9 +87,7 @@
keyword:"",
name:"",
list: [
// '@/static/image/banner.png',
'https://cdn.uviewui.com/uview/swiper/swiper2.png',
// 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
'https://cdn.uviewui.com/uview/swiper/swiper2.png'
],
filterData:[
[
@ -110,6 +110,24 @@
console.info(this)
},
methods:{
onCustomerService(phome){
let that = this
// let obj = that.$utils.getkeyContent('phone')
if (uni.canIUse('makePhoneCall')) {
uni.makePhoneCall({
phoneNumber: String(phome),
success: function () {
console.log('拨打电话成功');
},
fail: function () {
console.log('拨打电话失败');
}
});
} else {
console.log('你的设备不支持拨打电话功能');
}
},
onSelected(res){
console.info(res)
},
@ -128,8 +146,9 @@
})
},
onMasterDetail(event){
console.info("event",event)
uni.navigateTo({
url:"/pages_subpack/master-detail/index"
url:"/pages_subpack/master-detail/index?id="+event.industryId
})
}
}


+ 15
- 12
pages/home/component/master.vue View File

@ -33,35 +33,36 @@
</view> -->
<!-- <screenWork :filterData='filterData' :defaultIndex='defaultIndex' @onSelected='onSelected' @onIntellect="onIntellect"></screenWork> -->
<view class="se-mt-10">
<view class="se-m-20 se-br-20 se-bs-b se-bgc-white se-py-20 se-px-30" v-for="(items,indexs) in 10" :key="indexs" @click="onMasterDetail(items)">
<view class="se-m-20 se-br-20 se-bs-b se-bgc-white se-py-20 se-px-30" v-for="(items,indexs) in taskList" :key="indexs" @click="onMasterDetail(items)">
<view class="se-flex se-flex-h-sb">
<view class="se-flex">
<text class="se-fw-6 se-c-black se-fs-30">工装石膏板搬运</text>
<text class="se-fw-6 se-c-black se-fs-30">{{items.title}}</text>
</view>
<view class="se-c-orange se-fs-32 se-fw-6">
12-18k
{{items.moneymin}}-{{items.moneymin}}k
</view>
</view>
<view class="se-py-10">
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5">3h</text>
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5">试用以后支付</text>
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5">重物搬运</text>
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5">水泥搬运</text>
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5" v-if="items.payType_dictText">{{items.payType_dictText}}</text>
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5" v-if="items.industryName">{{items.industryName}}</text>
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5" v-if="items.companyName">{{items.companyName}}</text>
<!-- <text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5">水泥搬运</text> -->
</view>
<view class="se-flex se-flex-h-sb">
<view class="se-flex">
<u-icon class="se-ml-10" name="map"></u-icon>
<text class="se-c-text-sub se-fs-24 se-pr-10">2.5km</text>
<text class="se-c-text-sub se-fs-24 se-pl-10 se-b-l">楚河汉界</text>
<text class="se-c-text-sub se-fs-24 se-pr-10">{{items.distances}}km</text>
<text class="se-c-text-sub se-fs-24 se-pl-10 se-b-l">{{items.workAddress}}</text>
</view>
<view class="se-c-text se-c-text-sub se-fs-24">
<!-- <view class="se-c-text se-c-text-sub se-fs-24">
09月23日 16:20
</view>
</view> -->
<view class="se-flex se-flex-h-c se-py-10 se-px-20 se-br-12 se-fs-22 se-c-orange se-bgc-ffd se-fw-6">
<text class="se-ml-5">立即接单</text>
</view>
</view>
</view>
<u-empty v-if="taskList && taskList.length==0" mode="list"></u-empty>
</view>
<view class="release-box" @click="toNavigator()">
<image class="se-a-70 se-br-p-50" src="@/static/image/release_btn.png" mode=""></image>
@ -73,6 +74,7 @@
<script>
// import screenWork from "./screen-work.vue"
export default{
props:["taskList"],
components:{
// screenWork
},
@ -115,8 +117,9 @@
})
},
onMasterDetail(event){
console.info(event)
uni.navigateTo({
url:"/pages_subpack/work-detail/index"
url:"/pages_subpack/work-detail/index?id="+event.id
})
}
}


+ 121
- 45
pages/home/index.vue View File

@ -2,7 +2,7 @@
<view>
<view class="se-bgc-orange se-pos se-pos-lt se-w-vw-100 se-h-vh-30" style="z-index: -1;border-bottom-left-radius: 120rpx;border-bottom-right-radius: 120rpx;"></view>
<view class="se-flex se-flex-h-sb se-px-40 se-pb-30 se-pt-10 se-bgc-orange se-zi-s">
<view class="se-c-white se-fs-28">
<view class="se-c-white se-fs-28" @click="getLocation()">
<view class="se-bgc-white se-py-5 se-px-10 se-fw-6 se-br-12 se-c-orange se-fs-24 se-display-ib">
</view>
@ -17,7 +17,7 @@
</view>
<view class="se-pb-20 se-pt-40 se-zi-s">
<view class="se-px-20">
<u-swiper height="300rpx" style="background-color: transparent;height: 300rpx;" :list="list" @change="change" @click="click"></u-swiper>
<u-swiper height="300rpx" 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>
@ -25,8 +25,8 @@
</view>
</view>
<view class="se-my-20 se-bgc-white se-grid">
<navigator url="/pages_subpack/category/index" v-for="(item, index) in nav" :key="index" class="se-flex-v-c se-pt-30 se-mb-20">
<image class="se-a-100 se-br-20" :src="item.img" mode=""></image>
<navigator :url="`/pages_subpack/category/index`+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>
<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>
@ -55,16 +55,24 @@
:list="navList"
@click="navClick($event)">
</u-tabs>
<!-- 企业端 -->
<enterpriseBox v-if="current==0" />
<!-- 师傅端 -->
<masterBox v-if="current==1" />
<!-- 企业端 求职大厅 -->
<enterpriseBox :rolelist="rlist" v-if="current==0" />
<!-- 师傅端 招聘大厅 -->
<masterBox :taskList="tList" v-if="current==1" />
<view class="se-h-80"></view>
</view>
</template>
<script>
import {
bannerList,
taskList,
rolelist,
industryList
} from "@/common/api.js"
import enterpriseBox from "./component/enterprise.vue"
import masterBox from "./component/master.vue"
import QQMapWX from "@/util/qqmap-wx-jssdk.min.js"
export default{
components:{
enterpriseBox,
@ -74,43 +82,10 @@
return {
status:1,
list: [
'../../static/image/banner.png',
"https://cdn.uviewui.com/uview/swiper/swiper1.png"
],
nav:[
{
img:"../../static/image/nav1.png",
name:"家政"
},
{
img:"../../static/image/nav2.png",
name:"餐饮"
},
{
img:"../../static/image/nav3.png",
name:"娱乐"
},
{
img:"../../static/image/nav4.png",
name:"生产创意"
},
{
img:"../../static/image/nav5.png",
name:"物流"
},
{
img:"../../static/image/nav6.png",
name:"装修"
},
{
img:"../../static/image/nav7.png",
name:"美容/美发"
},
{
img:"../../static/image/nav8.png",
name:"兼职"
}
],
tabList:[],//
swiperList:[],//
current:0,
navList:[
{
@ -119,13 +94,114 @@
{
name: '招聘大厅',
}
]
],
rpageNo:1,
rpageSize:20,
rlist:[],
latitude:'34.00',
longitude:'134.65',
tpageNo:1,
tpageSize:20,
tList:[]
}
},
mounted() {
this.onBannerList()
this.onTaskList()
this.onRolelist()
this.onIndustryList()
this.getLocation()
},
onPullDownRefresh() {
let that = this
that.rpageNo = 1
that.rlist = []
that.onRolelist()
},
onReachBottom() {
let that = this
that.rpageNo = that.rpageNo + 1
that.onRolelist()
},
methods:{
getLocation(){
const that = this;
console.log('当前位置的经度:');
wx.getLocation({
type: 'wgs84',
success: function (res) {
console.log('位置',res);
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
const qqmapsdk = new QQMapWX({
key: 'TT7BZ-Z3LW4-KOAUB-KWHOA-SBJJ6-Y5B6R' //
});
qqmapsdk.reverseGeocoder({
location: {
latitude: res.latitude,
longitude: res.longitude
},
success: function(response) {
// that.city = response.result.ad_info.city
console.log('逆地理编码结果:', response);
},
fail: function(error) {
console.error('逆地理编码失败:', error);
}
});
}
})
},
onIndustryList(){
industryList({}).then(response=>{
console.info("industryList",response);
this.tabList = response.result
}).catch(error=>{
})
},
onBannerList(){
bannerList({}).then(response=>{
console.info("banner",response)
this.swiperList = response.result[0]
}).catch(error=>{
})
},
onTaskList(){
taskList({
latitude:this.latitude,
longitude:this.longitude,
pageNo:this.tpageNo,
pageSize:this.tpageSize
}).then(response=>{
if(this.tpageNo==1){
this.tList = response.result.records
}else{
this.tList = this.tList.concat(response.result.records)
}
console.info("taskList",response)
}).catch(error=>{
})
},
onRolelist(){
rolelist({
pageNo:this.rpageNo,
pageSize:this.rpageSize
}).then(response=>{
console.info("response",response)
if(this.rpageNo==1){
this.rlist = response.result.records
}else{
this.rlist = this.rlist.concat(response.result.records)
}
}).catch(error=>{
})
},
navClick(event){
this.current=event.index
},


+ 10
- 0
pages/identity/index.vue View File

@ -11,6 +11,11 @@
<text class="se-ml-80">师傅入驻</text>
<image class="se-a-170 se-br-p-50 se-mr-80" src="@/static/image/47761.png" mode=""></image>
</view>
<view class="se-pos-fixed se-flex-h-c se-bs-t se-w-750 se-h-200" style="background-color: #fff;bottom: 0;left: 0;">
<view @click="onJump()" class="se-mb-20 se-br-20 se-w-400 se-ml-20 se-flex-h-c se-h-80 se-lh-80 se-ta-c se-fs-32 se-c-33 se-bgc-f5">
<text class="se-ml-10">跳过</text>
</view>
</view>
</view>
</template>
@ -22,6 +27,11 @@
}
},
methods:{
onJump(){
uni.switchTab({
url:"/pages/home/index"
})
},
onBusinessSettled(){
uni.navigateTo({
url:"/pages_subpack/business-settled/index"


+ 108
- 5
pages/login/index.vue View File

@ -12,15 +12,28 @@
<view class="se-mx-40 se-py-100">
<view class="se-b-t se-b-b se-flex se-h-140 se-lh-140 se-flex-h-sb">
<text>头像</text>
<image class="se-w-100 se-h-100" src="@/static/image/header.png" mode=""></image>
<button class="se-w-100 se-h-100 se-p-0 se-m-0" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image v-if="imagUrl" class="se-w-100 se-h-100" :src="imagUrl"></image>
<image v-else class="se-w-100 se-h-100" src="@/static/image/header.png" mode=""></image>
</button>
</view>
<view class=" se-b-b se-flex se-h-140 se-lh-140 se-flex-h-sb">
<text>昵称</text>
<input class="se-h-80 se-lh-80 se-w-320" placeholder-class="se-fs-24 se-ta-r" placeholder="请输入名称" type="text" />
<input type="nickname" placeholder="请输入昵称" v-model="nameUser"
@blur="bindblur" class="se-h-80 se-lh-80 se-w-320 se-fs-24 se-ta-r" placeholder-class="se-fs-24 se-ta-r" />
</view>
<!-- <view class=" se-b-b se-flex se-h-140 se-lh-140 se-flex-h-sb">
<text>手机号</text>
<button v-if="phone" class="default-btn se-h-100 se-p-0 se-m-0" open-type="getPhoneNumber" @getphonenumber="onPhonenumber">{{phone}}</button>
<button v-else class="se-w-140 se-h-60 se-lh-60 se-fs-20 se-bgc-green se-c-white se-py-0 se-br-30 se-px-20 se-m-0" open-type="getPhoneNumber" @getphonenumber="onPhonenumber">
获取手机号
</button>
</view> -->
</view>
<view class="se-mx-40">
<view class="se-br-40 se-flex-h-c se-h-80 se-lh-80 se-ta-c se-fs-32 se-c-white se-bgc-green">
<view @click="onUpdateInfo" class="se-br-40 se-flex-h-c se-h-80 se-lh-80 se-ta-c se-fs-32 se-c-white se-bgc-green">
确认
</view>
</view>
@ -28,19 +41,109 @@
</template>
<script>
import { appletLogin } from "@/common/api.js"
export default {
name : 'Login',
data() {
return {
nameUser:"",
imagUrl:"",
phone:"",
back:0
}
},
onLoad(options) {
if(options.back==1){
this.imagUrl = uni.getStorageSync('userInfo').headImage
this.nameUser = uni.getStorageSync('userInfo').nickName
this.phone = uni.getStorageSync('userInfo').phone
this.back = options.back
}
},
methods: {
bindblur(event) {
this.nameUser = event.target.value
},
onChooseAvatar(res) {
let self = this
self.$Oss.ossUpload(res.target.avatarUrl).then(url => {
self.imagUrl = url
})
},
onPhonenumber(event){
let that = this
var detail = event.detail;
if(detail.errMsg=='getPhoneNumber:ok'){
let params={
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
}).catch(error=>{
})
}
},
onUpdateInfo(){
let that = this
uni.showLoading({
title: '保存中...'
})
uni.login({
success(res) {
console.info(res.code)
if(res.errMsg != "login:ok"){
return
}
let params={
code : res.code,
headimgurl:that.imagUrl,
nickName:that.nameUser,
openid:uni.getStorageSync('userInfo').appletOpenid
// phone:that.phone
}
// &&that.phone
if(that.imagUrl&&that.nameUser){
appletLogin(params).then((response) => {
if(this.back==1){
uni.navigateBack({
delta:1
})
}else{
uni.navigateTo({
url:"/pages/identity/index"
})
}
}).catch((error) =>{
})
}else{
return uni.showToast({
icon:"none",
title:"头像和昵称不能为空!"
})
}
}
})
}
}
}
</script>
<style scoped lang="scss">
.default-btn{
background-color: #fff;
}
.default-btn::after{
content: "";
border: none;
}
</style>

+ 43
- 10
pages/user/index.vue View File

@ -2,10 +2,10 @@
<view class="u-page">
<view class="se-pt-50 se-pb-120 se-px-40 se-bgc-orange se-c-white se-pos">
<view class="se-flex">
<image src="@/static/image/header.png" class="se-br-p-50 se-w-100 se-h-100" mode=""></image>
<image :src="headImage" class="se-br-p-50 se-bgc-f5 se-w-100 se-h-100" mode=""></image>
<view class="se-ml-20 se-flex se-flex-v-sa se-flex-ai-fs">
<view class="se-flex">
<text class="se-fw-6 se-fs-30">热心小肖</text>
<text class="se-fw-6 se-fs-30">{{nickName}}</text>
<view class="se-flex se-flex-ai-c se-ml-20">
<image class="se-a-25 se-mr-10" src="@/static/image/pencil.png" mode=""></image>
<text class="se-fs-22">修改资料</text>
@ -13,7 +13,7 @@
</view>
<view class="se-fs-24 se-display-ib">
<text>手机号:</text>
<text class="se-ml-20">13189698114</text>
<text class="se-ml-20">{{phone}}</text>
</view>
</view>
</view>
@ -31,7 +31,7 @@
我的余额
</view>
<view class="se-fs-30 se-display-ib se-pt-20" style="color: #DC2828;">
1200
{{myMoney}}
</view>
</view>
</view>
@ -51,9 +51,10 @@
</view>
</view>
<view class="se-px-40 se-py-30 se-mt-80">
<u-swiper :height="100" :list="list" @click="swiperClick"></u-swiper>
<!-- <u-swiper :height="100" :list="list" @click="swiperClick"></u-swiper> -->
<image class="se-h-200 se-w-p-100" src="@/static/image/59.png" mode=""></image>
</view>
<view class="se-p-20 se-m-40 se-br-20 se-bgc-white">
<view class="se-p-20 se-mx-40 se-mt-20 se-br-20 se-bgc-white">
<view class="se-flex se-flex-ai-c se-pb-20">
<view class="line-orange se-ml-10"></view>
<view class="se-ml-10 se-fs-32 se-c-black se-fw-5">
@ -91,18 +92,50 @@
</template>
<script>
import {
userInfo
} from "@/common/api.js"
export default {
data() {
return {
list: [
// "../../static/image/59.png"
// '@/static/image/banner.png',
'https://cdn.uviewui.com/uview/swiper/swiper2.png',
// 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
'@/static/image/59.png'
],
id:"",
headImage:"",
myMoney:0,
nickName:"",
phone:"",
worker:{},
boss:{},
company:{},
}
},
mounted() {
},
onShow() {
this.onUserInfo()
},
methods: {
onUserInfo(){
let params={}
userInfo(params).then(response=>{
console.info("userInfo",response)
this.id=response.result.id
this.headImage=response.result.headImage
this.myMoney=response.result.myMoney?response.result.myMoney:0
this.nickName=response.result.nickName?response.result.nickName:"微信昵称"
this.phone=response.result.phone?response.result.phone:""
this.worker=response.result.worker?response.result.worker:""
this.boss=response.result.boss?response.result.boss:""
this.company=response.result.company?response.result.company:""
}).catch(error=>{
})
},
swiperClick(event) {
console.info(event);
},


+ 90
- 25
pages_subpack/business-settled/component/enterprise.vue View File

@ -1,14 +1,15 @@
<template>
<!-- 企业 -->
<view>
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" labelWidth="80">
<view class="se-p-20">
<view class="se-p-20 se-bgc-white se-br-10 se-fs-20">
<u-form-item label="姓名" prop="name">
<u--input v-model="form.name" class="se-bgc-f5" placeholder="请输入姓名名称"></u--input>
<u--input v-model="form.name" class="se-bgc-f5" placeholder="请输入姓名"></u--input>
</u-form-item>
<u-form-item label="密码" prop="password">
<!-- <u-form-item label="密码" prop="password">
<u--input v-model="form.password" class="se-bgc-f5" placeholder="请输入您的密码"></u--input>
</u-form-item>
</u-form-item> -->
<u-form-item label="联系电话" prop="mobile">
<u--input v-model="form.mobile" class="se-bgc-f5" placeholder="请输入联系方式"></u--input>
</u-form-item>
@ -18,8 +19,9 @@
<u-form-item label="公司地址" prop="address">
<u--input v-model="form.address" class="se-bgc-f5" placeholder="请输入公司地址"></u--input>
</u-form-item>
<u-form-item label="行业" prop="industry">
<u--input v-model="form.industry" class="se-bgc-f5" placeholder="请输入行业"></u--input>
<u-form-item label="行业" prop="industryId" @click="handleIndChange()">
<u--input readonly v-model="form.industryName" placeholder="请选择行业" border="bottom"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
</view>
</view>
@ -34,7 +36,7 @@
</view>
</view>
<view class="se-py-20 se-w-p-100">
<u-upload :fileList="fileList" @afterRead="afterRead" @delete="deletePic" name="1"
<u-upload :fileList="form.businessLicenseFile" @afterRead="afterRead" @delete="deletePic" name="1"
multiple :maxCount="10"></u-upload>
</view>
</view>
@ -54,21 +56,33 @@
</view>
</view>
</u--form>
<u-action-sheet :actions="indList" @select="selectIndClick" title="行业" :show="show" @close="show=false"></u-action-sheet>
</view>
</template>
<script>
import {roleBoss,industryList} from "@/common/api.js"
export default{
data(){
return{
fileList: [],
show:false,
indList: [],
form: {
name: '',
role:1,
name: 'jerryxiao',
password: '',
mobile: '',
company:'',
address:'',
industry:'',
file: ''
mobile: '13189698114',
company:'小小公司',
idCard:'',
address:'湖南长沙岳麓区',
industryId:'1865294357074157570',
industryName:'建筑',
businessLicense: '',
businessLicenseFile:[
{
url:"https://tennis-oss.xzaiyp.top/2024-12-22/cf84422d-dcf7-4efa-82e7-371454eafbee.png"
}
]
},
rules: {
name: [{
@ -83,6 +97,7 @@
message: '请输入您的密码',
trigger: ['blur', 'change']
}],
mobile: [
{
required: true,
@ -109,18 +124,24 @@
message: '请输入公司地址',
trigger: ['blur', 'change']
}],
industry: [{
industryId: [{
type: 'string',
required: true,
message: '请输入行业',
message: '请选择行业',
trigger: ['blur', 'change']
}],
file: [{
type: 'string',
required: true,
message: '请选择营业执照',
trigger: ['blur', 'change']
}]
businessLicenseFile:[
{
validator: (rule, value, callback) => {
if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
callback(new Error('请选择营业执照'));
} else {
callback();
}
},
trigger: 'blur'
}
]
},
}
},
@ -135,24 +156,68 @@
}
},
onReady() {
this.onIndustryList()
this.$refs.uForm.setRules(this.rules)
},
methods: {
handleIndChange(){
this.show = true
},
selectIndClick(event){
console.info("selectIndClick",event)
this.form.industryId = event.id
this.form.industryName = event.name
this.show = false
},
onIndustryList(){
industryList({}).then(response=>{
console.info(response)
this.indList = response.result
}).catch(error=>{
})
},
onRoleBoss(){
let that = this
let params={
userName:that.form.name,
role:that.form.role,
phone:that.form.mobile,
companyName:that.form.company,
companyAddress:that.form.companyAddress,
industryId:that.form.industryId,
industryName:that.form.industryName,
businessLicense:that.form.businessLicenseFile.map(item => item.url).join(','),
}
roleBoss(params).then(response=>{
}).catch(error=>{
// uni.$u.toast("")
setTimeout(()=>{
uni.switchTab({
url:"/pages/home/index"
})
},1500)
})
},
submit() {
this.$refs.uForm.validate().then(res => {
uni.$u.toast('校验通过')
let that = this
that.$refs.uForm.validate().then(res => {
that.onRoleBoss()
}).catch(errors => {
// uni.$u.toast('')
})
},
deletePic(event) {
this.fileList.splice(event.index, 1)
this.form.businessLicenseFile.splice(event.index, 1)
},
async afterRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.fileList.push({
console.info(url)
self.form.businessLicenseFile.push({
url
})
})


+ 87
- 31
pages_subpack/business-settled/component/person.vue View File

@ -1,4 +1,5 @@
<template>
<!-- 个人 -->
<view>
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" labelWidth="80">
<view class="se-p-20">
@ -6,17 +7,18 @@
<u-form-item label="姓名" prop="name">
<u--input v-model="form.name" class="se-bgc-f5" placeholder="请输入姓名名称"></u--input>
</u-form-item>
<u-form-item label="密码" prop="password">
<!-- <u-form-item label="密码" prop="password">
<u--input v-model="form.password" class="se-bgc-f5" placeholder="请输入您的密码"></u--input>
</u-form-item>
</u-form-item> -->
<u-form-item label="联系电话" prop="mobile">
<u--input v-model="form.mobile" class="se-bgc-f5" placeholder="请输入联系方式"></u--input>
</u-form-item>
<u-form-item label="居住地址" prop="address">
<u--input v-model="form.address" class="se-bgc-f5" placeholder="请输入详细地址"></u--input>
</u-form-item>
<u-form-item label="行业" prop="industry">
<u--input v-model="form.industry" class="se-bgc-f5" placeholder="请输入行业"></u--input>
<u-form-item label="行业" prop="industryId" @click="handleIndChange()">
<u--input readonly v-model="form.industryName" placeholder="请选择行业" border="bottom"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
</view>
</view>
@ -31,7 +33,7 @@
</view>
</view>
<view class="se-py-20 se-w-p-100">
<u-upload :fileList="fileList" @afterRead="afterRead" @delete="deletePic" name="1"
<u-upload :fileList="form.idCardFile" @afterRead="afterRead" @delete="deletePic" name="1"
multiple :maxCount="10"></u-upload>
</view>
</view>
@ -51,28 +53,31 @@
</view>
</view>
</u--form>
<u-action-sheet :actions="indList" @select="selectIndClick" title="行业" :show="show" @close="show=false"></u-action-sheet>
</view>
</template>
<script>
import {roleBoss,industryList} from "@/common/api.js"
export default{
data(){
return{
current:0,
navList:[
{
name: '企业入驻',
}, {
name: '个人入驻',
}
],
show:false,
indList: [],
fileList: [],
form: {
name: '',
role:0,
name: 'jerryxiao',
password: '',
mobile: '',
address:'',
industry:'',
file: ''
mobile: '13189698114',
address:'湖南长沙岳麓区',
industryId:'1865294357074157570',
industryName:'建筑',
idCard:'',
idCardFile:[
{
url:"https://tennis-oss.xzaiyp.top/2024-12-22/cf84422d-dcf7-4efa-82e7-371454eafbee.png"
}
]
},
rules: {
name: [{
@ -107,18 +112,24 @@
message: '请输入公司地址',
trigger: ['blur', 'change']
}],
industry: [{
industryId: [{
type: 'string',
required: true,
message: '请输入行业',
message: '请选择行业',
trigger: ['blur', 'change']
}],
file: [{
type: 'string',
required: true,
message: '请选择营业执照',
trigger: ['blur', 'change']
}]
idCardFile:[
{
validator: (rule, value, callback) => {
if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
callback(new Error('请选择身份证'));
} else {
callback();
}
},
trigger: 'blur'
}
]
},
}
},
@ -132,24 +143,69 @@
}
},
onReady() {
this.onIndustryList()
this.$refs.uForm.setRules(this.rules)
},
methods: {
handleIndChange(){
this.show = true
},
selectIndClick(event){
console.info("selectIndClick",event)
this.form.industryId = event.id
this.form.industryName = event.name
this.show = false
},
onIndustryList(){
industryList({}).then(response=>{
console.info(response)
this.indList = response.result
}).catch(error=>{
})
},
submit() {
this.$refs.uForm.validate().then(res => {
uni.$u.toast('校验通过')
let that = this
that.$refs.uForm.validate().then(res => {
that.onRoleBoss()
}).catch(errors => {
// uni.$u.toast('')
uni.$u.toast('校验失败')
})
},
onRoleBoss(){
let that = this
let params={
userName:that.form.name,
role:that.form.role,
phone:that.form.mobile,
industryId:that.form.industryId,
industryName:that.form.industryName,
idCard:that.form.idCardFile.map(item => item.url).join(','),
}
roleBoss(params).then(response=>{
uni.$u.toast("提交成功,等待申请")
setTimeout(()=>{
uni.switchTab({
url:"/pages/home/index"
})
},1500)
}).catch(error=>{
setTimeout(()=>{
uni.switchTab({
url:"/pages/home/index"
})
},1500)
})
},
deletePic(event) {
this.fileList.splice(e.index, 1)
this.form.idCardFile.splice(e.index, 1)
},
async afterRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.fileList.push({
self.form.idCardFile.push({
url
})
})


+ 49
- 25
pages_subpack/feedback/index.vue View File

@ -13,11 +13,10 @@
问题截图
</view>
<view class="se-pb-20 se-pl-20 se-m-20 se-bgc-white se-br-20">
<u-form-item prop="file" labelWidth="2">
<u-form-item prop="proofFile" labelWidth="2">
<view class="se-flex se-flex-v-sa se-mt-10">
<view class="se-w-p-100">
<u-upload :fileList="fileList" @afterRead="afterRead" @delete="deletePic" name="1"
multiple :maxCount="10"></u-upload>
<u-upload :fileList="form.proofFile" @afterRead="afterRead" @delete="deletePic" multiple :maxCount="10"></u-upload>
</view>
</view>
</u-form-item>
@ -46,16 +45,22 @@
</template>
<script>
import {
addSuggest
} from "@/common/api.js"
export default {
data(){
return{
form:{
feedback:"",
name:"",
mobile:"",
file: ''
feedback:"以下文件体积超过 500KB,已跳过压缩以及 ES6 转 ES5 的处理",
name:"jerryxiao",
mobile:"13189698114",
proofFile: [
{
url:"https://tennis-oss.xzaiyp.top/2025-01-02/a1e3b236-9995-47ba-804e-e82155f55e67.jpg"
}
]
},
fileList: [],
rules:{
feedback: [
{
@ -78,41 +83,60 @@
trigger: ['blur', 'change']
}
],
file: [
proofFile: [
{
required: true,
message: '请选择反馈图片',
trigger: ['blur', 'change']
type:"array",
validator: (rule, value, callback) => {
console.info(value)
if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
callback(new Error('照片不能为空'));
} else {
callback();
}
},
trigger: 'blur'
}
]
}
}
},
watch: {
fileList(newValue, oldValue) {
if (newValue.length > 0) {
this.form.file = '有'
} else {
this.form.file = ''
}
}
},
methods:{
submit() {
this.$refs.uForm.validate().then(res => {
uni.$u.toast('校验通过')
this.onaddSuggest()
// uni.$u.toast('')
}).catch(errors => {
console.info(errors)
uni.$u.toast('校验失败')
})
},
deletePic(event) {
this.fileList.splice(e.index, 1)
onaddSuggest(){
let that = this
let params={
content: that.form.feedback,
proofImg: that.form.proofFile.map(item => item.url).join(','),
userName: that.form.name,
userPhone: that.form.mobile
}
addSuggest(params).then(response=>{
uni.$u.toast("提交成功!")
setTimeout(()=>{
uni.switchTab({
url:"/pages/user/index"
})
},1500)
}).catch(error=>{
})
},
deletePic(e) {
this.form.proofFile.splice(e.index, 1)
},
async afterRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.fileList.push({
self.form.proofFile.push({
url
})
})


+ 17
- 0
pages_subpack/master-detail/index.vue View File

@ -75,6 +75,9 @@
</template>
<script>
import {
getTaskById
} from "@/common/api.js"
export default{
data(){
return{
@ -87,7 +90,21 @@
</p>`
}
},
onLoad(options) {
console.info(options)
this.id = options.id
this.onTask()
},
methods:{
onTask(){
let that = this
getTaskById({id:that.id}).then(response=>{
console.info('getTaskById',response);
that.items = response.result
}).catch(error=>{
})
},
onEmploy(){
console.info(`立即聘用`)
uni.navigateTo({


+ 130
- 83
pages_subpack/master-settled/index.vue View File

@ -6,9 +6,9 @@
<u-form-item label="姓名" prop="name">
<u--input v-model="form.name" class="se-bgc-f5" placeholder="请输入姓名名称"></u--input>
</u-form-item>
<u-form-item label="密码" prop="password">
<!-- <u-form-item label="密码" prop="password">
<u--input v-model="form.password" class="se-bgc-f5" placeholder="请输入您的密码"></u--input>
</u-form-item>
</u-form-item> -->
<u-form-item label="联系电话" prop="mobile">
<u--input v-model="form.mobile" class="se-bgc-f5" placeholder="请输入联系方式"></u--input>
</u-form-item>
@ -20,10 +20,9 @@
border="none"></u--input>
<u-icon @click="handleSexChange" slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="工种" prop="type" @click="handleTypeChange">
<u--input @click="handleTypeChange" v-model="form.type" readonly placeholder="请选择工种"
border="none"></u--input>
<u-icon @click="handleTypeChange" slot="right" name="arrow-right"></u-icon>
<u-form-item label="工种" prop="industryId" @click="handleIndChange">
<u--input v-model="form.industryName" readonly placeholder="请选择工种" border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="薪资待遇" prop="salary">
<view class="se-flex se-flex-h-c">
@ -40,7 +39,7 @@
</view>
<view class="se-p-20">
<view class="se-px-20 se-pb-20 se-bgc-white se-br-10 se-fs-20">
<u-form-item prop="file" labelWidth="2">
<u-form-item prop="idCardFile" labelWidth="2">
<view class="se-flex se-flex-v-sa">
<view class="se-py-20 se-w-p-100 se-flex">
<view class="line-orange"></view>
@ -49,8 +48,8 @@
</view>
</view>
<view class="se-py-20 se-w-p-100">
<u-upload :fileList="fileList" @afterRead="afterRead" @delete="deletePic" name="1"
multiple :maxCount="10"></u-upload>
<u-upload :fileList="form.idCardFile" @afterRead="afterRead" @delete="deletePic"
name="1" multiple :maxCount="10"></u-upload>
</view>
</view>
</u-form-item>
@ -80,6 +79,10 @@
</template>
<script>
import {
role,
industryList
} from "@/common/api.js"
export default {
data() {
return {
@ -92,26 +95,26 @@
}
],
showType: false,
typeList: [{
name: '铁匠',
},
{
name: '水泥搬运',
}
],
typeList: [],
fileList: [],
form: {
name: '',
name: '张三',
password: '',
mobile: '',
age: '',
sex: '',
type: '',
salary:'',
salaryMin: '',
salaryMax: '',
introduce: '',
file: ''
mobile: '13189698114',
age: '23',
sex: '男',
industryId: '1865037318519398402',
industryName: "餐饮",
salary: '',
salaryMin: '1800',
salaryMax: '2400',
introduce: '张三的个人简介',
idCard: '',
idCardFile: [
{
url:"https://tennis-oss.xzaiyp.top/2024-12-22/7af6b40f-96f9-4656-9eff-98dce2223699.png"
}
]
},
rules: {
name: [{
@ -120,39 +123,44 @@
message: '请输入姓名名称',
trigger: ['blur', 'change']
}],
password: [{
industryId: [{
type: 'string',
required: true,
message: '请输入您的密码',
message: '请选择行业',
trigger: ['blur', 'change']
}],
mobile: [
{
required: true,
// password: [{
// type: 'string',
// required: true,
// message: '',
// trigger: ['blur', 'change']
// }],
mobile: [{
required: true,
message: '请输入手机号',
trigger: ['change','blur'],
trigger: ['change', 'blur'],
},
{
validator: (rule, value, callback) => {
return uni.$u.test.mobile(value);
},
message: '手机号码不正确',
trigger: ['change','blur'],
trigger: ['change', 'blur'],
},
],
age: [
{
required: true,
message: '请输入年龄',
trigger: ['change','blur'],
age: [{
validator: (rule, value, callback) => {
if (!value) {
callback(new Error('年龄不能为空'));
} else if (isNaN(value)) {
callback(new Error('请输入数字'));
} else if (value < 18 || value > 65) {
callback(new Error('年龄必须在18至65岁之间'));
} else {
callback(); //
}
},
{
type: 'string',
required: true,
min: 18,
max: 65,
message: '请输入正确年龄',
trigger: ['blur', 'change']
trigger: 'blur',
}],
sex: [{
type: 'string',
@ -173,45 +181,61 @@
message: '请输入个人简介',
trigger: ['blur', 'change']
}],
file: [{
type: 'string',
required: true,
message: '请选择身份证',
trigger: ['blur', 'change']
idCardFile: [{
validator: (rule, value, callback) => {
if (value === null || value === undefined || value === '' || (Array.isArray(
value) && value.length === 0)) {
callback(new Error('请选择身份证'));
} else {
callback();
}
},
trigger: 'blur'
}]
},
}
},
watch: {
'form.salaryMin': {
handler(newVal, oldVal) {
if (!uni.$u.test.isEmpty(newVal) && !uni.$u.test.isEmpty(this.form.salaryMax)) {
this.form.salary = '有'
} else {
this.form.salary = ''
}
},
immediate: true
handler(newVal, oldVal) {
if (!uni.$u.test.isEmpty(newVal) && !uni.$u.test.isEmpty(this.form.salaryMax)) {
this.form.salary = '有'
} else {
this.form.salary = ''
}
},
immediate: true
},
'form.salaryMax': {
handler(newVal, oldVal) {
if (!uni.$u.test.isEmpty(newVal) && !uni.$u.test.isEmpty(this.form.salaryMin)) {
this.form.salary = '有'
} else {
this.form.salary = ''
}
},
immediate: true
},
fileList(newValue, oldValue) {
if (newValue.length > 0) {
this.form.file = '有'
} else {
this.form.file = ''
}
handler(newVal, oldVal) {
if (!uni.$u.test.isEmpty(newVal) && !uni.$u.test.isEmpty(this.form.salaryMin)) {
this.form.salary = '有'
} else {
this.form.salary = ''
}
},
immediate: true
}
},
methods: {
handleIndChange() {
this.showType = true
},
typeSelect(event) {
console.info("selectIndClick", event)
this.form.industryId = event.id
this.form.industryName = event.name
this.showType = false
},
onIndustryList() {
industryList({}).then(response => {
console.info(response)
this.typeList = response.result
}).catch(error => {
})
},
handleSexChange() {
this.showSex = true
},
@ -219,28 +243,51 @@
this.form.sex = e.name
this.$refs.uForm.validateField('sex')
},
handleTypeChange() {
this.showType = true
},
typeSelect(e) {
this.form.type = e.name
this.$refs.uForm.validateField('type')
onRole() {
let that = this
let params = {
userName: that.form.name,
industryId: that.form.industryId,
industryName: that.form.industryName,
age: that.form.age,
gender: that.form.sex=="男"?1:2,
moneyMin: that.form.salaryMin,
moneyMax: that.form.salaryMax,
phone: that.form.mobile,
detail: that.form.introduce,
idCard: that.form.idCardFile.map(item => item.url).join(','),
}
role(params).then(response => {
uni.$u.toast("提交成功,等待申请")
setTimeout(()=>{
uni.switchTab({
url:"/pages/home/index"
})
},1500)
}).catch(error => {
setTimeout(()=>{
uni.switchTab({
url:"/pages/home/index"
})
},1500)
})
},
submit() {
this.$refs.uForm.validate().then(res => {
uni.$u.toast('校验通过')
this.onRole()
}).catch(errors => {
// uni.$u.toast('')
})
},
deletePic(event) {
this.fileList.splice(e.index, 1)
this.form.idCardFile.splice(e.index, 1)
},
async afterRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.fileList.push({
self.form.idCardFile.push({
url
})
})
@ -248,7 +295,7 @@
}
},
onReady() {
//setRules
this.onIndustryList()
this.$refs.uForm.setRules(this.rules)
},
}


+ 37
- 10
pages_subpack/payment/index.vue View File

@ -3,23 +3,23 @@
<view class="se-flex se-flex-v-sa se-flex-ai-fs se-py-20 se-px-30 se-bs se-bgc-white se-br-20">
<view class="se-flex">
<view class="se-w-160 se-h-160">
<image class="se-w-160 se-h-160 se-br-10" src="https://cdn.uviewui.com/uview/album/1.jpg" mode=""></image>
<image class="se-w-160 se-h-160 se-br-10" :src="items.workPic" mode=""></image>
</view>
<view class="se-ml-20 se-flex se-flex-v-sa se-flex-ai-fs">
<view class="se-fw-6 se-c-black se-fs-30 se-display-ib">泰山工装石膏板搬运</view>
<view class="se-fs-24 se-c-text-third se-display-ib">所属行业:水泥搬运</view>
<view class="se-fs-24 se-c-text-third se-display-ib">所属工种:中午搬运</view>
<view class="se-fs-24 se-c-text-third se-display-ib">工作时间:3h</view>
<view class="se-fw-6 se-c-black se-fs-30 se-display-ib">{{items.title}}</view>
<view class="se-fs-24 se-c-text-third se-display-ib">所属行业:{{items.industryName}}</view>
<!-- <view class="se-fs-24 se-c-text-third se-display-ib">所属工种:中午搬运</view> -->
<view class="se-fs-24 se-c-text-third se-display-ib">工作时间:{{items.workTime}}</view>
</view>
</view>
</view>
<view class="se-flex se-flex-h-fs se-mt-30 se-py-20 se-px-30 se-bs se-bgc-white se-br-20">
<image class="se-a-30" src="@/static/image/46502.png" mode=""></image>
<text class="se-c-black se-fs-32 se-ml-20">李满和</text>
<text class="se-c-black se-fs-32 se-ml-20">13189698114</text>
<text class="se-c-black se-fs-32 se-ml-20">{{items.userName}}</text>
<text class="se-c-black se-fs-32 se-ml-20">{{items.bossPhone}}</text>
</view>
<view class="se-flex se-flex-h-fs se-mt-30 se-py-20 se-px-30 se-bs se-bgc-white se-br-20">
<text class="se-c-black se-fs-28">联系地址湖南省长沙市雨花区高升路与时代阳光大道西交叉口东北方向140米御天国际商</text>
<text class="se-c-black se-fs-28">联系地址{{items.workAddress}}</text>
</view>
<view class="se-py-20 se-mt-10">
<view class="se-flex se-flex-ai-c se-pb-10">
@ -35,13 +35,13 @@
v-model="payRadio"
iconPlacement="right">
<view class="se-flex-v-sb se-w-p-100" style="align-items: unset;">
<u-radio name="1" activeColor="#ff7a31">
<!-- <u-radio name="1" activeColor="#ff7a31">
<view class="se-flex se-flex-ai-c se-pb-20">
<image class="se-w-30 se-h-25 se-mt-5" src="@/static/image/46518.png" mode=""></image>
<text class="se-c-black se-fs-30 se-ml-15">账户余额</text>
<text class="se-c-text-third se-fs-28 se-ml-15">(余额10)</text>
</view>
</u-radio>
</u-radio> -->
<u-radio name="2" activeColor="#ff7a31">
<view class="se-flex se-flex-ai-c se-pt-20">
<image class="se-w-35 se-h-30 se-mt-5" src="@/static/image/46662.png" mode=""></image>
@ -71,14 +71,41 @@
</template>
<script>
import {
getTaskById,orderTask
} from "@/common/api.js"
export default{
data(){
return{
id:"",
items:{},
amount:"9.9",
payRadio:"1"
}
},
onLoad(options) {
console.info(options)
this.id = options.id
this.onTask()
this.onOrderTask()
},
methods:{
onOrderTask(){
orderTask({taskId:this.id}).then(response=>{
console.info('orderTask',response)
}).catch(error=>{
})
},
onTask(){
let that = this
getTaskById({id:that.id}).then(response=>{
console.info('getTaskById',response);
that.items = response.result
}).catch(error=>{
})
},
onDetail(){
uni.navigateTo({
url:"/pages_subpack/order-detail/index"


+ 66
- 24
pages_subpack/record/index.vue View File

@ -7,7 +7,7 @@
总余额(
</view>
<view class="se-c-orange se-fs-26 se-c-orange se-mt-20">
1240.00
{{money}}
</view>
<view class="se-fs-24 se-mt-10 se-px-30 se-py-10 se-b-orange se-c-orange se-br-10 se-fw-6">
提现
@ -18,7 +18,7 @@
累计提现
</view>
<view class="se-c-orange se-fs-26 se-c-orange se-mt-20">
1240.00
{{moneyLog}}
</view>
<view class="se-fs-24 se-mt-10 se-px-30 se-py-10 se-b-orange se-c-orange se-br-10 se-fw-6">
提现记录
@ -30,49 +30,56 @@
<view class="se-c-black se-fs-30 se-fw-5">
金额明细
</view>
<view class="se-flex" @click="show=true">
<view class="se-flex se-ml-10 se-b-orange se-c-orange se-br-10 se-flex-h-c se-px-10 se-py-8 se-fs-20">
<text class="se-mr-8">{{year}}</text>
<view class="se-flex">
<view class="se-flex se-ml-10 se-b-orange se-c-orange se-br-10 se-flex-h-c se-px-10 se-py-8 se-fs-20" @click="startShow=true">
<text class="se-mr-8">{{startDate}}</text>
<u-icon name="arrow-down" size="10" color="#ff7a31"></u-icon>
</view>
<view class="se-flex se-ml-10 se-b-orange se-c-orange se-br-10 se-flex-h-c se-px-10 se-py-8 se-fs-20">
<!-- <view class="se-flex se-ml-10 se-b-orange se-c-orange se-br-10 se-flex-h-c se-px-10 se-py-8 se-fs-20">
<text class="se-mr-8">{{month}}</text>
<u-icon name="arrow-down" size="10" color="#ff7a31"></u-icon>
</view>
</view> -->
<view class="se-flex se-ml-10 se-c-orange se-flex-h-c se-px-10 se-py-8 se-fs-20">
<text></text>
</view>
<view class="se-flex se-ml-10 se-b-orange se-c-orange se-br-10 se-flex-h-c se-px-10 se-py-8 se-fs-20">
<text class="se-mr-8">{{day}}</text>
<view class="se-flex se-ml-10 se-b-orange se-c-orange se-br-10 se-flex-h-c se-px-10 se-py-8 se-fs-20" @click="endShow=true">
<text class="se-mr-8">{{endDate}}</text>
<u-icon name="arrow-down" size="10" color="#ff7a31"></u-icon>
</view>
</view>
</view>
<view class="se-m-20 se-bgc-white se-br-10">
<view class="se-b-b se-m-20 se-py-20 se-px-20 se-flex-h-sb" v-for="(items,indexs) in 10" :key="indexs" @click="onMasterDetail(items)">
<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">金额提现</text>
<text class="se-fw-6 se-c-33 se-fs-30">{{items.desc}}</text>
</view>
<view class="se-c-text-third se-fs-22 se-mt-20">
<text >2024-01-23 11:30:20</text>
<text >{{items.createTime}}</text>
</view>
</view>
<view class="se-c-33 se-fs-30 se-fw-5">
-199.00
{{items.money}}
</view>
</view>
</view>
<u-empty v-if="records && records.length==0" mode="list"></u-empty>
<view class="se-h-200"></view>
<u-picker :show="show" ref="uPicker" :columns="dates" @cancel="show=false" @confirm="dateConfirm"></u-picker>
<u-picker :show="startShow" ref="uPicker" :columns="dates" @cancel="startShow=false" @confirm="startDateConfirm"></u-picker>
<u-picker :show="endShow" ref="uPicker" :columns="dates" @cancel="endShow=false" @confirm="endDateConfirm"></u-picker>
</view>
</template>
<script>
import {
payLog
} from "@/common/api.js"
export default{
data(){
return{
show:false,
startShow:false,
endShow:false,
year:this.$dayjs().format('YYYY'),
month:this.$dayjs().format('MM'),
day:this.$dayjs().format('DD'),
@ -80,20 +87,55 @@
['2024','2025','2026','2027','2028'],
['01','02','03','04','05','06','07','08','09','10','11','12'],
['01','02','03','04','05','06','07','08','09','10','11','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30'],
]
],
pageNo:1,
pageSize:20,
startTime:"",
startDate:"",
endTime:"",
endDate:"",
money:0,
moneyLog:0,
records:[]
}
},
mounted() {
console.info(this.$dayjs().format('YY'))
this.startTime = this.$dayjs().valueOf();
this.startDate = this.$dayjs().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();
},
methods:{
dateConfirm(event){
console.info(event.value)
this.year = event.value[0]
this.month = event.value[1]
this.day = event.value[2]
this.show = false
onPayLog(){
let that = this
let params = {
pageNo:that.pageNo,
pageSize:that.pageSize,
startTime:that.startTime,
endTime:that.endTime
}
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
}).catch(error=>{
})
},
startDateConfirm(event){
this.startTime = this.$dayjs(event.value[0]+"-"+event.value[1]+"-"+event.value[2]).valueOf();
this.startDate = event.value[0]+"-"+event.value[1]+"-"+event.value[2]
this.startShow = false
this.onPayLog();
},
endDateConfirm(event){
this.endTime = this.$dayjs(event.value[0]+"-"+event.value[1]+"-"+event.value[2]).valueOf();
this.endDate = event.value[0]+"-"+event.value[1]+"-"+event.value[2]
this.endShow = false
this.onPayLog();
}
}
}


+ 179
- 62
pages_subpack/release/component/enterprise.vue View File

@ -14,46 +14,46 @@
<u-form-item labelWidth="0" prop="title">
<u--input v-model="form.title" placeholder="请在此输入标题"></u--input>
</u-form-item>
<u-form-item label="工作地点" prop="area" @click="handleAreaChange">
<u--input @click="handleAreaChange" readonly v-model="form.area" placeholder="请选择工作地点"
border="none"></u--input>
<u-icon @click="handleAreaChange" 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
placeholder="请输入详细地址"></u--textarea>
<!-- <u--input v-model="form.address" placeholder="请输入详细地址"></u--input> -->
</u-form-item>
<u-form-item label="所属行业" prop="industry" @click="handleindustryChange">
<u--input @click="handleindustryChange" readonly v-model="form.industry" placeholder="请选择行业"
</u-form-item> -->
<u-form-item label="所属行业" prop="industryName" @click="handleindustryChange">
<u--input @click="handleindustryChange" readonly v-model="form.industryName" placeholder="请选择行业"
border="none"></u--input>
<u-icon @click="handleindustryChange" slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="所属工种" prop="type" @click="handleTypeChange">
<u--input @click="handleTypeChange" v-model="form.type" readonly placeholder="请选择工种"
<u-form-item label="所属工种" prop="typeId" @click="handleTypeChange">
<u--input @click="handleTypeChange" v-model="form.typeName" readonly placeholder="请选择工种"
border="none"></u--input>
<u-icon @click="handleTypeChange" slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="试用日薪" prop="salary">
<u-form-item label="期望月薪" prop="salary">
<view class="se-flex se-flex-h-c">
<u--input v-model="form.salaryMin" class="se-w-200" placeholder="最小值"></u--input>
<text class="se-mx-10">~</text>
<u--input v-model="form.salaryMax" class="se-w-200" placeholder="最大值"></u--input>
</view>
</u-form-item>
<u-form-item label="期望日薪" prop="dayMoney">
<u--input v-model="form.dayMoney" placeholder="期望日薪"></u--input>
</u-form-item>
<u-form-item label="结算方式" prop="settlement">
<u-radio-group v-model="form.settlement" placement="row">
<u-radio activeColor="#FF7A31" name="1" label="提前支付"></u-radio>
<u-radio activeColor="#FF7A31" class="se-ml-20" name="2" label="试用以后支付"></u-radio>
<u-radio activeColor="#FF7A31" name="0" label="提前支付"></u-radio>
<u-radio activeColor="#FF7A31" class="se-ml-20" name="1" label="试用以后支付"></u-radio>
</u-radio-group>
</u-form-item>
<u-form-item label="时间" prop="date">
<view class="se-flex se-flex-h-c">
<u--input v-model="form.dateMin" class="se-w-200" placeholder="0:00"></u--input>
<text class="se-mx-10">~</text>
<u--input v-model="form.dateMax" class="se-w-200" placeholder="0:00"></u--input>
</view>
<u-form-item label="开始时间" prop="dateMin" @click="showMinDate=true">
<u--input v-model="form.dateMin" disabled placeholder="开始时间"></u--input>
</u-form-item>
<u-form-item label="结束时间" prop="dateMax" @click="showMaxDate=true">
<u--input v-model="form.dateMax" disabled placeholder="结束时间"></u--input>
</u-form-item>
<u-form-item label="联系电话" prop="mobile">
<u--input v-model="form.mobile" placeholder="请输入联系方式"></u--input>
@ -66,7 +66,7 @@
</view>
<view class="se-p-20">
<view class="se-px-20 se-pb-20 se-bgc-white se-br-10 se-fs-20">
<u-form-item prop="file" labelWidth="2">
<u-form-item prop="fileList" labelWidth="2">
<view class="se-flex se-flex-v-sa">
<view class="se-py-20 se-w-p-100 se-flex">
<view class="line-orange"></view>
@ -75,7 +75,7 @@
</view>
</view>
<view class="se-py-20 se-w-p-100">
<u-upload :fileList="fileList" @afterRead="afterRead" @delete="deletePic" name="1"
<u-upload :fileList="form.fileList" @afterRead="afterRead" @delete="deletePic" name="1"
multiple :maxCount="10"></u-upload>
</view>
</view>
@ -92,7 +92,7 @@
</view>
</u--form>
<!-- 性别 -->
<u-action-sheet :show="showIndustry" :actions="industryList" title="请选择行业" @close="showIndustry = false" @select="industrySelect">
<u-action-sheet :show="showIndustry" :actions="indList" title="请选择行业" @close="showIndustry = false" @select="industrySelect">
</u-action-sheet>
<!-- 种类 -->
<u-action-sheet :show="showType" :actions="typeList" title="请选择种类" @close="showType = false"
@ -100,10 +100,30 @@
</u-action-sheet>
<!-- 地址 -->
<citySelect v-model="showPicker" @city-change="handleCityChange"></citySelect>
<!-- 时间 Min-->
<u-datetime-picker
:show="showMinDate"
:value="form.dateMin"
mode="datetime"
closeOnClickOverlay
@confirm="dateMinConfirm"
@cancel="dateMinClose"
@close="dateMinClose"
></u-datetime-picker>
<u-datetime-picker
:show="showMaxDate"
:value="form.dateMax"
mode="datetime"
closeOnClickOverlay
@confirm="dateMaxConfirm"
@cancel="dateMaxClose"
@close="dateMaxClose"
></u-datetime-picker>
</view>
</template>
<script>
import { addTask,industryList,industryById } from "@/common/api.js"
import citySelect from '@/components/cityselect/index.vue'
export default {
components:{
@ -111,8 +131,12 @@
},
data() {
return {
showMinDate:false,
showMaxDate:false,
showPicker: false,
showIndustry: false,
indList:[],
industryList: [
{
name: '打铁',
@ -122,30 +146,32 @@
}
],
showType: false,
typeList: [{
name: '铁匠',
},
{
name: '水泥搬运',
}
],
fileList: [],
typeList: [],
form: {
title:"",
area:'',
title:"宜佳营业员",
area:'河北省-秦皇岛市-抚宁区',
address:'',
industry:"",
settlement:1,
industryId:"1865294357074157570",
industryName:"建筑",
settlement:'0',
date:"",
dateMin:"",
dateMax:"",
mobile: '',
type: '',
dateMin:"2016-02-01 09:00:00",
dateMax:"2016-12-05 18:00:00",
mobile: '13189698114',
typeId: '',
typeName:"",
salary:'',
salaryMin: '',
salaryMax: '',
introduce: '',
file: ''
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"
},
rules: {
title:[
@ -172,7 +198,7 @@
trigger: ['blur', 'change']
}
],
industry:[
industryName:[
{
type: 'string',
required: true,
@ -180,6 +206,22 @@
trigger: ['blur', 'change']
}
],
typeId:[
{
type: 'string',
required: true,
message: '请选择工种',
trigger: ['blur', 'change']
}
],
dayMoney:[
{
type: 'string',
required: true,
message: '期望日薪',
trigger: ['blur', 'change']
}
],
settlement:[
{
type: 'string',
@ -222,12 +264,19 @@
message: '请输入工作内容',
trigger: ['blur', 'change']
}],
file: [{
type: 'string',
required: true,
message: '请选择身份证',
trigger: ['blur', 'change']
}]
fileList:[
{
validator: (rule, value, callback) => {
if (value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0)) {
callback(new Error('照片不能为空'));
} else {
callback();
}
},
trigger: 'blur'
}
],
},
}
},
@ -272,15 +321,23 @@
},
immediate: true
},
fileList(newValue, oldValue) {
if (newValue.length > 0) {
this.form.file = '有'
} else {
this.form.file = ''
}
}
},
methods: {
dateMinConfirm(event){
console.info(event)
this.showMinDate = false
this.form.dateMin = uni.$u.timeFormat(event.value, 'yyyy-mm-dd hh:MM:ss')
},
dateMinClose(){
this.showMinDate = false
},
dateMaxConfirm(event){
this.showMaxDate = false
this.form.dateMax = uni.$u.timeFormat(event.value, 'yyyy-mm-dd hh:MM:ss')
},
dateMaxClose(){
this.showMaxDate = false
},
handleAreaChange(){
this.showPicker = true
},
@ -292,40 +349,100 @@
this.showIndustry = true
},
industrySelect(e) {
this.form.industry = e.name
this.$refs.uForm.validateField('industry')
this.form.industryId=e.id
this.form.industryName = e.name
this.$refs.uForm.validateField('industryName')
this.onIndustryById()
},
onIndustryById(){
let that = this
industryById({pid:that.form.industryId}).then(response=>{
console.info("response",response);
that.typeList = response.result
}).catch(error=>{
})
},
handleTypeChange() {
if(!this.form.industryId){
return uni.$u.toast('请选择行业')
}
this.showType = true
},
typeSelect(e) {
this.form.type = e.name
this.$refs.uForm.validateField('type')
this.form.typeId = e.id
this.form.typeName = e.name
this.$refs.uForm.validateField('typeId')
},
submit() {
console.info(this.form)
this.$refs.uForm.validate().then(res => {
uni.$u.toast('校验通过')
this.onaddTask()
// uni.$u.toast('')
}).catch(errors => {
// uni.$u.toast('')
})
},
onaddTask(){
let that = this
let params ={
"bossPhone": that.form.mobile,//
"dayMoney": that.form.dayMoney,//
"endTime": that.form.dateMax,
// "industryId": that.form.industryId,
// "industryName": that.form.industryName,
"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(','),//
}
addTask(params).then(response=>{
console.info("response",response)
uni.$u.toast("提交成功!")
setTimeout(()=>{
uni.switchTab({
url:"/pages/home/index"
})
},1500)
}).catch(error=>{
})
},
deletePic(event) {
this.fileList.splice(e.index, 1)
this.form.fileList.splice(e.index, 1)
},
async afterRead(e) {
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.fileList.push({
self.form.fileList.push({
url
})
})
})
}
},
onIndustryList(){
industryList({}).then(response=>{
console.info("industryList",response);
this.indList = response.result
}).catch(error=>{
})
},
},
onReady() {
this.$refs.uForm.setRules(this.rules)
this.onIndustryList()
},
}
</script>


+ 75
- 43
pages_subpack/release/component/master.vue View File

@ -3,29 +3,28 @@
<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm" labelWidth="80">
<view class="se-p-20">
<view class="se-px-20 se-bgc-white se-br-10 se-fs-20">
<u-form-item label="请选择地址" prop="area" @click="showPicker=true">
<u--input readonly v-model="form.area" placeholder="请选择地址"
border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
<!-- @click="showPicker=true" -->
<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 placeholder="请输入详细地址"></u--textarea>
</u-form-item>
<!-- <u-form-item label="所属行业" prop="industry" @click="handleindustryChange">
<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-form-item> -->
<u-form-item label="所属工种" prop="type" @click="handleTypeChange">
<u-form-item label="所属行业" class="se-b-b" prop="industry" @click="handleindustryChange()">
<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-form-item>
<u-form-item label="所属工种" class="se-b-b" prop="type" @click="handleTypeChange">
<u--input @click="handleTypeChange" v-model="form.type" readonly placeholder="请选择工种"
border="none"></u--input>
<u-icon @click="handleTypeChange" slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-form-item label="预约时间" prop="date" @click="show=true">
<!-- <u-form-item label="预约时间" prop="date" @click="show=true">
<u--input v-model="form.date" readonly placeholder="请选择预约时间"
border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
</u-form-item> -->
<u-form-item label="出行方式" labelPosition="top" prop="travel">
<view class="se-flex se-flex-ai-c se-flex-ff-rw se-pt-10">
<view class="se-py-10 se-px-30 se-fs-22 se-br-10 se-mr-15 se-mt-10" :class="item.select ? 'se-bgc-orange se-c-white se-b-orange' : 'se-b se-c-text'" @click="handleIntellect(index)" v-for="(item,index) in travelList" :key="index">
@ -77,47 +76,30 @@
</view>
</view>
</u--form>
<!-- 性别 -->
<!-- 行业 -->
<u-action-sheet :show="showIndustry" :actions="industryList" title="请选择行业" @close="showIndustry = false" @select="industrySelect">
</u-action-sheet>
<!-- 种类 -->
<u-action-sheet :show="showType" :actions="typeList" title="请选择种类" @close="showType = false"
@select="typeSelect">
<u-action-sheet :show="showType" :actions="typeList" title="请选择种类" @close="showType = false" @select="typeSelect">
</u-action-sheet>
<!-- 地址 -->
<citySelect v-model="showPicker" @city-change="handleCityChange"></citySelect>
<u-picker :show="show" ref="uPicker" :columns="dates" @cancel="show=false" @confirm="dateConfirm"></u-picker>
</view>
</template>
<script>
import citySelect from '@/components/cityselect/index.vue'
import QQMapWX from "@/util/qqmap-wx-jssdk.min.js"
import { industryById,industryList } from "@/common/api.js"
export default {
components:{
citySelect
},
data() {
return {
show:false,
showPicker: false,
showIndustry: false,
industryList: [
{
name: '打铁',
},
{
name: '打牌',
}
],
industryList: [],
showType: false,
typeList: [{
name: '铁匠',
},
{
name: '水泥搬运',
}
],
typeList: [],
travelList:[
{
text:"出租车",
@ -149,19 +131,22 @@
title:"",
area:'',
address:'',
industryId:"",
industry:"",
settlement:1,
date:"",
dateMin:"",
dateMax:"",
mobile: '',
typeId:"",
type: '',
salary:'',
salaryMin: '',
salaryMax: '',
dailywage:'',
introduce: '',
longitude:'',
latitude:''
},
rules: {
title:[
@ -284,6 +269,14 @@
immediate: true
},
},
mounted() {
industryList({}).then(response=>{
this.industryList = response.result
}).catch(error=>{
})
},
methods: {
dateConfirm(event){
this.form.date = event.value[0]+"-"+event.value[1]+"-"+event.value[2]
@ -291,26 +284,65 @@
this.show = false
},
handleIntellect(index){
this.travelList.forEach((items)=>{
items.select=false
})
this.travelList[index].select = !this.travelList[index].select
},
handleAreaChange(){
this.showPicker = true
},
handleCityChange(e) {
console.info(e)
this.form.area = e.province.label + '-' + e.city.label + '-' + e.area.label;
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);
}
});
}
})
},
handleindustryChange() {
this.showIndustry = true
},
industrySelect(e) {
console.info(e)
this.form.industryId = e.id
this.form.industry = e.name
this.form.typeId = ""
this.form.type = ""
industryById({pid:e.id}).then(response=>{
this.typeList=response.result
}).catch(error=>{
})
this.$refs.uForm.validateField('industry')
},
handleTypeChange() {
this.showType = true
},
typeSelect(e) {
this.form.typeId = e.id
this.form.type = e.name
this.$refs.uForm.validateField('type')
},


+ 0
- 2
pages_subpack/release/index.vue View File

@ -8,8 +8,6 @@
</template>
<script>
import enterpriseBox from "./component/enterprise.vue"
import masterBox from "./component/master.vue"
export default {


+ 8
- 1
pages_subpack/system/index.vue View File

@ -33,7 +33,7 @@
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="se-px-30 se-py-20 se-pt-40 se-flex se-flex-h-sb se-fs-28 se-c-black">
<view class="se-px-30 se-py-20 se-pt-40 se-flex se-flex-h-sb se-fs-28 se-c-black" @click="outLogin">
<view class="se-flex se-flex-h-c">
<!-- <image class="se-w-50 se-h-30 se-mr-40" src="@/static/image/home.png" mode=""></image> -->
<text>退出登录</text>
@ -51,6 +51,13 @@
return{
}
},
methods:{
outLogin(){
uni.redirectTo({
url:"/pages/auth/index"
})
}
}
}
</script>


+ 18
- 2
pages_subpack/wallet/component/recharge.vue View File

@ -26,15 +26,31 @@
</template>
<script>
import {
payRecharge
} from "@/common/api.js"
export default{
props:["userId","myMoney"],
data(){
return{
money:""
}
},
methods:{
onRecharge(){
console.info(`立即充值`);
let that = this
let params = {
rechargeReq:{
id:this.userId,
price:this.money
}
}
payRecharge(params).then(response=>{
that.$emit("onParent")
}).catch(error=>{
})
}
}
}


+ 19
- 4
pages_subpack/wallet/component/withdrawal.vue View File

@ -16,7 +16,7 @@
</view>
</view>
<view class="se-pt-80 se-fs-20 se-flex">
<view @click="onEmploy"
<view @click="onWithdrawal"
class="se-mx-10 se-flex-1 se-br-40 se-flex-h-c se-h-80 se-lh-80 se-ta-c se-fs-28 se-c-white se-bgc-orange">
<text>立即提现</text>
</view>
@ -25,15 +25,30 @@
</template>
<script>
import {
withdrawal
} from "@/common/api.js"
export default{
props:["userId","myMoney"],
data(){
return{
money:"",
}
},
methods:{
onRecharge(){
console.info(`立即提现`);
onWithdrawal(){
let that = this
let params = {
money:this.money
}
withdrawal(params).then(response=>{
console.info("response",response)
that.money=""
that.$emit("onParent")
}).catch(error=>{
})
}
}
}


+ 21
- 3
pages_subpack/wallet/index.vue View File

@ -4,7 +4,7 @@
<image class="se-w-p-100 se-h-300 se-br-20" src="@/static/image/6584.png" mode=""></image>
<view class="se-pos-lc se-fs-32 se-c-white se-flex se-flex-v se-flex-ff se-pl-60">
<text>钱包</text>
<text class="se-mt-20 se-fw-6 se-fs-34">7890</text>
<text class="se-mt-20 se-fw-6 se-fs-34">{{myMoney}}</text>
</view>
</view>
<view class="se-mx-40">
@ -23,14 +23,17 @@
itemStyle="padding-left: 20rpx; padding-right: 20rpx;font-size:18rpx; height: 60rpx;"
@click="tabClick"></u-tabs>
</view>
<withdrawalBox v-if="current==0" />
<rechargeBox v-if="current==1" />
<withdrawalBox @onParent="onUserInfo()" :userId="userId" :myMoney="myMoney" v-if="current==0" />
<rechargeBox @onParent="onUserInfo()" :userId="userId" :myMoney="myMoney" v-if="current==1" />
</view>
</template>
<script>
import withdrawalBox from "./component/withdrawal.vue"
import rechargeBox from "./component/recharge.vue"
import {
userInfo
} from "@/common/api.js"
export default{
components:{
withdrawalBox,
@ -38,6 +41,8 @@
},
data(){
return{
myMoney:0,
userId:"",
current:0,
nav: [
{
@ -50,7 +55,20 @@
}
},
onShow(options) {
this.onUserInfo()
},
methods:{
onUserInfo(){
let params={}
userInfo(params).then(response=>{
console.info("userInfo",response)
this.userId=response.result.id
this.myMoney=response.result.myMoney?response.result.myMoney:0
}).catch(error=>{
})
},
tabClick(event){
this.current = event.index
}


+ 34
- 22
pages_subpack/work-detail/index.vue View File

@ -1,28 +1,28 @@
<template>
<view class="se-p-40">
<view class="se-fs-36 se-c-black se-fw-6 se-py-20">
工装石膏板搬运
{{items.title}}
</view>
<view class="se-fs-26 se-c-orange se-fw-6 ">
6000-11000
{{items.moneymin}} - {{items.moneymax}}
</view>
<view class="se-flex se-flex-v se-py-20">
<view class="se-fs-24 se-c-text">
<text>深圳 罗湖区 东门</text>
<text class="se-ml-20">不限</text>
<text>{{items.workAddress}}</text>
<!-- <text class="se-ml-20">不限</text> -->
</view>
<view class="se-fs-24 se-c-99 se-pt-20">
该职位位于昨日新发布
该职位位于{{items.createTime}}发布
</view>
</view>
<view class="se-flex se-flex-h-sb se-py-40 se-b-b">
<view class="se-flex">
<view>
<image class="se-a-80 se-br-p-50" src="https://cdn.uviewui.com/uview/album/1.jpg" mode=""></image>
<image class="se-a-80 se-br-p-50 se-bgc-f5" :src="items.headPic" mode=""></image>
</view>
<view class="se-ml-20 se-flex se-flex-v-sa se-flex-ai-fs">
<text class="se-fw-6 se-c-black se-fs-30">李志</text>
<text class="se-fs-24 se-c-text-third">蓝色乐趣有限公司</text>
<text class="se-fw-6 se-c-black se-fs-30">{{items.workName}}</text>
<text class="se-fs-24 se-c-text-third">{{items.companyName}}</text>
</view>
</view>
</view>
@ -31,7 +31,7 @@
工作地址
</view>
<view class="se-fs-24 se-c-66 se-pt-10 se-flex se-flex-h">
<text>深圳罗湖区深圳市百货广场大厦罗湖区百货广场大厦东....</text>
<text>{{items.workAddress}}</text>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
@ -40,15 +40,15 @@
职位详情
</view>
<view class="se-pt-20">
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5">3h</text>
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5">试用以后支付</text>
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5">重物搬运</text>
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5">水泥搬运</text>
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5" v-if="items.workTime">{{items.workTime}}</text>
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5" v-if="items.industryName">{{items.industryName}}</text>
<!-- <text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5" v-if="items.companyName">{{items.companyName}}</text> -->
<!-- <text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5">水泥搬运</text> -->
</view>
</view>
<view class="se-fs-24 se-pt-20 se-pb-20 se-lh-40">
<text class="se-fs-24 se-c-text-third">岗位要求</text>
<u-parse :content="detail"></u-parse>
<u-parse :content="items.workDetail"></u-parse>
</view>
<view class="se-px-20 se-pt-20">
<view class="se-px-20 se-pb-80 se-fs-20 se-flex">
@ -61,22 +61,34 @@
</view>
</template>
<script>
import {
getTaskById
} from "@/common/api.js"
export default{
data(){
return{
detail:`<p>
1全日制大专以上学历艺术设计类相关专业;<br/>
2两年以上平面品牌视觉设计等相关工作经验能独立完成项目的设计工作 3C数码/个护健 类产品服务经验优先有乙方工作经验佳;<br/>
3具备一定的设计提案能力能完整的呈现设计思路与创意能清晰的表达设计逻辑与思考;<br/>
4热爱设计平面基本功扎实拥有优良的审美与创意想法对版式色彩把控能力强;对工作富有责任心具备团队沟通与协作能力;<br/>
5精通 PSAICDR 等平面设计软件能独立完成日常平面设计工作内容熟练使用 PPT/Keynote能完成提案内容的材料美化工作<br/>
</p>`
id:"",
items:{},
}
},
onLoad(options) {
console.info(options)
this.id = options.id
this.onTask()
},
methods:{
onTask(){
let that = this
getTaskById({id:that.id}).then(response=>{
console.info('getTaskById',response);
that.items = response.result
}).catch(error=>{
})
},
onPayment(){
uni.navigateTo({
url:"/pages_subpack/payment/index"
url:"/pages_subpack/payment/index?id="+this.id
})
}
}


+ 0
- 224
static/app-plus/mp-html/js/handler.js View File

@ -1,224 +0,0 @@
'use strict'
// 等待初始化完毕
document.addEventListener('UniAppJSBridgeReady', () => {
document.body.onclick = function () {
return uni.postMessage({
data: {
action: 'onClick'
}
})
}
uni.postMessage({
data: {
action: 'onJSBridgeReady'
}
})
})
let options
let medias = []
/**
* @description 获取标签的所有属性
* @param {Element} ele
*/
function getAttrs(ele) {
const attrs = Object.create(null)
for (let i = ele.attributes.length; i--;) {
attrs[ele.attributes[i].name] = ele.attributes[i].value
}
return attrs
}
/**
* @description 图片加载出错
*/
function onImgError() {
if (options[1]) {
this.src = options[1]
this.onerror = null
} // 取消监听点击
this.onclick = null
this.ontouchstart = null
uni.postMessage({
data: {
action: 'onError',
source: 'img',
attrs: getAttrs(this)
}
})
}
/**
* @description 创建 dom 结构
* @param {object[]} nodes 节点数组
* @param {Element} parent 父节点
* @param {string} namespace 命名空间
*/
function createDom(nodes, parent, namespace) {
const _loop = function _loop(i) {
const node = nodes[i]
let ele = void 0
if (!node.type || node.type == 'node') {
let { name } = node // svg 需要设置 namespace
if (name == 'svg') namespace = 'http://www.w3.org/2000/svg'
if (name == 'html' || name == 'body') name = 'div' // 创建标签
if (!namespace) ele = document.createElement(name); else ele = document.createElementNS(namespace, name) // 设置属性
for (const item in node.attrs) {
ele.setAttribute(item, node.attrs[item])
} // 递归创建子节点
if (node.children) createDom(node.children, ele, namespace) // 处理图片
if (name == 'img') {
if (!ele.src && ele.getAttribute('data-src')) ele.src = ele.getAttribute('data-src')
if (!node.attrs.ignore) {
// 监听图片点击事件
ele.onclick = function (e) {
e.stopPropagation()
uni.postMessage({
data: {
action: 'onImgTap',
attrs: getAttrs(this)
}
})
}
}
if (options[2]) {
image = new Image()
image.src = ele.src
ele.src = options[2]
image.onload = function () {
ele.src = this.src
}
image.onerror = function () {
ele.onerror()
}
}
ele.onerror = onImgError
} // 处理链接
else if (name == 'a') {
ele.addEventListener('click', function (e) {
e.stopPropagation()
e.preventDefault() // 阻止默认跳转
const href = this.getAttribute('href')
let offset
if (href && href[0] == '#') offset = (document.getElementById(href.substr(1)) || {}).offsetTop
uni.postMessage({
data: {
action: 'onLinkTap',
attrs: getAttrs(this),
offset
}
})
}, true)
} // 处理音视频
else if (name == 'video' || name == 'audio') {
medias.push(ele)
if (!node.attrs.autoplay) {
if (!node.attrs.controls) ele.setAttribute('controls', 'true') // 空白图占位
if (!node.attrs.poster) ele.setAttribute('poster', "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'/>")
}
if (options[3]) {
ele.onplay = function () {
for (let _i = 0; _i < medias.length; _i++) {
if (medias[_i] != this) medias[_i].pause()
}
}
}
ele.onerror = function () {
uni.postMessage({
data: {
action: 'onError',
source: name,
attrs: getAttrs(this)
}
})
}
} // 处理表格
else if (name == 'table' && options[4] && !ele.style.cssText.includes('inline')) {
const div = document.createElement('div')
div.style.overflow = 'auto'
div.appendChild(ele)
ele = div
} else if (name == 'svg') namespace = void 0
} else ele = document.createTextNode(node.text.replace(/&amp;/g, '&'))
parent.appendChild(ele)
}
for (let i = 0; i < nodes.length; i++) {
var image
_loop(i)
}
} // 设置 html 内容
window.setContent = function (nodes, opts, append) {
const ele = document.getElementById('content') // 背景颜色
if (opts[0]) document.body.bgColor = opts[0] // 长按复制
if (!opts[5]) ele.style.userSelect = 'none'
if (!append) {
ele.innerHTML = '' // 不追加则先清空
medias = []
}
options = opts
const fragment = document.createDocumentFragment()
createDom(nodes, fragment)
ele.appendChild(fragment) // 触发事件
let height = ele.scrollHeight
uni.postMessage({
data: {
action: 'onLoad',
height
}
})
clearInterval(window.timer)
let ready = false
window.timer = setInterval(() => {
if (ele.scrollHeight != height) {
height = ele.scrollHeight
uni.postMessage({
data: {
action: 'onHeightChange',
height
}
})
} else if (!ready) {
ready = true
uni.postMessage({
data: {
action: 'onReady'
}
})
}
}, 350)
} // 回收计时器
window.onunload = function () {
clearInterval(window.timer)
}

+ 0
- 19
static/app-plus/mp-html/js/uni.webview.min.js View File

@ -1,19 +0,0 @@
!(function (e, n) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = n() : typeof define === 'function' && define.amd ? define(n) : (e = e || self).uni = n() }(this, (() => {
'use strict'
try { const e = {}; Object.defineProperty(e, 'passive', { get() { !0 } }), window.addEventListener('test-passive', null, e) } catch (e) {} const n = Object.prototype.hasOwnProperty; function t(e, t) { return n.call(e, t) } const i = []; const a = function (e, n) { const t = { options: { timestamp: +new Date() }, name: e, arg: n }; if (window.__dcloud_weex_postMessage || window.__dcloud_weex_) { if (e === 'postMessage') { const a = { data: [n] }; return window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessage(a) : window.__dcloud_weex_.postMessage(JSON.stringify(a)) } const o = { type: 'WEB_INVOKE_APPSERVICE', args: { data: t, webviewIds: i } }; window.__dcloud_weex_postMessage ? window.__dcloud_weex_postMessageToService(o) : window.__dcloud_weex_.postMessageToService(JSON.stringify(o)) } if (!window.plus) return window.parent.postMessage({ type: 'WEB_INVOKE_APPSERVICE', data: t, pageId: '' }, '*'); if (i.length === 0) { const r = plus.webview.currentWebview(); if (!r) throw new Error('plus.webview.currentWebview() is undefined'); const d = r.parent(); let s = ''; s = d ? d.id : r.id, i.push(s) } if (plus.webview.getWebviewById('__uniapp__service'))plus.webview.postMessageToUniNView({ type: 'WEB_INVOKE_APPSERVICE', args: { data: t, webviewIds: i } }, '__uniapp__service'); else { const w = JSON.stringify(t); plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat('WEB_INVOKE_APPSERVICE', '",').concat(w, ',').concat(JSON.stringify(i), ');')) } }; const o = {
navigateTo() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; const n = e.url; a('navigateTo', { url: encodeURI(n) }) }, navigateBack() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; const n = e.delta; a('navigateBack', { delta: parseInt(n) || 1 }) }, switchTab() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; const n = e.url; a('switchTab', { url: encodeURI(n) }) }, reLaunch() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; const n = e.url; a('reLaunch', { url: encodeURI(n) }) }, redirectTo() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; const n = e.url; a('redirectTo', { url: encodeURI(n) }) }, getEnv(e) { window.plus ? e({ plus: !0 }) : e({ h5: !0 }) }, postMessage() { const e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; a('postMessage', e.data || {}) }
}; const r = /uni-app/i.test(navigator.userAgent); const d = /Html5Plus/i.test(navigator.userAgent); const s = /complete|loaded|interactive/; const w = window.my && navigator.userAgent.indexOf('AlipayClient') > -1; const u = window.swan && window.swan.webView && /swan/i.test(navigator.userAgent); const c = window.qq && window.qq.miniProgram && /QQ/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent); const g = window.tt && window.tt.miniProgram && /toutiaomicroapp/i.test(navigator.userAgent); const v = window.wx && window.wx.miniProgram && /micromessenger/i.test(navigator.userAgent) && /miniProgram/i.test(navigator.userAgent); const p = window.qa && /quickapp/i.test(navigator.userAgent); for (var l, _ = function () { window.UniAppJSBridge = !0, document.dispatchEvent(new CustomEvent('UniAppJSBridgeReady', { bubbles: !0, cancelable: !0 })) }, f = [function (e) { if (r || d) return window.__dcloud_weex_postMessage || window.__dcloud_weex_ ? document.addEventListener('DOMContentLoaded', e) : window.plus && s.test(document.readyState) ? setTimeout(e, 0) : document.addEventListener('plusready', e), o }, function (e) { if (v) return window.WeixinJSBridge && window.WeixinJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener('WeixinJSBridgeReady', e), window.wx.miniProgram }, function (e) { if (c) return window.QQJSBridge && window.QQJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener('QQJSBridgeReady', e), window.qq.miniProgram }, function (e) {
if (w) {
document.addEventListener('DOMContentLoaded', e); const n = window.my; return {
navigateTo: n.navigateTo, navigateBack: n.navigateBack, switchTab: n.switchTab, reLaunch: n.reLaunch, redirectTo: n.redirectTo, postMessage: n.postMessage, getEnv: n.getEnv
}
}
}, function (e) { if (u) return document.addEventListener('DOMContentLoaded', e), window.swan.webView }, function (e) { if (g) return document.addEventListener('DOMContentLoaded', e), window.tt.miniProgram }, function (e) {
if (p) {
window.QaJSBridge && window.QaJSBridge.invoke ? setTimeout(e, 0) : document.addEventListener('QaJSBridgeReady', e); const n = window.qa; return {
navigateTo: n.navigateTo, navigateBack: n.navigateBack, switchTab: n.switchTab, reLaunch: n.reLaunch, redirectTo: n.redirectTo, postMessage: n.postMessage, getEnv: n.getEnv
}
}
}, function (e) { return document.addEventListener('DOMContentLoaded', e), o }], m = 0; m < f.length && !(l = f[m](_)); m++);l || (l = {}); const E = typeof uni !== 'undefined' ? uni : {}; if (!E.navigateTo) for (const b in l)t(l, b) && (E[b] = l[b]); return E.webView = l, E
})))

+ 0
- 1
static/app-plus/mp-html/local.html View File

@ -1 +0,0 @@
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><style>body,html{width:100%;height:100%;overflow:hidden}body{margin:0}video{width:300px;height:225px}img{max-width:100%;-webkit-touch-callout:none}@keyframes show{0%{opacity:0}100%{opacity:1}}</style></head><body><div id="content"></div><script type="text/javascript" src="./js/uni.webview.min.js"></script><script type="text/javascript" src="./js/handler.js"></script></body>

+ 0
- 363
static/common/js/touch-emulator.js View File

@ -1,363 +0,0 @@
(function (window, document, exportName, undefined) {
"use strict";
var isMultiTouch = false;
var multiTouchStartPos;
var eventTarget;
var touchElements = {};
// polyfills
if (!document.createTouch) {
document.createTouch = function (view, target, identifier, pageX, pageY, screenX, screenY, clientX, clientY) {
// auto set
if (clientX == undefined || clientY == undefined) {
clientX = pageX - window.pageXOffset;
clientY = pageY - window.pageYOffset;
}
return new Touch(target, identifier, {
pageX: pageX,
pageY: pageY,
screenX: screenX,
screenY: screenY,
clientX: clientX,
clientY: clientY
});
};
}
if (!document.createTouchList) {
document.createTouchList = function () {
var touchList = new TouchList();
for (var i = 0; i < arguments.length; i++) {
touchList[i] = arguments[i];
}
touchList.length = arguments.length;
return touchList;
};
}
/**
* create an touch point
* @constructor
* @param target
* @param identifier
* @param pos
* @param deltaX
* @param deltaY
* @returns {Object} touchPoint
*/
function Touch(target, identifier, pos, deltaX, deltaY) {
deltaX = deltaX || 0;
deltaY = deltaY || 0;
this.identifier = identifier;
this.target = target;
this.clientX = pos.clientX + deltaX;
this.clientY = pos.clientY + deltaY;
this.screenX = pos.screenX + deltaX;
this.screenY = pos.screenY + deltaY;
this.pageX = pos.pageX + deltaX;
this.pageY = pos.pageY + deltaY;
}
/**
* create empty touchlist with the methods
* @constructor
* @returns touchList
*/
function TouchList() {
var touchList = [];
touchList.item = function (index) {
return this[index] || null;
};
// specified by Mozilla
touchList.identifiedTouch = function (id) {
return this[id + 1] || null;
};
return touchList;
}
/**
* Simple trick to fake touch event support
* this is enough for most libraries like Modernizr and Hammer
*/
function fakeTouchSupport() {
var objs = [window, document.documentElement];
var props = ['ontouchstart', 'ontouchmove', 'ontouchcancel', 'ontouchend'];
for (var o = 0; o < objs.length; o++) {
for (var p = 0; p < props.length; p++) {
if (objs[o] && objs[o][props[p]] == undefined) {
objs[o][props[p]] = null;
}
}
}
}
/**
* we don't have to emulate on a touch device
* @returns {boolean}
*/
function hasTouchSupport() {
return ("ontouchstart" in window) || // touch events
(window.Modernizr && window.Modernizr.touch) || // modernizr
(navigator.msMaxTouchPoints || navigator.maxTouchPoints) > 2; // pointer events
}
/**
* disable mouseevents on the page
* @param ev
*/
function preventMouseEvents(ev) {
// 注释启用默认事件
// ev.preventDefault();
// ev.stopPropagation();
}
/**
* only trigger touches when the left mousebutton has been pressed
* @param touchType
* @returns {Function}
*/
function onMouse(touchType) {
return function (ev) {
// prevent mouse events
preventMouseEvents(ev);
if (ev.which !== 1) {
return;
}
// The EventTarget on which the touch point started when it was first placed on the surface,
// even if the touch point has since moved outside the interactive area of that element.
// also, when the target doesnt exist anymore, we update it
if (ev.type == 'mousedown' || !eventTarget || (eventTarget && !eventTarget.dispatchEvent)) {
eventTarget = ev.target;
}
// shiftKey has been lost, so trigger a touchend
if (isMultiTouch && !ev.shiftKey) {
triggerTouch('touchend', ev);
isMultiTouch = false;
}
triggerTouch(touchType, ev);
// we're entering the multi-touch mode!
if (!isMultiTouch && ev.shiftKey) {
isMultiTouch = true;
multiTouchStartPos = {
pageX: ev.pageX,
pageY: ev.pageY,
clientX: ev.clientX,
clientY: ev.clientY,
screenX: ev.screenX,
screenY: ev.screenY
};
triggerTouch('touchstart', ev);
}
// reset
if (ev.type == 'mouseup') {
multiTouchStartPos = null;
isMultiTouch = false;
eventTarget = null;
}
}
}
/**
* trigger a touch event
* @param eventName
* @param mouseEv
*/
function triggerTouch(eventName, mouseEv) {
var touchEvent = document.createEvent('Event');
touchEvent.initEvent(eventName, true, true);
touchEvent.altKey = mouseEv.altKey;
touchEvent.ctrlKey = mouseEv.ctrlKey;
touchEvent.metaKey = mouseEv.metaKey;
touchEvent.shiftKey = mouseEv.shiftKey;
touchEvent.touches = getActiveTouches(mouseEv, eventName);
touchEvent.targetTouches = getActiveTouches(mouseEv, eventName);
touchEvent.changedTouches = getChangedTouches(mouseEv, eventName);
eventTarget.dispatchEvent(touchEvent);
}
/**
* create a touchList based on the mouse event
* @param mouseEv
* @returns {TouchList}
*/
function createTouchList(mouseEv) {
var touchList = new TouchList();
if (isMultiTouch) {
var f = TouchEmulator.multiTouchOffset;
var deltaX = multiTouchStartPos.pageX - mouseEv.pageX;
var deltaY = multiTouchStartPos.pageY - mouseEv.pageY;
touchList.push(new Touch(eventTarget, 1, multiTouchStartPos, (deltaX * -1) - f, (deltaY * -1) + f));
touchList.push(new Touch(eventTarget, 2, multiTouchStartPos, deltaX + f, deltaY - f));
} else {
touchList.push(new Touch(eventTarget, 1, mouseEv, 0, 0));
}
return touchList;
}
/**
* receive all active touches
* @param mouseEv
* @returns {TouchList}
*/
function getActiveTouches(mouseEv, eventName) {
// empty list
if (mouseEv.type == 'mouseup') {
return new TouchList();
}
var touchList = createTouchList(mouseEv);
if (isMultiTouch && mouseEv.type != 'mouseup' && eventName == 'touchend') {
touchList.splice(1, 1);
}
return touchList;
}
/**
* receive a filtered set of touches with only the changed pointers
* @param mouseEv
* @param eventName
* @returns {TouchList}
*/
function getChangedTouches(mouseEv, eventName) {
var touchList = createTouchList(mouseEv);
// we only want to return the added/removed item on multitouch
// which is the second pointer, so remove the first pointer from the touchList
//
// but when the mouseEv.type is mouseup, we want to send all touches because then
// no new input will be possible
if (isMultiTouch && mouseEv.type != 'mouseup' &&
(eventName == 'touchstart' || eventName == 'touchend')) {
touchList.splice(0, 1);
}
return touchList;
}
/**
* show the touchpoints on the screen
*/
function showTouches(ev) {
var touch, i, el, styles;
// first all visible touches
for (i = 0; i < ev.touches.length; i++) {
touch = ev.touches[i];
el = touchElements[touch.identifier];
if (!el) {
el = touchElements[touch.identifier] = document.createElement("div");
document.body.appendChild(el);
}
styles = TouchEmulator.template(touch);
for (var prop in styles) {
el.style[prop] = styles[prop];
}
}
// remove all ended touches
if (ev.type == 'touchend' || ev.type == 'touchcancel') {
for (i = 0; i < ev.changedTouches.length; i++) {
touch = ev.changedTouches[i];
el = touchElements[touch.identifier];
if (el) {
el.parentNode.removeChild(el);
delete touchElements[touch.identifier];
}
}
}
}
/**
* TouchEmulator initializer
*/
function TouchEmulator() {
if (hasTouchSupport()) {
return;
}
fakeTouchSupport();
window.addEventListener("mousedown", onMouse('touchstart'), true);
window.addEventListener("mousemove", onMouse('touchmove'), true);
window.addEventListener("mouseup", onMouse('touchend'), true);
window.addEventListener("mouseenter", preventMouseEvents, true);
window.addEventListener("mouseleave", preventMouseEvents, true);
window.addEventListener("mouseout", preventMouseEvents, true);
window.addEventListener("mouseover", preventMouseEvents, true);
// it uses itself!
window.addEventListener("touchstart", showTouches, true);
window.addEventListener("touchmove", showTouches, true);
window.addEventListener("touchend", showTouches, true);
window.addEventListener("touchcancel", showTouches, true);
}
// start distance when entering the multitouch mode
TouchEmulator.multiTouchOffset = 75;
/**
* css template for the touch rendering
* @param touch
* @returns object
*/
TouchEmulator.template = function (touch) {
var size = 0;
var transform = 'translate(' + (touch.clientX - (size / 2)) + 'px, ' + (touch.clientY - (size / 2)) + 'px)';
return {
position: 'fixed',
left: 0,
top: 0,
background: '#fff',
border: 'solid 1px #999',
opacity: .6,
borderRadius: '100%',
height: size + 'px',
width: size + 'px',
padding: 0,
margin: 0,
display: 'block',
overflow: 'hidden',
pointerEvents: 'none',
webkitUserSelect: 'none',
mozUserSelect: 'none',
userSelect: 'none',
webkitTransform: transform,
mozTransform: transform,
transform: transform,
zIndex: 100
}
};
// export
if (typeof define == "function" && define.amd) {
define(function () {
return TouchEmulator;
});
} else if (typeof module != "undefined" && module.exports) {
module.exports = TouchEmulator;
} else {
window[exportName] = TouchEmulator;
}
})(window, document, "TouchEmulator");

BIN
static/image/46502.png View File

Before After
Width: 29  |  Height: 31  |  Size: 547 B Width: 29  |  Height: 31  |  Size: 459 B

BIN
static/image/46518.png View File

Before After
Width: 32  |  Height: 26  |  Size: 322 B Width: 32  |  Height: 26  |  Size: 276 B

BIN
static/image/46524.png View File

Before After
Width: 54  |  Height: 54  |  Size: 762 B Width: 54  |  Height: 54  |  Size: 657 B

BIN
static/image/46525.png View File

Before After
Width: 54  |  Height: 54  |  Size: 876 B Width: 54  |  Height: 54  |  Size: 782 B

BIN
static/image/46662.png View File

Before After
Width: 39  |  Height: 32  |  Size: 594 B Width: 39  |  Height: 32  |  Size: 518 B

BIN
static/image/47761.png View File

Before After
Width: 176  |  Height: 176  |  Size: 9.0 KiB Width: 176  |  Height: 176  |  Size: 3.2 KiB

BIN
static/image/4777.png View File

Before After
Width: 710  |  Height: 320  |  Size: 244 KiB

BIN
static/image/47822.png View File

Before After
Width: 24  |  Height: 24  |  Size: 373 B Width: 24  |  Height: 24  |  Size: 350 B

BIN
static/image/47961.png View File

Before After
Width: 29  |  Height: 38  |  Size: 615 B Width: 29  |  Height: 38  |  Size: 549 B

BIN
static/image/59.png View File

Before After
Width: 710  |  Height: 216  |  Size: 43 KiB Width: 355  |  Height: 108  |  Size: 14 KiB

BIN
static/image/6584.png View File

Before After
Width: 712  |  Height: 316  |  Size: 29 KiB Width: 712  |  Height: 316  |  Size: 25 KiB

BIN
static/image/6588.png View File

Before After
Width: 78  |  Height: 78  |  Size: 1.1 KiB Width: 78  |  Height: 78  |  Size: 963 B

BIN
static/image/7822.png View File

Before After
Width: 32  |  Height: 25  |  Size: 374 B Width: 32  |  Height: 25  |  Size: 315 B

BIN
static/image/aed60x.png View File

Before After
Width: 84  |  Height: 84  |  Size: 5.8 KiB Width: 84  |  Height: 84  |  Size: 2.2 KiB

BIN
static/image/banner.png View File

Before After
Width: 710  |  Height: 320  |  Size: 57 KiB

BIN
static/image/header.png View File

Before After
Width: 96  |  Height: 96  |  Size: 817 B Width: 96  |  Height: 96  |  Size: 746 B

BIN
static/image/home.png View File

Before After
Width: 47  |  Height: 43  |  Size: 1.4 KiB Width: 47  |  Height: 43  |  Size: 1.1 KiB

BIN
static/image/home_selected.png View File

Before After
Width: 47  |  Height: 43  |  Size: 1.5 KiB Width: 47  |  Height: 43  |  Size: 1.2 KiB

BIN
static/image/logo.png View File

Before After
Width: 148  |  Height: 148  |  Size: 609 B Width: 148  |  Height: 148  |  Size: 578 B

BIN
static/image/nav1.png View File

Before After
Width: 80  |  Height: 80  |  Size: 3.5 KiB Width: 80  |  Height: 80  |  Size: 1.4 KiB

BIN
static/image/nav2.png View File

Before After
Width: 80  |  Height: 80  |  Size: 3.1 KiB Width: 80  |  Height: 80  |  Size: 1.1 KiB

BIN
static/image/nav3.png View File

Before After
Width: 80  |  Height: 80  |  Size: 3.2 KiB Width: 80  |  Height: 80  |  Size: 1.2 KiB

BIN
static/image/nav4.png View File

Before After
Width: 80  |  Height: 80  |  Size: 3.1 KiB Width: 80  |  Height: 80  |  Size: 1.2 KiB

BIN
static/image/nav5.png View File

Before After
Width: 80  |  Height: 80  |  Size: 2.9 KiB Width: 80  |  Height: 80  |  Size: 1.1 KiB

BIN
static/image/nav6.png View File

Before After
Width: 80  |  Height: 80  |  Size: 2.8 KiB Width: 80  |  Height: 80  |  Size: 1.1 KiB

BIN
static/image/nav7.png View File

Before After
Width: 80  |  Height: 80  |  Size: 3.6 KiB Width: 80  |  Height: 80  |  Size: 1.3 KiB

BIN
static/image/nav8.png View File

Before After
Width: 80  |  Height: 80  |  Size: 3.3 KiB Width: 80  |  Height: 80  |  Size: 1.2 KiB

BIN
static/image/order.png View File

Before After
Width: 40  |  Height: 40  |  Size: 372 B Width: 40  |  Height: 40  |  Size: 348 B

BIN
static/image/order_selected.png View File

Before After
Width: 40  |  Height: 40  |  Size: 399 B Width: 40  |  Height: 40  |  Size: 355 B

BIN
static/image/pencil.png View File

Before After
Width: 21  |  Height: 23  |  Size: 363 B Width: 21  |  Height: 23  |  Size: 325 B

BIN
static/image/piao.png View File

Before After
Width: 164  |  Height: 164  |  Size: 4.4 KiB Width: 164  |  Height: 164  |  Size: 3.9 KiB

BIN
static/image/release_btn.png View File

Before After
Width: 74  |  Height: 74  |  Size: 3.0 KiB Width: 74  |  Height: 74  |  Size: 2.2 KiB

BIN
static/image/setting.png View File

Before After
Width: 40  |  Height: 39  |  Size: 1.1 KiB Width: 40  |  Height: 39  |  Size: 941 B

BIN
static/image/success.png View File

Before After
Width: 302  |  Height: 302  |  Size: 10 KiB Width: 302  |  Height: 302  |  Size: 8.7 KiB

BIN
static/image/user.png View File

Before After
Width: 40  |  Height: 40  |  Size: 444 B Width: 40  |  Height: 40  |  Size: 401 B

BIN
static/image/user_selected.png View File

Before After
Width: 40  |  Height: 40  |  Size: 461 B Width: 40  |  Height: 40  |  Size: 407 B

BIN
static/image/wall.png View File

Before After
Width: 164  |  Height: 160  |  Size: 6.4 KiB Width: 164  |  Height: 160  |  Size: 5.6 KiB

BIN
static/image/wechat.png View File

Before After
Width: 44  |  Height: 35  |  Size: 1.3 KiB Width: 44  |  Height: 35  |  Size: 744 B

BIN
static/uview/common/favicon.ico View File

Before After

BIN
static/uview/common/gray-logo.png View File

Before After
Width: 308  |  Height: 60  |  Size: 10 KiB

BIN
static/uview/common/logo.png View File

Before After
Width: 120  |  Height: 120  |  Size: 15 KiB

BIN
static/uview/example/component.png View File

Before After
Width: 64  |  Height: 64  |  Size: 1.0 KiB

BIN
static/uview/example/component_select.png View File

Before After
Width: 64  |  Height: 64  |  Size: 1005 B

BIN
static/uview/example/js.png View File

Before After
Width: 64  |  Height: 64  |  Size: 1.9 KiB

BIN
static/uview/example/js_bak.png View File

Before After
Width: 64  |  Height: 64  |  Size: 3.1 KiB

BIN
static/uview/example/js_select.png View File

Before After
Width: 64  |  Height: 64  |  Size: 2.0 KiB

BIN
static/uview/example/template.png View File

Before After
Width: 64  |  Height: 64  |  Size: 1.1 KiB

BIN
static/uview/example/template_select.png View File

Before After
Width: 64  |  Height: 64  |  Size: 1.1 KiB

+ 1
- 0
util/qqmap-wx-jssdk.min.js
File diff suppressed because it is too large
View File


+ 5
- 19
util/request/requestInterceptors.js View File

@ -3,26 +3,12 @@
* @param {Object} http
*/
module.exports = (vm) => {
// uni.$u.http.interceptors.request.use((config) => { // 可使用async await 做异步操作
// // 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{}
// config.data = config.data || {}
// // 可以在此通过vm引用vuex中的变量,具体值在vm.$store.state中
// // console.log(vm.$store.state);
// return config
// }, (config) => // 可使用async await 做异步操作
// Promise.reject(config))
// 请求拦截
uni.$u.http.interceptors.request.use((config) => { // 可使用async await 做异步操作
// 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{}
uni.$u.http.interceptors.request.use((config) => {
config.data = config.data || {}
// 根据custom参数中配置的是否需要token,添加对应的请求头
if(config?.custom?.auth) {
// 可以在此通过vm引用vuex中的变量,具体值在vm.$store.state中
config.header.token = vm.$store.state.user.token
}
return config
}, config => { // 可使用async await 做异步操作
config.header['X-Access-Token'] = uni.getStorageSync('token');
config.header['Content-Type'] = 'application/json'
return config
}, config => {
return Promise.reject(config)
})
}


+ 42
- 18
util/request/responseInterceptors.js View File

@ -6,26 +6,50 @@ module.exports = (vm) => {
// 响应拦截
uni.$u.http.interceptors.response.use((response) => { /* 对响应成功做点什么 可使用async await 做异步操作*/
const data = response.data
// 自定义参数
const custom = response.config?.custom
if (data.code !== 200) {
// 如果没有显式定义custom的toast参数为false的话,默认对报错进行toast弹出提示
if (custom.toast !== false) {
uni.$u.toast(data.message)
}
// 如果需要catch返回,则进行reject
if (custom?.catch) {
return Promise.reject(data)
} else {
// 否则返回一个pending中的promise,请求不会进入catch中
return new Promise(() => { })
}
console.info('interceptorsresponse',data)
if (data.code == 200) {
return Promise.resolve(data);
}else if(data.code === 401){
uni.showToast({
icon:"none",
title:data.message
})
uni.removeStorageSync('token')
uni.removeStorageSync('userInfo')
uni.navigateTo({
url:"/pages/auth/index"
})
return;
}else if(data.code === 500 && (data.message == '操作失败,token非法无效!' || data.message == '操作失败,用户不存在!')){
uni.$u.toast(data.message)
uni.showToast({
icon:"none",
title:data.message
})
uni.removeStorageSync('token')
uni.removeStorageSync('userInfo')
uni.navigateTo({
url:"/pages/auth/index"
})
return;
}else{
uni.showToast({
icon:"none",
title:data.message
})
return Promise.reject(data)
}
return data.data === undefined ? {} : data.data
}, (response) => {
// 对响应错误做点什么 (statusCode !== 200)
const data = response.data
console.info('responseresponse',data)
if(data.code === 401){
uni.removeStorageSync('token')
uni.removeStorageSync('userInfo')
uni.navigateTo({
url:"/pages/auth/index"
})
return;
}
return Promise.reject(response)
})
}

Loading…
Cancel
Save