index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <template>
  2. <!-- 系统消息页面 -->
  3. <view class="header">
  4. <view class="content" v-for="(item,index) in orderList" @click="inDetails" :key="index">
  5. <view class="content-one">
  6. <text class="content-one-first">{{item.msgTitle}}</text>
  7. <text class="content-one-second">{{item.data}}</text>
  8. </view>
  9. <!-- 中间的虚线 -->
  10. <view class="content-two">
  11. </view>
  12. <text class="content-three">
  13. {{msgContent}}
  14. </text>
  15. <!-- <view class="content-four">
  16. 订单编号:{{item.number}}
  17. </view>
  18. <view class="content-four">
  19. 创建时间:{{item.time}}
  20. </view>
  21. <view class="content-four">
  22. 订单条数:{{item.amount}}条
  23. </view>
  24. <view class="content-four">
  25. 联系人:{{item.name}}
  26. </view>
  27. <view class="content-four">
  28. 联系电话:{{item.Telephone}}
  29. </view>
  30. <view class="content-four">
  31. 零售店地址:{{item.address}}
  32. </view> -->
  33. <view class="content-five">
  34. <text class="content-five-first">查看订单详情</text>
  35. <text class="content-five-second">
  36. <u-icon name="arrow-right"></u-icon>
  37. </text>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. import {
  45. request
  46. } from '../../../common/request/request'
  47. require("promise.prototype.finally").shim()
  48. export default {
  49. data() {
  50. return {
  51. msgContent: '',
  52. orderList: []
  53. }
  54. },
  55. onLoad() {
  56. },
  57. onLoad(options) {
  58. console.log(options.sendUserId)
  59. this.sendUserId = options.sendUserId
  60. },
  61. created() {
  62. this.getDate()
  63. this.getList()
  64. },
  65. methods: {
  66. // 获取列表
  67. getDate() {
  68. request({
  69. url: '/appMessage/getMessageList',
  70. method: 'post',
  71. data: {
  72. "acceptUserId":this.$store.state.storeInfo.storeId,
  73. "sendUserId": this.sendUserId,
  74. 'userId':this.$store.state.storeInfo.userId
  75. }
  76. }).then(res => {
  77. console.log(res)
  78. this.orderList = res.data.list
  79. this.msgContent = res.data.list[0].msgContent
  80. }).catch(err => {
  81. console.log(err)
  82. })
  83. .finally(() => {
  84. setTimeout(() => {
  85. uni.hideLoading();
  86. this.loading = false;
  87. }, 300)
  88. })
  89. },
  90. // 获取消息状态
  91. getList() {
  92. request({
  93. url: '/appMessage/updateMessage',
  94. method: 'post',
  95. data: {
  96. "acceptUserId":this.$store.state.storeInfo.storeId,
  97. "sendUserId": this.sendUserId,
  98. 'userId':this.$store.state.storeInfo.userId
  99. }
  100. }).then(res => {
  101. console.log(res)
  102. }).catch(err => {
  103. console.log(err)
  104. })
  105. .finally(() => {
  106. setTimeout(() => {
  107. uni.hideLoading();
  108. this.loading = false;
  109. }, 300)
  110. })
  111. },
  112. inDetails() {
  113. this.$u.route({
  114. url: 'pages/msg/Order-details/index',
  115. })
  116. }
  117. },
  118. }
  119. </script>
  120. <style lang="scss" scoped>
  121. .content {
  122. width: 702rpx;
  123. // height: 447rpx;
  124. margin: 0 auto;
  125. background: #FFFFFF;
  126. margin-top: 20rpx;
  127. box-shadow: 0rpx 0rpx 17rpx 0rpx rgba(78, 60, 63, 0.2);
  128. border-radius: 10rpx;
  129. }
  130. .content-one {
  131. display: flex;
  132. justify-content: space-between;
  133. }
  134. .content-one-first {
  135. font-size: 28rpx;
  136. font-weight: bold;
  137. margin: 20rpx;
  138. }
  139. .content-one-second {
  140. font-size: 24rpx;
  141. color: #B2B2B2;
  142. margin: 20rpx;
  143. }
  144. .content-five {
  145. display: flex;
  146. justify-content: space-between;
  147. }
  148. .content-five-first {
  149. font-size: 24rpx;
  150. font-weight: bold;
  151. margin: 20rpx;
  152. }
  153. .content-five-second {
  154. font-size: 24rpx;
  155. color: #B2B2B2;
  156. margin: 20rpx;
  157. }
  158. // 中间虚线
  159. .content-two {
  160. width: 670rpx;
  161. margin: 0 auto;
  162. border-top: 1rpx solid #ededed;
  163. }
  164. .content-three {
  165. display: inline-block;
  166. margin-left: 30rpx;
  167. color: #aeaeae;
  168. margin-top: 20rpx;
  169. font-size: 24rpx;
  170. margin-bottom: 27rpx;
  171. }
  172. .content-four {
  173. color: #aeaeae;
  174. margin-left: 20rpx;
  175. margin-top: 6rpx;
  176. font-size: 24rpx;
  177. }
  178. .content-four-tail {
  179. color: #000;
  180. margin-left: 20rpx;
  181. margin-top: 10rpx;
  182. font-size: 24rpx;
  183. }
  184. .content-five {}
  185. </style>