Browse Source

IP合作体

dev_des
1054425342@qq.com 1 month ago
parent
commit
6add555b45
  1. 12
      components/Book.vue
  2. 12
      components/DynamicIsland.vue
  3. 384
      components/IPComponents.vue
  4. 5
      pages/index/index.vue
  5. BIN
      static/image/tabbar/agent.png
  6. BIN
      static/image/tabbar/agent_select.png
  7. 12
      subPackages/orderQy/detail.vue

12
components/Book.vue

@ -21,7 +21,7 @@
@click="prevSlide"
v-if="list.length > 1 && currentIndex > 0"
>
<uni-icons size="16" color="white" type="left" />
<image style="width: 50rpx;height: 50rpx;" :src="showImg('/uploads/20250908/29beeddf1e45571d2c5a4187f2f1ae05.png')"></image>
</view>
<!-- 轮播内容 -->
@ -66,7 +66,7 @@
@click="nextSlide"
v-if="list.length > 1 && currentIndex < list.length - 1"
>
<uni-icons size="16" color="white" type="arrowright" />
<image style="width: 50rpx;height: 50rpx;" :src="showImg('/uploads/20250908/6622b3699518d6b559e1241d7addb7af.png')"></image>
</view>
</view>
</view>
@ -278,7 +278,6 @@ export default {
transform: translateY(-50%);
width: 60rpx;
height: 60rpx;
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
display: flex;
align-items: center;
@ -286,13 +285,6 @@ export default {
cursor: pointer;
z-index: 3;
transition: all 0.3s ease;
backdrop-filter: blur(10rpx);
&:hover {
background: rgba(255, 255, 255, 0.3);
transform: translateY(-50%) scale(1.1);
}
&.left-arrow {
left: 0rpx;
}

12
components/DynamicIsland.vue

@ -30,7 +30,7 @@
<text class="profile-name">EVITA</text>
</view>
<view class="platform-link">
<view class="link-text" @click="toDesInfo" >DES介绍 >>
<view class="link-text" @click="toDesInfo" >交响介绍 >>
</view>
<!-- <view class="link-text">DES广播 >></view> -->
</view>
@ -46,7 +46,7 @@
}}欢迎回来~</view>
</view>
<view class="" style="font-size: 24rpx;font-weight: bold;color: #000000;">
查看您的DES数据资产行
查看您的交响数据文化资产行
</view>
<view class="" style="display: flex;align-items: flex-end;justify-content: space-between;">
<view class="" @click="toOrder">
@ -54,14 +54,14 @@
<text class="stats-number">{{userInfo&&userInfo.unUseOrderQuantity||0}}</text>
<text class="stats-unit"></text>
</view>
<view class="stats-label">数字权益行</view>
<view class="stats-label">交响权益行</view>
</view>
<div @click="toTime">
<view class="stats-info" >
<text class="stats-number">{{userInfo&&userInfo.ipQuantity||0}}</text>
<text class="stats-unit"></text>
</view>
<view class="stats-label">数字资产行</view>
<view class="stats-label">交响资产行</view>
</div>
<view class="middle-section">
<view class="time-reward-container">
@ -70,7 +70,7 @@
<text class="time-reward-number">0</text>
<text class="time-reward-unit"></text>
</view>
<text class="time-reward-label" style="font-weight: bold;">旅行时间行</text>
<text class="time-reward-label" style="font-weight: bold;">交响时间行</text>
</view>
</view>
</view>
@ -93,7 +93,7 @@
<text class="time-reward-unit"></text>
</view>
<text class="time-reward-label"
style="font-size: 24rpx;font-weight: bold;">旅行时间行</text>
style="font-size: 24rpx;font-weight: bold;">交响时间行</text>
</view>
<view class="">
<view class="time-reward-number" style="font-size: 34rpx;">

384
components/IPComponents.vue

