部分问题修复
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
<view class="item-doc" :style="{ height: headHeight + 'px' }">
|
||||
<view class="item" :style="{ height: headHeight + 'px' }">
|
||||
<view class="left">
|
||||
<image :src="`/static/applocation/${options.icon}.png`" mode="aspectFit" class="icon"></image>
|
||||
<image v-if="options.icon.indexOf('http') != -1" :src="options.icon" mode="aspectFit" class="icon"></image>
|
||||
<image v-else :src="`/static/applocation/${options.icon}.png`" mode="aspectFit" class="icon"></image>
|
||||
|
||||
<view class="info">
|
||||
<view class="title">
|
||||
<text class="t">{{ options.name }}</text>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<text style="max-width: 286rpx" class="u-line-1 u-font-32">
|
||||
{{ groupInfo.name }}
|
||||
</text>
|
||||
<text class="u-m-l-22">(22人)</text>
|
||||
<text class="u-m-l-22">({{membersRes.user_list.length}}人)</text>
|
||||
</view>
|
||||
<view class="" @click="toMore()">
|
||||
<view class="u-flex u-row-center">
|
||||
@@ -298,6 +298,7 @@ function sendImg() {
|
||||
} else {
|
||||
}
|
||||
}
|
||||
uni.hideLoading();
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -389,12 +390,19 @@ async function getMsgList() {
|
||||
}
|
||||
|
||||
const options = reactive({});
|
||||
const membersRes=reactive({
|
||||
user_list:[]
|
||||
})
|
||||
onLoad((opt) => {
|
||||
Object.assign(options, opt);
|
||||
init();
|
||||
chatApi.messageMarkReadAll({
|
||||
session_ids: options.session_id,
|
||||
});
|
||||
chatApi.groupMembers({ group_id: options.group_id }).then((res) => {
|
||||
console.log(res);
|
||||
membersRes.user_list=res.user_list||[]
|
||||
})
|
||||
// #ifdef H5
|
||||
scrollView.safeAreaHeight = uni.getSystemInfoSync().safeArea.height;
|
||||
// #endif
|
||||
@@ -468,7 +476,8 @@ function confirmCoupon() {
|
||||
modalData.show = false;
|
||||
const couponJson = JSON.parse(res.couponJson);
|
||||
sendMsg({
|
||||
coupon: { ...couponJson, title: modalData.form.title },
|
||||
coupon: { ...couponJson, title: modalData.form.title,activity_id:res.id },
|
||||
chat_coupon_id:res.id,
|
||||
msg_type: 4,
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
@click="previewVideo(item.video_url)"
|
||||
></video>
|
||||
<view class="" v-if="item.msg_type == 4">
|
||||
<view>发优惠券了!数量有限!快来领取吧!</view>
|
||||
<view>{{ item.coupon.title }}</view>
|
||||
<view class="u-m-t-16 bg-f7 coupon u-flex">
|
||||
<view class="left">
|
||||
<view class="price">
|
||||
@@ -26,8 +26,8 @@
|
||||
<view class="u-font-24 color-999 no-wrap">满{{item.coupon.fullAmount}}可用</view>
|
||||
</view>
|
||||
<view class="right u-p-l-28">
|
||||
<view class="u-font-32 ">优惠券名称叫什么</view>
|
||||
<view class="u-font-24 color-999 u-m-t-8">有效期:2002.1.22-2022.1.22</view>
|
||||
<view class="u-font-32 ">{{item.coupon.couponName}}</view>
|
||||
<view class="u-font-24 color-999 u-m-t-8">有效期:{{ returnTime(item.coupon) }} </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -40,6 +40,18 @@ const props = defineProps({
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
function previewImage(url) {
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
});
|
||||
}
|
||||
function returnTime(coupon){
|
||||
let startTime = coupon.useStartTime;
|
||||
let endTime = coupon.useEndTime;
|
||||
if(startTime && endTime){
|
||||
return startTime.split(' ')[0] + '-' + endTime.split(' ')[0]
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -164,7 +164,8 @@ function sendMsg(msg) {
|
||||
}
|
||||
function toShare(item) {
|
||||
sendMsg({
|
||||
coupon: { ...item.couponJson, title: item.title },
|
||||
coupon: { ...item.couponJson, title: item.title,activity_id:item.id },
|
||||
chat_coupon_id:item.id,
|
||||
msg_type: 4,
|
||||
});
|
||||
|
||||
|
||||
@@ -38,6 +38,10 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -45,8 +49,10 @@
|
||||
import go from "@/commons/utils/go.js";
|
||||
|
||||
import * as chatApi from "@/http/php/chat";
|
||||
import { ref } from "vue";
|
||||
import { ref ,reactive} from "vue";
|
||||
import { onShow } from "@dcloudio/uni-app";
|
||||
|
||||
|
||||
const list = ref([]);
|
||||
|
||||
async function getList() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<my-header-card :options="{ name: '限时折扣', intro: '批量设置商品折扣', icon: 'xszk' }"></my-header-card>
|
||||
<my-header-card :options="{ name: '限时折扣', intro: '批量设置商品折扣', icon: 'https://cashier-oss.oss-cn-beijing.aliyuncs.com/upload/2/bc360b13e5734821a2de2f0494b72a8b.png' }"></my-header-card>
|
||||
<view class="list">
|
||||
<view class="item" v-for="item in tableData.list" :key="item.id">
|
||||
<view class="head">
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
<script setup>
|
||||
import go from '@/commons/utils/go.js';
|
||||
import { reactive, ref, computed, watch, onMounted, onUnmounted } from 'vue'
|
||||
import myButton from '@/components/my-components/my-button.vue'
|
||||
const props = defineProps({
|
||||
index: {
|
||||
|
||||
@@ -93,6 +93,15 @@ export const useChatStore = defineStore("chat", {
|
||||
this.onReceiveMsg(data.data);
|
||||
console.log(this.chatList);
|
||||
}
|
||||
if (data && data.operate_type == "receive_msg") {
|
||||
const msg={
|
||||
...data.data,
|
||||
operate_type:"receive_msg",
|
||||
}
|
||||
this.chatList.unshift(msg);
|
||||
this.onReceiveMsg(msg);
|
||||
console.log(this.chatList);
|
||||
}
|
||||
});
|
||||
|
||||
this.socketTask.onError((res) => {
|
||||
|
||||
Reference in New Issue
Block a user