speechConfirm.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <s-layout
  3. title="任务执行"
  4. navbar="inner"
  5. :bgStyle="state.page"
  6. :navbarStyle="state.navigationBar"
  7. showBackButton
  8. >
  9. <view class="test_tips">
  10. “是否满意本次对话内容?”
  11. </view>
  12. <view class="group_btn">
  13. <view class="submit_btn" @tap="submitForm">满意,开始执行任务</view>
  14. <view class="err_btn" @tap="toSelectReason">不满意</view>
  15. </view>
  16. </s-layout>
  17. </template>
  18. <script setup>
  19. import { reactive, computed } from 'vue'
  20. import { onLoad } from '@dcloudio/uni-app'
  21. import taskApi from '@/common/api/member/task'
  22. import sheep from '@/common'
  23. const state = reactive({
  24. navigationBar: {},
  25. page: {
  26. backgroundColor: '#FFFFFF',
  27. backgroundImage: '/static/homeTopBg.png'
  28. },
  29. })
  30. const taskFormInfo = computed(() => sheep.$store('task').taskFormInfo)
  31. onLoad((options) => {
  32. })
  33. async function submitForm(){
  34. const { code, data } = await taskApi.addTask({
  35. ...taskFormInfo.value,
  36. planTime: taskFormInfo.value.planTime+':00'
  37. })
  38. if (code === 1) {
  39. sheep.$store('task').resetTaskData()
  40. sheep.$router.go('/pages/index/index')
  41. }
  42. }
  43. function toSelectReason(){
  44. sheep.$router.go('/pages/task/selectReason')
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. .test_tips{
  49. font-weight: 400;
  50. font-size: 32rpx;
  51. color: #222222;
  52. line-height: 80rpx;
  53. text-align: center;
  54. padding-top: 344rpx;
  55. }
  56. .group_btn{
  57. position: fixed;
  58. left: calc(50%);
  59. transform: translateX(-50%);
  60. bottom: 40rpx;
  61. }
  62. .submit_btn{
  63. width: 630rpx;
  64. height: 104rpx;
  65. line-height: 104rpx;
  66. background: #35E89A;
  67. border-radius: 40rpx;
  68. font-weight: bold;
  69. font-size: 32rpx;
  70. color: #222222;
  71. text-align: center;
  72. margin-bottom: 30rpx;
  73. }
  74. .err_btn{
  75. width: 630rpx;
  76. height: 104rpx;
  77. background: #FF4E4E;
  78. border-radius: 40rpx;
  79. font-weight: bold;
  80. font-size: 32rpx;
  81. color: #FFFFFF;
  82. text-align: center;
  83. line-height: 104rpx;
  84. }
  85. </style>