xcx 4 anni fa
parent
commit
bdfe6ec92d

+ 19
- 19
package-lock.json Vedi File

@@ -4436,7 +4436,7 @@
4436 4436
       "dependencies": {
4437 4437
         "camelcase": {
4438 4438
           "version": "2.1.1",
4439
-          "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-2.1.1.tgz?cache=0&sync_timestamp=1603921884289&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase%2Fdownload%2Fcamelcase-2.1.1.tgz",
4439
+          "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-2.1.1.tgz?cache=0&sync_timestamp=1603924797555&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcamelcase%2Fdownload%2Fcamelcase-2.1.1.tgz",
4440 4440
           "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8="
4441 4441
         }
4442 4442
       }
@@ -5268,7 +5268,7 @@
5268 5268
     },
5269 5269
     "dayjs": {
5270 5270
       "version": "1.9.7",
5271
-      "resolved": "https://registry.npm.taobao.org/dayjs/download/dayjs-1.9.7.tgz?cache=0&sync_timestamp=1607178538136&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdayjs%2Fdownload%2Fdayjs-1.9.7.tgz",
5271
+      "resolved": "https://registry.npm.taobao.org/dayjs/download/dayjs-1.9.7.tgz?cache=0&sync_timestamp=1607180938588&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdayjs%2Fdownload%2Fdayjs-1.9.7.tgz",
5272 5272
       "integrity": "sha1-SyYLsX3O7S1fKQON/uA8ZaZ4b8A="
5273 5273
     },
5274 5274
     "debug": {
@@ -5448,7 +5448,7 @@
5448 5448
     },
5449 5449
     "delegates": {
5450 5450
       "version": "1.0.0",
5451
-      "resolved": "https://registry.npm.taobao.org/delegates/download/delegates-1.0.0.tgz",
5451
+      "resolved": "https://registry.npm.taobao.org/delegates/download/delegates-1.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdelegates%2Fdownload%2Fdelegates-1.0.0.tgz",
5452 5452
       "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
5453 5453
     },
5454 5454
     "depd": {
@@ -7422,7 +7422,7 @@
7422 7422
     },
