xujing hace 5 años
padre
commit
512c3f7b70

+ 4
- 4
config/dev.js Ver fichero

@@ -5,12 +5,12 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://47.101.36.130:8085"',//测试
7 7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8
-    // HOST: '"https://dev.jinchengjiaye.com"',//测试
9
-    // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
8
+    HOST: '"https://dev.jinchengjiaye.com"',//测试
9
+    WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10 10
     // HOST: '"https://lt.pawoma.cn"',
11 11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12
-    HOST: '"http://192.168.2.51:8080"',
13
-    WSS_HOST: '"ws://192.168.2.51:8080"',
12
+    // HOST: '"http://192.168.2.51:8080"',
13
+    // WSS_HOST: '"ws://192.168.2.51:8080"',
14 14
     Version: 'V3.5.6'
15 15
   },
16 16
   weapp: {},

+ 2
- 1
src/app.js Ver fichero

@@ -108,7 +108,8 @@ class App extends Component {
108 108
     ],
109 109
     window: {
110 110
       backgroundTextStyle: 'light',
111
-      navigationBarBackgroundColor: '#BB9C79',
111
+      navigationBarBackgroundColor: '#E31F05',
112
+      // navigationBarBackgroundColor: '#BB9C79',
112 113
       navigationBarTitleText: '橙蕉',
113 114
       navigationBarTextStyle: 'white',
114 115
 

+ 13
- 6
src/pages/person/myShare/index.js Ver fichero

@@ -88,9 +88,16 @@ export default class Person extends Taro.Component {
88 88
   }
89 89
 
90 90
   handleItemClick(item) {
91
-    Taro.navigateTo({
92
-      url: `/pages/person/myShare/accessRecord?targetId=${item.targetId}&eventType=${item.eventType}` 
93
-    })
91
+    if (item.eventType == "project") {
92
+      Taro.navigateTo({
93
+        url: `/pages/person/myShare/accessRecord?targetId=${item.targetId}&eventType=building`
94
+      })
95
+    } else {
96
+      Taro.navigateTo({
97
+        url: `/pages/person/myShare/accessRecord?targetId=${item.targetId}&eventType=${item.eventType}`
98
+      })
99
+    }
100
+
94 101
   }
95 102
 
96 103
   render() {
@@ -109,18 +116,18 @@ export default class Person extends Taro.Component {
109 116
           {
110 117
             recordList.map(item => (
111 118
               <View className="share-item" key={item.targetId + 'share'} onClick={this.handleItemClick.bind(this, item)}>
112
-                <Image className="img" mode="aspectFill"  src={transferImage(item.activityImg || emptyImg)}></Image>
119
+                <Image className="img" mode="aspectFill" src={transferImage(item.activityImg || emptyImg)}></Image>
113 120
                 <View className={item.eventType == 'project' ? 'building' : 'name'}>{item.activityName || ''}</View>
114 121
                 {item.eventType == 'project' && <View className="price"> {item.price ? '均价' + item.price + '元/m²' : '暂无均价'} </View>}
115 122
 
116 123
                 {item.eventType == 'h5' && <View className="num"> {item.drainageShareNum || '0'}人查看了分享 </View>}
117
-                {item.eventType == 'project' && <View className="num"> {item.projectNum || '0'}人查看了分享 </View>}
124
+                {item.eventType == 'project' && <View className="num"> {item.buildingNum || '0'}人查看了分享 </View>}
118 125
                 {item.eventType == 'group' && <View className="num"> {item.groupActivityShareNum || '0'}人查看了分享 </View>}
119 126
                 {item.eventType == 'help' && <View className="num"> {item.helpActivityShareNum || '0'}人查看了分享 </View>}
120 127
                 {item.eventType == 'activity' && <View className="num"> {item.activityShareNum || '0'}人查看了分享 </View>}
121 128
                 {item.eventType == 'news' && <View className="num"> {item.newsNum || '0'}人查看了分享 </View>}
122 129
 
123
-                {item.eventType == 'building' && <View className="address"> {item.address || ''} </View>}
130
+                {item.eventType == 'project' && <View className="address"> {item.address || ''} </View>}
124 131
               </View>
125 132
             ))
126 133
           }

+ 5
- 3
src/pages/person/spread/index.js Ver fichero

@@ -5,6 +5,7 @@ import { queryUserInfo } from '@/services/user'
5 5
 import { getMiniQrcode } from '@/services/common'
6 6
 import Poster from './poster'
7 7
 import { ROLE_CODE } from '@/constants/user'
8
+import rtLog from '@/utils/rtLog'
8 9
 @connect(
9 10
   ({ user }) => ({ ...user })
10 11
 )
@@ -36,6 +37,7 @@ export default class Index extends Component {
36 37
       }
37 38
 
38 39
       getMiniQrcode(payload).then(qrcode => {
40
+        rtLog.error(qrcode, "qrcodeqrcodeqrcodeqrcodeqrcodeqrcode")
39 41
         let data = {
40 42
           qrcode,//小程序二维码
41 43
           nickname,//访问者名字
@@ -53,9 +55,9 @@ export default class Index extends Component {
53 55
   // 开始生成海报
54 56
   toggleVisiblePoster = (flag) => {
55 57
     if (flag) {
56
-      console.log(flag,"flagflagflagflag,true")
58
+      rtLog.error(flag, "flagflagflagflag,true")
57 59
       this.getPosterData().then(posterData => {
58
-        console.log(posterData,"posterDataposterDataposterDataposterDataposterData")
60
+        rtLog.error(posterData,"posterDataposterDataposterDataposterDataposterData")
59 61
         this.setState({
60 62
           makePosterStatus: !!flag,
61 63
           posterData,
@@ -63,7 +65,7 @@ export default class Index extends Component {
63 65
         })
64 66
       })
65 67
     } else {
66
-      console.log(flag,"flagflagflagflag,false")
68
+      rtLog.error(flag,"flagflagflagflag,false")
67 69
       this.setState({
68 70
         makePosterStatus: !!flag
69 71
       })

+ 19
- 17
src/pages/person/spread/poster.js Ver fichero

@@ -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 rtLog from '@/utils/rtLog'
4 5
 /**
5 6
  * 文档参考
6 7
  * http://taro-ext.jd.com/plugin/view/5d23051670a0f46a87c9785b
@@ -34,38 +35,38 @@ export default class Index extends Component {
34 35
     const texts = [
35 36
 
36 37
       {
37
-        x:120,
38
+        x: 120,
38 39
         y: 90,
39 40
         text: data.nickname,
40
-        fontSize:28,
41
+        fontSize: 28,
41 42
         color: '#000',
42 43
         baseLine: 'middle',
43 44
         lineHeight: 48,
44 45
         width: 200,
45 46
       },
46 47
       {
47
-        x:250,
48
+        x: 250,
48 49
         y: 580,
49 50
         text: data.tip,
50
-        fontSize:20,
51
+        fontSize: 20,
51 52
         color: '#999999',
52 53
         baseLine: 'middle',
53 54
         lineHeight: 48,
54 55
         width: 500,
55
-        textAlign:'center'
56
+        textAlign: 'center'
56 57
       },
57
-     
58
+
58 59
     ]
59 60
     const images = [
60
-      
61
+
61 62
       {
62 63
         url: data.avatarurl || require('@/assets/default-avatar.png'),
63 64
         width: 90,
64 65
         height: 90,
65 66
         y: 30,
66 67
         x: 20,
67
-        borderWidth:1,
68
-        borderRadius:20,
68
+        borderWidth: 1,
69
+        borderRadius: 20,
69 70
       },
70 71
       {
71 72
         url: data.qrcode,
@@ -77,16 +78,16 @@ export default class Index extends Component {
77 78
     ]
78 79
     const blocks = [
79 80
       {
80
-        x:300,
81
+        x: 300,
81 82
         y: 100,
82 83
         color: '#fff',
83 84
         baseLine: 'middle',
84 85
         lineHeight: 48,
85 86
         width: 500,
86
-        height:530
87
+        height: 530
87 88
       },
88 89
     ]
89
-    const config = Object.assign(basicConfig, {images, texts,blocks })
90
+    const config = Object.assign(basicConfig, { images, texts, blocks })
90 91
     this.setState({
91 92
       config,
92 93
       canvasStatus: true
@@ -94,11 +95,12 @@ export default class Index extends Component {
94 95
   }
95 96
 
96 97
   onCreateSuccess = (result) => {
97
-    console.log(result,"生成图片resultresultresultresult")
98
+    rtLog.error(result, "==================================")
99
+    console.log(result, "生成图片resultresultresultresult")
98 100
     const { tempFilePath, errMsg } = result;
99 101
     Taro.hideLoading();
100 102
     if (errMsg === 'canvasToTempFilePath:ok') {
101
-      
103
+
102 104
       this.setState({
103 105
         shareImage: tempFilePath,
104 106
         // 重置 TaroCanvasDrawer 状态,方便下一次调用
@@ -107,13 +109,13 @@ export default class Index extends Component {
107 109
       })
108 110
       Taro.saveImageToPhotosAlbum({
109 111
         filePath: tempFilePath,
110
-        success:function(res){
112
+        success: function (res) {
111 113
           Taro.showToast({
112 114
             title: '已保存到相册',
113 115
             icon: 'success',
114 116
             duration: 2000,
115 117
           });
116
-        },fail:function(){
118
+        }, fail: function () {
117 119
           Taro.showToast({
118 120
             title: '保存失败,请打开相册权限',
119 121
             icon: 'none',
@@ -131,7 +133,7 @@ export default class Index extends Component {
131 133
       Taro.showToast({ icon: 'none', title: errMsg || '出现错误' });
132 134
       console.log(errMsg);
133 135
     }
134
-    
136
+
135 137
 
136 138
     // 预览
137 139
     // Taro.previewImage({