黎海 преди 1 година
родител
ревизия
69afe1aa09
променени са 5 файла, в които са добавени 94 реда и са изтрити 1 реда
  1. 1 1
      config/index.js
  2. 17 0
      package-lock.json
  3. 4 0
      package.json
  4. 69 0
      project.kwai.json
  5. 3 0
      src/api/request.js

+ 1 - 1
config/index.js

@@ -25,7 +25,7 @@ const config = {
25
   },
25
   },
26
   sourceRoot: 'src',
26
   sourceRoot: 'src',
27
   outputRoot: `dist/${process.env.TARO_ENV}`,
27
   outputRoot: `dist/${process.env.TARO_ENV}`,
28
-  plugins:[],
28
+  plugins:['@tarojs/plugin-platform-kwai'],
29
   defineConstants: {
29
   defineConstants: {
30
   },
30
   },
31
   copy: {
31
   copy: {

+ 17 - 0
package-lock.json

@@ -14,6 +14,7 @@
14
                 "@tarojs/plugin-framework-react": "3.5.7",
14
                 "@tarojs/plugin-framework-react": "3.5.7",
15
                 "@tarojs/plugin-platform-alipay": "3.5.7",
15
                 "@tarojs/plugin-platform-alipay": "3.5.7",
16
                 "@tarojs/plugin-platform-jd": "3.5.7",
16
                 "@tarojs/plugin-platform-jd": "3.5.7",
17
+                "@tarojs/plugin-platform-kwai": "^3.0.0",
17
                 "@tarojs/plugin-platform-qq": "3.5.7",
18
                 "@tarojs/plugin-platform-qq": "3.5.7",
18
                 "@tarojs/plugin-platform-swan": "3.5.7",
19
                 "@tarojs/plugin-platform-swan": "3.5.7",
19
                 "@tarojs/plugin-platform-tt": "3.5.7",
20
                 "@tarojs/plugin-platform-tt": "3.5.7",
@@ -3222,6 +3223,16 @@
3222
                 "@tarojs/shared": "3.5.7"
3223
                 "@tarojs/shared": "3.5.7"
3223
             }
3224
             }
3224
         },
3225
         },
3226
+        "node_modules/@tarojs/plugin-platform-kwai": {
3227
+            "version": "3.0.0",
3228
+            "resolved": "https://registry.npmjs.org/@tarojs/plugin-platform-kwai/-/plugin-platform-kwai-3.0.0.tgz",
3229
+            "integrity": "sha512-K171CQsmOLmx8hcVE5VOH3+OMDqW1EwdqAZLtPC+72j3J8e9ekmbb+rgsMEWnY8/jr9s80E5aNIUx1i63cPr0g==",
3230
+            "peerDependencies": {
3231
+                "@tarojs/components": "^3.5.0",
3232
+                "@tarojs/service": "^3.5.0",
3233
+                "@tarojs/shared": "^3.5.0"
3234
+            }
3235
+        },
3225
         "node_modules/@tarojs/plugin-platform-qq": {
3236
         "node_modules/@tarojs/plugin-platform-qq": {
3226
             "version": "3.5.7",
3237
             "version": "3.5.7",
3227
             "resolved": "https://registry.npmjs.org/@tarojs/plugin-platform-qq/-/plugin-platform-qq-3.5.7.tgz",
3238
             "resolved": "https://registry.npmjs.org/@tarojs/plugin-platform-qq/-/plugin-platform-qq-3.5.7.tgz",
@@ -27938,6 +27949,12 @@
27938
                 "@tarojs/shared": "3.5.7"
27949
                 "@tarojs/shared": "3.5.7"
27939
             }
27950
             }
27940
         },
27951
         },