@ -0,0 +1,384 @@
<template>
<view class="product-section">
<view class="title-section">
<div
style="
display: flex;
align-items: center;
justify-content: space-between;
"
@click="handleMoreClick"
>
<text class="title">文化IP合作体</text>
</div>
</view>
<!-- 轮播容器 -->
<view class="carousel-container">
<!-- 左箭头 -->
<view
class="nav-arrow left-arrow"
@click="prevSlide"
v-if="list.length > 1 && currentIndex > 0"
>
<image style="width: 50rpx;height: 50rpx;" :src="showImg('/uploads/20250908/29beeddf1e45571d2c5a4187f2f1ae05.png')"></image>
</view>
<!-- 轮播内容 -->
<scroll-view
class="carousel-scroll"
scroll-x="true"
:show-scrollbar="false"
:enhanced="true"
:scroll-with-animation="true"
:scroll-left="scrollLeft"
@scroll="onScroll"
@scrollend="onScrollEnd"
>
<view class="carousel-content">
<view
class="carousel-item"
v-for="(item, index) in list"
:key="index"
@click="gotoUrlNew(item)"
v-if="item && item.image"
>
<view class="issue-card">
<!-- 背景图片 -->
<image
class="card-bg"
:src="showImg(item.image)"
mode="aspectFill"
></image>
<view class="title-info">
<view class="title-item">
{{item.title}}
</view>
<view class="title-des">
{{item.des}}
</view>
</view>
</view>
</view>
<!-- 无数据时的提示 -->
<view v-if="!list || list.length === 0" class="no-data">
<text>暂无数据</text>
</view>
</view>
</scroll-view>
<!-- 右箭头 -->
<view
class="nav-arrow right-arrow"
@click="nextSlide"
v-if="list.length > 1 && currentIndex < list.length - 1"
>
<image style="width: 50rpx;height: 50rpx;" :src="showImg('/uploads/20250908/6622b3699518d6b559e1241d7addb7af.png')"></image>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [{
image:'/uploads/20250908/bb069c36e88de7cde4e8dd24ac3b33b5.png',
title:'太湖',
des:'NAINO的异次元发现',
},
{
image:'/uploads/20250908/ab1ffc93875de79fc87ee2c5e70cad3f.png',
title:'SUNRISE日出东方',
des:'扬州瓜洲古渡',
},
{
image:'/uploads/20250908/4d38fcd2e403a13b85a96188de12a2a8.png',
title:'中国昆曲博物馆',
des:'姹紫婿红里',
},
{
image:'/uploads/20250908/d4115d6c907f8b3ed5d30a11f9912460.png',
title:'退思园',
des:'苏州古典园林生活',
}],
currentIndex: 0,
scrollLeft: 0,
itemWidth: 224, // 207rpx + 30rpx margin
JDSU_IMG_URL: "https://epic.js-dyyj.com",
};
},
mounted() {
// this.getList();
},
methods: {
handleMoreClick(){
uni.switchTab({
url:'/pages/index/readingBody'
})
},
getList() {
// this.Post(
// {
// type_id: 3,
// offset: 0,
// limit: 10, //
// },
// "/api/article/getArticleByType"
// ).then((res) => {
// if (res.data && res.data.length > 0) {
// this.list = res.data;
// //
// this.currentIndex = 0;
// this.scrollLeft = 0;
// }
// });
},
//
showImg(img) {
if (!img) return "";
if (img.indexOf("https://") != -1 || img.indexOf("http://") != -1) {
return img;
} else {
return this.JDSU_IMG_URL + img;
}
},
//
prevSlide() {
if (!this.validateData()) return;
if (this.list.length > 1) {
this.currentIndex =
this.currentIndex > 0 ? this.currentIndex - 1 : this.list.length - 1;
this.$nextTick(() => {
this.scrollToCurrentItem();
});
}
},
//
nextSlide() {
if (!this.validateData()) return;
if (this.list.length > 1) {
this.currentIndex =
this.currentIndex < this.list.length - 1 ? this.currentIndex + 1 : 0;
this.$nextTick(() => {
this.scrollToCurrentItem();
});
}
},
//
scrollToCurrentItem() {
//
if (this.currentIndex < 0) {
this.currentIndex = 0;
}
if (this.currentIndex >= this.list.length) {
this.currentIndex = this.list.length - 1;
}
const scrollPosition = this.currentIndex * this.itemWidth;
this.scrollLeft = scrollPosition;
},
//
onScroll(e) {
const scrollLeft = e.detail.scrollLeft;
const index = Math.round(scrollLeft / this.itemWidth);
if (
index !== this.currentIndex &&
index >= 0 &&
index < this.list.length
) {
this.currentIndex = index;
}
},
//
onScrollEnd(e) {
const scrollLeft = e.detail.scrollLeft;
const index = Math.round(scrollLeft / this.itemWidth);
//
this.currentIndex = Math.max(0, Math.min(index, this.list.length - 1));
this.$nextTick(() => {
this.scrollToCurrentItem();
});
},
//
handleItemClick(item) {
console.log("点击了卡片:", item);
//
},
//
validateData() {
if (!this.list || this.list.length === 0) {
this.currentIndex = 0;
this.scrollLeft = 0;
return false;
}
//
if (this.currentIndex < 0) {
this.currentIndex = 0;
}
if (this.currentIndex >= this.list.length) {
this.currentIndex = this.list.length - 1;
}
return true;
},
},
};
</script>
<style lang="scss" scoped>
.product-section {
width: 100%;
background-color: #fffdd6;
padding: 40rpx 25rpx;
margin: 30rpx 0;
border-radius: 40rpx;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1),
0 0 0 1rpx rgba(255, 255, 255, 0.2) inset;
}
//
.carousel-container {
position: relative;
width: 100%;
height: 191rpx ;
display: flex;
align-items: center;
justify-content: center;
}
//
.carousel-scroll {
width: 100%;
height: 100%;
white-space: nowrap;
}
//
.carousel-content {
display: flex;
align-items: center;
height: 100%;
min-width: max-content;
}
//
.carousel-item {
flex-shrink: 0;
width: 154rpx;
height: 191rpx;
margin: 0 7rpx;
will-change: transform;
}
//
.issue-card {
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
}
//
.card-bg {
width: 100%;
height: 100%;
}
//
.nav-arrow {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 60rpx;
height: 60rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 3;
transition: all 0.3s ease;
&.left-arrow {
left: 0rpx;
}
&.right-arrow {
right: 0rpx;
}
}
.arrow-icon {
font-size: 32rpx;
color: #ffffff;
font-weight: bold;
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.3);
}
//
.no-data {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 368rpx;
color: #999;
font-size: 28rpx;
}
//
.title-section {
display: inline-block;
padding: 0rpx 0 30rpx;
width: 100%;
.title {
font-size: 34rpx;
font-weight: bold;
color: #000000;
}
.more-btn {
font-size: 26rpx;
color: #000000;
margin-left: 35rpx;
}
}
.title-info{
position: absolute;
bottom: 10rpx;
right: 0;
width: 100%;
color: white;
padding: 0 5rpx;
.title-item{
text-align: center;
font-size: 16rpx;
font-weight: bold;
overflow: hidden;
word-wrap: normal;
text-overflow: ellipsis;
}
.title-des{
margin-top: 5rpx;
text-align: center;
font-size: 14rpx;
overflow: hidden;
word-wrap: normal;
text-overflow: ellipsis;
}
}
</style>

