Browse Source

数据替换

dev_des
1054425342@qq.com 2 months ago
parent
commit
94e34bd3e8
  1. 31
      components/CustomTabBar.vue
  2. 22
      components/DynamicIsland.vue
  3. 90
      components/ProductSection.vue
  4. 14
      pages/index/index.vue
  5. 4
      static/js/request.js

31
components/CustomTabBar.vue

@ -1,17 +1,22 @@
<template>
<view class="custom-tab-bar">
<view
class="tab-item"
v-for="(item, i) in tabBarList"
:key="i"
v-if="tabBarShowList[i]"
@click="switchTab(i)"
>
<text :style="{ color: currentTab === i ? item.selectColor : '#fff' }">{{
item.text
}}</text>
</view>
</view>
<view class="">
<!-- <view class="" style="width: 100%;height: 130rpx;">
</view> -->
<view class="custom-tab-bar">
<view
class="tab-item"
v-for="(item, i) in tabBarList"
:key="i"
v-if="tabBarShowList[i]"
@click="switchTab(i)"
>
<text :style="{ color: currentTab === i ? item.selectColor : '#fff' }">{{
item.text
}}</text>
</view>
</view>
</view>
</template>
<script>

22
components/DynamicIsland.vue

@ -23,10 +23,10 @@
<!-- 左侧欢迎信息 -->
<view class="left-section">
<view class="welcome-message">
<text class="welcome-text"
<view class="welcome-text"
>Hi!{{
userInfo && userInfo.token ? userInfo.nickname : "用户"
}}</text
}}</view
>
<text class="welcome-subtitle">欢迎回来~</text>
</view>
@ -440,7 +440,7 @@ export default {
display: flex;
flex-direction: column;
height: 100%;
padding: 24rpx 20rpx;
padding: 24rpx 25rpx;
opacity: 1;
visibility: visible;
transition: opacity 0.2s ease-in 0.1s, visibility 0s linear 0s;
@ -484,6 +484,10 @@ export default {
color: #000000;
font-weight: bold;
line-height: 1.2;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
max-width: 140rpx;
}
.welcome-subtitle {
@ -530,8 +534,7 @@ export default {
flex-direction: column;
justify-content: flex-end;
align-items: flex-start;
padding: 0 10rpx;
width: 160rpx;
width: 137rpx;
}
.time-reward-title {
@ -569,7 +572,7 @@ export default {
.right-section {
display: flex;
align-items: flex-end;
width: 375rpx;
width: 320rpx;
}
.avatar-container {
@ -620,6 +623,7 @@ export default {
display: flex;
align-items: center;
flex: 1;
color: #000000;
}
.stats-section {
@ -637,7 +641,7 @@ export default {
.stat-number {
font-size: 32rpx;
color: #ffffff;
color: #000000;
font-weight: bold;
line-height: 1;
margin-bottom: 4rpx;
@ -645,7 +649,7 @@ export default {
.stat-label {
font-size: 28rpx;
color: white;
color: #000000;
line-height: 1;
font-weight: bold;
margin-top: 20rpx;
@ -757,7 +761,7 @@ export default {
// }
// }
.action-text-box {
color: white;
color: #000000;
.action-text-box-des {
font-size: 20rpx;

90
components/ProductSection.vue

@ -1,10 +1,10 @@
<template>
<view class="product-section">
<view class="product-section" :style="{'background-color':color}">
<!-- 商品标题区域 -->
<view class="title-section" :style="{ background: titleBgColor }">
<div style="display: flex; align-items: center" @click="handleMoreClick">
<view class="title-section" >
<div style="display: flex; align-items: center;justify-content: space-between;" @click="handleMoreClick">
<text class="title">{{ title }}</text>
<text class="more-btn">更多</text>
<view class="more-btn">更多 <uni-icons size="16" color="#000000" type="arrowright" /></view>
</div>
</view>
@ -26,6 +26,12 @@
<view class="image-overlay" v-if="!isFeel"></view>
<!-- 智能体标签 -->
<view class="content-box-info" v-if="!isFeel&&item.agent">
<!-- 头像 -->
<image
class="avatar"
:src="showImg(item.agent.headImage)"
mode="aspectFill"
></image>
<view class="ai-tag">
<view
class="ai-label"
@ -35,20 +41,15 @@
}"
>智能体</view
>
<text class="ai-name">{{ item.agent.name }}</text>
</view>
<!-- 头像 -->
<image
class="avatar"
:src="showImg(item.agent.headImage)"
mode="aspectFill"
></image>
<view class="ai-name">{{ item.agent.name }}</view>
</view>
</view>
<view class="card-content">
<view class="title-price-heart">
<view class="card-title">{{ item.title }}</view>
<view class="card-price">{{ item.price }}</view>
<view class="card-price">{{ item.price }}</view>
<image
v-if="!item.type"
class="heart-icon"
@ -125,6 +126,10 @@ export default {
type: Boolean,
default: false,
},
color: {
type: String,
default: "#D3FCFF",
},
},
methods: {
@ -194,23 +199,28 @@ export default {
}
.product-section {
width: 100%;
background-color: #D3FCFF;
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;
}
//
.title-section {
padding: 14rpx 24rpx 8rpx;
margin: 40rpx 16rpx 0rpx;
display: inline-block;
border-radius: 14rpx 14rpx 0 0;
padding: 0rpx 0 30rpx;
width: 100%;
.title {
font-size: 36rpx;
font-weight: 500;
color: #4d4d4d;
font-size: 34rpx;
font-weight: bold;
color: #000000;
}
.more-btn {
font-size: 20rpx;
color: #999999;
font-size: 26rpx;
color: #000000;
margin-left: 35rpx;
}
}
@ -220,16 +230,14 @@ export default {
display: flex;
flex-direction: column;
gap: 24rpx;
background-color: white;
padding: 22rpx;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08);
}
//
.product-card {
background: #ffffff;
border-radius: 24rpx;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1),
0 0 0 1rpx rgba(255, 255, 255, 0.2) inset;
overflow: hidden;
transition: transform 0.2s ease;
@ -241,16 +249,16 @@ export default {
//
.card-image-container {
position: relative;
height: 200rpx;
height: 320rpx;
overflow: hidden;
border-radius: 20rpx;
border-radius: 20rpx 20rpx 0 0 ;
}
.card-image {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 20rpx;
border-radius: 20rpx 20rpx 0 0 ;
}
//
@ -268,26 +276,23 @@ export default {
//
.content-box-info {
position: absolute;
top: 0rpx;
left: 0rpx;
display: flex;
align-items: center;
justify-content: space-between;
width: 666rpx;
top: 30rpx;
right: 20rpx;
padding: 0rpx 20rpx;
text-align: center;
}
.ai-tag {
padding: 8rpx 0rpx;
display: flex;
align-items: center;
gap: 8rpx;
.ai-label {
}
.ai-label {
border: 1rpx solid;
padding: 0rpx 15rpx;
height: 40rpx;
line-height: 38rpx;
font-weight: bold;
font-size: 16rpx;
font-size: 20rpx;
border-radius: 4rpx;
}
@ -297,8 +302,6 @@ export default {
color: #ffffff;
margin-left: 10rpx;
}
}
//
.avatar {
width: 119rpx;
@ -308,8 +311,7 @@ export default {
//
.card-content {
padding: 24rpx 0;
padding-bottom: 0;
padding: 18rpx;
}
.title-price-heart {
@ -320,8 +322,7 @@ export default {
}
.card-title {
font-size: 27rpx;
font-weight: bold;
font-size: 30rpx;
color: #000000;
line-height: 1.4;
flex: 1;
@ -332,8 +333,7 @@ export default {
}
.card-price {
font-size: 36rpx;
font-weight: bold;
font-size: 30rpx;
color: #000000;
margin-right: 24rpx;
flex-shrink: 0;

14
pages/index/index.vue

@ -20,23 +20,25 @@
<!-- 权益商品区域 -->
<ProductSection
v-show="productList.length"
title="权益商品"
title="EPIC SOUL文旅权益商品"
:productList="productList"
moreUrl="/subPackages/equityGoods/index"
detailUrlPrefix="/subPackages/equityGoods/detail"
@like-toggle="handleLikeToggle"
color="#D2FFDE"
/>
<ProductSection
titleBgColor="#92FF8F"
aiTagTextColor="#08FB05"
aiTagBorderColor="#6EAA3D"
title="有感商品"
title="EPIC SOUL文化有感商品"
:productList="productListFeeling"
moreUrl="/pages/index/sensoryStore"
detailUrlPrefix="/subPackages/techan/detail"
@like-toggle="handleLikeToggle"
isFeel
color="#D3FCFF"
/>
<view class="tab-bar-placeholder"></view>
</view>
@ -94,8 +96,8 @@ export default {
{
id: 34,
image:
"https://epic.js-dyyj.com/uploads/20250728/22e319f3feb1b63fbb539d425c51fe70.png",
title: "OUT OF SPACE 东方线香",
"https://epic.js-dyyj.com/uploads/20250822/f0ade3dd98a5a5e24ed0b60a023979e4.png",
title: "中国神仙IP系列 丝织品",
price: "138.00",
isLiked: true,
isShop: true,
@ -103,8 +105,8 @@ export default {
{
id: 32,
image:
"https://epic.js-dyyj.com/uploads/20250728/cc9907153c887a6428283a407928db9a.png",
title: "AI-Agent智能玩具",
"https://epic.js-dyyj.com/uploads/20250822/19b1fb3e07fd459d347e727274af445c.png",
title: "仙人乘槎 马克杯",
price: "398.00",
isLiked: false,
},

4
static/js/request.js

@ -7,8 +7,8 @@ const DEV_API_URL = 'https://epic.js-dyyj.com';
// const PROD_API_URL = 'https://epic.js-dyyj.com';
const PROD_API_URL = 'https://epic.new.js-dyyj.com';
const NEWAPIURL = process.env.NODE_ENV === 'development' ? DEV_API_URL : PROD_API_URL;
const DEV_API_URL_DES = 'http://192.168.124.118:8083/xcx';
// const DEV_API_URL_DES = 'https://des.js-dyyj.com/xcx';
// const DEV_API_URL_DES = 'http://192.168.124.118:8083/xcx';
const DEV_API_URL_DES = 'https://des.js-dyyj.com/xcx';
const PROD_API_URL_DES = 'https://des.js-dyyj.com/xcx';
const NEWAPIURL_DES = process.env.NODE_ENV === 'development' ? DEV_API_URL_DES : PROD_API_URL_DES;
const getToken = () => {

Loading…
Cancel
Save