kola-web 5 days ago
parent
commit
ec165a8cd7
  1. 16
      project.config.json
  2. 1
      src/app.json
  3. 5
      src/components/navigation-bar/navigation-bar.json
  4. 2
      src/components/navigation-bar/navigation-bar.wxml
  5. 1
      src/components/tabbar/tabbar.scss
  6. 15
      src/components/tabbar/tabbar.ts
  7. 4
      src/components/tabbar/tabbar.wxml
  8. 28
      src/pages/1/index.scss
  9. 21
      src/pages/1/index.ts
  10. 11
      src/pages/1/index.wxml
  11. 2
      src/pages/2/index.wxml
  12. 24
      src/pages/3/index.scss
  13. 26
      src/pages/3/index.ts
  14. 40
      src/pages/3/index.wxml
  15. 16
      src/pages/4/index.scss
  16. 27
      src/pages/4/index.ts
  17. 12
      src/pages/4/index.wxml
  18. 9
      src/pages/7/index.scss
  19. 12
      src/pages/7/index.ts
  20. 12
      src/pages/7/index.wxml
  21. 3
      src/pages/start/index.json
  22. 19
      src/pages/start/index.scss
  23. 13
      src/pages/start/index.ts
  24. 4
      src/pages/start/index.wxml

16
project.config.json

