wupengfei 2 years ago
parent
commit
6459b481a5

+ 3 - 2
.idea/workspace.xml

@@ -3,7 +3,8 @@
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/view/article_comment/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/view/article_comment/index.html" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/common.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/common.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/nutrition/view/article_report/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/view/article_report/index.html" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -267,7 +268,7 @@
       <workItem from="1679014817602" duration="22183000" />
       <workItem from="1679287382176" duration="14525000" />
       <workItem from="1679359715116" duration="25702000" />
-      <workItem from="1679532313623" duration="13453000" />
+      <workItem from="1679532313623" duration="13646000" />
     </task>
     <servers />
   </component>

+ 6 - 0
application/common.php

@@ -414,4 +414,10 @@ function create_qrcode($id,$module = 'activity')
     return $url;
 }
 
+function get_short_name($name)
+{
+    if(strlen($name) <= 8) return $name;
+    return  substr_replace($name,'****',3,4);
+}
+
 

+ 1 - 1
application/nutrition/view/article_report/index.html

@@ -48,7 +48,7 @@
                 {/notempty}
                 <div class="inline-block">
                     用户ID:{$vo.user_id|default='--'}<br/><br/>
-                    用户名:{$vo.name|default='--'}
+                    用户名:{:get_short_name($vo.name)|default='--'}
                 </div>
             </td>
             <td class='text-left nowrap'>