用工小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
3.9 KiB

6 months ago
4 months ago
6 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
6 months ago
4 months ago
6 months ago
3 months ago
6 months ago
4 months ago
6 months ago
6 months ago
4 months ago
3 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
  1. <template>
  2. <view class="se-p-40">
  3. <view class="se-fs-36 se-c-black se-fw-6 se-py-20">
  4. {{items.title}}
  5. </view>
  6. <view class="se-fs-26 se-c-orange se-fw-6 ">
  7. {{items.salaryMin}} - {{items.salaryMax}}
  8. </view>
  9. <view class="se-flex se-flex-v se-py-20">
  10. <view class="se-fs-24 se-c-text">
  11. <text>{{items.address}}</text>
  12. <!-- <text class="se-ml-20">不限</text> -->
  13. </view>
  14. <view class="se-fs-24 se-c-99 se-pt-20">
  15. 该职位位于{{items.createTime}}发布
  16. </view>
  17. </view>
  18. <view class="se-flex se-flex-h-sb se-py-40 se-b-b">
  19. <view class="se-flex">
  20. <view>
  21. <image class="se-a-80 se-br-p-50 se-bgc-f5" :src="items.image" mode=""></image>
  22. </view>
  23. <view class="se-ml-20 se-flex se-flex-v-sa se-flex-ai-fs">
  24. <text class="se-fw-6 se-c-black se-fs-30">{{items.workName}}</text>
  25. <text class="se-fs-24 se-c-text-third">{{items.companyName}}</text>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="se-py-40 se-b-b">
  30. <view class="se-fs-36 se-c-black">
  31. 工作地址
  32. </view>
  33. <view class="se-fs-24 se-c-66 se-pt-10 se-flex se-flex-h" @click="openAddress()">
  34. <text>{{items.address}}</text>
  35. <u-icon name="arrow-right"></u-icon>
  36. </view>
  37. </view>
  38. <view class="se-py-40 se-b-b">
  39. <view class="se-fs-36 se-c-black">
  40. 职位详情
  41. </view>
  42. <view class="se-pt-20">
  43. <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>
  44. <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>
  45. <!-- <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> -->
  46. <!-- <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> -->
  47. </view>
  48. </view>
  49. <view class="se-fs-24 se-pt-20 se-pb-20 se-lh-40">
  50. <text class="se-fs-24 se-c-text-third">岗位要求</text>
  51. <u-parse :content="items.details"></u-parse>
  52. </view>
  53. <view class="se-px-20 se-pt-20">
  54. <view class="se-px-20 se-pb-80 se-fs-20 se-flex">
  55. <view @click="onPayment"
  56. 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">
  57. <text>立即接单</text>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </template>
  63. <script>
  64. import {
  65. getTaskById,orderTask
  66. } from "@/common/api.js"
  67. export default{
  68. data(){
  69. return{
  70. id:"",
  71. items:{},
  72. }
  73. },
  74. onLoad(options) {
  75. console.info(options)
  76. this.id = options.id
  77. this.onTask()
  78. },
  79. methods:{
  80. onTask(){
  81. let that = this
  82. getTaskById({id:that.id}).then(response=>{
  83. console.info('getTaskById',response);
  84. that.items = response.result
  85. }).catch(error=>{
  86. })
  87. },
  88. onPayment(){
  89. orderTask({taskId:this.id}).then(response=>{
  90. uni.navigateTo({
  91. url:"/pages_subpack/payment/index?id="+response.result.orderId
  92. })
  93. }).catch(error=>{
  94. })
  95. },
  96. openAddress(){
  97. let that = this
  98. // wx.openLocation({
  99. // latitude: that.items.latitude.toFixed(2),
  100. // longitude: that.items.longitude.toFixed(2),
  101. // name: that.items.title,
  102. // address: that.items.address,
  103. // scale: 12,
  104. // success: function(res) {
  105. // console.log(JSON.stringify(res));
  106. // },
  107. // fail: function(res) {
  108. // console.log(`openLocation fail:${JSON.stringify(res)}`);
  109. // }
  110. // })
  111. uni.openLocation({
  112. latitude: 30.492121,
  113. longitude: 114.410324,
  114. name: "保利国际中心",
  115. address: "武汉市洪山区关山大道",
  116. scale: 12,
  117. success: function(res) {
  118. console.log(JSON.stringify(res));
  119. },
  120. fail: function(res) {
  121. console.log(`openLocation fail:${JSON.stringify(res)}`);
  122. }
  123. })
  124. }
  125. }
  126. }
  127. </script>
  128. <style>
  129. page{
  130. background-color: #ffffff;
  131. }
  132. </style>