5
pages/index/index.vue

@ -18,6 +18,7 @@
/>
<view class="content" @click="handleContentClick">
<IPComponents></IPComponents>
<Book></Book>
<!-- 权益商品区域 -->
<ProductSection
@ -66,6 +67,7 @@ import CustomTabBar from "@/components/CustomTabBar.vue";
import DynamicIsland from "@/components/DynamicIsland.vue";
import ProductSection from "@/components/ProductSection.vue";
import Book from "@/components/Book.vue";
import IPComponents from "@/components/IPComponents.vue";
export default {
components: {
@ -74,7 +76,8 @@ export default {
MusicControl,
DynamicIsland,
ProductSection,
Book
Book,
IPComponents
},
computed: {
//

BIN
static/image/tabbar/agent.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/image/tabbar/agent_select.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

12
subPackages/orderQy/detail.vue

@ -683,9 +683,15 @@ export default {
reserveDelivery(goods) {
//
if (goods.status == 1) {
uni.navigateTo({
url: `/subPackages/orderQy/confrim?goodsId=${goods.goodsId}&orderChildId=${goods.childId}`,
});
if (goods.isVerify == 1) {
uni.navigateTo({
url: `/subPackages/orderQy/confrimWriteOff?goodsId=${goods.goodsId}&orderChildId=${goods.childId}`,
});
} else {
uni.navigateTo({
url: `/subPackages/orderQy/confrim?goodsId=${goods.goodsId}&orderChildId=${goods.childId}`,
});
}
} else {
this.showLogisticsInfo(goods);
}

Loading…
Cancel
Save