diff --git a/.DS_Store b/.DS_Store index 5e1f458..8ba9e77 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/components/image-grid-simple/image-grid-simple.vue b/components/image-grid-simple/image-grid-simple.vue new file mode 100644 index 0000000..f21efef --- /dev/null +++ b/components/image-grid-simple/image-grid-simple.vue @@ -0,0 +1,214 @@ + + + + + \ No newline at end of file diff --git a/pages.json b/pages.json index 054cd98..50fccce 100644 --- a/pages.json +++ b/pages.json @@ -59,8 +59,8 @@ "autoscan": true, "custom": { // 使用正确的路径格式 - "^smart-tabs": "@/components/smart-tabs/smart-tabs.vue", + "^image-grid-simple": "@/components/image-grid-simple/image-grid-simple.vue", "^video-grid-simple": "@/components/video-grid-simple/video-grid-simple.vue", "^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)": "z-paging/components/z-paging$1/z-paging$1.vue", "^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue" diff --git a/pages/category/category.vue b/pages/category/category.vue index 966aefb..7b413c6 100644 --- a/pages/category/category.vue +++ b/pages/category/category.vue @@ -9,27 +9,20 @@ - - - - - + + + @@ -38,7 +31,55 @@ data() { return { current:0, - tabs:[] + tabs:[], + list:[ + { + + "id":1, + "title":"1", + "src":"../../static/images/default.png" + }, + { + "id":2, + "title":2, + "src":"../../static/images/default.png" + }, + { + "id":3, + "title":3, + "src":"../../static/images/default.png" + }, + { + "id":9, + "title":9, + "src":"../../static/images/default.png" + }, + { + "id":4, + "title":4, + "src":"../../static/images/default.png" + }, + { + "id":5, + "title":5, + "src":"../../static/images/default.png" + }, + { + "id":6, + "title":6, + "src":"../../static/images/default.png" + }, + { + "id":7, + "title":7, + "src":"../../static/images/default.png" + }, + { + "id":8, + "title":8, + "src":"../../static/images/default.png" + } + ] } }, onLoad() { diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue index e8c8a33..b4bbb00 100644 --- a/pages/detail/detail.vue +++ b/pages/detail/detail.vue @@ -12,7 +12,17 @@ - + + + @@ -24,13 +34,27 @@ url:"https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4", id:0, pattern:{ - color:'#19c324', - selectedColor:'#19c324', - buttonColor:"rgba(0, 0, 0, 0)", - icon:'cloud-download-filled', - iconColor:'#fff' + color: '#19c324', + backgroundColor: '#fff', + selectedColor: '#19c324', + buttonColor: '#19c324', + iconColor: '#fff' }, - isDownload:false + isDownload:false, + content: [ + { + iconPath: '/static/vip_download.png', + selectedIconPath: '/static/vip_download_active.png', + text: '会员下载', + active: false + }, + { + iconPath: '/static/download.png', + selectedIconPath: '/static/download_ok.png', + text: '看视频免费下载', + active: false + } + ] } }, onLoad(options) { @@ -50,6 +74,47 @@ // this.$refs.adRewardedVideo.load(); }, methods: { + trigger(e) { + console.log(e) + this.content[e.index].active = !e.item.active + uni.showModal({ + title: '提示', + content: `您${this.content[e.index].active ? '选中了' : '取消了'}${e.item.text}`, + success: function(res) { + if (res.confirm) { + console.log('用户点击确定') + } else if (res.cancel) { + console.log('用户点击取消') + } + } + }) + }, + fabClick() { + uni.showToast({ + title: '点击了悬浮按钮', + icon: 'none' + }) + }, + switchBtn(hor, ver) { + if (hor === 0) { + this.direction = this.direction === 'horizontal' ? 'vertical' : 'horizontal' + this.directionStr = this.direction === 'horizontal' ? '垂直' : '水平' + } else { + this.horizontal = hor + this.vertical = ver + } + this.$forceUpdate() + }, + switchColor() { + this.is_color_type = !this.is_color_type + if (this.is_color_type) { + this.pattern.iconColor = '#aaa' + this.pattern.buttonColor = '#fff' + } else { + this.pattern.iconColor = '#fff' + this.pattern.buttonColor = '#007AFF' + } + }, async downloadAction() { // 判断用户是否为会员 let userInfo = null diff --git a/pages/home/home.nvue b/pages/home/home.nvue index d1c1c4d..3ae2406 100644 --- a/pages/home/home.nvue +++ b/pages/home/home.nvue @@ -5,12 +5,11 @@ :activeColor="'#19c324'" @change="handleTabChange" /> - - +