27952
+        "@tarojs/plugin-platform-kwai": {
27953
+            "version": "3.0.0",
27954
+            "resolved": "https://registry.npmjs.org/@tarojs/plugin-platform-kwai/-/plugin-platform-kwai-3.0.0.tgz",
27955
+            "integrity": "sha512-K171CQsmOLmx8hcVE5VOH3+OMDqW1EwdqAZLtPC+72j3J8e9ekmbb+rgsMEWnY8/jr9s80E5aNIUx1i63cPr0g==",
27956
+            "requires": {}
27957
+        },
27941
         "@tarojs/plugin-platform-qq": {
27958
         "@tarojs/plugin-platform-qq": {
27942
             "version": "3.5.7",
27959
             "version": "3.5.7",
27943
             "resolved": "https://registry.npmjs.org/@tarojs/plugin-platform-qq/-/plugin-platform-qq-3.5.7.tgz",
27960
             "resolved": "https://registry.npmjs.org/@tarojs/plugin-platform-qq/-/plugin-platform-qq-3.5.7.tgz",

+ 4 - 0
package.json

@@ -12,6 +12,8 @@
12
         "build:weapp": "taro build --type weapp",
12
         "build:weapp": "taro build --type weapp",
13
         "build:weapp_upload": "taro build --type weapp  --upload",
13
         "build:weapp_upload": "taro build --type weapp  --upload",
14
         "build:swan": "taro build --type swan",
14
         "build:swan": "taro build --type swan",
15
+        "build:kwai": "taro build --type kwai",
16
+        "build:kwai_upload": "taro build --type kwai  --upload",
15
         "build:alipay": "taro build --type alipay",
17
         "build:alipay": "taro build --type alipay",
16
         "build:tt": "taro build --type tt",
18
         "build:tt": "taro build --type tt",
17
         "build:tt_upload": "taro build --type tt  --upload",
19
         "build:tt_upload": "taro build --type tt  --upload",
@@ -21,6 +23,7 @@
21
         "build:jd": "taro build --type jd",
23
         "build:jd": "taro build --type jd",
22
         "build:quickapp": "taro build --type quickapp",
24
         "build:quickapp": "taro build --type quickapp",
23
         "dev:weapp": "npm run build:weapp -- --watch",
25
         "dev:weapp": "npm run build:weapp -- --watch",
26
+        "dev:kwai": "npm run build:kwai -- --watch",
24
         "dev:swan": "npm run build:swan -- --watch",
27
         "dev:swan": "npm run build:swan -- --watch",
25
         "dev:alipay": "npm run build:alipay -- --watch",
28
         "dev:alipay": "npm run build:alipay -- --watch",
26
         "dev:tt": "npm run build:tt -- --watch",
29
         "dev:tt": "npm run build:tt -- --watch",
@@ -44,6 +47,7 @@
44
         "@tarojs/plugin-framework-react": "3.5.7",
47
         "@tarojs/plugin-framework-react": "3.5.7",
45
         "@tarojs/plugin-platform-alipay": "3.5.7",
48
         "@tarojs/plugin-platform-alipay": "3.5.7",
46
         "@tarojs/plugin-platform-jd": "3.5.7",
49
         "@tarojs/plugin-platform-jd": "3.5.7",
50
+        "@tarojs/plugin-platform-kwai": "^3.0.0",
47
         "@tarojs/plugin-platform-qq": "3.5.7",
51
         "@tarojs/plugin-platform-qq": "3.5.7",
48
         "@tarojs/plugin-platform-swan": "3.5.7",
52
         "@tarojs/plugin-platform-swan": "3.5.7",
49
         "@tarojs/plugin-platform-tt": "3.5.7",
53
         "@tarojs/plugin-platform-tt": "3.5.7",

+ 69 - 0
project.kwai.json

@@ -0,0 +1,69 @@
1
+{
2
+  "description": "快手配置",
3
+  "packOptions": {
4
+      "ignore": []
5
+  },
6
+  "setting": {
7
+      "urlCheck": true,
8
+      "es6": true,
9
+      "enhance": false,
10
+      "postcss": true,
11
+      "preloadBackgroundData": false,
12
+      "minified": true,
13
+      "newFeature": false,
14
+      "coverView": true,
15
+      "nodeModules": false,
16
+      "autoAudits": false,
17
+      "showShadowRootInWxmlPanel": true,
18
+      "scopeDataCheck": false,
19
+      "uglifyFileName": false,
20
+      "checkInvalidKey": true,
21
+      "checkSiteMap": true,
22
+      "uploadWithSourceMap": true,
23
+      "compileHotReLoad": false,
24
+      "babelSetting": {
25
+          "ignore": [],
26
+          "disablePlugins": [],
27
+          "outputPath": ""
28
+      },
29
+      "useIsolateContext": true,
30
+      "useCompilerModule": false,
31
+      "userConfirmedUseCompilerModuleSwitch": false
32
+  },
33
+  "compileType": "miniprogram",
34
+  "libVersion": "0.2.0",
35
+  "appid": "ks716072342548193665",
36
+  "projectname": "AI绘画练习生",
37
+  "debugOptions": {
38
+      "hidedInDevtools": []
39
+  },
40
+  "scripts": {},
41
+  "isGameTourist": false,
42
+  "simulatorPluginLibVersion": {},
43
+  "condition": {
44
+      "search": {
45
+          "current": -1,
46
+          "list": []
47
+      },
48
+      "conversation": {
49
+          "current": -1,
50
+          "list": []
51
+      },
52
+      "game": {
53
+          "current": -1,
54
+          "list": []
55
+      },
56
+      "plugin": {
57
+          "current": -1,
58
+          "list": []
59
+      },
60
+      "gamePlugin": {
61
+          "current": -1,
62
+          "list": []
63
+      },
64
+      "miniprogram": {
65
+          "current": -1,
66
+          "list": []
67
+      }
68
+  }
69
+}

+ 3 - 0
src/api/request.js

@@ -1,6 +1,7 @@
1
 import Taro from '@tarojs/taro';
1
 import Taro from '@tarojs/taro';
2
 import ttappid from '../../project.tt.json'
2
 import ttappid from '../../project.tt.json'
3
 import wxappid from '../../project.config.json'
3
 import wxappid from '../../project.config.json'
4
+import kwaiappid from '../../project.kwai.json'
4
 import {
5
 import {
5
   baseUrl
6
   baseUrl
6
 } from './config';
7
 } from './config';
@@ -19,6 +20,8 @@ export default (options = {
19
     request_data['appid'] = wxappid.appid
20
     request_data['appid'] = wxappid.appid
20
   } else if (process.env.TARO_ENV === 'tt') {
21
   } else if (process.env.TARO_ENV === 'tt') {
21
     request_data['appid'] = ttappid.appid
22
     request_data['appid'] = ttappid.appid
23
+  }else if (process.env.TARO_ENV === 'kwai') {
24
+    request_data['appid'] = kwaiappid.appid
22
   }
25
   }
23
   return Taro.request({
26
   return Taro.request({
24
     url: baseUrl + options.url,
27
     url: baseUrl + options.url,