fix: bug修复

This commit is contained in:
kaizheng(郑凯) 2025-02-26 21:54:18 +08:00
parent 742eca7825
commit 149fac2021
5 changed files with 208 additions and 191 deletions

View File

@ -4,7 +4,7 @@
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build && sh ./build/deploy.sh",
"build:test": "vue-cli-service build && sh ./build/deploy.sh",
"build:pro": "sh ./build/deploy_prod.sh",
"lint": "vue-cli-service lint"
},

View File

@ -1,32 +1,41 @@
<template>
<div>
<div class="page">
<Nav :title="detail.name"></Nav>
<div class="circle-base-info">
<img :src="detail.coverImage" class="banner" />
<div class="circle-name">
<h3>{{ detail.name }}</h3>
<span>{{
detail.riskLevel ? RISK_LEVEL[detail.riskLevel].label : ""
}}</span>
</div>
<div class="tg-info">
<div class="flex">
<img class="photo" :src="detail.advisor.avatar" alt="" srcset="" />
<label>{{ detail.advisor.showName }}</label>
<div class="content-wrap">
<div class="content">
<div class="circle-base-info">
<img :src="detail.coverImage" class="banner" />
<div class="circle-name">
<h3>{{ detail.name }}</h3>
<span>{{
detail.riskLevel ? RISK_LEVEL[detail.riskLevel].label : ""
}}</span>
</div>
<div class="tg-info">
<div class="flex">
<img
class="photo"
:src="detail.advisor.avatar"
alt=""
srcset=""
/>
<label>{{ detail.advisor.showName }}</label>
</div>
<span class="user-name">{{ store.state.userInfo.userName }}</span>
</div>
</div>
<div class="introduce">
<h4>交易圈简介</h4>
<p>{{ detail.remark }}</p>
</div>
<div class="introduce">
<h4>使用人群</h4>
<p>{{ detail.applicableUser }}</p>
</div>
<span class="user-name">{{ store.state.userInfo.userName }}</span>
</div>
</div>
<div class="introduce">
<h4>交易圈简介</h4>
<p>{{ detail.remark }}</p>
</div>
<div class="introduce">
<h4>使用人群</h4>
<p>{{ detail.applicableUser }}</p>
</div>
<div class="tip">
风险提示投资顾问提供的观点和投资建议仅供参考不作为客户投资决策依据客户需独立做出投资决策风险自担市场有风险投资须谨慎
<div class="tip">
风险提示投资顾问提供的观点和投资建议仅供参考不作为客户投资决策依据客户需独立做出投资决策风险自担市场有风险投资须谨慎
</div>
</div>
<div class="footer">
<!-- <div class="buy-list">
@ -54,33 +63,45 @@
</div>
</template>
<script setup>
import { ref } from "vue";
import { useRoute } from "vue-router";
import { getCircleDetail } from "@/api/circle";
import Nav from "@/components/NavBar.vue";
import { RISK_LEVEL } from "@/utils/contant";
import { useStore } from "vuex";
import { ref } from "vue"
import { useRoute } from "vue-router"
import { getCircleDetail } from "@/api/circle"
import Nav from "@/components/NavBar.vue"
import { RISK_LEVEL } from "@/utils/contant"
import { useStore } from "vuex"
// const router = useRouter();
const route = useRoute();
const store = useStore();
const route = useRoute()
const store = useStore()
const detail = ref({
advisor: {},
});
})
const queryCircleDetail = async () => {
const ret = await getCircleDetail({ id: route.query.id });
const ret = await getCircleDetail({ id: route.query.id })
if (ret && ret.code === 0) {
detail.value = ret.data;
detail.value = ret.data
}
};
queryCircleDetail();
}
queryCircleDetail()
const toPaymentUrl = () => {
location.href = detail.value.page.paymentUrl;
};
location.href = detail.value.page.paymentUrl
}
</script>
<style lang="scss" scoped>
.page {
height: 100%;
}
.content-wrap {
height: calc(100% - 180px);
overflow-y: scroll;
position: relative;
box-sizing: border-box;
.content {
min-height: calc(100% - 148px);
}
}
.circle-base-info {
padding: 32px 0;
margin: 0 32px;
@ -139,17 +160,13 @@ const toPaymentUrl = () => {
}
}
.tip {
padding: 32px 32px 200px 32px;
padding: 20px 32px 20px 32px;
background: #f5f6fa;
font-size: 24px;
color: #9aa4b6;
line-height: 36px;
}
.footer {
position: fixed;
left: 0;
right: 0;
bottom: 0;
box-shadow: 0px -4px 15px #eff2f1;
background: #fff;
.buy-list {

View File

@ -1,105 +1,105 @@
<template>
<div class="circle-item"
@click="toCircleDetail">
<img class="cover" src="" alt="">
<div class="circle-info">
<div class="circle-item" @click="toCircleDetail">
<img class="cover" :src="item.coverImage" alt="" />
<div class="circle-info">
<h3>{{ item.name }}</h3>
<p>{{ item.remark }}</p>
<div class="price">
<div class="tg-info">
<img class="photo" :src="item.advisor.avatar" alt="" srcset="">
<img class="photo" :src="item.advisor.avatar" alt="" srcset="" />
<span>{{ item.showName }}</span>
</div>
<!-- <h5><strong>19333</strong>/6个月</h5> -->
<h5>{{ item.authorityId?'收费':'免费' }}</h5>
<h5>{{ item.authorityId ? "收费" : "免费" }}</h5>
</div>
</div>
</div>
</template>
<script setup>
import { defineProps } from "vue";
import { useRouter, useRoute } from "vue-router";
import { defineProps } from "vue"
import { useRouter, useRoute } from "vue-router"
/**
* 路由实例
*/
const router = useRouter();
const route = useRoute();
const router = useRouter()
const route = useRoute()
const props = defineProps({
item: {
type: Object,
default: () => {},
},
});
})
const toCircleDetail = () => {
if(props.item.authorityId) {
if (props.item.authorityId) {
router.push(
`/circle?id=${props.item.id}&saleUserId=${route.query.saleUserId || ''}`
`/circle?id=${props.item.id}&saleUserId=${route.query.saleUserId || ""}`
)
} else {
router.push(
`/circle/interact?id=${props.item.id}&saleUserId=${route.query.saleUserId || ''}`
`/circle/interact?id=${props.item.id}&saleUserId=${
route.query.saleUserId || ""
}`
)
}
}
</script>
<style lang="scss" scoped>
.circle-item{
.circle-item {
display: flex;
.cover {
display: block;
width: 168px;
height: 200px;
margin-right: 20px;
}
.circle-info {
display: flex;
.cover{
display: block;
width: 168px;
height: 200px;
margin-right: 20px;
flex-direction: column;
justify-content: space-between;
flex: 1;
h3 {
line-height: 58px;
font-size: 36px;
text-align: left;
}
.circle-info{
p {
font-size: 28px;
color: #999;
line-height: 36px;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2; //
-webkit-box-orient: vertical; //
}
.price {
display: flex;
flex-direction: column;
justify-content: space-between;
flex: 1;
h3{
line-height: 58px;
font-size: 36px;
text-align: left;
}
p{
font-size: 28px;
color: #999;
line-height: 36px;
text-align: left;
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-line-clamp:2; //
-webkit-box-orient:vertical; //
}
.price{
.tg-info {
display: flex;
justify-content: space-between;
.tg-info{
display: flex;
align-items: center;
img{
width: 32px;
height: 32px;
border-radius: 50%;
margin-right: 4px;
}
span{
font-size: 28px;
color: #999;
}
align-items: center;
img {
width: 32px;
height: 32px;
border-radius: 50%;
margin-right: 4px;
}
h5{
color: #2196f3;
span {
font-size: 28px;
strong {
font-size: 36px;
}
color: #999;
}
}
h5 {
color: #2196f3;
font-size: 28px;
strong {
font-size: 36px;
}
}
}
}
</style>
}
</style>

View File

@ -49,7 +49,7 @@
>
<LivePlayList v-if="active === 3" :id="route.query.id" />
<ShotVideoList v-else-if="active === 35" :id="route.query.id" />
<CircleList v-else-if="active === 1" :id="route.query.id"/>
<CircleList v-else-if="active === 1" :id="route.query.id" />
<Empty text="暂无内容" v-else />
</van-tab>
</van-tabs>
@ -58,50 +58,50 @@
</template>
<script setup>
import { ref } from "vue";
import { useRoute } from "vue-router";
import { ref } from "vue"
import { useRoute } from "vue-router"
// import Nav from "@/components/NavBar.vue";
import LivePlayList from "./components/LivePlayList.vue";
import LivePlayList from "./components/LivePlayList.vue"
// import ServerPackList from "./components/ServerPackList";
import ShotVideoList from "./components/ShotVideoList.vue";
import { queryTgInfo, queryTgTab } from "@/api/tg";
import { queryNotPlay, subLiveVideo } from "@/api/video";
import ShotVideoList from "./components/ShotVideoList.vue"
import { queryTgInfo, queryTgTab } from "@/api/tg"
import { queryNotPlay, subLiveVideo } from "@/api/video"
// import { attentionTg } from "@/api/index";
import { showToast } from "vant";
import { showToast } from "vant"
// import useShieldConfig from "@/hooks/useShieldConfig";
import Empty from "@/components/Empty.vue";
import CircleList from "./components/CircleList.vue";
import Empty from "@/components/Empty.vue"
import CircleList from "./components/CircleList.vue"
// const $shieldConfig = useShieldConfig();
const route = useRoute();
const active = ref(0);
const route = useRoute()
const active = ref(0)
const tabList = ref([]);
const tabList = ref([])
const detail = ref({});
const detail = ref({})
const getTgInfo = async () => {
let ret = await queryTgInfo({ id: route.query.id });
let ret = await queryTgInfo({ id: route.query.id })
if (ret.code === 0) {
detail.value = ret.data || {};
detail.value = ret.data || {}
}
};
getTgInfo();
}
getTgInfo()
const getTgTab = async () => {
let ret = await queryTgTab({ id: route.query.id });
let ret = await queryTgTab({ id: route.query.id })
if (ret.code === 0) {
tabList.value = ret.data;
tabList.value = ret.data
tabList.value.push({
"productType": 1,
"showName": "圈子",
"sort": 3,
"status": 1
productType: 1,
showName: "圈子",
sort: 3,
status: 1,
})
}
};
}
getTgTab();
getTgTab()
//
// async function subAdvisor() {
@ -119,42 +119,42 @@ getTgTab();
// showToast("Demo");
// };
const openActive = ref(false);
const openActive = ref(false)
const openProfile = () => {
openActive.value = !openActive.value;
};
openActive.value = !openActive.value
}
const notPlayObj = ref({});
const notPlayObj = ref({})
const getNotPlay = async () => {
let ret = await queryNotPlay({ advisorId: route.query.id });
let ret = await queryNotPlay({ advisorId: route.query.id })
if (ret && ret.code === 0) {
notPlayObj.value = ret.data;
notPlayObj.value = ret.data
}
};
getNotPlay();
}
getNotPlay()
const disableSub = ref(false);
const disableSub = ref(false)
const setSubLiveVideo = async () => {
if (disableSub.value) return;
disableSub.value = true;
if (disableSub.value) return
disableSub.value = true
let ret = await subLiveVideo({
id: notPlayObj.value.videoId,
option: notPlayObj.value.isSubscribe === 1 ? 2 : 1,
saleUserId: route.query.saleUserId,
}).catch(() => {
disableSub.value = false;
});
disableSub.value = false;
disableSub.value = false
})
disableSub.value = false
if (ret.code === 0) {
showToast(notPlayObj.value.isSubscribe === 1 ? "已取消预约" : "预约成功!");
notPlayObj.value.isSubscribe = notPlayObj.value.isSubscribe === 1 ? 2 : 1;
showToast(notPlayObj.value.isSubscribe === 1 ? "已取消预约" : "预约成功!")
notPlayObj.value.isSubscribe = notPlayObj.value.isSubscribe === 1 ? 2 : 1
}
};
}
</script>
<style scoped lang="scss">
.page {
height: 100%;
background: rgba(245, 246, 247, 1);
background: #fff;
}
.right-icon {
img {
@ -164,7 +164,7 @@ const setSubLiveVideo = async () => {
}
.tg-info {
display: flex;
background: url("../../assets/images/tg-bg.png") no-repeat center;
background-image: linear-gradient(#fc632f, #fea203, #fff);
background-size: cover;
text-align: left;
padding: 32px 32px 0;
@ -183,12 +183,12 @@ const setSubLiveVideo = async () => {
margin-bottom: 24px;
h4 {
font-size: 40px;
color: rgb(116, 66, 29);
color: #fff;
margin-right: 16px;
}
p {
font-size: 24px;
color: rgb(170, 136, 108);
color: #fff;
}
}
.tag {
@ -197,10 +197,10 @@ const setSubLiveVideo = async () => {
li {
padding: 8px 12px;
border-radius: 4px;
border: 1px solid rgba(170, 136, 108, 0.5);
border: 1px solid #fff;
font-size: 20px;
margin-right: 16px;
color: rgba(170, 136, 108, 1);
color: #fff;
}
}
}
@ -209,7 +209,7 @@ const setSubLiveVideo = async () => {
position: relative;
z-index: 1;
padding: 24px;
margin: -140px 32px 24px;
margin: -140px 32px 0;
background: #fff;
border-radius: 20px;
p {
@ -244,6 +244,7 @@ const setSubLiveVideo = async () => {
::v-deep(.van-tabs__wrap),
::v-deep(.van-tabs__content) {
padding: 0 32px;
background: #fff;
}
::v-deep(.van-tabs__wrap) {
margin-bottom: 10px;
@ -255,7 +256,7 @@ const setSubLiveVideo = async () => {
}
::v-deep .van-tabs__wrap {
margin-bottom: 20px;
border-bottom: 0.5px solid rgba(235, 236, 237, 1);
// border-bottom: 0.5px solid rgba(235, 236, 237, 1);
padding-bottom: 8px;
.van-tabs__nav {
padding-left: 0;

View File

@ -1,5 +1,5 @@
<template>
<p class="kajuan" @click="showOwnDiscount">我的卡券</p>
<!-- <p class="kajuan" @click="showOwnDiscount">我的卡券</p> -->
<div class="list-wrap">
<div v-for="(item, index) in cartVOList || []" :key="index">
<ProductItem
@ -29,56 +29,55 @@
</template>
<script setup>
import { ref, defineProps, onBeforeUnmount, onMounted } from "vue";
import { useRoute } from "vue-router";
import ServerItem from "@/components/ServerItem.vue";
import Empty from "@/components/Empty.vue";
import { queryCartList } from "@/api/video";
import emitter from "@/utils/emitter";
import ProductItem from "../components/ProductItem.vue";
import OwnDiscount from "../components/OwnDiscount.vue";
import useDisableScroll from "@/hooks/useDisableScroll";
import { nextTick } from "vue";
const { addScrollEvent } = useDisableScroll();
import { ref, defineProps, onBeforeUnmount, onMounted } from "vue"
import { useRoute } from "vue-router"
import ServerItem from "@/components/ServerItem.vue"
import Empty from "@/components/Empty.vue"
import { queryCartList } from "@/api/video"
import emitter from "@/utils/emitter"
import ProductItem from "../components/ProductItem.vue"
import OwnDiscount from "../components/OwnDiscount.vue"
import useDisableScroll from "@/hooks/useDisableScroll"
const { addScrollEvent } = useDisableScroll()
defineProps({
tgId: {
type: String,
default: "",
},
});
})
onMounted(() => {
addScrollEvent(".list-wrap");
});
addScrollEvent(".list-wrap")
})
onBeforeUnmount(() => {
emitter.off("updateCar");
});
emitter.off("updateCar")
})
const route = useRoute();
const cartVOList = ref([]);
const route = useRoute()
const cartVOList = ref([])
const getCartList = async () => {
let ret = await queryCartList({
id: route.query.id,
});
})
if (ret.code === 0) {
cartVOList.value = ret.data;
cartVOList.value = ret.data
}
};
}
getCartList();
getCartList()
emitter.on("updateCar", () => {
getCartList();
});
const ownDiscountShow = ref(false);
const ownDiscountRef = ref();
const showOwnDiscount = () => {
ownDiscountShow.value = true;
nextTick(() => {
ownDiscountRef.value.showPopup = true;
});
};
getCartList()
})
const ownDiscountShow = ref(false)
const ownDiscountRef = ref()
// const showOwnDiscount = () => {
// ownDiscountShow.value = true
// nextTick(() => {
// ownDiscountRef.value.showPopup = true
// })
// }
</script>
<style scoped lang="scss">
.list-wrap {