diff --git a/src/main.scss b/src/main.scss
index 21ddc638..43cf570b 100644
--- a/src/main.scss
+++ b/src/main.scss
@@ -11,11 +11,7 @@ page {
body,
html {
user-select: none;
- background-color: $color-background;
- color: $color-text;
+ background-color: #222222;
+ color: #ffffff;
font-size: 14px;
}
-
-:root {
- --van-back-top-background: red;
-}
diff --git a/src/main.ts b/src/main.ts
index ecc0f9a7..d505a544 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,16 +1,33 @@
import App from './App.vue';
-import { createSSRApp } from 'vue';
+import { createSSRApp, h, defineComponent } from 'vue';
// @ts-ignore
import { setupPinia } from './sheep/store';
import './main.scss';
import 'virtual:uno.css';
import Vant from 'vant';
import 'vant/lib/index.css';
+import { ConfigProvider } from 'vant';
+
+// 自定义vant组件颜色变量
+const THEME_VARS = {
+ primaryColor: '#ffcd32',
+ primaryColorDark: '#ffcd32',
+ primaryColorLight: '#ffcd32',
+ tabsBottomBarColor: '#ffcd32',
+};
+
+const AppWithConfigProvider = defineComponent({
+ setup() {
+ return () =>
+ h(ConfigProvider, { theme: 'dark', themeVars: THEME_VARS }, { default: () => h(App) });
+ },
+});
export function createApp() {
- const app = createSSRApp(App);
+ const app = createSSRApp(AppWithConfigProvider);
setupPinia(app);
app.use(Vant);
+ app.use(ConfigProvider);
return {
app,
};
diff --git a/src/pages.json b/src/pages.json
index 11b9411b..910d1340 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -77,6 +77,13 @@
"navigationBarTitleText": "修改资料",
"navigationStyle": "custom"
}
+ },
+ {
+ "path": "like",
+ "style": {
+ "navigationBarTitleText": "喜欢",
+ "navigationStyle": "custom"
+ }
}
]
},
diff --git a/src/pages/home/city.vue b/src/pages/home/city.vue
index 573392f6..76c08aee 100644
--- a/src/pages/home/city.vue
+++ b/src/pages/home/city.vue
@@ -1,34 +1,32 @@
-
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
- 热门城市
-
-
- {{ item.t }}
-
-
+ 热门城市
+
+
+ {{ item.t }}
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
diff --git a/src/pages/messages/messages.vue b/src/pages/messages/messages.vue
index 7facb97d..24994f8f 100644
--- a/src/pages/messages/messages.vue
+++ b/src/pages/messages/messages.vue
@@ -1,134 +1,84 @@
-
-
-
-
diff --git a/src/pages/moments/moments.vue b/src/pages/moments/moments.vue
index e0737398..8df81b3a 100644
--- a/src/pages/moments/moments.vue
+++ b/src/pages/moments/moments.vue
@@ -1,13 +1,17 @@
-
@@ -58,7 +62,12 @@
onRefresherAbort,
onScrollToLower,
onClickLoadMore,
- } = useScroll(RecentApi.quickPage);
+ } = useScroll(RecentApi.quickPage, {
+ scene: 'DYNAMIC_RECOMMEND',
+ province: '',
+ city: '',
+ memberId: '',
+ });
const current = ref(0);
const segmentedItems = ['动态', '附近'];
@@ -69,25 +78,3 @@
});
};
-
-
diff --git a/src/pages/moments/publish.vue b/src/pages/moments/publish.vue
index 514f22c9..aeffe4a3 100644
--- a/src/pages/moments/publish.vue
+++ b/src/pages/moments/publish.vue
@@ -1,21 +1,61 @@
-
-
-
-
-
-
-
- 发布
-
-
-
-
+
+
+
+
+
+
+ 发布
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/profile/profile.vue b/src/pages/profile/profile.vue
index 3e48bbe6..2537207b 100644
--- a/src/pages/profile/profile.vue
+++ b/src/pages/profile/profile.vue
@@ -1,31 +1,58 @@
-
-
+
+
+
+
+ {{ item.icon }}
+ {{ item.text }}
+
+
+
+
+
-
+ // type: 0-我喜欢 1-喜欢我
+ const goLike = (type: 0 | 1) => {
+ uni.navigateTo({
+ url: `/pages/profile/like?type=${type}`,
+ });
+ };
+
diff --git a/src/pages/profile/userinfo.vue b/src/pages/profile/userinfo.vue
index 5a8f2caa..ad6f116e 100644
--- a/src/pages/profile/userinfo.vue
+++ b/src/pages/profile/userinfo.vue
@@ -1,133 +1,131 @@
-
-
-
-
-
-
-
- 保存
-
-
-
+
+
+
+
+
+
+ 保存
+
+
+
-
-
-
-
-
+
+
+
+
+
- 语音签名
-
-
-
-
-
- 添加语音签名,让你更受关注
-
-
-
-
+ 语音签名
+
+
+
+
+
+ 添加语音签名,让你更受关注
+
+
+
+
- 基本资料
-
-
-
-
-
-
-
-
-
-
-
+ 基本资料
+
+
+
+
+
+
+
+
+
+
+
- 个人简介
-
-
-
+ 个人简介
+
+
+
-
- 个人相册
- {{ userinfo.photo.length || 0 }}/9
-
-
-
-
-
-
-
+
+ 个人相册
+ {{ userinfo.photo.length || 0 }}/9
+
+
+
+
+
+
+
-
- onConfirm(e, 'birthday')"
- @cancel="showPicker = false"
- />
- onConfirm(e, 'height')"
- @cancel="showPicker = false"
- />
- onConfirm(e, 'weight')"
- @cancel="showPicker = false"
- />
- onConfirm(e, 'occ')"
- @cancel="showPicker = false"
- />
-
-
+
+ onConfirm(e, 'birthday')"
+ @cancel="showPicker = false"
+ />
+ onConfirm(e, 'height')"
+ @cancel="showPicker = false"
+ />
+ onConfirm(e, 'weight')"
+ @cancel="showPicker = false"
+ />
+ onConfirm(e, 'occ')"
+ @cancel="showPicker = false"
+ />
+
-
-
diff --git a/src/sheep/components/s-uploader/s-uploader.vue b/src/sheep/components/s-uploader/s-uploader.vue
index e0a37e34..044f4808 100644
--- a/src/sheep/components/s-uploader/s-uploader.vue
+++ b/src/sheep/components/s-uploader/s-uploader.vue
@@ -199,7 +199,8 @@
return {
files: [],
localValue: [],
- imgsrc: sheep.$url.static('/static/img/shop/upload-camera.png'),
+ // imgsrc: sheep.$url.static('/static/img/shop/upload-camera.png'),
+ imgsrc: '/static/upload-icon.png',
};
},
watch: {
diff --git a/src/sheep/hooks/use-scroll.ts b/src/sheep/hooks/use-scroll.ts
index 89d7b4f0..fa979fef 100644
--- a/src/sheep/hooks/use-scroll.ts
+++ b/src/sheep/hooks/use-scroll.ts
@@ -26,17 +26,17 @@ export default function useScroll(fetchList: (...arg: any) => Promise, fetc
}
if (isRefresh) {
pageInfo.current = 1;
- const { data } = await fetchList({ ...pageInfo, ...fetchBody });
- listData.value = data.list;
+ const { data = [] } = await fetchList({ ...pageInfo, ...fetchBody });
+ listData.value = data.list ?? [];
pageInfo.total = data.total;
} else {
- const { data } = await fetchList({ ...pageInfo, ...fetchBody });
- listData.value.push(...data.list);
+ const { data = [] } = await fetchList({ ...pageInfo, ...fetchBody });
+ listData.value.push(...(data.list ?? []));
pageInfo.total = data.total;
}
pageInfo.current = pageInfo.current + 1;
- if (listData.value.length >= pageInfo.total) {
+ if (listData.value?.length >= pageInfo.total) {
loadMoreStatus.value = 'noMore';
} else {
loadMoreStatus.value = 'more';
diff --git a/src/static/upload-icon.png b/src/static/upload-icon.png
new file mode 100644
index 00000000..5cb0cfa4
Binary files /dev/null and b/src/static/upload-icon.png differ
diff --git a/src/uni.scss b/src/uni.scss
index c39c7b7b..f7e0a709 100644
--- a/src/uni.scss
+++ b/src/uni.scss
@@ -74,33 +74,3 @@ $uni-color-subtitle: #555; // 二级标题颜色
$uni-font-size-subtitle: 18px;
$uni-color-paragraph: #3f536e; // 文章段落颜色
$uni-font-size-paragraph: 15px;
-
-// ---------------------------------------------------------------------------------------------
-
-// 自定义scss变量
-// 颜色
-$color-background: #222222;
-$color-background-d: rgba(0, 0, 0, 0.3);
-$color-highlight-background: #333;
-$color-theme: #ffcd32;
-$color-theme-d: rgba(255, 205, 49, 0.5);
-$color-sub-theme: #d93f30;
-$color-text: #ffffff;
-$color-text-d: rgba(255, 255, 255, 0.3);
-$color-text-l: rgba(255, 255, 255, 0.5);
-$color-text-ll: rgba(255, 255, 255, 0.8);
-$color-dialog-background: #666;
-
-// 字体
-$font-size-small-s: 10px;
-$font-size-small: 12px;
-$font-size-medium: 14px;
-$font-size-medium-x: 16px;
-$font-size-large: 18px;
-$font-size-large-x: 22px;
-
-@mixin no-wrap() {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}