Преглед на файлове

Merge branch 'master' of http://git.ycjcjy.com/nanyang/machinery-miniapp

[baozhangchao] преди 3 години
родител
ревизия
4b8d55a255
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3
    1
      src/pages/index/tabs/Mine.jsx

+ 3
- 1
src/pages/index/tabs/Mine.jsx Целия файл

40
   useDidShow(() => {
40
   useDidShow(() => {
41
     getAddress().then((e) => {
41
     getAddress().then((e) => {
42
       let abccList = e.records.sort((a, b) => b.isDefault - a.isDefault)
42
       let abccList = e.records.sort((a, b) => b.isDefault - a.isDefault)
43
-      setAddresInfo(abccList[0].address)
43
+      if (abccList.length!=0) {        
44
+        setAddresInfo(abccList[0].address)
45
+      }
44
     })
46
     })
45
     if ($instance.router.params.userOk || person.phone) {
47
     if ($instance.router.params.userOk || person.phone) {
46
       setIsLoginBox(true)
48
       setIsLoginBox(true)