经验首页 前端设计 程序设计 Java相关 移动开发 数据库/运维 软件/图像 大数据/云计算 其他经验
当前位置:技术经验 » 程序设计 » PHP » 查看文章
微信小程序开发实战(云开发)--资产管理工具
来源:cnblogs  作者:阿泽blog  时间:2020/11/16 10:29:34  对本文有异议

添加首页 menu页面

截图展示

file

  1. // pages/menu/menu.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. },
  8. /**
  9. * 生命周期函数--监听页面加载
  10. */
  11. onLoad: function (options) {
  12. },
  13. /**
  14. * 生命周期函数--监听页面初次渲染完成
  15. */
  16. onReady: function () {
  17. },
  18. /**
  19. * 生命周期函数--监听页面显示
  20. */
  21. onShow: function () {
  22. },
  23. /**
  24. * 生命周期函数--监听页面隐藏
  25. */
  26. onHide: function () {
  27. },
  28. /**
  29. * 生命周期函数--监听页面卸载
  30. */
  31. onUnload: function () {
  32. },
  33. /**
  34. * 页面相关事件处理函数--监听用户下拉动作
  35. */
  36. onPullDownRefresh: function () {
  37. },
  38. /**
  39. * 页面上拉触底事件的处理函数
  40. */
  41. onReachBottom: function () {
  42. },
  43. /**
  44. * 用户点击右上角分享
  45. */
  46. onShareAppMessage: function () {
  47. }
  48. })
  1. {
  2. "usingComponents": {},
  3. "navigationStyle": "custom",
  4. "backgroundColor": "#fff",
  5. "backgroundTextStyle": "light",
  6. "navigationBarBackgroundColor": "#fff",
  7. "navigationBarTitleText": "理财小助手",
  8. "navigationBarTextStyle": "black"
  9. }
  1. <view class='cu-tabbar-height' style="min-height:180rpx">
  2. <view class="userinfo-avatar">
  3. <open-data type="userAvatarUrl"></open-data>
  4. </view>
  5. </view>
  6. <view class="cu-card" style="margin-bottom:35rpx">
  7. <view class="cu-item bg-img shadow-blur" style="background-image:url('images/qpct2148.jpg')">
  8. <view class="cardTitle" style="font-weight:bolder">
  9. 你好 <open-data type="userNickName"></open-data>
  10. </view>
  11. </view>
  12. </view>
  13. <view class='nav-list'>
  14. <navigator open-type="navigate" hover-class='none' url="" class="nav-li bg-cyan" >
  15. <view style="font-weight:bolder" class="nav-title">资产管理</view>
  16. <view style="font-weight:bolder" class="nav-name">management</view>
  17. <text class='cuIcon-rechargefill'></text>
  18. </navigator>
  19. <navigator open-type="navigate" hover-class='none' url="" class="nav-li bg-blue" >
  20. <view style="font-weight:bolder" class="nav-title">购买判断</view>
  21. <view style="font-weight:bolder" class="nav-name">judge</view>
  22. <text class='cuIcon-squarecheckfill'></text>
  23. </navigator>
  24. <navigator open-type="navigate" hover-class='none' url="" class="nav-li bg-olive" >
  25. <view style="font-weight:bolder" class="nav-title">使用说明</view>
  26. <view style="font-weight:bolder" class="nav-name">instructions</view>
  27. <text class='cuIcon-formfill'></text>
  28. </navigator>
  29. <button open-type="contact" hover-class='none' style="width: 45%;margin: 0 0 40rpx;" class="nav-li bg-green" >
  30. <view style="font-weight:bolder" class="nav-title" style="text-align:left">联系我们</view>
  31. <view style="font-weight:bolder" class="nav-name" style="text-align:left">Contact</view>
  32. <text class='cuIcon-friendaddfill' style=""></text>
  33. </button>
  34. </view>
  35. <view class='cu-tabbar-height'></view>
  1. /* pages/menu/menu.wxss */
  2. @import "../../colorui/main.wxss";
  3. @import "../../colorui/icon.wxss";
  4. page{
  5. background-color: white;
  6. }
  7. .cardTitle{
  8. color: #fff;
  9. padding: 90rpx 60rpx;
  10. font-size: 40rpx;
  11. font-weight: 300;
  12. transform: skew(-10deg, 0deg);
  13. position: relative;
  14. text-shadow: 0px 0px 6rpx rgba(0,0,0,0.3)
  15. }
  16. .cardTitle::before{
  17. content: "";
  18. position: absolute;
  19. width: 60rpx;
  20. height: 6rpx;
  21. border-radius: 20rpx;
  22. background-color: #fff;
  23. display: block;
  24. top: 60rpx;
  25. left: 50rpx;
  26. transform: skew(10deg, 0deg);
  27. }
  28. .cardTitle::after{
  29. content: "";
  30. position: absolute;
  31. width: 140rpx;
  32. border-radius: 6rpx;
  33. height: 24rpx;
  34. background-color: #fff;
  35. display: block;
  36. bottom: 76rpx;
  37. left: 90rpx;
  38. transform: skew(10deg, 0deg);
  39. opacity: 0.1;
  40. }
  41. .scrollPage {
  42. height: 100vh;
  43. }
  44. .nav-list {
  45. display: flex;
  46. flex-wrap: wrap;
  47. padding: 0px 40rpx 0px;
  48. justify-content: space-between;
  49. }
  50. .nav-li {
  51. padding: 30rpx;
  52. border-radius: 12rpx;
  53. width: 45%;
  54. margin: 0 0 40rpx;
  55. background-image: url(https://image.weilanwl.com/color2.0/cardBg.png);
  56. background-size: cover;
  57. background-position: center;
  58. position: relative;
  59. z-index: 1;
  60. }
  61. .nav-li::after {
  62. content: "";
  63. position: absolute;
  64. z-index: -1;
  65. background-color: inherit;
  66. width: 100%;
  67. height: 100%;
  68. left: 0;
  69. bottom: -10%;
  70. border-radius: 10rpx;
  71. opacity: 0.2;
  72. transform: scale(0.9, 0.9);
  73. }
  74. .nav-li.cur {
  75. color: #fff;
  76. background: rgb(94, 185, 94);
  77. box-shadow: 4rpx 4rpx 6rpx rgba(94, 185, 94, 0.4);
  78. }
  79. .nav-title {
  80. font-size: 32rpx;
  81. font-weight: 300;
  82. }
  83. .nav-title::first-letter {
  84. font-size: 40rpx;
  85. margin-right: 4rpx;
  86. }
  87. .nav-name {
  88. font-size: 28rpx;
  89. text-transform: Capitalize;
  90. margin-top: 20rpx;
  91. position: relative;
  92. }
  93. .nav-name::before {
  94. content: "";
  95. position: absolute;
  96. display: block;
  97. width: 40rpx;
  98. height: 6rpx;
  99. background: #fff;
  100. bottom: 0;
  101. right: 0;
  102. opacity: 0.5;
  103. }
  104. .nav-name::after {
  105. content: "";
  106. position: absolute;
  107. display: block;
  108. width: 100rpx;
  109. height: 1px;
  110. background: #fff;
  111. bottom: 0;
  112. right: 40rpx;
  113. opacity: 0.3;
  114. }
  115. .nav-name::first-letter {
  116. font-weight: bold;
  117. font-size: 36rpx;
  118. margin-right: 1px;
  119. }
  120. .nav-li text {
  121. position: absolute;
  122. right: 30rpx;
  123. top: 30rpx;
  124. font-size: 52rpx;
  125. width: 60rpx;
  126. height: 60rpx;
  127. text-align: center;
  128. line-height: 60rpx;
  129. }
  130. .text-light {
  131. font-weight: 300;
  132. }
  133. .userinfo-avatar {
  134. overflow:hidden;
  135. display: block;
  136. width: 80rpx;
  137. height: 80rpx;
  138. margin-left: 50rpx;
  139. margin-top: 70rpx;
  140. border-radius: 50%;
  141. border: 2px solid #fff;
  142. box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
  143. }
  144. .userinfo{
  145. /* color: #fff; */
  146. font-size: 14px;
  147. background-color: #c0c0c0;
  148. border-radius:40%;
  149. }

合作项目/交朋友/问题咨询 请打开https://blog.iffmd.cn (https://blog.iffmd.cn)

原文链接:http://www.cnblogs.com/wzfblog/p/13954358.html

 友情链接:直通硅谷  点职佳  北美留学生论坛

本站QQ群:前端 618073944 | Java 606181507 | Python 626812652 | C/C++ 612253063 | 微信 634508462 | 苹果 692586424 | C#/.net 182808419 | PHP 305140648 | 运维 608723728

W3xue 的所有内容仅供测试,对任何法律问题及风险不承担任何责任。通过使用本站内容随之而来的风险与本站无关。
关于我们  |  意见建议  |  捐助我们  |  报错有奖  |  广告合作、友情链接(目前9元/月)请联系QQ:27243702 沸活量
皖ICP备17017327号-2 皖公网安备34020702000426号