diff --git a/package.json b/package.json
index b567967..61ed081 100644
--- a/package.json
+++ b/package.json
@@ -56,6 +56,7 @@
"dayjs": "^1.11.9",
"js-audio-recorder": "^1.0.7",
"pinia": "2.0.33",
+ "pinia-plugin-persistedstate": "^3.2.0",
"uview-plus": "^3.1.34",
"vue": "^3.2.45",
"vue-i18n": "^9.1.9"
diff --git a/src/App.vue b/src/App.vue
index d82b81b..e3f007e 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -10,6 +10,7 @@ import { findImageApi, findGlodApi } from "./api/home";
const userInfoModulesPinia = userInfoModules();
onLaunch(() => {
console.log("App Launch!");
+
// 获取平台及系统信息
uni.getSystemInfo({
success: function (res) {
diff --git a/src/pages/createing/index.vue b/src/pages/createing/index.vue
index a379f98..4dd9a69 100644
--- a/src/pages/createing/index.vue
+++ b/src/pages/createing/index.vue
@@ -18,9 +18,9 @@
@change=""
@click=""
> -->
- -->
+
+ 左右滑动查看更多
{
- workId.value = options.id;
- // workId.value = "856433830235262976";
+ // workId.value = options.id;
+ workId.value = "857147862095679488";
getWorkInfo();
+
+ // let getWindowInfo = uni.getWindowInfo().screenWidth;
+ // console.log(getWindowInfo, "页面宽度");
});
async function getWorkInfo() {
try {
@@ -86,6 +103,9 @@ async function getWorkInfo() {
const res = await findWorkByIdApi(workId.value);
if (res.data.photoList) {
swiperList.value = res.data.photoList;
+ swiperList.value.forEach((item) => {
+ previewImageList.value.push(item.image);
+ });
}
createState.value = res.data.status;
styleId.value = res.data.digitalAvatarId;
@@ -122,7 +142,18 @@ function goLookPhoto() {
//#endregion ---------------------
//#region 轮播图
-
+const swiperIndex = ref(0);
+const previewImageList = ref([]); //预览图片列表
+function getSwiperIndex(index) {
+ swiperIndex.value = index.current;
+}
+function previewImage(index) {
+ uni.previewImage({
+ current: index, //预览图片的下标
+ urls: previewImageList.value, //预览图片的地址,必须要数组形式,如果不是数组形式就转换成数组形式就可以
+ loop: true,
+ });
+}
//#endregion ---------------------
//#region
@@ -181,9 +212,33 @@ function goLookPhoto() {
}
}
}
+// .u-swiper {
+// width: 100%;
+// height: 695rpx !important;
+// }
.u-swiper {
- width: 100%;
- height: 695rpx !important;
+ margin-top: 40rpx;
+ margin-bottom: 30rpx;
+ width: 540rpx;
+ height: 720rpx !important;
+ border-radius: 50rpx;
+ swiper {
+ width: 100%;
+ height: 720rpx !important;
+ image {
+ width: 100%;
+ height: 720rpx !important;
+ }
+ }
+ // h5
+ :deep(.u-swiper__wrapper) {
+ width: 100%;
+ height: 720rpx !important;
+ image {
+ width: 100%;
+ height: 720rpx !important;
+ }
+ }
}
.logo {
width: 520rpx;
@@ -215,7 +270,7 @@ function goLookPhoto() {
margin-bottom: 30rpx;
}
.anew {
- margin-top: 120rpx;
+ margin-top: 80rpx;
}
}
diff --git a/src/pages/lookPhoto/index.vue b/src/pages/lookPhoto/index.vue
index 8a14166..d97af89 100644
--- a/src/pages/lookPhoto/index.vue
+++ b/src/pages/lookPhoto/index.vue
@@ -4,6 +4,7 @@