e 8 vuotta sitten
vanhempi
sitoutus
d50e7420cf

+ 2 - 2
www/protected/modules/o2o/views/web/index.php

@@ -10,7 +10,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/webapp/framework/ratchet-2.0.2/dist/css/ratchet.min.css">
     <link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/webapp/framework/ratchet-2.0.2/dist/css/ratchet-theme-ios.min.css">
-    <link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/webapp/o2o/dist/css/main.css?v=2017051609">
+    <link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/webapp/o2o/dist/css/main.css?v=2017051610">
     <link href="<?php echo Yii::app()->request->baseUrl; ?>/css/common_o2o/swiper.css" rel="stylesheet">
     <script src="<?php echo Yii::app()->request->baseUrl; ?>/js/o2o/swiper.min.js"></script>
     <style>
@@ -76,7 +76,7 @@
       location.hash = '';
     }
     var debug = false;
-    var main = '<?php echo Yii::app()->request->baseUrl;?>/webapp/o2o/dist/js/main.js?v=2017051609';
+    var main = '<?php echo Yii::app()->request->baseUrl;?>/webapp/o2o/dist/js/main.js?v=2017051610';
     if (debug) {
       main = '<?php echo Yii::app()->request->baseUrl;?>/webapp/o2o/js/main.js?v=' + (new Date()).getTime();
       document.getElementById('debugMain').src = '<?php echo Yii::app()->request->baseUrl; ?>/webapp/common/js/debuggap.js';

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
www/webapp/o2o/dist/js/build/template.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
www/webapp/o2o/dist/js/main.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
www/webapp/o2o/dist/js/page/balanceLog.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
www/webapp/o2o/js/build/template.js


+ 29 - 3
www/webapp/o2o/js/page/balanceLog.js

@@ -3,7 +3,7 @@ define(['$', 'template', 'IScroll', 'user', 'product', 'native', 'config', 'addr
   var myDate = new Date();
   var year = myDate.getFullYear();
   var month = myDate.getMonth();
-
+  var BalancsView=false;
   function back (event) {
     event.preventDefault();
     $(document).trigger('spa:navigate', {
@@ -59,6 +59,7 @@ define(['$', 'template', 'IScroll', 'user', 'product', 'native', 'config', 'addr
     var type = $('.control-item.active').data('order-type');
     var startTime = $('.year-span').text()+'-'+$('.month-span').text()+'-01';
     var endTime = $('.year-span').text()+'-'+$('.month-span').text()+'-30';
+
     $('.type-container', view).hide();
     switch (type) {
       case 1:
@@ -69,9 +70,16 @@ define(['$', 'template', 'IScroll', 'user', 'product', 'native', 'config', 'addr
         end_time:endTime
       },function(res){
         var balanceLog = res.message;
+        for(var i=0;balanceLog.length;i++){
+          if(balanceLog[i].amount>0 && balanceLog[i].memo!=="微信下订单" && balanceLog[i].memo!=="下订单"){
+            BalancsView=true;
+          }
+        }
+        console.log(BalancsView);
         if (!cachePageData.massage) {
           var tpl = template('balanceLog/productDescScroll', {
-            balanceLog: balanceLog
+            balanceLog: balanceLog,
+            BalancsView:BalancsView,
           });
           $('.pad-b-1', view).html(tpl);
           setTimeout(function () {
@@ -88,9 +96,17 @@ define(['$', 'template', 'IScroll', 'user', 'product', 'native', 'config', 'addr
         end_time:endTime
       },function(res){
         var balanceLog = res.message;
+        console.log(balanceLog);
+        for(var i=0;i<balanceLog.length;i++){
+          if(balanceLog[i].memo=="微信下订单" || balanceLog[i].memo=="下订单" || balanceLog[i].amount<0 ){
+              BalancsView=true;
+          }
+        }
+        console.log(BalancsView);
         if (!cachePageData.massage) {
           var tpl = template('balanceLog/orderContainer', {
-            balanceLog: balanceLog
+            balanceLog: balanceLog,
+            BalancsView:BalancsView,
           });
           $('.list-content', view).html(tpl);
           setTimeout(function () {
@@ -228,10 +244,20 @@ define(['$', 'template', 'IScroll', 'user', 'product', 'native', 'config', 'addr
       }, function (res) {
         if (res.success) {
           var balanceLog = res.message;
+          console.log(balanceLog);
+          for(var i=0;balanceLog.length;i++){
+
+            //console.log(balanceLog[i].amount);
+            // if(balanceLog[i].amount>0 && balanceLog[i].memo!=="微信下订单" && balanceLog[i].memo!=="下订单"){
+            //   BalancsView=true;
+            // }
+          }
+
           if (!cachePageData.massage) {
             var tpl = template('balanceLog/index', {
               balanceLog: balanceLog,
               year: year,
+              BalancsView:BalancsView,
               month: month,
               title:'余额明细',
               userBalance: user.balance,

+ 3 - 0
www/webapp/o2o/tpl/balanceLog/orderContainer.html

@@ -1,3 +1,6 @@
+{{ if BalancsView}}
+  <div>暂时无数据</div>
+{{ /if }}
 {{ each balanceLog as Log }}
   {{ if Log.memo=="微信下订单" || Log.memo=="下订单" || Log.amount<0 }}
   <div class="recharge-details">

+ 1 - 0
www/webapp/o2o/tpl/balanceLog/productDescScroll.html

@@ -1,3 +1,4 @@
+
 {{ each balanceLog as Log }}
   {{ if Log.amount>0 && Log.memo!=="微信下订单" && Log.memo!=="下订单" }}
   <div class="recharge-details">

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä