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

248 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. <view class="phone"
  62. @click.stop="callPhone">
  63. <image src="/static/image/home/phone.png" mode=""></image>
  64. 联系他
  65. </view>
  66. </view>
  67. </view>
  68. </template>
  69. <script>
  70. export default {
  71. props : {
  72. item : {
  73. default : {}
  74. },
  75. createTime : {
  76. default : '',
  77. },
  78. image : {
  79. default : ''
  80. },
  81. sex : {
  82. default : ''
  83. },
  84. },
  85. data() {
  86. return {
  87. }
  88. },
  89. computed : {
  90. headImage(){
  91. return this.image || (this.item && this.item.headImage) || '/static/image/center/headImage.png'
  92. },
  93. phone(){
  94. return this.item && this.item.hanHaiMember && this.item.hanHaiMember.phone
  95. },
  96. // 检查数据是否有效
  97. isDataValid(){
  98. return this.item && this.item.id
  99. }
  100. },
  101. methods: {
  102. callPhone(){
  103. // 检查数据是否有效和电话号码是否存在
  104. if (!this.isDataValid || !this.phone) {
  105. uni.showToast({
  106. title: '联系方式不可用',
  107. icon: 'none'
  108. });
  109. return;
  110. }
  111. this.$store.commit('checkViewCount', {
  112. data : this.item,
  113. phone : this.phone,
  114. type : 'phone',
  115. })
  116. // uni.makePhoneCall({
  117. // phoneNumber: this.phone,
  118. // success() {
  119. // console.log('安卓拨打成功');
  120. // },
  121. // fail() {
  122. // console.log('安卓拨打失败');
  123. // }
  124. // })
  125. },
  126. }
  127. }
  128. </script>
  129. <style scoped lang="scss">
  130. .boss-item{
  131. background-color: #fff;
  132. border-radius: 20rpx;
  133. &.deleted-item {
  134. background-color: #f5f5f5;
  135. border: 2rpx dashed #ccc;
  136. padding: 40rpx 20rpx;
  137. .deleted-content {
  138. display: flex;
  139. align-items: center;
  140. justify-content: center;
  141. flex-direction: column;
  142. text-align: center;
  143. .deleted-icon {
  144. font-size: 60rpx;
  145. margin-bottom: 20rpx;
  146. }
  147. .deleted-text {
  148. .deleted-title {
  149. font-size: 32rpx;
  150. color: #666;
  151. font-weight: bold;
  152. margin-bottom: 10rpx;
  153. }
  154. .deleted-desc {
  155. font-size: 24rpx;
  156. color: #999;
  157. }
  158. }
  159. }
  160. }
  161. .head {
  162. display: flex;
  163. align-items: center;
  164. position: relative;
  165. padding: 20rpx;
  166. image {
  167. width: 100%;
  168. height: 100%;
  169. }
  170. .headImage {
  171. width: 80rpx;
  172. height: 80rpx;
  173. background-size: 100% 100%;
  174. overflow: hidden;
  175. border-radius: 50%;
  176. margin-right: 40rpx;
  177. }
  178. .info {
  179. font-size: 28rpx;
  180. .name {
  181. font-size: 32rpx;
  182. display: flex;
  183. padding-bottom: 10rpx;
  184. view {
  185. display: flex;
  186. font-size: 24rpx;
  187. align-items: center;
  188. margin-left: 20rpx;
  189. background: rgba($uni-color, 0.2);
  190. color: $uni-color;
  191. padding: 10rpx;
  192. border-radius: 10rpx;
  193. }
  194. }
  195. .tips {
  196. font-size: 24rpx;
  197. }
  198. }
  199. .right{
  200. margin-left: auto;
  201. font-size: 24rpx;
  202. .price{
  203. color: $uni-color;
  204. }
  205. }
  206. }
  207. .bottom{
  208. display: flex;
  209. justify-content: space-between;
  210. align-items: flex-end;
  211. font-size: 24rpx;
  212. padding: 20rpx;
  213. padding-top: 0;
  214. .time{
  215. color: #999999;
  216. }
  217. .phone{
  218. background-color: rgba($uni-color, 0.2);
  219. color: $uni-color;
  220. padding: 8rpx 16rpx;
  221. border-radius: 10rpx;
  222. image{
  223. width: 20rpx;
  224. height: 20rpx;
  225. }
  226. }
  227. }
  228. }
  229. </style>