wangyong 6 years ago
parent
commit
491cecfa0d

+ 5 - 2
pages/buy/buy.js

@@ -133,6 +133,7 @@ Page({
     clickNum: 0,//规格已选择数量  
     cartNum: 0,//footer购物车显示的数量
     minNumber: 0,//购买数量
+    commodityChannelPrice:null, //渠道价格
 
   },
 
@@ -702,7 +703,8 @@ Page({
         wx.request({
           url: host + 'api/commodityGroup/getAllGroupByCommodityId',
           data: {
-            commodityId: that.data.com_id
+            commodityId: that.data.com_id,
+            channelId: wx.getStorageSync('channelIdObj').channelId ? wx.getStorageSync('channelIdObj').channelId : ""
           },
           method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
           header: {
@@ -730,7 +732,8 @@ Page({
                   sumTotal: sumTotal,
                   groupList: groupList,
                   dataList: dataList,
-                  showNum: sumTotal
+                  showNum: sumTotal,
+                  commodityChannelPrice: res.data.data[0].commodityChannelPrice
                 })
                 loadingFlag++;
                 if (loadingFlag == 6) {

+ 2 - 1
pages/buy/buy.wxml

@@ -42,7 +42,8 @@
         <view class="goods_price">
         <!-- newPrice -->
           <text class="new_price">¥{{minPrice == maxPrice ? minPrice : (minPrice + '-' + maxPrice)}}</text>   
-          <text class="old_price"  decode="true" >&nbsp;¥{{oldPrice}}&nbsp;&nbsp;</text>
+          <!-- <text class="old_price"  decode="true" >&nbsp;¥{{oldPrice}}&nbsp;&nbsp;</text> -->
+          <text wx:if="{{commodityChannelPrice}}">渠道价:¥<text class='c-theme'>¥{{commodityChannelPrice}}</text></text>
         </view>
         <view class="goods_limit  clearfix">
           <view class='goods_limit_each'>

+ 1 - 1
pages/buy/buy.wxss

@@ -345,7 +345,7 @@ button.share_wrap .collect_icon{
   margin:10rpx 0 6rpx;
 }
 .navigator-hover{
-  background-color:rgba(35,35,35,1);
+  background-color:rgba(35,35,35,0);
   opacity: 1;
 }
 .kefu_icon{

+ 2 - 4
pages/car/index.js

@@ -78,10 +78,8 @@ Page({
     
     if (un_id != undefined && un_id != '' && un_id != null){
       let data = {
-        user_id: un_id
-      }
-      if (wx.getStorageSync('channelIdObj').channelAccountId){
-        data.channel_account_id = wx.getStorageSync('channelIdObj').channelAccountId
+        user_id: un_id,
+        channel_account_id: wx.getStorageSync('channelIdObj').channelAccountId ? wx.getStorageSync('channelIdObj').channelAccountId :""
       }
       wx.request({
         url: host + "shoppingcartapi/shoppingcartview",

+ 1 - 1
pages/confirmOrder/confirmOrder.js

@@ -660,7 +660,7 @@ Page({
 
         console.log("插入");
         console.log(res);
-
+        wx.setStorageSync('orderImg', res.data)
         if ((that.data.carts[i].process_name != '') && (that.data.carts[i].process != -1)) {
           that.setData({
             stateNum: that.data.stateNum + 1

+ 4 - 8
pages/index/index.js

@@ -116,7 +116,7 @@ Page({
     bannerFlag : 0,  //banner数量
     recommendArray:[], // /推荐数组
     goodsNewsArray:[], //按照时间排序来
-    channelId:null ,//用户登录后的id
+    // channelId:null ,//用户登录后的id
     page:1, //默认第一页
     limit:10, //展示的数量
     requestState:true, //请求状态,默认是有数据的
@@ -528,9 +528,7 @@ Page({
     let data ={
       limit: 6,
       offset: 1,
-    }
-    if (that.data.channelId){
-      data.channelId = that.data.channelId
+      channelId: wx.getStorageSync('channelIdObj').channelId ? wx.getStorageSync('channelIdObj').channelId : ""
     }
     wx.request({
       url: host + '/commodityapi/queryCommodityGroom',
@@ -550,10 +548,8 @@ Page({
   getGoodsNews(that){
     let data = {
       limit: that.data.limit,
-      offset: that.data.page
-    }
-    if (that.data.channelId){
-      data.channelId = that.data.channelId
+      offset: that.data.page,
+      channelId: wx.getStorageSync('channelIdObj').channelId ? wx.getStorageSync('channelIdObj').channelId : ""
     }
     wx.request({
       url: host + '/commodityapi/findAllforNewproduct',

+ 8 - 2
pages/index/index.wxml

@@ -149,7 +149,10 @@
                 <view class='goods-label f-s30'>{{item.commodity_name}}</view>
                 <!-- <view class='goods-summry'>产品描述产品描述产品描述</view> -->
               </view>
-              <view class='c-theme'>¥{{item.commodity_sale}}</view>
+              <view class='f-box'>
+                <view class='c-theme f-item'>¥{{item.commodity_sale}}</view>
+                <view wx:if="{{item.commodityChannelPrice}}">渠道价:<text class='c-theme'>¥{{item.commodityChannelPrice}}</text></view>
+              </view>
             </view>
           </view>
         </view>
@@ -161,7 +164,10 @@
               <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='c-theme'>¥{{item.commodity_sale}}</view>
+              <view class='f-box'>
+                <view class='c-theme f-item'>¥{{item.commodity_sale}}</view>
+                <view wx:if="{{item.commodityChannelPrice}}">渠道价:<text class='c-theme'>¥{{item.commodityChannelPrice}}</text></view>
+              </view>
             </view>
           </view>
         </view>

+ 1 - 4
pages/kind/index.js

@@ -18,7 +18,6 @@ Page({
     filterStatic:false,
     banIndex:0, //ban的index
     page: 1, //默认第一页
-    channelId:null, //渠道id,登录后给,默认为null
     maxPrice:null, //最大价格
     minPrice:null, //最低价格
     limit:10, //分页大小
@@ -76,9 +75,7 @@ Page({
       classId: that.data.classifyNavActiveId,
       limit: that.data.limit,
       offset:that.data.page,
-    }
-    if(that.data.channelId){
-      data.channelId = that.data.channelId
+      channelId: wx.getStorageSync('channelIdObj').channelId ? wx.getStorageSync('channelIdObj').channelId : ""
     }
     if (that.data.maxPrice) {
       data.maxPrice = that.data.maxPrice

+ 4 - 2
pages/kind/index.wxml

@@ -89,8 +89,10 @@
             <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 class='mar-t10'>渠道价:<text class='c-theme'>¥{{item.commodity_channel_price}}</text></view>
+            <!-- <view class='f-box'> -->
+              <view class='goods-price'>¥{{item.commodity_sale}}</view>
+              <view class='mar-t10' wx:if="{{item.commodity_channel_price}}">渠道价:<text class='c-theme'>¥{{item.commodity_channel_price}}</text></view>
+            <!-- </view> -->
           </view>
         </view>
         

+ 4 - 1
pages/kindSecondList/kindSecondList.wxml

@@ -25,7 +25,10 @@
             <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='c-theme'>¥{{item.commodity_sale}}</view>
+            <view class='f-box'>
+              <view class='c-theme f-item'>¥{{item.commodity_sale}}</view>
+              <view wx:if="{{item.commodityChannelPrice}}">渠道价:<text class='c-theme'>¥{{item.commodityChannelPrice}}</text></view>
+            </view>
           </view>
         </view>
       </view>

+ 4 - 1
pages/orderCanvas/orderCanavs.js

@@ -7,7 +7,9 @@ Page({
    * 页面的初始数据
    */
   data: {
-    carts:null
+    carts:null,
+    orderImg:null,
+    host:host
   },
 
   /**
@@ -21,6 +23,7 @@ Page({
 
     that.setData({
       carts: carts,
+      orderImg:wx.getStorageSync('orderImg')
     })
   },
 

+ 3 - 2
pages/orderCanvas/orderCanavs.wxml

@@ -2,7 +2,7 @@
   <image src='../../images/canvas_order.png' mode='widthFix'></image>
 </view> -->
 <view>
-<block wx:for="{{carts}}" wx:key="index"  wx:for-index="{{i}}"> 
+<!-- <block wx:for="{{carts}}" wx:key="index"  wx:for-index="{{i}}"> 
   <view class="goods_infor">
     <view class="each_goods">
       <image src="{{item.logo}}" class="goods_img"></image>
@@ -23,7 +23,8 @@
       </view>
     </view> 
   </view>
- </block> 
+ </block>  -->
+ <image src='{{host}}{{orderImg}}' class='order-img' mode='widthFix'></image>
 </view>
 <view class='footer'>
   <view class='footer-box'>

+ 6 - 0
pages/orderCanvas/orderCanavs.wxss

@@ -1,4 +1,7 @@
 /* pages/orderCanvas/orderCanavs.wxss */
+page{
+  background:#fff;
+}
 .canvas-box image{
   width:100%;
 }
@@ -98,4 +101,7 @@ checkbox.checkact .wx-checkbox-input{
 }
 .borderBottom{
   border-bottom: 1px solid #f0f0f0;
+}
+.order-img{
+  width:100%;
 }

+ 0 - 1
pages/orderList/orderList.js

@@ -131,7 +131,6 @@ Page({
             total += el.order_Price * 1
           })
           res.com_price_total = total;
-          res.status = that.data.isSelect
         })
         goodsList.push(...data)
         that.setData({

+ 9 - 4
pages/orderList/orderList.wxml

@@ -14,7 +14,12 @@
 <view class='order-box'>
   <view class='order-list mar-t20 bg-white pad-b26' wx:for="{{goodsList}}">
     <view class='auto'>
-      <view class='pad-t20 pad-b20'>订单:{{item.order_number}}</view>
+      <view class='f-box pad-t20 pad-b20'>
+        <view class='f-item'>订单:{{item.order_number}}</view>
+        <view wx:if="{{item.order_sta ==1}}">待审核</view>
+         <view wx:if="{{item.order_sta ==3}}">审核通过</view>
+      </view>
+      
       <view class='f-box mar-b20' wx:for="{{item.list_order_aff_data}}" wx:for-item="orderItem">
         <view class='order-image mar-r26'>
           <image mode="aspectFit" src='{{orderItem.logo}}'></image>
@@ -32,9 +37,9 @@
       <!-- 价格与按钮 -->
       <view class="f-box f-justify-content-center order-btn">
         <view class='f-item f-box f-justify-content-end mar-r26'>
-          <view class='btn' wx:if="{{item.status ==1}}" data-orderId="{{item.order_number}}" bindtap='uploadImg'>上传凭证</view>
-          <view class='btn' wx:if="{{item.status ==4}}">查看物流</view>
-          <view class='btn' wx:if="{{item.status ==4}}">确认收货</view>
+          <view class='btn' wx:if="{{item.order_sta ==1}}" data-orderId="{{item.order_number}}" bindtap='uploadImg'>上传凭证</view>
+          <view class='btn' wx:if="{{item.order_sta ==4}}">查看物流</view>
+          <view class='btn' wx:if="{{item.order_sta ==4}}">确认收货</view>
         </view>
         
         <view>合计:<text class='c-theme'>¥ {{item.com_price_total}}</text></view>

+ 1 - 4
pages/searchList/searchList.js

@@ -48,10 +48,7 @@ Page({
         commodity_name: that.data.commodity_name,
         offset: that.data.page,
         limit: that.data.limit,
-      }
-      //添加渠道id
-      if (wx.getStorageSync('channelIdObj').channelId){
-        data.channelId = wx.getStorageSync('channelIdObj').channelId
+        channelId: wx.getStorageSync('channelIdObj').channelId ? wx.getStorageSync('channelIdObj').channelId : ""
       }
       wx.request({
         url: host + "commodityapi/findAllforseach",

+ 4 - 2
pages/searchList/searchList.wxml

@@ -21,8 +21,10 @@
             <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='c-theme'>¥{{item.commodity_sale}}</view>
-            <view class='mar-t10'>渠道价:<text class='c-theme'>¥{{item.commodity_channel_price}}</text></view>
+            <view class='f-box'>
+              <view class='c-theme f-item'>¥{{item.commodity_sale}}</view>
+              <view class='mar-t10' wx:if="{{item.commodity_channel_price}}">渠道价:<text class='c-theme'>¥{{item.commodity_channel_price}}</text></view>
+            </view>
           </view>
         </view>
       </view>