diff --git a/components/GooSkeleton/README.md b/components/GooSkeleton/README.md
new file mode 100644
index 0000000..140fff1
--- /dev/null
+++ b/components/GooSkeleton/README.md
@@ -0,0 +1,62 @@
+# skeleton
+uni-app 骨架屏组件,用于数据加载时显示占位元素
+
+## 属性说明
+
+|属性名|类型|默认值|说明|
+| -- | -- | --|--|
+| loading | Boolean | true | 是否显示占位图 |
+| showAvatar | Boolean | true | 是否显示头像占位图 |
+| AvatarSize | String | 50px | 头像站占位图大小 |
+| AvatarShape | String | round | 头像形状,可选值:round, square |
+| showTitle | Boolean | true | 是否显示标题占位图 |
+| titleWidth | String | 40% | 标题占位图宽度 |
+| row | Number| 3 | 段落占位图行数 |
+| animate | Boolean | true | 是否开启动画 |
+
+## 使用示例
+
+```html
+
+ 我是段落1
+
+```
+
+```javascript
+import Skeleton from '../components/skeleton/index.vue'
+export default {
+ components: {
+ Skeleton
+ },
+ data() {
+ return {
+ loading: true,
+ skeleton1 : {
+ avatarSize: '52px',
+ row: 3,
+ showTitle: true,
+ }
+ }
+ },
+ created() {
+ this.reloadData()
+ },
+ methods: {
+ reloadData() {
+ this.loading = true
+ setTimeout(() => {
+ this.loading = false
+ }, 3000)
+ },
+ },
+}
+```
+
+## 效果图
+
+
diff --git a/components/GooSkeleton/index.vue b/components/GooSkeleton/index.vue
new file mode 100644
index 0000000..a7e3669
--- /dev/null
+++ b/components/GooSkeleton/index.vue
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pagesInn/inn/innHome.vue b/pagesInn/inn/innHome.vue
index 2b84405..9592f8c 100644
--- a/pagesInn/inn/innHome.vue
+++ b/pagesInn/inn/innHome.vue
@@ -10,244 +10,321 @@
transparent="auto"
color='#ffffff'
/>
-
-
-
-
-
-
-
- {{ inn.name }}
+
+
+
+ {{ inn.name }}
+
+
+ {{ inn.cityName }}
+
+
+
+
+
+
+
+
+
+ {{ inn.ownerName }}/店主
+
+ 保证金:{{ inn.guaranteeValue }}元
+
+
+
+
+
+ {{ inn.zan }}
+
+
+
+ {{ inn.zan }}
+
+
+
+
+
+ {{ favoriteCount }}
+
+
+
+
+
+
+
+
+ {{ inn.content }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ inn.address }}
+
+
+
+
+ 导航
+
+
+
+ 客服
+
+
+
+
+
+
+
+ {{ item.text }}
+
+
+
+
+
+
+
- {{ inn.cityName }}
-
-
-
-
-
-
-
-
-
- {{ inn.ownerName }}/店主
-
- 保证金:{{ inn.guaranteeValue }}元
-
-
-
-
-
- {{ inn.zan }}
-
-
-
- {{ inn.zan }}
-
+
+ {{ item.storeName }}
+
+
+ ¥{{ item.price }}
+
-
+
-
- {{ favoriteCount }}
+ {{ item.sales }}人已购买
-
-
-
-
-
- {{ inn.content }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ inn.address }}
-
-
-
-
- 导航
-
-
-
- 客服
-
-
-
-
-
-
- 企业文化
-
-
-
- 最新资讯
-
-
-
- 商家资质
-
-
-
- 商品
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ info.monthDay }}
- {{ info.year }}
-
-
-
-
-
-
-
-
-
- {{ info.name }}
-
-
-
-
-
-
-
-
-
-
- {{ info.pv }}
+
+
+
+
+
+
-
-
- {{ info.zan }}
+
+
+
+
+
+
+
+
+
+
+ {{ item.createdTime ? item.createdTime.replace(/-/g, '.').substr(0, 10) : '' }}
+
+
+
+
+ {{ item.pv }}
+
+
+
+ {{ item.zan }}
+
+
+
+
+
+
+ 置顶动态
+
+
+
+ 删除动态
+
+
+
+
- {{ info.time }}
-
-
-
-
-
-
-
-
-
-
-
- {{ item.storeName }}
-
-
- ¥{{ item.price }}
+
+
+
+
+
+
-
-
- {{ item.sales }}人已购买
+
+
+
+
+
+
+ 发布动态
+
+
+
+ 修改资料
+
-
- 发布动态
- 修改资料
-
+
{
const { success, data } = res
if (success) {
+ that.isLoad = true
that.inn = data
that.isLike = data.zanVo !== null
that.isFavorite = data.hasFavorite
that.favoriteCount = data.favoriteCount
that.inn.latitude = that.inn.latitude ? parseFloat(that.inn.latitude) : 24.993587
that.inn.longitude = that.inn.longitude ? parseFloat(that.inn.longitude) : 102.779656
+ // 该店铺无商品则不显示“精选商品”
+ if (data.hasProduct <= 0) {
+ that.activeIndex = 1
+ that.tabList[0].isShow = false
+ }
// coverType: 1-图片,2-视频
if (data.coverType === 2) {
uni.getSystemInfo({
@@ -773,6 +867,9 @@ export default {
this.favoriteCount = res.data.favoriteCount
}
}
+ },
+ toggleMoreHandle(index) {
+ this.$set(this.infoArray[index], 'showMore', !this.infoArray[index].showMore)
}
}
}
@@ -811,7 +908,9 @@ export default {