@ -51,23 +51,11 @@ @@ -51,23 +51,11 @@
"packOptions": {
"ignore": [
{
"value": "/images/*.jpg",
"value": "/images/*",
"type": "glob"
},
{
"value": "/images/**/*.jpg",
"type": "glob"
},
{
"value": "/images/*.png",
"type": "glob"
},
{
"value": "/images/**/*.png",
"type": "glob"
},
{
"value": "/images/**/*.gif",
"value": "/images/**/*",
"type": "glob"
}
],

1
src/app.json

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
{
"pages": [
"pages/start/index",
"pages/1/index",
"pages/2/index",
"pages/3/index",

5
src/components/navigation-bar/navigation-bar.json

@ -1,5 +1,8 @@ @@ -1,5 +1,8 @@
{
"component": true,
"styleIsolation": "apply-shared",
"usingComponents": {}
"usingComponents": {
"van-icon": "@vant/weapp/icon/index"
}
}

2
src/components/navigation-bar/navigation-bar.wxml

@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
aria-role="button"
aria-label="返回"
>
<view class="weui-navigation-bar__button weui-navigation-bar__btn_goback"></view>
<van-icon name="cross" style="font-size: 40rpx;" />
</view>
</view>
</block>

1
src/components/tabbar/tabbar.scss

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
z-index: 2;
width: 100vw;
.tabbar-img {
display: block;
width: 100%;
}
.tabbar-wrap {

15
src/components/tabbar/tabbar.ts

@ -28,24 +28,19 @@ Component({ @@ -28,24 +28,19 @@ Component({
});
},
handleTabbar2() {
wx.reLaunch({
url: "/pages/4/index",
});
},
handleTabbar3() {
wx.navigateTo({
url: "/pages/7/index",
url: "/pages/2/index",
});
},
handleTabbar4() {
wx.reLaunch({
url: "/pages/5/index",
url: "/pages/4/index",
});
},
handleTabbar5() {
wx.reLaunch({
url: "/pages/6/index",
});
// wx.reLaunch({
// url: "/pages/6/index",
// });
},
},
});

4
src/components/tabbar/tabbar.wxml

@ -1,12 +1,10 @@ @@ -1,12 +1,10 @@
<view class="tabbar">
<image class="tabbar-img" mode="widthFix" src="{{imageUrl}}nmosd/tabbar{{current}}.png?t={{Timestamp}}"></image>
<image class="tabbar-img" mode="widthFix" src="{{imageUrl}}psvt/tabbar{{current}}.png?t={{Timestamp}}"></image>
<view class="tabbar-wrap">
<view class="tabbar-click" wx:if="{{current !== 1}}" catch:tap="handleTabbar1"></view>
<view class="tabbar-click" wx:else></view>
<view class="tabbar-click" wx:if="{{current !== 2}}" catch:tap="handleTabbar2"></view>
<view class="tabbar-click" wx:else></view>
<view class="tabbar-click" wx:if="{{current !== 3}}" catch:tap="handleTabbar3"></view>
<view class="tabbar-click" wx:else></view>
<view class="tabbar-click" wx:if="{{current !== 4}}" catch:tap="handleTabbar4"></view>
<view class="tabbar-click" wx:else></view>
<view class="tabbar-click" wx:if="{{current !== 5}}" catch:tap="handleTabbar5"></view>

28
src/pages/1/index.scss

@ -3,20 +3,38 @@ @@ -3,20 +3,38 @@
}
.page-click1 {
position: absolute;
top: 163rpx;
top: 223rpx;
left: 0;
z-index: 1;
width: 750rpx;
height: 430rpx;
height: 530rpx;
background-color: transparent;
}
.page-click2 {
position: absolute;
top: 600rpx;
top: 768rpx;
left: 0;
z-index: 1;
width: 750rpx;
height: 430rpx;
width: 33vw;
height: 240rpx;
background-color: transparent;
}
.page-click3 {
position: absolute;
top: 768rpx;
left: 33vw;
z-index: 1;
width: 34vw;
height: 240rpx;
background-color: transparent;
}
.page-click4 {
position: absolute;
top: 768rpx;
right: 0;
z-index: 1;
width: 33vw;
height: 240rpx;
background-color: transparent;
}

21
src/pages/1/index.ts

@ -1,10 +1,13 @@ @@ -1,10 +1,13 @@
const app = getApp<IAppOption>();
Page({
data: {},
data: {
float1: true,
},
onLoad() {
this.setData({
start: app.globalData.start,
float1: app.globalData.float1,
});
},
onShow() {
@ -14,19 +17,29 @@ Page({ @@ -14,19 +17,29 @@ Page({
},
handelTap1() {
wx.navigateTo({
url: "/pages/2/index",
url: "/pages/3/index",
});
},
handelTap2() {
wx.navigateTo({
url: "/pages/3/index",
url: "/pages/7/index",
});
},
handelTap3() {
wx.navigateTo({
url: "/pages/2/index",
});
},
handelTap4() {
wx.navigateTo({
url: "/pages/4/index",
});
},
handleFloat1() {
this.setData({
float1: false,
});
wx.setStorageSync("1float1", "1");
app.globalData.float1 = false;
},
});

11
src/pages/1/index.wxml

@ -1,6 +1,9 @@ @@ -1,6 +1,9 @@
<image wx:if="{{start}}" class="page" mode="widthFix" src="{{imageUrl}}nmosd/09.png?t={{Timestamp}}"></image>
<image wx:else class="page" mode="widthFix" src="{{imageUrl}}nmosd/010.png?t={{Timestamp}}"></image>
<view class="{{start ? 'page-click2' : 'page-click1'}}" catch:tap="handelTap1"></view>
<view class="{{start ? 'page-click1' : 'page-click2'}}" catch:tap="handelTap2"></view>
<image class="page" mode="widthFix" src="{{imageUrl}}psvt/1.png?t={{Timestamp}}"></image>
<view class="page-click1" catch:tap="handelTap1"></view>
<view class="page-click2" catch:tap="handelTap2"></view>
<view class="page-click3" catch:tap="handelTap3"></view>
<view class="page-click4" catch:tap="handelTap4"></view>
<image wx:if="{{float1}}" class="float1" mode="widthFix" src="{{imageUrl}}psvt/11.png?t={{Timestamp}}" bind:tap="handleFloat1"></image>
<tabbar current="{{1}}"></tabbar>

2
src/pages/2/index.wxml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<navigation-bar></navigation-bar>
<swiper class="page" current="{{current}}">
<swiper-item>
<image bind:tap="handlePage1" class="page-img" mode="widthFix" src="{{imageUrl}}nmosd/011.png?t={{Timestamp}}"></image>
<image bind:tap="handlePage1" class="page-img" mode="widthFix" src="{{imageUrl}}psvt/3.png?t={{Timestamp}}"></image>
</swiper-item>
</swiper>

24
src/pages/3/index.scss

@ -1,15 +1,19 @@ @@ -1,15 +1,19 @@
.page {
width: 100vw;
}
.page-click1 {
position: fixed;
bottom: 0;
left: 0;
z-index: 1;
width: 750rpx;
height: 230rpx;
background-color: transparent;
min-height: 200vh;
.page-img {
width: 100%;
height: 100%;
}
.swiper-click1 {
position: absolute;
top: 863rpx;
left: 0;
z-index: 1;
width: 750rpx;
height: 230rpx;
background-color: transparent;
}
}
.float1 {

26
src/pages/3/index.ts

@ -2,20 +2,36 @@ const _app = getApp<IAppOption>(); @@ -2,20 +2,36 @@ const _app = getApp<IAppOption>();
Page({
data: {
current: 0,
page1: true,
page2: false,
page3: false,
page4: false,
float1: false,
},
onLoad() {},
handlePage1() {
wx.navigateBack();
this.setData({
current: 1,
});
},
handelTap1() {
handlePage2() {
this.setData({
float1: true,
current: 2,
});
},
handleFloat1() {
handlePage3() {
this.setData({
current: 3,
});
},
handlePage4() {
wx.navigateBack();
},
handelTap1() {
this.setData({
float1: false,
current: 0,
});
},
});

40
src/pages/3/index.wxml

@ -1,6 +1,36 @@ @@ -1,6 +1,36 @@
<navigation-bar></navigation-bar>
<image class="page" mode="widthFix" src="{{imageUrl}}nmosd/013.png?t={{Timestamp}}" bind:tap="handlePage1"></image>
<view class="page-click1" catch:tap="handelTap1"></view>
<image wx:if="{{float1}}" class="float1" mode="widthFix" src="{{imageUrl}}nmosd/01.png?t={{Timestamp}}" bind:tap="handleFloat1"></image>
<swiper class="page {{current==2 && 'float-page'}}" current="{{current}}">
<swiper-item>
<image
bind:tap="handlePage1"
class="page-img"
mode="widthFix"
src="{{imageUrl}}psvt/14.png?t={{Timestamp}}"
></image>
</swiper-item>
<swiper-item>
<image
bind:tap="handlePage2"
class="page-img"
mode="widthFix"
src="{{imageUrl}}psvt/13.png?t={{Timestamp}}"
></image>
</swiper-item>
<swiper-item>
<image
bind:tap="handlePage3"
class="page-img"
mode="widthFix"
src="{{imageUrl}}psvt/12.png?t={{Timestamp}}"
></image>
</swiper-item>
<swiper-item>
<image
bind:tap="handlePage4"
class="page-img"
mode="widthFix"
src="{{imageUrl}}psvt/15.png?t={{Timestamp}}"
></image>
<view class="swiper-click1" catch:tap="handelTap1"></view>
</swiper-item>
</swiper>

16
src/pages/4/index.scss

@ -1,12 +1,16 @@ @@ -1,12 +1,16 @@
.page {
width: 100vw;
min-height: 120vh;
.page-img{
width: 100%;
height: 100%;
}
}
.page-click {
.float1 {
position: fixed;
top: 440rpx;
bottom: 0;
left: 0;
z-index: 1;
width: 750rpx;
height: 200rpx;
background-color: transparent;
z-index: 3;
width: 100vw;
}

27
src/pages/4/index.ts

@ -1,15 +1,26 @@ @@ -1,15 +1,26 @@
const app = getApp<IAppOption>();
Page({
data: {},
onLoad() {},
data: {
current: 0,
page1: true,
page2: false,
page3: false,
page4: false,
handleTap1() {
wx.navigateTo({
url: "/pages/5/index",
float1: false,
},
onLoad() {
app.globalData.start = 1;
},
handlePage1() {
this.setData({
float1: true,
});
},
handleTap2() {
wx.navigateTo({
url: "/pages/6/index",
handleFloat1() {
this.setData({
float1: false,
});
},
});

12
src/pages/4/index.wxml

@ -1,4 +1,12 @@ @@ -1,4 +1,12 @@
<navigation-bar></navigation-bar>
<image class="page" mode="widthFix" src="{{imageUrl}}nmosd/012.png?t={{Timestamp}}"></image>
<tabbar current="{{2}}"></tabbar>
<swiper class="page" current="{{current}}">
<swiper-item>
<image bind:tap="handlePage1" class="page-img" mode="widthFix" src="{{imageUrl}}psvt/2.png?t={{Timestamp}}" bind:tap="handlePage1"></image>
</swiper-item>
</swiper>
<image wx:if="{{float1}}" class="float1" mode="widthFix" src="{{imageUrl}}psvt/10.png?t={{Timestamp}}" bind:tap="handleFloat1"></image>
<tabbar current="{{3}}"></tabbar>

9
src/pages/7/index.scss

@ -5,6 +5,15 @@ @@ -5,6 +5,15 @@
width: 100%;
height: 100%;
}
.swiper-click1 {
position: absolute;
top: 743rpx;
left: 0;
z-index: 1;
width: 750rpx;
height: 230rpx;
background-color: transparent;
}
}
.float1 {

12
src/pages/7/index.ts

@ -18,18 +18,22 @@ Page({ @@ -18,18 +18,22 @@ Page({
},
handlePage2() {
this.setData({
float1: true,
current: 2,
});
},
handleFloat1() {
handlePage3() {
this.setData({
current: 2,
float1: false,
current: 3,
});
},
handlePage4() {
wx.navigateBack();
},
handelTap1() {
this.setData({
current: 0,
});
},
});
export {};

12
src/pages/7/index.wxml

@ -1,14 +1,16 @@ @@ -1,14 +1,16 @@
<navigation-bar></navigation-bar>
<swiper class="page {{current==2 && 'float-page'}}" current="{{current}}">
<swiper-item>
<image bind:tap="handlePage1" class="page-img" mode="widthFix" src="{{imageUrl}}nmosd/02.png?t={{Timestamp}}"></image>
<image bind:tap="handlePage1" class="page-img" mode="widthFix" src="{{imageUrl}}psvt/4.png?t={{Timestamp}}"></image>
</swiper-item>
<swiper-item>
<image bind:tap="handlePage2" class="page-img" mode="widthFix" src="{{imageUrl}}nmosd/07.png?t={{Timestamp}}"></image>
<image bind:tap="handlePage2" class="page-img" mode="widthFix" src="{{imageUrl}}psvt/6.png?t={{Timestamp}}"></image>
</swiper-item>
<swiper-item>
<image bind:tap="handlePage4" class="page-img" mode="widthFix" src="{{imageUrl}}nmosd/03.png?t={{Timestamp}}"></image>
<image bind:tap="handlePage3" class="page-img" mode="widthFix" src="{{imageUrl}}psvt/5.png?t={{Timestamp}}"></image>
</swiper-item>
<swiper-item>
<image bind:tap="handlePage4" class="page-img" mode="widthFix" src="{{imageUrl}}psvt/7.png?t={{Timestamp}}"></image>
<view class="swiper-click1" catch:tap="handelTap1"></view>
</swiper-item>
</swiper>
<image wx:if="{{float1}}" class="float1" mode="widthFix" src="{{imageUrl}}nmosd/08.png?t={{Timestamp}}" bind:tap="handleFloat1"></image>

3
src/pages/start/index.json

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
{
"usingComponents": {}
}

19
src/pages/start/index.scss

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
.page {
width: 100vw;
}
.footer {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
padding: 20rpx 0 60rpx;
background-color: #fff;
display: flex;
align-items: center;
justify-content: center;
.btn {
width: 690rpx;
height: 109rpx;
}
}

13
src/pages/start/index.ts

@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
const _app = getApp<IAppOption>();
Page({
data: {},
onLoad() {},
handlePage1() {
wx.navigateTo({
url: "/pages/1/index",
});
},
});
export {};

4
src/pages/start/index.wxml

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
<image class="page" mode="widthFix" src="{{imageUrl}}psvt/8.png?t={{Timestamp}}" bind:tap="handlePage1"></image>
<view class="footer" bind:tap="handlePage1">
<image class="btn" src="{{imageUrl}}psvt/9.png?t={{Timestamp}}"></image>
</view>
Loading…
Cancel
Save