Kaynağa Gözat

美化小程序首页,优化部分显示字体

csk 3 yıl önce
ebeveyn
işleme
eeb4701891

+ 14 - 10
wx-mall/app.js

@@ -3,6 +3,17 @@ var api = require('./config/api.js');
 var user = require('./services/user.js');
 
 App({
+  globalData: {
+    systemInfo: '',
+    userInfo: {
+      nickName: '点击头像登录',
+      avatarUrl: 'http://120.76.26.84:80/group1/M00/00/01/rBJEdVvr17OACigOAAAB_us54MA744.png'
+    },
+    token: '',
+    appGoodsBizType: '00',
+    appCheckCart: '00',
+  },
+
   onLaunch: function () {
     var that = this;
     //获取用户的登录信息
@@ -11,6 +22,8 @@ App({
     //   user.loginByWeixin();
     // });
 
+    let menuButtonObject = wx.getMenuButtonBoundingClientRect();
+
     // 设备信息
     wx.getSystemInfo({
       success: function (res) {
@@ -18,15 +31,6 @@ App({
       }
     });
     console.log("that.globalData.systemInfo:"+that.globalData.systemInfo);
-  },
-  globalData: {
-    systemInfo: '',
-    userInfo: {
-      nickName: '点击头像登录',
-      avatarUrl: 'http://120.76.26.84:80/group1/M00/00/01/rBJEdVvr17OACigOAAAB_us54MA744.png'
-    },
-    token: '',
-    appGoodsBizType: '00',
-    appCheckCart: '00'
   }
+
 })

+ 7 - 0
wx-mall/pages/index/index.js

@@ -26,6 +26,12 @@ Page({
     isStartLocation: null, // 是否授权地理位置获取权限
     isSystemLocation: null // 手机系统设置中定位是否开启
   },
+  //控制回到顶部按钮的显示与消失
+  scrollTopFun(e){
+    let that = this;
+    that.top = e.detail.scrollTop;
+    that.$apply();
+  },
   onLoad: function(options) {
     let that = this;
 
@@ -1035,4 +1041,5 @@ Page({
     });
     that.getGoodsList();
   }
+
 })

+ 1 - 1
wx-mall/pages/index/index.wxml

@@ -197,7 +197,7 @@
               </navigator>
               <view class="goods-do" id="goods-do-new">
                 <navigator url="/pages/goods/goods?id={{item.id}}&&storeId={{item.storeId}}&&paramView=hotGoods">
-                  <p  id="directionp"><text class="price">{{item.retail_price?"¥"+item.retail_price:"0"}}</text><span class="goods-do-font">(含税)</span></p>
+                  <p id="directionp"><text class="price">{{item.retail_price?"¥"+item.retail_price:"0"}}</text><span class="goods-do-font">(含税)</span></p>
                   <p><span class="goods-do-font">零售价:</span><text class="org-price line-through">{{item.market_price?"¥"+item.market_price:""}}</text></p>
                 </navigator>
                 <!-- //数量加减 -->

+ 13 - 13
wx-mall/pages/index/index.wxss

@@ -35,14 +35,14 @@
 }
 
 .home-header {
-  /* position: fixed; */
+  position: fixed;
   width: 750rpx;
   height: 40rpx;
   display: flex;
   justify-content: left;
   align-items: left;
   background-color: #fff;
-  /* z-index: 98; */
+   z-index: 98;
 }
 
 .current-store {
@@ -60,8 +60,8 @@
 
 
 .search-header {
-  /* position: fixed; */
-  /* top: 40rpx; */
+  position: fixed;
+  top: 40rpx;
   width: 750rpx;
   height: 91rpx;
   display: flex;
@@ -69,7 +69,7 @@
   padding: 0 31.25rpx;
   font-size: 29rpx;
   color: #333;
-  /* z-index: 99; */
+  z-index: 99;
 }
 
 .search-header .input-box {
@@ -132,9 +132,9 @@
   width: 710rpx;
   height: 365rpx;
   background-color: #fff;
-  /* display: flex; */
+  padding-top: 130rpx;
   justify-content: center;
-  margin: 10rpx auto 0 auto;
+  margin: 0 auto;
   border-radius: 15rpx;
   box-shadow: 3px 3px 7px rgb(224, 221, 221);
 }
@@ -276,8 +276,8 @@
   justify-content: center;
   overflow: hidden;
   height: 264rpx;
-  width: 446rpx;
-  margin-left:30rpx;
+  width: 460rpx;
+  margin-left:20rpx;
 }
 
 .a-section .b .name {
@@ -285,7 +285,7 @@
   display: block;
   color: #333;
   line-height: 50rpx;
-  font-size: 30rpx;
+  font-size: 35rpx;
   /* font-weight: bolder; */
 }
 
@@ -302,7 +302,7 @@
 }
 
 #goods-do-new {
-  margin-top: 20%;
+  margin-top: 10%;
 }
 
 
@@ -321,7 +321,7 @@
   display: inline;
   color: #f00910;
   line-height: 50rpx;
-  font-size:41rpx;
+  font-size:42rpx;
   /* font-weight: bold; */
 }
 
@@ -335,7 +335,7 @@ margin-bottom:10%;
   color: #333;
   line-height: 50rpx;
   font-size: 23rpx;
-  margin-left: 10rpx;
+  margin-left: 2rpx;
 }
 
 

+ 3 - 0
wx-mall/pages/ucenter/index/index.wxss

@@ -196,6 +196,9 @@ page {
   border-right: 1px solid rgba(0, 0, 0, 0.15);
   border-bottom: 1px solid rgba(0, 0, 0, 0.15);
   text-align: center;
+  display: flex;
+  border-radius: 15rpx;
+  box-shadow: 3px 3px 7px rgb(224, 221, 221);
 }
 
 .user-menu .item .a {