Kaynağa Gözat

添加内容

sharp-agezi 6 yıl önce
ebeveyn
işleme
552f958682

+ 3 - 4
app.js

@@ -1,5 +1,4 @@
-//app.js
-// let youziku = require('./utils/youziku.api.min.js')
+
 App({
   data: {
     deviceInfo: {},
@@ -137,8 +136,8 @@ App({
     fromUserId : '',//分享者的id
     fromUserRole : '',//分享者的role
     //servsers: "https://52yqf.cn/",
-    servsers: "https://www.daliangzao.net/",//正式库
-    // servsers: "https://dlz.info666.com/",//测试域名库
+    // servsers: "https://www.daliangzao.net/",//正式库
+    servsers: "https://dlz.info666.com/",//测试域名库
     //servsers: "https://tt.daliangzao.net/",//测试库
     appid: 'wxf9a0ddcb8c70b939',//appid
     secret: 'a009cb3e46c8ecef9c54a50522f11823',//secret

+ 21 - 18
newsShop/pages/kind/index.wxml

@@ -27,22 +27,25 @@
         <view class='f-box'>
           <view class='f-item f-box f-align-items-center f-justify-content-center' bindtap='newTap'>
             <text>最新</text>
-            <view class='icon-box'>
-              <icon class='iconfont .icon-icon_sanjiaoxing-copy {{isNew ? "active" : ""}}'></icon>
-              <icon class='iconfont .icon-icon_sanjiaoxing {{isNew ? "" : "active"}}'></icon>
+            <!-- 三角形 -->
+            <view class='triangle-box'>
+              <view class='triangle-just {{isNew ? "active" : ""}}'></view>
+              <view class='triangle-invert {{isNew ? "" : "active"}}'></view>
             </view>
           </view>
           <view class='f-item f-box f-align-items-center f-justify-content-center' bindtap='priceTap'>
             <text>价格</text>
-            <view class='icon-box'>
-              <icon class='iconfont .icon-icon_sanjiaoxing-copy {{isMin ? "active" : ""}}'></icon>
-              <icon class='iconfont .icon-icon_sanjiaoxing {{isMin ? "" : "active"}}'></icon>
+            <!-- 三角形 -->
+            <view class='triangle-box'>
+              <view class='triangle-just {{isNew ? "active" : ""}}'></view>
+              <view class='triangle-invert {{isNew ? "" : "active"}}'></view>
             </view>
           </view>
           <view class='f-item f-box f-align-items-center f-justify-content-center' bindtap='filterTap'>
             <text>筛选</text>
-            <view class='icon-box icon-last'>
-              <icon class='iconfont .icon-icon_sanjiaoxing {{filterStatic ? "active" : ""}}'></icon>
+            <!-- 三角形 -->
+            <view class='triangle-box' style='height:16rpx'>
+              <view class='triangle-invert'></view>
             </view>
           </view>
         <!-- 筛选内容 -->
@@ -71,22 +74,22 @@
         </view>
         
       </view>
-      </view>
+    </view>
       
 
 
       <!-- goodsList -->
       <view class='goods-box '>
-      <view class='f-box f-flex-wrap f-justify-content-between'>
-        <view class='goods-list' wx:for="{{goodsList}}">
-          <image src='{{item.commodity_logo}}' class='goods-img' mode='aspectFit'></image>
-          <!-- <view class='goods-summary'></view> -->
-          <view class='goods-title'>{{item.commodity_name}}</view>
-          <view class='goods-price'>¥{{item.commodity_sale}}</view>
+        <view class='f-box f-flex-wrap f-justify-content-between'>
+          <view class='goods-list' wx:for="{{goodsList}}">
+            <image src='{{item.commodity_logo}}' class='goods-img' mode='aspectFit'></image>
+            <!-- <view class='goods-summary'></view> -->
+            <view class='goods-title'>{{item.commodity_name}}</view>
+            <view class='goods-price'>¥{{item.commodity_sale}}</view>
+          </view>
         </view>
-      </view>
-      <divider wx:if="{{!requestState}}"></divider>
-      <data-none wx:if="{{goodsList.length === 0}}"></data-none>
+        <divider wx:if="{{!requestState}}"></divider>
+        <data-none wx:if="{{goodsList.length === 0}}"></data-none>
       </view>
        
     </view>

+ 34 - 31
newsShop/pages/kind/index.wxss

@@ -1,18 +1,8 @@
-page{
+
+.classify-main{
   background:#fff;
 }
-.header{
-  padding-top:88rpx;
-}
-.header-box{
-  border-bottom:2rpx solid #e0e0e0;
-  position: fixed;
-  width:100%;
-  top:0;
-  left:0;
-  background: #FFF;
-  z-index:10000;
-}
+
 .header image{
   width:70rpx;
   height:70rpx;
@@ -35,6 +25,7 @@ page{
 /* left */
 .class-left{
   padding-left:172rpx;
+  
 }
 .class-left .nav{
   position:fixed;
@@ -43,8 +34,12 @@ page{
   height:100%;
   width:170rpx;
   border-right:2rpx solid #e0e0e0;
+  border-top:2rpx solid #e0e0e0;
   z-index:100;
 }
+/* .class-right{
+  border-top:2rpx solid #e0e0e0;
+} */
 .nav-list{
   height:54rpx;
   margin:25rpx 0;
@@ -62,27 +57,35 @@ page{
   line-height:70rpx;
   background:#fff;
   border-bottom:2rpx solid #e0e0e0;
+  border-top:2rpx solid #e0e0e0;
   position: relative;
   z-index:100;
 }
-.icon-box{
-  color:#dcdcdc;
-  line-height:40rpx;
-  height:40rpx;
-  position: absolute;
-  top:-8rpx;
-  margin-left:1.1rem;
-}
-.icon-box icon{
-  display:block;
-  height:16rpx;
-  line-height:16rpx;
-}
-.icon-box icon.active{
-  color:#333;
-}
-.icon-last{
-  top:2rpx;
+.triangle-box{
+  height:32rpx;
+  margin:0rpx 0 0 10rpx;
+}
+.triangle-just{
+  width: 0;
+  height: 0;
+  border-bottom: 11rpx solid #2d2d2d;
+  border-left: 8rpx solid transparent;
+  border-right: 8rpx solid transparent;
+  margin:5rpx 0;
+}
+.triangle-just.active{
+  border-bottom-color:#dcdcdc;
+}
+.triangle-invert.active{
+  border-bottom-color:#dcdcdc;
+}
+.triangle-invert{
+  margin:5rpx 0;
+  width: 0;
+  height: 0;
+  border-top: 11rpx solid #2d2d2d;
+  border-left: 8rpx solid transparent;
+  border-right: 8rpx solid transparent;
 }
 .radio-group .radio{
   line-height:50rpx;

+ 24 - 16
newsShop/pages/orderList/orderList.js

@@ -2,12 +2,11 @@ let app = getApp();
 let host = app.globalData.servsers; // 请求的url
 Page({
   data: {
-    host:host,
-    isSelect:"",//默认全部
-    dataStateArray:[
-      {
-        state:'',
-        label:"全部",
+    host: host,
+    isSelect: "", //默认全部
+    dataStateArray: [{
+        state: '',
+        label: "全部",
       },
       {
         state: '1',
@@ -26,14 +25,22 @@ Page({
         label: "待评价",
       }
     ],
-    goodsList:[],
+    goodsList: [],
+    dividerState: false, //判断数据是否请求结束了,默认是false
+    page: 1, //默认第一页
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    this.getOrderList(this,this.data.isSelect)
+    let that = this;
+    if ('state' in options) {
+      that.setData({
+        isSelect: options.state
+      })
+    }
+    that.getOrderList(that, that.data.isSelect)
   },
 
   /**
@@ -84,23 +91,24 @@ Page({
   onShareAppMessage: function () {
 
   },
-  tab(e){ // tab切换
+  tab(e) { // tab切换
     this.setData({
       isSelect: e.currentTarget.dataset.state
     })
+    this.getOrderList(this, e.currentTarget.dataset.state)
   },
-  getOrderList(that, status){
+  getOrderList(that, status) {
     wx.request({
-      url:host+ '/orderapi/orderlist',
-      method:'get',
-      data:{
+      url: host + '/orderapi/orderlist',
+      method: 'get',
+      data: {
         user_id: app.globalData.user_id,
         status: status
       },
-      success(res){
-        console.log(res,"orderItem")
+      success(res) {
+        console.log(res, "orderItem")
         that.setData({
-          goodsList:[...res.data]
+          goodsList: [...res.data]
         })
       }
     })

+ 3 - 0
newsShop/pages/orderList/orderList.wxml

@@ -41,5 +41,8 @@
       </view>
     </view>
   </view>
+
+  <data-none wx:if="goodsList.length === 0"></data-none>
+  <divider wx:if="dividerState"></divider>
 </view>
 </view>

+ 156 - 130
newsShop/pages/patternMenu/patternMenu.js

@@ -1,153 +1,179 @@
-// pages/patternList/patternList.js
-var app = getApp();
-var yongtuList = [];
-var duxiangList = [];
+// newsShop/pages/patternMenu/patternMenu.js
+let app = getApp();
+let host = app.globalData.servsers; // 请求的url
 Page({
 
+  /**
+   * 页面的初始数据
+   */
   data: {
-      urlHttp: '',
-      yongtuList : yongtuList,
-      duxiangList : duxiangList,
-      yongtuLength : 0,
-      duixiangLength : 0,
-      activeTab1 : -1,  //tab选中状态值
-      activeTab2: -1,
-      activeTab3: -1,
-      activeId1 : -1,   //记录选中tab的id
-      activeId2: -1,
-      activeId3: -1,
-      activeName1: '',  //记录选中tab的名称
-      activeName2: '',
-      activeName3: '',
-      hiddenmodal: true, //弹窗
+    host:host,
+    isSelect: "1", //默认全部
+    dataStateArray: [
+    {
+      state: '1',
+      label: "营销礼赠",
+    },
+    {
+      state: '2',
+      label: "商务送礼",
+    },
+    {
+      state: '3',
+      label: "员工/福利",
+    }
+    ],
+    filterArray: [
+      // { name: '1', value: '0~499元' },
+      // { name: '2', value: '500~999元' },
+      // { name: '3', value: '1000~1999元' },
+      // { name: '4', value: '2000元以上' },
+    ],
+    requestState:true, //检测请求状态是否结束了
+    filterStatic: false,
+    isNew: true,
+    isMin: true,
+    goodsList:[],
+    page:1, //默认是第一页
+    limit:20, //一页20条数据
+    maxPrice:null,//最大价格
+    minPrice:null,//最低价格
+    priceSort: null, //价格排序,默认降序
+    timeSort: null, //价时间排序,默认降序
   },
 
+  /**
+   * 生命周期函数--监听页面加载
+   */
   onLoad: function (options) {
-    var that = this;
-    var host = getApp().globalData.servsers;
-    that.setData({
-      urlHttp: host
-    })
+    this.getGiftNavTab(this)
+  },
 
-    wx.request({
-      url: host + "commodityapi/findAllScene",
-      data: {
-      },
-      method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
-      header: {
-        'Accept': 'application/json'
-      },
-      success: function (res) {
-        var yongtuLength = res.data.purposeList.length;
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
 
-        console.log(res.data.objectList)
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
 
-        var duixiangLength = res.data.objectList.length;
-        that.setData({
-          yongtuList: res.data.purposeList,
-          duxiangList: res.data.objectList,
-          yongtuLength: yongtuLength,
-          duixiangLength: duixiangLength
-        })
-      }
-    })
   },
 
-  //送礼用途
-  yongtuClick:function(e){
-    var that = this;
-    var id = e.currentTarget.dataset.id;
-    var activeName1 = e.currentTarget.dataset.name;
-    var flagId = e.currentTarget.dataset.flagid;
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  },
+  tab(e){
+    let that = this;
     that.setData({
-        activeTab1 : id,
-        activeName1: activeName1,
-        activeId1: flagId
+      isSelect: e.currentTarget.dataset.id,
+      goodsList:[],
+      page:1,
     })
+    that.getGiftList(that)
   },
-
-  //送礼对象
-  duixiangClick: function (e) {
-    var that = this;
-    var id = e.currentTarget.dataset.id;
-    var activeName2 = e.currentTarget.dataset.name;
-    var flagId = e.currentTarget.dataset.flagid;
+  timeSortTap(){ // 时间筛选
+    let that = this;
     that.setData({
-        activeTab2: id,
-        activeName2: activeName2,
-        activeId2: flagId
+      timeSort: that.data.timeSort === null ? 'asc' : that.data.timeSort === 'asc' ? 'desc' : 'asc',
+      goodsList: [],
+      page: 1,
     })
+    that.getGiftList(that)
   },
-
-  //预算范围
-  fanweiClick:function(e){
-    var that = this;
-    var id = e.currentTarget.dataset.id;
-    var activeName3 = e.currentTarget.dataset.name;
-    var flagId = e.currentTarget.dataset.flagid;
+  priceSortTap() { // 价格筛选
+    let that = this;
     that.setData({
-        activeTab3: id,
-        activeName3: activeName3,
-        activeId3: flagId
+      priceSort: that.data.priceSort === null ? 'asc' : that.data.priceSort === 'asc' ? 'desc' : 'asc',
+      goodsList: [],
+      page: 1,
     })
+    that.getGiftList(that)
   },
-
-  //生成礼品清单
-  saveChange:function(e){
-      var that = this;
-      var host = getApp().globalData.servsers;
-      var activeId1 = that.data.activeId1;
-      var activeId2 = that.data.activeId2;
-      var activeId3 = that.data.activeId3;
-      var activeName1 = that.data.activeName1;
-      var activeName2 = that.data.activeName2;
-      var activeName3 = that.data.activeName3;
-      if (activeId1 == -1) {
-          that.setData({
-              hiddenmodal: false,
-              modalCont: '请选择送礼用途'
-          })
-          setTimeout(function () {
-              that.setData({
-                  hiddenmodal: true
-              })
-          }, 1000)
-          return false;
-      }
-      if (activeId2 == -1) {
-          that.setData({
-              hiddenmodal: false,
-              modalCont: '请选择送礼对象'
-          })
-          setTimeout(function () {
-              that.setData({
-                  hiddenmodal: true
-              })
-          }, 1000)
-          return false;
+  getGiftNavTab(that){
+    wx.request({
+      url: host + '/classifyapi/classifyTwoAll',
+      method: 'get',
+      data: {
+        classifyHigher:'3060'
+      },
+      success(res){
+        console.log(res,"res")
+        that.setData({
+          dataStateArray:res.data.rows,
+          isSelect:res.data.rows[0].id
+        })
+        that.getGiftList(that)
       }
-      if (activeId3 == -1) {
-          that.setData({
-              hiddenmodal: false,
-              modalCont: '请选择预算范围'
-          })
-          setTimeout(function () {
-              that.setData({
-                  hiddenmodal: true
-              })
-          }, 1000)
-          return false;
+    })
+  },
+  getGiftList(that){
+    let data = {
+      channelId: 5, // 渠道id,现在为5,一件选礼为5
+      classId: that.data.isSelect,
+      limit: that.data.limit, // 一页20条数据
+      offset: that.data.page, //当前页数
+    }
+    if (that.data.priceSort) {
+      data.priceSort = that.data.priceSort
+    }
+    if (that.data.timeSort) {
+      data.timeSort = that.data.timeSort
+    }
+    if (that.data.maxPrice){
+      data.maxPrice = that.data.maxPrice
+    }
+    if (that.data.minPrice) {
+      data.minPrice = that.data.minPrice
+    }
+    wx.request({
+      url: host +'/commodityapi/queryCommodityByClass',
+      method:'get',
+      data:data,
+      success(res){
+        let dataArray = that.data.goodsList;
+        res.data.rows.forEach(el=>{
+          el.logo = el.commodity_logo.split(",")
+        })
+        dataArray.push(...res.data.rows)
+        that.setData({
+          goodsList: dataArray
+        })
       }
-      wx.navigateTo({
-          url: '/pages/patternList/patternList?activeId1=' + that.data.activeId1 + 
-          '&activeName1=' + activeName1 + 
-          '&activeId2=' + that.data.activeId2 + 
-          '&activeName2=' + activeName2 + 
-          '&activeId3=' + activeId3 + 
-          '&activeName3=' + activeName3
-      })
-
+    })
   }
-})
-var that;
-var Util = require('../../utils/util.js'); 
+})

+ 7 - 1
newsShop/pages/patternMenu/patternMenu.json

@@ -1 +1,7 @@
-{}
+{
+  "navigationBarTitleText": "一键选礼",
+  "usingComponents": {
+    "data-none": "/components/data-none/data-none",
+    "divider": "/components/divider/divider"
+  }
+}

+ 77 - 75
newsShop/pages/patternMenu/patternMenu.wxml

@@ -1,80 +1,82 @@
-<!--pages/patternList/patternList.wxml-->
-<view class='container'>
-    <view class='pattern_each_wrap'>
-
-
-          <!-- 选礼用途 -->
-          <view class="header_nav_wrap">
-            <image src='/images/xuanli_each_icon_1.png' class='each_title_icon'></image>
-            <scroll-view  scroll-x class="header_nav"  scroll-left="{{scrollLeft}}">
-
-                <block wx:for="{{yongtuList}}"  wx:key="index" wx:for-index="i">
-                    <view class='each_tab  each_tab_{{yongtuLength+1}}'  data-id="{{i}}"  data-flagid="{{item.id}}"  data-name="{{item.scene_name}}"  bindtap='yongtuClick'>
-                        <image  wx:if="{{activeTab1 == i}}" src="{{item.select_img}}"  class='each_cont_icon'></image>
-                        <image  wx:else src="{{item.default_img}}"  class='each_cont_icon'></image>
-                        <view class='each_cont_name'>{{item.scene_name}}</view>
-                    </view>
-                </block>
-                <view class='each_tab  each_tab_{{yongtuLength+1}}'  data-id="{{yongtuLength}}"  data-flagid=""  data-name="全部"  bindtap='yongtuClick'>
-                    <image  wx:if="{{activeTab1 == yongtuLength}}" src="{{urlHttp}}images/page_one_4_pre.png"  class='each_cont_icon'></image>
-                    <image  wx:elif="{{urlHttp}}" src="{{urlHttp}}images/page_one_4_n.png"  class='each_cont_icon'></image>
-                    <view class='each_cont_name'>全部</view>
-                </view>
-            </scroll-view>
+<view>
+  <!-- header -->
+<view class='header'>
+  <view class='header-box'>
+    <view class='f-box f-justify-content-center'>
+      <view wx:for="{{dataStateArray}}" data-state="{{item.state}}" class='f-item header-item {{item.id == isSelect ? "bdc-theme c-theme":""}}' data-id="{{item.id}}" bindtap='tab'>
+        {{item.classify_name}}
+      </view>
+    </view>
+  </view>
+</view>
+<!-- nav 筛选 -->
+<view class='header' style='padding-top:84rpx;'>
+  <view class='header-box' style='height:80rpx;line-height:80rpx;top:104rpx;border-top:2rpx solid #e0e0e0;border-bottom:2rpx solid #e0e0e0;'>
+    <view class='f-box'>
+      <view class='f-item f-box f-align-items-center f-justify-content-center' bindtap='timeSortTap'>
+        <view>最新</view>
+        <!-- 三角形 -->
+        <view class='triangle-box'>
+          <view class='triangle-just {{timeSort == "asc" ? "active" : ""}}'></view>
+          <view class='triangle-invert {{timeSort == "desc" ? "active" : ""}}'></view>
+        </view>
+      </view>
+      <view class='f-item f-box f-align-items-center f-justify-content-center' bindtap='priceSortTap'>
+        <view>价格</view>
+        <!-- 三角形 -->
+        <view class='triangle-box'>
+          <view class='triangle-just {{priceSort == "asc" ? "active" : ""}}'></view>
+          <view class='triangle-invert {{priceSort == "desc" ? "active" : ""}}'></view>
         </view>
-
-
-        <!-- 选礼对象 -->
-        <view class='header_nav_wrap'>
-            <image src='/images/xuanli_each_icon_2.png' class='each_title_icon'></image>
-            <scroll-view  scroll-x class="header_nav"  scroll-left="{{scrollLeft}}">
-                <block wx:for="{{duxiangList}}"  wx:key="index" wx:for-index="i">
-                    <view class='each_tab  each_tab_{{duixiangLength+1}}'  data-id='{{i}}'  data-flagid="{{item.id}}"   data-name="{{item.scene_name}}"  bindtap='duixiangClick'>
-                        <image  wx:if="{{activeTab2 == i}}" src="{{item.select_img}}"  class='each_cont_icon'></image>
-                        <image  wx:else src="{{item.default_img}}"  class='each_cont_icon'></image>
-                        <view class='each_cont_name'>{{item.scene_name}}</view>
-                    </view>
-                </block>
-                <view class='each_tab  each_tab_{{duixiangLength+1}}'  data-id='{{duixiangLength}}'  data-flagid=""  data-name="全部"  bindtap='duixiangClick'>
-                    <image  wx:if="{{activeTab2 == duixiangLength}}" src="{{urlHttp}}images/page_one_4_pre.png"  class='each_cont_icon'></image>
-                    <image  wx:elif="{{urlHttp}}" src="{{urlHttp}}images/page_one_4_n.png"  class='each_cont_icon'></image>
-                    <view class='each_cont_name'>全部</view>
-                </view>
-            </scroll-view>
+      </view>
+      <view class='f-item f-box f-align-items-center f-justify-content-center'>
+        <view>筛选</view>
+        <!-- 三角形 -->
+        <view class='triangle-box' style='height:16rpx'>
+          <view class='triangle-invert'></view>
         </view>
-
-
-        <!-- 预算范围 -->
-        <view class='header_nav_wrap'>
-            <image src='/images/xuanli_each_icon_3.png' class='each_title_icon'></image>
-            <scroll-view  scroll-x class="header_nav"  scroll-left="{{scrollLeft}}">
-                <view class='each_tab  each_tab_5'  data-id='0'  data-flagid="4"  data-name="¥200以下"  bindtap='fanweiClick'>
-                    <image  wx:if="{{activeTab3 == 0}}" src="{{urlHttp}}images/page_three_1_pre.png"  class='each_cont_icon'></image>
-                    <image  wx:elif="{{urlHttp}}" src="{{urlHttp}}images/page_three_1_n.png"  class='each_cont_icon'></image>
-                    <view class='each_cont_name'>¥200以下</view>
-                </view>
-                <view class='each_tab  each_tab_5'  data-id='1'  data-flagid="5"  data-name="¥200~1000"  bindtap='fanweiClick'>
-                    <image  wx:if="{{activeTab3 == 1}}" src="{{urlHttp}}images/page_three_2_pre.png"  class='each_cont_icon'></image>
-                    <image  wx:elif="{{urlHttp}}" src="{{urlHttp}}images/page_three_1_n.png"  class='each_cont_icon'></image>
-                    <view class='each_cont_name'>¥200~1000</view>
-                </view>
-                <view class='each_tab  each_tab_5'  data-id='2'  data-flagid="6"  data-name="¥1000~2000"  bindtap='fanweiClick'>
-                    <image  wx:if="{{activeTab3 == 2}}" src="{{urlHttp}}images/page_three_3_pre.png"  class='each_cont_icon'></image>
-                    <image  wx:elif="{{urlHttp}}" src="{{urlHttp}}images/page_three_1_n.png"  class='each_cont_icon'></image>
-                    <view class='each_cont_name'>¥1000~2000</view>
-                </view>
-                <view class='each_tab  each_tab_5'  data-id='3'  data-flagid="7"  data-name="¥2000以上"  bindtap='fanweiClick'>
-                    <image  wx:if="{{activeTab3 == 3}}" src="{{urlHttp}}images/page_three_4_pre.png"  class='each_cont_icon'></image>
-                    <image  wx:elif="{{urlHttp}}" src="{{urlHttp}}images/page_three_1_n.png"  class='each_cont_icon'></image>
-                    <view class='each_cont_name'>¥2000以上</view>
-                </view>
-            </scroll-view>
+      </view>
+      
+    </view>
+    <!-- 筛选内容 -->
+        <view class='filter-main' wx:if="{{filterStatic}}">
+          <!-- 第一块内容 -->
+          <view class='filter-frist' wx:if="{{filterArray.length > 0}}">
+            <radio-group class="radio-group" bindchange="radioChange">
+              <label class="radio" wx:for="{{filterArray}}">
+                <radio value="{{item.name}}" color='#e60012' />
+                {{item.value}}
+              </label>
+            </radio-group>
+          </view>
+          <view class='filter-next'>
+            <view class='filter-next-title'>价格区间(元)</view>
+            <view class='f-box filter-range'>
+              <view class='f-item'>
+                <input placeholder='最低价'></input>
+              </view>
+               <view class='f-item'>——</view>
+               <view class='f-item'>
+                <input placeholder='最高价'></input>
+              </view>
+            </view>
+          </view>
         </view>
-
-        <view class='finish_btn'  bindtap='saveChange'>生成礼品清单</view>
-
+  </view>
+</view>
+<!-- 内容 -->
+<view class='gift-box'>
+  <!-- goodsList -->
+    <view class='f-box f-flex-wrap f-justify-content-between'>
+      <view class='goods-list' wx:for="{{goodsList}}">
+        <image src='{{host}}/images/{{item.logo[0]}}' class='goods-img' mode='aspectFit'></image>
+        <!-- <view class='goods-summary'></view> -->
+        <view class='goods-title'>{{item.commodity_name}}</view>
+        <view class='goods-price'>¥{{item.commodity_sale}}</view>
+      </view>
     </view>
+    <divider wx:if="{{!requestState}}"></divider>
+    <data-none wx:if="{{goodsList.length === 0}}"></data-none>
+</view>
 </view>
-<view class="modal_wrap  {{hiddenmodal ? 'hidden' : ''}}">
-  <view class="modal  {{hiddenmodal ? 'hidden' : ''}}">{{modalCont}}</view>
-</view>
+<view class='ceng' bindtap='close' wx:if="{{filterStatic}}"></view>

+ 108 - 69
newsShop/pages/patternMenu/patternMenu.wxss

@@ -1,73 +1,112 @@
-/* pages/patternList/patternList.wxss */
-.container{
-    min-height: 100vh;
-    background-color: #fff;
-}
-.each_title_icon{
-    display: block;
-    width: 599rpx;
-    height: 70rpx;
-    margin: 20rpx auto 30rpx;
-}
-.each_tab{
-    display: inline-block;
-    width: 28.5%;
-}
-.each_tab_1{
-    width: 100%;
-}
-.each_tab_2{
-    width: 50%;
-}
-.each_tab_3{
-    width: 33.3%;
-}
-.each_tab_4{
-    width: 25%;
-}
-.each_cont_icon{
-    display: block;
-    width: 160rpx;
-    height: 160rpx;
-    margin: 0 auto;
-}
-.each_cont_name{
-    font-size: 28rpx;
-    line-height: 60rpx;
-    color: #b4a078;
-    text-align: center;
-}
-.finish_btn{
-    display: block;
-    width: 294rpx;
-    height: 80rpx;
-    font-size: 30rpx;
-    line-height: 80rpx;
-    color: #b4a078;
-    background-color: #e5e5e5;
-    margin: 60rpx auto  0;
-    text-align: center;
-    border-radius: 2px;
-}
-
-.header_nav_wrap{
-  width:100%;
-  color:#fff;
-  overflow : auto ;
+/* newsShop/pages/patternMenu/patternMenu.wxss */
+page{
+  background:#fff;
+}
+.header{
+  text-align: center;
+}
+.header-item{
+  color:#000;
+  border-bottom-style: solid;
+  border-bottom-width: 4rpx; 
+  border-bottom-color:#fff;
+}
+.header-tab{
+  border-bottom:2rpx solid #e0e0e0;
+}
+.triangle-box{
+  height:32rpx;
+  margin:0rpx 0 0 10rpx;
+}
+.triangle-just{
+  width: 0;
+  height: 0;
+  border-bottom: 11rpx solid #dcdcdc;
+  border-left: 8rpx solid transparent;
+  border-right: 8rpx solid transparent;
+  margin:5rpx 0;
+}
+.triangle-just.active{
+  border-bottom-color:#2d2d2d;
+}
+.triangle-invert.active{
+  border-top-color:#2d2d2d;
+}
+.triangle-invert{
+  margin:5rpx 0;
+  width: 0;
+  height: 0;
+  border-top: 11rpx solid #dcdcdc;
+  border-left: 8rpx solid transparent;
+  border-right: 8rpx solid transparent;
+}
+.filter-frist,.filter-next{
+  text-align: left;
+}
+.filter-main{
+  border-top:2rpx solid #e0e0e0;
+  line-height:70rpx;
+  padding:20rpx;
+  background:#fff;
+  position:absolute;
+  top:100rpx;
 }
-.header_nav{
-  white-space: nowrap; 
-  /* display: flex; */
+.filter-range{
+  width:400rpx;
+  line-height:48rpx;
 }
-/* .header_nav_each{
-  display: inline-block;
-  height:40rpx;
-  font-size: 28rpx;
+.filter-range input{
+  width:150rpx;
+  background:#eeedf2;
+  height:48rpx;
+  border-radius:48rpx;
+  text-align: center;
+}
+.radio-group .radio{
+  line-height:50rpx;
+  display:inline-block;
+  width:40%;
+}
+.radio-group .radio radio{
+transform:scale(0.6);
+width:40rpx;
+}
+.gift-box{
+  margin:0 26rpx;
+  background:#fff;
+}
+.goods-list{
+  width:338rpx;
+  margin-top:26rpx;
+}
+.goods-img{
+  width:338rpx;
+  height:338rpx;
+  background:#eeedf2;
+  display: block;
+}
+.goods-summary{
+  height:44rpx;
   line-height:44rpx;
-  padding: 0 20rpx;
-  margin:18rpx 20rpx;
-} */
-.header_nav_active{
-  border:1px solid #fff;
-  border-radius: 20rpx;
+  background:#f1f7fc;
+  color:#666666;
+  padding:0 10rpx;
+  overflow: hidden;/*超出部分隐藏*/
+  white-space: nowrap;/*不换行*/
+  text-overflow:ellipsis;/*超出部分文字以...显示*/
+}
+.goods-title{
+  margin:10rpx 0;
+}
+.goods-price{
+  color:#e60012;
+}
+.ceng{
+  position:fixed;
+  width:100%;
+  height:100%;
+  background:rgba(0,0,0,0.6);
+  z-index:10;
+  top:0;
+  left:0;
 }

+ 9 - 0
newsShop/style/customized.wxss

@@ -177,4 +177,13 @@ page{
   background:#fff;
   font-size:30rpx;
   z-index:10;
+}
+.ceng{
+  position:fixed;
+  width:100%;
+  height:100%;
+  background:rgba(0,0,0,0.6);
+  z-index:10;
+  top:0;
+  left:0;
 }

+ 14 - 1
project.config.json

@@ -28,7 +28,7 @@
 			"list": []
 		},
 		"miniprogram": {
-			"current": 18,
+			"current": 20,
 			"list": [
 				{
 					"id": 0,
@@ -157,6 +157,19 @@
 					"pathName": "newsShop/pages/orderList/orderList",
 					"query": "",
 					"scene": null
+				},
+				{
+					"id": -1,
+					"name": "classify",
+					"pathName": "newsShop/pages/kind/index",
+					"query": "",
+					"scene": null
+				},
+				{
+					"id": -1,
+					"name": "selGift",
+					"pathName": "newsShop/pages/patternMenu/patternMenu",
+					"scene": null
 				}
 			]
 		}

+ 3 - 3
style/customized.wxss

@@ -203,7 +203,7 @@ page{
   padding-top:100rpx;
 }
 .header-box{
-  position: absolute;
+  position: fixed;
   top:0;
   left:0;
   width:100%;
@@ -211,7 +211,7 @@ page{
   line-height:100rpx;
   background:#fff;
   font-size:30rpx;
-  z-index:10;
+  z-index:100;
 }
 /* footer */
 .footer{
@@ -226,5 +226,5 @@ page{
   line-height:100rpx;
   background:#fff;
   font-size:30rpx;
-  z-index:10;
+  z-index:100;
 }

+ 46 - 0
style/font/demo_index.html

@@ -138,6 +138,18 @@
                 <div class="code-name">&amp;#xe744;</div>
               </li>
           
+            <li class="dib">
+              <span class="icon iconfont">&#xe625;</span>
+                <div class="name">icon-1</div>
+                <div class="code-name">&amp;#xe625;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe745;</span>
+                <div class="name">icon-1</div>
+                <div class="code-name">&amp;#xe745;</div>
+              </li>
+          
           </ul>
           <div class="article markdown">
           <h2 id="unicode-">Unicode 引用</h2>
@@ -350,6 +362,24 @@
             </div>
           </li>
           
+          <li class="dib">
+            <span class="icon iconfont icon-icon-"></span>
+            <div class="name">
+              icon-1
+            </div>
+            <div class="code-name">.icon-icon-
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont icon-icon--copy"></span>
+            <div class="name">
+              icon-1
+            </div>
+            <div class="code-name">.icon-icon--copy
+            </div>
+          </li>
+          
         </ul>
         <div class="article markdown">
         <h2 id="font-class-">font-class 引用</h2>
@@ -523,6 +553,22 @@
                 <div class="code-name">#icon-icon_sanjiaoxing-copy</div>
             </li>
           
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-icon-"></use>
+                </svg>
+                <div class="name">icon-1</div>
+                <div class="code-name">#icon-icon-</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#icon-icon--copy"></use>
+                </svg>
+                <div class="name">icon-1</div>
+                <div class="code-name">#icon-icon--copy</div>
+            </li>
+          
           </ul>
           <div class="article markdown">
           <h2 id="symbol-">Symbol 引用</h2>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 14 - 6
style/font/iconfont.css


BIN
style/font/iconfont.eot


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
style/font/iconfont.js


+ 6 - 0
style/font/iconfont.svg

@@ -74,6 +74,12 @@ Created by iconfont
     <glyph glyph-name="icon_sanjiaoxing-copy" unicode="&#59204;" d="M761.1237793 245.59780882999996l-246.04211427 276.80438234-252.20544433-276.72280885 498.2475586-0.08157349z"  horiz-adv-x="1024" />
 
     
+    <glyph glyph-name="icon-" unicode="&#58917;" d="M510.3775119 582.98047724L391.17642745 433.41815626h238.4021689zM510.3775119 196.96642488999998L391.17642745 346.54600731000005h238.4021689z"  horiz-adv-x="1024" />
+
+    
+    <glyph glyph-name="icon--copy" unicode="&#59205;" d="M513.6224881 185.01952275999997L632.82357255 334.58184373999995l-238.4021689 0zM513.6224881 571.03357511L632.82357255 421.45399269l-238.4021689 0z"  horiz-adv-x="1024" />
+
+    
 
 
   </font>

BIN
style/font/iconfont.ttf


BIN
style/font/iconfont.woff


BIN
style/font/iconfont.woff2


Dosya farkı çok büyük olduğundan ihmal edildi
+ 14 - 6
style/iconfont.wxss


Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 0
utils/iconfont.js