Browse Source

feat():首页

geek 4 years ago
parent
commit
bb9f4786f1

+ 0 - 1
app.json

@@ -11,7 +11,6 @@
     "pages/personorder/personorder",
     "pages/shopinfo/shopinfo",
     "pages/shop/shop"
-
   ],
   "window":{
     "navigationBarBackgroundColor": "#343434",

File diff suppressed because it is too large
+ 6 - 6
miniprogram_npm/miniprogram-api-promise/index.js


+ 6 - 6
node_modules/weui-miniprogram/package.json

@@ -1,19 +1,19 @@
 {
-  "_from": "weui-miniprogram",
+  "_from": "weui-miniprogram@^1.0.6",
   "_id": "weui-miniprogram@1.0.6",
   "_inBundle": false,
   "_integrity": "sha512-ZegGoOE6Gok3YkTTmlbsgAnd6+0SyqREzfCy160ttW3TC884bkgMHj9zZeXIPQSbIp18rg99I5qWJr5o44QodQ==",
   "_location": "/weui-miniprogram",
   "_phantomChildren": {},
   "_requested": {
-    "type": "tag",
+    "type": "range",
     "registry": true,
-    "raw": "weui-miniprogram",
+    "raw": "weui-miniprogram@^1.0.6",
     "name": "weui-miniprogram",
     "escapedName": "weui-miniprogram",
-    "rawSpec": "",
+    "rawSpec": "^1.0.6",
     "saveSpec": null,
-    "fetchSpec": "latest"
+    "fetchSpec": "^1.0.6"
   },
   "_requiredBy": [
     "#DEV:/",
@@ -21,7 +21,7 @@
   ],
   "_resolved": "https://registry.npmjs.org/weui-miniprogram/-/weui-miniprogram-1.0.6.tgz",
   "_shasum": "26743824e0f79b92e4417a3db3d17f7631d880dc",
-  "_spec": "weui-miniprogram",
+  "_spec": "weui-miniprogram@^1.0.6",
   "_where": "/Users/liuluzheng/WebstormProjects/pos_xcx",
   "author": {
     "name": "xushengni,tomylin,cunjinli,rockhou"

+ 14 - 3
pages/index/index.js

@@ -97,7 +97,7 @@ Page({
 
   getProductList: async function () {
     const self = this
-    const productList = await productApi.getProductList(1,10)
+    const productList = await productApi.getProductList(1,4)
     console.log()
     self.setData({
       productList: productList,
@@ -168,7 +168,6 @@ Page({
     })
   },
   getLocation: async function(){
-    console.log(1111)
     const self = this
     wx.getLocation({
       type: 'wgs84',
@@ -186,5 +185,17 @@ Page({
         })
       }
      })
-  }
+  },
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+    console.log('2222')
+  },
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+    console.log(111)
+  },
 })

+ 0 - 1
pages/index/index.json

@@ -1,5 +1,4 @@
 {
-  "disableScroll": true,
   "usingComponents": {
     "mp-icon": "weui-miniprogram/icon/icon",
     "shop":"/componets/shop/index",

+ 3 - 3
pages/index/index.wxml

@@ -1,6 +1,6 @@
+
 <!--index.wxml-->
 <view class="container">
-  <view>
     <!-- 店铺信息 -->
     <view class="shop">
       <view class="title">
@@ -58,7 +58,7 @@
       </view>
     </view>
     <!-- 产品信息 -->
-    <view class="product" style="height: {{productHeight+100}}rpx;">
+    <view class="product" style="">
 
       <!--   <mp-tabs tabs="{{tabs}}" activeTab="{{activeTab}}" swiperClass="weui-tabs-swiper" bindtabclick="onTabClick"
         bindchange="swiperChange" activeClass="tab-bar-title__selected" swiperHeight="{{(tabs[activeTab].list.length)*420}}">
@@ -109,5 +109,5 @@
 </block>
     </view>
 
-  </view>
+
 </view>

+ 6 - 4
pages/index/index.wxss

@@ -1,14 +1,16 @@
-@charset "UTF-8";
-Page {
+
+page {
   width: 100%;
   height: 100%;
   background-color: #F7F7F7;
+  overflow-y: visible !important;
 }
 
 .container {
   width: 100%;
   height: 100%;
   background-color: #F7F7F7;
+  overflow: auto;
   /* 门店的标题 */
 }
 
@@ -118,7 +120,7 @@ Page {
 }
 
 .container .product {
-  overflow-y: auto;
+  /* overflow-y: auto; */
   /* .weui-tabs {
       .weui-tabs-bar__wrp {
         .weui-tabs-bar__content {
@@ -150,7 +152,7 @@ Page {
 }
 
 .container .product .productinfo .product-item .product-desc {
-  height: 380rpx;
+  /* height: 380rpx; */
   color: #fff;
   position: absolute;
   color: #fff;