Переглянути джерело

2.2.2版本,添加新用户来源渠道

Rorschach 5 роки тому
батько
коміт
5227929f50

+ 6 - 1
README.md

@@ -32,4 +32,9 @@ https://mp.weixin.qq.com/
 ├── app.json                     
 ├── app.wxss
 └── package.json
-```
+```
+
+###版本分析
+- 2.0.0: 2.0大版本迭代
+- 2.2.1: 文字超出更改
+- 2.2.2: 添加新用户来源渠道

+ 1 - 1
pages/groupPage/group-details/group-details.js

@@ -339,7 +339,7 @@ Page({
 
       }
     }, (error) => {
-      
+      wx.setStorageSync('userSourseType','group')
       this.setData({
         hide: !this.data.hide,
         onLoadOption: options

+ 2 - 0
pages/index/index.js

@@ -167,6 +167,8 @@ Page({
       hotInit(this)
     }, (error) => {
       // console.log(error)
+
+      wx.setStorageSync('userSourseType','normal')
       this.setData({
         hide: !this.data.hide
       })

+ 3 - 0
pages/main/class/class.wxss

@@ -181,6 +181,9 @@ height:106rpx;
     height: 44rpx;
     color: #444;
     font-size: 32rpx;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
 }
 
 .workCard .time {

+ 1 - 1
pages/main/reading/reading.js

@@ -276,7 +276,7 @@ Page({
         })
         const recordSource = this.data.recordSource;
         wx.uploadFile({
-            url: 'https://reader.lingjiao.cn/readerBase/file/upload',
+            url: 'https://readertest.lingjiao.cn/readerBase/file/upload',
             filePath: recordSource,
             name: '朗读录音',
             header: {

+ 1 - 0
pages/social/works/works.js

@@ -99,6 +99,7 @@ Page({
             })
             
         }, (error) => {
+            wx.setStorageSync('userSourseType','reading')
             this.setData({
                 hide: !this.data.hide,
                 onLoadOption: option

+ 1 - 1
pages/social/works/works.wxml

@@ -48,7 +48,7 @@
                 <text class="time">{{item.time}}</text>
                 <view class="gut">
                     <text class="gutInGut">{{item.text}}</text>
-                    <text wx:if="{{item.text.length >=10}}" class="whole" bindtap="goToDetail" data-id="{{item.id}}">全文</text>
+                    <text wx:if="{{item.text.length >=22}}" class="whole" bindtap="goToDetail" data-id="{{item.id}}">全文</text>
                 </view>
                 <view class="commentAll" bindtap="goToDetail" data-id="{{item.id}}" wx:if="{{item.replyCount}}">
                     <text>共有{{item.replyCount}}条评论</text>

+ 17 - 8
pages/social/works/works.wxss

@@ -113,7 +113,7 @@
 
     to {
         bottom: 200rpx;
-        font-size:50rpx;
+        font-size: 50rpx;
         opacity: 0;
     }
 }
@@ -316,6 +316,10 @@
     font-size: 32rpx;
     color: #414141;
     /* font-family: PingFangSC-Regular; */
+    width: 359rpx;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
 }
 
 .commentItem .time {
@@ -328,7 +332,7 @@
 .commentItem .gut {
     margin-top: 12rpx;
     width: 520rpx;
-    height: 44rpx;
+    height: 83rpx;
     font-size: 32rpx;
     color: #414141;
     display: flex;
@@ -337,15 +341,20 @@
 }
 
 .commentItem .gut .gutInGut {
-    width: 330rpx;
+    width: 417rpx;
     overflow: hidden;
     text-overflow: ellipsis;
-    white-space: nowrap;
-    display: block
+    /* white-space: nowrap; */
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
 }
 
 .whole {
-    color: #61ca54
+    color: #61ca54;
+    margin-left: 12rpx;
+    margin-top: 38rpx;
+
 }
 
 .commentItem .commentAll {
@@ -359,8 +368,8 @@
 
 .commentItem .btnWrapper {
     position: absolute;
-    top: 10rpx;
-    right: 0;
+    top: 19rpx;
+    right: -8rpx;
     display: flex;
     align-items: center;
     /* width: 200rpx; */

+ 19 - 4
project.config.json

@@ -36,7 +36,7 @@
 			"list": []
 		},
 		"miniprogram": {
-			"current": 1,
+			"current": 4,
 			"list": [
 				{
 					"id": -1,
@@ -52,11 +52,26 @@
 					"scene": "1012"
 				},
 				{
-					"id": 4,
+					"id": 2,
 					"name": "分享团",
 					"pathName": "pages/groupPage/group-details/group-details",
-					"query": "share=true&shareId=1548058015816289",
-					"scene": "1012"
+					"query": "productId=1550459447432909",
+					"scene": 1012
+				},
+				{
+					"id": -1,
+					"name": "公众号进入",
+					"pathName": "pages/index/index",
+					"query": "",
+					"scene": 1020,
+					"referrerInfo": {}
+				},
+				{
+					"id": -1,
+					"name": "公众号文章进入",
+					"pathName": "pages/index/index",
+					"query": "",
+					"scene": 1058
 				}
 			]
 		}

+ 17 - 2
utils/httpUtil.js

@@ -41,7 +41,7 @@ function userLoginRecord(uid) {
         let url = genAPIUrl('wx/loginLog');
         return request.getInstance().header({
             uid: wx.getStorageSync('uid')
-        }).method('POST').url(url).send().success(()=>{}).fail(()=>{});
+        }).method('POST').url(url).send().success(() => {}).fail(() => {});
     }
 
 }
@@ -54,10 +54,25 @@ function getLoginSchedule(sessionKey, openId, successcallback, failcallback) {
                 withCredentials: true,
                 success: function (res) {
                     let url = genAPIUrl('wx/user/loginRegist');
+                    let appLaunch = wx.getLaunchOptionsSync();
+                    let userSourseType = '';
+                    console.log(appLaunch.scene)
+                    switch (appLaunch.scene) {
+                        case 1020:
+                            userSourseType = 'profile';
+                            break;
+                        case 1058:
+                            userSourseType = 'article';
+                            break;
+                        default:
+                            userSourseType = wx.getStorageSync('userSourseType');
+                            break;
+                    }
                     const userData = {
                         encryptedData: res.encryptedData,
                         sessionKey: sessionKey,
-                        iv: res.iv
+                        iv: res.iv,
+                        sourceType: userSourseType
                     }
                     request.getInstance().url(url).header({
                         "content-type": "application/x-www-form-urlencoded; charset=UTF-8"