7423 7423
     "gauge": {
7424 7424
       "version": "2.7.4",
7425
-      "resolved": "https://registry.npm.taobao.org/gauge/download/gauge-2.7.4.tgz",
7425
+      "resolved": "https://registry.npm.taobao.org/gauge/download/gauge-2.7.4.tgz?cache=0&sync_timestamp=1580507640343&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fgauge%2Fdownload%2Fgauge-2.7.4.tgz",
7426 7426
       "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
7427 7427
       "requires": {
7428 7428
         "aproba": "^1.0.3",
@@ -9170,7 +9170,7 @@
9170 9170
       "dependencies": {
9171 9171
         "pify": {
9172 9172
           "version": "2.3.0",
9173
-          "resolved": "https://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz?cache=0&sync_timestamp=1593529716831&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpify%2Fdownload%2Fpify-2.3.0.tgz",
9173
+          "resolved": "https://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz",
9174 9174
           "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
9175 9175
         }
9176 9176
       }
@@ -9389,7 +9389,7 @@
9389 9389
     },
9390 9390
     "meow": {
9391 9391
       "version": "3.7.0",
9392
-      "resolved": "https://registry.npm.taobao.org/meow/download/meow-3.7.0.tgz?cache=0&sync_timestamp=1603923049745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmeow%2Fdownload%2Fmeow-3.7.0.tgz",
9392
+      "resolved": "https://registry.npm.taobao.org/meow/download/meow-3.7.0.tgz",
9393 9393
       "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
9394 9394
       "requires": {
9395 9395
         "camelcase-keys": "^2.0.0",
@@ -9783,7 +9783,7 @@
9783 9783
     },
9784 9784
     "node-gyp": {
9785 9785
       "version": "7.1.2",
9786
-      "resolved": "https://registry.npm.taobao.org/node-gyp/download/node-gyp-7.1.2.tgz?cache=0&sync_timestamp=1602898543148&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-gyp%2Fdownload%2Fnode-gyp-7.1.2.tgz",
9786
+      "resolved": "https://registry.npm.taobao.org/node-gyp/download/node-gyp-7.1.2.tgz?cache=0&sync_timestamp=1602898478735&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-gyp%2Fdownload%2Fnode-gyp-7.1.2.tgz",
9787 9787
       "integrity": "sha1-IagQrrsYcSAlHDvOyXmvFYexiK4=",
9788 9788
       "requires": {
9789 9789
         "env-paths": "^2.2.0",
@@ -9808,7 +9808,7 @@
9808 9808
         },
9809 9809
         "rimraf": {
9810 9810
           "version": "3.0.2",
9811
-          "resolved": "https://registry.npm.taobao.org/rimraf/download/rimraf-3.0.2.tgz",
9811
+          "resolved": "https://registry.npm.taobao.org/rimraf/download/rimraf-3.0.2.tgz?cache=0&sync_timestamp=1581229865753&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Frimraf%2Fdownload%2Frimraf-3.0.2.tgz",
9812 9812
           "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=",
9813 9813
           "requires": {
9814 9814
             "glob": "^7.1.3"
@@ -9880,7 +9880,7 @@
9880 9880
     },
9881 9881
     "node-sass": {
9882 9882
       "version": "5.0.0",
9883
-      "resolved": "https://registry.npm.taobao.org/node-sass/download/node-sass-5.0.0.tgz?cache=0&sync_timestamp=1604150619472&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-sass%2Fdownload%2Fnode-sass-5.0.0.tgz",
9883
+      "resolved": "https://registry.npm.taobao.org/node-sass/download/node-sass-5.0.0.tgz?cache=0&sync_timestamp=1604150672615&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-sass%2Fdownload%2Fnode-sass-5.0.0.tgz",
9884 9884
       "integrity": "sha1-To85++87rI0txy6+O1OXEYg6eNI=",
9885 9885
       "requires": {
9886 9886
         "async-foreach": "^0.1.3",
@@ -9903,12 +9903,12 @@
9903 9903
       "dependencies": {
9904 9904
         "ansi-styles": {
9905 9905
           "version": "2.2.1",
9906
-          "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz?cache=0&sync_timestamp=1606792266928&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-2.2.1.tgz",
9906
+          "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz?cache=0&sync_timestamp=1606792371412&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-2.2.1.tgz",
9907 9907
           "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
9908 9908
         },
9909 9909
         "chalk": {
9910 9910
           "version": "1.1.3",
9911
-          "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz?cache=0&sync_timestamp=1591687028262&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-1.1.3.tgz",
9911
+          "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz?cache=0&sync_timestamp=1592843133653&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-1.1.3.tgz",
9912 9912
           "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
9913 9913
           "requires": {
9914 9914
             "ansi-styles": "^2.2.1",
@@ -9920,14 +9920,14 @@
9920 9920
         },
9921 9921
         "supports-color": {
9922 9922
           "version": "2.0.0",
9923
-          "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz?cache=0&sync_timestamp=1606205060845&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-2.0.0.tgz",
9923
+          "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz?cache=0&sync_timestamp=1606205080621&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-2.0.0.tgz",
9924 9924
           "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
9925 9925
         }
9926 9926
       }
9927 9927
     },
9928 9928
     "nopt": {
9929 9929
       "version": "5.0.0",
9930
-      "resolved": "https://registry.npm.taobao.org/nopt/download/nopt-5.0.0.tgz?cache=0&sync_timestamp=1597654519967&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnopt%2Fdownload%2Fnopt-5.0.0.tgz",
9930
+      "resolved": "https://registry.npm.taobao.org/nopt/download/nopt-5.0.0.tgz?cache=0&sync_timestamp=1597649892953&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnopt%2Fdownload%2Fnopt-5.0.0.tgz",
9931 9931
       "integrity": "sha1-UwlCu1ilEvzK/lP+IQ8TolNV3Ig=",
9932 9932
       "requires": {
9933 9933
         "abbrev": "1"
@@ -10018,7 +10018,7 @@
10018 10018
     },
10019 10019
     "number-is-nan": {
10020 10020
       "version": "1.0.1",
10021
-      "resolved": "https://registry.npm.taobao.org/number-is-nan/download/number-is-nan-1.0.1.tgz?cache=0&sync_timestamp=1581061498787&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnumber-is-nan%2Fdownload%2Fnumber-is-nan-1.0.1.tgz",
10021
+      "resolved": "https://registry.npm.taobao.org/number-is-nan/download/number-is-nan-1.0.1.tgz?cache=0&sync_timestamp=1581061562193&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnumber-is-nan%2Fdownload%2Fnumber-is-nan-1.0.1.tgz",
10022 10022
       "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
10023 10023
     },
10024 10024
     "nwsapi": {
@@ -11484,7 +11484,7 @@
11484 11484
     },
11485 11485
     "read-pkg": {
11486 11486
       "version": "1.1.0",
11487
-      "resolved": "https://registry.npm.taobao.org/read-pkg/download/read-pkg-1.1.0.tgz",
11487
+      "resolved": "https://registry.npm.taobao.org/read-pkg/download/read-pkg-1.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fread-pkg%2Fdownload%2Fread-pkg-1.1.0.tgz",
11488 11488
       "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
11489 11489
       "requires": {
11490 11490
         "load-json-file": "^1.0.0",
@@ -11504,7 +11504,7 @@
11504 11504
         },
11505 11505
         "pify": {
11506 11506
           "version": "2.3.0",
11507
-          "resolved": "https://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz?cache=0&sync_timestamp=1593529716831&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpify%2Fdownload%2Fpify-2.3.0.tgz",
11507
+          "resolved": "https://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz",
11508 11508
           "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
11509 11509
         }
11510 11510
       }
@@ -11520,7 +11520,7 @@
11520 11520
       "dependencies": {
11521 11521
         "find-up": {
11522 11522
           "version": "1.1.2",
11523
-          "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-1.1.2.tgz?cache=0&sync_timestamp=1597169882796&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffind-up%2Fdownload%2Ffind-up-1.1.2.tgz",
11523
+          "resolved": "https://registry.npm.taobao.org/find-up/download/find-up-1.1.2.tgz?cache=0&sync_timestamp=1597169884679&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffind-up%2Fdownload%2Ffind-up-1.1.2.tgz",
11524 11524
           "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
11525 11525
           "requires": {
11526 11526
             "path-exists": "^2.0.0",
@@ -12914,7 +12914,7 @@
12914 12914
     },
12915 12915
     "string-width": {
12916 12916
       "version": "1.0.2",
12917
-      "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz",
12917
+      "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz?cache=0&sync_timestamp=1573488535785&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring-width%2Fdownload%2Fstring-width-1.0.2.tgz",
12918 12918
       "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
12919 12919
       "requires": {
12920 12920
         "code-point-at": "^1.0.0",
@@ -13766,7 +13766,7 @@
13766 13766
     },
13767 13767
     "tar": {
13768 13768
       "version": "6.0.5",
13769
-      "resolved": "https://registry.npm.taobao.org/tar/download/tar-6.0.5.tgz",
13769
+      "resolved": "https://registry.npm.taobao.org/tar/download/tar-6.0.5.tgz?cache=0&sync_timestamp=1597445351863&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftar%2Fdownload%2Ftar-6.0.5.tgz",
13770 13770
       "integrity": "sha1-vegVCG4Qs58dzSmOidWW4VNeIA8=",
13771 13771
       "requires": {
13772 13772
         "chownr": "^2.0.0",

+ 43
- 43
project.config.json Vedi File

@@ -1,45 +1,45 @@
1 1
 {
2
-  "miniprogramRoot": "dist/",
3
-  "projectname": "miniapp",
4
-  "description": "",
5
-  "appid": "wxf2956bfef9daf0ae",
6
-  "setting": {
7
-    "urlCheck": true,
8
-    "es6": false,
9
-    "enhance": false,
10
-    "postcss": false,
11
-    "preloadBackgroundData": false,
12
-    "minified": false,
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
-    "useMultiFrameRuntime": false,
25
-    "useApiHook": true,
26
-    "babelSetting": {
27
-      "ignore": [],
28
-      "disablePlugins": [],
29
-      "outputPath": ""
30
-    },
31
-    "enableEngineNative": false,
32
-    "bundle": false,
33
-    "useIsolateContext": true,
34
-    "useCompilerModule": false,
35
-    "userConfirmedUseCompilerModuleSwitch": false,
36
-    "userConfirmedBundleSwitch": false,
37
-    "packNpmManually": false,
38
-    "packNpmRelationList": [],
39
-    "minifyWXSS": true
40
-  },
41
-  "compileType": "miniprogram",
42
-  "simulatorType": "wechat",
43
-  "simulatorPluginLibVersion": {},
44
-  "condition": {}
2
+	"miniprogramRoot": "dist/",
3
+	"projectname": "miniapp",
4
+	"description": "",
5
+	"appid": "wxf2956bfef9daf0ae",
6
+	"setting": {
7
+		"urlCheck": true,
8
+		"scopeDataCheck": false,
9
+		"coverView": true,
10
+		"es6": false,
11
+		"postcss": false,
12
+		"compileHotReLoad": false,
13
+		"preloadBackgroundData": false,
14
+		"minified": false,
15
+		"autoAudits": false,
16
+		"newFeature": false,
17
+		"uglifyFileName": false,
18
+		"uploadWithSourceMap": true,
19
+		"useIsolateContext": true,
20
+		"nodeModules": false,
21
+		"enhance": false,
22
+		"useCompilerModule": false,
23
+		"userConfirmedUseCompilerModuleSwitch": false,
24
+		"showShadowRootInWxmlPanel": true,
25
+		"checkInvalidKey": true,
26
+		"checkSiteMap": true,
27
+		"useMultiFrameRuntime": false,
28
+		"useApiHook": true,
29
+		"babelSetting": {
30
+			"ignore": [],
31
+			"disablePlugins": [],
32
+			"outputPath": ""
33
+		},
34
+		"enableEngineNative": false,
35
+		"bundle": false,
36
+		"userConfirmedBundleSwitch": false,
37
+		"packNpmManually": false,
38
+		"packNpmRelationList": [],
39
+		"minifyWXSS": true
40
+	},
41
+	"compileType": "miniprogram",
42
+	"simulatorType": "wechat",
43
+	"simulatorPluginLibVersion": {},
44
+	"condition": {}
45 45
 }

+ 2
- 1
src/pages/FuLi/ShangPinXiangQing/index.config.js Vedi File

@@ -1,3 +1,4 @@
1 1
 export default {
2
-  navigationBarTitleText: '商品详情'
2
+  navigationBarTitleText: '商品详情',
3
+  enableShareAppMessage: true
3 4
 }

+ 9
- 0
src/pages/FuLi/ShangPinXiangQing/index.jsx Vedi File

@@ -3,6 +3,7 @@ import Taro, { Current } from '@tarojs/taro'
3 3
 import request, { apis } from '@/utils/request'
4 4
 import { useModel } from '@/store'
5 5
 import Page from '@/layouts'
6
+import { getShareObject } from '@/utils/share.js'
6 7
 import '@/assets/css/reset.less'
7 8
 import '@/assets/css/iconfont.less'
8 9
 import './index.less'
@@ -13,6 +14,14 @@ export default function ShangPinXiangQing () {
13 14
   const [CurrnetId] = useState(Current.router.params.id) // 当前id
14 15
   const [GoodsDetail, setGoodsDetail] = useState(null) // 商品详情
15 16
 
17
+  Taro.useShareAppMessage(() => {
18
+    return getShareObject({
19
+      title: GoodsDetail.goodsName,
20
+      id: CurrnetId,
21
+      image: GoodsDetail.imgUrl
22
+    }, user)
23
+  })
24
+
16 25
   useEffect(() => {
17 26
     Init()
18 27
   }, [])

+ 2
- 1
src/pages/HuoDong/HuoDongDetail/index.config.js Vedi File

@@ -1,3 +1,4 @@
1 1
 export default {
2
-  navigationBarTitleText: '活动详情'
2
+  navigationBarTitleText: '活动详情',
3
+  enableShareAppMessage: true
3 4
 }

+ 9
- 0
src/pages/HuoDong/HuoDongDetail/index.jsx Vedi File

@@ -5,6 +5,7 @@ import request, { apis } from '@/utils/request'
5 5
 import { useModel } from '@/store'
6 6
 import Page from '@/layouts'
7 7
 import toolclass from '@/utils/toolclass.js'
8
+import { getShareObject } from '@/utils/share.js'
8 9
 import '@/assets/css/reset.less'
9 10
 import '@/assets/css/iconfont.less'
10 11
 import './index.less'
@@ -20,6 +21,14 @@ export default function HuoDongDetail () {
20 21
   const [CurrnetHuoDongId] = useState(Current.router.params.id) // 当前活动id
21 22
   const [ActivityDetail, setActivityDetail] = useState(null) // 活动详情
22 23
 
24
+  Taro.useShareAppMessage(() => {
25
+    return getShareObject({
26
+      title: ActivityDetail.title,
27
+      id: CurrnetHuoDongId,
28
+      image: ActivityDetail.imgUrl
29
+    }, user)
30
+  })
31
+
23 32
   useEffect(() => {
24 33
     GetActivityDetail()
25 34
   }, [CurrnetHuoDongId])

+ 2
- 1
src/pages/HuoDong/ZiXunDetail/index.config.js Vedi File

@@ -1,3 +1,4 @@
1 1
 export default {
2
-  navigationBarTitleText: '资讯详情'
2
+  navigationBarTitleText: '资讯详情',
3
+  enableShareAppMessage: true
3 4
 }

+ 12
- 1
src/pages/HuoDong/ZiXunDetail/index.jsx Vedi File

@@ -4,15 +4,26 @@ import request, { apis } from '@/utils/request'
4 4
 import { RichText } from '@tarojs/components'
5 5
 import toolclass from '@/utils/toolclass.js'
6 6
 import Page from '@/layouts'
7
+import { useModel } from '@/store'
8
+import { getShareObject } from '@/utils/share.js'
7 9
 import '@/assets/css/reset.less'
8 10
 import '@/assets/css/iconfont.less'
9 11
 import './index.less'
10 12
 
11
-export default function ZiXunDetail (props) {
13
+export default function ZiXunDetail () {
12 14
 
15
+  const { user } = useModel('user')
13 16
   const [CurrnetZiXunId] = useState(Current.router.params.id) // 当前查询资讯id
14 17
   const [NewsDetail, setNewsDetail] = useState(null) // 资讯详情
15 18
 
19
+  Taro.useShareAppMessage(() => {
20
+    return getShareObject({
21
+      title: NewsDetail.newsName,
22
+      id: CurrnetZiXunId,
23
+      image: NewsDetail.newsImg
24
+    }, user)
25
+  })
26
+
16 27
   useEffect(() => {
17 28
     GetNewsDetail()
18 29
   }, [CurrnetZiXunId])

+ 2
- 1
src/pages/WuYe/BaoXiuDetail/index.config.js Vedi File

@@ -1,3 +1,4 @@
1 1
 export default {
2
-  navigationBarTitleText: '报修详情'
2
+  navigationBarTitleText: '报修详情',
3
+  enableShareAppMessage: true
3 4
 }

+ 10
- 1
src/pages/WuYe/BaoXiuDetail/index.jsx Vedi File

@@ -5,6 +5,7 @@ import { useModel } from '@/store'
5 5
 import toolclass from '@/utils/toolclass.js'
6 6
 import SlidePopup from '@/components/SlidePopup/index'
7 7
 import Page from '@/layouts'
8
+import { getShareObject } from '@/utils/share.js'
8 9
 import '@/assets/css/reset.less'
9 10
 import '@/assets/css/iconfont.less'
10 11
 import './index.less'
@@ -12,11 +13,19 @@ import './index.less'
12 13
 export default function BaoXiuDetail () {
13 14
 
14 15
   const { user } = useModel('user')
15
-  const CurrnetBaoXiuId = Current.router.params.id
16
+  const [CurrnetBaoXiuId] = useState(Current.router.params.id)
16 17
   const [DetailInfo, setDetailInfo] = useState(null)
17 18
   const [PhoneList, setPhoneList] = useState([])
18 19
   const [ShowPopup, setShowPopup] = useState(false)
19 20
 
21
+  Taro.useShareAppMessage(() => {
22
+    return getShareObject({
23
+      title: DetailInfo.ticketTitle,
24
+      id: CurrnetBaoXiuId,
25
+      image: null
26
+    }, user)
27
+  })
28
+
20 29
   useEffect(() => {
21 30
     Init()
22 31
   }, [])

+ 2
- 1
src/pages/WuYe/FuWuDetail/index.config.js Vedi File

@@ -1,3 +1,4 @@
1 1
 export default {
2
-  navigationBarTitleText: '服务详情'
2
+  navigationBarTitleText: '服务详情',
3
+  enableShareAppMessage: true
3 4
 }

+ 11
- 0
src/pages/WuYe/FuWuDetail/index.jsx Vedi File

@@ -4,15 +4,26 @@ import { RichText } from '@tarojs/components'
4 4
 import request, { apis } from '@/utils/request'
5 5
 import toolclass from '@/utils/toolclass.js'
6 6
 import Page from '@/layouts'
7
+import { useModel } from '@/store'
8
+import { getShareObject } from '@/utils/share.js'
7 9
 import '@/assets/css/reset.less'
8 10
 import '@/assets/css/iconfont.less'
9 11
 import './index.less'
10 12
 
11 13
 export default function WuYeFuWuDetail () {
12 14
 
15
+  const { user } = useModel('user')
13 16
   const [CurrnetId] = useState(Current.router.params.id) // 当前id
14 17
   const [DetailInfo, setDetailInfo] = useState(null) // 详情
15 18
 
19
+  Taro.useShareAppMessage(() => {
20
+    return getShareObject({
21
+      title: DetailInfo.newsName,
22
+      id: CurrnetId,
23
+      image: DetailInfo.newsImg
24
+    }, user)
25
+  })
26
+
16 27
   useEffect(() => {
17 28
     GetDetail()
18 29
   }, [CurrnetId])

+ 2
- 1
src/pages/WuYe/GongGaoDetail/index.config.js Vedi File

@@ -1,3 +1,4 @@
1 1
 export default {
2
-  navigationBarTitleText: '公告详情'
2
+  navigationBarTitleText: '公告详情',
3
+  enableShareAppMessage: true
3 4
 }

+ 9
- 0
src/pages/WuYe/GongGaoDetail/index.jsx Vedi File

@@ -5,6 +5,7 @@ import { RichText } from '@tarojs/components'
5 5
 import { useModel } from '@/store'
6 6
 import toolclass from '@/utils/toolclass.js'
7 7
 import Page from '@/layouts'
8
+import { getShareObject } from '@/utils/share.js'
8 9
 import '@/assets/css/reset.less'
9 10
 import '@/assets/css/iconfont.less'
10 11
 import './index.less'
@@ -15,6 +16,14 @@ export default function WuYeGongGaoDetail () {
15 16
   const [CurrnetId] = useState(Current.router.params.id)
16 17
   const [DetailInfo, setDetailInfo] = useState(null)
17 18
 
19
+  Taro.useShareAppMessage(() => {
20
+    return getShareObject({
21
+      title: DetailInfo.announcementTitle,
22
+      id: CurrnetId,
23
+      image: DetailInfo.announcementCarouselImg
24
+    }, user)
25
+  })
26
+
18 27
   useEffect(() => {
19 28
     Init()
20 29
   }, [CurrnetId])

+ 2
- 1
src/utils/share.js Vedi File

@@ -13,6 +13,7 @@ import { getPage } from '.'
13 13
  * @param {*} user 
14 14
  */
15 15
 export function getShareObject(params, user) {
16
+  console.log(user, `user`)
16 17
   const router = getCurrentInstance().router
17 18
   const page = getPage() || {}
18 19
   const { title, image, targetId, ...leftParams } = params || {}
@@ -27,7 +28,7 @@ export function getShareObject(params, user) {
27 28
     event,
28 29
     eventType,
29 30
     targetId,
30
-  })
31
+  }, user)
31 32
 
32 33
   // 理论上 queryString 需要做 encodeURIComponent 处理
33 34
   const queryString = [