index.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <oa-scroll
  3. customClass="scroll-height"
  4. :customStyle="{}"
  5. :refresherLoad="false"
  6. :refresherEnabled="false"
  7. :refresherDefaultStyle="'none'"
  8. :refresherThreshold="44"
  9. :refresherBackground="'#f5f6f7'"
  10. :data-theme="'theme-' + proxy.$settingStore.themeColor.name"
  11. >
  12. <view class="menu-list">
  13. <view class="list-cell">
  14. <view class="menu-item-box">
  15. <view style="font-size: 14px; font-weight: 600"> 为了更好提升我们的服务,请您对我们的服务人员进行评价、留下您宝贵的意见,我们将会不断完善我们的服务。 </view>
  16. </view>
  17. </view>
  18. </view>
  19. <view class="menu-list">
  20. <view class="list-cell">
  21. <view class="menu-item-box mb15">
  22. <view style="font-size: 14px; font-weight: 600"> 总体满意度 </view>
  23. </view>
  24. <view class="menu-item-box">
  25. <u-rate :count="rateCount" v-model="rateValue" :size="24" :gutter="0" :minCount="0" :touchable="true" :allowHalf="true" :activeColor="proxy.$settingStore.themeColor.color"></u-rate>
  26. <view style="font-size: 14px; margin: auto 0 auto auto">我的评分: {{ rateValue }}分</view>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="menu-list">
  31. <view class="list-cell">
  32. <view class="menu-item-box mb15">
  33. <view style="font-size: 14px; font-weight: 600"> 建议或意见 </view>
  34. </view>
  35. <view class="menu-item-box">
  36. <u--textarea v-model="textareaValue" border="none" placeholder="请留下您的宝贵意见,这对我们很重要哦~" maxlength="100" style="padding: 0"></u--textarea>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="app-button">
  41. <view class="app-button-padding"></view>
  42. <view class="app-button-fixed">
  43. <u-button class="app-buttom" type="primary" @click="handleSubmit('提交')" shape="circle"> 提交 </u-button>
  44. </view>
  45. </view>
  46. </oa-scroll>
  47. </template>
  48. <script setup>
  49. import config from "@/config";
  50. import storage from "@/utils/storage";
  51. import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
  52. import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
  53. import { publicStores, useStores } from "@/store/modules/index";
  54. import { score } from "@/api/common/index.js";
  55. const { proxy } = getCurrentInstance();
  56. const publicStore = publicStores();
  57. const data = reactive({
  58. rateCount: 5,
  59. rateValue: 0,
  60. textareaValue: "",
  61. repairCode: "",
  62. statusBool: true,
  63. });
  64. const { rateCount, rateValue, textareaValue, repairCode, statusBool } = toRefs(data);
  65. /**
  66. * @提交
  67. */
  68. function handleSubmit(value) {
  69. score({
  70. repairCode: repairCode.value,
  71. score: rateValue.value,
  72. appraiseContent: textareaValue.value,
  73. }).then((requset) => {
  74. if (requset.status === "SUCCESS") {
  75. proxy.$tab.navigateTo(`/pages/common/success/index?codeName=评价成功&showNow=${statusBool.value}`);
  76. }
  77. });
  78. }
  79. onLoad((options) => {
  80. if ("statusBool" in options) {
  81. statusBool.value = options.statusBool;
  82. document.getElementsByClassName("uni-page-head-hd")[0].style.cssText = "display: none;";
  83. }
  84. if ("repairCode" in options) {
  85. repairCode.value = options.repairCode;
  86. }
  87. });
  88. onReady(() => {});
  89. onShow(() => {
  90. //调用系统主题颜色
  91. proxy.$settingStore.systemThemeColor([1]);
  92. });
  93. </script>
  94. <style lang="scss" scoped></style>