visuddhinanda 5 роки тому
батько
коміт
73c365e700
5 змінених файлів з 22 додано та 2 видалено
  1. 8 0
      app/head/list.json
  2. 3 0
      app/time.php
  3. 1 0
      app/ucenter/default.json
  4. 7 1
      app/ucenter/setting.js
  5. 3 1
      app/ucenter/setting.php

+ 8 - 0
app/head/list.json

@@ -0,0 +1,8 @@
+{
+  "category": ["lotus", "lamp", "others"],
+  "list": {
+    "0": { "category": "others", "file": "default.svg" },
+    "1": { "category": "lotus", "file": "1.svg" },
+    "2": { "category": "lotus", "file": "2.svg" }
+  }
+}

+ 3 - 0
app/time.php

@@ -0,0 +1,3 @@
+<?php
+echo time();
+?>

+ 1 - 0
app/ucenter/default.json

@@ -1,4 +1,5 @@
 {
+  "account.head": 0,
   "_ui.lang": ["en", "zh-hans", "zh-hant"],
   "ui.lang": ["en", "zh-hans", "zh-hant", "si", "my"],
   "_studio.translation.lang": ["en", "zh-hans", "zh-hant", "si", "my"],

+ 7 - 1
app/ucenter/setting.js

@@ -1,4 +1,10 @@
 var setting;
+function setting_head_render(file) {
+  let html = '<svg class="head_icon" style="height: 3em;width: 3em;">';
+  html += '<use xlink:href="../head/images/"' + file + "></use>";
+  html += "</svg>";
+  $("#head_img").html(html);
+}
 function setting_onload() {
   $.post("get_setting.php", {}, function (data, status) {
     try {
@@ -78,7 +84,7 @@ function setting_onload() {
           setting_save();
         },
       });
-    } catch (e) { }
+    } catch (e) {}
   });
 }
 function li_remove() {

+ 3 - 1
app/ucenter/setting.php

@@ -241,7 +241,9 @@ para:hover{
 	<div id="main_text_view" style="padding-bottom: 10em;">
         <?php 
             echo "<a name='account'></a>";
-            echo "<h2>{$_local->gui->account}</h2>";
+			echo "<h2>{$_local->gui->account}</h2>";
+			echo "头像:<span id='head_img'></span>";
+
             echo "{$_local->gui->username}:{$_COOKIE["username"]} <button>修改</button><br />";
             echo "{$_local->gui->nick_name}:{$_COOKIE["nickname"]} <button>修改</button><br />";
             echo "{$_local->gui->e_mail}:{$_COOKIE["email"]}<button>修改</button><br />";