Browse Source

修改了玩具连接的问题
打开了代理商模块

yerong 4 years ago
parent
commit
092fad2ac5
3 changed files with 22 additions and 2 deletions
  1. 1 1
      dist/wx
  2. 6 1
      src/pages/agent/customer/index.vue
  3. 15 0
      src/utils/index.js

+ 1 - 1
dist/wx

@@ -1 +1 @@
-Subproject commit 9d9df3c4c8d7ac01909fcacf74e00020f1adc2e6
+Subproject commit afa3d04f4f65adbff085d926adfd837ecd9df278

+ 6 - 1
src/pages/agent/customer/index.vue

@@ -52,7 +52,8 @@
           </view>
           <view>
             <text class="text-normal">最后下单时间&emsp;</text>
-            <text class="text-gray text-sm">2018/09/24 10:44</text>
+            <text class="text-gray text-sm">{{user.create_time}}</text>
+
           </view>
         </view>
 
@@ -88,6 +89,7 @@
 
 import {agentUserList} from "../../../requests/agent";
 import Toast from '../../../../static/vant/toast/toast'
+import {formatTimeForSeconds} from "../../../utils";
 
 var $this
 export default {
@@ -212,6 +214,9 @@ export default {
         Toast.clear()
         let $data = res.data;
         $this.user_list = $data.data
+        $this.user_list.forEach(($val, $index) => {
+          $val['create_time'] = formatTimeForSeconds($val['create_time'])
+        })
         $this.customer_count = $this.user_list.length
       })
     }

+ 15 - 0
src/utils/index.js

@@ -17,6 +17,21 @@ export function formatTime(date) {
   return year + "/" + month + "/" + day
 }
 
+export function formatTimeForSeconds(date) {
+  if (date.length <= 11) {
+    date = date * 1000
+  }
+  var date = new Date(date)
+  const year = date.getFullYear()
+  const month = date.getMonth() + 1
+  const day = date.getDate()
+
+  const hour = date.getHours()
+  const minute = date.getMinutes()
+
+  return year + "/" + month + "/" + day + " " + hour + ":" + minute
+}
+
 
 export function formatValidityTime(date) {
   if (date.toString().length <= 11) {