e 8 سال پیش
والد
کامیت
7f1c38f263

+ 1 - 0
www/webapp/moonclub/dist/js/build.txt

@@ -29,4 +29,5 @@ panel/productOption.js
 autosize.js
 panel/postReview.js
 page/MyService.js
+model/recharge.js
 page/month.js

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
www/webapp/moonclub/dist/js/main.js


+ 1 - 1
www/webapp/moonclub/dist/js/page/month.js

@@ -1 +1 @@
-define(["template","native","config"],function(e,t,n){function r(e){e.preventDefault(),$(document).trigger("spa:navigate",{hash:""})}return{title:"壹管家上门服务",body:"",init:function(t,i){var s=this,o=$(document),u=t.pushData.product,a=e("month/index",{product:u,showNavBar:!n.isWX&&!n.isChubao});$(".spa-page-body",s).html(a),setTimeout(function(){t.scroll=new IScroll("#mOneScroll")},700),$.newTouch(".back-button",function(e){r.call(this,e)},s),s.on("tapBackButton",function(e){r.call(this,e)}),s.on("swipeRight",function(e){r.call(this,e)}),$.newTouch(".appointment",function(e){e.preventDefault(),window.location.href="/index.php?r=moonclub/reserve/month&user_id="+user.id},s),$.newTouch(".im",function(e){e.preventDefault(),o.trigger("spa:navigate",{hash:"advisory-advisory",pushData:{needReset:!0,backHash:""}})},s),i.resolve()}}});
+define(["$","template","recharge","native","config","user","product"],function(e,t,n,r,i,s,o){function u(t){t.preventDefault(),e(document).trigger("spa:navigate",{hash:"",pushData:{dontNeedReload:!0}})}return{title:"企业服务",body:"",init:function(t,n){var r=this,i=e(document);r.on("swipeRight",function(e){u.call(this,e)}),e.newTouch(".back-button",function(e){u.call(this,e)},r),r.on("tapBackButton",function(e){u.call(this,e)}),e.newTouch(".appointment",function(e){e.preventDefault(),window.location.href="/index.php?r=moonclub/reserve/month&user_id="+s.id},r),e.newTouch(".im",function(e){e.preventDefault(),i.trigger("spa:navigate",{hash:"advisory-advisory",pushData:{needReset:!0,backHash:""}})},r),n.resolve()},beforeopen:function(e,t){t.resolve()},afteropen:function(n,r){var s=this,o=e(document),u=n.pushData,a=u.product;if(s){o.trigger("spa:openloader");if(o){o.trigger("spa:closeloader");var f=t("month/index",{product:a,showNavBar:i.isWX});e(".spa-page-body",s).html(f),setTimeout(function(){n.scroll=new IScroll("#mOneScroll")},700)}}r.resolve()},beforeclose:function(e,t){t.resolve()}}});

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
www/webapp/moonclub/js/build/template.js


+ 3 - 0
www/webapp/moonclub/js/page/advisory/advisory.js

@@ -40,8 +40,11 @@ define(['$', 'template', 'user', 'config', 'api'], function ($, template, user,
                     showNavBar: !config.isWX && !config.isChubao
                 };
                 var tpl = template('advisory/index', tmpData);
+
                 $('.spa-page-body', $view).html(tpl);
+
             }
+
             dtd.resolve();
             if (config.isWX) {
                 wx.ready(function () {

+ 40 - 26
www/webapp/moonclub/js/page/month.js

@@ -1,47 +1,33 @@
-define(['template', 'native', 'config'], function (template, native, config) {
+define(['$', 'template', 'recharge', 'native', 'config', 'user','product'], function ($, template, recharge, native, config, user,product) {
     function back(event) {
         event.preventDefault();
-
         $(document).trigger('spa:navigate', {
-            hash: ''
+            hash: '',
+            pushData: {
+                dontNeedReload: true
+            }
         });
     }
-
     return {
-        title: '壹管家上门服务',
+        title: '企业服务',
         body: '',
         init: function (pageData, dtd) {
+            /* this是什么? */
             var $view = this;
             var $doc = $(document);
-            var product=pageData.pushData.product;
 
-            var tpl = template('month/index', {
-                product:product,
-                showNavBar: !config.isWX && !config.isChubao
-            });
-            $('.spa-page-body', $view).html(tpl);
 
-            setTimeout(function () {
-                pageData.scroll = new IScroll('#mOneScroll');
-            }, 700);
-            //返回
+            // 返回
+            $view.on('swipeRight', function (event) {
+                back.call(this, event);
+            });
             $.newTouch('.back-button', function (event) {
                 back.call(this, event);
             }, $view);
-
             $view.on('tapBackButton', function (event) {
                 back.call(this, event);
             });
 
-            $view.on('swipeRight', function (event) {
-                back.call(this, event);
-            });
-
-            // //客服电话
-            // $.newTouch('.service-telephone', function (event) {
-            //     event.preventDefault();
-            //     native.call('400-0328-170');
-            // }, $view);
             //预约
             $.newTouch('.appointment', function (event) {
                 event.preventDefault();
@@ -59,7 +45,35 @@ define(['template', 'native', 'config'], function (template, native, config) {
                     }
                 })
             }, $view);
+
+            dtd.resolve();
+        },
+        beforeopen: function (pageData, dtd) {
+            dtd.resolve();
+        },
+        afteropen: function (pageData, dtd) {
+            var $view = this;
+            var $doc = $(document);
+            var pushData=pageData.pushData;
+            var product=pushData.product;
+            if ($view) {
+                $doc.trigger('spa:openloader');
+                if ($doc) {
+                    $doc.trigger('spa:closeloader');
+                    var tpl = template('month/index', {
+                        product:product,
+                        showNavBar:config.isWX
+                    });
+                    $('.spa-page-body', $view).html(tpl);
+                    setTimeout(function () {
+                        pageData.scroll = new IScroll('#mOneScroll');
+                    }, 700);
+                }
+            }
+            dtd.resolve();
+        },
+        beforeclose: function (pageData, dtd) {
             dtd.resolve();
         }
     }
-})
+});

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است