Browse Source

2022-12-12 10:31:22

John-Hong 2 years ago
parent
commit
760b6d6c97

+ 25 - 14
.obsidian/workspace.json

@@ -13,7 +13,7 @@
             "state": {
             "state": {
               "type": "markdown",
               "type": "markdown",
               "state": {
               "state": {
-                "file": "书签/工作相关.md",
+                "file": "任务/spring42/文件上传.md",
                 "mode": "preview",
                 "mode": "preview",
                 "source": true
                 "source": true
               }
               }
@@ -25,14 +25,25 @@
             "state": {
             "state": {
               "type": "markdown",
               "type": "markdown",
               "state": {
               "state": {
-                "file": "任务/spring41/api.md",
+                "file": "书签/工作相关.md",
+                "mode": "source",
+                "source": true
+              }
+            }
+          },
+          {
+            "id": "b5e6740f670bd325",
+            "type": "leaf",
+            "state": {
+              "type": "markdown",
+              "state": {
+                "file": "任务/spring42/月泊改造.md",
                 "mode": "source",
                 "mode": "source",
                 "source": true
                 "source": true
               }
               }
             }
             }
           }
           }
-        ],
-        "currentTab": 1
+        ]
       }
       }
     ],
     ],
     "direction": "vertical"
     "direction": "vertical"
@@ -98,7 +109,7 @@
             "state": {
             "state": {
               "type": "backlink",
               "type": "backlink",
               "state": {
               "state": {
-                "file": "任务/spring41/api.md",
+                "file": "任务/spring42/文件上传.md",
                 "collapseAll": true,
                 "collapseAll": true,
                 "extraContext": false,
                 "extraContext": false,
                 "sortOrder": "alphabetical",
                 "sortOrder": "alphabetical",
@@ -115,7 +126,7 @@
             "state": {
             "state": {
               "type": "outgoing-link",
               "type": "outgoing-link",
               "state": {
               "state": {
-                "file": "任务/spring41/api.md",
+                "file": "任务/spring42/文件上传.md",
                 "linksCollapsed": false,
                 "linksCollapsed": false,
                 "unlinkedCollapsed": true
                 "unlinkedCollapsed": true
               }
               }
@@ -138,7 +149,7 @@
             "state": {
             "state": {
               "type": "outline",
               "type": "outline",
               "state": {
               "state": {
-                "file": "任务/spring41/api.md"
+                "file": "任务/spring42/文件上传.md"
               }
               }
             }
             }
           }
           }
@@ -150,17 +161,17 @@
     "width": 300,
     "width": 300,
     "collapsed": true
     "collapsed": true
   },
   },
-  "active": "bccb530718ebdf03",
+  "active": "3aa1a3e8b0599828",
   "lastOpenFiles": [
   "lastOpenFiles": [
+    "任务/spring41/api.md",
+    "任务/spring42/月泊改造.md",
+    "任务/spring42/文件上传.md",
     "书签/工作相关.md",
     "书签/工作相关.md",
+    "工具/tauri/常用命令.md",
+    "2022-11-30.md",
     "任务/spring40/tick1.31/临时停车H5.md",
     "任务/spring40/tick1.31/临时停车H5.md",
     "任务/spring40/tick1.30/临时停车H5.md",
     "任务/spring40/tick1.30/临时停车H5.md",
     "任务/spring40/tick1.30/yogo机器人送餐.md",
     "任务/spring40/tick1.30/yogo机器人送餐.md",
-    "开发/工作流程.md",
-    "开发/stomp/资料.md",
-    "开发/埋点.md",
-    "任务/CRM|C端-临时停车 | H5扫码支付| 实现websocket集群的联调,调用小程序支付功能.md",
-    "任务/微信公众号域名白名单配置.md",
-    "任务/停车缴费.md"
+    "开发/工作流程.md"
   ]
   ]
 }
 }

+ 3 - 0
2022-11-30.md

