diff --git a/README.md b/README.md
index ecb9763..fc38444 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,17 @@
## 项目说明
-尽可能的还原了微信朋友圈的UI、交互,`uniapp x` 体验比 `uniapp` 要好很多,熟悉`ts`的朋友可以快速上手!
+尽可能的还原了微信朋友圈的UI、交互,仅在ios上真机测试了效果,安卓真机未测试,大家可以下载感受一下!
## 更新说明
-### 1.0.0(2024-04-19)
+### 1.0.2(2024-04-20)
+
+- 修复安卓端运行报错、类型补全等
+- 优化安卓端体验
+- 新增九宫格图片尺寸动态计算
+- 新增发表朋友圈页面图片尺寸动态计算
+
+### 1.0.1(2024-04-19)
- 补全变量类型,修复安装打包、运行报错,🎉 支持安卓
- 优化代码结构
@@ -28,10 +35,8 @@ video竖屏全屏退出后,视频出现黑屏为官方BUG,官方正在修复
[查看BUG修复进度](https://issues.dcloud.net.cn/pages/issues/detail?id=1491)
-## 预览
-
-
-
---
-## 微信/QQ:582639426
\ No newline at end of file
+## 微信/QQ:582639426!
+
+## github下载地址:[高度还原微信朋友圈](https://github.com/lmsail/uniapp-x-moments)
\ No newline at end of file
diff --git a/components/uni-drag-image/uni-drag-image.uvue b/components/uni-drag-image/uni-drag-image.uvue
index 31fd8bf..2779ddd 100644
--- a/components/uni-drag-image/uni-drag-image.uvue
+++ b/components/uni-drag-image/uni-drag-image.uvue
@@ -1,31 +1,41 @@
-
- onTouchStart(e, index)" @touchmove="onTouchMove" @touchend="onTouchEnd">
+
+ onTouchStart(e, index)"
+ @touchmove="onTouchMove"
+ @touchend="onTouchEnd"
+ >
-
+
-
-
{{ isInDeleteArea ? '松手即可删除' : '删除' }}
-
+
-
+
+
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
index 7327901..696c08d 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,6 +1,6 @@
{
"name" : "momentsApp",
- "appid" : "",
+ "appid" : "__UNI__970F4C1",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
diff --git a/pages/index/apply.uvue b/pages/index/apply.uvue
index 1b56f21..7813143 100644
--- a/pages/index/apply.uvue
+++ b/pages/index/apply.uvue
@@ -11,8 +11,7 @@
-
+
@@ -32,6 +31,7 @@
import UniList from '@/components/uni-list/uni-list.uvue';
import UniItem from '@/components/uni-list/uni-item.uvue';
import uniDragImage from '../../components/uni-drag-image/uni-drag-image.uvue';
+ //
export default {
components: {
UniList,
@@ -41,17 +41,7 @@
data() {
return {
disabled: true,
- imageList: [
- "http://iph.href.lu/200x200?text=1&fg=666666&bg=cccccc",
- "http://iph.href.lu/200x200?text=2&fg=666666&bg=cccccc",
- "http://iph.href.lu/200x200?text=3&fg=666666&bg=cccccc",
- "http://iph.href.lu/200x200?text=4&fg=666666&bg=cccccc",
- "http://iph.href.lu/200x200?text=5&fg=666666&bg=cccccc",
- "http://iph.href.lu/200x200?text=6&fg=666666&bg=cccccc",
- "http://iph.href.lu/200x200?text=7&fg=666666&bg=cccccc",
- "http://iph.href.lu/200x200?text=8&fg=666666&bg=cccccc",
- "http://iph.href.lu/200x200?text=9&fg=666666&bg=cccccc",
- ] as string[],
+ imageList: [] as string[],
address: '', // 当前位置信息
};
@@ -82,13 +72,24 @@
// 发表朋友圈
apply() {
-
+ this.imageList = [
+ "http://iph.href.lu/200x200?text=1&fg=666666&bg=cccccc",
+ "http://iph.href.lu/200x200?text=2&fg=666666&bg=cccccc",
+ "http://iph.href.lu/200x200?text=3&fg=666666&bg=cccccc",
+ "http://iph.href.lu/200x200?text=4&fg=666666&bg=cccccc",
+ "http://iph.href.lu/200x200?text=5&fg=666666&bg=cccccc",
+ "http://iph.href.lu/200x200?text=6&fg=666666&bg=cccccc",
+ "http://iph.href.lu/200x200?text=7&fg=666666&bg=cccccc",
+ "http://iph.href.lu/200x200?text=8&fg=666666&bg=cccccc",
+ "http://iph.href.lu/200x200?text=9&fg=666666&bg=cccccc",
+ ];
},
// 选择图片
chooseImageEvent() {
+ const count = this.imageList.length > 0 ? 9 - this.imageList.length : this.imageList.length;
uni.chooseImage({
- count: 9,
+ count: count,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: res => {
diff --git a/pages/index/components/comment-input.uvue b/pages/index/components/comment-input.uvue
index aa864eb..61315cb 100644
--- a/pages/index/components/comment-input.uvue
+++ b/pages/index/components/comment-input.uvue
@@ -6,7 +6,6 @@
placeholder="回复查理斯:"
confirm-type="send"
:adjust-position="false"
- @focus="showKeyboard"
@blur="hideKeyboard"
@keyboardheightchange="onKeyborardHeightChange"
/>
@@ -19,17 +18,9 @@
return {
keyboardHeight: -100,
keyboardStatus: false,
- keyboardCacheHeight: 0, // 键盘高度缓存,第一次获取后就缓存起来
}
},
mounted() {
-
- // 获取上一次缓存的键盘高度
- let keyboardHeight = uni.getStorageSync('keyboardCacheHeight') as string;
- if (keyboardHeight != '') {
- this.keyboardCacheHeight = keyboardHeight.toInt();
- this.keyboardHeightChange();
- }
// 监听点击评论事件
uni.$on('commentScrollEvent', () => {
if (this.keyboardStatus) {
@@ -47,18 +38,11 @@
},
// 键盘相关事件
- // TODO 这里不太严谨,待优化...
onKeyborardHeightChange(event : UniInputKeyboardHeightChangeEvent) {
- if (!this.keyboardStatus || this.keyboardCacheHeight > 0) {
+ if (!this.keyboardStatus) {
return;
}
- if (event.detail.duration == 0) {
- this.keyboardHeight = -100;
- } else {
- this.keyboardHeight = event.detail.height;
- }
- this.keyboardCacheHeight = this.keyboardHeight;
- uni.setStorageSync('keyboardCacheHeight', this.keyboardCacheHeight);
+ this.keyboardHeight = event.detail.height;
this.keyboardHeightChange();
},
@@ -67,13 +51,6 @@
(this.$refs['commentInput'] as UniInputElement).blur();
this.keyboardStatus = false;
this.keyboardHeight = -100;
- },
-
- // 得到焦点 - 显示键盘
- showKeyboard() {
- if (this.keyboardCacheHeight > 0) {
- this.keyboardHeight = this.keyboardCacheHeight;
- }
}
}
}
@@ -89,7 +66,7 @@
right: 0;
z-index: 999;
transition-property: bottom;
- transition-duration: 0.25s;
+ transition-duration: 100ms;
box-shadow: 0 -5px 5px -5px rgba(0, 0, 0, 0.3) inset;
.uni-input {
diff --git a/pages/index/components/comment.uvue b/pages/index/components/comment.uvue
index 887b690..a35cd02 100644
--- a/pages/index/components/comment.uvue
+++ b/pages/index/components/comment.uvue
@@ -19,7 +19,7 @@