123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- <template>
- <!-- 系统消息页面 -->
- <view class="header">
- <view class="content" v-for="(item,index) in orderList" @click="inDetails" :key="index">
- <view class="content-one">
- <text class="content-one-first">{{item.msgTitle}}</text>
- <text class="content-one-second">{{item.data}}</text>
- </view>
- <!-- 中间的虚线 -->
- <view class="content-two">
- </view>
- <text class="content-three">
- {{msgContent.replace(/<[^>]+>/g,"")}}
- </text>
- <view class="content-five" v-if="item.sendUserId==17||item.sendUserId==19">
- <text class="content-five-first">查看订单详情</text>
- <text class="content-five-second">
- <u-icon name="arrow-right"></u-icon>
- </text>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- request
- } from '../../../common/request/request'
- require("promise.prototype.finally").shim()
- export default {
- data() {
- return {
- msgContent: '',
- orderList: []
- }
- },
- onLoad() {
- },
- onLoad(options) {
- console.log(options.sendUserId)
- this.sendUserId = options.sendUserId
- },
- created() {
- this.getDate()
- this.getList()
- },
- methods: {
- // 获取列表
- getDate() {
- request({
- url: '/appMessage/getMessageList',
- method: 'post',
- data: {
- "acceptUserId":this.$store.state.storeInfo.storeId,
- "sendUserId": this.sendUserId,
- 'userId':this.$store.state.storeInfo.userId
- }
- }).then(res => {
- console.log(res)
- this.orderList = res.data.list
- // this.msgContent = res.data.list[0].msgContent
- for(var i = 0; i<res.data.list.length; i++) {
- this.msgContent = res.data.list[i].msgContent
- }
- }).catch(err => {
- console.log(err)
- })
- .finally(() => {
- setTimeout(() => {
- uni.hideLoading();
- this.loading = false;
- }, 300)
- })
- },
- // 获取消息状态
- getList() {
- request({
- url: '/appMessage/updateMessage',
- method: 'post',
- data: {
- "acceptUserId":this.$store.state.storeInfo.storeId,
- "sendUserId": this.sendUserId,
- 'userId':this.$store.state.storeInfo.userId
-
- }
- }).then(res => {
- console.log(res)
-
-
-
-
- }).catch(err => {
- console.log(err)
- })
- .finally(() => {
- setTimeout(() => {
- uni.hideLoading();
- this.loading = false;
- }, 300)
- })
- },
- inDetails() {
- this.$u.route({
- url: 'pages/msg/Order-details/index',
- })
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .content {
- width: 702rpx;
- // height: 447rpx;
- margin: 0 auto;
- background: #FFFFFF;
- margin-top: 20rpx;
- box-shadow: 0rpx 0rpx 17rpx 0rpx rgba(78, 60, 63, 0.2);
- border-radius: 10rpx;
- }
- .content-one {
- display: flex;
- justify-content: space-between;
- }
- .content-one-first {
- font-size: 28rpx;
- font-weight: bold;
- margin: 20rpx;
- }
- .content-one-second {
- font-size: 24rpx;
- color: #B2B2B2;
- margin: 20rpx;
- }
- .content-five {
- display: flex;
- justify-content: space-between;
- }
- .content-five-first {
- font-size: 24rpx;
- font-weight: bold;
- margin: 20rpx;
- }
- .content-five-second {
- font-size: 24rpx;
- color: #B2B2B2;
- margin: 20rpx;
- }
- // 中间虚线
- .content-two {
- width: 670rpx;
- margin: 0 auto;
- border-top: 1rpx solid #ededed;
- }
- .content-three {
- display: inline-block;
- margin-left: 30rpx;
- color: #aeaeae;
- margin-top: 20rpx;
- font-size: 24rpx;
- margin-bottom: 27rpx;
- }
- .content-four {
- color: #aeaeae;
- margin-left: 20rpx;
- margin-top: 6rpx;
- font-size: 24rpx;
- }
- .content-four-tail {
- color: #000;
- margin-left: 20rpx;
- margin-top: 10rpx;
- font-size: 24rpx;
- }
- </style>
|