通知和提示
This commit is contained in:
		
							parent
							
								
									40e252c400
								
							
						
					
					
						commit
						1305931e3b
					
				@ -132,9 +132,18 @@ const install = (Vue, vm) => {
 | 
			
		||||
		// 试穿
 | 
			
		||||
		agreetest({goods_try_id,type,takeawayer_id}){
 | 
			
		||||
			return vm.$u.post("/order/goodsTryAgree",{goods_try_id,type,takeawayer_id})
 | 
			
		||||
		},
 | 
			
		||||
 | 
			
		||||
		messageList({page = 1}){
 | 
			
		||||
			return vm.$u.post("/message/messageList",{page})
 | 
			
		||||
		},
 | 
			
		||||
		isread(){
 | 
			
		||||
			return vm.$u.post("/message/isread")
 | 
			
		||||
		},
 | 
			
		||||
		messageInfo(){
 | 
			
		||||
			return vm.$u.post("/message/messageInfo")
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		
 | 
			
		||||
    }
 | 
			
		||||
	// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
 | 
			
		||||
	vm.$u.api = api;
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										12
									
								
								pages.json
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								pages.json
									
									
									
									
									
								
							@ -262,10 +262,14 @@
 | 
			
		||||
			"style": {
 | 
			
		||||
				"navigationBarTitleText": "活动列表",
 | 
			
		||||
				"app-plus": {
 | 
			
		||||
					"titleNView": {
 | 
			
		||||
						"backgroundColor": "#2D2D2D",
 | 
			
		||||
						"titleColor": "#FFFFFF"
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"path": "pages/messages/info",
 | 
			
		||||
			"style": {
 | 
			
		||||
				"navigationBarTitleText": "活动详情",
 | 
			
		||||
				"app-plus": {
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										70
									
								
								pages/messages/info.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								pages/messages/info.vue
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,70 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<view>
 | 
			
		||||
		<image :src="list.picture" class="picture" mode=""></image>
 | 
			
		||||
        <view class="box">
 | 
			
		||||
            <view class="info">
 | 
			
		||||
                <text class="title u-line-2">{{ list.title }}</text>
 | 
			
		||||
                <u-divider class="time">{{ list.addtime }}</u-divider>
 | 
			
		||||
                <!-- <text class="time"></text> -->
 | 
			
		||||
            </view>
 | 
			
		||||
            <view class="content">{{ list.content }}</view>
 | 
			
		||||
        </view>
 | 
			
		||||
	</view>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
	export default {
 | 
			
		||||
		data() {
 | 
			
		||||
			return {
 | 
			
		||||
				id: 0,
 | 
			
		||||
                list: [],
 | 
			
		||||
			};
 | 
			
		||||
		},
 | 
			
		||||
        onLoad(option) {
 | 
			
		||||
            // console.log(option);
 | 
			
		||||
            this.id = option.id;
 | 
			
		||||
            // 获取数据
 | 
			
		||||
            this.informationList();
 | 
			
		||||
        },
 | 
			
		||||
        methods: {
 | 
			
		||||
            informationList(){
 | 
			
		||||
                console.log(this.id)
 | 
			
		||||
            	this.$u.api.messageInfo({id:this.id}).then((res)=>{
 | 
			
		||||
                    
 | 
			
		||||
                    console.log(res);
 | 
			
		||||
 | 
			
		||||
            	})
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
	}
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style lang="scss">
 | 
			
		||||
page {
 | 
			
		||||
}
 | 
			
		||||
.picture {
 | 
			
		||||
    width: 100%;
 | 
			
		||||
}
 | 
			
		||||
.box {
 | 
			
		||||
    width: 100%;
 | 
			
		||||
    padding: 20rpx;
 | 
			
		||||
    .info {
 | 
			
		||||
        .title {
 | 
			
		||||
            font-size: 38rpx;
 | 
			
		||||
            color: rgba(0,0,0,.84);
 | 
			
		||||
            line-height: 1.2;
 | 
			
		||||
        }
 | 
			
		||||
        .time {
 | 
			
		||||
            padding: 40rpx 0;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    .content {
 | 
			
		||||
        padding: 0 6rpx;
 | 
			
		||||
        font-size: 34rpx;
 | 
			
		||||
        color: rgba(0,0,0,.6);
 | 
			
		||||
        line-height: 1.4;
 | 
			
		||||
        letter-spacing: 1rpx;
 | 
			
		||||
        text-indent: 2rem;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@ -1,10 +1,10 @@
 | 
			
		||||
<template>
 | 
			
		||||
    <view class="box">
 | 
			
		||||
        <view class="item">
 | 
			
		||||
            <view class="time">2020-05-14 20:22</view>
 | 
			
		||||
        <view class="item" v-for="(item,index) in list" :key="index" @click="navto(item.id)">
 | 
			
		||||
            <view class="time">{{item.addtime}}</view>
 | 
			
		||||
            <view class="info">
 | 
			
		||||
                <image class="img"></image>
 | 
			
		||||
                <view class="title u-line-2">潮牌1折秒杀!杨幂同款小白鞋今日43元送10000元大红包还有明星限量签名潮牌1折秒杀!杨幂同款小白鞋今日43元送10000元大红包还有明星限量签名潮牌1折秒杀!杨幂同款小白鞋今日43元送10000元大红包还有明星限量签名潮牌1折秒杀!杨幂同款小白鞋今日43元送10000元大红包还有明星限量签名潮牌1折秒杀!杨幂同款小白鞋今日43元送10000元大红包还有明星限量签名潮牌1折秒杀!杨幂同款小白鞋今日43元送10000元大红包还有明星限量签名潮牌1折秒杀!杨幂同款小白鞋今日43元送10000元大红包还有明星限量签名照</view>
 | 
			
		||||
                <image class="img" :src="item.picture"></image>
 | 
			
		||||
                <view class="title u-line-2">{{item.title}}</view>
 | 
			
		||||
                <view class="next">
 | 
			
		||||
                    <text>查看详情</text>
 | 
			
		||||
                    <image class="right" src="@/static/image/user/1.png"></image>
 | 
			
		||||
@ -68,7 +68,24 @@
 | 
			
		||||
export default {
 | 
			
		||||
    data(){
 | 
			
		||||
        return {
 | 
			
		||||
 | 
			
		||||
            list:[]
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    onLoad(){
 | 
			
		||||
        this.$u.api.messageList({page:1}).then((res)=>{
 | 
			
		||||
            console.log(res)
 | 
			
		||||
            this.list = res.data
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
    methods:{
 | 
			
		||||
        navto(id){
 | 
			
		||||
            console.log(id)
 | 
			
		||||
            this.$u.route({
 | 
			
		||||
                url:"/pages/messages/info",
 | 
			
		||||
                params:{
 | 
			
		||||
                    id
 | 
			
		||||
                }
 | 
			
		||||
            })
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -12,9 +12,9 @@
 | 
			
		||||
				<image src="" ></image>
 | 
			
		||||
			</view>
 | 
			
		||||
			<view class="names">活动消息</view>
 | 
			
		||||
			<view class="content u-line-1">12121212</view>
 | 
			
		||||
			<view class="times">12121</view>
 | 
			
		||||
			<view class="tishi" v-if="true"></view>
 | 
			
		||||
			<view class="content u-line-1">{{huodong.data.title}}</view>
 | 
			
		||||
			<view class="times">{{huodong.data.addtime}}</view>
 | 
			
		||||
			<view class="tishi" v-if="huodong.count != 0"></view>
 | 
			
		||||
		</view>
 | 
			
		||||
		<!-- <u-empty text="并没有什么消息" mode="message" v-if="Object.keys(list).length == 0" style="margin: auto"></u-empty> -->
 | 
			
		||||
		<view class="massage_list" v-for="(item,index) in list" :key="index"  @click="gochat(item)">
 | 
			
		||||
@ -37,6 +37,11 @@
 | 
			
		||||
				list: [
 | 
			
		||||
					
 | 
			
		||||
				],
 | 
			
		||||
				huodong:{
 | 
			
		||||
					data:{
 | 
			
		||||
						
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			};
 | 
			
		||||
		},
 | 
			
		||||
		methods: {
 | 
			
		||||
@ -73,6 +78,10 @@
 | 
			
		||||
			const res = uni.getSystemInfoSync();
 | 
			
		||||
			this.swiperHeight = res.windowHeight;
 | 
			
		||||
			this.list = this.imService.friends;
 | 
			
		||||
			this.$u.api.isread().then((res)=>{
 | 
			
		||||
				console.log(res)
 | 
			
		||||
				this.huodong = res.data
 | 
			
		||||
			})
 | 
			
		||||
		}
 | 
			
		||||
	};
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@
 | 
			
		||||
		<u-form :model="form" ref="uForm">
 | 
			
		||||
			<u-form-item label="标题" label-position="right"><u-input v-model="form.name" placeholder="请输入标题" /></u-form-item>
 | 
			
		||||
			<!-- form-data -->
 | 
			
		||||
			<view class="titles">封面</view>
 | 
			
		||||
			<view class="titles">封面<text>(建议图片尺寸为334*334)</text></view>
 | 
			
		||||
			<u-upload
 | 
			
		||||
				:form-data="coverformdata"
 | 
			
		||||
				:max-count="1"
 | 
			
		||||
@ -16,7 +16,7 @@
 | 
			
		||||
				:file-list="fileListA"
 | 
			
		||||
				@on-success="uploadcover"
 | 
			
		||||
			></u-upload>
 | 
			
		||||
			<view class="titles">图片</view>
 | 
			
		||||
			<view class="titles">图片<text>(最多选择5张图片,建议图片尺寸为750*700)</text></view>
 | 
			
		||||
			<u-upload
 | 
			
		||||
				:form-data="imgformdata"
 | 
			
		||||
				name="article_image"
 | 
			
		||||
@ -405,6 +405,10 @@ export default {
 | 
			
		||||
		font-weight: 400;
 | 
			
		||||
		color: rgba(51, 51, 51, 1);
 | 
			
		||||
		margin: 30rpx 0;
 | 
			
		||||
		>text{
 | 
			
		||||
			font-size: 20rpx;
 | 
			
		||||
			color: #999;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	textarea {
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
	<view id="release" >
 | 
			
		||||
		<u-form :model="form" ref="uForm">
 | 
			
		||||
			<u-form-item label="标题" label-position="right"><u-input v-model="form.name" placeholder="请输入标题" /></u-form-item>
 | 
			
		||||
			<view class="titles">封面</view>
 | 
			
		||||
			<view class="titles">封面<text>(建议图片尺寸为334*334)</text></view>
 | 
			
		||||
			<u-upload
 | 
			
		||||
				:form-data="coverformdata"
 | 
			
		||||
				:max-count="1"
 | 
			
		||||
@ -15,7 +15,7 @@
 | 
			
		||||
				:file-list="fileListA"
 | 
			
		||||
				@on-success="uploadcover"
 | 
			
		||||
			></u-upload>
 | 
			
		||||
			<view class="titles">视频</view>
 | 
			
		||||
			<view class="titles">视频<text>(建议视频时长在5分钟内,视频大小不超过100M)</text></view>
 | 
			
		||||
			<view class="videobox video-flex" v-if="videostate == false" @click="uploadvideo">
 | 
			
		||||
				<u-icon name="plus" class="u-add-btn" size="40"></u-icon>
 | 
			
		||||
				<view class="videotext">选择视频</view>
 | 
			
		||||
@ -581,6 +581,10 @@ export default {
 | 
			
		||||
		font-weight: 400;
 | 
			
		||||
		color: rgba(51, 51, 51, 1);
 | 
			
		||||
		margin: 30rpx 0;
 | 
			
		||||
		>text{
 | 
			
		||||
			font-size: 20rpx;
 | 
			
		||||
			color: #999;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
    .video-flex {
 | 
			
		||||
        flex-direction: column;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user