Browse Source

style样式优化

dev_des
1054425342@qq.com 3 months ago
parent
commit
6d233d6a8d
  1. 7
      components/ProductSection.vue
  2. 4
      components/WaterfallLayout.vue
  3. 153
      pages/index/iSoul.vue
  4. 18
      pages/index/index.vue
  5. 2
      pages/login/login.vue
  6. 167
      subPackages/equityGoods/detail.vue
  7. 31
      subPackages/equityGoods/list.vue
  8. 43
      uni_modules/uni-transition/components/uni-transition/uni-transition.vue

7
components/ProductSection.vue

@ -184,18 +184,18 @@ export default {
//
.title-section {
padding: 18rpx 24rpx;
padding: 14rpx 24rpx 8rpx ;
margin: 40rpx 16rpx 0rpx;
display: inline-block;
border-radius: 14rpx 14rpx 0 0;
.title {
font-size: 36rpx;
font-weight: bold;
font-weight: 500;
color: #4d4d4d;
}
.more-btn {
font-size: 18rpx;
font-size: 20rpx;
color: #999999;
margin-left: 35rpx;
}
@ -295,6 +295,7 @@ export default {
//
.card-content {
padding: 24rpx 0;
padding-bottom: 0;
}
.title-price-heart {

4
components/WaterfallLayout.vue

@ -27,7 +27,7 @@
<text class="username">{{ item.user.name }}</text>
</view>
<view class="like-info">
<text class="like-icon"></text>
<image :src="showImg('/uploads/20250731/0260884d7a44a483885a026da524e0b8.png')" style="height: 22rpx;width: 25rpx;"></image>
<text class="like-count">{{ item.likes }}</text>
</view>
</view>
@ -61,7 +61,7 @@
<text class="username">{{ item.user.name }}</text>
</view>
<view class="like-info">
<text class="like-icon"></text>
<image :src="showImg('/uploads/20250731/0260884d7a44a483885a026da524e0b8.png')" style="height: 22rpx;width: 25rpx;"></image>
<text class="like-count">{{ item.likes }}</text>
</view>
</view>

153
pages/index/iSoul.vue

@ -1,8 +1,13 @@
<template>
<view class="profile-container">
<view class="user-top" :style="{
backgroundImage: `url(${showImg('/uploads/20250728/4ad18fba010760a527d0cf5e24bcf467.png')})`,
}">
<view
class="user-top"
:style="{
backgroundImage: `url(${showImg(
'/uploads/20250728/4ad18fba010760a527d0cf5e24bcf467.png'
)})`,
}"
>
<!-- 状态栏占位 -->
<view class="status-bar-placeholder"></view>
<!-- 顶部导航 -->
@ -17,8 +22,11 @@
<!-- 用户信息区域 -->
<view class="user-section" @click="gotoProfile">
<view class="user-avatar">
<image :src="userInfo.avatar ? showImg(userInfo.avatar) : defaultAvatar" mode="aspectFill"
class="avatar-img"></image>
<image
:src="userInfo.avatar ? showImg(userInfo.avatar) : defaultAvatar"
mode="aspectFill"
class="avatar-img"
></image>
</view>
<view class="user-info">
<view class="username">{{ userInfo.nickname || "用户" }}</view>
@ -63,10 +71,23 @@
<view class="agent-title">待激活的Agent</view>
</view>
<view class="agent-content">
<scroll-view class="agent-scroll" scroll-x="true" show-scrollbar="false">
<scroll-view
class="agent-scroll"
scroll-x="true"
:show-scrollbar="false"
:enhanced="true"
>
<view class="agent-avatars">
<view class="agent-avatar" v-for="(agent, index) in agentList" :key="index">
<image :src="agent.avatar" mode="aspectFill" class="agent-img"></image>
<view
class="agent-avatar"
v-for="(agent, index) in agentList"
:key="index"
>
<image
:src="agent.avatar"
mode="aspectFill"
class="agent-img"
></image>
</view>
</view>
</scroll-view>
@ -85,10 +106,18 @@
<!-- 数字资产权益 -->
<view class="digital-assets">
<view class="asset-card">
<image :src="showImg('/uploads/20250729/42598a2dcf4c9a6f8c6e122e54b65c4f.png')" mode="aspectFill"
class="digital-img"></image>
<image
:src="
showImg('/uploads/20250729/42598a2dcf4c9a6f8c6e122e54b65c4f.png')
"
mode="aspectFill"
class="digital-img"
></image>
<view class="asset-actions">
<view class="asset-action active" @click="handleAssetAction('待核销')">
<view
class="asset-action active"
@click="handleAssetAction('待核销')"
>
<view class="action-icon red"></view>
<text>待核销</text>
</view>
@ -111,10 +140,18 @@
<!-- 有感商品 -->
<view class="feeling-goods">
<view class="goods-card">
<image :src="showImg('/uploads/20250729/a010feb51e3f195563fb440f9235cc8b.png')" mode="aspectFill"
class="digital-img"></image>
<image
:src="
showImg('/uploads/20250729/a010feb51e3f195563fb440f9235cc8b.png')
"
mode="aspectFill"
class="digital-img"
></image>
<view class="goods-actions">
<view class="goods-action active" @click="handleGoodsAction('购物车')">
<view
class="goods-action active"
@click="handleGoodsAction('购物车')"
>
<view class="action-icon red"></view>
<text>购物车</text>
</view>
@ -143,16 +180,26 @@
</view>
<view class="memorial-cards">
<view class="memorial-card" @click="handleMemorialClick(0)">
<image :src="showImg('/uploads/20250729/105755e9b2e570e46b96d54ed61abe51.png')" mode="aspectFill"
class="memorial-img"></image>
<image
:src="
showImg('/uploads/20250729/105755e9b2e570e46b96d54ed61abe51.png')
"
mode="aspectFill"
class="memorial-img"
></image>
<view class="memorial-info">
<text class="memorial-title">世界花园凤景里的苏州</text>
<text class="memorial-more">MORE</text>
</view>
</view>
<view class="memorial-card" @click="handleMemorialClick(1)">
<image :src="showImg('/uploads/20250729/42fe2364167c2342076c4e094df3d288.png')" mode="aspectFill"
class="memorial-img"></image>
<image
:src="
showImg('/uploads/20250729/42fe2364167c2342076c4e094df3d288.png')
"
mode="aspectFill"
class="memorial-img"
></image>
<view class="memorial-info">
<text class="memorial-title">男神女神罗曼史</text>
<text class="memorial-more">MORE</text>
@ -163,7 +210,12 @@
<!-- 底部菜单 -->
<view class="bottom-menu">
<view class="menu-item" v-for="(item, index) in menuItems" :key="index" @click="handleMenuClick(item)">
<view
class="menu-item"
v-for="(item, index) in menuItems"
:key="index"
@click="handleMenuClick(item)"
>
<text>{{ item.title }}</text>
</view>
</view>
@ -180,49 +232,56 @@
export default {
components: {
CustomTabBar,
MusicControl
MusicControl,
},
data() {
return {
userInfo: {},
defaultAvatar: "https://changshu.js-dyyj.com/uploads/20250326/516242619f0772bee371a60684618c01.png",
defaultAvatar:
"https://changshu.js-dyyj.com/uploads/20250326/516242619f0772bee371a60684618c01.png",
userStats: {
following: "140",
followers: "2462",
likes: "5.4万",
},
agentList: [{
avatar: "https://epic.js-dyyj.com/uploads/20250728/d27ef6e6c26877da7775664fed376c6f.png",
agentList: [
{
avatar:
"https://epic.js-dyyj.com/uploads/20250728/d27ef6e6c26877da7775664fed376c6f.png",
},
{
avatar: "https://epic.js-dyyj.com/uploads/20250728/d7bf0dd2f3f272afba687b525a7c575c.png",
avatar:
"https://epic.js-dyyj.com/uploads/20250728/d7bf0dd2f3f272afba687b525a7c575c.png",
},
{
avatar: "https://epic.js-dyyj.com/uploads/20250728/d27ef6e6c26877da7775664fed376c6f.png",
avatar:
"https://epic.js-dyyj.com/uploads/20250728/d27ef6e6c26877da7775664fed376c6f.png",
},
{
avatar: "https://epic.js-dyyj.com/uploads/20250728/d7bf0dd2f3f272afba687b525a7c575c.png",
avatar:
"https://epic.js-dyyj.com/uploads/20250728/d7bf0dd2f3f272afba687b525a7c575c.png",
},
],
menuItems: [{
menuItems: [
{
title: "账号与安全",
icon: "🔒"
icon: "🔒",
},
{
title: "购物车",
icon: "🛒"
icon: "🛒",
},
{
title: "地址管理",
icon: "📍"
icon: "📍",
},
{
title: "卡券中心",
icon: "🎫"
icon: "🎫",
},
{
title: "帮助与客服",
icon: "💬"
icon: "💬",
},
],
};
@ -235,7 +294,8 @@
this.userInfo =
(uni.getStorageSync("userInfo") &&
JSON.parse(uni.getStorageSync("userInfo"))) ||
this.$store.state.user.userInfo || {};
this.$store.state.user.userInfo ||
{};
console.log(this.userInfo);
},
methods: {
@ -282,7 +342,8 @@
case "帮助与客服":
uni.showModal({
title: "客服电话",
content: "0515-69186109\n服务时间:周一至周五\n9:00-12:00,13:00-18:00",
content:
"0515-69186109\n服务时间:周一至周五\n9:00-12:00,13:00-18:00",
confirmText: "拨打",
success: (res) => {
if (res.confirm) {
@ -403,7 +464,7 @@
display: flex;
justify-content: space-between;
align-items: center;
height: 40px;
height: 48px;
}
.back-btn,
@ -588,15 +649,18 @@
.agent-scroll {
width: 430rpx;
white-space: nowrap;
/* 微信小程序隐藏横向滚动条 */
overflow: hidden;
/* Webkit浏览器 */
&::-webkit-scrollbar {
display: none !important;
width: 0 !important;
height: 0 !important;
}
.agent-scroll::-webkit-scrollbar {
display: none;
}
.agent-scroll {
-ms-overflow-style: none;
/* Firefox */
scrollbar-width: none;
/* IE和Edge */
-ms-overflow-style: none;
}
.agent-avatars {
@ -635,7 +699,7 @@
}
.asset-bg::before {
content: '';
content: "";
position: absolute;
top: 0;
left: 0;
@ -829,7 +893,8 @@
border-bottom: none;
}
.user-top {}
.user-top {
}
.digital-img {
height: 265rpx;

18
pages/index/index.vue

@ -18,8 +18,6 @@
:productList="productList"
moreUrl="/subPackages/equityGoods/index"
detailUrlPrefix="/subPackages/equityGoods/detail"
@more-click="goToMore"
@product-click="goToDetail"
@like-toggle="handleLikeToggle"
/>
<ProductSection
@ -31,8 +29,6 @@
:productList="productListFeeling"
moreUrl="/pages/index/sensoryStore"
detailUrlPrefix="/subPackages/techan/detail"
@more-click="goToMore"
@product-click="goToDetail"
@like-toggle="handleLikeToggle"
isFeel
/>
@ -115,6 +111,9 @@ export default {
},
onShow() {
this.browse_record({ type: "page", title: "首页" });
this.$nextTick(() =>{
this.$refs.dynamicIsland.getUserInfo();
})
},
onPageScroll(e) {
// ID
@ -166,12 +165,7 @@ export default {
encodeURIComponent(JSON.stringify(item)),
});
},
//
goToDetail(item) {
uni.navigateTo({
url: "/subPackages/techan/detail?id=" + item.id,
});
},
//
handleLikeToggle({ item, index }) {
this.productList[index] = item;
@ -201,7 +195,11 @@ export default {
},
};
</script>
<style>
page{
}
</style>
<style lang="scss" scoped>
.bg {
min-height: 100vh;

2
pages/login/login.vue

@ -331,7 +331,7 @@ export default {
//
.btn-container {
margin-top: auto;
// margin-top: auto;
}
//

167
subPackages/equityGoods/detail.vue

@ -2,37 +2,21 @@
<view class="detail-container">
<!-- 轮播图区域 -->
<view class="banner-content">
<swiper
class="top-banner"
:circular="true"
:interval="6000"
:duration="800"
:indicator-dots="false"
:autoplay="true"
@change="swiperChange"
>
<swiper class="top-banner" :circular="true" :interval="6000" :duration="800" :indicator-dots="false"
:autoplay="true" @change="swiperChange">
<swiper-item v-for="(item, index) in topBanner" :key="index">
<image
class="top-banner"
:src="showImg(item)"
mode="aspectFill"
></image>
<image class="top-banner" :src="showImg(item)" mode="aspectFill"></image>
</swiper-item>
</swiper>
<view class="dot-container">
<view
:class="['dot-line', index == swiperIndex ? 'active' : '']"
v-for="(item, index) in topBanner"
:key="index"
></view>
<view :class="['dot-line', index == swiperIndex ? 'active' : '']" v-for="(item, index) in topBanner"
:key="index"></view>
</view>
<!-- 页码指示器 -->
<view class="page-indicator">
<text class="page-text"
>{{ swiperIndex + 1 }}/{{ topBanner.length }}</text
>
<text class="page-text">{{ swiperIndex + 1 }}/{{ topBanner.length }}</text>
</view>
</view>
@ -55,11 +39,9 @@
<text class="price">699.00</text>
</view>
<view class="collect-container">
<image
class="heart-icon"
<image class="heart-icon"
src="https://epic.js-dyyj.com/uploads/20250728/2f3ae212c01fa3b67be81abc5723cf5c.png"
@click.stop="handleLikeClick(item, index)"
></image>
@click.stop="handleLikeClick(item, index)"></image>
<text class="collect-count">1700收藏</text>
</view>
</view>
@ -92,27 +74,17 @@
<!-- 权益详情 -->
<view class="equity-details">
<!-- 显示前两个权益项 -->
<view
class="equity-detail-item"
v-for="(item, index) in displayEquityList"
:key="index"
>
<view class="equity-detail-item" v-for="(item, index) in displayEquityList" :key="index">
<view class="detail-content-wrapper">
<text class="detail-label">{{ item.label }}</text>
<text class="detail-content">{{ item.content }}</text>
</view>
<!-- 在最后一个显示项的右侧添加展开收起图标 -->
<view
v-if="index === displayEquityList.length - 1"
class="toggle-icon"
@click="toggleEquityExpand"
>
<view v-if="index === displayEquityList.length - 1" class="toggle-icon" @click="toggleEquityExpand">
<text class="icon-text">{{
isEquityExpanded ? "收起" : "展开"
}}</text>
<text class="icon-arrow" :class="{ expanded: isEquityExpanded }"
></text
>
<text class="icon-arrow" :class="{ expanded: isEquityExpanded }"></text>
</view>
</view>
</view>
@ -120,12 +92,8 @@
<!-- Tab切换区域 -->
<view class="tab-nav">
<view
v-for="(tab, index) in tabList"
:key="index"
:class="['tab-item', { active: currentTab === index }]"
@click="switchTab(index)"
>
<view v-for="(tab, index) in tabList" :key="index" :class="['tab-item', { active: currentTab === index }]"
@click="switchTab(index)">
<text class="tab-text">{{ tab.name }}</text>
</view>
</view>
@ -137,75 +105,30 @@
<!-- 登记证书 -->
<view v-if="currentTab === 0" class="tab-panel">
<view class="certificate-container">
<image
class="certificate-image"
<image class="certificate-image"
src="https://epic.js-dyyj.com/uploads/20250731/d7d5be03617e3cce94dc34e8de426395.png"
mode="widthFix"
></image>
mode="widthFix"></image>
</view>
</view>
<!-- IP资产详情 -->
<view v-if="currentTab === 1" class="tab-panel">
<view class="info-content">
<view class="info-item">
<text class="info-label">IP资产名称</text>
<text class="info-value">食在苏州世界美食之都巡礼</text>
</view>
<view class="info-item">
<text class="info-label">创作者</text>
<text class="info-value">苏州xxx博物馆</text>
</view>
<view class="info-item">
<text class="info-label">发行数量</text>
<text class="info-value">1000</text>
</view>
<view class="info-item">
<text class="info-label">发行时间</text>
<text class="info-value">2024年6月16日</text>
</view>
</view>
<image :src="
showImg('/uploads/20250731/0d8cb190c358c0cf52fab89bb98a0373.jpg')
" style="width: 100%" mode="widthFix"></image>
</view>
<!-- 数据商品详情 -->
<view v-if="currentTab === 2" class="tab-panel">
<image
:src="
<image :src="
showImg('/uploads/20250731/ecf91ddfb9f89658a7d82e3ff846f71c.png')
"
style="width: 100%"
mode="widthFix"
></image>
" style="width: 100%" mode="widthFix"></image>
</view>
<!-- 权益信息 -->
<view v-if="currentTab === 3" class="tab-panel">
<view class="equity-info-content">
<view
class="equity-info-item"
v-for="(item, index) in equityList"
:key="index"
>
<text class="equity-info-label">{{ item.label }}</text>
<text class="equity-info-value">{{ item.content }}</text>
</view>
<view class="equity-description">
<text class="description-text">
本数字文创作品基于区块链技术发行具有唯一性和不可篡改性持有者享有以下权益
1.
数字资产所有权获得该数字文创作品的完整所有权包括展示收藏等权利
2.
实物权益兑换可凭此数字资产兑换相应的实物文创产品包括限量版公仔纪念品等
3.
文化体验权益享受苏州相关文化场所的优惠门票专属活动参与资格等特殊权益
4.
增值收益权作为限量发行的数字资产具有一定的收藏价值和增值潜力
5.
社区会员权益加入专属收藏者社区享受优先购买新品参与线下活动等会员特权
以上权益的具体实施细则以官方最终解释为准部分权益可能存在时效性限制
</text>
</view>
</view>
<image :src="
showImg('/uploads/20250731/83af15ea93f0cd91eb780a7bb240257a.jpg')
" style="width: 100%" mode="widthFix"></image>
</view>
</view>
</view>
@ -231,26 +154,42 @@ export default {
swiperIndex: 0,
isEquityExpanded: false, //
currentTab: 0, // tab
tabList: [
{ name: "登记证书" },
{ name: "IP资产详情" },
{ name: "资源商品详情" },
{ name: "权益信息详情" },
tabList: [{
name: "登记证书"
},
{
name: "IP资产详情"
},
{
name: "资源商品详情"
},
{
name: "资源商品详情"
},
],
equityList: [
//
{ label: "权益1:", content: "数字资产*1、数字资产*1" },
{ label: "权益2:", content: "IP文创公仔*1、IP文创公仔*1" },
{ label: "权益3:", content: "XX园林门票*1、XX园林门票*1" },
{
label: "权益1:",
content: "数字资产*1、数字资产*1"
},
{
label: "权益2:",
content: "IP文创公仔*1、IP文创公仔*1"
},
{
label: "权益3:",
content: "XX园林门票*1、XX园林门票*1"
},
],
};
},
computed: {
//
displayEquityList() {
return this.isEquityExpanded
? this.equityList
: this.equityList.slice(0, 2);
return this.isEquityExpanded ?
this.equityList :
this.equityList.slice(0, 2);
},
},
methods: {
@ -374,7 +313,7 @@ export default {
.remaining {
color: #808080;
font-size: 17rpx;
font-size: 22rpx;
margin-left: auto;
}
}
@ -542,12 +481,14 @@ export default {
}
}
}
// Tab
.tab-nav {
margin: 0 40rpx;
margin-top: 40rpx;
display: flex;
justify-content: space-between;
.tab-item {
padding: 10rpx 20rpx;
text-align: center;
@ -567,6 +508,7 @@ export default {
}
}
}
// Tab
.tab-section {
margin: 0 20rpx;
@ -675,6 +617,7 @@ export default {
z-index: 100;
padding-bottom: calc(env(safe-area-inset-bottom) + 20rpx);
padding-bottom: calc(constant(safe-area-inset-bottom) + 20rpx);
.purchase-button {
width: 100%;
height: 88rpx;

31
subPackages/equityGoods/list.vue

@ -2,6 +2,14 @@
<view class="equity-goods-page">
<image style="width: 100%;" mode="widthFix"
:src="showImg('/uploads/20250728/748adc244fc7db313f569a6005344950.png')"></image>
<view class="location-selector" >
<text class="location-text">扬州</text>
<image
class="dropdown-icon"
src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDEyIDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xIDFMNiA2TDExIDEiIHN0cm9rZT0iIzk5OTk5OSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+"
mode="heightFix"
></image>
</view>
<!-- 顶部标题区域 -->
<view class="header-section">
<view class="title">扬州数字资产权益产品</view>
@ -338,4 +346,27 @@
justify-content: space-between;
margin-bottom: 10rpx;
}
.location-selector {
position: absolute;
top: 20rpx;
left: 20rpx;
display: flex;
align-items: center;
padding: 8rpx 16rpx;
// border: 2rpx solid #e0e0e0;
border-radius: 20rpx;
min-width: 100rpx;
margin-right: 20rpx;
.location-text {
font-size: 30rpx;
color: white;
margin-right: 8rpx;
}
.dropdown-icon {
width: 24rpx;
height: 16rpx;
}
}
</style>

43
uni_modules/uni-transition/components/uni-transition/uni-transition.vue

@ -132,10 +132,10 @@ export default {
* @param {Object} obj
*/
step(obj, config = {}) {
if (!this.animation) return
if (!this.animation) return this
for (let i in obj) {
try {
if (typeof this.animation[i] === 'function') {
if (this.animation && typeof this.animation[i] === 'function') {
if(typeof obj[i] === 'object'){
this.animation[i](...obj[i])
}else{
@ -143,12 +143,16 @@ export default {
}
}
} catch (e) {
console.error(`方法 ${i} 不存在`)
console.error(`方法 ${i} 不存在:`, e)
}
}
try {
if (this.animation && typeof this.animation.step === 'function') {
this.animation.step(config)
}
} catch (e) {
console.error('动画step执行错误:', e)
}
return this
},
/**
@ -156,9 +160,13 @@ export default {
*/
run(fn) {
if (!this.animation) return
if (typeof this.animation.run === 'function') {
try {
if (this.animation && typeof this.animation.run === 'function') {
this.animation.run(fn)
}
} catch (e) {
console.error('动画执行错误:', e)
}
},
//
open() {
@ -174,13 +182,20 @@ export default {
this.$nextTick(() => {
// TODO
this.timer = setTimeout(() => {
try {
this.animation = createAnimation(this.config, this)
if (this.animation) {
this.tranfromInit(false).step()
if (typeof this.animation.run === 'function') {
this.animation.run()
let result = this.tranfromInit(false)
if (result && typeof result.step === 'function') {
result.step()
if (typeof result.run === 'function') {
result.run()
}
}
}
} catch (e) {
console.error('动画初始化错误:', e)
}
this.$emit('change', {
detail: this.isShow
})
@ -190,9 +205,12 @@ export default {
//
close(type) {
if (!this.animation) return
this.tranfromInit(true)
.step()
.run(() => {
try {
let result = this.tranfromInit(true)
if (result && typeof result.step === 'function') {
result.step()
if (typeof result.run === 'function') {
result.run(() => {
this.isShow = false
this.animationData = null
this.animation = null
@ -203,6 +221,11 @@ export default {
detail: this.isShow
})
})
}
}
} catch (e) {
console.error('动画关闭错误:', e)
}
},
//
styleInit(type) {

Loading…
Cancel
Save