xujing 5 anos atrás
pai
commit
9bb7f938ac

+ 3
- 2
src/pages/activity/detail/poster.js Ver arquivo

@@ -1,6 +1,7 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import { TaroCanvasDrawer } from '@/components/taro-plugin-canvas';
3 3
 import dayjs from 'dayjs'
4
+import { getDownloadURL } from '@/utils/tools'
4 5
 import './poster.scss'
5 6
 /**
6 7
  * 文档参考
@@ -76,7 +77,7 @@ export default class Index extends Component {
76 77
       {
77 78
         x: 30,
78 79
         y: 890,
79
-        text: data.posterDescription||'活动描述',
80
+        text: data.posterDescription || '活动描述',
80 81
         fontSize: 28,
81 82
         color: '#999',
82 83
         baseLine: 'middle',
@@ -147,7 +148,7 @@ export default class Index extends Component {
147 148
         zIndex: 999
148 149
       },
149 150
       {
150
-        url: data.avatarurl || require('@/assets/default-avatar.png'),
151
+        url: getDownloadURL(data.avatarurl, 'avatar') || require('@/assets/default-avatar.png'),
151 152
         width: 130,
152 153
         height: 130,
153 154
         y: 630,

+ 2
- 1
src/pages/news/detail/poster.js Ver arquivo

@@ -1,5 +1,6 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import { TaroCanvasDrawer } from '@/components/taro-plugin-canvas';
3
+import { getDownloadURL } from '@/utils/tools'
3 4
 import dayjs from 'dayjs'
4 5
 import './poster.scss'
5 6
 /**
@@ -147,7 +148,7 @@ export default class Index extends Component {
147 148
         zIndex: 999
148 149
       },
149 150
       {
150
-        url: data.avatarurl || require('@/assets/default-avatar.png'),
151
+        url: getDownloadURL(data.avatarurl, 'avatar')  || require('@/assets/default-avatar.png'),
151 152
         width: 130,
152 153
         height: 130,
153 154
         y: 630,

+ 12
- 11
src/pages/policy/detail/makePoster.js Ver arquivo

@@ -1,5 +1,6 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import { TaroCanvasDrawer } from '@/components/taro-plugin-canvas';
3
+import { getDownloadURL } from '@/utils/tools'
3 4
 import dayjs from 'dayjs'
4 5
 /**
5 6
  * 文档参考
@@ -33,9 +34,9 @@ export default class Index extends Component {
33 34
     const { basicConfig } = this.state
34 35
     const texts = [
35 36
       {
36
-        x:170,
37
+        x: 170,
37 38
         y: 780,
38
-        text: data.nickname+' 邀您阅读'||'',
39
+        text: data.nickname + ' 邀您阅读' || '',
39 40
         fontSize: 28,
40 41
         color: '#666',
41 42
         baseLine: 'middle',
@@ -45,7 +46,7 @@ export default class Index extends Component {
45 46
         zIndex: 999
46 47
       },
47 48
       {
48
-        x:480,
49
+        x: 480,
49 50
         y: 780,
50 51
         text: dayjs(data.createDate).format('YYYY-MM-DD') || '',
51 52
         fontSize: 25,
@@ -57,7 +58,7 @@ export default class Index extends Component {
57 58
         zIndex: 999
58 59
       },
59 60
       {
60
-        x:110,
61
+        x: 110,
61 62
         y: 880,
62 63
         text: data.title,
63 64
         fontSize: 32,
@@ -68,7 +69,7 @@ export default class Index extends Component {
68 69
         zIndex: 999
69 70
       },
70 71
       {
71
-        x:240,
72
+        x: 240,
72 73
         y: 1000,
73 74
         text: '长按识别小程序码',
74 75
         fontSize: 26,
@@ -78,7 +79,7 @@ export default class Index extends Component {
78 79
         width: 200,
79 80
       },
80 81
       {
81
-        x:240,
82
+        x: 240,
82 83
         y: 1055,
83 84
         text: '进入',
84 85
         fontSize: 26,
@@ -88,7 +89,7 @@ export default class Index extends Component {
88 89
         width: 50,
89 90
       },
90 91
       {
91
-        x:300,
92
+        x: 300,
92 93
         y: 1055,
93 94
         text: '橙蕉',
94 95
         fontSize: 28,
@@ -98,7 +99,7 @@ export default class Index extends Component {
98 99
         width: 120,
99 100
       },
100 101
       {
101
-        x:440,
102
+        x: 440,
102 103
         y: 1055,
103 104
         text: '阅读全文',
104 105
         fontSize: 26,
@@ -124,12 +125,12 @@ export default class Index extends Component {
124 125
         x: 50
125 126
       },
126 127
       {
127
-        url: data.avatarurl || require('@/assets/default-avatar.png'),
128
+        url: getDownloadURL(data.avatarurl, 'avatar') || require('@/assets/default-avatar.png'),
128 129
         width: 130,
129 130
         height: 130,
130 131
         y: 680,
131 132
         x: 20,
132
-        borderRadius:130
133
+        borderRadius: 130
133 134
       }
134 135
     ]
135 136
     const config = Object.assign(basicConfig, { images, texts })
@@ -159,7 +160,7 @@ export default class Index extends Component {
159 160
       Taro.showToast({ icon: 'none', title: errMsg || '出现错误' });
160 161
       console.log(errMsg);
161 162
     }
162
-    
163
+
163 164
     this.props.toggleMakePosterModal(false)
164 165
 
165 166
     // 预览

+ 10
- 9
src/pages/project/detail/poster.js Ver arquivo

@@ -1,5 +1,6 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2 2
 import { TaroCanvasDrawer } from '@/components/taro-plugin-canvas';
3
+import { getDownloadURL } from '@/utils/tools'
3 4
 import dayjs from 'dayjs'
4 5
 import './poster.scss'
5 6
 /**
@@ -46,7 +47,7 @@ export default class Index extends Component {
46 47
         color: '#000',
47 48
         baseLine: 'middle',
48 49
         lineHeight: 48,
49
-        overFlow:'hidden',
50
+        overFlow: 'hidden',
50 51
         width: 240,
51 52
         zIndex: 999
52 53
       },
@@ -85,10 +86,10 @@ export default class Index extends Component {
85 86
         // textAlign: 'center',
86 87
         width: 560,
87 88
         zIndex: 999
88
-      },{
89
+      }, {
89 90
         x: 30,
90 91
         y: 746,
91
-        text: data.price ? '约'+data.price+'元/m²' : '待定',
92
+        text: data.price ? '约' + data.price + '元/m²' : '待定',
92 93
         fontSize: 36,
93 94
         color: '#FF2744',
94 95
         baseLine: 'middle',
@@ -174,7 +175,7 @@ export default class Index extends Component {
174 175
         zIndex: 999
175 176
       },
176 177
       {
177
-        url: data.avatarurl || require('@/assets/default-avatar.png'),
178
+        url: getDownloadURL(data.avatarurl, 'avatar') || require('@/assets/default-avatar.png'),
178 179
         width: 120,
179 180
         height: 120,
180 181
         y: 452,
@@ -271,11 +272,11 @@ export default class Index extends Component {
271 272
         {
272 273
           this.state.canvasStatus && (
273 274
             <View style="10rpx 0px 30rpx #dcdcdc">
274
-            <TaroCanvasDrawer
275
-              config={this.state.config}
276
-              onCreateSuccess={this.onCreateSuccess}
277
-              onCreateFail={this.onCreateFail}
278
-            />
275
+              <TaroCanvasDrawer
276
+                config={this.state.config}
277
+                onCreateSuccess={this.onCreateSuccess}
278
+                onCreateFail={this.onCreateFail}
279
+              />
279 280
             </View>
280 281
           )
281 282
         }

+ 5
- 3
src/pages/project/h5Page.js Ver arquivo

@@ -91,7 +91,7 @@ export default class Index extends Component {
91 91
         console.log(phone, "phone#########")
92 92
         // 头像手机号都有
93 93
         if (phone) {
94
-          this.reportClient()
94
+          this.reportClientFn()
95 95
           this.success()
96 96
           this.setState({
97 97
             phoneVisible: false,
@@ -307,7 +307,7 @@ export default class Index extends Component {
307 307
         ruleToast('signup-agent')
308 308
         setTimeout(() => {
309 309
           this.success()
310
-          this.reportClient()
310
+          this.reportClientFn()
311 311
           this.setState({
312 312
             phoneVisible: false,
313 313
             webViewVisible: true,
@@ -318,11 +318,13 @@ export default class Index extends Component {
318 318
   }
319 319
 
320 320
   // 报备客户
321
-  reportClient() {
321
+  reportClientFn() {
322 322
     const { codeParams } = this.state
323 323
     const consultant = this.$router.params.consultant || codeParams.consultant || ""
324 324
     const { userInfo: { person: { phone, tel, personId, userId, personType } } } = this.props
325 325
     const isConsultant = personType == ROLE_CODE['CONSULTANT']
326
+    console.log(this.$router, "this.$routerthis报备客户哈哈哈哈")
327
+    console.log(this.props.userInfo.person, "person报备客户哈哈哈哈")
326 328
 
327 329
     if (isConsultant && consultant != userId) {
328 330
       const realPhone = phone || tel