dever 7 yıl önce
ebeveyn
işleme
6b497919f7

+ 17 - 5
main/assets/mobile/js/config.js

@@ -23,11 +23,23 @@ function updateUser(url)
 }
 
 $(function(){
-	$("#username").keydown(function(event){
-		if(event.which == 13) {
-			updateUser();
-		}
-	});
+	if ($("#username").length) {
+		$("#username").keydown(function(event){
+			if(event.which == 13) {
+				updateUser();
+			}
+		});
+	}
+	
+	if ($("#quit").length) {
+		$("#quit").click(function()
+		{
+			if (confirm('确定退出吗?')) {
+				var href = $(this).attr('url');
+				location.href = href;
+			}
+		});
+	}
 })
 
 

+ 3 - 1
main/template/mobile/user/account.php

@@ -76,7 +76,9 @@ $view
 
         '.button' => array
         (
-            'href' => '$v.quit',
+            'href' => 'javascript:;',
+            'id' => 'quit',
+            'url' => '$v.quit',
         ),
     ), 
 ))

+ 1 - 1
main/template/mobile/user/msg.php

@@ -28,7 +28,7 @@ $view
 
         'p' => array
         (
-            'html' => '<{$v.name}><br /><{$v.content}>',
+            'html' => '<{$v.name}><br /><{$v.content && $v.content != "null" ? $v.content : ""}>',
             'class' => '<{$v.status == 1 ? "new" : ""}>',
         ),
     )

+ 8 - 8
main/template/mobile/user/report.php

@@ -30,17 +30,17 @@ $view
     (
         'dt' => array
         (
-            'style' => '<{$v.name ? "" : "display:none"}>',
+            'style' => '<{strstr(Dever::load("task/info.one#report_demand"), "username") ? "" : "display:none"}>',
             'html' => '$v.name',
         ),
 
         '.tk-tit|0' => array
         (
-            'style' => '<{$v.pic ? "" : "display:none"}>',
+            'style' => '<{strstr(Dever::load("task/info.one#report_demand"), "pic") ? "" : "display:none"}>',
         ),
         '.tk-imgs' => array
         (
-            'style' => '<{$v.pic ? "" : "display:none"}>',
+            'style' => '<{strstr(Dever::load("task/info.one#report_demand"), "pic") ? "" : "display:none"}>',
         ),
         '.tk-imgs img|$v.img' => array
         (
@@ -51,22 +51,22 @@ $view
 
         '.tk-tit|1' => array
         (
-            'style' => '<{$v.link ? "" : "display:none"}>',
+            'style' => '<{strstr(Dever::load("task/info.one#report_demand"), "link") ? "" : "display:none"}>',
         ),
         '.tk-text|0' => array
         (
             'html' => '$v.link',
-            'style' => '<{$v.link ? "" : "display:none"}>',
+            'style' => '<{strstr(Dever::load("task/info.one#report_demand"), "link") ? "" : "display:none"}>',
         ),
 
         '.tk-tit|2' => array
         (
-            'style' => '<{$v.desc ? "" : "display:none"}>',
+            'style' => '<{strstr(Dever::load("task/info.one#report_demand"), "desc") ? "" : "display:none"}>',
         ),
         '.tk-text|1' => array
         (
             'html' => '$v.desc',
-            'style' => '<{$v.desc ? "" : "display:none"}>',
+            'style' => '<{strstr(Dever::load("task/info.one#report_demand"), "desc") ? "" : "display:none"}>',
         ),
 
         'dd|6' => array
@@ -85,7 +85,7 @@ $view
 
 
 # 暂无记录
-->fetch('.no-result', '<section class="no-notice-wrapper"><img src="'.Dever::assets("images/6713b0c1.no-report.png", "images").'" alt=""><p>您还没有提交任务报告</p><{if (Dever::load("task/info.one#button_status") == 5):}><a href="'.Dever::url("task/submit?id=" . Dever::input("id") . "&nonce=" . Dever::id(), "main").'" class="button">提交报告</a><{else:}><a href="javascript:;" class="button disable">提交报告</a><{endif}></section>')
+->fetch('.no-result', '<section class="no-notice-wrapper"><img src="'.Dever::assets("6713b0c1.no-report.png", "images").'" alt=""><p>您还没有提交任务报告</p><{if (Dever::load("task/info.one#button_status") == 5):}><a href="'.Dever::url("task/submit?id=" . Dever::input("id") . "&nonce=" . Dever::id(), "main").'" class="button">提交报告</a><{else:}><a href="javascript:;" class="button disable">提交报告</a><{endif}></section>')
 
 ->fetch('.no-result@style', '<{if (count(Dever::load("task/report.all")) > 0):}>display:none;<{endif}>')
 

+ 6 - 6
task/src/Info.php

@@ -171,7 +171,7 @@ class Info extends Base
     {
 
         $data['task_score'] = $data['score'];
-        
+
         # 链接
         $data['link'] = Dever::url('task/view?id=' . $data['id'], 'main');
 
@@ -236,15 +236,15 @@ class Info extends Base
 
             $result['total_score'] = $result['report_score'] + $result['group_score'];
 
-            if ($result['report_score'] > 0) {
+            if ($result['report_score'] >= 0) {
                 $result['report'] = '个人已完成 '.$result['report_num'].' 项任务报告,获得 <em>'.$result['report_score'].' ' . $this->data['config']['score_name'] . '</em>';
             }
             
-            if ($result['group_score'] > 0) {
+            if ($result['group_score'] >= 0) {
                 $result['group'] = '组员已完成 '.$result['group_report_num'].' 项任务报告,贡献 <em>'.$result['group_score'].' ' . $this->data['config']['score_name'] . '</em>';
             }
             
-            if ($result['total_score'] > 0) {
+            if ($result['total_score'] >= 0) {
                 $result['total'] = '合计获得 <strong>'.$result['total_score'].'</strong> ' . $this->data['config']['score_name'];
             }
         }
@@ -318,7 +318,7 @@ class Info extends Base
             3 => '抢光了',
             4 => '等级不够',
             5 => '已领取',
-            6 => '已领取过该商家'.$data['cate']['name'],
+            6 => '已领取过'.$data['cate']['name'],
             7 => '已领取过该商家任务',
             8 => '已超过报告数量上限',
             9 => '已超过人均报告数量上限',
@@ -342,7 +342,7 @@ class Info extends Base
 
         } elseif ($result['status'] >= 8) {
             $result['name'] = '提交报告';
-            $result['class'] = 'button';
+            $result['class'] = 'button disable';
         } elseif ($result['status'] > 1) {
             if ($result['status'] == 3) {
                 $result['name'] = '抢光了';