reminder.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <view style="padding: 30upx 5%;">
  3. <TextArea ref="getValue" @submitValue="submitValue"/>
  4. <view class="submitRemin" @click="submitRemin">提交</view>
  5. </view>
  6. </template>
  7. <script>
  8. import TextArea from '@/component/textarea.vue'
  9. export default {
  10. components: {
  11. TextArea
  12. },
  13. data() {
  14. return{
  15. reminder: '',
  16. order_id:''
  17. }
  18. },
  19. onLoad(e) {
  20. this.order_id = e.order_id;
  21. let a = e.a;
  22. console.log(a);
  23. if(a == 1) {
  24. uni.setNavigationBarTitle({
  25. title: '催单'
  26. });
  27. }else if(a == 2) {
  28. uni.setNavigationBarTitle({
  29. title: '联系酒店'
  30. });
  31. }
  32. },
  33. methods: {
  34. submitValue(e) {
  35. this.reminder = e.detail.value;
  36. },
  37. submitRemin() {
  38. if(this.reminder == '') {
  39. this.$msg("请填写催单内容");
  40. return;
  41. }
  42. this.request({
  43. url: '/v1/order/urge',
  44. method:'post',
  45. data: {
  46. order_id: this.order_id,
  47. content: this.reminder
  48. },
  49. success:(res) => {
  50. if(res.data.code == 1000) {
  51. this.$msg("催单成功");
  52. setTimeout(() => {
  53. uni.navigateBack();
  54. }, 2000)
  55. }
  56. }
  57. })
  58. }
  59. }
  60. }
  61. </script>
  62. <style>
  63. .submitRemin {
  64. color: #fff;
  65. background-color: #D9332E;
  66. height: 70upx;
  67. text-align: center;
  68. line-height: 70upx;
  69. margin-top: 25upx;
  70. }
  71. </style>