Browse Source

stash

demo-qs
kola-web 2 weeks ago
parent
commit
d739d3f41d
  1. 1
      src/app.ts
  2. 18
      src/components/navigation-bar/navigation-bar.wxml
  3. BIN
      src/images/qs/1.png
  4. BIN
      src/images/qs/10.png
  5. BIN
      src/images/qs/11.png
  6. BIN
      src/images/qs/12.png
  7. BIN
      src/images/qs/13.png
  8. BIN
      src/images/qs/14.png
  9. BIN
      src/images/qs/15.png
  10. BIN
      src/images/qs/16.png
  11. BIN
      src/images/qs/17.png
  12. BIN
      src/images/qs/18.png
  13. BIN
      src/images/qs/19.png
  14. BIN
      src/images/qs/2.png
  15. BIN
      src/images/qs/20.png
  16. BIN
      src/images/qs/21.png
  17. BIN
      src/images/qs/22.png
  18. BIN
      src/images/qs/3.png
  19. BIN
      src/images/qs/4.png
  20. BIN
      src/images/qs/5.png
  21. BIN
      src/images/qs/6.png
  22. BIN
      src/images/qs/7.png
  23. BIN
      src/images/qs/8.png
  24. BIN
      src/images/qs/9.png
  25. BIN
      src/images/qs/tabbar-tip.png
  26. BIN
      src/images/qs/tabbar1.png
  27. BIN
      src/images/qs/tabbar2.png
  28. BIN
      src/images/qs/tabbar3.png
  29. BIN
      src/images/qs/tabbar4.png
  30. BIN
      src/images/qs/首页长 - 标准2.png
  31. 39
      src/pages/1/index.scss
  32. 44
      src/pages/1/index.ts
  33. 12
      src/pages/1/index.wxml
  34. 4
      src/pages/2/index.json
  35. 13
      src/pages/2/index.ts
  36. 10
      src/pages/2/index.wxml
  37. 2
      src/pages/5/index.scss
  38. 5
      src/pages/5/index.ts
  39. 2
      src/pages/5/index.wxml
  40. 4
      src/pages/6/index.json
  41. 3
      src/pages/6/index.ts
  42. 4
      src/pages/6/index.wxml
  43. 4
      src/pages/7/index.scss
  44. 5
      src/pages/7/index.ts
  45. 2
      src/pages/7/index.wxml
  46. 5
      src/pages/9/index.json
  47. 24
      src/pages/9/index.scss
  48. 34
      src/pages/9/index.ts
  49. 29
      src/pages/9/index.wxml
  50. 7
      typings/index.d.ts

1
src/app.ts

