[baozhangchao] 3 år sedan
förälder
incheckning
985633e97b
3 ändrade filer med 6 tillägg och 7 borttagningar
  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 Visa fil

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

+ 2
- 1
src/pages/setDogLicense/index.jsx Visa fil

@@ -55,6 +55,7 @@ export default (props) => {
55 55
   const getDogInfoFunction = (petId) => {
56 56
     getDogInfo(petId).then((e) => {
57 57
       setFormData(e)
58
+      console.log("🚀 ~ file: index.jsx ~ line 58 ~ getDogInfo ~ e", e)
58 59
       const sex = [{ value: e?.sex, text: e?.sex == 1 ? '雄' : '雌' }];
59 60
       const petType = [{ value: 0, name: e?.petType }];
60 61
       setDogDate({ ...dogDate, petBirthday: e?.birthday, petSex: sex, petType: petType, })
@@ -153,7 +154,7 @@ export default (props) => {
153 154
 
154 155
       getCardLicenseInfo(renewalAndReissue?.petId).then((res) => {
155 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 158
             console.log('dogInfo xinwe', res);
158 159
             Taro.showToast({
159 160
               title: '申请成功,等待审核',

+ 1
- 3
src/utils/request.js Visa fil

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