Browse Source

样式

dev_des
1054425342@qq.com 2 months ago
parent
commit
c35152900a
  1. 2
      App.vue
  2. 7
      components/DynamicIsland.vue
  3. 23
      components/WaterfallLayout.vue
  4. 6
      pages/index/iSoul.vue
  5. 30
      pages/index/timeShopBank.vue
  6. 5
      static/js/request.js

2
App.vue

@ -43,6 +43,8 @@ export default {
getUserInfo() {
if (!this.getUserId()) return;
this.Post({}, "/framework/user/getInfo", "DES").then((res) => {
let token = JSON.parse(uni.getStorageSync("userInfo")).token
res.data.token = token
uni.setStorageSync("userInfo", JSON.stringify(res.data));
});
},

7
components/DynamicIsland.vue

@ -30,7 +30,7 @@
>
<text class="welcome-subtitle">欢迎回来~</text>
</view>
<view class="stats-info">
<view class="stats-info" @click="toOrder">
<text class="stats-number">2</text>
<text class="stats-unit"></text>
</view>
@ -297,6 +297,11 @@ export default {
this.collapseIsland();
}
},
toOrder(){
uni.switchTab({
url:'/pages/index/iSoul'
})
},
getCompactName() {
//
if (this.userInfo && this.userInfo.nickname) {

23
components/WaterfallLayout.vue

@ -7,28 +7,27 @@
v-for="(item, index) in leftItems"
:key="item.id || index"
class="waterfall-item"
@click="handleItemClick(item)"
>
<image
v-if="item.image"
:src="item.image"
:src="showImg(item.image)"
class="item-image"
mode="aspectFill"
/>
<view class="item-content">
<text v-if="item.title" class="item-title">{{ item.title }}</text>
<view v-if="item.user" class="item-footer">
<view class="item-footer">
<view class="user-info">
<image
:src="item.user.avatar"
src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?auto=format&fit=crop&w=100"
class="user-avatar"
mode="aspectFill"
/>
<text class="username">{{ item.user.name }}</text>
<text class="username">风景之旅</text>
</view>
<view class="like-info">
<image :src="showImg('/uploads/20250731/0260884d7a44a483885a026da524e0b8.png')" style="height: 22rpx;width: 25rpx;"></image>
<text class="like-count">{{ item.likes }}</text>
<text class="like-count">100</text>
</view>
</view>
</view>
@ -41,28 +40,28 @@
v-for="(item, index) in rightItems"
:key="item.id || index"
class="waterfall-item"
@click="handleItemClick(item)"
>
<image
v-if="item.image"
:src="item.image"
:src="showImg(item.image)"
class="item-image"
mode="aspectFill"
/>
<view class="item-content">
<text v-if="item.title" class="item-title">{{ item.title }}</text>
<view v-if="item.user" class="item-footer">
<view class="item-footer">
<view class="user-info">
<image
:src="item.user.avatar"
src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?auto=format&fit=crop&w=100"
class="user-avatar"
mode="aspectFill"
/>
<text class="username">{{ item.user.name }}</text>
<text class="username">风景之旅</text>
</view>
<view class="like-info">
<image :src="showImg('/uploads/20250731/0260884d7a44a483885a026da524e0b8.png')" style="height: 22rpx;width: 25rpx;"></image>
<text class="like-count">{{ item.likes }}</text>
<text class="like-count">120</text>
</view>
</view>
</view>

6
pages/index/iSoul.vue

@ -385,6 +385,7 @@ export default {
//
},
onShow() {
console.log(uni.getStorageSync("userInfo"))
this.userInfo =
(uni.getStorageSync("userInfo") &&
JSON.parse(uni.getStorageSync("userInfo"))) ||
@ -426,6 +427,7 @@ export default {
},
getUserInfo() {
this.Post({}, "/framework/user/getInfo", "DES").then((res) => {
res.data.token = this.userInfo.token
uni.setStorageSync("userInfo", JSON.stringify(res.data));
this.userInfo = res.data
});
@ -1088,7 +1090,8 @@ view {
padding: 40rpx 30rpx 30rpx;
color: white;
backdrop-filter: blur(10rpx);
border: 1rpx solid rgba(255, 255, 255, 0.1);
width: 100%;
height: 100%;
}
.asset-badge {
@ -1125,7 +1128,6 @@ view {
border-radius: 20rpx;
padding: 10rpx 16rpx;
backdrop-filter: blur(10rpx);
border: 1rpx solid rgba(255, 255, 255, 0.2);
white-space: nowrap;
min-width: 0;
}

30
pages/index/timeShopBank.vue

@ -24,9 +24,10 @@
<!-- 发布按钮 -->
<view class="fab-container">
<button class="fab-btn" @click="goToPublish">
<image :src="showImg('/uploads/20250824/8a56130faf5787bb75b22b161e66b1b6.png')" style="width: 91rpx;height: 100rpx;"></image>
<!-- <button class="fab-btn" @click="goToPublish">
<text class="fab-icon">+</text>
</button>
</button> -->
</view>
<!-- 瀑布流组件 -->
@ -77,11 +78,16 @@ export default {
{ name: "关注", id: "follow" },
{ name: "推荐", id: "recommend" },
],
waterfallItems: [],
waterfallItems: [
{title:'生命的扶持|风景之旅',image:'/uploads/20250824/2cf1f49920b911c9d14e4abf3b67a59c.png'},
{title:'苏州丨园林之美 鱼戏莲叶间心随鱼鸟闲',image:'/uploads/20250824/c209044a821630158f6e6771805682a7.png'},
{title:'蘇州|你一句春不晚,我便出现在真江南',image:'/uploads/20250824/74101a77233375625282209392dc69e3.png'},
{title:'收好这天然氧吧',image:'/uploads/20250824/e0ab7fd0483d05742451e8f10ab3ce24.png'},
],
autoAddEnabled: false,
// URL
images: [
"https://images.unsplash.com/photo-1501854140801-50d01698950b?auto=format&fit=crop&w=800",
"/uploads/20250824/2cf1f49920b911c9d14e4abf3b67a59c.png",
"https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?auto=format&fit=crop&w=800",
"https://images.unsplash.com/photo-1441974231531-c6227db76b6e?auto=format&fit=crop&w=800",
"https://images.unsplash.com/photo-1469474968028-56623f02e42e?auto=format&fit=crop&w=800",
@ -142,9 +148,12 @@ export default {
JSON.parse(uni.getStorageSync("userInfo"))) ||
this.$store.state.user.userInfo ||
{};
if (this.userInfo && this.userInfo.token) {
this.getUserInfo()
}
},
onShow() {
if (this.userInfo && this.userInfo.token) {
this.getUserInfo()
}
},
@ -161,6 +170,7 @@ export default {
methods: {
getUserInfo() {
this.Post({}, "/framework/user/getInfo", "DES").then((res) => {
res.data.token = this.userInfo.token
uni.setStorageSync("userInfo", JSON.stringify(res.data));
this.userInfo = res.data
this.$nextTick(() =>{
@ -203,13 +213,13 @@ export default {
for (let i = 0; i < 20; i++) {
initialItems.push(this.getRandomItem());
}
this.waterfallItems = initialItems;
// this.waterfallItems = initialItems;
},
//
addRandomItem() {
const newItem = this.getRandomItem();
this.waterfallItems.push(newItem);
// this.waterfallItems.push(newItem);
},
//
@ -254,7 +264,7 @@ export default {
for (let i = 0; i < 10; i++) {
newItems.push(this.getRandomItem());
}
this.waterfallItems.push(...newItems);
// this.waterfallItems.push(...newItems);
},
// Tab

5
static/js/request.js

@ -2,8 +2,9 @@ import Vue from 'vue';
import store from '@/store';
// 定义 API URL
// const DEV_API_URL = 'https://epic.new.js-dyyj.com';
const DEV_API_URL = 'https://epic.js-dyyj.com';
const DEV_API_URL = 'https://epic.new.js-dyyj.com';
// 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;

Loading…
Cancel
Save