@ -4,6 +4,7 @@ import page from "@/utils/page"; @@ -4,6 +4,7 @@ import page from "@/utils/page";
App<IAppOption>({
globalData: {
imageUrl: "https://m.wtx.hbraas.com/demo/web/images/",
float1_1: null,
},
onLaunch() {
Page = page as WechatMiniprogram.Page.Constructor;

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

@ -1,8 +1,10 @@ @@ -1,8 +1,10 @@
<view class="weui-navigation-bar {{extClass}}">
<view class="weui-navigation-bar__inner {{ios ? 'ios' : 'android'}}" style="color: {{color}}; background: {{background}}; {{displayStyle}}; {{innerPaddingRight}}; {{safeAreaTop}};">
<view
class="weui-navigation-bar__inner {{ios ? 'ios' : 'android'}}"
style="color: {{color}}; background: {{background}}; {{displayStyle}}; {{innerPaddingRight}}; {{safeAreaTop}};"
>
<!-- 左侧按钮 -->
<view class='weui-navigation-bar__left' style="{{leftWidth}};">
<view class="weui-navigation-bar__left" style="{{leftWidth}};">
<block wx:if="{{back || homeButton}}">
<!-- 返回上一页 -->
<block wx:if="{{back}}">
@ -40,13 +42,9 @@ @@ -40,13 +42,9 @@
</view>
<!-- 标题 -->
<view class='weui-navigation-bar__center'>
<view class="weui-navigation-bar__center" bindtap="back">
<view wx:if="{{loading}}" class="weui-navigation-bar__loading" aria-role="alert">
<view
class="weui-loading"
aria-role="img"
aria-label="加载中"
></view>
<view class="weui-loading" aria-role="img" aria-label="加载中"></view>
</view>
<block wx:if="{{title}}">
<text>{{title}}</text>
@ -57,7 +55,7 @@ @@ -57,7 +55,7 @@
</view>
<!-- 右侧留空 -->
<view class='weui-navigation-bar__right'>
<view class="weui-navigation-bar__right">
<slot name="right"></slot>
</view>
</view>

BIN
src/images/qs/1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 818 KiB

BIN
src/images/qs/10.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 790 KiB

After

Width:  |  Height:  |  Size: 668 KiB

BIN
src/images/qs/11.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 987 KiB

After

Width:  |  Height:  |  Size: 865 KiB

BIN
src/images/qs/12.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 793 KiB

After

Width:  |  Height:  |  Size: 564 KiB

BIN
src/images/qs/13.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 KiB

After

Width:  |  Height:  |  Size: 229 KiB

BIN
src/images/qs/14.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 469 KiB

After

Width:  |  Height:  |  Size: 226 KiB

BIN
src/images/qs/15.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
src/images/qs/16.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

BIN
src/images/qs/17.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 KiB

BIN
src/images/qs/18.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

BIN
src/images/qs/19.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

BIN
src/images/qs/2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 775 KiB

After

Width:  |  Height:  |  Size: 565 KiB

BIN
src/images/qs/20.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
src/images/qs/21.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

BIN
src/images/qs/22.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

BIN
src/images/qs/3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 KiB

After

Width:  |  Height:  |  Size: 326 KiB

BIN
src/images/qs/4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 KiB

After

Width:  |  Height:  |  Size: 370 KiB

BIN
src/images/qs/5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 699 KiB

After

Width:  |  Height:  |  Size: 435 KiB

BIN
src/images/qs/6.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 KiB

After

Width:  |  Height:  |  Size: 302 KiB

BIN
src/images/qs/7.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 KiB

After

Width:  |  Height:  |  Size: 180 KiB

BIN
src/images/qs/8.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 703 KiB

After

Width:  |  Height:  |  Size: 532 KiB

BIN
src/images/qs/9.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 777 KiB

After

Width:  |  Height:  |  Size: 657 KiB

BIN
src/images/qs/tabbar-tip.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
src/images/qs/tabbar1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 11 KiB

BIN
src/images/qs/tabbar2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 11 KiB

BIN
src/images/qs/tabbar3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 11 KiB

BIN
src/images/qs/tabbar4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 11 KiB

BIN
src/images/qs/首页长 - 标准2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 KiB

39
src/pages/1/index.scss

@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
}
.page-click1 {
position: absolute;
top: 676rpx;
top: 836rpx;
left: 0;
z-index: 1;
width: 50vw;
@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
.page-click2 {
position: absolute;
top: 676rpx;
top: 836rpx;
right: 0;
z-index: 1;
width: 50vw;
@ -23,11 +23,31 @@ @@ -23,11 +23,31 @@
}
.page-click3 {
position: absolute;
top: 1270rpx;
top: 1190rpx;
left: 0;
z-index: 1;
width: 50vw;
height: 220rpx;
background-color: transparent;
}
.page-click4 {
position: absolute;
top: 388rpx;
right: 72rpx;
z-index: 2;
width: 64rpx;
height: 64rpx;
background-color: transparent;
}
.page-click5 {
position: absolute;
top: 356rpx;
right: 0;
z-index: 1;
width: 100vw;
height: 180rpx;
height: 302rpx;
background-color: transparent;
}
@ -53,8 +73,17 @@ @@ -53,8 +73,17 @@
align-items: center;
.tabbar-click {
flex: 1;
height: 160rpx;
height: 220rpx;
}
}
}
.float1 {
position: fixed;
z-index: 3;
bottom: 248rpx;
left: 50%;
transform: translateX(-50%);
width: 256rpx;
height: 122rpx;
}

44
src/pages/1/index.ts

@ -1,45 +1,77 @@ @@ -1,45 +1,77 @@
const _app = getApp<IAppOption>();
const app = getApp<IAppOption>();
Page({
data: {
float1: true,
float2: false,
float3: false,
float1: false,
},
onLoad() {
onShow() {
this.setData({
float1: wx.getStorageSync("1float1") !== "1",
float1: app.globalData.float1_1 === null ? true : false,
});
},
handelTap1() {
wx.navigateTo({
url: "/pages/2/index",
});
this.handleHideFloat1()
},
handelTap2() {
wx.navigateTo({
url: "/pages/3/index",
});
this.handleHideFloat1()
},
handelTap3() {
wx.navigateTo({
url: "/pages/4/index",
});
this.handleHideFloat1()
},
handelTap4() {
wx.navigateTo({
url: "/pages/9/index?current=3",
});
this.handleHideFloat1()
},
handelTap5() {
wx.navigateTo({
url: "/pages/9/index",
});
this.handleHideFloat1()
},
handleTabbar2() {
wx.reLaunch({
url: "/pages/5/index",
});
this.handleHideFloat1()
},
handleTabbar3() {
wx.navigateTo({
url: "/pages/9/index",
});
this.handleHideFloat1()
},
handleTabbar4() {
wx.navigateTo({
url: "/pages/6/index",
});
this.handleHideFloat1()
},
handleTabbar5() {
wx.reLaunch({
url: "/pages/7/index",
});
this.handleHideFloat1()
},
handleFloat1() {
this.setData({
float1: false,
});
this.handleHideFloat1()
},
handleHideFloat1() {
app.globalData.float1_1 = "1";
},
});

12
src/pages/1/index.wxml

@ -2,14 +2,24 @@ @@ -2,14 +2,24 @@
<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>
<view class="page-click5" catch:tap="handelTap5"></view>
<view class="tabbar">
<image class="tabbar-img" mode="widthFix" src="{{imageUrl}}qs/tabbar1.png?t={{Timestamp}}"></image>
<view class="tabbar-wrap">
<view class="tabbar-click"></view>
<view class="tabbar-click" catch:tap="handleTabbar2"></view>
<view class="tabbar-click"></view>
<view class="tabbar-click" catch:tap="handleTabbar3"></view>
<view class="tabbar-click" catch:tap="handleTabbar4"></view>
<view class="tabbar-click" catch:tap="handleTabbar5"></view>
</view>
</view>
<image
wx:if="{{float1}}"
class="float1"
mode="widthFix"
src="{{imageUrl}}qs/tabbar-tip.png?t={{Timestamp}}"
bind:tap="handleFloat1"
></image>

4
src/pages/2/index.json

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
{
"usingComponents": {}
"usingComponents": {
"van-icon": "@vant/weapp/icon/index"
}
}

13
src/pages/2/index.ts

@ -16,6 +16,19 @@ Page({ @@ -16,6 +16,19 @@ Page({
});
},
handlePage3() {
this.setData({
current: 3,
});
},
handlePage4() {
this.setData({
current: 4,
});
},
handlePage5() {
wx.navigateBack();
},
handleBack() {
wx.navigateBack();
},
});

10
src/pages/2/index.wxml

@ -1,4 +1,6 @@ @@ -1,4 +1,6 @@
<navigation-bar title="生活质量自评"></navigation-bar>
<navigation-bar back="{{current<4}}">
<van-icon slot="left" size="24" name="cross" bind:tap="handleBack" />
</navigation-bar>
<swiper class="page" current="{{current}}">
<swiper-item class="swiper-item1">
<image bind:tap="handlePage1" class="page-img" mode="widthFix" src="{{imageUrl}}qs/2.png?t={{Timestamp}}"></image>
@ -9,4 +11,10 @@ @@ -9,4 +11,10 @@
<swiper-item>
<image bind:tap="handlePage3" class="page-img" mode="widthFix" src="{{imageUrl}}qs/4.png?t={{Timestamp}}"></image>
</swiper-item>
<swiper-item>
<image bind:tap="handlePage4" class="page-img" mode="widthFix" src="{{imageUrl}}qs/15.png?t={{Timestamp}}"></image>
</swiper-item>
<swiper-item>
<image bind:tap="handlePage5" class="page-img" mode="widthFix" src="{{imageUrl}}qs/17.png?t={{Timestamp}}"></image>
</swiper-item>
</swiper>

2
src/pages/5/index.scss

@ -41,7 +41,7 @@ page { @@ -41,7 +41,7 @@ page {
align-items: center;
.tabbar-click {
flex: 1;
height: 160rpx;
height: 220rpx;
}
}
}

5
src/pages/5/index.ts

@ -25,6 +25,11 @@ Page({ @@ -25,6 +25,11 @@ Page({
url: "/pages/1/index",
});
},
handleTabbar3() {
wx.navigateTo({
url: "/pages/9/index",
});
},
handleTabbar4() {
wx.navigateTo({
url: "/pages/6/index",

2
src/pages/5/index.wxml

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
<view class="tabbar-wrap">
<view class="tabbar-click" catch:tap="handleTabbar1"></view>
<view class="tabbar-click"></view>
<view class="tabbar-click"></view>
<view class="tabbar-click" catch:tap="handleTabbar3"></view>
<view class="tabbar-click" catch:tap="handleTabbar4"></view>
<view class="tabbar-click" catch:tap="handleTabbar5"></view>
</view>

4
src/pages/6/index.json

@ -1,3 +1,5 @@ @@ -1,3 +1,5 @@
{
"usingComponents": {}
"usingComponents": {
"van-icon": "@vant/weapp/icon/index"
}
}

3
src/pages/6/index.ts

@ -18,6 +18,9 @@ Page({ @@ -18,6 +18,9 @@ Page({
url: "/pages/7/index",
});
},
handleBack() {
wx.navigateBack();
},
});
export {};

4
src/pages/6/index.wxml

@ -1,2 +1,4 @@ @@ -1,2 +1,4 @@
<navigation-bar></navigation-bar>
<navigation-bar back="{{false}}">
<van-icon slot="left" size="24" name="cross" bind:tap="handleBack" />
</navigation-bar>
<image class="page" mode="widthFix" src="{{imageUrl}}qs/12.png?t={{Timestamp}}"></image>

4
src/pages/7/index.scss

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
}
.page-click1 {
position: fixed;
top: 388rpx;
top: 508rpx;
left: 0;
z-index: 1;
width: 750rpx;
@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
align-items: center;
.tabbar-click {
flex: 1;
height: 160rpx;
height: 220rpx;
}
}
}

5
src/pages/7/index.ts

@ -22,6 +22,11 @@ Page({ @@ -22,6 +22,11 @@ Page({
url: "/pages/4/index",
});
},
handleTabbar3() {
wx.navigateTo({
url: "/pages/9/index",
});
},
handleTabbar4() {
wx.navigateTo({
url: "/pages/6/index",

2
src/pages/7/index.wxml

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
<view class="tabbar-wrap">
<view class="tabbar-click" catch:tap="handleTabbar1"></view>
<view class="tabbar-click" catch:tap="handleTabbar2"></view>
<view class="tabbar-click"></view>
<view class="tabbar-click" catch:tap="handleTabbar3"></view>
<view class="tabbar-click" catch:tap="handleTabbar4"></view>
<view class="tabbar-click"></view>
</view>

5
src/pages/9/index.json

@ -1,3 +1,6 @@ @@ -1,3 +1,6 @@
{
"usingComponents": {}
"usingComponents": {
"van-popup": "@vant/weapp/popup/index",
"van-icon": "@vant/weapp/icon/index"
}
}

24
src/pages/9/index.scss

@ -1,18 +1,14 @@ @@ -1,18 +1,14 @@
.page {
width: 100%;
}
.float1 {
position: fixed;
z-index: 3;
bottom: 0;
left: 0;
width: 100%;
width: 100vw;
min-height: 3000rpx;
.page-img {
width: 100vw;
}
}
.float2 {
position: fixed;
z-index: 3;
bottom: 0;
left: 0;
width: 100%;
.float1 {
display: block;
margin: 0 auto;
width: 670rpx;
height: 706rpx;
}

34
src/pages/9/index.ts

@ -2,25 +2,41 @@ const _app = getApp<IAppOption>(); @@ -2,25 +2,41 @@ const _app = getApp<IAppOption>();
Page({
data: {
float1: true,
float2: false,
current: 0,
float1: false,
},
onLoad(options) {
this.setData({
current: Number(options.current),
});
},
handlePage1() {
this.setData({
current: 1,
});
},
onLoad() {},
handleTap1() {
hadnleFloat1() {
this.setData({
float2: true,
float1: true,
});
},
handleFloat1() {
handlePage2() {
this.setData({
float1: false,
current: 2,
});
},
handleFloat2() {
wx.navigateTo({
url: "/pages/10/index",
handlePage3() {
this.setData({
current: 3,
});
},
handlePage4() {
wx.navigateBack();
},
handleBack() {
wx.navigateBack();
},
});
export {};

29
src/pages/9/index.wxml

@ -1,4 +1,27 @@ @@ -1,4 +1,27 @@
<image class="page" mode="widthFix" src="{{imageUrl}}17.png?t={{Timestamp}}" bind:tap="handleTap1"></image>
<navigation-bar back="{{false}}">
<van-icon slot="left" size="24" name="cross" bind:tap="handleBack" />
</navigation-bar>
<swiper class="page" current="{{current}}">
<swiper-item class="swiper-item1">
<image bind:tap="handlePage1" class="page-img" mode="widthFix" src="{{imageUrl}}qs/18.png?t={{Timestamp}}"></image>
</swiper-item>
<swiper-item>
<image bind:tap="hadnleFloat1" class="page-img" mode="widthFix" src="{{imageUrl}}qs/19.png?t={{Timestamp}}"></image>
</swiper-item>
<swiper-item>
<image bind:tap="handlePage3" class="page-img" mode="widthFix" src="{{imageUrl}}qs/21.png?t={{Timestamp}}"></image>
</swiper-item>
<swiper-item>
<image bind:tap="handlePage4" class="page-img" mode="widthFix" src="{{imageUrl}}qs/22.png?t={{Timestamp}}"></image>
</swiper-item>
</swiper>
<image wx:if="{{float1}}" class="float1" mode="widthFix" src="{{imageUrl}}16.png?t={{Timestamp}}" bind:tap="handleFloat1"></image>
<image wx:if="{{float2}}" class="float2" mode="widthFix" src="{{imageUrl}}10.png?t={{Timestamp}}" bind:tap="handleFloat2"></image>
<van-popup
show="{{ float1 }}"
position="bottom"
bind:close="handlePage2"
custom-style="background:transparent"
safe-area-inset-bottom="{{false}}"
>
<image bind:tap="handlePage2" class="float1" mode="widthFix" src="{{imageUrl}}qs/20.png?t={{Timestamp}}"></image>
</van-popup>

7
typings/index.d.ts vendored

@ -2,7 +2,8 @@ @@ -2,7 +2,8 @@
interface IAppOption {
globalData: {
userInfo?: WechatMiniprogram.UserInfo,
}
userInfoReadyCallback?: WechatMiniprogram.GetUserInfoSuccessCallback,
float1_1: null | string;
userInfo?: WechatMiniprogram.UserInfo;
};
userInfoReadyCallback?: WechatMiniprogram.GetUserInfoSuccessCallback;
}
Loading…
Cancel
Save