zhangwei
2024-09-05 0c9b00f333f9baaffa9140fd1808a26e0af8416b
src/pages/detail/detail.vue
@@ -11,12 +11,12 @@
            结算提现
         </view>
         <view class="chuany-flex chuany-justify-between">
            <view class="">
               <view class="chuany-flex chuany-justify-between chuany-align-center">
                  <view class="c-p-18 chuany-font34">
            <view class="chuany-width100">
               <view class="chuany-flex chuany-justify-between chuany-align-center chuany-width100 chuany-box c-p-18">
                  <view class=" chuany-font34">
                     {{orderObj.orderName}}
                  </view>
                  <view class="c-p-l-108">
                  <view>
                     {{orderObj.workerType==0?'计时':'计件'}}
                  </view>
               </view>
@@ -42,13 +42,18 @@
      <view class="coreshop-bg-white c-m-t-18 c-p-18">
         <view class="chuany-flex c-p-20">
            <view class="chuany-width26">
               <text class="colorgray ">任务日期</text>
            </view>
            <view class="chuany-flex chuany-flex-direction">
               <text>{{$util.formatDate(orderObj.wordStartTime)}} 至 {{$util.formatDate(orderObj.wordEndTime)}}</text>
            </view>
         </view>
         <view class="chuany-flex c-p-l-20 c-p-r-20 c-p-b-20">
            <view class="chuany-width26">
               <text class="colorgray ">任务时间</text>
            </view>
            <view class="chuany-flex chuany-flex-direction">
               <text class=''>
                  {{$util.formatDate(orderObj.wordEndTime,true)}}
               </text>
               <text>{{$util.formatDate(orderObj.wordStartTime,true)}}</text>
               <text>{{orderObj.startTimeName}} 至 {{orderObj.endTimeName}}</text>
            </view>
         </view>
         <view class="chuany-flex  c-p-l-18">
@@ -92,7 +97,7 @@
         </view>
      </view>
      <view class="tabbtns">
         <up-button color='#fece01' class="text-69" text="报名" @click="enroll"></up-button>
         <up-button color='#fece01' :loading='isLoading' loadingText="报名中" class="text-69" text="报名" @click="enroll"></up-button>
      </view>
   </view>
</template>
@@ -107,8 +112,9 @@
      },
      data() {
         return {
            orderObj: null,
            tags: ['4小时', '可无经验', '手脚麻利', '计时']
            orderObj: {},
            tags: ['4小时', '可无经验', '手脚麻利', '计时'],
            isLoading:false
         }
      },
      methods: {
@@ -120,19 +126,22 @@
            })
         },
         enroll() {
            this.isLoading = true
            this.$api.saveBaoMing({
               orderId: this.orderObj.id
            }).then(res => {
               if(res.code==1){
               if (res.code == 1) {
                  this.$util.showToast({
                     title: "报名成功!",
                     icon: "success"
                  })
               }else{
                  uni.navigateBack()
               } else {
                  this.$util.showToast({
                     title: res.error
                  })
               }
               this.isLoading = false
            })
         }
      }
@@ -184,7 +193,5 @@
      height: 50rpx;
   }
   .borderbox {
      border-top: 1px solid #f2f2f4;
   }
</style>