特易招,招聘小程序
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.

250 lines
4.9 KiB

11 months ago
7 months ago
11 months ago
11 months ago
10 months ago
10 months ago
10 months ago
11 months ago
10 months ago
8 months ago
11 months ago
10 months ago
8 months ago
10 months ago
11 months ago
10 months ago
8 months ago
11 months ago
8 months ago
11 months ago
10 months ago
8 months ago
10 months ago
11 months ago
10 months ago
8 months ago
8 months ago
8 months ago
10 months ago
11 months ago
8 months ago
8 months ago
11 months ago
11 months ago
  1. <template>
  2. <!-- 数据不存在时的友好提示 -->
  3. <view v-if="!item || !item.id" class="boss-item deleted-item">
  4. <view class="deleted-content">
  5. <view class="deleted-icon"></view>
  6. <view class="deleted-text">
  7. <view class="deleted-title">数据已被删除</view>
  8. <view class="deleted-desc">该用户信息可能已被删除或不存在</view>
  9. </view>
  10. </view>
  11. </view>
  12. <!-- 正常数据显示 -->
  13. <view v-else class="boss-item"
  14. @click="$emit('click')">
  15. <view class="head">
  16. <view class="headImage">
  17. <image :src="item.hanHaiMember && item.hanHaiMember.headImage" mode=""></image>
  18. </view>
  19. <view class="info">
  20. <view class="name">
  21. <!-- 李老板 -->
  22. {{ item.employAuthenticationPerson && item.employAuthenticationPerson.name }}
  23. <view v-if="item.typeId_dictText">
  24. <!-- 装配电工 -->
  25. {{ item.typeId_dictText }}
  26. </view>
  27. <view v-if="item.natureId_dictText">
  28. <!-- 装配电工 -->
  29. {{ item.natureId_dictText }}
  30. </view>
  31. </view>
  32. <view class="tips">
  33. <!-- · 汉族 · 本科 · 应届生 -->
  34. {{ sex || item.sex }} · {{ item.nation }} · {{ item.qualification }}
  35. </view>
  36. </view>
  37. <view class="right">
  38. <view class="price"
  39. v-if="item.salaryLow >= 1000">
  40. <text>
  41. {{ (item.salaryLow / 1000).toFixed(0) }}
  42. </text>
  43. <text
  44. v-if="item.salaryUp">
  45. -{{ (item.salaryUp / 1000).toFixed(0) }}
  46. </text>
  47. K
  48. </view>
  49. <view class="price" v-else>
  50. <text>{{ item.salaryLow }}</text>
  51. <text
  52. v-if="item.salaryUp">-{{ item.salaryUp }}</text>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="bottom">
  57. <view class="time">
  58. <!-- 09月23日 1620 -->
  59. {{ $dayjs(createTime || item.createTime).format('YYYY-MM-DD') }}
  60. </view>
  61. <!-- @click.stop="callPhone" -->
  62. <view class="phone"
  63. >
  64. <image src="/static/image/home/phone.png" mode=""></image>
  65. 联系他
  66. </view>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. export default {
  72. props : {
  73. item : {
  74. default : {}
  75. },
  76. createTime : {
  77. default : '',
  78. },
  79. image : {
  80. default : ''
  81. },
  82. sex : {
  83. default : ''
  84. },
  85. },
  86. data() {
  87. return {
  88. }
  89. },
  90. computed : {
  91. headImage(){
  92. return this.image || (this.item && this.item.headImage) || '/static/image/center/headImage.png'
  93. },
  94. phone(){
  95. return this.item && this.item.hanHaiMember && this.item.hanHaiMember.phone
  96. },
  97. // 检查数据是否有效
  98. isDataValid(){
  99. return this.item && this.item.id
  100. }
  101. },
  102. methods: {
  103. callPhone(){
  104. // 检查数据是否有效和电话号码是否存在
  105. if (!this.isDataValid || !this.phone) {
  106. uni.showToast({
  107. title: '联系方式不可用',
  108. icon: 'none'
  109. });
  110. return;
  111. }
  112. this.$store.commit('checkViewCount', {
  113. data : this.item,
  114. phone : this.phone,
  115. type : 'phone',
  116. })
  117. // uni.makePhoneCall({
  118. // phoneNumber: this.phone,
  119. // success() {
  120. // console.log('安卓拨打成功');
  121. // },
  122. // fail() {
  123. // console.log('安卓拨打失败');
  124. // }
  125. // })
  126. },
  127. }
  128. }
  129. </script>
  130. <style scoped lang="scss">
  131. .boss-item{
  132. background-color: #fff;
  133. border-radius: 20rpx;
  134. &.deleted-item {
  135. background-color: #f5f5f5;
  136. border: 2rpx dashed #ccc;
  137. padding: 40rpx 20rpx;
  138. .deleted-content {
  139. display: flex;
  140. align-items: center;
  141. justify-content: center;
  142. flex-direction: column;
  143. text-align: center;
  144. .deleted-icon {
  145. font-size: 60rpx;
  146. margin-bottom: 20rpx;
  147. }
  148. .deleted-text {
  149. .deleted-title {
  150. font-size: 32rpx;
  151. color: #666;
  152. font-weight: bold;
  153. margin-bottom: 10rpx;
  154. }
  155. .deleted-desc {
  156. font-size: 24rpx;
  157. color: #999;
  158. }
  159. }
  160. }
  161. }
  162. .head {
  163. display: flex;
  164. align-items: center;
  165. position: relative;
  166. padding: 20rpx;
  167. image {
  168. width: 100%;
  169. height: 100%;
  170. }
  171. .headImage {
  172. width: 80rpx;
  173. height: 80rpx;
  174. background-size: 100% 100%;
  175. overflow: hidden;
  176. border-radius: 50%;
  177. margin-right: 40rpx;
  178. }
  179. .info {
  180. font-size: 28rpx;
  181. .name {
  182. font-size: 32rpx;
  183. display: flex;
  184. padding-bottom: 10rpx;
  185. view {
  186. display: flex;
  187. font-size: 24rpx;
  188. align-items: center;
  189. margin-left: 20rpx;
  190. background: rgba($uni-color, 0.2);
  191. color: $uni-color;
  192. padding: 10rpx;
  193. border-radius: 10rpx;
  194. }
  195. }
  196. .tips {
  197. font-size: 24rpx;
  198. }
  199. }
  200. .right{
  201. margin-left: auto;
  202. font-size: 24rpx;
  203. .price{
  204. color: $uni-color;
  205. }
  206. }
  207. }
  208. .bottom{
  209. display: flex;
  210. justify-content: space-between;
  211. align-items: flex-end;
  212. font-size: 24rpx;
  213. padding: 20rpx;
  214. padding-top: 0;
  215. .time{
  216. color: #999999;
  217. }
  218. .phone{
  219. background-color: rgba($uni-color, 0.2);
  220. color: $uni-color;
  221. padding: 8rpx 16rpx;
  222. border-radius: 10rpx;
  223. image{
  224. width: 20rpx;
  225. height: 20rpx;
  226. }
  227. }
  228. }
  229. }
  230. </style>