用工小程序前端代码
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.

88 lines
2.1 KiB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
  1. <template>
  2. <view class="u-page">
  3. <view class="se-flex se-flex-v-sa se-pt-140">
  4. <image class="se-w-300 se-h-300" src="@/static/image/success.png" mode=""></image>
  5. <view class="se-c-black se-fw-6 se-fs-44 se-ta-c se-mt-20">
  6. 恭喜你聘用成功
  7. </view>
  8. <view class="se-fs-26 se-ta-c se-mt-20">
  9. 等待师傅确认
  10. </view>
  11. </view>
  12. <view class="se-px-40 se-mt-140">
  13. <view class="se-px-20 se-pb-80 se-fs-20 se-flex">
  14. <view @click="onOrderDetail()"
  15. 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">
  16. <text>查看订单详情</text>
  17. </view>
  18. <view @click="onCancel()"
  19. class="se-mx-10 se-flex-1 se-b se-br-40 se-flex-h-c se-h-80 se-lh-80 se-ta-c se-fs-28 se-c-66 se-bgc-f5">
  20. <text>取消订单</text>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import { deleteOrder } from "@/common/api.js"
  28. export default{
  29. data(){
  30. return{
  31. id:null
  32. }
  33. },
  34. onLoad(options) {
  35. console.info("求职者订单详情:"+options.id)
  36. this.id = options.id
  37. },
  38. methods:{
  39. onOrderDetail(){
  40. let that = this;
  41. uni.navigateTo({
  42. url:"/pages_subpack/job-order-detail/index?orderId="+that.id
  43. })
  44. },
  45. onCancel(){
  46. uni.showModal({
  47. title: '确认取消',
  48. content: '确定要取消这个订单吗?',
  49. success: (res) => {
  50. if (res.confirm) {
  51. uni.showLoading({
  52. title: '取消中...'
  53. })
  54. deleteOrder(this.id).then(res => {
  55. uni.hideLoading()
  56. if (res.code == 200) {
  57. uni.showToast({
  58. title: '取消成功',
  59. icon: 'success'
  60. })
  61. // 返回上一页
  62. uni.navigateBack({
  63. delta: 1
  64. })
  65. } else {
  66. uni.showToast({
  67. title: res.message || '取消失败',
  68. icon: 'none'
  69. })
  70. }
  71. }).catch(error => {
  72. uni.hideLoading()
  73. uni.showToast({
  74. title: '取消失败',
  75. icon: 'none'
  76. })
  77. })
  78. }
  79. }
  80. })
  81. }
  82. }
  83. }
  84. </script>
  85. <style lang="scss" scoped>
  86. </style>