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, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "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", "build:pro": "sh ./build/deploy_prod.sh",
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },

View File

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

View File

@ -1,105 +1,105 @@
<template> <template>
<div class="circle-item" <div class="circle-item" @click="toCircleDetail">
@click="toCircleDetail"> <img class="cover" :src="item.coverImage" alt="" />
<img class="cover" src="" alt=""> <div class="circle-info">
<div class="circle-info">
<h3>{{ item.name }}</h3> <h3>{{ item.name }}</h3>
<p>{{ item.remark }}</p> <p>{{ item.remark }}</p>
<div class="price"> <div class="price">
<div class="tg-info"> <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> <span>{{ item.showName }}</span>
</div> </div>
<!-- <h5><strong>19333</strong>/6个月</h5> --> <!-- <h5><strong>19333</strong>/6个月</h5> -->
<h5>{{ item.authorityId?'收费':'免费' }}</h5> <h5>{{ item.authorityId ? "收费" : "免费" }}</h5>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script setup> <script setup>
import { defineProps } from "vue"; import { defineProps } from "vue"
import { useRouter, useRoute } from "vue-router"; import { useRouter, useRoute } from "vue-router"
/** /**
* 路由实例 * 路由实例
*/ */
const router = useRouter(); const router = useRouter()
const route = useRoute(); const route = useRoute()
const props = defineProps({ const props = defineProps({
item: { item: {
type: Object, type: Object,
default: () => {}, default: () => {},
}, },
}); })
const toCircleDetail = () => { const toCircleDetail = () => {
if(props.item.authorityId) { if (props.item.authorityId) {
router.push( router.push(
`/circle?id=${props.item.id}&saleUserId=${route.query.saleUserId || ''}` `/circle?id=${props.item.id}&saleUserId=${route.query.saleUserId || ""}`
) )
} else { } else {
router.push( router.push(
`/circle/interact?id=${props.item.id}&saleUserId=${route.query.saleUserId || ''}` `/circle/interact?id=${props.item.id}&saleUserId=${
route.query.saleUserId || ""
}`
) )
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.circle-item{ .circle-item {
display: flex;
.cover {
display: block;
width: 168px;
height: 200px;
margin-right: 20px;
}
.circle-info {
display: flex; display: flex;
.cover{ flex-direction: column;
display: block; justify-content: space-between;
width: 168px; flex: 1;
height: 200px; h3 {
margin-right: 20px; 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; display: flex;
flex-direction: column;
justify-content: space-between; justify-content: space-between;
flex: 1; .tg-info {
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{
display: flex; display: flex;
justify-content: space-between; align-items: center;
.tg-info{ img {
display: flex; width: 32px;
align-items: center; height: 32px;
img{ border-radius: 50%;
width: 32px; margin-right: 4px;
height: 32px;
border-radius: 50%;
margin-right: 4px;
}
span{
font-size: 28px;
color: #999;
}
} }
h5{ span {
color: #2196f3;
font-size: 28px; font-size: 28px;
strong { color: #999;
font-size: 36px; }
} }
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" /> <LivePlayList v-if="active === 3" :id="route.query.id" />
<ShotVideoList v-else-if="active === 35" :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 /> <Empty text="暂无内容" v-else />
</van-tab> </van-tab>
</van-tabs> </van-tabs>
@ -58,50 +58,50 @@
</template> </template>
<script setup> <script setup>
import { ref } from "vue"; import { ref } from "vue"
import { useRoute } from "vue-router"; import { useRoute } from "vue-router"
// import Nav from "@/components/NavBar.vue"; // import Nav from "@/components/NavBar.vue";
import LivePlayList from "./components/LivePlayList.vue"; import LivePlayList from "./components/LivePlayList.vue"
// import ServerPackList from "./components/ServerPackList"; // import ServerPackList from "./components/ServerPackList";
import ShotVideoList from "./components/ShotVideoList.vue"; import ShotVideoList from "./components/ShotVideoList.vue"
import { queryTgInfo, queryTgTab } from "@/api/tg"; import { queryTgInfo, queryTgTab } from "@/api/tg"
import { queryNotPlay, subLiveVideo } from "@/api/video"; import { queryNotPlay, subLiveVideo } from "@/api/video"
// import { attentionTg } from "@/api/index"; // import { attentionTg } from "@/api/index";
import { showToast } from "vant"; import { showToast } from "vant"
// import useShieldConfig from "@/hooks/useShieldConfig"; // import useShieldConfig from "@/hooks/useShieldConfig";
import Empty from "@/components/Empty.vue"; import Empty from "@/components/Empty.vue"
import CircleList from "./components/CircleList.vue"; import CircleList from "./components/CircleList.vue"
// const $shieldConfig = useShieldConfig(); // const $shieldConfig = useShieldConfig();
const route = useRoute(); const route = useRoute()
const active = ref(0); const active = ref(0)
const tabList = ref([]); const tabList = ref([])
const detail = ref({}); const detail = ref({})
const getTgInfo = async () => { const getTgInfo = async () => {
let ret = await queryTgInfo({ id: route.query.id }); let ret = await queryTgInfo({ id: route.query.id })
if (ret.code === 0) { if (ret.code === 0) {
detail.value = ret.data || {}; detail.value = ret.data || {}
} }
}; }
getTgInfo(); getTgInfo()
const getTgTab = async () => { const getTgTab = async () => {
let ret = await queryTgTab({ id: route.query.id }); let ret = await queryTgTab({ id: route.query.id })
if (ret.code === 0) { if (ret.code === 0) {
tabList.value = ret.data; tabList.value = ret.data
tabList.value.push({ tabList.value.push({
"productType": 1, productType: 1,
"showName": "圈子", showName: "圈子",
"sort": 3, sort: 3,
"status": 1 status: 1,
}) })
} }
}; }
getTgTab(); getTgTab()
// //
// async function subAdvisor() { // async function subAdvisor() {
@ -119,42 +119,42 @@ getTgTab();
// showToast("Demo"); // showToast("Demo");
// }; // };
const openActive = ref(false); const openActive = ref(false)
const openProfile = () => { const openProfile = () => {
openActive.value = !openActive.value; openActive.value = !openActive.value
}; }
const notPlayObj = ref({}); const notPlayObj = ref({})
const getNotPlay = async () => { const getNotPlay = async () => {
let ret = await queryNotPlay({ advisorId: route.query.id }); let ret = await queryNotPlay({ advisorId: route.query.id })
if (ret && ret.code === 0) { 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 () => { const setSubLiveVideo = async () => {
if (disableSub.value) return; if (disableSub.value) return
disableSub.value = true; disableSub.value = true
let ret = await subLiveVideo({ let ret = await subLiveVideo({
id: notPlayObj.value.videoId, id: notPlayObj.value.videoId,
option: notPlayObj.value.isSubscribe === 1 ? 2 : 1, option: notPlayObj.value.isSubscribe === 1 ? 2 : 1,
saleUserId: route.query.saleUserId, saleUserId: route.query.saleUserId,
}).catch(() => { }).catch(() => {
disableSub.value = false; disableSub.value = false
}); })
disableSub.value = false; disableSub.value = false
if (ret.code === 0) { if (ret.code === 0) {
showToast(notPlayObj.value.isSubscribe === 1 ? "已取消预约" : "预约成功!"); showToast(notPlayObj.value.isSubscribe === 1 ? "已取消预约" : "预约成功!")
notPlayObj.value.isSubscribe = notPlayObj.value.isSubscribe === 1 ? 2 : 1; notPlayObj.value.isSubscribe = notPlayObj.value.isSubscribe === 1 ? 2 : 1
} }
}; }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.page { .page {
height: 100%; height: 100%;
background: rgba(245, 246, 247, 1); background: #fff;
} }
.right-icon { .right-icon {
img { img {
@ -164,7 +164,7 @@ const setSubLiveVideo = async () => {
} }
.tg-info { .tg-info {
display: flex; display: flex;
background: url("../../assets/images/tg-bg.png") no-repeat center; background-image: linear-gradient(#fc632f, #fea203, #fff);
background-size: cover; background-size: cover;
text-align: left; text-align: left;
padding: 32px 32px 0; padding: 32px 32px 0;
@ -183,12 +183,12 @@ const setSubLiveVideo = async () => {
margin-bottom: 24px; margin-bottom: 24px;
h4 { h4 {
font-size: 40px; font-size: 40px;
color: rgb(116, 66, 29); color: #fff;
margin-right: 16px; margin-right: 16px;
} }
p { p {
font-size: 24px; font-size: 24px;
color: rgb(170, 136, 108); color: #fff;
} }
} }
.tag { .tag {
@ -197,10 +197,10 @@ const setSubLiveVideo = async () => {
li { li {
padding: 8px 12px; padding: 8px 12px;
border-radius: 4px; border-radius: 4px;
border: 1px solid rgba(170, 136, 108, 0.5); border: 1px solid #fff;
font-size: 20px; font-size: 20px;
margin-right: 16px; margin-right: 16px;
color: rgba(170, 136, 108, 1); color: #fff;
} }
} }
} }
@ -209,7 +209,7 @@ const setSubLiveVideo = async () => {
position: relative; position: relative;
z-index: 1; z-index: 1;
padding: 24px; padding: 24px;
margin: -140px 32px 24px; margin: -140px 32px 0;
background: #fff; background: #fff;
border-radius: 20px; border-radius: 20px;
p { p {
@ -244,6 +244,7 @@ const setSubLiveVideo = async () => {
::v-deep(.van-tabs__wrap), ::v-deep(.van-tabs__wrap),
::v-deep(.van-tabs__content) { ::v-deep(.van-tabs__content) {
padding: 0 32px; padding: 0 32px;
background: #fff;
} }
::v-deep(.van-tabs__wrap) { ::v-deep(.van-tabs__wrap) {
margin-bottom: 10px; margin-bottom: 10px;
@ -255,7 +256,7 @@ const setSubLiveVideo = async () => {
} }
::v-deep .van-tabs__wrap { ::v-deep .van-tabs__wrap {
margin-bottom: 20px; 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; padding-bottom: 8px;
.van-tabs__nav { .van-tabs__nav {
padding-left: 0; padding-left: 0;

View File

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