1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <template>
- <view class="app">
- <view class="red_envelope_tip fx-r fx-bc fx-ac" v-if="item.type == 'red_envelope_tip'">
- <image src="/static/img/chat-red-v2.svg"></image>
- <text v-if="user.uid == inItem.lq.uid">
- 你领取{{inItem.send.name}}
- </text>
- <text v-else>
- {{inItem.lq.name}} 领取您的
- </text>
- <text class="red" @tap="tapRed">红包</text>
- <text v-if="inItem.is_completed">,你的红包已被领完。</text>
- </view>
-
- <view class="red_envelope_tip fx-r fx-bc fx-ac" v-if="item.type == 'tip'">
- {{item.data}}
- </view>
-
- <view class="red_envelope_tip fx-r fx-bc fx-ac" v-if="item.type == 'group_del'">
- {{inItem.nickname}}已被移除群聊
- </view>
-
- <view class="red_envelope_tip fx-r fx-bc fx-ac" v-if="item.type == 'withdraw'">
- <text v-if="item.sendUser.uid == user.uid">你撤回了一条消息</text>
- <text v-else>{{item.sendUser.nickname}}撤回了一条消息</text>
- </view>
-
-
- </view>
- </template>
- <style lang="scss">
- .red_envelope_tip{color:$ic-default-text ;font-size: 14px;padding: 10px;}
- .red_envelope_tip image{width: 15px;height: 15px;}
- .red_envelope_tip .red{color: #f25642;}
- </style>
- <script>
- import {mapState,mapMutations } from 'vuex';
- export default {
- computed: mapState(['user','sysData']),
- name: 'tip',
- props:{
- item : {
- type: Object,
- default: ()=>{return {data:{}} }
- }
- },
-
- watch:{
- item:{
- immediate:true,
- handler(val) {
- if(val.type == 'red_envelope_tip'){
- this.inItem = JSON.parse(val.data);
- }
-
-
-
- if(val.type == 'group_del')
- this.inItem = JSON.parse(val.data);
-
- }
- }
-
- },
-
- data() {
- return{
- inItem:{}
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- methods: {
- tapRed:function(){
- uni.navigateTo({ url:"/pages/chat/redpack/look?id=" + this.inItem.id});
- }
- }
- }
- </script>
- <style>
- </style>
|