acquisition_information_details.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <template>
  2. <view class="wrap">
  3. <view class='content1'>
  4. <view class='row content-item'>
  5. <view class="left" style="color: #878C9C ;">仓库</view>
  6. <view class="right">鲅鱼圈库</view>
  7. </view>
  8. <view class='row content-item'>
  9. <textarea disabled placeholder="请输入仓库信息" class="textarea" maxlength="2000" v-model="textareaValue"></textarea>
  10. <view class="textarea-bottom">{{textareaValue?textareaValue.length:'0'}}/2000字</view>
  11. </view>
  12. <view class='row content-item'>
  13. <u-checkbox disabled activeColor="#19be6b" v-model="value">显示在易粮易运收购信息中</u-checkbox>
  14. </view>
  15. </view>
  16. <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
  17. :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
  18. showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
  19. </view>
  20. </template>
  21. <script>
  22. import {
  23. mapState
  24. } from 'vuex';
  25. export default {
  26. components: {
  27. },
  28. data() {
  29. return {
  30. isSHowBtn: true,
  31. isShowAlert: false,
  32. content: '当前登入信息验证失败,是否重新登录?',
  33. textareaValue: '',
  34. value: ''
  35. }
  36. },
  37. onLoad() {
  38. },
  39. // #ifndef MP
  40. onNavigationBarButtonTap(e) {
  41. const index = e.index;
  42. if (index === 0) {
  43. this.navTo('/pages/set/set');
  44. } else if (index === 1) {
  45. // #ifdef APP-PLUS
  46. const pages = getCurrentPages();
  47. const page = pages[pages.length - 1];
  48. const currentWebview = page.$getAppWebview();
  49. currentWebview.hideTitleNViewButtonRedDot({
  50. index
  51. });
  52. // #endif
  53. uni.navigateTo({
  54. url: '/pages/notice/notice'
  55. })
  56. }
  57. },
  58. // #endif
  59. computed: {
  60. ...mapState(['hasLogin', 'userInfo']),
  61. },
  62. onShow() {
  63. this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
  64. console.log("checkSession", res)
  65. if (res.data.data == "INVALID") {
  66. this.isShowAlert = true;
  67. // uni.showModal({
  68. // title: '登录提示',
  69. // content: '当前登入信息验证失败,是否重新登录?',
  70. // showCancel: true,
  71. // confirmText: '登录',
  72. // success: (e) => {
  73. // if (e.confirm) {
  74. // uni.navigateTo({
  75. // url: '/pages/public/login'
  76. // })
  77. // }
  78. // },
  79. // fail: () => {},
  80. // complete: () => {}
  81. // })
  82. }
  83. })
  84. console.log("hasLogin", this.hasLogin)
  85. },
  86. methods: {
  87. /**
  88. * 统一跳转接口,拦截未登录路由
  89. * navigator标签现在默认没有转场动画,所以用view
  90. */
  91. navTo(url) {
  92. if (!this.hasLogin) {
  93. url = '/pages/public/login';
  94. }
  95. uni.navigateTo({
  96. url
  97. })
  98. },
  99. alertBtn() {
  100. uni.navigateTo({
  101. url: '/pages/public/login'
  102. })
  103. },
  104. cancelClick() {
  105. this.isShowAlert = false
  106. },
  107. checkBoxChange(e) {
  108. console.log(e)
  109. }
  110. }
  111. }
  112. </script>
  113. <style lang='scss' scoped>
  114. page {
  115. background: #F5F6FA;
  116. }
  117. .wrap {
  118. background: #fff;
  119. margin: 10px;
  120. border-radius: 10px;
  121. padding: 10px;
  122. }
  123. .row {
  124. display: flex;
  125. justify-content: space-between;
  126. position: relative;
  127. /* border-bottom: 1px solid #EEEEEE; */
  128. .right,
  129. input {
  130. font-size: 28rpx;
  131. // color: #333333;
  132. }
  133. }
  134. .textarea {
  135. background: #F9F9FA;
  136. font-size: 12px;
  137. text-align: left;
  138. width: 100%;
  139. height: 60px;
  140. padding: 10px;
  141. border-radius: 5px;
  142. margin-top: 10px;
  143. height: 50vh;
  144. padding-bottom: 20rpx;
  145. }
  146. .textarea-bottom {
  147. position: absolute;
  148. bottom: 20rpx;
  149. right: 20rpx;
  150. color: #606266;
  151. }
  152. </style>