[baozhangchao] 3 vuotta sitten
vanhempi
commit
985633e97b
3 muutettua tiedostoa jossa 6 lisäystä ja 7 poistoa
  1. 3
    3
      src/pages/index/index.jsx
  2. 2
    1
      src/pages/setDogLicense/index.jsx
  3. 1
    3
      src/utils/request.js

+ 3
- 3
src/pages/index/index.jsx Näytä tiedosto

7
 import withBasic from '@/layouts/withBasic'
7
 import withBasic from '@/layouts/withBasic'
8
 
8
 
9
 import { useModel } from '@/store'
9
 import { useModel } from '@/store'
10
-import { getApplicationList, getBannerList,getDogCardList } from '@/services/dogAPI'
10
+import { getApplicationList, getBannerList, getDogCardList } from '@/services/dogAPI'
11
 import MenuItem from './components/MenuItem'
11
 import MenuItem from './components/MenuItem'
12
 
12
 
13
 import './style.less'
13
 import './style.less'
22
 }
22
 }
23
 
23
 
24
 const IndexPage = (props) => {
24
 const IndexPage = (props) => {
25
-  const { pets, cards,setCards } = useModel('userData')
25
+  const { pets, cards, setCards } = useModel('userData')
26
   const [totalApplyNum, setTotalApplyNum] = useState(0)
26
   const [totalApplyNum, setTotalApplyNum] = useState(0)
27
   const [noticeList, setNoticeList] = useState([])
27
   const [noticeList, setNoticeList] = useState([])
28
   const [bannerList, setBannerList] = useState([])
28
   const [bannerList, setBannerList] = useState([])
42
     getBannerList().then(res => {
42
     getBannerList().then(res => {
43
       setBannerList(res)
43
       setBannerList(res)
44
     })
44
     })
45
-    getDogCardList().then(res=>{
45
+    getDogCardList().then(res => {
46
       setCards(res.records)
46
       setCards(res.records)
47
     })
47
     })
48
   }, [])
48
   }, [])

+ 2
- 1
src/pages/setDogLicense/index.jsx Näytä tiedosto

55
   const getDogInfoFunction = (petId) => {
55
   const getDogInfoFunction = (petId) => {
56
     getDogInfo(petId).then((e) => {
56
     getDogInfo(petId).then((e) => {
57
       setFormData(e)
57
       setFormData(e)
58
+      console.log("🚀 ~ file: index.jsx ~ line 58 ~ getDogInfo ~ e", e)
58
       const sex = [{ value: e?.sex, text: e?.sex == 1 ? '雄' : '雌' }];
59
       const sex = [{ value: e?.sex, text: e?.sex == 1 ? '雄' : '雌' }];
59
       const petType = [{ value: 0, name: e?.petType }];
60
       const petType = [{ value: 0, name: e?.petType }];
60
       setDogDate({ ...dogDate, petBirthday: e?.birthday, petSex: sex, petType: petType, })
61
       setDogDate({ ...dogDate, petBirthday: e?.birthday, petSex: sex, petType: petType, })
153
 
154
 
154
       getCardLicenseInfo(renewalAndReissue?.petId).then((res) => {
155
       getCardLicenseInfo(renewalAndReissue?.petId).then((res) => {
155
         if (!res) {
156
         if (!res) {
156
-          addlication({ ...value, applyType, petId: formData.petId }).then((res) => {
157
+          addlication({ ...value, applyType, petId: formData.petId, petName: formData.name }).then((res) => {
157
             console.log('dogInfo xinwe', res);
158
             console.log('dogInfo xinwe', res);
158
             Taro.showToast({
159
             Taro.showToast({
159
               title: '申请成功,等待审核',
160
               title: '申请成功,等待审核',

+ 1
- 3
src/utils/request.js Näytä tiedosto

95
           }
95
           }
96
         } else {
96
         } else {
97
           console.error(res)
97
           console.error(res)
98
-
99
           logger.error("上传文件失败")
98
           logger.error("上传文件失败")
100
           logger.error(res)
99
           logger.error(res)
101
-
102
           reject(res.errMsg)
100
           reject(res.errMsg)
103
         }
101
         }
104
       },
102
       },
115
   })
113
   })
116
 }
114
 }
117
 
115
 
118
-export function handleFile(e) {
116
+export function handleFile (e) {
119
   const { file, next } = e.detail
117
   const { file, next } = e.detail
120
   uploadFile(file.path).then(next)
118
   uploadFile(file.path).then(next)
121
 }
119
 }