wangyong 6 年 前
コミット
ec4e67a428

+ 2 - 1
app.json

@@ -87,7 +87,8 @@
     "pages/midAutumnFestival/midAutumnFestival",
     "components/component-made/made-solid",
     "components/data-none/data-none",
-    "components/divider/divider"
+    "components/divider/divider",
+    "pages/login/login"
   ],
   "subpackages": [
     {

BIN
images/news/class_ban.png


+ 1 - 1
pages/car/index.wxml

@@ -52,7 +52,7 @@
               <view class="cart-footer-cont">
                 <image  wx:if="{{selectAllStatus}}" class="total-select" bindtap="selectAll" src='/images/cart_choose_pre.png'></image>
                 <image wx:else  class="total-select" bindtap="selectAll"  src='/images/cart_choose_n.png'></image>
-                <text class="buy-btn" bindtap="{{firstClick == 0 ? 'tz' : ''}}">立即购</text>
+                <text class="buy-btn" bindtap="{{firstClick == 0 ? 'tz' : ''}}">立即购</text>
                 <view class="cart-toatl-price">
                   <text class="price_title">合计:</text>
                   <text class="price_yuan">¥ </text>

+ 1 - 1
pages/index/index.js

@@ -44,7 +44,7 @@ Page({
       {
         src: '/images/news/nav_2.png',
         bg: '#fef9f8',
-        href: '/'
+        href: '/pages/login/login'
       },
       {
         src: '/images/news/nav_3.png',

+ 10 - 10
pages/index/index.wxml

@@ -25,7 +25,7 @@
                   <block wx:if="{{item.banner_flag == '0'}}">
                     <swiper-item  wx:if="{{item.banner_logo}}"  class="banner">  
                         <!-- 跳转到文章 -->
-                        <block wx:if="{{item.classify_id == '' || item.classify_id == null}}">
+                        <!-- <block wx:if="{{item.classify_id == '' || item.classify_id == null}}">
                             <navigator url="/pages/articleInfor/articleInfor?id={{item.banner_find}}">
                               <image  src="{{item.banner_logo}}"  mode="scaleToFill" class="slide-image"></image>  
                             </navigator>  
@@ -37,34 +37,34 @@
                             </navigator>  
                         </block>
                         <!-- 女神节 -->
-                        <block wx:elif="{{item.id == '2917'}}">
+                        <!-- <block wx:elif="{{item.id == '2917'}}">
                             <navigator url="/pages/girlsDayInfo/girlsDayInfo">
                               <image  src="{{item.banner_logo}}"  mode="scaleToFill" class="slide-image"></image>  
                             </navigator>  
-                        </block>
+                        </block> -->
                         <!-- 加班汪 -->
-                        <block wx:elif="{{item.id == '2918'}}">
+                        <!-- <block wx:elif="{{item.id == '2918'}}">
                             <navigator url="/pages/newYears/newYears">
                               <image  src="{{item.banner_logo}}"  mode="scaleToFill" class="slide-image"></image>  
                             </navigator>  
-                        </block>
+                        </block> -->
                         <!-- 樱花 -->
-                        <block wx:elif="{{item.id == '2922'}}">
+                        <!-- <block wx:elif="{{item.id == '2922'}}">
                             <navigator url="/pages/sakuraDay/sakuraDay">
                               <image  src="{{item.banner_logo}}"  mode="scaleToFill" class="slide-image"></image>  
                             </navigator>  
-                        </block>
+                        </block> -->
 
 
                         <!-- 端午节 -->
-                        <block wx:elif="{{item.id == '2930'}}">
+                        <!-- <block wx:elif="{{item.id == '2930'}}">
                             <navigator url='/pages/dragonBoatFestivalInfor/dragonBoatFestivalInfor'>
                               <image  src="{{item.banner_logo}}"  mode="scaleToFill" class="slide-image"></image>  
                             </navigator>
-                        </block>
+                        </block> -->
 
                         <!-- 跳转到分类 -->
-                        <block wx:else>
+                        <block>
                             <navigator url='/pages/kindSecondList/kindSecondList?classify_name={{item.classify_name}}&classify_des={{item.classify_des}}&id={{item.classify_id}}'>
                               <image  src="{{item.banner_logo}}"  mode="scaleToFill" class="slide-image"></image>  
                             </navigator>

+ 2 - 0
pages/kind/index.js

@@ -16,6 +16,7 @@ Page({
       { name: '4', value: '2000元以上', price: [2000, "~"] },
     ],
     filterStatic:false,
+    banIndex:0, //ban的index
     page: 1, //默认第一页
     channelId:null, //渠道id,登录后给,默认为null
     maxPrice:null, //最大价格
@@ -62,6 +63,7 @@ Page({
     let item = e.currentTarget.dataset.item,that = this;
     that.setData({
       classifyNavActiveId:item.id,
+      banIndex: e.currentTarget.dataset.index,
       requestState: true, //数据初始化
       page: 1,//数据初始化
       goodsList: []//数据初始化

+ 5 - 1
pages/kind/index.wxml

@@ -17,7 +17,7 @@
     <!-- left nav -->
     <view class='class-left'>
       <view class='nav'>
-        <view class='nav-list f-box f-align-items-center f-justify-content-center {{item.id === classifyNavActiveId ? "active" : ""}}' wx:for="{{classifyNavList}}" data-item="{{item}}" bindtap='classifyTap'>{{item.classify_name}}</view>
+        <view class='nav-list f-box f-align-items-center f-justify-content-center {{item.id === classifyNavActiveId ? "active" : ""}}' wx:for="{{classifyNavList}}" data-item="{{item}}" data-index="{{index}}" bindtap='classifyTap'>{{item.classify_name}}</view>
       </view>
     </view>
     <!-- right content -->
@@ -80,6 +80,10 @@
 
       <!-- goodsList -->
       <view class='goods-box '>
+      <!-- banner -->
+        <view class='goods-ban'>
+          <image src='{{classifyNavList[banIndex].classify_logo}}' mode='scaleToFill'></image>
+        </view>
         <view class='f-box f-flex-wrap f-justify-content-between'>
           <view class='goods-list' wx:for="{{goodsList}}" data-id='{{item.id}}' bindtap='toGoodsDetail'>
             <image src='{{host}}/images/{{item.logo[0]}}' class='goods-img' mode='aspectFit'></image>

+ 6 - 0
pages/kind/index.wxss

@@ -152,4 +152,10 @@ width:40rpx;
   z-index:10;
   top:0;
   left:0;
+}
+.goods-ban image{
+  width:538rpx;
+  height:210rpx;
+  display:block;
+  margin:26rpx auto;
 }

+ 2 - 2
pages/kindSecondList/kindSecondList.wxml

@@ -2,7 +2,7 @@
 <scroll-view class="container">
 
   <!-- 导航 -->
-  <view class="header_nav_wrap"  wx:if="{{contentList != ''}}">
+  <!-- <view class="header_nav_wrap"  wx:if="{{contentList != ''}}">
     <scroll-view scroll-x="true" class="header_nav" scroll-left="{{scrollLeft}}">
       <block wx:for="{{contentList}}" wx:key="id" wx:for-index="i">
         <view class="each_nav_wrap">             
@@ -10,7 +10,7 @@
         </view>
       </block>
     </scroll-view>
-  </view>
+  </view> -->
   <!-- 内容 -->
   <swiper class="tab-content"   data-forname="{{contentList.classify_name}}"  current="{{currentTab}}"  duration="300" bindchange="switchTab" style="height:{{winHeight}}rpx">
     <swiper-item wx:for="{{contentList}}" wx:key="index"  wx:for-index="i" >

+ 4 - 4
pages/kindSecondList/kindSecondList.wxss

@@ -46,8 +46,8 @@ page{
   box-sizing: border-box;
 }
 .nav_item_active{
-  color:#b4a078;
-  border-bottom:3rpx solid #a08c64; 
+  color:#e60012;
+  border-bottom:3rpx solid #e60012; 
   box-sizing: border-box;
 }
 .each_nav{
@@ -112,7 +112,7 @@ page{
   justify-content: space-between;
   flex-wrap: wrap;
   background-color: #fff;
-  margin-top:80rpx;
+  /* margin-top:80rpx; */
 }
 .list_item_wrap{
   width: 50%;
@@ -168,7 +168,7 @@ page{
 }
 .full_price{
   font:bold 30rpx "Microsoft Yahei";
-  color:#b4a078;
+  color:#e60012;
   padding: 34rpx 0 30rpx 32rpx;
 }
 .full_price_unit{

+ 108 - 0
pages/login/login.js

@@ -0,0 +1,108 @@
+// pages/login/login.js
+var app = getApp();
+let host = app.globalData.servsers; // 请求的url
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    account:null,
+    pwd:null,
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  },
+  account(e){
+    console.log(e.detail.value)
+    this.setData({
+      account: e.detail.value
+    })
+  },
+  pwd(e){
+    this.setData({
+      pwd: e.detail.value
+    })
+  },
+  login(){
+    let that = this;
+    wx.request({
+      url: host +'/channelLogin',
+      method:'post',
+      header: {
+        'content-type': 'application/x-www-form-urlencoded'
+      },
+      data:{
+        loginName:that.data.account,
+        loginPwd:that.data.pwd
+      },
+      success(res){
+        console.log(res,"dddd")
+        if (res.data.status == "fail"){
+          wx.showToast({
+            title: res.data.msg,
+            icon:"none"
+          })
+        } else {
+          wx.setStorageSync('channelIdObj', res.data)
+          // wx.navigateTo({
+          //   url: '',
+          // })
+        }
+      }
+    })
+  }
+})

+ 4 - 0
pages/login/login.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "登陆"
+}

+ 13 - 0
pages/login/login.wxml

@@ -0,0 +1,13 @@
+<view class="login-box">
+  <view class='login'>
+    <view class='login-item'>
+      <input type='text' placeholder='输入账号' value='{{account}}' bindblur='account'></input>
+    </view>
+    <view class='login-item'>
+      <input type='password' placeholder='密码' value='{{pwd}}' bindblur='pwd'></input>
+    </view>
+    <view class='login-btn' bindtap='login'>
+      <button>登陆</button>
+    </view>
+  </view>
+</view>

+ 22 - 0
pages/login/login.wxss

@@ -0,0 +1,22 @@
+/* pages/login/login.wxss */
+page{
+  background: #fff;
+}
+.login{
+  margin:30rpx;
+}
+.login-item{
+  height:88rpx;
+  line-height:88rpx;
+  border-bottom:2rpx solid #bfbfbf;
+  margin: 10rpx 0 0 0;
+}
+.login-item input{
+  height:88rpx;
+  line-height: 88rpx;
+}
+.login-btn button{
+  margin-top:100rpx;
+  background:#e60012;
+  color:#fff;
+}

+ 6 - 1
pages/mine/mine.wxml

@@ -50,7 +50,12 @@
         <view>{{item.label}}</view>
       </view>
     </view>
-</view>
+  </view>
+
+  <!-- 退出渠道 -->
+  <view class='channe-box'>
+    <button class='f-s30'>退出渠道</button>
+  </view>
   
 
 </view>

+ 3 - 0
pages/mine/mine.wxss

@@ -80,4 +80,7 @@
   right:50%;
   margin-right:-42rpx;
   top:10rpx;
+}
+.channe-box{
+  margin:30rpx;
 }

+ 5 - 5
pages/orderList/orderList.js

@@ -113,12 +113,12 @@ Page({
       }
     })
   },
-  orderInfor: function (options) { //之前查看详情
-    var that = this;
-    var id = options.currentTarget.dataset.id;
+  orderInfor: function (e) { //之前查看详情
+    // var that = this;
+    // var id = e.currentTarget.dataset.id;
 
-    var newCarts = JSON.stringify(that.data.goosdListnew[id]);
-    newCarts = newCarts.replace(/&/g, "zss");
+    // var newCarts = JSON.stringify(that.data.goosdListnew[id]);
+    // newCarts = newCarts.replace(/&/g, "zss");
 
     wx.navigateTo({
       url: '/pages/confirmedList/confirmedList?goosdListnew=' + newCarts

+ 7 - 1
project.config.json

@@ -28,7 +28,7 @@
 			"list": []
 		},
 		"miniprogram": {
-			"current": -1,
+			"current": 23,
 			"list": [
 				{
 					"id": 0,
@@ -185,6 +185,12 @@
 					"pathName": "pages/buy/buy",
 					"query": "com_id=3589",
 					"scene": null
+				},
+				{
+					"id": -1,
+					"name": "login",
+					"pathName": "pages/login/login",
+					"scene": null
 				}
 			]
 		}