chengjie 4 miesięcy temu
rodzic
commit
8b349a4aeb

+ 1 - 1
app.js

@@ -2,7 +2,7 @@
2
 App({
2
 App({
3
   globalData: {
3
   globalData: {
4
     Version: "1.0.6",
4
     Version: "1.0.6",
5
-    IsProduction: true,
5
+    //IsProduction: true,
6
     ShareTitle: "阅读理解+答题",
6
     ShareTitle: "阅读理解+答题",
7
     SharePath: "pages/index/index",
7
     SharePath: "pages/index/index",
8
     ShareImage: '../images/pic_07.png',
8
     ShareImage: '../images/pic_07.png',

BIN
pages/images/pic_ha04.png


+ 4 - 7
pages/main/article.js

@@ -118,13 +118,10 @@ Page({
118
   init:function(options){
118
   init:function(options){
119
     let that=this;
119
     let that=this;
120
     let interval=0;
120
     let interval=0;
121
-    that.data.CountDown=30;
122
-    //1.5文章生成时间长
123
-    if (that.data.AIVersion=="1.5"){
124
-      that.setData({
125
-        CountDown:60,
126
-      });
127
-    }
121
+    that.data.CountDown=options.BuildSecond;
122
+    that.setData({
123
+      CountDown:that.data.CountDown,
124
+    });
128
     interval = setInterval(function(){
125
     interval = setInterval(function(){
129
       that.setData({
126
       that.setData({
130
         CountDown:--that.data.CountDown,
127
         CountDown:--that.data.CountDown,

+ 2 - 1
pages/main/article.wxml

@@ -19,7 +19,8 @@
19
       </view>
19
       </view>
20
     </view>
20
     </view>
21
   </view>
21
   </view>
22
-
22
+  <view style="width: 100%;height:700rpx;" wx:if="{{IsShowQuestion}}"></view>
23
+  
23
   <view wx:if="{{!IsShowQuestion}}" class="panelFooter FlexRow">
24
   <view wx:if="{{!IsShowQuestion}}" class="panelFooter FlexRow">
24
     <view class="panelFooter1 FlexRow">
25
     <view class="panelFooter1 FlexRow">
25
       <view class="panelFooter11 panelFooter10 FlexColumn" bind:tap="showData" data-name="IsShowTranslate">
26
       <view class="panelFooter11 panelFooter10 FlexColumn" bind:tap="showData" data-name="IsShowTranslate">

+ 9 - 0
pages/main/article.wxss

@@ -1,3 +1,12 @@
1
+pages .DarkColor{
2
+  background-color: #004433;
3
+  color:#C1E1C1;
4
+}
5
+pages .LightColor{
6
+  background-color: #D0ECD3;
7
+  color:#151815;
8
+}
9
+
1
 .DarkColor{
10
 .DarkColor{
2
   background-color: #004433;
11
   background-color: #004433;
3
   color:#C1E1C1;
12
   color:#C1E1C1;

+ 33 - 32
pages/main/wordsinput.js

@@ -53,6 +53,7 @@ Page({
53
   onHide:function(e){
53
   onHide:function(e){
54
     this.getInputData();
54
     this.getInputData();
55
   },
55
   },
56
+  
56
   initWords:function(){
57
   initWords:function(){
57
     let that = this;
58
     let that = this;
58
     app.globalData.SelectedWords=common.removeDuplicateAndTrimStrings(app.globalData.SelectedWords);
59
     app.globalData.SelectedWords=common.removeDuplicateAndTrimStrings(app.globalData.SelectedWords);
@@ -102,40 +103,41 @@ Page({
102
   },
103
   },
103
   initMenu:function(){
104
   initMenu:function(){
104
     let that = this;
105
     let that = this;
105
-    let GradeArr=[{Name:"小学",CSS:"Selected"},{Name:"初中",CSS:""},{Name:"高中",CSS:""},{Name:"大学",CSS:""}];
106
-    let grade=wx.getStorageSync('Grade');
107
-    if (grade && grade>=0 && grade<=3){
108
-      for(let i=0;i<GradeArr.length;i++){
109
-        GradeArr[i].CSS="";
110
-        if (grade==i)
111
-          GradeArr[i].CSS="Selected";
106
+    main.getData('GetYJBDCGenerateConfig?UserID=' + app.globalData.userInfo.UserID, function (data) {
107
+      let GradeArr=data.Level;
108
+      let grade=wx.getStorageSync('Grade');
109
+      if (grade && grade>=0 && grade<=3){
110
+        for(let i=0;i<GradeArr.length;i++){
111
+          GradeArr[i].CSS="";
112
+          if (grade==i)
113
+            GradeArr[i].CSS="Selected";
114
+        }
112
       }
115
       }
113
-    }
114
 
116
 
115
-    let ArticleStyleArr=[{Name:"童话",CSS:"Selected"},{Name:"奇幻",CSS:""},{Name:"动物",CSS:""},{Name:"校园生活",CSS:""},{Name:"家庭亲子",CSS:""},{Name:"成长",CSS:""},{Name:"科幻",CSS:""},{Name:"旅行",CSS:""},{Name:"大自然",CSS:""},{Name:"科普",CSS:""},{Name:"节日文化",CSS:""},{Name:"人生励志",CSS:""}];
116
-    let ArticleStyle=wx.getStorageSync('ArticleStyle');
117
-    if (ArticleStyle && ArticleStyle>=0 && ArticleStyle<=12){
118
-      for(let i=0;i<ArticleStyleArr.length;i++){
119
-        ArticleStyleArr[i].CSS="";
120
-        if (ArticleStyle==i)
121
-          ArticleStyleArr[i].CSS="Selected";
117
+      let ArticleStyleArr=data.ArticleStyle;
118
+      let ArticleStyle=wx.getStorageSync('ArticleStyle');
119
+      if (ArticleStyle && ArticleStyle>=0 && ArticleStyle<=12){
120
+        for(let i=0;i<ArticleStyleArr.length;i++){
121
+          ArticleStyleArr[i].CSS="";
122
+          if (ArticleStyle==i)
123
+            ArticleStyleArr[i].CSS="Selected";
124
+        }
122
       }
125
       }
123
-    }
124
 
126
 
125
-    let AIVersionArr=[{Version:"1.0",Content:"词句丰富,结构简明\n平均30秒生成",CSS:"Selected"},{Version:"1.5",Content:"深度表达,更多要素\n平均60秒生成",CSS:""}];
126
-    let AIVersion=wx.getStorageSync('AIVersion');
127
-    if (AIVersion && AIVersion>=0 && AIVersion<=2){
128
-      for(let i=0;i<AIVersionArr.length;i++){
129
-        AIVersionArr[i].CSS="";
130
-        if (AIVersion==i)
131
-          AIVersionArr[i].CSS="Selected";
127
+      let AIVersionArr=data.AIVersion;
128
+      let AIVersion=wx.getStorageSync('AIVersion');
129
+      if (AIVersion && AIVersion>=0){
130
+        for(let i=0;i<AIVersionArr.length;i++){
131
+          AIVersionArr[i].CSS="";
132
+          if (AIVersion==i)
133
+            AIVersionArr[i].CSS="Selected";
134
+        }
132
       }
135
       }
133
-    }
134
-
135
-    that.setData({
136
-      GradeArr:GradeArr,
137
-      ArticleStyleArr:ArticleStyleArr,
138
-      AIVersionArr:AIVersionArr,
136
+      that.setData({
137
+        GradeArr:GradeArr,
138
+        ArticleStyleArr:ArticleStyleArr,
139
+        AIVersionArr:AIVersionArr,
140
+    });  
139
     });
141
     });
140
   },
142
   },
141
   bindKeyInput: function (e) {
143
   bindKeyInput: function (e) {
@@ -347,14 +349,13 @@ Page({
347
       arr=this.data.AIVersionArr;
349
       arr=this.data.AIVersionArr;
348
       for(let i=0;i<arr.length;i++){
350
       for(let i=0;i<arr.length;i++){
349
         if (arr[i].CSS=="Selected"){
351
         if (arr[i].CSS=="Selected"){
350
-          url+="&AIVersion="+arr[i].Version;
352
+          url+="&AIVersion="+arr[i].Version+"&BuildSecond="+arr[i].BuildSecond;
351
           break;
353
           break;
352
         }
354
         }
353
       }
355
       }
354
-
355
       if (wx.getStorageSync("IsShowGuideContainer")){
356
       if (wx.getStorageSync("IsShowGuideContainer")){
356
         wx.navigateTo({
357
         wx.navigateTo({
357
-          url: "article?ID=260&Type=Guide",
358
+          url: "article?ID=1&Type=Guide",
358
         });
359
         });
359
         return;
360
         return;
360
       }
361
       }

+ 7 - 5
pages/main/wordsinput.wxml

@@ -88,12 +88,14 @@
88
     </view>
88
     </view>
89
     <view class="panelMenu11 FlexColumn">
89
     <view class="panelMenu11 FlexColumn">
90
       <view class="text04 text05">模型</view>
90
       <view class="text04 text05">模型</view>
91
-      <view class="panelMenu111 FlexRow">
92
-        <view class="btn btn4 btn{{item.CSS}} FlexRow" wx:for="{{AIVersionArr}}" wx:key="index" capture-bind:tap="selectBtn" data-id="2" data-index="{{index}}">
93
-          <view class="btn41">{{item.Version}}</view>
94
-          <text>{{item.Content}}</text>
91
+      <scroll-view scroll-x="true" class="panelMenu1110">
92
+        <view class="panelMenu1111 panelMenu11110 FlexRow" style="width: {{358*(AIVersionArr.length+2)}}rpx;">
93
+          <view class="btn btn4 btn{{item.CSS}} FlexRow" wx:for="{{AIVersionArr}}" wx:key="index" capture-bind:tap="selectBtn" data-id="2" data-index="{{index}}">
94
+            <view class="btn41">{{item.Version}}</view>
95
+            <text>{{item.Content}}</text>
96
+          </view>
95
         </view>
97
         </view>
96
-      </view>
98
+      </scroll-view>
97
     </view>
99
     </view>
98
     <view id="btnBuild" class="btn2 FlexRow" catch:tap="goto" data-url="article">
100
     <view id="btnBuild" class="btn2 FlexRow" catch:tap="goto" data-url="article">
99
       <image src="../images/sysIcon_b01.png" class="sysIcon_b01"></image>
101
       <image src="../images/sysIcon_b01.png" class="sysIcon_b01"></image>

+ 4 - 0
pages/main/wordsinput.wxss

@@ -298,6 +298,9 @@
298
   justify-content: flex-start;
298
   justify-content: flex-start;
299
   align-items: flex-start;
299
   align-items: flex-start;
300
 }
300
 }
301
+.panelMenu11110{
302
+  height:166rpx;
303
+}
301
 
304
 
302
 .btn{
305
 .btn{
303
   margin: 0 20rpx 20rpx 0;
306
   margin: 0 20rpx 20rpx 0;
@@ -320,6 +323,7 @@
320
   font-size: 36rpx;
323
   font-size: 36rpx;
321
 }
324
 }
322
 .btn4{
325
 .btn4{
326
+  width: 332rpx;
323
   height:126rpx;
327
   height:126rpx;
324
   margin: 0 20rpx 0 0;
328
   margin: 0 20rpx 0 0;
325
   font-size: 24rpx;
329
   font-size: 24rpx;