[baozhangchao] 3 лет назад
Родитель
Сommit
2f917dc2c9

+ 17
- 0
.vscode/launch.json Просмотреть файл

@@ -0,0 +1,17 @@
1
+{
2
+  // 使用 IntelliSense 了解相关属性。 
3
+  // 悬停以查看现有属性的描述。
4
+  // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5
+  "version": "0.2.0",
6
+  "configurations": [
7
+    {
8
+      "name": "Launch Program",
9
+      "program": "${workspaceFolder}/app.js",
10
+      "request": "launch",
11
+      "skipFiles": [
12
+        "<node_internals>/**"
13
+      ],
14
+      "type": "node"
15
+    }
16
+  ]
17
+}

+ 2
- 2
src/pages/dogLicenseList/style.less Просмотреть файл

@@ -29,8 +29,8 @@
29 29
     align-items: center;
30 30
     text-align: center;
31 31
     font-size: 28px;
32
-    position: relative;
33
-    left: 25vw;
32
+    position: absolute;
33
+    right: 8vw;
34 34
     font-size: 35px;
35 35
     font-weight: bold;
36 36
   }

+ 3
- 3
src/pages/payPage/index.jsx Просмотреть файл

@@ -68,13 +68,13 @@ export default (props) => {
68 68
                 <View className='payPageBox-payItemBox-leftText'>下单时间: <View>{orderInfo?.order?.createDate}</View></View>
69 69
               </View>
70 70
               <View className='payPageBox-payItemBox'>
71
-                <View className='payPageBox-payItemBox-leftText'>工本费: <View>{orderInfo?.order?.productionCost / 100}</View>元</View>
71
+                <View className='payPageBox-payItemBox-leftText'>工本费: <View>{(orderInfo?.order?.productionCost / 100).toFixed(2)}</View>元</View>
72 72
               </View>
73 73
               <View className='payPageBox-payItemBox'>
74
-                <View className='payPageBox-payItemBox-leftText'>快递费: <View>{orderInfo?.order?.expressFee / 100}</View>元</View>
74
+                <View className='payPageBox-payItemBox-leftText'>快递费: <View>{(orderInfo?.order?.expressFee / 100).toFixed(2)}</View>元</View>
75 75
               </View>
76 76
               <View className='payPageBox-payItemBox'>
77
-                <View className='payPageBox-payItemBox-leftText'>总金额: <View style={{ color: 'red' }}>{orderInfo?.order?.charges / 100}</View>元</View>
77
+                <View className='payPageBox-payItemBox-leftText'>总金额: <View style={{ color: 'red' }}>{(orderInfo?.order?.charges / 100).toFixed(2)}</View>元</View>
78 78
               </View>
79 79
             </View>
80 80
             <Button title='支付' onClick={pay} />

+ 12
- 6
src/pages/setDogInfo/index.jsx Просмотреть файл

@@ -45,6 +45,7 @@ export default (props) => {
45 45
     if (petId) {
46 46
       console.log('y ID',);
47 47
       setDogInfo(petId, value).then((e) => {
48
+        console.log("🚀 ~ 修改数据", value)
48 49
         Taro.showToast({
49 50
           title: '修改成功',
50 51
           icon: 'none',
@@ -58,8 +59,13 @@ export default (props) => {
58 59
       })
59 60
     } else {
60 61
       console.log('没有ID',);
62
+
61 63
       addDogInfo(value).then((e) => {
62
-        setDogs((dogs || []).concat(e))
64
+        console.log("🚀 修改前s", dogs)
65
+        setDogs((dogs || [e]))
66
+
67
+        console.log("🚀 ~ 保存成功数据", value, e)
68
+
63 69
 
64 70
         Taro.showToast({
65 71
           title: '保存成功',
@@ -88,10 +94,10 @@ export default (props) => {
88 94
   ]
89 95
 
90 96
   const handleBirthday = (e) => {
91
-    const birday = e.detail.value
92
-    // console.log(' birthday: birthday', birthday);
93
-    setFormData({ ...formData, birthday: birday })
94
-    console.log("🚀 ~ file: index.jsx ~ line 93 ~ handleBirthday ~ formData", formData)
97
+    const birthday = e.detail.value
98
+    setFormData({ ...formData, birthday: birthday })
99
+    console.log(' birthday: birthday', formData);
100
+
95 101
   }
96 102
 
97 103
   return (
@@ -118,7 +124,7 @@ export default (props) => {
118 124
             </Picker>
119 125
           </FormItem>
120 126
           <FormItem title='毛色' required>
121
-            <Input name='color' placeholder='请输入毛色' value={formData?.color} />
127
+            <Input name='color' placeholder='请输入毛色' value={formData?.color} onInput={(e) => { setFormData({ ...formData, color: e.detail.value }) }} />
122 128
           </FormItem>
123 129
           <FormItem title='狗狗照片' required>
124 130
             <uploader name='image' value={formData?.image} onFile={handleFile} />