diff --git a/pages.json b/pages.json index 869105d..812d350 100644 --- a/pages.json +++ b/pages.json @@ -3,7 +3,15 @@ { "path": "pages/index/index", "style": { - "navigationBarTitleText": "uni-app" + "navigationBarTitleText": "uni-app", + "navigationStyle": "custom" + } + }, + { + "path": "pages/index/tiansheng", + "style": { + "navigationBarTitleText": "uni-app", + "navigationStyle": "custom" } } ], diff --git a/pages/index/index.vue b/pages/index/index.vue index ec0ec26..da7fcc8 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,8 +1,13 @@ @@ -11,42 +16,82 @@ export default { data() { return { - title: 'Hello' + imgSrc: require('static/1/1.png'), + number: 0, + startY: 0 } }, onLoad() { }, methods: { - + gotoPath(url) { + uni.navigateTo({ + url: url + }) + }, + click() { + this.number += 1 + switch (this.number){ + case 1: + this.imgSrc = require('static/1/1.png') + break; + case 2: + this.imgSrc = require('static/1/2.png') + break; + case 3: + this.imgSrc = require('static/1/3.png') + break; + default: + break; + } + }, + touchStart(e) { + this.startY = e.changedTouches[0].clientY; + }, + touchEnd(e) { + const endY = e.changedTouches[0].clientY; + const distanceY = this.startY - endY; + if (distanceY > 50 && this.number == 2) { + console.log('上滑操作触发'); + this.click() + // 在此处编写上滑操作执行的逻辑 + } + }, } } - diff --git a/pages/index/tiansheng.vue b/pages/index/tiansheng.vue new file mode 100644 index 0000000..bea9a57 --- /dev/null +++ b/pages/index/tiansheng.vue @@ -0,0 +1,74 @@ + + + + + \ No newline at end of file diff --git a/static/1/1.png b/static/1/1.png new file mode 100644 index 0000000..3ef5388 Binary files /dev/null and b/static/1/1.png differ diff --git a/static/1/2.png b/static/1/2.png new file mode 100644 index 0000000..c1d7430 Binary files /dev/null and b/static/1/2.png differ diff --git a/static/1/3.png b/static/1/3.png new file mode 100644 index 0000000..162abf6 Binary files /dev/null and b/static/1/3.png differ diff --git a/static/1/btn1.png b/static/1/btn1.png new file mode 100644 index 0000000..625e839 Binary files /dev/null and b/static/1/btn1.png differ diff --git a/static/1/btn2.png b/static/1/btn2.png new file mode 100644 index 0000000..a744da7 Binary files /dev/null and b/static/1/btn2.png differ diff --git a/static/1/btn3.png b/static/1/btn3.png new file mode 100644 index 0000000..22b079a Binary files /dev/null and b/static/1/btn3.png differ diff --git a/static/2/1.png b/static/2/1.png new file mode 100644 index 0000000..145b087 Binary files /dev/null and b/static/2/1.png differ diff --git a/static/2/1s.png b/static/2/1s.png new file mode 100644 index 0000000..adccba1 Binary files /dev/null and b/static/2/1s.png differ diff --git a/static/2/2.png b/static/2/2.png new file mode 100644 index 0000000..130017a Binary files /dev/null and b/static/2/2.png differ diff --git a/static/2/2s.png b/static/2/2s.png new file mode 100644 index 0000000..ff48ce4 Binary files /dev/null and b/static/2/2s.png differ diff --git a/static/2/3.png b/static/2/3.png new file mode 100644 index 0000000..3d954c1 Binary files /dev/null and b/static/2/3.png differ diff --git a/static/2/3s.png b/static/2/3s.png new file mode 100644 index 0000000..fb4914a Binary files /dev/null and b/static/2/3s.png differ diff --git a/static/2/bg.png b/static/2/bg.png new file mode 100644 index 0000000..6a81058 Binary files /dev/null and b/static/2/bg.png differ diff --git a/static/logo.png b/static/logo.png deleted file mode 100644 index b5771e2..0000000 Binary files a/static/logo.png and /dev/null differ