chengjie hace 6 años
padre
commit
21030b5515

+ 2 - 2
app.js

@@ -25,9 +25,9 @@ App({
25 25
     }
26 26
   },
27 27
   globalData: {
28
-    Version: "1.1.5",
28
+    Version: "1.1.7",
29 29
     IsProduction: true,
30
-    ShareTitle: "可以用来记忆一切的工具",
30
+    ShareTitle: "刻意学习,高效成长",
31 31
     SharePath: "pages/index/index",
32 32
     ShareImage: '',
33 33
     ProgramID: 166,

+ 20 - 6
pages/main/add.js

@@ -327,10 +327,14 @@ Page({
327 327
             arrResult.push(arr[i][j].ContentServer);
328 328
           }
329 329
           else {
330
-            that.uploadImage(arr[i][j].Content, function (data) {
331
-              //console.log("Target:"+data);
332
-              data = app.globalData.uploadImageUrl + data;
333
-              arrResult.push(data);
330
+            var source = arr[i][j].Content;
331
+            that.uploadImage(source, function (data) {
332
+              if (data){
333
+                data=JSON.parse(data);
334
+                var result=data.result;
335
+                result.Target = app.globalData.uploadImageUrl + result.Target;
336
+                arrResult.push(result);
337
+              }
334 338
             });
335 339
           }
336 340
           b = true;
@@ -352,6 +356,7 @@ Page({
352 356
       //console.log(arrResult.length);
353 357
       if (arrResult.length >= arrSource.length) {
354 358
         wx.hideLoading();
359
+        console.log("arrResult:" + JSON.stringify(arrResult));
355 360
 
356 361
         clearInterval(interval);
357 362
         var ari = 0;
@@ -359,7 +364,16 @@ Page({
359 364
           for (var j = 0; j < arr[i].length; j++) {
360 365
             if (arr[i][j].Type == "image" && arr[i][j].Content) {
361 366
               var tempUrl = arr[i][j].Content;
362
-              var serverUrl = arrResult[ari++];
367
+              var serverUrl = "";
368
+              for(var k=0;k<arrResult.length;k++){
369
+                if (tempUrl.indexOf(arrResult[k].Source)>=0){
370
+                  serverUrl = arrResult[k].Target;
371
+                  break;
372
+                }
373
+              }
374
+              console.log("serverUrl:" + serverUrl);
375
+              console.log("tempUrl:" + tempUrl);
376
+
363 377
               main.saveTempImage(serverUrl, tempUrl);
364 378
               arr[i][j].Content = serverUrl;
365 379
               arr[i][j].ContentServer = serverUrl;
@@ -375,7 +389,7 @@ Page({
375 389
   uploadImage: function (file, callback) {
376 390
 
377 391
 
378
-    var url = common.Encrypt("MiaoguoUploadFile");
392
+    var url = common.Encrypt("MiaoguoUploadFile2");
379 393
     wx.uploadFile({
380 394
       url: app.globalData.serverUrl + url,
381 395
       filePath: file,

+ 1 - 1
pages/main/add.wxml

@@ -3,7 +3,7 @@
3 3
     <view class="panelTopLeft FlexRow" catchtap="onSearch">
4 4
       <view class="add">+</view> 资料
5 5
     </view>
6
-    <view class='panelTopRight FlexRow' catchtap='onGotoList'>
6
+    <view class='panelTopRight FlexRow' catchtap='onGotoList' wx:if="{{UpdateType=='add' || UpdateType=='add2'}}">
7 7
       <image src='../images/universalpic_card_gray_26x26.png' class="universalpic_card_gray_26x26" />
8 8
     </view>
9 9
   </view>

+ 1 - 1
pages/main/detail.js

@@ -651,7 +651,7 @@ Page({
651 651
         }
652 652
         var speed1 = Math.round(100 * data.Count / (data.Duration / 60)) / 100;
653 653
         var speed2 = common.getMinuteSecond(Math.round(data.Duration / data.Count), true);
654
-
654
+        app.globalData.TaskToday.DayNumber=data.DayNumber;
655 655
         that.setData({
656 656
           TodayTime: duration,
657 657
           Speed1: speed1 + "张题卡",

+ 1 - 0
pages/main/detail.wxml

@@ -53,6 +53,7 @@
53 53
     </view>
54 54
 
55 55
     <view class="panelField10" style='background-color:{{Color.BackColor}};'></view>
56
+    
56 57
     <template is="CardShow" data="{{Color:Color,Field:TaskInfo.ContentNew.Field,Tags:TaskInfo.ContentNew.Tags,IsShowAnswer:IsShowAnswer,TagWidth:TaskInfo.TagWidth,FontSize:TaskInfo.FontSize}}" />
57 58
     
58 59
     <view class='footer0'></view>

+ 4 - 0
pages/main/detail.wxss

@@ -95,11 +95,14 @@
95 95
   flex-wrap: wrap;
96 96
   justify-content: flex-start;
97 97
   z-index: 5;
98
+  position: relative;
98 99
 }
99 100
 
100 101
 .panelField1 {
101 102
   width: 100%;
102 103
   justify-content: flex-start;
104
+  z-index: 5;
105
+  position: relative;
103 106
 }
104 107
 
105 108
 .panelField11 {
@@ -163,6 +166,7 @@
163 166
   width: 100%;
164 167
   justify-content: flex-start;
165 168
   z-index: 5; 
169
+  position: relative;
166 170
 }
167 171
 
168 172
 .panelField2 {

+ 5 - 1
pages/main/preview.wxss

@@ -147,12 +147,15 @@
147 147
   font-weight: 400;
148 148
   flex-wrap: wrap;
149 149
   justify-content: flex-start;
150
-  z-index: 5;
150
+  z-index: 5; 
151
+  position: relative;
151 152
 }
152 153
 
153 154
 .panelField1 {
154 155
   width: 100%;
155 156
   justify-content: flex-start;
157
+  z-index: 5; 
158
+  position: relative;
156 159
 }
157 160
 
158 161
 .panelField11 {
@@ -216,6 +219,7 @@
216 219
   width: 100%;
217 220
   justify-content: flex-start;
218 221
   z-index: 5; 
222
+  position: relative;
219 223
 }
220 224
 
221 225
 .panelField2 {

+ 1 - 1
pages/main/setting.js

@@ -6,7 +6,7 @@ const arrSortType = ["时间较早的题卡", "时间较近的题卡"];
6 6
 const arrSortType2 = ["较早的", "较近的"];
7 7
 const arrClickType=["专属按钮","点击空白","两种方式"];
8 8
 var arrUserName = ["程晟涵", "大耳兔", "teresa", "古利古拉", "Lucy-chan","临时"];
9
-var arrUserID = [2, 11, 8, 9, 10, 12];
9
+var arrUserID = [2, 11, 8, 9, 10, 108];
10 10
 
11 11
 Page({
12 12
   data: {

+ 1 - 1
pages/template/cardShow.wxml

@@ -1,6 +1,6 @@
1 1
 <template name="CardShow">
2 2
   <!-- 第一段 -->
3
-  <view class="panelField1 FlexColumn" style='background-color:{{Color.BackColor}};'>
3
+  <view class="panelField1 FlexColumn" >
4 4
     <view class="editFieldNull"></view>
5 5
     <block wx:if="{{ShowType=='show'}}">
6 6
       <view class="LimitTime FlexColumn">