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

241 lines
4.7 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. uni.makePhoneCall({
  112. phoneNumber: this.phone,
  113. success() {
  114. console.log('安卓拨打成功');
  115. },
  116. fail() {
  117. console.log('安卓拨打失败');
  118. }
  119. })
  120. },
  121. }
  122. }
  123. </script>
  124. <style scoped lang="scss">
  125. .boss-item{
  126. background-color: #fff;
  127. border-radius: 20rpx;
  128. &.deleted-item {
  129. background-color: #f5f5f5;
  130. border: 2rpx dashed #ccc;
  131. padding: 40rpx 20rpx;
  132. .deleted-content {
  133. display: flex;
  134. align-items: center;
  135. justify-content: center;
  136. flex-direction: column;
  137. text-align: center;
  138. .deleted-icon {
  139. font-size: 60rpx;
  140. margin-bottom: 20rpx;
  141. }
  142. .deleted-text {
  143. .deleted-title {
  144. font-size: 32rpx;
  145. color: #666;
  146. font-weight: bold;
  147. margin-bottom: 10rpx;
  148. }
  149. .deleted-desc {
  150. font-size: 24rpx;
  151. color: #999;
  152. }
  153. }
  154. }
  155. }
  156. .head {
  157. display: flex;
  158. align-items: center;
  159. position: relative;
  160. padding: 20rpx;
  161. image {
  162. width: 100%;
  163. height: 100%;
  164. }
  165. .headImage {
  166. width: 80rpx;
  167. height: 80rpx;
  168. background-size: 100% 100%;
  169. overflow: hidden;
  170. border-radius: 50%;
  171. margin-right: 40rpx;
  172. }
  173. .info {
  174. font-size: 28rpx;
  175. .name {
  176. font-size: 32rpx;
  177. display: flex;
  178. padding-bottom: 10rpx;
  179. view {
  180. display: flex;
  181. font-size: 24rpx;
  182. align-items: center;
  183. margin-left: 20rpx;
  184. background: rgba($uni-color, 0.2);
  185. color: $uni-color;
  186. padding: 10rpx;
  187. border-radius: 10rpx;
  188. }
  189. }
  190. .tips {
  191. font-size: 24rpx;
  192. }
  193. }
  194. .right{
  195. margin-left: auto;
  196. font-size: 24rpx;
  197. .price{
  198. color: $uni-color;
  199. }
  200. }
  201. }
  202. .bottom{
  203. display: flex;
  204. justify-content: space-between;
  205. align-items: flex-end;
  206. font-size: 24rpx;
  207. padding: 20rpx;
  208. padding-top: 0;
  209. .time{
  210. color: #999999;
  211. }
  212. .phone{
  213. background-color: rgba($uni-color, 0.2);
  214. color: $uni-color;
  215. padding: 8rpx 16rpx;
  216. border-radius: 10rpx;
  217. image{
  218. width: 20rpx;
  219. height: 20rpx;
  220. }
  221. }
  222. }
  223. }
  224. </style>