@@ -0,0 +1,3 @@
+1、与yong和sam对接口
+2、[[TSI-755] SKC 办公业态临时停车功能问题处理 - Jira (atlassian.net)](https://kerryprops.atlassian.net/browse/TSI-755)
+3、月泊相关

+ 11 - 0
push.sh

@@ -0,0 +1,11 @@
+#!/bin/sh
+ 
+time=$(TZ=UTC-8 date +%Y-%m-%d" "%H:%M:%S)
+echo $time
+# echo "git add ."
+git add . &&
+git commit -m "$time" && 
+git push
+# git add $pwd \
+# git commit -m "$time" \
+# git push

+ 3 - 1
书签/工作相关.md

@@ -44,4 +44,6 @@ QA: [嘉里+ 管理后台 (kerryplus.com)](https://qa-admin-portal-internal.kerr
 [Temporary Parking Service - API - Technology and Innovation China - Confluence (atlassian.net)](https://kerryprops.atlassian.net/wiki/spaces/TAIC/pages/86900753/Temporary+Parking+Service+-+API)
 [Temporary Parking Service - API - Technology and Innovation China - Confluence (atlassian.net)](https://kerryprops.atlassian.net/wiki/spaces/TAIC/pages/86900753/Temporary+Parking+Service+-+API)
 
 
 
 
-[[TIS-13307] 阿里云账号申请 - Jira (atlassian.net)](https://kerryprops.atlassian.net/browse/TIS-13307)
+[[TIS-13307] 阿里云账号申请 - Jira (atlassian.net)](https://kerryprops.atlassian.net/browse/TIS-13307)
+
+[使用 Intune 公司门户 | Microsoft Learn](https://learn.microsoft.com/zh-cn/mem/intune/user-help/enroll-your-device-in-intune-macos-cp)

BIN
任务/.DS_Store


+ 115 - 1
任务/spring41/api.md

@@ -1,4 +1,17 @@
-	createParkOrderAndCarFee 前端使用字段
+创建订单时,前端使用字段:	
+接口:createParkOrderAndCarFee 
+传参:
+```json
+carno,  
+mallid,  
+openId,  
+vipcode,  
+mobile,  
+groupId,  
+kipUserId,  
+createuser,
+```
+响应后使用的参数
 ```json
 ```json
 bind
 bind
 parkMallCode
 parkMallCode
@@ -14,4 +27,105 @@ bonusfee
 paytype
 paytype
 entertime
 entertime
 serviceMin
 serviceMin
+// outParkCharging
+```
+
+
+获取优惠信息:
+接口:api/1.0/park/discount
+传参:
+```json
+carno,  
+mallid,  
+vipcode,  
+groupId
+```
+响应后使用的参数
+```js
+// 积分减免相关
+parkIntegraltomoneyList[*].integral
+parkIntegraltomoneyList[*].value
+parkIntegraltomoneyList[*].integralMaxHour
+parkIntegraltomoneyList[*].bonus
+discountKind
+
+// 优惠减免金额
+parkInfoEntity.payinstruction
+parkInfoEntity.needmoney
+parkInfoEntity.parkMallCode
+parkInfoEntity.maxonetimediscount
+parkInfoEntity.maxOneDayHour
+parkInfoEntity.ticketandMemeberGradeAndConsumeUseHour
+parkInfoEntity.consumeReduce
+parkInfoEntity.memberLevelReduce
+parkInfoEntity.isuseintegral
+parkInfoEntity.isuseticket
+parkInfoEntity.papercoupons
+parkInfoEntity.integralMaxHour
+parkInfoEntity.isSplit // 是否拆分 0: 可拆 1: 不可拆
+parkInfoEntity.remainReduceTime
+parkInfoEntity.useTicketNum
+parkInfoEntity.couponcodeNum
+parkInfoEntity.integralMaxHour
+parkInfoEntity.useReduceTime
+
+// 判断是否存在消费减免明细,用于消费减免页面
+parkConsumeReducesEntityList[*].recuceContent
+parkConsumeReducesEntityList[*].consumerLimit
+
+// 会员优惠
+parkMemberOrderReducesEntityList[*].reduceContent
+parkMemberOrderReducesEntityList[*].memberOrderdesc
+
+// 电子优惠券
+memberTicketList[*].ticketName
+memberTicketList[*].parktime
+memberTicketList[*].cancelEndTime
+memberTicketList[*].ticketValue
+```
+
+
+支付接口:
+1、支付:api/1.0/park/weixinPay
+2、无需支付:api/1.0/park/notWeixinPay
+3、北京车场订单:api/1.0/park/dealParkOrderBj
+以上三个接口使用的入参一样;
+```json
+carno,
+mallid,  
+groupId,  
+openId,  
+vipcode,  
+createuser,  
+orderno,  
+bonusfee,  
+newMemeberBonusFee,  
+bonus,  
+couponfee,  
+couponfeeMin,  
+couponcode,  
+paperCoupons, // 纸质优惠券券码 多个以#分割  
+paperCouponCode, // 纸质优惠券券码 多个以#分割  
+paperCouponFee, // 纸质优惠券优惠金额,单位:分  
+paperCouponFeeMin, // 纸质优惠券优惠时长,单位:分钟  
+bonusFeeMin, // 积分抵扣时长,单位:分钟  
+newMemberBonusMin, // 新会员积分抵扣时间, 单位:分钟  
+consumeFeeMin, // 消费减免时长,单位:分钟  
+firstParkFeeMin, // 首停减免时长 单位 分钟  
+memberGradeFeeMin, // 会员等级减免时长,单位:分钟  
+consumeFee,  
+consumeFeeHour,  
+useConsumeFee,  
+memberGradeFee,  
+memberGradeFeeHour,  
+firstParkFee,  
+usetotalfee,  
+totalfee,  
+paytype,  
+projectId,  
+newMemberBonus
+```
+响应后使用的参数:
+```
+sessionId
 ```
 ```

+ 141 - 0
任务/spring42/文件上传.md

@@ -0,0 +1,141 @@
+API文档:[Swagger UI (kerryonvip.com)](https://dev-s-gateway-kip.kerryonvip.com/swagger-ui.html?urls.primaryName=file-service#/S%E7%AB%AF%E5%AF%B9%E8%B1%A1%E5%AD%98%E5%82%A8/uploadMultipartFileToPublicUsingPOST_2)
+
+阿里云OSS API上传文档:[基于OSS API上传 (aliyun.com)](https://help.aliyun.com/document_detail/412896.html?spm=5176.8465980.help.dexternal.462e14501v1OeZ&scm=20140722.S_help%40%40%E6%96%87%E6%A1%A3%40%40412896.S_hot%2Bos0.ID_412896-RL_oss%20%20api-LOC_consoleUNDhelp-OR_ser-V_2-P0_0)
+
+### 服务端加密方案:
+1、前端上传文件 --> 服务端将文件上传至OSS;
+2、后端存储OSS返回的文件地址;
+3、当前端访问数据时,返回一条限时可访问的链接;
+接口:/s/file/oss/upload-public-multipart-file
+示例:
+```bash
+curl -X POST "https://dev-s-gateway-kip.kerryonvip.com/api/file/v1/s/file/oss/upload-public-multipart-file" -H "accept: */*" -H "Content-Type: multipart/form-data" -F "file=@juejin二维码.png;type=image/png"
+```
+Response body
+```json
+{
+  "url": "https://kip-public-dev.oss-cn-shanghai.aliyuncs.com/dd032c36294344eda0d7d3476cfee6f7_juejin二维码.png"
+}
+```
+Response headers
+```
+ cache-control: no-cache, no-store, max-age=0, must-revalidate connection: keep-alive  content-type: application/json  date: Wed, 07 Dec 2022 03:38:45 GMT  expires: 0  pragma: no-cache  referrer-policy: no-referrer  strict-transport-security: max-age=15724800; includeSubDomains  transfer-encoding: chunked  x-content-type-options: nosniff  x-frame-options: DENY  x-request-id: c0fef2fd74e5c153962bb543b3399102 x-xss-protection: 1 ; mode=block
+```
+
+### 前端加密:
+
+上传:
+1、在前端先将文件转为base64数据;
+2、将base64数据通过AES1加密;
+3、最后将文件以 txt文本方式上传至OSS
+4、保存OSS文件
+
+下载:
+当用户返回访问条件时,下载txt文件,先解密,然后再将base64渲染至前端页面;
+
+
+
+
+# 微信小程序上传图片
+
+上传图片的话就做上传头像的时候遇到了,就拿上传头像举个例子吧
+
+得知道我们都用到什么api,而且提醒一下,这个需要后端配合,因为最后需要上传到服务器
+
+先写一下wxml吧
+
+```csharp
+<view class='box' bindtap='uploadHeadImg'>上传</view>
+```
+
+-   其一,我们得先提示菜单:[从相册中选择,拍照]----`wx.showActionSheet`
+
+```jsx
+uploadHeadImg: function() {
+        let a = this;
+        wx.showActionSheet({
+            itemList: [ "从相册中选择", "拍照" ],
+            itemColor: "#f7982a",
+            success: function(e) {
+            //album:相册   //camera拍照
+                e.cancel || (0 == e.tapIndex ? a.chooseWxImageShop("album") : 1 == e.tapIndex && a.chooseWxImageShop("camera"));
+            }
+        });
+    },
+```
+
+-   其二,选择照片或者拍照,返回临时路径----`wx.chooseImage`
+
+```jsx
+//a:选择的类型  //album:相册   //camera拍照
+chooseWxImageShop: function(a) {
+        var e = this;
+        wx.chooseImage({
+            sizeType: [ "original", "compressed" ],
+            sourceType: [ a ],//类型
+            count:1,
+            success: function(a) {
+                if(a.tempFiles[0].size> 2097152){
+                    wx.showModal({
+                        title: "提示",
+                        content: "选择的图片过大,请上传不超过2M的图片",
+                        showCancel: !1,
+                        success: function(a) {
+                            a.confirm;
+                        }
+                    })
+                }else{
+                    //把图片上传到服务器
+                    e.upload_file(a.tempFilePaths[0])
+                }
+            }
+        });
+    },
+```
+
+-   其三,把图片上传到服务器----`wx.uploadFile`
+
+```jsx
+upload_file: function(e) {
+    wx.showLoading({
+        title: "上传中"
+    });
+    wx.uploadFile({
+        url:url,
+        filePath: e,//图片路径
+        name: "user_avatar",
+        formData: {
+            token: a.globalData.token,
+            user_avatar: "filePath"
+        },
+        header: {
+            "Content-Type": "multipart/form-data"
+        },
+        success: function(a) {
+            wx.hideLoading();
+            wx.showToast({
+                title: "上传成功",
+                icon: "success",
+                duration: 3000
+            });
+        },
+        fail: function(a) {
+            wx.hideLoading();
+            wx.showToast({
+                title: "上传失败",
+                icon: "none",
+                duration: 3000
+            });
+        }
+    });
+},
+```
+
+### 上传成功
+
+  
+  
+作者:肥的ChuaChua  
+链接:https://www.jianshu.com/p/bc1f1e660592  
+来源:简书  
+著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

+ 1 - 0
任务/spring42/月泊改造.md

@@ -0,0 +1 @@
+UI:[Momo-c-kup John Liu – Figma](https://www.figma.com/file/rrELgOg0vsI1zWb6RK079l/Momo-c-kup-John-Liu?node-id=62%3A47)

+ 1 - 0
工具/tauri/常用命令.md

@@ -0,0 +1 @@
+[macOS Bundle | Tauri Apps](https://tauri.app/v1/guides/building/macos)