Browse Source

'朗读改版'

Rorschach 4 years ago
parent
commit
9e8bcf21f0
99 changed files with 829 additions and 5789 deletions
  1. 2 2
      app.js
  2. 0 6
      app.json
  3. 2 2
      app.wxss
  4. 2 79
      component/hot/hot.wxml
  5. 169 0
      component/video-swiper/index.js
  6. 4 0
      component/video-swiper/index.json
  7. 165 0
      component/video-swiper/index.less
  8. 93 0
      component/video-swiper/index.wxml
  9. 137 0
      component/video-swiper/index.wxss
  10. 0 28
      pages/commonWxs/format.wxs
  11. 0 189
      pages/groupPage/collage-details/collage-details.js
  12. 0 8
      pages/groupPage/collage-details/collage-details.json
  13. 0 135
      pages/groupPage/collage-details/collage-details.wxml
  14. 0 280
      pages/groupPage/collage-details/collage-details.wxss
  15. 0 106
      pages/groupPage/discount-group/discount-group.js
  16. 0 1
      pages/groupPage/discount-group/discount-group.json
  17. 0 22
      pages/groupPage/discount-group/discount-group.wxml
  18. 0 107
      pages/groupPage/discount-group/discount-group.wxss
  19. 0 395
      pages/groupPage/grade-details/grade-details.js
  20. 0 9
      pages/groupPage/grade-details/grade-details.json
  21. 0 100
      pages/groupPage/grade-details/grade-details.wxml
  22. 0 227
      pages/groupPage/grade-details/grade-details.wxss
  23. 0 486
      pages/groupPage/group-details/group-details.js
  24. 0 10
      pages/groupPage/group-details/group-details.json
  25. 0 134
      pages/groupPage/group-details/group-details.wxml
  26. 0 640
      pages/groupPage/group-details/group-details.wxss
  27. 0 171
      pages/groupPage/make-money/make-money.js
  28. 0 6
      pages/groupPage/make-money/make-money.json
  29. 0 44
      pages/groupPage/make-money/make-money.wxml
  30. 0 127
      pages/groupPage/make-money/make-money.wxss
  31. 0 262
      pages/groupPage/my-group/my-group.js
  32. 0 8
      pages/groupPage/my-group/my-group.json
  33. 0 47
      pages/groupPage/my-group/my-group.wxml
  34. 0 105
      pages/groupPage/my-group/my-group.wxss
  35. 112 53
      pages/index/index.js
  36. 3 1
      pages/index/index.json
  37. 17 14
      pages/index/index.wxml
  38. 2 1
      pages/index/index.wxss
  39. 3 3
      pages/user/myconcern/myconcern.wxml
  40. 1 1
      pages/user/myread/myread.wxml
  41. 1 1
      pages/user/myworks/myworks.wxml
  42. 1 1
      pages/user/walletDetails/walletDetails.wxml
  43. 113 110
      project.config.json
  44. BIN
      static/index/comment.png
  45. BIN
      static/index/flower.png
  46. BIN
      static/index/flower_colored.png
  47. BIN
      static/index/share.png
  48. BIN
      static/index/star.png
  49. BIN
      static/index/star_colored.png
  50. 0 5
      towxml/.gitignore
  51. 0 10
      towxml/entry.wxml
  52. 0 172
      towxml/lib/Audio.js
  53. 0 5
      towxml/lib/markdown-it.js
  54. 0 2
      towxml/lib/parse5.js
  55. 0 64
      towxml/lib/tagsAndAttrs.js
  56. 0 296
      towxml/lib/toJson.js
  57. 0 137
      towxml/main.js
  58. 0 177
      towxml/outTemplate.js
  59. 0 26
      towxml/package.json
  60. 0 1
      towxml/plugins/hljs/highlight.js
  61. 0 29
      towxml/plugins/hljs/index.js
  62. 0 1
      towxml/plugins/hljs/languages/bash.js
  63. 0 1
      towxml/plugins/hljs/languages/coffeescript.js
  64. 0 1
      towxml/plugins/hljs/languages/css.js
  65. 0 1
      towxml/plugins/hljs/languages/dns.js
  66. 0 1
      towxml/plugins/hljs/languages/dos.js
  67. 0 1
      towxml/plugins/hljs/languages/erlang.js
  68. 0 1
      towxml/plugins/hljs/languages/go.js
  69. 0 1
      towxml/plugins/hljs/languages/htmlbars.js
  70. 0 1
      towxml/plugins/hljs/languages/http.js
  71. 0 1
      towxml/plugins/hljs/languages/java.js
  72. 0 1
      towxml/plugins/hljs/languages/javascript.js
  73. 0 1
      towxml/plugins/hljs/languages/json.js
  74. 0 1
      towxml/plugins/hljs/languages/less.js
  75. 0 1
      towxml/plugins/hljs/languages/makefile.js
  76. 0 1
      towxml/plugins/hljs/languages/markdown.js
  77. 0 1
      towxml/plugins/hljs/languages/nginx.js
  78. 0 1
      towxml/plugins/hljs/languages/php.js
  79. 0 1
      towxml/plugins/hljs/languages/powershell.js
  80. 0 1
      towxml/plugins/hljs/languages/python.js
  81. 0 1
      towxml/plugins/hljs/languages/ruby.js
  82. 0 1
      towxml/plugins/hljs/languages/scss.js
  83. 0 1
      towxml/plugins/hljs/languages/shell.js
  84. 0 1
      towxml/plugins/hljs/languages/sql.js
  85. 0 1
      towxml/plugins/hljs/languages/swift.js
  86. 0 1
      towxml/plugins/hljs/languages/typescript.js
  87. 0 99
      towxml/plugins/hljs/style/github.wxss
  88. 0 70
      towxml/plugins/hljs/style/monokai.wxss
  89. 0 3
      towxml/plugins/markdown-it-emoji.js
  90. 0 2
      towxml/plugins/markdown-it-ins.js
  91. 0 2
      towxml/plugins/markdown-it-mark.js
  92. 0 2
      towxml/plugins/markdown-it-sub.js
  93. 0 2
      towxml/plugins/markdown-it-sup.js
  94. 0 148
      towxml/plugins/markdown-it-todoList.js
  95. 0 1
      towxml/renderTemplate.wxml
  96. 0 426
      towxml/style/main.wxss
  97. 0 87
      towxml/style/theme/dark.wxss
  98. 0 75
      towxml/style/theme/light.wxss
  99. 2 2
      utils/const.js

+ 2 - 2
app.js

@@ -2,7 +2,7 @@
 import {
   GetQueryString
 } from 'utils/util'
-const Towxml = require('/towxml/main');
+// const Towxml = require('/towxml/main');
 App({
   onLaunch: function (options) {
     // 判断设备是否为 iPhone X
@@ -28,5 +28,5 @@ App({
       }
     })
   },
-  towxml: new Towxml()
+  // towxml: new Towxml()
 })

+ 0 - 6
app.json

@@ -11,12 +11,6 @@
     "pages/main/week/week",
     "pages/main/reading/reading",
     "pages/main/searchResult/searchResult",
-    "pages/groupPage/discount-group/discount-group",
-    "pages/groupPage/group-details/group-details",
-    "pages/groupPage/grade-details/grade-details",
-    "pages/groupPage/collage-details/collage-details",
-    "pages/groupPage/my-group/my-group",
-    "pages/groupPage/make-money/make-money",
     "pages/user/myEdit/myEdit",
     "pages/user/myconcern/myconcern",
     "pages/user/myWallet/myWallet",

+ 2 - 2
app.wxss

@@ -18,8 +18,8 @@ text {
 .container {
   height: auto;
   box-sizing: border-box;
-  padding-top: 80rpx;
-  color: #444;
+  /* padding-top: 80rpx; */
+  /* color: #444; */
   font-family: PingFang SC, Microsoft Yahei, Source Han Sans CN, SimHei;
 }
 

+ 2 - 79
component/hot/hot.wxml

@@ -1,55 +1,5 @@
 <template name="hot">
-    <!-- <view class="messageSection" wx:if="{{hotData.unReadMessageNum > 0}}" bindtap="goToMessage"> -->
-    <!-- <view class="marquee">
-        <view class="content">
-            <text>【新春派兑】小红花兑换乐高玩具,6666朵小红花可兑换价值约500元的乐高积木玩具,2月26日兑换。</text>
-            <text style="display: inline-block; width: 5em;"></text>
-            <text>【新春派兑】小红花兑换乐高玩具,6666朵小红花可兑换价值约500元的乐高积木玩具,2月26日兑换。</text>
-            <text style="display: inline-block; width: 5em;"></text>
-            <text>【新春派兑】小红花兑换乐高玩具,6666朵小红花可兑换价值约500元的乐高积木玩具,2月26日兑换。</text>
-            <text style="display: inline-block; width: 5em;"></text>
-        </view>
-    </view> -->
-    <!-- <view class="messageSection" >
-        <image class="messageIcon" src="../../static/image/message_icon.png" />
-        <view class="marquee">
-            <view class="content">
-                <text>{{hotData.unReadMessageContent}}</text>
-                <text style="display: inline-block; width: 5em;"></text>
-                <text>{{hotData.unReadMessageContent}}</text>
-                <text style="display: inline-block; width: 5em;"></text>
-                <text>{{hotData.unReadMessageContent}}</text>
-                <text style="display: inline-block; width: 5em;"></text>
-            </view>
-        </view>
-    </view> -->
-    <!-- <view class="messageSection" bindtap="goToMessage" wx:if="{{hotData.unReadMessageContent !== ''}}">
-        <image class="messageIcon" src="../../static/image/message_icon.png" />
-        <text class="messageText">{{hotData.unReadMessageContent}}</text>
-    </view> -->
-    <!-- <view class="myCourseSection" bindtap="clickBaidu">
-        <!-- <view class="title">
-            <view class="title-regular">我的课程</view>
-            <view class="right" bindtap="toMyCourse" wx:if="{{hotData.myCourse.length > 3}}">
-                更多
-                <image src="../../static/image/black_to.png" />
-            </view>
-        </view> -->
-        <!-- <view class="myCoursePlaceHolder" wx:if="{{hotData.myCourse.length === 0}}" bindtap="goToBooks">
-            <image src="../../static/image/add_class.png" />
-        </view> -->
-        <view class="myCoursePlaceHolder">
-            <image src="https://reader.image.lingjiao.cn/reader/resource/baidu_img.png" />
-        </view>
-        <!-- <view class="book-box" wx:if="{{hotData.myCourse.length !== 0}}">
-            <block wx:for="{{hotData.myCourse}}" wx:key="{{index}}">
-                <view class="book-item" data-id="{{item.productId}}" bindtap="goToBook" data-title="{{item.title}}">
-                    <image class="book-img" src="{{item.iconImg}}"></image>
-                    <view class="book-title">{{item.title}}</view>
-                </view>
-            </block>
-        </view> -->
-    <!-- </view> --> 
+
     <view class="searchSection">
         <input bindinput="inputHandler" value="{{hotData.inputValue}}" focus="{{hotData.inputFocus}}" bindfocus="searchIconDisappear" bindblur="searchIconCome" bindconfirm="searchHandler" placeholder="{{hotData.hotSearch}}" placeholder-style="text-indent:20rpx" confirm-type="search"></input>
         <view>{{searchIcon}}</view>
@@ -62,27 +12,6 @@
             <button formType="submit">Reset</button>
         </form> -->
     </view>
-    <view class="swiperSection">
-        <view class="title-regular swiper-title">官方推荐</view>
-        <swiper previous-margin="0" next-margin="243rpx" bindchange="swiperChange" current="{{hotData.swiperCurrent}}" circular="{{true}}" autoplay="{{hotData.autoplay}}" interval="{{hotData.interval}}" duration="{{hotData.duration}}" circular="{{hotData.circular}}">
-            <block wx:for="{{hotData.recommend}}" wx:key="{{index}}">
-                <swiper-item class="slide-item" bindtap="openClass" data-classId="{{item.classId}}" data-title="{{item.title}}">
-                    <image src="{{item.img}}" data-type="{{item.type}}" data-id="{{item.id}}" class="slide-image" />
-                    <view class="slide-summary">
-                        <text class="slide-title">{{item.title}}</text>
-                        <text class="slide-tip">{{item.summary}}</text>
-                    </view>
-                </swiper-item>
-            </block>
-        </swiper>
-        <view class="swiper-dots-wrapper">
-            <block wx:for="{{hotData.recommend}}" wx:key="{{index}}">
-                <view class="swiper-dots {{hotData.swiperCurrent === index ? 'dot-active' : ''}}">
-                    <text>{{index + 1}}</text>
-                </view>
-            </block>
-        </view>
-    </view>
     <view class="recommdSection">
         <view class="recommd-title">热门作品</view>
         <view class="hotWares">
@@ -117,11 +46,5 @@
             </view>
         </view>
     </view>
-    <!--小度广告海报-->
-    <view class="xiaodu-dialog" bindtap="xiaoduClick"  wx:if="{{hotData.baiduFlag}}">
-        <image class="dialog-img" lazy-load="true" src="https://reader.image.lingjiao.cn/reader/resource/海报.png" />
-        <view class="dialog-circle" catchtap="PreservationXiaodu">
-            <text>点我保存到相册,识别二维码</text>
-        </view>
-    </view>
+
 </template>

+ 169 - 0
component/video-swiper/index.js

@@ -0,0 +1,169 @@
+"use strict";
+
+
+Component({
+    options: {
+        addGlobalClass: true,
+        pureDataPattern: /^_/
+    },
+    properties: {
+        duration: {
+            type: Number,
+            value: 500
+        },
+        easingFunction: {
+            type: String,
+            value: 'default'
+        },
+        loop: {
+            type: Boolean,
+            value: true
+        },
+        videoList: {
+            type: Array,
+            value: [],
+            observer: function observer() {
+                var newVal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
+
+                this._videoListChanged(newVal);
+            }
+        },
+        nextMargin:{
+            type: String,
+            value: '400rpx'
+
+        }
+    },
+    data: {
+        nextQueue: [],
+        prevQueue: [],
+        curQueue: [],
+        circular: false,
+        // nextMargin: '400rpx',
+        _last: 1,
+        _change: -1,
+        _invalidUp: 0,
+        _invalidDown: 0,
+        _videoContexts: []
+    },
+    lifetimes: {
+        attached: function attached() {
+            this.data._videoContexts = [wx.createVideoContext('video_0', this), wx.createVideoContext('video_1', this), wx.createVideoContext('video_2', this)];
+        }
+    },
+    methods: {
+        _videoListChanged: function _videoListChanged(newVal) {
+            var _this = this;
+
+            var data = this.data;
+            newVal.forEach(function (item) {
+                data.nextQueue.push(item);
+            });
+            if (data.curQueue.length === 0) {
+                this.setData({
+                    curQueue: data.nextQueue.splice(0, 3)
+                }, function () {
+                    _this.playCurrent(1);
+                });
+            }
+        },
+        animationfinish: function animationfinish(e) {
+            var _data = this.data,
+                _last = _data._last,
+                _change = _data._change,
+                curQueue = _data.curQueue,
+                prevQueue = _data.prevQueue,
+                nextQueue = _data.nextQueue;
+
+            var current = e.detail.current;
+            var diff = current - _last;
+            if (diff === 0) return;
+            this.data._last = current;
+            this.playCurrent(current);
+            this.triggerEvent('change', { activeId: curQueue[current].id });
+            var direction = diff === 1 || diff === -2 ? 'up' : 'down';
+            if (direction === 'up') {
+                if (this.data._invalidDown === 0) {
+                    var change = (_change + 1) % 3;
+                    var add = nextQueue.shift();
+                    var remove = curQueue[change];
+                    if (add) {
+                        prevQueue.push(remove);
+                        curQueue[change] = add;
+                        this.data._change = change;
+                    } else {
+                        this.data._invalidUp += 1;
+                    }
+                } else {
+                    this.data._invalidDown -= 1;
+                }
+            }
+            if (direction === 'down') {
+                if (this.data._invalidUp === 0) {
+                    var _change2 = _change;
+                    var _remove = curQueue[_change2];
+                    var _add = prevQueue.pop();
+                    if (_add) {
+                        curQueue[_change2] = _add;
+                        nextQueue.unshift(_remove);
+                        this.data._change = (_change2 - 1 + 3) % 3;
+                    } else {
+                        this.data._invalidDown += 1;
+                    }
+                } else {
+                    this.data._invalidUp -= 1;
+                }
+            }
+            var circular = true;
+            if (nextQueue.length === 0 && current !== 0) {
+                circular = false;
+            }
+            if (prevQueue.length === 0 && current !== 2) {
+                circular = false;
+            }
+            this.setData({
+                curQueue: curQueue,
+                circular: circular
+            });
+        },
+        playCurrent: function playCurrent(current) {
+            this.data._videoContexts.forEach(function (ctx, index) {
+                index !== current ? ctx.pause() : ctx.play();
+            });
+        },
+        onPlay: function onPlay(e) {
+            this.trigger(e, 'play');
+        },
+        onPause: function onPause(e) {
+            this.trigger(e, 'pause');
+        },
+        onEnded: function onEnded(e) {
+            this.trigger(e, 'ended');
+        },
+        onError: function onError(e) {
+            this.trigger(e, 'error');
+        },
+        onTimeUpdate: function onTimeUpdate(e) {
+            this.trigger(e, 'timeupdate');
+        },
+        onWaiting: function onWaiting(e) {
+            this.trigger(e, 'wait');
+        },
+        onProgress: function onProgress(e) {
+            this.trigger(e, 'progress');
+        },
+        onLoadedMetaData: function onLoadedMetaData(e) {
+            this.trigger(e, 'loadedmetadata');
+        },
+        onTimeUpdate: function onTimeUpdate(e){
+
+        },
+        trigger: function trigger(e, type) {
+            var ext = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+
+            var detail = e.detail;
+            var activeId = e.target.dataset.id;
+            this.triggerEvent(type, Object.assign(Object.assign(Object.assign({}, detail), { activeId: activeId }), ext));
+        }
+    }
+});

+ 4 - 0
component/video-swiper/index.json

@@ -0,0 +1,4 @@
+{
+    "component": true,
+    "usingComponents": {}
+}

+ 165 - 0
component/video-swiper/index.less

@@ -0,0 +1,165 @@
+
+.container {
+    width: 100%;
+    height: 100%;
+    padding-top: 20rpx;
+
+    .video-swiper {
+        width: 100%;
+        height: 100%;
+        display: block;
+        background: #ffffff;
+        margin-top: 64rpx;
+        
+        .swiper_item {
+            width: 100%;
+            height: 100%;
+            
+            .head_box {
+                width: 100%;
+                height: 120rpx;
+                display: flex;
+                justify-content: space-between;
+                padding-left: 20rpx;
+
+                .user_box {
+                    width: 400rpx;
+                    height: 100%;
+                    display: flex;
+                    align-items: center;
+
+                    .avatar {
+                        width: 80rpx;
+                        height: 80rpx;
+                        border: 2rpx solid green;
+                        border-radius: 50%;
+
+                    }
+
+                    .user_right {
+                        margin-left: 16rpx;
+
+                        .nickname {
+                            font-size: 30rpx;
+                            color: rgba(0, 0, 0, 0.60);
+                        }
+
+                        .time {
+                            font-size: 26rpx;
+                            color: rgba(0, 0, 0, 0.60);
+                        }
+                    }
+
+                }
+
+                .more_btn {
+                    width: 50rpx;
+                    height: 100%;
+                    margin-right: 20rpx;
+                    display: flex;
+                    align-items: center;
+                    justify-content: space-around;
+
+                    .more_item {
+                        width: 5rpx;
+                        height: 5rpx;
+                        background: rgba(0, 0, 0, 0.60);
+                        border-radius: 50%;
+                    }
+                }
+            }
+
+            .video_item {
+                width: 100%;
+                height: 422rpx;
+            }
+
+            .video_title {
+                width: 100%;
+                height: 62rpx;
+                font-size: 30rpx;
+                color: #373737;
+                display: flex;
+                align-items: center;
+            }
+
+            .foot_box {
+                width: 100%;
+                height: 120rpx;
+                display: flex;
+                justify-content: space-between;
+                padding-left: 20rpx;
+
+                .foot_left,
+                .foot_right {
+                    display: flex;
+                    align-items: center;
+                }
+
+                .btn {
+                    margin-right: 42rpx;
+                    font-size: 28rpx;
+                    color: rgba(0, 0, 0, 0.60);
+                    display: flex;
+                    flex-direction: row;
+                    align-items: center;
+
+                    .collect_btn_icon {
+                        width: 48rpx;
+                        height: 46rpx;
+                        margin-right: 14rpx;
+                    }
+
+                    .share_btn_icon {
+                        width: 46rpx;
+                        height: 46rpx;
+                        margin-right: 14rpx;
+                    }
+
+                    .flower_btn_icon {
+                        width: 46rpx;
+                        height: 46rpx;
+                        margin-right: 14rpx;
+                    }
+
+                    .comment_btn_icon {
+                        width: 49rpx;
+                        height: 47rpx;
+                        margin-right: 14rpx;
+                    }
+                }
+            }
+
+            .btn_wrapper{
+                width: 100%;
+                height: 110rpx;
+                display: flex;
+                align-items: center;
+                justify-content: center;
+                .reading_btn{
+                    width: 271rpx;
+                    height: 80rpx;
+                    background: #14c962;
+                    border-radius: 100rpx;
+                    display: flex;
+                    align-items: center;
+                    justify-content: center;
+
+                    image{
+                        width: 39rpx;
+                        height: 50rpx;
+                        margin-right: 20rpx;
+                    }
+                    text{
+                        color: #fff;
+                        font-size: 30rpx;
+                    }
+                }
+            }
+        }
+
+
+    }
+
+
+}

+ 93 - 0
component/video-swiper/index.wxml

@@ -0,0 +1,93 @@
+<view class="container">
+  <swiper 
+    class="video-swiper" 
+    circular="{{circular}}"
+    next-margin="{{nextMargin}}" 
+    easing-function="{{easingFunction}}" 
+    vertical 
+    current="1"
+    duration="{{duration}}" 
+    bindanimationfinish="animationfinish">
+    <!-- curQueue 循环会导致video重新插入,objectFit 不可变更 -->
+    <swiper-item class="swiper_item" wx:for="{{curQueue}}" wx:key="*this">
+      <view class="head_box">
+        <view class="user_box">
+          <image class="avatar" lazy-load="true" src="{{item.avatar}}" />
+          <view class="user_right">
+            <view class="nickname">{{item.nickName}}</view>
+          <view class="time">
+            <text>发布时间:</text>
+            <text>{{item.time}}</text>
+          </view>
+          </view>
+            
+        </view>
+        <view class="more_btn">
+            <view class="more_item"></view>
+            <view class="more_item"></view>
+            <view class="more_item"></view>
+        </view>
+          
+      </view>
+      <video 
+        id="video_{{index}}" 
+        class="video_item" 
+        loop="{{loop}}" 
+        enable-play-gesture 
+        enable-progress-gesture 
+        show-center-play-btn="{{false}}"
+        controls="{{true}}"
+        src="{{item.url}}" 
+        data-id="{{item.id}}"
+        object-fit="contain"
+        data-index="{{index}}"
+        bindplay="onPlay"
+        bindpause="onPause"
+        bindended="onEnded"
+        binderror="onError"
+        bindtimeupdate="onTimeUpdate"
+        bindwaiting="onWaiting"
+        bindprogress="onProgress"
+        bindloadedmetadata="onLoadedMetaData"
+      >
+      </video>
+      <view class="video_title">
+        <text>
+          {{item.title}}
+        </text>
+          
+      </view>
+        
+      <view class="foot_box"> 
+        <view class="foot_left">
+          <view class="btn collect_btn">
+              <image class="collect_btn_icon" src="../../static/index/star.png" lazy-load="true" />
+              <text>收藏</text>
+          </view>
+          <view class="btn share_btn">
+              <image class="share_btn_icon" src="../../static/index/share.png" lazy-load="true" />
+              <text>分享</text>
+          </view>
+        </view>
+        <view class="foot_right">
+          <view class="btn flower_btn">
+              <image class="flower_btn_icon" src="../../static/index/flower.png" lazy-load="true" />
+              <text>{{item.likes}}</text>
+          </view>
+          <view class="btn comment_btn">
+              <image class="comment_btn_icon" src="../../static/index/comment.png" lazy-load="true" />
+              <text>{{item.likes}}</text>
+          </view>
+        </view>
+            
+      </view>
+      <view class="btn_wrapper">
+        <view class="reading_btn">
+          <image src="../../static/index/star.png" />
+          <text>我要配音</text>
+        </view>
+      </view>
+    </swiper-item>
+  </swiper>
+</view>
+

+ 137 - 0
component/video-swiper/index.wxss

@@ -0,0 +1,137 @@
+.container {
+  width: 100%;
+  height: 100%;
+  padding-top: 20rpx;
+}
+.container .video-swiper {
+  width: 100%;
+  height: 100%;
+  display: block;
+  background: #ffffff;
+  margin-top: 64rpx;
+}
+.container .video-swiper .swiper_item {
+  width: 100%;
+  height: 100%;
+}
+.container .video-swiper .swiper_item .head_box {
+  width: 100%;
+  height: 120rpx;
+  display: flex;
+  justify-content: space-between;
+  padding-left: 20rpx;
+}
+.container .video-swiper .swiper_item .head_box .user_box {
+  width: 400rpx;
+  height: 100%;
+  display: flex;
+  align-items: center;
+}
+.container .video-swiper .swiper_item .head_box .user_box .avatar {
+  width: 80rpx;
+  height: 80rpx;
+  border: 2rpx solid green;
+  border-radius: 50%;
+}
+.container .video-swiper .swiper_item .head_box .user_box .user_right {
+  margin-left: 16rpx;
+}
+.container .video-swiper .swiper_item .head_box .user_box .user_right .nickname {
+  font-size: 30rpx;
+  color: rgba(0, 0, 0, 0.6);
+}
+.container .video-swiper .swiper_item .head_box .user_box .user_right .time {
+  font-size: 26rpx;
+  color: rgba(0, 0, 0, 0.6);
+}
+.container .video-swiper .swiper_item .head_box .more_btn {
+  width: 50rpx;
+  height: 100%;
+  margin-right: 20rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-around;
+}
+.container .video-swiper .swiper_item .head_box .more_btn .more_item {
+  width: 5rpx;
+  height: 5rpx;
+  background: rgba(0, 0, 0, 0.6);
+  border-radius: 50%;
+}
+.container .video-swiper .swiper_item .video_item {
+  width: 100%;
+  height: 422rpx;
+}
+.container .video-swiper .swiper_item .video_title {
+  width: 100%;
+  height: 62rpx;
+  font-size: 30rpx;
+  color: #373737;
+  display: flex;
+  align-items: center;
+}
+.container .video-swiper .swiper_item .foot_box {
+  width: 100%;
+  height: 120rpx;
+  display: flex;
+  justify-content: space-between;
+  padding-left: 20rpx;
+}
+.container .video-swiper .swiper_item .foot_box .foot_left,
+.container .video-swiper .swiper_item .foot_box .foot_right {
+  display: flex;
+  align-items: center;
+}
+.container .video-swiper .swiper_item .foot_box .btn {
+  margin-right: 42rpx;
+  font-size: 28rpx;
+  color: rgba(0, 0, 0, 0.6);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+.container .video-swiper .swiper_item .foot_box .btn .collect_btn_icon {
+  width: 48rpx;
+  height: 46rpx;
+  margin-right: 14rpx;
+}
+.container .video-swiper .swiper_item .foot_box .btn .share_btn_icon {
+  width: 46rpx;
+  height: 46rpx;
+  margin-right: 14rpx;
+}
+.container .video-swiper .swiper_item .foot_box .btn .flower_btn_icon {
+  width: 46rpx;
+  height: 46rpx;
+  margin-right: 14rpx;
+}
+.container .video-swiper .swiper_item .foot_box .btn .comment_btn_icon {
+  width: 49rpx;
+  height: 47rpx;
+  margin-right: 14rpx;
+}
+.container .video-swiper .swiper_item .btn_wrapper {
+  width: 100%;
+  height: 110rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.container .video-swiper .swiper_item .btn_wrapper .reading_btn {
+  width: 271rpx;
+  height: 80rpx;
+  background: #14c962;
+  border-radius: 100rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.container .video-swiper .swiper_item .btn_wrapper .reading_btn image {
+  width: 39rpx;
+  height: 50rpx;
+  margin-right: 20rpx;
+}
+.container .video-swiper .swiper_item .btn_wrapper .reading_btn text {
+  color: #fff;
+  font-size: 30rpx;
+}

+ 0 - 28
pages/commonWxs/format.wxs

@@ -1,28 +0,0 @@
-function formatDate(time) {
-  var t = getDate(time);
-  var tf = function (i) {
-    return (i < 10 ? '0' : '') + i
-  };
-  var year = t.getFullYear();
-  var month = tf(t.getMonth() + 1);
-  var day = tf(t.getDate());
-  var hour = tf(t.getHours());
-  var minute = tf(t.getMinutes());
-  return month + '-' + day + ' ' + hour + ':' + minute;
-}
-
-function getBirthday(birthday) {
-  var t = getDate(birthday);
-  var tf = function (i) {
-    return (i < 10 ? '0' : '') + i
-  };
-  var year = t.getFullYear();
-  var month = tf(t.getMonth() + 1);
-  var day = tf(t.getDate());
-  return year + '年' + month + '月' + day + '日';
-}
-
-module.exports = {
-  formatDate: formatDate,
-  getBirthday: getBirthday
-}

+ 0 - 189
pages/groupPage/collage-details/collage-details.js

@@ -1,189 +0,0 @@
-// pages/groupPage/collage-details/collage-details.js
-import httpRequestApi from '../../../utils/APIClient';
-import util from '../../../utils/util';
-const app = getApp()
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    groupPurchaseInfo: {},
-    organizer: {},
-    surplusNum: '',
-    joinUserList: [],
-    surplusList: [],
-    timeList: [],
-    productId: '',
-    orderId: '',
-    groupId: '',
-    content: [{
-        text: "转发给自己的朋友们",
-        color: "#000"
-      },
-      {
-        text: " 分享好课,追随您一起学习进步",
-        color: "#000"
-      },
-      {
-        text: " 您的魅力不是吹的",
-        color: "#000"
-      },
-      {
-        text: "在限定时间内成功拼团,您将得到奖学金。",
-        color: "#FF4600"
-      }
-    ],
-    ifGroupSuccessed: false,
-    organizerUid: '',
-    hosterUid: '',
-    colonelName: '',
-    rewardMoney: '',
-    goBackHome: false,
-    dataLoading: true
-  },
-  //显示分享页 
-  openShare: function () {
-    if (this.data.ifGroupSuccessed) {
-      const productId = this.data.productId;
-      const id = this.data.orderId;
-      const groupId = this.data.groupId;
-      wx.navigateTo({
-        url: `/pages/groupPage/grade-details/grade-details?productId=${productId}&id=${id}&groupId=${groupId}&share=true`
-      })
-    } else {
-      this.shareDialog = this.selectComponent("#share-dialog");
-      const data = {
-        avatar: this.data.organizer.avatar,
-        author: this.data.organizer.wechatName,
-        iconImg: this.data.groupPurchaseInfo.bgImg,
-        title: this.data.groupPurchaseInfo.productTitle,
-        path: `pages/groupPage/group-details/group-details`,
-        scene: `QR${this.data.orderId}`,
-        groupPurchaseInfo: this.data.groupPurchaseInfo,
-        groupType: this.data.groupOsType
-      }
-      this.shareDialog.share(data);
-    }
-  },
-  // 下拉刷新
-  onPullDownRefresh: function () {
-    this.setData({
-      surplusList: []
-    }, () => {
-      this.getInfo();
-    })
-    wx.showNavigationBarLoading() //在标题栏中显示加载
-    //模拟加载
-    setTimeout(function () {
-      wx.hideNavigationBarLoading() //完成停止加载
-      wx.stopPullDownRefresh() //停止下拉刷新
-    }, 1500);
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    // if (app.globalData.isIOS) {
-    //   wx.redirectTo({
-    //     url: '../../index/index'
-    //   })
-    //   return 
-    // }
-    
-    if (options.read) {
-      this.setData({
-        ifGroupSuccessed: options.read
-      })
-    }
-    if (options.goBackHome == 'true') {
-      this.setData({
-        goBackHome: true
-      })
-    }
-    // options.scene = 'QR1541862338777268';
-    wx.setNavigationBarTitle({
-      title: '拼团详情'
-    })
-    console.log(options);
-    console.log(options.orderId);
-    const orderId = options.orderId ? options.orderId : options.scene.replace('QR', '');
-    const hosterUid =  wx.getStorageSync('uid')
-    this.setData({
-      orderId,
-      hosterUid
-    }, () => {
-      this.getInfo()
-    })
-  },
-  getInfo: function () {
-    httpRequestApi.getMygroupInfo(this.data.orderId).success(res => {
-      const groupOrder = res.data.data.groupPurchaseOrder;
-      const surplusNum = groupOrder.headcount - groupOrder.joinCount;
-      this.setData({
-        organizerUid: groupOrder.organizer,
-        ifGroupSuccessed: groupOrder.status === 'SUCCESSED' ? true : false
-      })
-      for (var i = 0; i < surplusNum; i++) {
-        this.data.surplusList.push(1);
-      }
-      // 剩余时间 如果团购已结束则不显示
-      let timeLast = '';
-      const stillGoing = groupOrder.closeTime - Date.parse(new Date()) <= 0 ? false : true
-      if (stillGoing) {
-        timeLast = util.lastHours(groupOrder.closeTime - Date.parse(new Date()));
-      }
-      this.setData({
-        groupPurchaseInfo: res.data.data.groupPurchaseInfo,
-        organizer: res.data.data.organizer,
-        surplusNum,
-        joinUserList: res.data.data.joinUserList,
-        surplusList: this.data.surplusList,
-        timeLast,
-        stillGoing,
-        productId: groupOrder.productId,
-        groupId: groupOrder.groupId,
-        rewardMoney: res.data.data.groupPurchaseInfo.organizerPrice / 100,
-        dataLoading: false,
-        groupOsType: groupOrder.os
-      })
-      if (groupOrder.groupType === 'PROMOTION') {
-        this.setData({
-          colonelName: res.data.data.organizer.wechatName,
-          promotion: true
-          // joinUserList: this.data.joinUserList
-        })
-      }
-    })
-  },
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-    this.shareDialog = this.selectComponent("#share-dialog");
-
-  },
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function (ops) {
-    if (ops.from === 'button') {
-      console.log(ops.target)
-    }
-
-    const id = this.data.orderId;
-    const data = {
-      shareTypeEnum: 'LINK',
-      shareContentEnum: 'GROUP',
-      productId: this.data.productId
-    }
-    httpRequestApi.shareRecord(data).success((res) => {
-      console.log(res)
-    })
-    return {
-      title: '老师同学都在玩的配音show,你还在等什么?',
-      path: `pages/groupPage/group-details/group-details?share=true&shareId=${id}`,
-      imageUrl: `https://efunbox.lingjiao.cn/reader/resource/share/group_${this.data.productId}.jpg`,
-    }
-  }
-})

+ 0 - 8
pages/groupPage/collage-details/collage-details.json

@@ -1,8 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-      "shareDialog": "/component/share/share",
-      "popup": "/component/popup/popup",
-      "goBackHome": "/component/goBackHome/goBackHome"
-  }
-}

+ 0 - 135
pages/groupPage/collage-details/collage-details.wxml

@@ -1,135 +0,0 @@
-<!-- pages/groupPage/collage-details/collage-details.wxml -->
-<view class="collage-details">
-    <!-- <view class="step">
-        <image src="../../../static/groupImg/step.png"></image>
-        <view class="txt">
-            <text>1.支付成功</text>
-            <text>2.邀请朋友参加</text>
-            <text>3.去朗读</text>
-        </view>
-    </view> -->
-    <view class="green-placerholder"></view>
-    <image class="class-icon" src="{{groupPurchaseInfo.bgImg}}" />
-    <view class="details-head">
-        <!-- 剩余时间盒子 -->
-        <view class="last-time-box" wx:if="{{!dataLoading}}" hidden="{{ifGroupSuccessed || !stillGoing}}">
-            <view class="last-time">
-                <image class="left-icon" src="../../../static/groupImg/right_icon.png" />
-                <text class="last-time-end">距结束</text>
-                <image class="right-icon" src="../../../static/groupImg/left_icon.png" />
-            </view>
-            <view class="last-text">{{timeLast}}</view>
-        </view>
-        <!-- 还剩几人参团 -->
-        <view class="last-member" wx:if="{{!ifGroupSuccessed}}">
-            <view class="group-regular-text" hidden="{{surplusNum == '0' || !stillGoing}}">
-                还剩
-                <text class="red-text">{{surplusNum}}</text>
-                位好友{{groupOsType === 'IOS' ? '助力' : '参团'}}
-            </view>
-            <!-- 团长本人浏览话术 -->
-            <view class="group-regular-text" wx:if="{{organizerUid === hosterUid && !colonelName}}">
-                即可获得本课程3年使用权
-            </view>
-            <!-- 安卓推广团团长看到 -->
-            <view class="group-regular-text" wx:if="{{groupOsType === 'ANDROID' && organizerUid === hosterUid && colonelName}}">
-                即可获得{{rewardMoney}}元奖学金和100朵小红花
-            </view>
-            <view class="group-regular-text" wx:if="{{groupOsType === 'IOS' && organizerUid === hosterUid && colonelName}}">
-                即可获得10朵小红花
-            </view>
-            <!-- 团员看到的分享助力团 -->
-            <view class="group-regular-text" wx:if="{{groupOsType === 'IOS' && organizerUid !== hosterUid && colonelName}}">
-                即可助力团长<text class="red-text">{{organizer.wechatName}}</text>获得10朵小红花
-            </view>
-            <!-- 其他人浏览 -->
-            <view class="group-organizer group-regular-text" wx:if="{{organizerUid !== hosterUid}}">
-                <!-- <view class="group-organizer group-regular-text" wx:if="{{colonelName}}"> -->
-                <!-- ios分销团提示小红花 安卓分销团提示获得本课 -->
-                <view wx:if="{{groupOsType === 'IOS' && !colonelName}}">
-                    即可助力团长<text class="red-text">{{organizer.wechatName}}</text>获得本课
-                </view>
-                <view wx:if="{{groupOsType === 'ANDROID'}}">即可拼团成功</view>
-                <!-- <view wx:if="{{groupOsType === 'IOS' && colonelName}}">
-                    即可获得300朵
-                    <image src="../../../static/image/flower_small.png" />
-                </view> -->
-            </view>
-            <view class="group-regular-text" hidden="{{stillGoing}}">
-                {{groupOsType === 'IOS' ? '助力' : '团购'}}已超过时限
-            </view>
-            <view class="group-regular-text" hidden="{{surplusNum != '0'}}">
-                {{groupOsType === 'IOS' ? '助力' : '团购'}}成功!快去朗读吧
-            </view>
-        </view>
-        <view class="group-success" wx:if="{{ifGroupSuccessed}}">
-            <!-- 助力团成功了 团长看到 -->
-            <view class="help-success" wx:if="{{groupOsType === 'IOS' && organizerUid === hosterUid}}">
-                <view class="group-regular-text">恭喜,好强大的魅力</view>
-                <view class="group-regular-text">您发起的助力团成功了</view>
-            </view>
-            <!-- 助力团成功了 团员看到 -->
-            <view class="help-success" wx:if="{{groupOsType === 'IOS' && organizerUid !== hosterUid}}">
-                <view class="group-regular-text">在你的帮助下,{{organizer.wechatName}}的助力团成功啦</view>
-                <view class="group-regular-text">您获得了7天的本课程试用权哦</view>
-            </view>
-            <!-- 团购成功了 -->
-            <view class="help-success" wx:if="{{groupOsType === 'ANDROID' && !colonelName}}">
-                <view class="group-regular-text">拼团成功</view>
-                <view class="group-regular-text">你获得了本课3年使用权哦</view>
-            </view>
-            <!-- 推广团成功了 团员看到 -->
-            <view class="help-success" wx:if="{{groupOsType === 'ANDROID' && organizerUid !== hosterUid && colonelName}}">
-                <view class="group-regular-text">拼团成功</view>
-                <view class="group-regular-text">你获得了本课3年使用权哦</view>
-            </view>
-            <!-- 团购成功并且是团长看到并且是推广团 -->
-            <view class="help-success" wx:if="{{groupOsType === 'ANDROID' && organizerUid === hosterUid && colonelName}}">
-                <view class="group-regular-text">拼团成功</view>
-                <view class="group-regular-text">你获得了{{rewardMoney}}元奖学金和100朵小红花</view>
-            </view>
-        </view>
-        <!-- 头像 -->
-        <view class="headImg">
-            <block wx:for="{{joinUserList}}" wx:key="{{index}}">
-                <view class="headImg-item bg-boder">
-                    <view wx:if="{{organizerUid == item.uid}}" class="organizerIcon">团长</view>
-                    <image src="{{item.avatar}}"></image>
-                </view>
-            </block>
-            <block wx:for="{{surplusList}}" wx:key="{{index}}">
-                <view class="headImg-item">
-                    <image src="../../../static/groupImg/no_head.png"></image>
-                </view>
-            </block>
-        </view>
-        <view class="data-loading" wx:if="{{dataLoading}}">
-            <view class="line1"></view>
-            <view class="line2"></view>
-            <view class="line3"></view>
-        </view>
-        <view class="invitation-btn" bindtap="openShare">
-            <!-- <image src="../../../static/groupImg/Invitation.png"></image> -->
-            <text>{{ifGroupSuccessed ? '开始你的表演' : groupOsType === 'IOS' ? '立即邀请好友助力' : '立即邀请好友参团'}}</text>
-        </view>
-        <view class="explain" wx:if="{{groupOsType === 'IOS' ? false : true}}">
-            <view class="explain-title">拼团规则</view>
-            <view class="explain-gut">转发给自己的朋友们,分享好课,追随您一起学习进步</view>
-            <view class="explain-gut">您的魅力不是吹的</view>
-            <view class="explain-gut">在限定时间内成功拼团,团长将得到{{rewardMoney}}元的奖励金和100朵小红花</view>
-            <view class="explain-gut">如果拼团失败</view>
-            <view>您预付的课程费将在48小时内退回您的账户</view>
-        </view>
-        <view class="explain" wx:if="{{groupOsType === 'IOS' ? true : false}}">
-            <view class="explain-title">助力规则</view>
-            <view class="explain-gut">在限定时间内成功助力,团长将获得本课程3年试用权</view>
-            <view class="explain-gut">继续发起,将获得10朵小红花</view>
-            <view class="explain-gut">助力者将获得7天的试用权</view>
-            <view class="explain-gut">据我们统计:分享到3个群,成功率高达98.2%</view>
-        </view>
-    </view>
-</view>
-<canvas canvas-id="myCanvas" style="width:300px; height: 525px; position: absolute; left: -999rpx; top: -9999rpx;"></canvas>
-<shareDialog id="share-dialog" shareType='group' shareId="{{orderId}}" />
-<popup typeOf="sendSuccess" title="报告团长" headTextTwo='您发起的团购已经成立,订单号:{{orderId}}' content="{{content}}"></popup>
-<goBackHome id="goBackHome" shareType="{{goBackHome}}" wx:if="{{goBackHome}}" />

+ 0 - 280
pages/groupPage/collage-details/collage-details.wxss

@@ -1,280 +0,0 @@
-/* pages/groupPage/collage-details/collage-details.wxss */
-.collage-details {
-    height: 100%;
-    width: 100%;
-    background: #fff;
-    overflow: hidden;
-}
-
-.green-placerholder {
-    width: 100%;
-    height: 132rpx;
-    background: #12c962;
-    position: absolute;
-    top: 0;
-}
-
-.class-icon {
-    width: 704rpx;
-    height: 294rpx;
-    border-radius: 20rpx;
-    box-shadow: 0 0 15rpx 0rpx rgba(0, 0, 0, .4);
-    margin: 0 auto;
-    display: block;
-    z-index: 1;
-    position: relative;
-    top: 15rpx;
-}
-
-.step {
-    width: 100%;
-    height: 250rpx;
-    background: #fff;
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-}
-
-.step image {
-    height: 60rpx;
-    width: 70%;
-    margin: 0 auto;
-}
-
-.txt {
-    display: flex;
-    justify-content: space-around;
-    color: #535353;
-    font-size: 32rpx;
-    padding: 0 46rpx;
-    margin-top: 20rpx;
-}
-
-.details-head {
-    width: 100%;
-    /* height: 82%; */
-    margin-top: 12rpx;
-    background: #fff;
-    min-height: 98%;
-
-}
-
-.headImg {
-    display: flex;
-    flex-wrap: wrap;
-    justify-content: center;
-    padding: 40rpx 0;
-    box-sizing: border-box;
-}
-
-.headImg-item {
-    position: relative;
-    width: 140rpx;
-    height: 140rpx;
-    border-radius: 50%;
-    margin: 20rpx 22rpx;
-    box-sizing:border-box;
-}
-
-.headImg-item image {
-    width: 100%;
-    height: 100%;
-    border-radius: 50%;
-}
-
-.headImg-item .organizerIcon {
-    position: absolute;
-    bottom: -15rpx;
-    width: 70rpx;
-    height: 32rpx;
-    line-height: 32rpx;
-    background: #f7b21d;
-    border-radius: 16rpx;
-    /* border: 2rpx solid rgba(255, 255, 255, 1); */
-    font-size: 24rpx;
-    /* font-family: PingFangSC-Medium; */
-    /* font-weight: 500; */
-    color: rgba(255, 255, 255, 1);
-    left: 0;
-    right: 0;
-    margin: 0 auto;
-    text-align: center;
-}
-
-.bg-boder {
-    border: 2px solid #f7b21d;
-}
-
-.last-time-box {
-    width: 100%;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    margin-top:30rpx;
-}
-
-.last-time {
-    display: flex;
-    flex-direction: row;
-    align-items: center;
-}
-
-.last-time-end {
-    width: 99rpx;
-    height: 38rpx;
-    font-size: 30rpx;
-    font-weight: 800;
-    color: #f14025;
-    margin: 0 15rpx;
-    text-align:center;
-
-}
-
-.left-icon {
-    width: 80rpx;
-    height: 20rpx;
-}
-
-.right-icon {
-    width: 80rpx;
-    height: 20rpx;
-}
-
-.last-text {
-    width: 100%;
-    text-align: center;
-    font-size: 30rpx;
-    font-weight: 800;
-    color: #f14025;
-    margin-top: 8rpx;
-}
-
-.group-regular-text {
-    font-size: 30rpx;
-    font-weight: 800;
-    color: rgba(12, 10, 10, 1);
-    width: 100%;
-    text-align: center;
-    line-height: 45rpx;
-}
-
-.last-member{
-    margin-top: 17rpx;
-    
-}
-
-.invitation-btn {
-    /* position: absolute;
-    left: 50%;
-    top: 55%; */
-    /* transform: translate(-50%); */
-    width: 434rpx;
-    height: 80rpx;
-    margin: 0 auto 20rpx;
-}
-
-
-.invitation-btn image {
-    position: absolute;
-    left: 0;
-    top: 0;
-    width: 100%;
-    height: 100%;
-}
-
-.invitation-btn text {
-    /* position: absolute; */
-    width: 100%;
-    height: 100%;
-    display: inline-block;
-    text-align: center;
-    line-height: 80rpx;
-    z-index: 2;
-    color: #fff;
-    background: #FF653A;
-    border-radius: 56rpx;
-    font-size: 36rpx;
-    font-weight: 800;
-
-}
-
-.red-text{
-    color: #f13e25
-}
-
-.rule {
-    position: fixed;
-    right: 0;
-    top: 82%;
-    width: 84rpx;
-    height: 88rpx;
-    z-index: 2;
-}
-
-.rule image {
-    position: absolute;
-    left: 0;
-    top: 0;
-    width: 100%;
-    height: 100%;
-}
-
-.rule text {
-    position: absolute;
-    left: 30rpx;
-    top: 10rpx;
-    font-size: 24rpx;
-    color: #fff;
-    z-index: 2;
-}
-
-.explain {
-    color: #8E8B8C;
-    width: 100%;
-    box-sizing: border-box;
-    text-align: center;
-    font-size: 24rpx;
-    line-height: 40rpx;
-    position: absolute;
-    bottom: 20rpx;
-}
-
-.explain-title{
-    font-weight: 800;
-}
-
-.data-loading {
-    width: 100%;
-    height: 200rpx;
-    /* background: #FF4330; */
-}
-
-.data-loading .line1 {
-    width: 300rpx;
-    height: 30rpx;
-    background: rgba(228, 255, 242, .8);
-    margin-top: 20rpx;
-    margin-left: 122rpx;
-    border-radius: 10rpx;
-}
-
-.data-loading .line2 {
-    width: 400rpx;
-    height: 30rpx;
-    background: rgba(228, 255, 242, .8);
-    margin-top: 20rpx;
-    margin-left: 200rpx;
-    border-radius: 10rpx;
-}
-
-.data-loading .line3 {
-    width: 460rpx;
-    height: 30rpx;
-    background: rgba(228, 255, 242, .8);
-    margin-top: 20rpx;
-    margin-left: 160rpx;
-    border-radius: 10rpx;
-}
-.help-success{
-    margin-top:41rpx;
-}

+ 0 - 106
pages/groupPage/discount-group/discount-group.js

@@ -1,106 +0,0 @@
-// pages/groupPage//discount-group/discount-group.js
-import httpRequestApi from '../../../utils/APIClient';
-const app = getApp()
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    recommendList: []
-  },
-
-  //点击跳转到团购详情
-  groupDetail:function ({currentTarget}) {
-    const productId = currentTarget.dataset.productid;
-    const id = currentTarget.dataset.id;
-    const groupId = currentTarget.dataset.groupid;
-    const ind = currentTarget.dataset.ind;
-    //const groupType = this.data.groupData.recommendList[ind].groupType;
-      wx.navigateTo({
-        url: `/pages/groupPage/group-details/group-details?productId=${productId}&id=${id}&groupId=${groupId}`
-      })
-    // if(groupType === "PROMOTION") {
-    //   wx.navigateTo({
-    //     url: `/pages/groupPage/make-money/make-money?productId=${productId}&id=${id}&groupId=${groupId}`
-    //   })
-    // }else  {
-    //   wx.navigateTo({
-    //     url: `/pages/groupPage/group-details/group-details?productId=${productId}&id=${id}&groupId=${groupId}`
-    //   })
-    // }
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    if (app.globalData.isIOS) {
-      wx.redirectTo({
-        url: '../../index/index'
-      })
-      return 
-    }
-    wx.setNavigationBarTitle({
-      title: '优惠团购'
-    })
-      //优惠内容
-      httpRequestApi.getGroupList().success( (res) => {
-        console.log('推荐团购',res.data.data)
-        this.setData({
-          recommendList: res.data.data
-        })
-      }).fail((error) => {
-        console.log('错误',error)
-      })
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 1
pages/groupPage/discount-group/discount-group.json

@@ -1 +0,0 @@
-{}

+ 0 - 22
pages/groupPage/discount-group/discount-group.wxml

@@ -1,22 +0,0 @@
-<!--pages/discount-group/discount-group.wxml-->
-<view class="discount-group">
-    <scroll-view scroll-y="{{true}}">
-      <view class="group-container">
-        <view class="less-group">
-          <view class="group-box">
-            <block wx:for="{{recommendList}}" wx:key="{{index}}">
-              <view class="group-item" bindtap="groupDetail" data-ind="{{index}}" data-id="{{item.id}}" data-productId="{{item.productId}}" data-groupId="{{item.groupId}}">
-                <image class="item-img" src="{{item.iconImg}}"></image>
-                <view>拼团价 <text>¥{{item.price / 100}}</text></view>
-                <view>原价 <text style="text-decoration: line-through;">¥{{item.originPrice / 100}}</text></view>
-                <view class="group-num">
-                  <image src="../../../static/groupImg/Rectangle_30.png" ></image>
-                  <text>{{item.headcount}}人团</text>
-                </view>
-              </view>
-            </block>                
-          </view>                        
-        </view>
-        </view>
-    </scroll-view>
-  </view>

+ 0 - 107
pages/groupPage/discount-group/discount-group.wxss

@@ -1,107 +0,0 @@
-/* pages/discount-group/discount-group.wxss */
-::-webkit-scrollbar {
-    display: none;
-  }
-
-.discount-group {
-    height: 100%;
-    width: 100%;
-    background:rgba(240,241,245,1);
-}
-
-scroll-view {
-    height: 100%;
-}
-
-.group-container {
-    width: 100%;
-}
-
-.less-group {
-    width: 100%;
-}
-
-.group-box {
-    display: flex;
-    width: 100%;
-    flex-wrap: wrap;
-    justify-content: space-between;
-    background: #fff;
-    margin-bottom: 12rpx;
-    padding: 28rpx 18rpx; 
-    box-sizing: border-box;
-}
-
-.group-item {
-    display: flex;
-    flex-direction: column;
-    position: relative;
-}
-
-.group-item image {
-    width: 214rpx;
-    height: 278rpx;
-}
-
-.group-item view:nth-child(2) {
-    font-size: 32rpx;
-    color: #E51C23;
-}
-
-.group-item view:nth-child(3) {
-    font-size: 28rpx;
-    color: #969595;
-    margin-top: 18rpx;
-}
-
-
-.group-item text {
-    margin-left: 10rpx;
-}
-
-.group-item #grade {
-    margin-top: 20rpx;
-    color: #000;
-    text-align: center;
-    font-size: 28rpx;
-}
-
-.Collage-bottom {
- display: flex;
- justify-content: space-around;
- align-items: center;
- height: 102rpx;
-}
-
-.Collage-bottom image {
-    width: 42rpx;
-    height: 50rpx;
-    vertical-align: middle;
-    margin-right: 30rpx;
-}
-
-.Collage-bottom text {
-    vertical-align: middle;
-}
-
-.group-item .group-num {
-    position: absolute;
-    left: 0;
-    top: 14rpx;
-    width: 100rpx;
-    height: 40rpx;
-}
-
-.group-item .group-num image {
-    width: 100%;
-    height: 100%;
-}
-
-.group-item .group-num text {
-    color: #fff;
-    position: absolute;
-    left: 6rpx;
-    top: 4rpx;
-    z-index: 3;
-    font-size: 24rpx;
-}

+ 0 - 395
pages/groupPage/grade-details/grade-details.js

@@ -1,395 +0,0 @@
-// pages/grade-details/grade-details.js
-import httpRequestApi from '../../../utils/APIClient';
-import util from '../../../utils/util';
-const app = getApp();
-Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    productId: '',
-    payList: [],
-    titleIcon: '',
-    title: '',
-    bookInfo: '',
-    lessonList: [],
-    content: [{
-        text: "转发给自己的朋友们",
-        color: "#000"
-      },
-      {
-        text: " 分享好课,追随您一起学习进步",
-        color: "#000"
-      },
-      {
-        text: " 您的魅力不是吹的!",
-        color: "#000"
-      },
-      {
-        text: `在限定时间内成功拼团,您将得到奖学金。`,
-        color: "#FF4600"
-      }
-    ],
-    // share: false,
-    isIPX: app.globalData.isIPX,
-    isIOS: app.globalData.isIOS,
-    flag: true,
-    knowFlag: true,
-    menuFlag: false,
-    modalType: "text",
-    isCloseShow: false,
-    modalText: [{
-        text: '您发起的团购尚未完成',
-        type: 'bigOrange'
-      },
-      {
-        text: '拼团成功,才能发起新的团购',
-        type: 'bigOrange'
-      },
-      {
-        text: '快喊朋友们一起助力',
-        type: 'bigOrange'
-      }
-    ],
-    isModalShow: false,
-    formIsANAsshole: true,
-    isPaying: false
-  },
-  //tab切换
-  tabSwitch: function (e) {
-    if(e.currentTarget.dataset.flag === "know" && this.data.knowFlag === false){
-      this.setData({
-        knowFlag: true,
-        menuFlag: false
-      })
-    }
-    if(e.currentTarget.dataset.flag === "menu" && this.data.menuFlag === false){
-      this.setData({
-        knowFlag: false,
-        menuFlag: true
-      })
-    }
-  },
-  onShow: function(){
-    this.setData({
-      haveTapMoney : false
-    })
-  },
-  //获取团购信息并掉起支付
-  pay: function (e) {
-    console.log(e)
-      if(this.data.haveTapMoney){
-        return false
-      }
-    this.setData({
-      haveTapMoney : true
-    })
-    const productId = this.data.productId;
-    const groupId = e.currentTarget.dataset.id;
-    const osType = this.data.isIOS ? 'IOS' : 'ANDROID';
-    const formId = e.detail.formId
-    //开始发起团购
-    this.setData({
-      isPaying: true
-    })
-    httpRequestApi.SendGroupPurchas({
-      productId,
-      groupId,
-      osType,
-      formId
-    }).success((res) => {
-      console.log('发起团购', res);
-      
-      if (res.data.message) {
-        if(res.data.code == '803'){
-          // this.setData({
-          //   modalType: 'text',
-          //   isModalShow: true
-          // })
-          wx.navigateTo({
-            url:`/pages/groupPage/my-group/my-group`
-          })
-        }else{
-          wx.showModal({
-            title: '提示',
-            content: res.data.message,
-            success(res) {
-              if (res.confirm) {
-                console.log('用户点击确定')
-              } else if (res.cancel) {
-                console.log('用户点击取消')
-              }
-            }
-          })
-        }
-     
-        return false;
-      }
-      this.setData({
-        orderId: res.data.data.groupPurchaseOrder.id
-      })
-      // 如果已经拥有当前课程,则无需支付,直接进入拼团成功页面
-      if (res.data.data.groupPurchaseOrder.groupType === 'PROMOTION') {
-        wx.navigateTo({
-          url: `/pages/groupPage/collage-details/collage-details?orderId=${res.data.data.groupPurchaseOrder.id}`
-        })
-        wx.setNavigationBarTitle({
-          title: '拼团详情'
-        })
-        // let that = this;
-        // wx.showModal({
-        //   title: '重新发起团购',
-        //   content: '您会获得奖励哦',
-        //   success() {
-        //     console.log(res)
-        //     that.popup.close();
-        //     if (res.data.data.groupPurchaseOrder.headCount !== 1) {
-        //       setTimeout(() => {
-        //         wx.redirectTo({
-        //           url: `/pages/groupPage/make-money/make-money?productId=${productId}&id=${res.data.data.groupPurchaseOrder.id}&groupId=${groupId}`
-        //         })
-        //         wx.setNavigationBarTitle({
-        //           title: '拼团详情'
-        //         })
-        //       }, 1800)
-        //     }
-        //   }
-        // })
-      } else if (this.data.isIOS) {
-        let that = this;
-        wx.navigateTo({
-          url: `/pages/groupPage/collage-details/collage-details?orderId=${that.data.orderId}`
-        })
-        wx.setNavigationBarTitle({
-          title: '拼团详情'
-        })
-        // wx.showModal({
-        //   title: '提示',
-        //   content: '开团成功',
-        //   success(res) {
-        //     console.log(res)
-        //     that.popup.close();
-        //     setTimeout(() => {
-        //       wx.navigateTo({
-        //         url: `/pages/groupPage/collage-details/collage-details?orderId=${that.data.orderId}`
-        //       })
-        //       wx.setNavigationBarTitle({
-        //         title: '拼团详情'
-        //       })
-        //     }, 1800)
-        //   }
-        // })
-      } else {
-        //掉起支付
-        console.log(res.data.data.groupPurchaseOrder)
-        this.setData({
-          groupCount:res.data.data.groupPurchaseOrder.headcount
-        })
-        // this.prePayMap(res.data.data.prePayMap, res.data.data.groupPurchaseOrder.id, res.data.data.groupPurchaseOrder.headcount);
-        this.prePayMap(res.data.data.prePayMap, res.data.data.groupPurchaseOrder.id);
-      }
-
-    }).fail((error) => {
-
-    })
-  },
-  //支付
-  prePayMap: function (prePayMap, orderId, num) {
-    // this.setData({
-    //   modalType: 'image',
-    //   isModalShow: true
-    // })
-    // return
-   
-    console.log(prePayMap)
-    console.log(orderId)
-    console.log(num)
-    const that = this;
-    //console.log(new Date().getTime())
-    wx.requestPayment({
-      'appId': prePayMap.appId,
-      'timeStamp': prePayMap.timeStamp,
-      'nonceStr': prePayMap.nonceStr,
-      'package': prePayMap.package,
-      'signType': 'MD5',
-      'paySign': prePayMap.sign,
-      'success': function (res) {
-        that.setData({
-          modalType: 'image',
-          isModalShow: true,
-          haveTapMoney: false
-        })
-        console.log('支付成功', res)
-        // wx.showModal({
-        //   title: '提示',
-        //   content: '支付成功',
-        //   success(res) {
-        //     if (num !== 1) {
-        //       that.popup.close();
-        //       setTimeout(() => {
-        //         wx.navigateTo({
-        //           url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}`
-        //         })
-        //         wx.setNavigationBarTitle({
-        //           title: '拼团详情'
-        //         })
-        //       }, 1800)
-        //     } else {
-        //       wx.redirectTo({
-        //         url: `/pages/groupPage/grade-details/grade-details?productId=${that.data.productId}`
-        //       })
-        //     }
-
-        //   }
-        // })
-
-      },
-      'fail': function (res) {
-        console.log('支付失败', res)
-        that.setData({
-          haveTapMoney: false
-        })
-      }
-    })
-  },
-  showAlert: function () {
-    this.setData({
-      alertFlag: !this.data.alertFlag
-    })
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    console.log(options)
-    if (options.goBackHome) {
-      this.setData({
-        goBackHome: true,
-        alertFlag:true
-      })
-    }
-    // const productId = options.productId;
-    this.getBookInfo(options.productId);
-    // if(this.data.isIOS){
-    //   this.areYouBookSuper('IOS',options.productId)
-    // } else {
-    //   this.areYouBookSuper('ANDROID',options.productId)
-    // }
-    
-    // this.getGroupInfo(options.productId)
-    // if (productId) {
-    this.setData({
-      productId: options.productId
-    })
-    // }
-
-  },
-  // 课本鉴权
-  areYouBookSuper: function (os,productId) {
-    // const productArr = [];
-    // productArr.push(productId);
-    httpRequestApi.areYouSuperSecond(os,productId).success(res => {
-      console.log(res)
-      this.setData({
-        imSuper: res.data.data.auth ? true : false,
-        lastThreeYears: res.data.data.auth ? util.addThreeYears(res.data.data.auth.endTime) : false,
-        knowFlag: res.data.data.auth ? false : true,
-        menuFlag: res.data.data.auth ? true : false,
-        haveCreatedHelp: res.data.data.createdShare, // 创建过助力团
-        haveJoinHelp: res.data.data.joinShare, // 参加过助力团
-        haveJoinNormal: res.data.data.joinOrder, // 参加过支付团
-        tasteDay: res.data.data.auth ? ((res.data.data.auth.endTime - res.data.data.currentTime) / 86400000).toFixed(0) : ''
-
-      })
-      console.log(this.data.imSuper)
-      console.log(this.data.lastThreeYears)
-    })
-  },
-  getBookInfo: function (productId) {
-    //课本详情
-    httpRequestApi.getBookDetail(wx.getStorageSync('uid'), productId).success((res) => {
-      console.log('课本详情', res.data.data);
-      const bookInfo = res.data.data.product;
-      const lessonList = res.data.data.lessonList;
-      wx.setNavigationBarTitle({
-        title: '语文 ' + bookInfo.subTitle
-      })
-      const data = app.towxml.toJson(
-        bookInfo.description,
-        'markdown',
-        this
-      )
-      this.setData({
-        titleIcon: bookInfo.bgImg,
-        title: bookInfo.title,
-        bookInfo: bookInfo.description,
-        article: data
-      })
-      const lessonTemp = [];
-      lessonList.forEach(item => {
-        const temp = {};
-        temp.id = item.id;
-        temp.title = item.title;
-        temp.readNum = item.readCount;
-        lessonTemp.push(temp);
-      });
-      this.setData({
-        lessonList: lessonTemp
-      });
-      httpRequestApi.userIntoPage('pages/groupPage/grade-details/grade-details','课本详情页面').success((res)=>{
-        
-      })
-    })
-  },
-  getGroupInfo: function (productId) {
-    //团购内容
-    httpRequestApi.getGroupPurchaseInfo(productId).success((res) => {
-      console.log(res)
-      this.setData({
-        payList: res.data.data
-      })
-    })
-  },
-  goToClass: function (e) {
-    let id = e.currentTarget.dataset.id;
-    let title = e.currentTarget.dataset.title;
-    wx.navigateTo({
-      url: `../../main/class/class?id=${id}&title=${title}`
-    })
-  },
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-    //获取弹窗组件
-    this.popup = this.selectComponent("#popup");
-  },
-  modalConfirmHandler: function(){
-    this.setData({
-      isModalShow: false
-    })
-    if(this.data.modalType === 'image'){
-      if (this.data.groupCount !== 1) {
-        // this.popup.close();
-        setTimeout(() => {
-          wx.navigateTo({
-            url: `/pages/groupPage/collage-details/collage-details?orderId=${this.data.orderId}`
-          })
-          wx.setNavigationBarTitle({
-            title: '拼团详情'
-          })
-        }, 200)
-      } else {
-        wx.redirectTo({
-          url: `/pages/groupPage/grade-details/grade-details?productId=${this.data.productId}`
-        })
-      }
-    }
-  },
-  modalCloseHandler: function(){
-    this.setData({
-      isModalShow: false
-    })
-  }
-})

+ 0 - 9
pages/groupPage/grade-details/grade-details.json

@@ -1,9 +0,0 @@
-{
-    "component": true,
-    "usingComponents": {
-        "popup": "/component/popup/popup",
-        "myModal": "/component/myModal/myModal",
-        "goBackHome": "/component/goBackHome/goBackHome",
-        "myToast": "/component/myToast/myToast"
-    } 
-}

+ 0 - 100
pages/groupPage/grade-details/grade-details.wxml

@@ -1,100 +0,0 @@
-<!-- pages/grade-details/grade-details.wxml -->
-<view class="group-details">
-    <scroll-view scroll-y="{{true}}">
-        <view class="grade-details">
-            <image src="{{titleIcon}}"></image>
-            <!-- <text class="lastThreeYears" wx:if="{{lastThreeYears}}">使用期限至:{{lastThreeYears}}</text> -->
-        </view>
-        <view class="catalog">
-            <!-- <image class="bg2" src="../../../static/groupImg/Rectangle_9.png"></image>  -->
-            <view class="switch {{knowFlag ? 'select' : ''}}" data-flag="know" bindtap="tabSwitch">
-                <image src="../../../static/image/know_menu_bg.jpg" wx:if="{{knowFlag}}"></image> 
-                <text >您需要知道</text>  
-            </view>
-              
-            <view class="switch {{menuFlag ? 'select' : ''}}" bindtap="tabSwitch" data-flag="menu" bindtap="tabSwitch">
-                <image src="../../../static/image/know_menu_bg.jpg" wx:if="{{menuFlag}}"></image> 
-                <text >课文目录</text>  
-            </view>
-        </view>
-        <view class="catalog-list" hidden="{{!menuFlag}}">
-            <view class="catalog-item" wx:for="{{lessonList}}" wx:key="{{index}}" data-id="{{item.id}}" data-title="{{item.title}}" bindtap="goToClass">
-                <text class="left">{{item.title}}</text>
-                <view class="right">
-                    <!-- <image src="../../../static/image/play.png"></image>
-                    <text>{{item.readNum}}</text> -->
-                    <image src="../../../static/image/to.png"></image>
-                </view>
-            </view>
-        </view>
-        <!-- 你需要知道 -->
-        <view class="know" hidden="{{!knowFlag}}">
-            <import src="../../../towxml/entry.wxml" />
-            <template is="entry" data="{{...article}}" />
-        </view>
-    </scroll-view>
-    <!-- 安卓界面 -->
-    <!-- <view class="group-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{!isIOS ? haveJoinNormal ? false : haveCreatedHelp  ? false : haveJoinHelp ? true : true : false}}">
-    <image class="btn-image" src="../../../static/groupImg/group_in_ios.jpg" />
-        <image class="bg1" src="../../../static/groupImg/baise.png"></image>
-        <block wx:for="{{payList}}" wx:key="{{index}}">
-            <form class="Price" bindsubmit="pay" report-submit="{{formIsANAsshole}}" data-id="{{item.id}}" wx:if="{{item.headcount === 5 ? false : true }}">
-                <text class="formFit two-line-1">{{item.price / 100}}元</text>
-                <text class="formFit two-line-2">{{item.headcount == '1' ? '单人购买' : '开团获得使用权'}}
-                </text>
-                <button class="formBtn" form-type="submit"></button>
-            </form>
-        </block>
-    </view> -->
-    <!-- ios界面 -->
-    <!-- <view class="group-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{isIOS ? haveCreatedHelp ? false : haveJoinNormal ? false : true :false }}">
-        <image class="btn-image" src="../../../static/groupImg/group_in_ios.jpg" />
-        <block wx:for="{{payList}}" wx:key="{{index}}" wx:if="{{!imSuper}}">
-            <form class="Price" bindsubmit="pay" report-submit="{{formIsANAsshole}}" data-id="{{item.id}}" wx:if="{{index != 0 && index != 2 }}">
-                <text class="formFit one-line-text">邀请好友助力获得本课使用权</text>
-                <button class="formBtn" form-type="submit"></button>
-            </form>
-        </block> -->
-        <!-- ios 七天权限的界面-->
-        <!-- <block wx:for="{{payList}}" wx:key="{{index}}"  wx:if="{{imSuper && haveJoinHelp}}">
-            <form class="Price" bindsubmit="pay" report-submit="{{formIsANAsshole}}" data-id="{{item.id}}" wx:if="{{item.headcount == 1 || item.headcount == 5 ? false : true }}">
-                 <text class="formFit two-line-2">试用期还有{{tasteDay}}天</text>
-                <text class="formFit two-line-1">邀请好友助力获得本课使用权</text>
-                <button class="formBtn" form-type="submit"></button>
-            </form>
-        </block> -->
-        <!-- ios 三年权限的界面 支持继续开团 -->
-        <!-- <block wx:for="{{payList}}" wx:key="{{index}}" wx:if="{{imSuper && !haveJoinHelp}}">
-            <form class="Price" bindsubmit="pay" report-submit="{{formIsANAsshole}}" data-id="{{item.id}}" wx:if="{{index != 0 && index != 2 }}">
-                <text class="formFit one-line-text">好东西要分享给好朋友</text>
-                <button class="formBtn" form-type="submit"></button>
-            </form>
-        </block>
-    </view> -->
-    <!-- 已有权限的界面 安卓 -->
-    <!-- <view class="group-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{!isIOS ? haveJoinNormal ? true : haveCreatedHelp ? true : false : false}}">
-        <image class="btn-image" src="../../../static/groupImg/group_in_ios.jpg" />
-        <block wx:for="{{payList}}" wx:key="{{index}}">
-            <form class="Price" bindsubmit="pay" report-submit="{{formIsANAsshole}}" data-id="{{item.id}}" wx:if="{{index != 0 && index != 2 }}">
-                <view>继续开团赚取奖学金吧</view>
-                <button class="formBtn" form-type="submit"></button>
-            </form>
-        </block>
-    </view> -->
-    <!-- 已有权限的界面 并且是ios-->
-    <!-- <view class="group-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{isIOS ? haveCreatedHelp ? false : haveJoinHelp ? true : false : false  }}">
-        <image class="btn-image" src="../../../static/groupImg/group_in_ios.jpg" />
-        <!-- <image class="bg1" style="left: 50%" src="../../../static/groupImg/baise.png"></image> -->
-        <!-- <block wx:for="{{payList}}" wx:key="{{index}}">
-            <form class="Price" bindsubmit="pay" report-submit="{{formIsANAsshole}}" data-id="{{item.id}}" wx:if="{{item.headcount == 1 || item.headcount == 5 ? false : true }}">
-                 <text class="formFit two-line-2">试用期还有n天</text>
-                <text class="formFit two-line-1">邀请好友助力获得本课使用权</text>
-                <button class="formBtn" form-type="submit"></button>
-            </form>
-        </block> -->
-    <!-- </view>  -->
-</view>
-<popup id="popup" typeOf="sendSuccess" title="报告团长" headTextOne="您发起的团购已经成立" headTextTwo="订单号:{{orderId}}" content="{{content}}"></popup>
-<myModal id="myModal" type="{{modalType}}" isCloseShow="{{isCloseShow}}" text="{{modalText}}" wx:if="{{isModalShow}}" bindconfirm="modalConfirmHandler" bindclose="modalCloseHandler" />
-<goBackHome id="goBackHome" shareType="{{goBackHome}}" wx:if="{{goBackHome}}" />
-<myToast bindShowAlert="showAlert" noRightRules="2"  wx:if="{{alertFlag}}" />

+ 0 - 227
pages/groupPage/grade-details/grade-details.wxss

@@ -1,227 +0,0 @@
-/* pages/grade-details/grade-details.wxss */
-/**基础风格样式**/
-@import '../../../towxml/style/main.wxss';
-
-
-/**如果页面有动态主题切换,则需要将使用到的样式全部引入**/
-
-/**主题配色(浅色样式)**/
-@import '../../../towxml/style/theme/light.wxss';
-
-/**主题配色(深色样式)**/
-@import '../../../towxml/style/theme/dark.wxss';
-
-.group-details {
-    height: 100%;
-    width: 100%;
-    background: rgba(240, 241, 245, 1);
-}
-
-
-scroll-view {
-    /* height: 98%; */
-    height: 100%;
-    width: 100%;
-}
-
-.grade-details {
-    background: #fff;
-    display: flex;
-    flex-direction: column;
-    padding: 24rpx 24rpx 24rpx 24rpx;
-}
-
-.grade-details image {
-    width: 100%;
-    height: 290rpx;
-    border-radius: 20rpx;
-}
-
-.catalog {
-    display: flex;
-    align-items: flex-end;
-    width: 100%;
-    height: 100rpx;
-    background: #fff;
-    position: relative;
-    background: rgba(240, 241, 245, 1);
-    padding: 0 40rpx;
-
-}
-.select{
-    color: #61CA54
-}
-
-.switch text {
-    flex: 1;
-    height: 60rpx;
-    text-align: center;
-    font-size: 36rpx;
-    /* margin: 0 90rpx; */
-    box-sizing: border-box;
-    position: relative;
-    z-index: 1;
-    width: 100%;
-    display: block;
-    line-height:66rpx;
-}
-
-.switch {
-    width: 335rpx;
-    height: 70rpx;
-    position: relative;
-}
-
-.switch image {
-    width: 100%;
-    height: 100%;
-    position: absolute;
-    left: 0;
-    top: 0;
-    z-index: 0;
-}
-.catalog-list {
-    width: 100%;
-    padding: 0 18rpx 18rpx 18rpx ;
-    margin-bottom: 120rpx;
-    box-sizing: border-box;
-
-}
-
-.know {
-    padding: 18rpx 18rpx 120rpx 18rpx;
-    box-sizing: border-box;
-    background: #fff;
-    /* margin-top: 12rpx; */
-}
-
-.catalog-item {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    width: 100%;
-    height: 88rpx;
-    background: #fff;
-    padding: 0 20rpx;
-    box-sizing: border-box;
-    margin-bottom: 12rpx;
-    border-radius: 10rpx;
-}
-
-.lastThreeYears {
-    width: 100%;
-    height: 22rpx;
-    line-height: 26rpx;
-    padding-right: 6rpx;
-    box-sizing: border-box;
-    font-size: 16rpx;
-    color: #939393;
-    text-align: right;
-}
-
-.catalog-item .left {
-    color: #656565;
-    font-size: 36rpx;
-}
-
-.catalog-item .right {
-    color: #939393;
-    font-size: 28rpx;
-}
-
-.catalog-item .right image {
-    width: 16rpx;
-    height: 28rpx;
-    vertical-align: middle;
-    margin-right: 6rpx;
-}
-
-.catalog-item .right text {
-    vertical-align: middle;
-}
-
-.group-btn {
-    width: 100%;
-    height: 102rpx;
-    background: none;
-    display: flex;
-    position: absolute;
-    bottom: 0;
-    color: #fff;
-}
-/* .noBg{
-    background: none;
-} */
-.bottomx {
-    bottom: 20rpx;
-}
-
-.group-btn .Price {
-    position: relative;
-    flex: 1;
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    align-items: center;
-    z-index: 1;
-}
-.group-btn .btn-image{
-    position: absolute;
-    width: 100%;
-    height: 100%;
-    left: 0;
-    top: 0;
-    z-index: 0;
-}
-/* .group-btn .Price text:nth-child(1) {
-    font-size: 28rpx;
-}
-
-.group-btn .Price text:nth-child(2) {
-    font-size: 32rpx;
-} */
-.group-btn .Price .one-line-text{
-    font-size: 40rpx;
-}
-.two-line-1{
-    font-size: 32rpx;
-}
-.two-line-2{
-    font-size: 28rpx;
-}
-.group-btn .bg1,
-.group-btn .bg2 {
-    position: absolute;
-    top: 14rpx;
-    width: 4rpx;
-    height: 70%;
-}
-
-.group-btn .bg1 {
-    left: 50%;
-}
-
-.group-btn .bg2 {
-    left: 68%;
-}
-
-.formFit {
-    display: block;
-    text-align: center;
-}
-
-.formBtn {
-    margin: 0;
-    padding: 0;
-    background: rgba(255, 255, 255, 0);
-    width: 100%;
-    position: absolute;
-    top: 0;
-    height: 100%;
-    left: 0;
-
-}
-
-.formBtn::after {
-    border: none;
-}

+ 0 - 486
pages/groupPage/group-details/group-details.js

@@ -1,486 +0,0 @@
-// pages/group-details/group-details.js
-import {
-  getOpenidSessionKey
-} from '../../../utils/httpUtil';
-import httpRequestApi from '../../../utils/APIClient';
-import util from '../../../utils/util';
-const app = getApp();
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    titleIcon: '',
-    title: '',
-    bookInfo: '',
-    lessonList: [],
-    surplusNum: '',
-    joinUserList: [],
-    surplusList: [],
-    timeList: [],
-    productId: '',
-    groupId: '',
-    orderId: '',
-    typeOf: '',
-    titles: '',
-    headTextOne: '',
-    headTextTwo: '',
-    content: [],
-    organizer: '',
-    hide: true,
-    isIPX: app.globalData.isIPX,
-    flag: true,
-    colonelName: '',
-    article: '',
-    alertFlag: false,
-    stillGoing: true,
-    surplusNum: '1',
-    timeList: ['6', '6', '6'],
-    modalType: "image",
-    isModalShow: false,
-    modalCloseShow: false,
-    modalText: [{
-        text: '您已经参加过本次团购',
-        type: 'bigOrange'
-      },
-      {
-        text: '快喊朋友们一起助力',
-        type: 'bigOrange'
-      }
-    ],
-    groupStatus: false,
-    formIsANAsshole: true,
-    dataLoading: true,
-    isLoading: false,
-    isIOS: app.globalData.isIOS,
-    damnDialogLine1: '您已拥有本课三年使用权或曾获得过体验权',
-    // damnDialogLine2:'',
-    damnDialogShow: false,
-    knowFlag: true,
-    menuFlag: false,
-    ifGroupSuccessed: false,
-    groupOSType: 'IOS',
-    hideBottomBtn: true
-  },
-  //tab切换
-  //tab切换
-  tabSwitch: function (e) {
-    if (e.currentTarget.dataset.flag === "know" && this.data.knowFlag === false) {
-      this.setData({
-        knowFlag: true,
-        menuFlag: false
-      })
-    }
-    if (e.currentTarget.dataset.flag === "menu" && this.data.menuFlag === false) {
-      this.setData({
-        knowFlag: false,
-        menuFlag: true
-      })
-    }
-  },
-  jurisdiction: function () {
-    //隐藏弹框
-    this.setData({
-      hide: !this.data.hide
-    })
-    //登录页信息
-    this.onLoad(this.data.onLoadOption);
-  },
-  //参团
-  jionGroup: function (e) {
-    console.log(this.data.haveTapJoin)
-    if (this.data.haveTapJoin) {
-      return false
-    }
-    this.setData({
-      haveTapJoin: true
-    })
-    const orderId = this.data.orderId;
-    const formId = e.detail.formId
-    console.log(e)
-    //开始发起团购
-    httpRequestApi.JoinGroupPurchas(orderId, formId).success((res) => {
-      console.log('参加团购', res);
-      if (res.data.message) {
-        switch (res.data.code) {
-          case 801:
-            this.setData({
-              isModalShow: true,
-              modalType: 'text',
-              haveTapJoin: false
-            })
-            break;
-          case 802:
-            this.setData({
-              damnDialogShow: true,
-              haveTapJoin: false
-            })
-            break;
-          case 806:
-            console.log(this.data.haveTapJoin)
-            wx.pageScrollTo({
-              scrollTop: 0,
-              duration: 17
-            })
-            this.setData({
-              alertFlag: true,
-              haveTapJoin: false
-            })
-            break;
-          default:
-            wx.showModal({
-              title: '提示',
-              content: res.data.message,
-              success(res) {
-                if (res.confirm) {
-                  console.log('用户点击确定')
-                } else if (res.cancel) {
-                  console.log('用户点击取消')
-                }
-                this.setData({
-                  haveTapJoin: false
-                })
-              }
-            })
-            break;
-        }
-        return false;
-      }
-      //掉起支付
-      if (res.data.data.groupPurchaseOrder.os === 'IOS') {
-        this.getGroupInfo(res.data.data.groupPurchaseOrder.id);
-      } else {
-        this.prePayMap(res.data.data.prePayMap);
-      }
-    })
-  },
-  showAlert: function () {
-    this.setData({
-      alertFlag: !this.data.alertFlag
-    })
-  },
-  //支付
-  prePayMap: function (prePayMap) {
-    console.log(prePayMap)
-    wx.requestPayment({
-      'appId': prePayMap.appId,
-      'timeStamp': prePayMap.timeStamp,
-      'nonceStr': prePayMap.nonceStr,
-      'package': prePayMap.package,
-      'signType': 'MD5',
-      'paySign': prePayMap.sign,
-      'success': res => {
-        this.setData({
-          isModalShow: true,
-          haveTapJoin: false
-        })
-      },
-      'fail': res => {
-        console.log('支付失败', res)
-        this.setData({
-          haveTapJoin: false
-        })
-      }
-    })
-  },
-  //拼团详情
-  getGroupInfo: function (orderId) {
-    httpRequestApi.getMygroupInfo(orderId).success(res => {
-      const groupOrder = res.data.data.groupPurchaseOrder;
-      if (groupOrder.os === 'ANDROID' && app.globalData.isIOS) {
-        wx.redirectTo({
-          url: `/pages/groupPage/grade-details/grade-details?productId=${res.data.data.groupPurchaseOrder.productId}&goBackHome=1`
-        })
-        return;
-      }
-      // 团员进入collage页面
-      const myUid = wx.getStorageSync('uid');
-      if (myUid === groupOrder.organizer) {
-        wx.redirectTo({
-          url: `../collage-details/collage-details?orderId=${orderId}&goBackHome=${this.data.goBackHome}`
-        })
-        return;
-      }
-      res.data.data.joinUserList.forEach(item => {
-        if (item.uid === myUid) {
-          wx.redirectTo({
-            url: `../collage-details/collage-details?orderId=${orderId}&goBackHome=${this.data.goBackHome}`
-          })
-          return;
-        }
-      })
-
-
-
-      const surplusNum = groupOrder.headcount - groupOrder.joinCount;
-      this.setData({
-        organizerUid: groupOrder.organizer,
-        ifGroupSuccessed: groupOrder.status === 'SUCCESSED' ? true : false
-      })
-
-      for (var i = 0; i < surplusNum; i++) {
-        this.data.surplusList.push(1);
-      }
-      // 剩余时间 如果团购已结束则不显示
-      let timeLast = '';
-      const stillGoing = groupOrder.closeTime - Date.parse(new Date()) <= 0 ? false : true
-      if (stillGoing) {
-        timeLast = util.lastHours(groupOrder.closeTime - Date.parse(new Date()));
-      }
-      this.setData({
-        groupPurchaseInfo: res.data.data.groupPurchaseInfo,
-        organizer: res.data.data.organizer,
-        surplusNum,
-        joinUserList: res.data.data.joinUserList,
-        surplusList: this.data.surplusList,
-        timeLast,
-        stillGoing,
-        productId: groupOrder.productId,
-        groupId: groupOrder.groupId,
-        rewardMoney: res.data.data.groupPurchaseInfo.organizerPrice / 100,
-        dataLoading: false,
-        groupOsType: groupOrder.os,
-        isLoading: false
-      })
-      if (this.data.article === '') {
-        this.getBooksInfo(res.data.data.groupPurchaseOrder.productId)
-      }
-      httpRequestApi.userIntoPage('pages/groupPage/group-details/group-details','团购详情页面').success((res)=>{
-        
-      })
-      if (groupOrder.groupType === 'PROMOTION') {
-        this.setData({
-          colonelName: res.data.data.organizer.wechatName,
-          promotion: true
-          // joinUserList: this.data.joinUserList
-        })
-      }
-    })
-
-  },
-  // 去详情页面
-  goToDetail: function (detailId) {
-    setTimeout(() => {
-      wx.redirectTo({
-        url: `/pages/groupPage/collage-details/collage-details?orderId=${this.data.orderId}&goBackHome=true`
-      })
-      wx.setNavigationBarTitle({
-        title: '拼团详情'
-      })
-    }, 1000)
-  },
-  //跳到课程
-  goToClass: function (e) {
-    let id = e.currentTarget.dataset.id;
-    let title = e.currentTarget.dataset.title;
-    wx.navigateTo({
-      url: `../../main/class/class?id=${id}&title=${title}`
-    })
-  },
-
-  //再次发起团
-  group: function () {
-    // const orderId = this.data.orderId;
-    // this.goToDetail(orderId);
-    wx.navigateTo({
-      url: `/pages/groupPage/grade-details/grade-details?productId=${this.data.productId}`
-    })
-    //拼团是否成功并弹窗
-    // httpRequestApi.groupSuccess(orderId).success(res => {
-    //   console.log('团购是否成功', res.data.data)
-    //   debugger;
-    //   const status = res.data.data.status;
-    //   const uid = res.data.data.uid;
-    // }).fail(error => {
-    //   console.log('错误', eroor)
-    // })
-    //this.openGroup();
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    console.log(this.data.isIOS)
-    this.setData({
-      options:options
-    })
-    if (options.scene || options.shareId) {
-      console.log(123)
-      this.setData({
-        isLoading: true
-      })
-    }
-    
-    console.log('onload', options)
-    wx.setNavigationBarTitle({
-      title: '拼团详情'
-    })
-    getOpenidSessionKey((res) => {
-      if (options.orderId) {
-        const orderId = options.id;
-        this.setData({
-          orderId
-        })
-        this.getGroupInfo(orderId);
-      } else {
-        // 从分享页面进入的
-        const orderId = options.productId ? options.productId : options.scene ? options.scene.replace('QR', '') : options.shareId;
-        this.setData({
-          orderId
-        })
-        this.getGroupInfo(orderId);
-      }
-      if (options.scene || options.shareId) {
-        this.setData({
-          goBackHome: true
-        })
-
-      }
-    }, (error) => {
-      wx.setStorageSync('userSourseType','group')
-      this.setData({
-        hide: !this.data.hide,
-        onLoadOption: options
-      })
-      return;
-    });
-  },
-  // 页面滚动
-  pageScroll: function (e) {
-    console.log(e.target.offsetTop)
-    if (e.target.offsetTop < 600) {
-      this.setData({
-        hideBottomBtn: true
-      })
-    }
-    if (e.target.offsetTop > 600) {
-      this.setData({
-        hideBottomBtn: false
-      })
-    }
-    // if(e.target.offsetTop > 600){
-    //   this.setData({
-    //     btnClass: 'middle-btn'
-    //   })
-    // }
-  },
-  // 鉴权
-  areYouSuperSecond: function (productId) {
-    httpRequestApi.areYouSuperSecond(productId).success(() => {
-      console.log(res)
-      this.setData({
-        imSuper: res.data.data.auth ? true : false,
-        haveCreatedHelp: res.data.data.createdShare, // 创建过助力团
-        haveJoinHelp: res.data.data.joinShare, // 参加过助力团
-      })
-    });
-      // 增加一条记录
-    const data = {
-      "shareTypeEnum": "POSTER",
-      "shareContentEnum": "GROUP",
-      "productId": productId
-    }
-    if (this.data.option.shareId) {
-      data.shareTypeEnum = 'LINK'
-      httpRequestApi.shareTagRecord(data).success(res => {
-        console.log(res)
-      })
-    }
-    if (this.data.option.scene) {
-      httpRequestApi.shareTagRecord(data).success(res => {
-        console.log(res)
-      })
-    }
-  },
-
-
-  // 下拉刷新
-  onPullDownRefresh: function () {
-    //当前在团购页下拉加载
-    this.setData({
-      surplusList: []
-    }, () => {
-      this.getGroupInfo(this.data.orderId);
-    })
-    wx.showNavigationBarLoading() //在标题栏中显示加载
-    //模拟加载
-    setTimeout(function () {
-      wx.hideNavigationBarLoading() //完成停止加载
-      wx.stopPullDownRefresh() //停止下拉刷新
-    }, 1500);
-  },
-  // 获取课本详情
-  getBooksInfo: function (productId) {
-    //课本详情
-    httpRequestApi.getBookDetail(wx.getStorageSync('uid'), productId).success((res) => {
-      console.log('课本详情', res.data.data);
-      const bookInfo = res.data.data.product;
-      const lessonList = res.data.data.lessonList;
-      const data = app.towxml.toJson(
-        bookInfo.description,
-        'markdown',
-        this
-      )
-      this.setData({
-        titleIcon: bookInfo.bgImg,
-        title: bookInfo.title,
-        bookInfo: bookInfo.description,
-        article: data
-      })
-      const lessonTemp = [];
-      lessonList.forEach(item => {
-        const temp = {};
-        temp.id = item.id;
-        temp.title = item.title;
-        temp.readNum = item.readCount;
-        lessonTemp.push(temp);
-      });
-      this.setData({
-        lessonList: lessonTemp,
-      });
-    }).fail((error) => {
-
-    })
-    // //全部课本
-    // httpRequestApi.getAllBooks(1, 10).success((res) => {
-    //   console.log('全部课', res.data.data.list)
-    //   res.data.data.list.forEach(element => {
-    //     this.data.selectFlag.push(true);
-    //   });
-    //   this.setData({
-    //     bookList: res.data.data.list,
-    //     selectFlag: this.data.selectFlag
-    //   })
-    // }).fail((error) => {
-    //   console.log('错误', error)
-    // })
-  },
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-    this.popup = this.selectComponent("#popupup");
-  },
-  judgeUser: function (callBack) {
-
-  },
-  modalConfirmHandler: function () {
-    this.setData({
-      isModalShow: false
-    })
-    if (this.data.modalType === 'image') {
-      this.goToDetail();
-    }
-
-  },
-  modalCloseHandler: function () {
-    this.setData({
-      isModalShow: false
-    })
-    if (this.data.modalType === 'image') {
-      this.goToDetail();
-    }
-  },
-})

+ 0 - 10
pages/groupPage/group-details/group-details.json

@@ -1,10 +0,0 @@
-{
-    "component": true,
-    "usingComponents": {
-        "popup": "/component/popup/popup",
-        "Dialog": "/component/dialog/dialog",
-        "goBackHome": "/component/goBackHome/goBackHome",
-        "myToast": "/component/myToast/myToast",
-        "myModal": "/component/myModal/myModal"
-    }
-}

+ 0 - 134
pages/groupPage/group-details/group-details.wxml

@@ -1,134 +0,0 @@
-<!-- pages/group-details/group-details.wxml -->
-<view class="group-details" ontouchmove="pageScroll" enable-back-to-top="{{true}}">
-    <view class="loading" wx:if="{{isLoading}}">
-        <view class="loading-text">Loading...</view>
-    </view>
-    <view class="green-placerholder"></view>
-    <image class="class-icon" src="{{groupPurchaseInfo.bgImg}}" />
-    <view class="details-head">
-        <!-- 剩余时间盒子 -->
-        <view class="last-time-box" wx:if="{{!dataLoading}}" >
-            <view class="last-time" hidden="{{ifGroupSuccessed || !stillGoing}}">
-                <image class="left-icon" src="../../../static/groupImg/right_icon.png" />
-                <text class="last-time-end">距结束</text>
-                <image class="right-icon" src="../../../static/groupImg/left_icon.png" />
-            </view>
-            <view class="last-text" hidden="{{ifGroupSuccessed || !stillGoing}}">{{timeLast}}</view>
-            <view class="last-text" wx:if="{{ifGroupSuccessed || !stillGoing}}">{{groupOsType === 'IOS' ? '助力' : '团购'}}已结束</view>
-        </view>
-        
-        <!-- 还剩几人参团 -->
-        <view class="last-member" wx:if="{{!ifGroupSuccessed}}">
-            <view class="group-regular-text" hidden="{{surplusNum == '0' || !stillGoing}}">
-                <view wx:if="{{surplusNum == '2'}}">
-                    你{{groupOsType === 'IOS' ? '助力' : '参团'}}后,就还差
-                    <text class="red-text">1</text>
-                    位
-                </view>
-                <view wx:else>
-                    还剩
-                    <text class="red-text">{{surplusNum}}</text>
-                    位好友{{groupOsType === 'IOS' ? '助力' : '参团'}}
-                </view>
-            </view>
-            <view class="group-organizer group-regular-text">
-                <!-- ios分销团提示小红花 安卓分销团提示获得本课 -->
-                <view wx:if="{{groupOsType === 'IOS'&& !colonelName}}">
-                    即可助力团长
-                    <text class="red-text">{{organizer.wechatName}}</text>
-                    获得本课
-                </view>
-                <view wx:if="{{groupOsType === 'ANDROID'}}">即可拼团成功</view>
-                <view wx:if="{{groupOsType === 'IOS' && colonelName}}">
-                    即可助力团长{{colonelName}}获得100朵
-                    <image class="flower-inline" src="../../../static/image/flower_small.png" />
-                </view>
-            </view>
-            <view class="group-regular-text" hidden="{{stillGoing}}">团购已超过时限</view>
-            <view class="group-regular-text" hidden="{{surplusNum != '0'}}">
-                {{groupOsType === 'IOS' ? '助力' : '团购'}}成功!快去朗读吧
-            </view>
-        </view>
-        <!-- 头像 -->
-        <view class="headImg">
-            <block wx:for="{{joinUserList}}" wx:key="{{index}}">
-                <view class="headImg-item bg-boder">
-                    <view wx:if="{{organizerUid == item.uid}}" class="organizerIcon">团长</view>
-                    <image src="{{item.avatar}}"></image>
-                </view>
-            </block>
-            <block wx:for="{{surplusList}}" wx:key="{{index}}">
-                <view class="headImg-item">
-                    <image src="../../../static/groupImg/no_head.png"></image>
-                </view>
-            </block>
-        </view>
-        <view class="data-loading" wx:if="{{dataLoading}}">
-            <view class="line1"></view>
-            <view class="line2"></view>
-            <view class="line3"></view>
-        </view>
-        <form class="invitation-btn" report-submit="{{formIsANAsshole}}" bindsubmit="jionGroup" wx:if="{{!stillGoing || !ifGroupSuccessed}}">
-            <text>我要{{groupOsType === 'IOS' ? '助力' : '参团'}}</text>
-            <button class="formBtn" form-type="submit"></button>
-        </form>
-    </view>
-    <view scroll-y="{{true}}" wx:if="{{!isLoading}}">
-        <view class="catalog">
-            <view class="switch {{knowFlag ? 'select' : ''}}" data-flag="know" bindtap="tabSwitch">
-                <image src="../../../static/image/know_menu_bg.jpg" wx:if="{{knowFlag}}"></image>
-                <text>您需要知道</text>
-            </view>
-            <view class="switch {{menuFlag ? 'select' : ''}}" bindtap="tabSwitch" data-flag="menu" bindtap="tabSwitch">
-                <image src="../../../static/image/know_menu_bg.jpg" wx:if="{{menuFlag}}"></image>
-                <text>课文目录</text>
-            </view>
-        </view>
-        <view class="catalog-list" hidden="{{!menuFlag}}">
-            <view class="catalog-item" wx:for="{{lessonList}}" wx:key="{{index}}" data-id="{{item.id}}" data-title="{{item.title}}" bindtap="goToClass">
-                <text class="left">{{item.title}}</text>
-                <view class="right">
-                    <image src="../../../static/image/to.png"></image>
-                </view>
-            </view>
-        </view>
-        <view class="know" hidden="{{!knowFlag}}">
-            <import src="../../../towxml/entry.wxml" />
-            <template is="entry" data="{{...article}}" />
-        </view>
-    </view>
-</view>
-<!-- ios界面的底部按钮 -->
-<!-- <view class="group-details-btn {{isIPX ? 'bottomx' :''}}" wx:if="{{groupOSType === 'IOS' && stillGoing && !groupStatus }}" hidden="{{hideBottomBtn}}">
-    <image class="btn-image" src="../../../static/groupImg/group_in_ios.jpg" />
-    <form class="only-one-btn {{isIPX ? 'bottomx' :''}}" report-submit="{{formIsANAsshole}}" bindsubmit="jionGroup">
-        我来助力!获得七天试用权
-        <button class="formBtn" form-type="submit"></button>
-    </form>
-</view> -->
-<!-- <view class="group-popup" bindtap="sendGroup" hidden="{{sendGroupFlag}}" wx:if="{{!isLoading}}">
-    <view class="group-content">
-        <view class="group-title">请选择课本</view>
-        <view class="group-list">
-            <block wx:for="{{bookList}}" wx:key="{{index}}">
-                <view class="group-item" catchtap="selectImg" data-ind="{{index}}">
-                    <image class="item-img" src="{{item.iconImg}}"></image>
-                    <view id="grade">{{item.subTitle}}</view>
-                    <image class="select-img" src="../../../static/groupImg/{{selectFlag[index] ? 'bai' : 'lan'}}.png"></image>
-                </view>
-            </block>
-        </view>
-        <view class="sure" catchtap="sure">
-            <image src="../../../static/groupImg/sure.png"></image>
-            <text>确定</text>
-        </view>
-    </view>
-</view> -->
-<popup id="popupup" typeOf="{{typeOf}}" title="{{titles}}" headTextOne="{{headTextOne}}" headTextTwo="{{headTextTwo}}" btnContent="{{btnContent}}" content="{{content}}" bindGroup="group"></popup>
-<goBackHome id="goBackHome" shareType="{{goBackHome}}" wx:if="{{goBackHome}}" />
-<view hidden="{{hide}}">
-    <Dialog bindmyevent="jurisdiction" />
-</view>
-<myToast bindShowAlert="showAlert" wx:if="{{alertFlag}}" />
-<myModal id="myModal" type="{{modalType}}" isCloseShow="{{modalCloseShow}}" text="{{modalText}}" wx:if="{{isModalShow}}" bindconfirm="modalConfirmHandler" bindclose="modalCloseHandler" />
-<!-- <MyToast bindShowAlert="showAlert" wx:if="{{damnDialogShow}}"  /> -->

+ 0 - 640
pages/groupPage/group-details/group-details.wxss

@@ -1,640 +0,0 @@
-/* pages/group-details/group-details.wxss */
-/**基础风格样式**/
-@import '../../../towxml/style/main.wxss';
-
-
-/**如果页面有动态主题切换,则需要将使用到的样式全部引入**/
-
-/**主题配色(浅色样式)**/
-@import '../../../towxml/style/theme/light.wxss';
-
-/**主题配色(深色样式)**/
-@import '../../../towxml/style/theme/dark.wxss';
-
-.group-details {
-
-    width: 100%;
-    height: auto;
-    background: #fff;
-    overflow:hidden;
-
-}
-
-.loading {
-    width: 750rpx;
-    height: 1334rpx;
-    position: relative;
-}
-
-.loading .loading-text {
-    position: absolute;
-    left: 0;
-    right: 0;
-    top: 0;
-    bottom: 0;
-    margin: auto;
-    width: 150rpx;
-    height: 88rpx;
-}
-
-.details-head {
-    width: 100%;
-    background: #fff;
-}
-
-.headImg {
-    display: flex;
-    flex-wrap: wrap;
-    justify-content: center;
-    padding: 40rpx 0;
-    box-sizing: border-box;
-}
-
-.headImg-item {
-    position: relative;
-    width: 104rpx;
-    height: 104rpx;
-    border-radius: 50%;
-    margin: 20rpx 22rpx;
-}
-
-.headImg-item image {
-    width: 100%;
-    height: 100%;
-    border-radius: 50%;
-}
-
-.headImg-item .tuanzhangIcon {
-    position: absolute;
-    right: 13rpx;
-    width: 78rpx;
-    height: 30rpx;
-    bottom: -10rpx;
-    border-radius: 0;
-
-}
-
-
-scroll-view {
-    /* height: 74%; */
-    width: 100%;
-}
-
-.grade-details {
-    background: #fff;
-    display: flex;
-    flex-direction: column;
-    padding: 24rpx;
-}
-
-.grade-details image {
-    width: 100%;
-    height: 290rpx;
-    border-radius: 20rpx;
-    background: rgba(228, 255, 242, .8);
-}
-
-.catalog {
-    display: flex;
-    align-items: flex-end;
-    width: 100%;
-    height: 100rpx;
-    background: #fff;
-    position: relative;
-    background: rgba(240, 241, 245, 1);
-    padding: 0 40rpx;
-
-}
-.select{
-    color: #61CA54
-}
-
-.switch text {
-    flex: 1;
-    height: 60rpx;
-    text-align: center;
-    font-size: 36rpx;
-    /* margin: 0 90rpx; */
-    box-sizing: border-box;
-    position: relative;
-    z-index: 1;
-    width: 100%;
-    display: block;
-    line-height:66rpx;
-}
-
-.switch {
-    width: 335rpx;
-    height: 70rpx;
-    position: relative;
-}
-
-.switch image {
-    width: 100%;
-    height: 100%;
-    position: absolute;
-    left: 0;
-    top: 0;
-    z-index: 0;
-}
-
-.catalog-list {
-    width: 100%;
-    padding: 0 18rpx 18rpx 18rpx ;
-    margin-bottom: 120rpx;
-    box-sizing: border-box;
-}
-
-.know {
-    padding: 18rpx 18rpx 120rpx 18rpx;
-    box-sizing: border-box;
-    background: #fff;
-    /* margin-top: 12rpx; */
-}
-
-.catalog-item {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    width: 100%;
-    height: 88rpx;
-    background: #fff;
-    padding: 0 20rpx;
-    box-sizing: border-box;
-    margin-bottom: 12rpx;
-    border-radius: 10rpx;
-}
-
-.catalog-item .left {
-    color: #656565;
-    font-size: 36rpx;
-}
-
-.catalog-item .right {
-    color: #939393;
-    font-size: 28rpx;
-}
-
-.catalog-item .right image {
-    width: 16rpx;
-    height: 28rpx;
-    vertical-align: middle;
-    margin-right: 6rpx;
-}
-
-.catalog-item .right text {
-    vertical-align: middle;
-}
-
-.group-details-btn {
-    position: fixed;
-    bottom: 0;
-    display: flex;
-    align-items: center;
-    width: 100%;
-    height: 100rpx;
-    /* background: #FF9209; */
-    color: #fff;
-    z-index: 99;
-}
-
-.group-details-btn .btn-image {
-    position: absolute;
-    width: 100%;
-    height: 100%;
-    left: 0;
-    top: 0;
-    z-index: 0;
-}
-
-.bottomx {
-    bottom: 20rpx;
-}
-
-.left-btn,
-.right-btn,
-.only-one-btn {
-    flex: 1;
-    height: 100%;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    position: relative;
-}
-
-.left-btn {
-    border-right: 2rpx solid #fff;
-}
-
-.group-popup {
-    position: absolute;
-    left: 0;
-    top: 0;
-    width: 100%;
-    height: 100%;
-    background: rgba(0, 0, 0, .5);
-    z-index: 99;
-}
-
-.group-popup .group-content {
-    position: absolute;
-    left: 50%;
-    top: 50%;
-    transform: translate(-50%, -50%);
-    width: 80%;
-    background: #fff;
-    border-radius: 20rpx;
-}
-
-.group-title {
-    text-align: center;
-    margin: 36rpx 0;
-}
-
-.group-list {
-    display: flex;
-    justify-content: space-between;
-    flex-wrap: wrap;
-    padding: 0 62rpx;
-}
-
-.group-list .group-item {
-    position: relative;
-    display: flex;
-    margin-right: 0;
-    justify-content: space-between;
-    flex-direction: column;
-}
-
-.group-content-img {
-    width: 214rpx;
-    height: 290rpx;
-}
-
-.sure {
-    position: relative;
-    width: 392rpx;
-    height: 80rpx;
-    margin: 36rpx auto 26rpx auto;
-}
-
-.sure image {
-    width: 100%;
-    height: 100%;
-}
-
-.sure text {
-    position: absolute;
-    left: 164rpx;
-    top: 18rpx;
-    color: #fff;
-    z-index: 2;
-}
-
-.select-img {
-    position: absolute;
-    bottom: 56rpx;
-    right: 10rpx;
-    width: 52rpx;
-    height: 52rpx;
-    z-index: 99;
-}
-
-.group-item .item-img {
-    width: 214rpx;
-    height: 278rpx;
-}
-
-.formBtn {
-    margin: 0;
-    padding: 0;
-    background: rgba(255, 255, 255, 0);
-    width: 100%;
-    position: absolute;
-    top: 0;
-    height: 100%;
-    left: 0;
-
-}
-
-.formBtn::after {
-    border: none;
-}
-
-.data-loading {
-    width: 100%;
-    height: 200rpx;
-    /* background: #FF4330; */
-}
-
-.data-loading .line1 {
-    width: 300rpx;
-    height: 30rpx;
-    background: rgba(228, 255, 242, .8);
-    margin-top: 20rpx;
-    margin-left: 122rpx;
-    border-radius: 10rpx;
-}
-
-.data-loading .line2 {
-    width: 400rpx;
-    height: 30rpx;
-    background: rgba(228, 255, 242, .8);
-    margin-top: 20rpx;
-    margin-left: 200rpx;
-    border-radius: 10rpx;
-}
-
-.data-loading .line3 {
-    width: 460rpx;
-    height: 30rpx;
-    background: rgba(228, 255, 242, .8);
-    margin-top: 20rpx;
-    margin-left: 160rpx;
-    border-radius: 10rpx;
-}
-
-.damn-dialog {
-    width: 100%;
-    height: 100%;
-    position: absolute;
-    left: 0;
-    top: 0;
-    z-index: 999;
-    background: rgba(0, 0, 0, .5)
-}
-
-.damn-dialog .box {
-    width: 600rpx;
-    height: 200rpx;
-    margin: 50% auto;
-    background: #fff;
-    border-radius: 30rpx;
-}
-
-.damn-dialog .box .title {
-    text-align: center;
-    color: #FF4330;
-    font-size: 34rpx;
-}
-
-.damn-dialog .box .damn-dialog-1 {
-    text-align: center;
-    font-size: 32rpx;
-    color: #000
-}
-
-
-/* 新复制粘贴的 */
-
-.green-placerholder {
-    width: 100%;
-    height: 132rpx;
-    background: #12c962;
-    position: absolute;
-    top: 0;
-}
-
-.class-icon {
-    width: 704rpx;
-    height: 294rpx;
-    border-radius: 20rpx;
-    box-shadow: 0 0 15rpx 0rpx rgba(0, 0, 0, .4);
-    margin: 0 auto;
-    display: block;
-    z-index: 1;
-    position: relative;
-    top: 15rpx;
-}
-
-.step {
-    width: 100%;
-    height: 250rpx;
-    background: #fff;
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-}
-
-.step image {
-    height: 60rpx;
-    width: 70%;
-    margin: 0 auto;
-}
-
-.txt {
-    display: flex;
-    justify-content: space-around;
-    color: #535353;
-    font-size: 32rpx;
-    padding: 0 46rpx;
-    margin-top: 20rpx;
-}
-
-.details-head {
-    width: 100%;
-    /* height: 82%; */
-    margin-top: 12rpx;
-    background: #fff;
-    min-height: 98%;
-
-}
-
-.headImg {
-    display: flex;
-    flex-wrap: wrap;
-    justify-content: center;
-    padding: 40rpx 0;
-    box-sizing: border-box;
-}
-
-.headImg-item {
-    position: relative;
-    width: 140rpx;
-    height: 140rpx;
-    border-radius: 50%;
-    margin: 20rpx 22rpx;
-    box-sizing:border-box;
-}
-
-.headImg-item image {
-    width: 100%;
-    height: 100%;
-    border-radius: 50%;
-}
-
-.headImg-item .organizerIcon {
-    position: absolute;
-    bottom: -15rpx;
-    width: 70rpx;
-    height: 32rpx;
-    line-height: 32rpx;
-    background: #f7b21d;
-    border-radius: 16rpx;
-    /* border: 2rpx solid rgba(255, 255, 255, 1); */
-    font-size: 24rpx;
-    /* font-family: PingFangSC-Medium; */
-    /* font-weight: 500; */
-    color: rgba(255, 255, 255, 1);
-    left: 0;
-    right: 0;
-    margin: 0 auto;
-    text-align: center;
-}
-
-.bg-boder {
-    border: 2px solid #f7b21d;
-}
-
-.last-time-box {
-    width: 100%;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    margin-top:30rpx;
-}
-
-.last-time {
-    display: flex;
-    flex-direction: row;
-    align-items: center;
-}
-
-.last-time-end {
-    width: 99rpx;
-    height: 38rpx;
-    font-size: 30rpx;
-    font-weight: 800;
-    color: #f14025;
-    margin: 0 15rpx;
-    text-align:center;
-}
-
-.left-icon {
-    width: 80rpx;
-    height: 20rpx;
-}
-
-.right-icon {
-    width: 80rpx;
-    height: 20rpx;
-}
-
-.last-text {
-    width: 100%;
-    text-align: center;
-    font-size: 30rpx;
-    font-weight: 800;
-    color: #f14025;
-    margin-top: 8rpx;
-}
-
-.group-regular-text {
-    font-size: 30rpx;
-    font-weight: 800;
-    color: rgba(12, 10, 10, 1);
-    width: 100%;
-    text-align: center;
-    line-height: 45rpx;
-}
-
-.last-member{
-    margin-top: 17rpx;
-    
-}
-
-.invitation-btn {
-    /* position: absolute;
-    left: 50%;
-    top: 55%; */
-    /* transform: translate(-50%); */
-    width: 434rpx;
-    height: 80rpx;
-    margin: 0 auto 20rpx;
-    display: block;
-    position: relative;
-}
-
-
-.middle-btn{
-    position: fixed;
-    top: 300rpx;
-    left: 0;
-    right: 0;
-    margin: 0 auto;
-}
-
-.invitation-btn image {
-    position: absolute;
-    left: 0;
-    top: 0;
-    width: 100%;
-    height: 100%;
-}
-
-.invitation-btn text {
-    /* position: absolute; */
-    width: 100%;
-    height: 100%;
-    display: inline-block;
-    text-align: center;
-    line-height: 80rpx;
-    z-index: 2;
-    color: #fff;
-    background: #FF653A;
-    border-radius: 56rpx;
-    font-size: 36rpx;
-    font-weight: 800;
-
-}
-
-.red-text{
-    color: #f13e25
-}
-
-.rule {
-    position: fixed;
-    right: 0;
-    top: 82%;
-    width: 84rpx;
-    height: 88rpx;
-    z-index: 2;
-}
-
-.rule image {
-    position: absolute;
-    left: 0;
-    top: 0;
-    width: 100%;
-    height: 100%;
-}
-
-.rule text {
-    position: absolute;
-    left: 30rpx;
-    top: 10rpx;
-    font-size: 24rpx;
-    color: #fff;
-    z-index: 2;
-}
-
-.explain {
-    color: #8E8B8C;
-    width: 100%;
-    box-sizing: border-box;
-    text-align: center;
-    font-size: 24rpx;
-    line-height: 40rpx;
-    position: absolute;
-    bottom: 20rpx;
-}
-
-.explain-title{
-    font-weight: 800;
-}
-
-.flower-inline{
-    width: 33rpx;
-    height: 38rpx;
-    display: inline-block;
-}

+ 0 - 171
pages/groupPage/make-money/make-money.js

@@ -1,171 +0,0 @@
-// pages/groupPage/make-money/make-money.js
-import httpRequestApi from '../../../utils/APIClient';
-import util from '../../../utils/util';
-const app = getApp();
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    organizer: {},
-    groupPurchaseInfo: {},
-    joinUserList: [],
-    surplusList: [],
-    timeList: [],
-    productId: '',
-    orderId: '',
-    groupId: '',
-    organizerUid: '',
-    orderList: {}
-  },
-  //显示分享页 
-  share: function () {
-    this.shareDialog = this.selectComponent("#share-dialog");
-    const data = {
-      avatar: this.data.organizer.avatar,
-      author: this.data.organizer.wechatName,
-      iconImg: this.data.groupPurchaseInfo.bgImg,
-      title: this.data.groupPurchaseInfo.productTitle,
-      path: `pages/groupPage/group-details/group-details`,
-      scene: `QR${this.data.orderId}`,
-      groupPurchaseInfo: this.data.groupPurchaseInfo,
-      groupType: this.data.groupOsType
-    }
-    this.shareDialog.share(data);
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    // if (app.globalData.isIOS) {
-    //   wx.redirectTo({
-    //     url: '../../index/index'
-    //   })
-    //   return 
-    // }
-    wx.setNavigationBarTitle({
-      title: '小学语文朗读配音'
-    })
-    console.log(options.id);
-    if(!options.id) {
-      return false;
-    }
-    const orderId = options.id;
-    const productId = options.productId;
-    const groupId = options.groupId;
-    this.setData({
-      orderId,
-      productId,
-      groupId
-    })
-    httpRequestApi.getMygroupInfo(orderId).success( res => {
-      console.log('支付详情', res.data.data);
-      const groupOrder = res.data.data.groupPurchaseOrder;
-      const surplusNum = groupOrder.headcount - groupOrder.joinCount;
-      this.setData({
-        organizerUid: groupOrder.organizer,
-        orderList: res.data.data
-      })
-      for(var i = 0; i < surplusNum; i++) {
-        this.data.surplusList.push(1);
-      }
-      //时间转换
-      const timeList = util.lastHoursInGroup(res.data.data.groupPurchaseOrder.closeTime - res.data.data.currentTime);
-      console.log(timeList)
-      this.setData({
-        groupPurchaseInfo: res.data.data.groupPurchaseInfo,
-        organizer: res.data.data.organizer,
-        surplusNum,
-        joinUserList: res.data.data.joinUserList,
-        surplusList: this.data.surplusList,
-        timeList,
-        productId: res.data.data.groupPurchaseOrder.productId,
-        groupId: res.data.data.groupPurchaseOrder.groupId,
-        groupOsType: res.data.data.groupPurchaseOrder.os
-      })
-    }).fail( error => {
-      console.log('错误', error)
-    })
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-    
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {;
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-    // if (ops.from === 'button') {
-    //   console.log(ops.target)
-    // }
-    // const productId = this.data.productId;
-    // const groupId = this.data.groupId;
-    const id = this.data.orderId;
-    console.log(id)
-
-    return {
-      title: '老师同学都在玩的配音show,你还在等什么?',
-      path: `pages/groupPage/group-details/group-details?share=true&shareId=${id}`,
-      imageUrl: `https://efunbox.lingjiao.cn/reader/resource/share/lesson_${this.data.productId}.jpg`,
-      // success: function (res) {
-      //   // 转发成功
-      //   console.log("转发成功:" + JSON.stringify(res));
-      //   var shareTickets = res.shareTickets;
-      //   // if (shareTickets.length == 0) {
-      //   //   return false;
-      //   // }
-      //   // //可以获取群组信息
-      //   // wx.getShareInfo({
-      //   //   shareTicket: shareTickets[0],
-      //   //   success: function (res) {
-      //   //     console.log(res)
-      //   //   }
-      //   // })
-      // },
-      fail: function (res) {
-        // 转发失败
-        console.log("转发失败:" + JSON.stringify(res));
-      }
-    }
-  }
-})

+ 0 - 6
pages/groupPage/make-money/make-money.json

@@ -1,6 +0,0 @@
-{
-    "component": true,
-    "usingComponents": {
-        "shareDialog": "/component/share/share"
-    }
-  }

+ 0 - 44
pages/groupPage/make-money/make-money.wxml

@@ -1,44 +0,0 @@
-<!--pages/groupPage/make-money/make-money.wxml-->
-<view class="details-head">
-    <view class="headImg-item-faqiren" wx:if="{{orderList.groupPurchaseOrder.groupType === 'PROMOTION'}}">
-            <image class="faqiren" src="../../../static/groupImg/faqiren.png"></image>
-            <image src="{{orderList.organizer.avatar}}"></image>
-    </view>
-    <view class="headImg">
-        <block wx:for="{{joinUserList}}" wx:key="{{index}}">
-            <view class="headImg-item">
-                <image src="{{item.avatar}}"></image>
-            </view>
-        </block>
-        <block wx:for="{{surplusList}}" wx:key="{{index}}">
-            <view class="headImg-item">
-                <image src="../../../static/groupImg/no_head.png"></image>
-            </view>  
-        </block>                   
-    </view>
-    <view class="shengyu">
-        <view class="shengyu-num">仅剩<text>{{surplusNum}}</text>个名额就拼团成功了</view>
-        <view class="shengyu-time">
-            剩余时间:
-             <block wx:for="{{timeList[0]}}" wx:key="{{index}}">
-                    <view class="time">
-                        <text>{{item}}</text>
-                    </view>
-                </block>
-                小时
-                <block wx:for="{{timeList[1]}}" wx:key="{{index}}">
-                    <view class="time">
-                        <text>{{item}}</text>
-                    </view>
-                </block>
-                分钟   
-        </view>
-    </view>
-    <view class="invitation-btn" bindtap="share">
-        <image src="../../../static/groupImg/Invitation.png"></image>
-        <text>邀请朋友参加</text>
-    </view>
-</view>  
-
-<canvas canvas-id="myCanvas" style="width:375px; height: 668px; position: absolute; left: -999rpx; top: -9999rpx;"></canvas>
-<shareDialog id="share-dialog" shareType='group' shareId="{{orderId}}"/>

+ 0 - 127
pages/groupPage/make-money/make-money.wxss

@@ -1,127 +0,0 @@
-/* pages/groupPage/make-money/make-money.wxss */
-.details-head {
-    width: 100%;
-    height: 78%;
-    margin-top: 12rpx;
-    background: #fff;
-}
-
-.headImg {
-    display: flex;
-    flex-wrap: wrap;
-    justify-content: center;
-    padding: 40rpx 0;
-    box-sizing: border-box;
-    margin-top: 180rpx;
-}
-
-.headImg-item-faqiren {
-    position: absolute;
-    left: 300rpx;
-    top: 30rpx;
-    width: 106rpx;
-    height: 106rpx;
-    border-radius: 50%;
-    margin: 20rpx 22rpx;
-    border: 2px solid #61CA54;
-}
-
-.headImg-item {
-    position: relative;
-    width: 106rpx;
-    height: 106rpx;
-    border-radius: 50%;
-    margin: 20rpx 22rpx;
-}
-
-.headImg-item-faqiren image,
-.headImg-item image {
-    width: 100%;
-    height: 100%;
-    border-radius: 50%;
-}
-
-.headImg-item-faqiren .faqiren {
-    position: absolute;
-    right: -15rpx;
-    bottom: -40rpx;
-    width: 144rpx;
-    height: 48rpx;
-    border-radius: 0;
-}
-
-.shengyu {
-    display: flex;
-    flex-direction: column;
-    color: #696969;
-}
-
-.shengyu-num {
-    text-align: center;
-}
-
-.shengyu-num text {
-    color: #FF4330;
-}
-
-.shengyu-time {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    margin-top: 8rpx;
-}
-
-.shengyu-time .time {
-    position: relative;
-    width: 32rpx;
-    height: 36rpx;
-    margin: 0 8rpx;
-}
-
-.shengyu-time .time image {
-    width: 24rpx;
-    height: 40rpx;
-}
-
-.shengyu-time .time text {
-    position: absolute;
-    left: 2rpx;
-    top: 0;
-    z-index: 2;
-    color: #fff;
-    font-size: 28rpx;
-    width: 32rpx;
-    height: 36rpx;
-    line-height: 36rpx;
-    background: #ff9209;
-    text-align: center;
-    border-radius: 4rpx;
-}
-
-.invitation-btn {
-    position: absolute;
-    left: 50%;
-    top: 65%;
-    transform: translate(-50%);
-    width: 434rpx;
-    height: 80rpx;
-}
-
-.invitation-btn image {
-    position: absolute;
-    left: 0;
-    top: 0;
-    width: 100%;
-    height: 100%;
-}
-
-.invitation-btn text {
-    position: absolute;
-    width: 100%;
-    height: 100%;
-    display: inline-block;
-    text-align: center;
-    line-height: 80rpx;
-    z-index: 2;
-    color: #fff;
-}

+ 0 - 262
pages/groupPage/my-group/my-group.js

@@ -1,262 +0,0 @@
-// pages/groupPage/my-group/my-group.js
-import httpRequestApi from '../../../utils/APIClient';
-import util from '../../../utils/util';
-const app = getApp();
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    myGroupList: [],
-    typeOf: '',
-    title: '',
-    headTextOne: '',
-    headTextTwo: '',
-    content: [],
-    productId: '',
-    orderId: '',
-    groupId: '',
-    closeFlags: [],
-    ind: 0,
-    timeList: [],
-    line1: '您还没有拼过团哦',
-    line2: '拼过团再来看看吧'
-  },
-  //跳转到团购详情页
-  collageDetails: function ({
-    currentTarget
-  }) {
-    const orderId = currentTarget.dataset.orderid;
-
-    wx.navigateTo({
-      url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}&read=true`
-    })
-    // const productId = currentTarget.dataset.productid;
-    // const groupId = currentTarget.dataset.groupid;
-    // const uid = currentTarget.dataset.uid;
-    // const myUid = wx.getStorageSync('uid');
-    // const num = currentTarget.dataset.num;
-    // const ind = currentTarget.dataset.ind;
-    // const groupType = currentTarget.dataset.grouptype;
-    // if(app.globalData.isIOS ){
-    //   if( groupType==='IOS' ){
-    //     if( uid === myUid){
-    //       wx.navigateTo({
-    //         url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}&read=true`
-    //       })
-    //       return;
-    //     } else {
-
-    //     }
-    //   } else {
-    //     wx.navigateTo({
-    //       url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}&read=true`
-    //     })
-    //     return;
-    //   }  
-    // } 
-    
-    // this.setData({
-    //   ind
-    // })
-    // console.log(num)
-    // if (!num) {
-    //   wx.navigateTo({
-    //     url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}`
-    //   })
-    // } else {
-    //   if (this.data.closeFlags[ind]) {
-    //     this.popup.close();
-    //     this.setData({
-    //       productId,
-    //       orderId,
-    //       groupId
-    //     })
-    //     this.dialog(uid, groupType);
-    //   } else {
-    //     wx.navigateTo({
-    //       url: `/pages/groupPage/collage-details/collage-details?orderId=${orderId}&read=true`
-    //     })
-    //   }
-    // }
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    console.log(options)
-    // if (app.globalData.isIOS) {
-    //   wx.redirectTo({
-    //     url: '../../index/index'
-    //   })
-    //   return 
-    // }
-    if (options && options.title) {
-      wx.setNavigationBarTitle({
-        title: options.title //页面标题为路由参数
-      });
-      this.setData({
-        title: options.title
-      });
-    }
-    if(options.share){
-      this.setData({
-        goBackHome: true
-      })
-    }
-    this.getMyGroup();
-  },
-  // 获取我的拼团
-  getMyGroup: function () {
-    httpRequestApi.getMygroup().success((res) => {
-      if (!res.data.data.list) {
-        return
-      }
-      this.setData({
-        myGroupList: [],
-        myGroupList: [],
-        timeList: []
-      });
-      console.log('我的团', res.data.data.list)
-      res.data.data.list.forEach(element => {
-        if (element.groupPurchaseOrder.status == 'SUCCESSED') {
-          this.data.closeFlags.push(true);
-          this.data.timeList.push(util.formatDate(element.groupPurchaseOrder.gmtModified, 4))
-        } else {
-          this.data.closeFlags.push(false);
-          if (element.groupPurchaseOrder.closeTime - Date.parse(new Date()) < 0) {
-            this.data.timeList.push('时间到了,')
-          } else {
-            this.data.timeList.push(util.lastHours(element.groupPurchaseOrder.closeTime - Date.parse(new Date())))
-          }
-        }
-      });
-      this.setData({
-        closeFlags: this.data.closeFlags,
-        myGroupList: res.data.data.list,
-        timeList: this.data.timeList
-      })
-    }).fail(error => {
-      console.log('错误', error)
-    })
-  },
-  dialog: function (uid,type) {
-    if (wx.getStorageSync('uid') == uid) {
-      this.setData({
-        typeOf: 'success',
-        title: '恭喜',
-        headTextOne: type === 'IOS' ? '您发起的助力团成功' : '您发起的团购拼团成功',
-        headTextTwo: type === 'IOS' ? '真是魅力无穷啊' : '领袖体质魅力无穷!',
-        content: [{
-            text: type === 'IOS' || app.globalData.isIOS ? '快快去朗读吧' : '您可以继续发起新的团购',
-            color: "#F97800"
-          },
-          {
-            text: type === 'IOS' || app.globalData.isIOS ? '让更多人听到你美妙的读书声吧' : '不再需要支付本课程费用',
-            color: "#F97800"
-          },
-          {
-            text: type === 'IOS' || app.globalData.isIOS ? '' : '拼团成功,您将得到奖学金',
-            color: "#F97800"
-          }
-        ],
-        haveReward: type === 'IOS' ? false : true,
-        btnContent: type === 'IOS' ? '我要去朗读' : '再接再厉 赚奖学金'
-      })
-    } else {
-      this.setData({
-        typeOf: 'success',
-        title: '恭喜',
-        headTextOne: type === 'IOS' ? '您助力的团成功啦' : '您参与的团购拼团成功',
-        headTextTwo: '感谢团长的分享',
-        content: [{
-            text: type === 'IOS'|| app.globalData.isIOS ? '您还可以自己发团' : " 您也可以发起新的团购",
-            color: "#F97800"
-          },
-          {
-            text: type === 'IOS' || app.globalData.isIOS? '获得本课程三年使用权哦' :"作为新的发起人",
-            color: "#F97800"
-          },
-          {
-            text: type === 'IOS'|| app.globalData.isIOS ? '' : "您无需在支付本课程费用",
-            color: "#F97800"
-          },
-          {
-            text: type === 'IOS'|| app.globalData.isIOS ? '' : "拼团成功,您将得到奖学金",
-            color: "#F97800"
-          }
-        ],
-        haveReward: type === 'IOS' || app.globalData.isIOS ? false : true,
-        btnContent: type === 'IOS' || app.globalData.isIOS ? '我要去朗读' : '我也试试 赚奖学金'
-      })
-    }
-  },
-  close: function () {
-    const ind = this.data.ind;
-    this.data.closeFlags[ind] = false;
-    this.setData({
-      closeFlags: this.data.closeFlags
-    })
-    console.log(this.data.closeFlags)
-  },
-
-  //再次发起团
-  group: function () {
-    const productId = this.data.productId;
-    const groupId = this.data.groupId;
-    const id = this.data.orderId;
-
-    wx.navigateTo({
-      url: `/pages/groupPage/grade-details/grade-details?productId=${productId}`
-    })
-
-    //开始发起团购
-    // httpRequestApi.SendGroupPurchas({
-    //   productId,
-    //   groupId
-    // }).success((res) => {
-    //   console.log('发起团购', res);
-    //   if (res.data.message) {
-    //     wx.showModal({
-    //       title: '提示',
-    //       content: res.data.message,
-    //       success:(res) => {
-    //       }
-    //     })
-    //     return false;
-    //   }
-    //   wx.navigateTo({
-    //     url: `/pages/groupPage/make-money/make-money?productId=${productId}&id=${res.data.data.groupPurchaseOrder.id}&groupId=${groupId}`
-    //   })
-    //   // this.getMygroup();
-    // }).fail((error) => {
-
-    // })
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-    this.popup = this.selectComponent("#popup");
-  },
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  },
-  onPullDownRefresh: function () {
-    this.onLoad();
-
-    wx.showNavigationBarLoading() //在标题栏中显示加载
-    //模拟加载
-    setTimeout(function () {
-      // complete
-      wx.hideNavigationBarLoading() //完成停止加载
-      wx.stopPullDownRefresh() //停止下拉刷新
-    }, 1500);
-  }
-})

+ 0 - 8
pages/groupPage/my-group/my-group.json

@@ -1,8 +0,0 @@
-{
-    "component": true,
-    "usingComponents": {
-        "popup": "/component/popup/popup",
-        "myPlacerholder": "/component/myPlacerholder/myPlacerholder",
-        "goBackHome": "/component/goBackHome/goBackHome"
-    }  
-}

+ 0 - 47
pages/groupPage/my-group/my-group.wxml

@@ -1,47 +0,0 @@
-<!--pages/groupPage/my-group/my-group.wxml-->
-<view class="my-group">
-    <scroll-view scroll-y="{{true}}">
-        <view class="my-group-content">
-          <block wx:for="{{myGroupList}}" wx:key="{{index}}">
-            <view class="group-bars">
-                <view class="group-head">
-                    <image src="{{item.organizer.avatar}}"></image>
-                    <text>{{item.organizer.wechatName}}</text>
-                </view>
-                <view class="group-jion">
-                <view class="top-title">
-                    <text>{{item.groupPurchaseOrder.productTitle}}</text>
-                    <text>{{item.groupPurchaseOrder.headcount}}人团</text>
-                </view>
-                <view class="group-detail {{item.groupPurchaseOrder.status =='SUCCESSED' ? 'success-border' : ''}}">
-                    <view class="number">
-                        <text wx:if="{{item.groupPurchaseOrder.headcount - item.groupPurchaseOrder.joinCount}}">还剩{{item.groupPurchaseOrder.headcount - item.groupPurchaseOrder.joinCount}}人成团</text>
-                        <text wx:if="{{!(item.groupPurchaseOrder.headcount - item.groupPurchaseOrder.joinCount)}}">{{item.groupPurchaseOrder.os === 'IOS' ? '助力成功' : '拼团成功'}}</text>
-                        <text wx:if="{{item.groupPurchaseOrder.headcount - item.groupPurchaseOrder.joinCount}}">剩余{{timeList[index]}}结束</text>
-                        <text wx:if="{{!(item.groupPurchaseOrder.headcount - item.groupPurchaseOrder.joinCount)}}">{{timeList[index]}}</text>
-                    </view>
-                    <view class="jion-btn {{item.groupPurchaseOrder.status =='SUCCESSED' ? 'success-bg' : ''}}"  bindtap="collageDetails" data-ind="{{index}}" data-num="{{item.groupPurchaseOrder.status==='SUCCESSED'}}" data-orderId="{{item.groupPurchaseOrder.id}}" data-grouptype="{{item.groupPurchaseOrder.os}}" data-groupId="{{item.groupPurchaseOrder.groupId}}" data-productId="{{item.groupPurchaseOrder.productId}}" data-uid="{{item.groupPurchaseOrder.organizer}}">
-                        {{item.groupPurchaseOrder.status =='SUCCESSED' ? '已成功' : '进行中'}}
-                    </view>
-                </view>
-                </view>
-            </view>
-          </block>
-           
-        </view>
-    </scroll-view>
-    <myPlacerholder line1="{{line1}}" line2="{{line2}}" wx:if="{{myGroupList.length <= 0}}" />  
-</view>
-<popup
-    id="popup"
-    typeOf="{{typeOf}}"
-    title="{{title}}"
-    headTextOne="{{headTextOne}}"
-    headTextTwo="{{headTextTwo}}"
-    content="{{content}}"
-    haveReward="{{haveReward}}"
-    btnContent="{{btnContent}}"
-    bindGroup="group"
-    bindClose="close"
-></popup>
-<goBackHome id="goBackHome" shareType="{{goBackHome}}" wx:if="{{goBackHome}}" />

+ 0 - 105
pages/groupPage/my-group/my-group.wxss

@@ -1,105 +0,0 @@
-/* pages/groupPage/my-group/my-group.wxss */
-.my-group {
-    width: 100%;
-    height: 100%;
-    background:rgba(240,241,245,1);
-}
-
-.my-group scroll-view {
-    width: 100%;
-    height: 100%;
-}
-
-.my-group-content {
-    width: 100%;
-    display: flex;
-    justify-content: row;
-    flex-wrap: wrap;
-    padding: 0 16rpx 50rpx;
-    box-sizing: border-box;
-}
-
-.group-bars {
-    display: flex;
-    justify-content: space-between;
-    width: 100%;
-    height: 188rpx;
-    background: #fff;
-    margin-top: 20rpx;
-    border-radius: 12rpx;
-    padding: 14rpx 28rpx;
-    box-sizing: border-box;
-}
-
-.group-head {
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-}
-
-.group-head image {
-    width: 96rpx;
-    height: 96rpx;
-    border-radius: 50%;
-}
-
-.group-head text {
-    font-size: 32rpx;
-    margin-top: 12rpx;
-    width: 150rpx;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    white-space: nowrap;
-    text-align: center;
-}
-
-.group-jion {
-    width: 460rpx;
-}
-
-.group-jion .top-title {
-    display: flex;
-    justify-content: space-between;
-    font-size: 32rpx;
-}
-
-.group-jion .group-detail {
-    display: flex;
-    justify-content: space-between;
-    width: 100%;
-    height: 84rpx;
-    border: 4rpx solid #FFACB6;
-    border-radius: 12rpx;
-    overflow: hidden;
-    margin-top: 26rpx;
-}
-
-.group-jion .success-border {
-    border: 4rpx solid #93D33D;
-}
-
-.group-jion .group-detail .number {
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    margin-left: 20rpx;
-    font-size: 28rpx;
-    color: #4A4A4A;
-}
-
-.group-jion .group-detail .jion-btn {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    width: 36%;
-    height: 100%;
-    background: #ff6e00;
-    color: #fff;
-    font-size: 36rpx;
-    line-height: 100%;
-}
-
-.group-jion .group-detail .success-bg {
-    background: #93D33D;
-}

+ 112 - 53
pages/index/index.js

@@ -23,10 +23,6 @@ import {
 import {
   myInit
 } from '../../component/my/my';
-// import {
-//   followInit
-// } from '../../component/follow/follow';
-// import '../../utils/hls';
 import httpRequestApi from '../../utils/APIClient';
 import httputil from '../../utils/httpUtil';
 import {
@@ -36,25 +32,24 @@ import {
 Page({
   data: {
     tab: [{
-        name: '我的',
-        templates: 'my',
+        name: '推荐',
+        templates: 'recommend',
       },
       {
-        name: '发现',
-        templates: 'hot',
+        name: '关注',
+        templates: 'follow',
       },
-      // {
-      //   name: '热团',
-      //   templates: 'group',
-      // },
-      // {
-      //   name: '动态',
-      //   templates: 'follow',
-      // },
-
+      {
+        name: '资源',
+        templates: 'courses',
+      },
+      {
+        name: '我的',
+        templates: 'my',
+      }
     ],
     winH: 568,
-    myIndex: 1,
+    myIndex: 0,
     followData: [],
     recommendPageNo: 0,
     recommendTotalNo: 1,
@@ -71,7 +66,9 @@ Page({
     ifHaveMore: true,
     indexSignDialog: false,
     indexMissionDialog: false,
-    unfinishedCount: 0
+    unfinishedCount: 0,
+    videoList: [],
+    nextMargin: '400rpx' // 视频下边距
   },
   jurisdiction: function () {
     //隐藏弹框
@@ -127,8 +124,10 @@ Page({
     this.uid = wx.getStorageSync('uid');
     wx.getSystemInfo({
       success: (res) => {
+        console.log('系统', res)
         this.setData({
-          winH: res.windowHeight
+          winH: res.windowHeight,
+          devicePixelRatio: res.pixelRatio
         });
       }
     });
@@ -170,9 +169,6 @@ Page({
         })
       }
     }, 2800)
-    // hotInit(this)
-    // this.init();
-
   },
   onShow: function () {
     wx.setNavigationBarTitle({
@@ -180,7 +176,24 @@ Page({
     })
     // this.init();
     getOpenidNoLogin((res) => {
-      hotInit(this)
+      let winH = this.data.winH * 2;
+      // let minusNumber = 860;
+      let minusNumber = (winH * 860) / 1206;
+
+      // if(winH < 510){
+      //   minusNumber = 400;
+      // } 
+      // let nextMargin = parseInt(winH *(1 - (834 / winH)) );
+      let nextMargin = parseInt(winH - minusNumber);
+
+      console.log(123, winH)
+      console.log(321, nextMargin)
+      this.setData({
+        nextMargin: nextMargin + 'rpx'
+      })
+      this.getHotRecommend(this.uid);
+
+      // hotInit(this)
     }, (error) => {
       // console.log(error)
 
@@ -192,7 +205,7 @@ Page({
     });
     if (this.data.myIndex === 0) {
       // 从修改信息页面退回
-      this.getUserWorksInfo(true);
+      // this.getUserWorksInfo(true);
     }
   },
   onHide: function () {
@@ -201,19 +214,79 @@ Page({
       [str]: false
     });
   },
-  //初始化数据
-  // init: function () {
-  //   httputil.getOpenidSessionKey((res) => {
-  //     console.log('微信的用户信息', res)
+  /* 两个接口维护同一个数组,手动的结束后添加算法的 */
+  // 推荐页信息 获取消息和手动推荐内容
+  getHotRecommend: function (uid) {
+    httpRequestApi.getHotRecommend(
+      uid
+    ).success((res) => {
+      // 点击切换按钮时 只刷新我的课程和未读消息 官方推荐和热门不加载
+      const recommendRes = res.data.data;
 
-  //   }, (error) => {
-  //     console.log(1111111111111111)
-  //     // this.jurisdiction()
-  //     wx.navigateTo({
-  //       url: '../../loginPage/loginPage'
-  //     })
-  //   });
-  // },
+      console.log(res)
+      recommendRes.hotReader.forEach(item => {
+        const temp = {};
+        temp.title = item.userRead ? item.userRead.title : '';
+        temp.img = item.userRead.iconImg;
+        temp.plays = item.userRead.playAmount ? item.userRead.playAmount : 0;
+        temp.likes = item.userRead.likeAmount ? item.userRead.likeAmount : 0;
+        temp.classId = item.userRead.id;
+        temp.time = formatDate(item.userRead.gmtCreated, 3);
+        temp.avatar = item.user ? item.user.avatar : '';
+        temp.uid = item.user ? item.user.uid : '';
+        temp.url = item.userRead.originVideo;
+        // temp.avatar = item.user.avatar;
+        temp.nickName = item.user ? item.user.wechatName : '';
+        temp.id = item.id;
+        // recommendWorks.push(temp);
+        // that.data.hotData.hotWorks.push(temp);
+        this.data.videoList.push(temp);
+      });
+      this.setData({
+        videoList: this.data.videoList
+      })
+      this.getHotRecommendSecond(this.uid, 1, 5)
+      const hotStr = 'hotData.hotWorks'
+      const myCourseStr = 'hotData.myCourse'
+      const isMessageNormal = 'hotData.isMessageNormal'
+      const unReadMessageContent = 'hotData.unReadMessageContent'
+      // that.setData({
+
+      // })
+    })
+  },
+  // 获取热门作品 算法出来的
+  getHotRecommendSecond: function (uid, pageNo, pageSize) {
+    httpRequestApi.getHotRecommendSecond(uid, pageNo, pageSize).success(res => {
+      console.log(res)
+      const recommendRes = res.data.data.list;
+      if (recommendRes.length === 0) return;
+      // const recommendWorks = [];
+      recommendRes.forEach(item => {
+        const temp = {};
+        temp.title = item.userRead.title;
+        temp.summary = item.userRead.summary;
+        temp.img = item.userRead.iconImg;
+        temp.plays = item.userRead.playAmount ? item.userRead.playAmount : 0;
+        temp.likes = item.userRead.likeAmount ? item.userRead.likeAmount : 0;
+        temp.classId = item.userRead.id;
+        temp.time = formatDate(item.userRead.gmtCreated, 3);
+        temp.avatar = item.user.avatar;
+        temp.profession = item.user.profession;
+        temp.uid = item.user.uid;
+        temp.url = item.userRead.originVideo;
+        // temp.avatar = item.user.avatar;
+        temp.nickName = item.user.wechatName;
+        // recommendWorks.push(temp);
+        this.data.videoList.push(temp);
+
+      });
+      this.setData({
+        videoList: this.data.videoList
+      })
+      console.log('dangqian', this.data.videoList)
+    })
+  },
   // 获取用户信息
   getUserWorksInfo: function (flag) {
     console.log(flag)
@@ -293,20 +366,6 @@ Page({
       wx.stopPullDownRefresh() //停止下拉刷新
     }, 1500);
   },
-  // 获取全部课本
-  // getBookList: function () {
-  //   httpRequestApi.getAllBooks(1, 10).success((res) => {
-  //     this.data.bookList = res.data.data.list;
-  //     res.data.data.list.forEach(element => {
-  //       this.data.selectFlag.push(true);
-  //     });
-  //     this.setData({
-  //       bookList: this.data.bookList
-  //     })
-  //   }).fail((error) => {
-  //     console.log('错误', error)
-  //   })
-  // },
   goToMessage: function () {
     wx.navigateTo({
       url: `../../pages/social/insideMessage/insideMessage`
@@ -358,11 +417,11 @@ Page({
     httpRequestApi.getUserAuth().success(res => {
       console.log(res)
       const str = 'myData.isVIP'
-      if(res.data.data){
+      if (res.data.data) {
         this.setData({
           [str]: true
         })
-      }else{
+      } else {
         this.setData({
           [str]: false
         })

+ 3 - 1
pages/index/index.json

@@ -2,7 +2,9 @@
     "usingComponents": {
         "Dialog": "../../component/dialog/dialog",
         "MyToast": "../../component/myToast/myToast",
-        "myPlacerholder": "/component/myPlacerholder/myPlacerholder"
+        "myPlacerholder": "/component/myPlacerholder/myPlacerholder",
+        "VideoSwiper": "../../component/video-swiper/index"
+
     },
     "enablePullDownRefresh": false,
     "window": {

+ 17 - 14
pages/index/index.wxml

@@ -1,30 +1,33 @@
 <!-- index.wxml -->
 <view class="container">
   <!-- 引入组件 -->
-  <import src="/component/group/group.wxml" />
-  <import src="/component/hot/hot.wxml" />
+  <!-- <import src="/component/group/group.wxml" /> -->
+  <!-- <import src="/component/hot/hot.wxml" /> -->
   <!-- <import src="/component/follow/follow.wxml" /> -->
-  <import src="/component/my/my.wxml" />
+  <!-- <import src="/component/my/my.wxml" /> -->
   <!-- 调用组件 -->
-  <template is="{{templates}}" data="{{groupData: groupData, hotData: hotData, followData: followData, myData: myData}}"></template>
+  <!-- <template is="{{templates}}" data="{{groupData: groupData, hotData: hotData, followData: followData, myData: myData}}"></template> -->
   <!-- 顶部导航 -->
   <view class="top-tab">
     <block wx:for="{{tab}}" wx:key="{{index}}">
-      <!-- <view class="tabbar {{index == myIndex ? 'select':' '}}" bindtap="switcher" data-index="{{index}}" wx:if="{{isIOS ? index === 0?  false : true : true}}"> -->
       <view class="tabbar {{index == myIndex ? 'select':' '}}" bindtap="switcher" data-index="{{index}}">
         <text>{{item.name}}</text>
       </view>
     </block>
   </view>
-  <!-- <view class="template" wx:if="{{templates == 'hot'}}">
-    <template is="{{templates}}" data="{{...hotData}}"></template>
-  </view>
-  <view class="template" wx:elif="{{templates == 'follow'}}">
-    <template is="{{templates}}" data="{{followData: followData}}"></template>
-  </view>
-  <view class="template" wx:else="{{templates == 'my'}}">
-    <template is="{{templates}}" data="{{myData: myData}}"></template>
-  </view> -->
+  <VideoSwiper 
+  class="video-swiper" 
+  video-list="{{videoList}}" 
+  nextMargin="{{nextMargin}}"
+  bindplay="onPlay"
+  bindpause="onPause"
+  bindtimeupdate="onTimeUpdate"
+  bindended="onEnded"
+  binderror="onError"
+  bindwaiting="onWaiting"
+  bindprogress="onProgress"
+  bindloadedmetadata="onLoadedMetaData">
+  </VideoSwiper>
 </view>
  <!-- <MyToast /> -->
 <view hidden="{{hide}}">

+ 2 - 1
pages/index/index.wxss

@@ -10,6 +10,7 @@
 
 .container {
   background: rgba(242, 242, 242, 1);
+  height: 100%;
 }
 
 .template {
@@ -33,7 +34,7 @@
   align-items: center;
   /* margin-bottom: 15rpx; */
   z-index: 999;
-  padding: 0 152rpx 0 152rpx;
+  padding: 0 48rpx 0 48rpx;
 
 }
 

+ 3 - 3
pages/user/myconcern/myconcern.wxml

@@ -1,6 +1,6 @@
-<wxs src="../../commonWxs/format.wxs" module="format" />
+<!-- <wxs src="../../commonWxs/format.wxs" module="format" /> -->
 <view class='my-concern'>
-  <view class="concern-center">
+  <!-- <view class="concern-center">
     <view class='concern-info' wx:for="{{ fanList }}" wx:key="{{ index }}" bindtap='toUserDetails' data-uid='{{ item.user.uid }}' data-fanId='{{ item.fans.fanId }}'>
       <view class='avatar-box'>
         <image class='avatar-image' src="{{ item.user.avatar }}" />
@@ -23,6 +23,6 @@
         <view class="follow-status">已关注</view>
       </view>
     </view>
-  </view>
+  </view> -->
   <!-- <myPlacerholder class="placerholder" imageShow="{{imageShow}}" line1="{{line1}}" line2="{{line2}}" wx:if="{{fanList.length <= 1}}" />         -->
 </view>

+ 1 - 1
pages/user/myread/myread.wxml

@@ -1,4 +1,4 @@
-<wxs src="../../commonWxs/format.wxs" module="format" />
+<!-- <wxs src="../../commonWxs/format.wxs" module="format" /> -->
 <view class='my-read'>
   <view class='worksCard' wx:for="{{ wareCards }}" wx:key="{{ index }}" bindtap='toWork' data-lessonId='{{ item.id }}' data-title='{{ item.title }}'>
     <!-- <view class='user-info'>

+ 1 - 1
pages/user/myworks/myworks.wxml

@@ -1,5 +1,5 @@
 <!-- pages/user/myworks/myworks.wxml -->
-<wxs src="../../commonWxs/format.wxs" module="format" />
+<!-- <wxs src="../../commonWxs/format.wxs" module="format" /> -->
 <view class='user-works'>
   <view class='follow-details'>
     <view class='follow-info'>

+ 1 - 1
pages/user/walletDetails/walletDetails.wxml

@@ -1,4 +1,4 @@
-<wxs src="../../commonWxs/format.wxs" module="format" />
+<!-- <wxs src="../../commonWxs/format.wxs" module="format" /> -->
 <view class='walletDetails'>
   <view class="walletDetails-center">
     <view class='walletDetails-info' wx:for="{{ walletDatails }}" wx:key="{{ index }}">

+ 113 - 110
project.config.json

@@ -1,112 +1,115 @@
 {
-	"description": "项目配置文件",
-	"packOptions": {
-		"ignore": []
-	},
-	"setting": {
-		"urlCheck": true,
-		"es6": true,
-		"postcss": true,
-		"minified": true,
-		"newFeature": true,
-		"coverView": true,
-		"autoAudits": true,
-		"showShadowRootInWxmlPanel": true,
-		"scopeDataCheck": false,
-		"checkInvalidKey": true,
-		"checkSiteMap": true,
-		"uploadWithSourceMap": true,
-		"babelSetting": {
-			"ignore": [],
-			"disablePlugins": [],
-			"outputPath": ""
-		}
-	},
-	"compileType": "miniprogram",
-	"libVersion": "2.10.1",
-	"appid": "wx8961a3e5512f307c",
-	"projectname": "%E5%B0%8F%E5%AD%A6%E8%AF%BE%E6%96%87%E6%9C%97%E8%AF%BB%E9%85%8D%E9%9F%B3",
-	"debugOptions": {
-		"hidedInDevtools": []
-	},
-	"isGameTourist": false,
-	"simulatorType": "wechat",
-	"simulatorPluginLibVersion": {},
-	"condition": {
-		"search": {
-			"current": -1,
-			"list": []
-		},
-		"conversation": {
-			"current": -1,
-			"list": []
-		},
-		"plugin": {
-			"current": -1,
-			"list": []
-		},
-		"game": {
-			"currentL": -1,
-			"list": []
-		},
-		"gamePlugin": {
-			"current": -1,
-			"list": []
-		},
-		"miniprogram": {
-			"current": 6,
-			"list": [
-				{
-					"id": 0,
-					"name": "pages/vipPage/wechat/wechat",
-					"pathName": "pages/vipPage/wechat/wechat",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": 1,
-					"name": "作品",
-					"pathName": "pages/social/works/works",
-					"query": "id=1548160250807513&title=【识字1】春夏秋冬",
-					"scene": "1012"
-				},
-				{
-					"id": 2,
-					"name": "分享团",
-					"pathName": "pages/groupPage/group-details/group-details",
-					"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
-				},
-				{
-					"id": -1,
-					"name": "小红花兑换页面",
-					"pathName": "pages/social/prize/prize",
-					"query": "",
-					"scene": null
-				},
-				{
-					"id": -1,
-					"name": "有问题朗读页面",
-					"pathName": "pages/social/works/works",
-					"query": "id=1553402613620097&title=【课文7】怎么都快乐",
-					"scene": null
-				}
-			]
-		}
-	}
+  "description": "项目配置文件",
+  "packOptions": {
+    "ignore": []
+  },
+  "setting": {
+    "urlCheck": true,
+    "es6": true,
+    "postcss": true,
+    "minified": true,
+    "newFeature": true,
+    "coverView": true,
+    "autoAudits": true,
+    "showShadowRootInWxmlPanel": true,
+    "scopeDataCheck": false,
+    "checkInvalidKey": true,
+    "checkSiteMap": true,
+    "uploadWithSourceMap": true,
+    "useMultiFrameRuntime": false,
+    "useApiHook": true,
+    "babelSetting": {
+      "ignore": [],
+      "disablePlugins": [],
+      "outputPath": ""
+    },
+    "useIsolateContext": true,
+    "useCompilerModule": true,
+    "userConfirmedUseCompilerModuleSwitch": false,
+    "packNpmManually": false,
+    "packNpmRelationList": [],
+    "minifyWXSS": true
+  },
+  "compileType": "miniprogram",
+  "libVersion": "2.14.0",
+  "appid": "wx8961a3e5512f307c",
+  "projectname": "%E5%B0%8F%E5%AD%A6%E8%AF%BE%E6%96%87%E6%9C%97%E8%AF%BB%E9%85%8D%E9%9F%B3",
+  "debugOptions": {
+    "hidedInDevtools": []
+  },
+  "isGameTourist": false,
+  "simulatorType": "wechat",
+  "simulatorPluginLibVersion": {},
+  "condition": {
+    "search": {
+      "list": []
+    },
+    "conversation": {
+      "list": []
+    },
+    "plugin": {
+      "list": []
+    },
+    "game": {
+      "currentL": -1,
+      "list": []
+    },
+    "gamePlugin": {
+      "list": []
+    },
+    "miniprogram": {
+      "list": [
+        {
+          "id": 0,
+          "name": "pages/vipPage/wechat/wechat",
+          "pathName": "pages/vipPage/wechat/wechat",
+          "query": "",
+          "scene": null
+        },
+        {
+          "id": 1,
+          "name": "作品",
+          "pathName": "pages/social/works/works",
+          "query": "id=1548160250807513&title=【识字1】春夏秋冬",
+          "scene": "1012"
+        },
+        {
+          "id": 2,
+          "name": "分享团",
+          "pathName": "pages/groupPage/group-details/group-details",
+          "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
+        },
+        {
+          "id": -1,
+          "name": "小红花兑换页面",
+          "pathName": "pages/social/prize/prize",
+          "query": "",
+          "scene": null
+        },
+        {
+          "id": -1,
+          "name": "有问题朗读页面",
+          "pathName": "pages/social/works/works",
+          "query": "id=1553402613620097&title=【课文7】怎么都快乐",
+          "scene": null
+        }
+      ]
+    }
+  }
 }

BIN
static/index/comment.png


BIN
static/index/flower.png


BIN
static/index/flower_colored.png


BIN
static/index/share.png


BIN
static/index/star.png


BIN
static/index/star_colored.png


+ 0 - 5
towxml/.gitignore

@@ -1,5 +0,0 @@
-/demo/towxml/
-/node_modules/
-/.vscode/
-.DS_Store
-project.config.json

+ 0 - 10
towxml/entry.wxml

@@ -1,10 +0,0 @@
-<template name="entry">
-  <view class="h2w h2w-{{theme}}">
-    <view class="h2w__main">
-      <import src="/towxml/renderTemplate.wxml"/>
-      <block wx:for="{{child}}" wx:key="{{index}}">
-        <template is="m0" data="{{item}}"/>
-      </block>
-    </view>
-  </view>
-</template>

+ 0 - 172
towxml/lib/Audio.js

@@ -1,172 +0,0 @@
-module.exports = (option) => {
-    option = option || {};
-    const app = option.app;
-
-    class Audio {
-        constructor(option) {
-            const _ts = this;
-
-            _ts.option = option.option;
-            _ts.playerId = option.playerId;
-            _ts.dataId = option.dataId;
-
-            this.player = this.createPlayer();
-            this.status = 'init';
-        }
-
-        // 播放
-        play() {
-            const _ts = this;
-            _ts.player.play();
-        }
-
-        // 暂停
-        pause() {
-            const _ts = this;
-            _ts.player.pause();
-        }
-
-        // 获取需要更新的数据键名
-        getAppDataKey(id){
-            for(let key in app.data){
-                let item = app.data[key];
-
-                if(item.id === id){
-                    return key;
-                };
-            };
-        }
-
-        updateView(data){
-            data = data || {};
-            const _ts = this,
-                option = _ts.option;
-
-            _ts.updateKey = _ts.updateKey || _ts.getAppDataKey(_ts.dataId)
-
-            let articleData = global.__towxmldata__[_ts.dataId].article,
-                playerData = global.__towxmldata__[_ts.dataId].audio[_ts.playerId];
-            
-            // 检查如果数据没有被应用到页面上则中止操作
-            if(!_ts.updateKey){
-                return;
-            };
-
-            // 将选项和新传入的数据组合到viewData,后续更新使用
-            for(let key in data){
-                option[key] = data[key];
-            };
-
-            // 设置默认进的播放进度
-            option.duration = _ts.duration || 0.001;
-            option.currentTime = _ts.currentTime || 0;
-            option.class = option.class || 'audioForH2w';
-
-            // 设置播放器样式
-            playerData.attr.class = option.class;
-
-            // 设置封面图片
-            playerData.child[1].child[0].attr.src = option.poster;
-            
-            // 设置进度条
-            playerData.child[2].child[0].attr.style = `width:${option.currentTime / option.duration * 100}%`;
-
-            // 设置title、歌手、播放时间
-            playerData.child[2].child[1].child[0].text = option.name;
-            playerData.child[2].child[2].child[0].text = option.author;
-            playerData.child[2].child[3].child[0].text = `${_ts.formatTime(option.duration)} / ${_ts.formatTime(option.currentTime)}`;
-
-            // 更新数据
-            let updateData = {};
-            updateData[_ts.updateKey] = articleData;
-
-            app.setData(updateData);
-        }
-
-        // 创建播放器
-        createPlayer() {
-            const _ts = this;
-
-            let option = _ts.option,
-
-                autoplay = option.autoplay === 'true' ? true :
-                            option.autoplay === 'false' ? false :
-                            !!option.autoplay,
-                loop = option.loop === 'true' ? true :
-                        option.loop === 'false' ? false :
-                        !!option.loop,
-                src = option.src,
-                audio = wx.createInnerAudioContext();
-
-            audio.autoplay = autoplay;
-            audio.loop = loop;
-            audio.src = src;
-
-            // 进入可播放状态时更新视图
-            audio.onCanplay(() =>{
-                _ts.updateView({
-                    class:'audioForH2w'
-                });
-            });
-
-            // 播放
-            audio.onPlay(() => {
-              _ts.status = 'start';
-
-              _ts.updateView({
-                  class:'audioForH2w audioForH2w--play'
-              });
-            });
-
-            // 播放过程中
-            let temp = 0;
-            audio.onTimeUpdate(function (obj) {
-                _ts.status = 'update';
-                _ts.duration = audio.duration;
-                _ts.currentTime = audio.currentTime;
-
-                // 每5秒更新一次(否则内容过多会导致性能低下)
-                if(_ts.currentTime - temp > 5){
-                    temp = _ts.currentTime;
-                    _ts.updateView({
-                        class:'audioForH2w audioForH2w--play'
-                    });
-                };
-            });
-
-            // 暂停
-            audio.onPause(obj => {
-                _ts.status = 'pause';
-
-                _ts.updateView({
-                    class:'audioForH2w'
-                });
-            });
-
-            // 停止
-            audio.onEnded(obj => {
-                _ts.status = 'end';
-
-                _ts.updateView({
-                    class:'audioForH2w audioForH2w--end'
-                });
-            });
-            return audio;
-        }
-
-        // 数字补位
-        fillIn = val => {
-            return `${val < 10 ? '0' : ''}${val}`;
-        }
-
-        // 格式化时间  
-        formatTime = time => {
-            let fillIn = this.fillIn,
-                second = Math.floor(time % 60),
-                minute = Math.floor(time / 60 % 60),
-                hour = Math.floor(time / 60 / 60);
-            return `${fillIn(hour)}:${fillIn(minute)}:${fillIn(second)}`;
-        }
-    };
-    return new Audio(option);
-};

File diff suppressed because it is too large
+ 0 - 5
towxml/lib/markdown-it.js


File diff suppressed because it is too large
+ 0 - 2
towxml/lib/parse5.js


+ 0 - 64
towxml/lib/tagsAndAttrs.js

@@ -1,64 +0,0 @@
-let wxml = [
-    // 建议保留的解析标签
-    'view',
-    'video',
-    'text',
-    'image',
-    'navigator',
-    'swiper',
-    'swiper-item',
-    'block',
-    'form',
-    'input',
-    'textarea',
-    'button',
-    'checkbox-group',
-    'checkbox',
-    'radio-group',
-    'radio',
-
-    // 可以解析的标签(html或markdown中会很少使用)
-    // 'canvas',
-    // 'map',
-    // 'slider',
-    // 'scroll-view',
-    // 'movable-area',
-    // 'movable-view',
-    // 'progress',
-    // 'label',
-    // 'switch',
-    // 'picker',
-    // 'picker-view',
-    // 'switch',
-    // // 'audio',
-    // 'contact-button'
-],
-binds = [
-    // 建议保留的事件
-    'bind:touchstart',
-    'bind:touchmove',
-    'bind:touchcancel',
-    'bind:touchend',
-    'bind:tap',
-    // 'bind:longpress',
-    // 'bind:longtap',
-    // 'bind:transitionend',
-    // 'bind:animationstart',
-    // 'bind:animationiteration',
-    // 'bind:animationend',
-    // 'bind:touchforcechange'
-],
-attrs = [
-    'class',
-    'width',
-    'height',
-    'data',
-    'id',
-    'style'
-];
-
-module.exports = {
-    wxml:wxml,
-    binds:binds,
-    attrs:[...binds,...attrs]
-};

+ 0 - 296
towxml/lib/toJson.js

@@ -1,296 +0,0 @@
-const Audio = require('./Audio'),
-    tagsAndAttrs = require('./tagsAndAttrs');
-class ToJson {
-    constructor(html,app){
-        const _ts = this;
-
-        let m = _ts.m = {};
-        m.parse = require('./parse5');
-
-        _ts.html = html;
-        _ts.data = {};
-        _ts.app = app;
-
-        // 得到整体页面的数据
-        _ts.data.document = m.parse.parse(_ts.html);
-
-        // 得到body部分的数据
-        _ts.data.body = _ts.getBodyData(_ts.data.document);
-
-        // 生成当前的数据ID
-        _ts.id  = `dataId_${+new Date}_${(Math.random()+'').slice(2)}`;
-
-        // 将数据保存到全局
-        global.__towxmldata__ = global.__towxmldata__ || {};
-        global.__towxmldata__[_ts.id] = global.__towxmldata__[_ts.id] || {};
-        global.__towxmldata__[_ts.id].audio = {};
-    }
-
-    getData(){
-        const _ts = this,
-            m = _ts.m;
-
-        let data = _ts.data,
-            outData = _ts.sortOut(data.body); 
-
-        outData.node = 'root';
-        
-        // 为数据添加ID
-        outData.id = _ts.id;
-
-        
-        global.__towxmldata__[_ts.id].article = outData;
-
-        return global.__towxmldata__[_ts.id].article;
-    }
-
-    /**
-     * 遍历页面数据整理成小程序想要的
-     */
-    sortOut(bodyData){
-        const _ts = this,
-            app = _ts.app,
-            appData = app.data ;
-        let result = {},
-            arrange;      
-        (arrange = (data,result)=>{  
-            // 当有数据且有子元素时则遍历
-            if(data && data.childNodes && data.childNodes.length){
-                // 子元素数据不存在时,创建一个空的数组用以存储子元素数据
-                if(!result.child){
-                    result.child = [];
-                };
-                // 遍历子节点,处理节点的数据
-                for(let i=0,len=data.childNodes.length; i<len; i++){
-                    let node = data.childNodes[i],                              // 得到具体的节点
-                        attrs = node.attrs,                                     // 得到节点的属性(一个数组)
-                        attrsLength = attrs && attrs.length ? attrs.length : 0, // 得到节点属性的长度
-                        current = {                                             // 创建一个空对象,用于存储节点属性及处理之后的属性
-                            _e:{},
-                            attr:{}                                             // html的原始数据
-                        };                                           
-                    if(node){
-                        result.child.push(current);
-                    };
-                    // 如果有属性则处理其属性
-                    if (attrsLength) {              
-                        if (current._e.attr === undefined) {
-                            //current.attr = {};
-                            current._e.attr = {};
-                        };
-                        for (let i = 0; i < attrsLength; i++) {
-                            let attrsItem = attrs[i],
-                                key = attrsItem.name,
-                                val = attrsItem.value;
-                            
-                            current.attr[key] = val;
-                            current._e.attr[key] = val;
-                        }; 
-                    };
-
-                    for(let key in node){
-                        // 保留最原始的html数据,父节点数据去掉(小程序会报错)
-                        if(typeof node[key] !== 'object'){
-                            current._e[key] = node[key];
-                        };
-                        switch (node.nodeName) {
-                            case 'body':
-                                current['node'] = 'root';
-                            break;
-                            case '#text':
-                                current['node'] = 'text';
-                                current['text'] = node.value;
-                            break;
-                            default:
-                                current['node'] = 'element';
-                            break;
-                        };
-                    };
-
-                    // 当前标签是audio的情况下
-                    if(node.tagName === 'audio'){
-                        current.tag = "view";
-                        current.attr = {};
-                        current.attr.class = 'audioForH2w';
-
-                        current._id = `audio_${+new Date()}_${(Math.random()+'').slice(2)}`;
-
-                        // // 用于保存播放器数据(小程序在setData完成之后,新的数据会重新占用内存空间,故此处保存没有必要)
-                        // if(appData){
-                        //     appData.__audioData__ = appData.__audio__ || {};
-                        //     appData.__audioData__[current._id] = current;
-                        // };
-
-                        // 创建播放器子元素
-                        current.child = [
-                            {   
-                                node:"element",
-                                tag:"view",
-                                attr:{
-                                    class:"h2w__view audioForH2w__icon"
-                                }
-                            },{
-                                node:"element",
-                                tag:"view",
-                                attr:{
-                                    class:"h2w__view audioForH2w__cover"
-                                },
-                                child:[
-                                    {
-                                        node:"element",
-                                        tag:"image",
-                                        type:"audio",
-                                        attr:{
-                                            class:"h2w__img"
-                                        }
-                                    }
-                                ]
-                            },{
-                                node:"element",
-                                tag:"view",
-                                attr:{
-                                    class:"h2w__view audioForH2w__info"
-                                },
-                                child:[
-                                    {
-                                        node:"element",
-                                        tag:"view",
-                                        attr:{
-                                            class: "h2w__view audioForH2w__schedule",
-                                            style: "width:0px;"
-                                        }
-                                    },{
-                                        node:"element",
-                                        tag:"view",
-                                        attr:{
-                                            class:"audioForH2w__title"
-                                        },
-                                        child:[
-                                            {
-                                                node:"text",
-                                                text: "--",
-                                                attr: {}
-                                            }
-                                        ]
-                                    },{
-                                        node:"element",
-                                        tag:"view",
-                                        attr:{
-                                            class:"audioForH2w__author"
-                                        },
-                                        child:[
-                                            {
-                                                node:"text",
-                                                text: "佚名",
-                                                attr: {}
-                                            }
-                                        ]
-                                    },{
-                                        node:"element",
-                                        tag:"view",
-                                        attr:{
-                                            class:"audioForH2w__time"
-                                        },
-                                        child:[
-                                            {
-                                                node:"text",
-                                                text: "00:00:00 / 00:00:00",
-                                                attr: {}
-                                            }
-                                        ]
-                                    }
-                                ]
-                            }
-                        ];
-
-                        if(appData){
-                            // 得到音频选项
-                            let audioOption = ((node)=>{
-                                let option = {},
-                                    nodeAttrs = node.attrs;
-
-                                for(let i=0,len=nodeAttrs.length; i<len; i++){
-                                    let attrItem = nodeAttrs[i];
-                                    option[attrItem.name] = attrItem.value;
-                                };
-
-                                return option;
-                            })(node);
-
-                            // 保存当前播放器数据
-                            global.__towxmldata__[_ts.id].audio[current._id] = current;
-
-                            //用于保存播放器对象
-                            appData.__audioObj__ = appData.__audioObj__ || {};
-                            appData.__audioObj__[current._id] = Audio({
-                                app:app,                            // 传入APP
-                                playerId:current._id,               // 当前播放器ID
-                                dataId:_ts.id,                      // 数据ID
-                                option:audioOption                  // 传入音频选项
-                            });
-                        };
-                    }else if(node.tagName){
-                        current.tag = _ts.getTag(node.tagName);
-                        current.attr.class = current.attr.class ? `h2w__${node.tagName} ${current.attr.class}` : `h2w__${node.tagName}`;
-                    };
-                    arrange(node,current);
-                };
-            };
-        })(bodyData,result);
-        return result;
-    }
-
-    /**
-     * 获取属于body那部分的数据
-     */
-    getBodyData(documentData){
-        let data,
-            getBody;
-        (getBody = (list)=>{
-            for(let i=0,len=list.length; i<len; i++){
-                let item = list[i];
-
-                if(item.nodeName === 'body' && item.tagName === 'body'){
-                    data = item;
-                    break;
-                }else if (item.childNodes){
-                    getBody(item.childNodes);
-                };
-            }
-        })(documentData.childNodes);
-        return data;
-    }
-
-    /**
-     * 得到转换对应的tag
-     */
-    getTag(tagName){
-        let correspondTag = this.correspondTag(),
-            wxmlTag = correspondTag[tagName] === undefined ? 'view' : correspondTag[tagName];
-        return wxmlTag;
-    }
-
-    /**
-     * 组织html与小程序的tag对应关系
-     */
-    correspondTag(){
-        let data = {
-            'a':'navigator',
-            'img':'image',
-            'todogroup':'checkbox-group'
-        };
-
-        // 该系列的标签都转换为text
-        ['span','b','strong','i','em','code','sub','sup','g-emoji','mark','ins'].forEach(item => {
-            data[item] = 'text';
-        });
-
-        // 该系列是小程序原生tag,不需要转换
-        tagsAndAttrs.wxml.forEach(item => {
-            data[item] = item;
-        });
-        return data;
-    }
-};
-
-module.exports = ToJson;

+ 0 - 137
towxml/main.js

@@ -1,137 +0,0 @@
-const Audio = require('./lib/Audio'),
-	tagsAndAttrs = require('./lib/tagsAndAttrs');
-
-class towxml {
-	constructor(option) {
-		const _ts = this;
-		option = option || {};
-
-		for (let i in option) {
-			_ts.config[i] = option[i];
-		};
-
-		_ts.m = {};
-
-		let mdOption = {
-			html: true,
-			xhtmlOut: true,
-			typographer: true,
-			breaks: true,
-			highlight: function (code, lang, callback) {
-				return _ts.m.highlight.highlightAuto(code).value;
-			}
-		};
-		
-		_ts.m.toJson = require('./lib/toJson');
-		_ts.m.highlight = require('./plugins/hljs/index');
-
-		_ts.m.md = require('./lib/markdown-it')(mdOption);
-		_ts.m.md_sub = require('./plugins/markdown-it-sub');
-		_ts.m.md_sup = require('./plugins/markdown-it-sup');
-		_ts.m.md_ins = require('./plugins/markdown-it-ins');
-		_ts.m.md_mark = require('./plugins/markdown-it-mark');
-		_ts.m.md_emoji = require('./plugins/markdown-it-emoji');
-		_ts.m.md_todo = require('./plugins/markdown-it-todoList');
-
-		_ts.m.md.use(_ts.m.md_sub);
-		_ts.m.md.use(_ts.m.md_sup);
-		_ts.m.md.use(_ts.m.md_ins);
-		_ts.m.md.use(_ts.m.md_mark);
-		_ts.m.md.use(_ts.m.md_emoji);
-		_ts.m.md.use(_ts.m.md_todo);
-
-		_ts.m.md.renderer.rules.emoji = function (token, idx) {
-			return '<g-emoji class="h2w__emoji h2w__emoji--' + token[idx].markup + '">' + token[idx].content + '</g-emoji>';
-		};
-	}
-
-	/**
-	 * markdown转html
-	 */
-	md2html(mdContent) {
-		const _ts = this;
-		return _ts.m.md.render(mdContent);
-	}
-
-	/**
-	 * html2json
-	 * @param  {string} content html或markdown字符串
-	 * @param  {string} type 'html'、'marddown'
-	 * @param  {object} app 小程序对象
-	 */
-	toJson(content, type, app){
-		const _ts = this;
-		type = type || 'html';
-
-		let json = '',
-			sortOutJson;
-
-		if (type === 'markdown') {
-			json = new _ts.m.toJson(_ts.md2html(content),app).getData();
-		} else if (type === 'html') {
-      		json = new _ts.m.toJson(content,app).getData();
-		};
-
-		json.theme = 'light';
-
-		if(app){
-			// 定义播放器点击时的播放与暂停方法
-			if(typeof app.__audioPlayAndPause__ !== 'function'){
-				app.__audioPlayAndPause__ = (event)=>{
-					let currentTarget = event.currentTarget || {},
-						dataset = currentTarget.dataset || {},
-						_el = dataset._el || {},
-						id = _el._id || {},
-						player = typeof app.data.__audioObj__ === 'object' ? app.data.__audioObj__[id] : undefined;
-					// 正在播放中则暂停,否则就播放
-					if(player && player.status !== 'play' && player.status !== 'update'){
-						player.play();
-					}else{
-						player.pause();
-						player.status = 'pause';
-					};
-				};
-			};
-
-
-			tagsAndAttrs.binds.forEach(item => {
-				let aItem = item.split(':'),
-					bindType = aItem[0],		// 事件绑定类型
-					evenType = aItem[1];		// 事件类型
-				
-
-				// 检查,如果有添加自定义事件,则运行该事件
-				app[`__${bindType}_${evenType}`] = (event)=>{
-					let funName = `event_${bindType}_${evenType}`,
-						timer = `${funName}_timer`,
-						runFun = app[funName];
-
-					// 为audio标签绑定音频播放
-					if(event && 
-						event.type === 'tap' && 
-						event.currentTarget &&
-						event.currentTarget.dataset &&
-						event.currentTarget.dataset._el &&
-						event.currentTarget.dataset._el._e && 
-						event.currentTarget.dataset._el._e.tagName === 'audio'){
-						app.__audioPlayAndPause__(event);
-					};
-
-					if(typeof runFun === 'function'){
-
-						// 由于小程序的事件绑定方式与冒泡机制问题,此处使用计时器以避免事件被同时多次调用
-						clearTimeout(app[timer]);
-						app[timer] = setTimeout(()=>{
-							runFun(event)
-						});
-					};
-				};
-			});
-			app[`__todo_checkboxChange`] = (event)=>{};
-		};
-
-		return json;
-	}
-};
-
-module.exports = towxml;

+ 0 - 177
towxml/outTemplate.js

@@ -1,177 +0,0 @@
-
-const tagsAndAttrs = require('./lib/tagsAndAttrs');
-class outwxml{
-    constructor(option){
-        const _ts = this;
-        _ts.config = {};
-
-        option = option || {};
-
-        for(let i in option){
-          _ts.config[i] = option[i];
-        };
-
-        _ts.m = {
-            fs:require('fs'),
-            path:require('path')
-        };
-    }
-    init(){
-        const _ts = this;
-        _ts.outtag();
-
-        let s = _ts.outwxml();
-        _ts.m.fs.writeFileSync('./renderTemplate.wxml',s);
-    }
-
-    //输出tag
-    outtag(id){
-        const _ts = this;
-        let s = '',
-            wxmlTag = tagsAndAttrs.wxml;
-        
-        wxmlTag.forEach((item,index)=>{
-            let imgMode = '',
-                attr = _ts.outattr(item);
-	        if(item === 'image'){
-		        imgMode = `mode="{{item.type === 'audio' ? '' : 'widthFix'}}"`;
-            };
-
-            // todo添加绑定事件
-            if(item === 'checkbox-group'){
-                attr += `bindchange="{{item.attr['bindchange']}}"`;
-            };
-            if(item === 'checkbox'){
-                attr += `value="{{item.attr['value']}}"`;
-            };
-
-            s+= `<${item} wx:if="{{item.node === 'element' && item.tag === '${item}'}}" ${attr} ${imgMode}><block wx:for="{{item.child}}" wx:key="{{item}}"><template is="m${id}" data="{{item}}"/></block></${item}>`;
-        });
-
-        return s;
-    }
-
-    //生成模版对应属性
-    outattr(tagName){
-        tagName = tagName || '';
-        const _ts = this;
-        
-        let s = '',
-            attr = [];
-        attr.push(...tagsAndAttrs.attrs);
-
-        switch (tagName) {
-            case 'navigator':
-                attr.push('href');
-            break;
-            case 'checkbox':
-            case 'radio':
-            case 'switch':
-                attr.push('checked');
-            break;
-            case 'audio':
-                attr.push('poster');
-                attr.push('src');
-                attr.push('name');
-                attr.push('author');
-                attr.push('loop');
-                // attr.push('controls');
-                s += 'controls="true" ';
-            break;
-            case 'video':
-                attr.push('poster');
-                attr.push('src');
-            break;
-            case 'image':
-                attr.push('src');
-            break;
-        };
-
-        s += `data-_el="{{item}}"`;
-        attr.forEach((item,index)=>{
-            switch (item) {
-                case 'class':
-                    s += `${item}="{{item.attr.class}}"`;
-                break;
-                case 'href':
-                    s += `url="{{item.attr.${item}}}"`;
-                break;
-                default:
-                    let aItem = item.split(':');
-                    if(aItem.length > 1){
-                        s += `${item}='__${aItem[0]}_${aItem[1]}'`;
-                    }else{
-                        s += `${item}="{{item.attr['${item}']}}"`;
-                    };
-                break;
-            };                   
-        });
-        return s;
-    }
-
-    //wxml模版生成
-    outwxml(){
-        const _ts = this;
-        let s = '';
-
-        for (let i = 0, len = _ts.config.depth; i<len; i++){
-            let c = i < len - 1 ? i+1 : i;
-            let temp = `<template name="m${i}"><block wx:if="{{item.node === 'text'}}">{{item.text}}</block>${_ts.outtag(c)}</template>`;
-            // let temp = `<template name="m${i}">
-            //         <!--文字-->
-            //         <block wx:if="{{item.node === 'text'}}">
-            //             {{item.text}}
-            //         </block>
-                    
-            //         ${_ts.outtag(c)}
-                    
-            //     </template>
-            // `;
-            // let temp = `
-            //     <template name="m${i}">
-            //         <!--文字-->
-            //         <block wx:if="{{item.node === 'text'}}">
-            //             {{item.text}}
-            //         </block>
-                    
-            //         <!--视图-->
-            //         <view
-            //             wx:if="{{item.node === 'element' && item.tag === 'view'}}"
-            //             class="{{item.attr.class}}"
-            //             width="{{item.attr.width}}"
-            //             height="{{item.attr.height}}"
-            //             data="{{item.attr.data}}"
-            //             src="{{item.attr.src}}"
-            //             id="{{item.attr.id}}"
-            //             style="{{item.attr.style}}"
-            //         >
-            //             <block wx:for="{{item.child}}" wx:key="{{item}}">
-            //                 <template is="m${c}" data="{{item}}"/>
-            //             </block>
-            //         </view>
-
-            //         <!--按钮-->
-            //         <button
-            //             wx:if="{{item.tag === 'button'}}"
-            //             class="{{item.attr.class}}"
-            //             width="{{item.attr.width}}"
-            //             height="{{item.attr.height}}"
-            //             data="{{item.attr.data}}"
-            //             src="{{item.attr.src}}"
-            //             id="{{item.attr.id}}"
-            //             style="{{item.attr.style}}"
-            //         >
-            //             <block wx:for="{{item.child}}" wx:key="{{item}}">
-            //                 <template is="m${c}" data="{{item}}"/>
-            //             </block>
-            //         </button>
-                    
-            //     </template>
-            // `;
-
-            s+=temp;
-        };
-        return s;
-    }
-};
-new outwxml({depth:10}).init();

+ 0 - 26
towxml/package.json

@@ -1,26 +0,0 @@
-{
-  "name": "towxml",
-  "version": "2.1.1",
-  "description": "HTML、Markdown转WXML(WeiXin Markup Language)渲染库",
-  "main": "main.js",
-  "scripts": {
-    "test": "echo \"Error: no test specified\" && exit 1"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/sbfkcel/towxml.git"
-  },
-  "keywords": [
-  	"html to wxml",
-  	"markdown to wxml",
-    "html2wxml",
-    "mark2wxml",
-    "wxml"
-  ],
-  "author": "单炒饭",
-  "license": "MIT",
-  "bugs": {
-    "url": "https://github.com/sbfkcel/towxml/issues"
-  },
-  "homepage": "https://github.com/sbfkcel/towxml#readme"
-}

File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/highlight.js


+ 0 - 29
towxml/plugins/hljs/index.js

@@ -1,29 +0,0 @@
-var hljs = require('./highlight');
-
-hljs.registerLanguage('bash', require('./languages/bash'));
-hljs.registerLanguage('coffeescript', require('./languages/coffeescript'));
-hljs.registerLanguage('css', require('./languages/css'));
-hljs.registerLanguage('dns', require('./languages/dns'));
-hljs.registerLanguage('dos', require('./languages/dos'));
-hljs.registerLanguage('erlang', require('./languages/erlang'));
-hljs.registerLanguage('go', require('./languages/go'));
-hljs.registerLanguage('htmlbars', require('./languages/htmlbars'));
-hljs.registerLanguage('http', require('./languages/http'));
-hljs.registerLanguage('java', require('./languages/java'));
-hljs.registerLanguage('javascript', require('./languages/javascript'));
-hljs.registerLanguage('json', require('./languages/json'));
-hljs.registerLanguage('less', require('./languages/less'));
-hljs.registerLanguage('makefile', require('./languages/makefile'));
-hljs.registerLanguage('markdown', require('./languages/markdown'));
-hljs.registerLanguage('nginx', require('./languages/nginx'));
-hljs.registerLanguage('php', require('./languages/php'));
-hljs.registerLanguage('powershell', require('./languages/powershell'));
-hljs.registerLanguage('python', require('./languages/python'));
-hljs.registerLanguage('ruby', require('./languages/ruby'));
-hljs.registerLanguage('scss', require('./languages/scss'));
-hljs.registerLanguage('shell', require('./languages/shell'));
-hljs.registerLanguage('sql', require('./languages/sql'));
-hljs.registerLanguage('swift', require('./languages/swift'));
-hljs.registerLanguage('typescript', require('./languages/typescript'));
-
-module.exports = hljs;

File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/bash.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/coffeescript.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/css.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/dns.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/dos.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/erlang.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/go.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/htmlbars.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/http.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/java.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/javascript.js


+ 0 - 1
towxml/plugins/hljs/languages/json.js

@@ -1 +0,0 @@
-module.exports=function(e){var n={literal:"true false null"},l=[e.QUOTE_STRING_MODE,e.C_NUMBER_MODE],i={end:",",endsWithParent:!0,excludeEnd:!0,contains:l,keywords:n},t={begin:"{",end:"}",contains:[{className:"attr",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE],illegal:"\\n"},e.inherit(i,{begin:/:/})],illegal:"\\S"},a={begin:"\\[",end:"\\]",contains:[e.inherit(i)],illegal:"\\S"};return l.splice(l.length,0,t,a),{contains:l,keywords:n,illegal:"\\S"}};

File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/less.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/makefile.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/markdown.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/nginx.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/php.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/powershell.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/python.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/ruby.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/scss.js


+ 0 - 1
towxml/plugins/hljs/languages/shell.js

@@ -1 +0,0 @@
-module.exports=function(s){return{aliases:["console"],contains:[{className:"meta",begin:"^\\s{0,3}[\\w\\d\\[\\]()@-]*[>%$#]",starts:{end:"$",subLanguage:"bash"}}]}};

File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/sql.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/swift.js


File diff suppressed because it is too large
+ 0 - 1
towxml/plugins/hljs/languages/typescript.js


+ 0 - 99
towxml/plugins/hljs/style/github.wxss

@@ -1,99 +0,0 @@
-/*
-
-github.com style (c) Vasily Polovnyov <vast@whiteants.net>
-
-*/
-
-.h2w-light .hljs {
-  display: block;
-  overflow-x: auto;
-  padding: 0.5em;
-  color: #333;
-  background: #f8f8f8;
-}
-
-.h2w-light .hljs-comment,
-.h2w-light .hljs-quote {
-  color: #998;
-  font-style: italic;
-}
-
-.h2w-light .hljs-keyword,
-.h2w-light .hljs-selector-tag,
-.h2w-light .hljs-subst {
-  color: #333;
-  font-weight: bold;
-}
-
-.h2w-light .hljs-number,
-.h2w-light .hljs-literal,
-.h2w-light .hljs-variable,
-.h2w-light .hljs-template-variable,
-.h2w-light .hljs-tag .hljs-attr {
-  color: #008080;
-}
-
-.h2w-light .hljs-string,
-.h2w-light .hljs-doctag {
-  color: #d14;
-}
-
-.h2w-light .hljs-title,
-.h2w-light .hljs-section,
-.h2w-light .hljs-selector-id {
-  color: #900;
-  font-weight: bold;
-}
-
-.h2w-light .hljs-subst {
-  font-weight: normal;
-}
-
-.h2w-light .hljs-type,
-.h2w-light .hljs-class .hljs-title {
-  color: #458;
-  font-weight: bold;
-}
-
-.h2w-light .hljs-tag,
-.h2w-light .hljs-name,
-.h2w-light .hljs-attribute {
-  color: #000080;
-  font-weight: normal;
-}
-
-.h2w-light .hljs-regexp,
-.h2w-light .hljs-link {
-  color: #009926;
-}
-
-.h2w-light .hljs-symbol,
-.h2w-light .hljs-bullet {
-  color: #990073;
-}
-
-.h2w-light .hljs-built_in,
-.h2w-light .hljs-builtin-name {
-  color: #0086b3;
-}
-
-.h2w-light .hljs-meta {
-  color: #999;
-  font-weight: bold;
-}
-
-.h2w-light .hljs-deletion {
-  background: #fdd;
-}
-
-.h2w-light .hljs-addition {
-  background: #dfd;
-}
-
-.h2w-light .hljs-emphasis {
-  font-style: italic;
-}
-
-.h2w-light .hljs-strong {
-  font-weight: bold;
-}

+ 0 - 70
towxml/plugins/hljs/style/monokai.wxss

@@ -1,70 +0,0 @@
-/*
-Monokai style - ported by Luigi Maselli - http://grigio.org
-*/
-
-.h2w-dark .hljs {
-  display: block;
-  overflow-x: auto;
-  padding: 0.5em;
-  background: #272822; color: #ddd;
-}
-
-.h2w-dark .hljs-tag,
-.h2w-dark .hljs-keyword,
-.h2w-dark .hljs-selector-tag,
-.h2w-dark .hljs-literal,
-.h2w-dark .hljs-strong,
-.h2w-dark .hljs-name {
-  color: #f92672;
-}
-
-.h2w-dark .hljs-code {
-  color: #66d9ef;
-}
-
-.h2w-dark .hljs-class .hljs-title {
-  color: white;
-}
-
-.h2w-dark .hljs-attribute,
-.h2w-dark .hljs-symbol,
-.h2w-dark .hljs-regexp,
-.h2w-dark .hljs-link {
-  color: #bf79db;
-}
-
-.h2w-dark .hljs-string,
-.h2w-dark .hljs-bullet,
-.h2w-dark .hljs-subst,
-.h2w-dark .hljs-title,
-.h2w-dark .hljs-section,
-.h2w-dark .hljs-emphasis,
-.h2w-dark .hljs-type,
-.h2w-dark .hljs-built_in,
-.h2w-dark .hljs-builtin-name,
-.h2w-dark .hljs-selector-attr,
-.h2w-dark .hljs-selector-pseudo,
-.h2w-dark .hljs-addition,
-.h2w-dark .hljs-variable,
-.h2w-dark .hljs-template-tag,
-.h2w-dark .hljs-template-variable {
-  color: #a6e22e;
-}
-
-.h2w-dark .hljs-comment,
-.h2w-dark .hljs-quote,
-.h2w-dark .hljs-deletion,
-.h2w-dark .hljs-meta {
-  color: #75715e;
-}
-
-.h2w-dark .hljs-keyword,
-.h2w-dark .hljs-selector-tag,
-.h2w-dark .hljs-literal,
-.h2w-dark .hljs-doctag,
-.h2w-dark .hljs-title,
-.h2w-dark .hljs-section,
-.h2w-dark .hljs-type,
-.h2w-dark .hljs-selector-id {
-  font-weight: bold;
-}

File diff suppressed because it is too large
+ 0 - 3
towxml/plugins/markdown-it-emoji.js


File diff suppressed because it is too large
+ 0 - 2
towxml/plugins/markdown-it-ins.js


File diff suppressed because it is too large
+ 0 - 2
towxml/plugins/markdown-it-mark.js


File diff suppressed because it is too large
+ 0 - 2
towxml/plugins/markdown-it-sub.js


File diff suppressed because it is too large
+ 0 - 2
towxml/plugins/markdown-it-sup.js


File diff suppressed because it is too large
+ 0 - 148
towxml/plugins/markdown-it-todoList.js


File diff suppressed because it is too large
+ 0 - 1
towxml/renderTemplate.wxml


+ 0 - 426
towxml/style/main.wxss

@@ -1,426 +0,0 @@
-/*音频播放器样式*/
-.audioForH2w {
-    height: 136rpx;
-    margin: 16rpx 0;
-    background: #f1f1f1;
-    position: relative;
-}
-
-.audioForH2w--play .audioForH2w__icon {
-    display: none;
-    opacity: 1;
-}
-
-.audioForH2w--play .audioForH2w__cover image {
-    opacity: 1;
-}
-
-/* .audioForH2w--end .audioForH2w__icon {width:20rpx; height:20rpx; background:white; border:0; left:24rpx; top:24rpx; border-radius:2rpx;} */
-.audioForH2w__cover {
-    width: 136rpx;
-    height: 136rpx;
-    background: black;
-    float: left;
-}
-
-.audioForH2w__cover image {
-    width: 100%;
-    height: 100%;
-    opacity: 0.6;
-    margin: 0;
-    transition: all 0.5s cubic-bezier(0.075, 0.82, 0.165, 1);
-}
-
-.audioForH2w__info {
-    padding-left: 20rpx;
-    padding-top: 16rpx;
-    position: absolute;
-    left: 136rpx;
-    right: 0;
-}
-
-.audioForH2w__schedule {
-    position: absolute;
-    left: 0;
-    top: 0;
-    background: rgba(0, 255, 0, 0.1);
-    height: 136rpx;
-    width: 0;
-}
-
-.audioForH2w__title {
-    display: block;
-    font-size: 24rpx;
-    height: 40rpx;
-    line-height: 40rpx;
-    font-weight: bold;
-}
-
-.audioForH2w__author {
-    display: block;
-    font-size: 20rpx;
-    height: 32rpx;
-    line-height: 32rpx;
-}
-
-.audioForH2w__time {
-    display: block;
-    font-size: 20rpx;
-    height: 32rpx;
-    line-height: 32rpx;
-}
-
-.audioForH2w__icon {
-    width: 0;
-    height: 0;
-    position: absolute;
-    left: 60rpx;
-    top: 48rpx;
-    border-width: 20rpx 0 20rpx 20rpx;
-    border-style: solid;
-    border-color: transparent transparent transparent #fff;
-    z-index: 1;
-}
-
-/*正文样式*/
-.h2w {
-    /* font-family: "黑体"; */
-    font-size: 32rpx;
-    line-height: 1.8;
-    word-wrap: break-word;
-    word-wrap: break-word;
-    word-break: break-all;
-}
-
-.h2w__main {
-    margin: 0 40rpx;
-    padding-top: 40rpx;
-}
-
-/**标题**/
-.h2w__h1,
-.h2w__h2,
-.h2w__h3,
-.h2w__h4,
-.h2w__h5,
-.h2w__h6 {
-    font-weight: bold;
-}
-
-.h2w__h1 {
-    border-bottom-style: double;
-    border-bottom-width: 6rpx;
-    font-size: 42rpx;
-    padding-bottom: 10rpx;
-    margin-bottom: 20rpx;
-}
-
-.h2w__h2 {
-    border-bottom-style: solid;
-    border-bottom-width: 1rpx;
-    font-size: 40rpx;
-    padding-bottom: 8rpx;
-    margin-bottom: 18rpx;
-}
-
-.h2w__h3 {
-    font-size: 38rpx;
-    padding-bottom: 6rpx;
-    margin-bottom: 12rpx;
-}
-
-.h2w__h4 {
-    font-size: 40rpx;
-    margin-bottom:70rpx;
-margin-top:70rpx;
-
-    /* text-align: center;
-    border:2rpx solid #000; */
-
-}
-
-.h2w__h5 {
-    font-size: 34rpx;
-    padding-bottom: 2rpx;
-    margin-bottom: 12rpx;
-}
-
-.h2w__h6 {
-    margin-bottom: 12rpx;
-}
-
-
-/**表格**/
-.h2w__table {
-    width: 100%;
-    border-collapse: collapse;
-    border-spacing: 0;
-    display: table;
-    margin-bottom: 40rpx;
-}
-
-.h2w__table .h2w__tr:nth-child(2n) {
-    background-color: red;
-}
-
-.h2w__colgroup {
-    display: table-column-group;
-}
-
-.h2w__col {
-    display: table-column;
-}
-
-.h2w__thead {
-    display: table-header-group;
-}
-
-.h2w__tbody {
-    display: table-row-group;
-}
-
-.h2w__tfoot {
-    display: table-footer-group;
-}
-
-.h2w__tr {
-    display: table-row;
-}
-
-.h2w__th,
-.h2w__td {
-    padding: 8rpx 16rpx;
-    font-size: 28rpx;
-    border-width: 1rpx;
-    border-style: solid;
-    display: table-cell;
-}
-
-.h2w__th {
-    font-weight: bold;
-}
-
-/**代码块**/
-.h2w__pre {
-    /*white-space:nowrap;*/
-    padding: 20rpx;
-    font-size: 28rpx;
-    word-break: normal;
-    border-width: 1rpx;
-    border-style: solid;
-    margin-bottom: 40rpx;
-    white-space: nowrap;
-    overflow-x: auto;
-}
-
-.h2w__pre .h2w__code {
-    padding: 0;
-    border: 0;
-    font-size: 100%;
-}
-
-.h2w__pre,
-.h2w__code {
-    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace, "STHeitiTC-Light", "Microsoft YaHei Light", -apple-system, system-ui, BlinkMacSystemFont;
-}
-
-.h2w__code {
-    /* padding: 4rpx 8rpx; */
-    /* margin: 0 4rpx; */
-    /* border-width: 1rpx; */
-    /* border-style: solid; */
-    /* border-radius: 8rpx; */
-    font-size: 100%;
-    overflow-x: auto;
-}
-
-.h2w__pre .h2w__span,
-.h2w__pre .h2w__a,
-.h2w__pre .h2w__span,
-.h2w__pre .h2w__b,
-.h2w__pre .h2w__strong,
-.h2w__pre .h2w__i,
-.h2w__pre .h2w__em {
-    display: inline;
-}
-
-.h2w__pre {
-    white-space: pre;
-    display: block;
-}
-
-.h2w__pre .h2w__code {
-    white-space: pre;
-    /* width: 9999px; */
-    display: block;
-    font-size: 80%;
-}
-
-/**列表**/
-.h2w__ul,
-.h2w__ol {
-    margin-bottom: 40rpx;
-    padding-left: 1rem;
-}
-
-.h2w__ul .h2w__ol,
-.h2w__ol .h2w__ul {
-    margin-bottom: 0;
-}
-
-.h2w__li {
-    display: list-item;
-}
-
-/**todo**/
-.h2w__todogroup {
-    margin-bottom: 40rpx;
-}
-
-.h2w__todogroup .h2w__todogroup {
-    padding-left: 1.6rem;
-}
-
-/**一级ol样式**/
-.h2w__ol {
-    list-style-type: decimal;
-}
-
-/**二级ol样式**/
-.h2w__ul .h2w__ol,
-.h2w__ol .h2w__ol {
-    list-style-type: lower-roman;
-}
-
-/**三级ol样式**/
-.h2w__ul .h2w__ul .h2w__ol,
-.h2w__ul .h2w__ol .h2w__ol,
-.h2w__ol .h2w__ul .h2w__ol,
-.h2w__ol .h2w__ol .h2w__ol {
-    list-style-type: lower-alpha;
-}
-
-/**一级ul样式**/
-.h2w__ul {
-    list-style-type: disc;
-}
-
-/**二级ul样式**/
-.h2w__ul .h2w__ul,
-.h2w__ol .h2w__ul {
-    list-style-type: circle;
-}
-
-/**三级样式**/
-.h2w__ol .h2w__ol .h2w__ul,
-.h2w__ol .h2w__ul .h2w__ul,
-.h2w__ul .h2w__ol .h2w__ul,
-.h2w__ul .h2w__ul .h2w__ul {
-    list-style-type: square;
-}
-
-/**块元素**/
-.h2w__p {
-    margin: 20rpx 0 20rpx 0;
-    /*word-wrap:break-word;
-    word-break:break-all;*/
-    /*text-align:justify;*/
-}
-
-.h2w__div {
-    /*text-align:justify;*/
-}
-
-.h2w__blockquote {
-    border-left-width: 8rpx;
-    border-left-style: solid;
-    padding: 0 20rpx;
-}
-
-/**内连元素**/
-.h2w__a,
-.h2w__span,
-.h2w__b,
-.h2w__strong,
-.h2w__i,
-.h2w__em {
-    display: inline;
-}
-
-.h2w__b,
-.h2w__strong {
-    font-weight: bold;
-    color:#555
-}
-
-.h2w__i,
-.h2w__em {
-    font-style: italic;
-}
-
-/**文本删除线**/
-.h2w__s,
-.h2w__strike,
-.h2w__del {
-    text-decoration: line-through;
-}
-
-/**文本下划线**/
-.h2w__ins,
-.h2w__u {
-    text-decoration: underline;
-}
-
-/**链接**/
-.h2w__a {
-    margin: 0 8rpx;
-    border-bottom-width: 1rpx;
-    border-bottom-style: solid;
-    line-height: 1;
-}
-
-.h2w__hr {
-    height: 8rpx;
-    margin: 40rpx 0;
-}
-
-/**荧光标记**/
-.h2w__mark {
-    border-radius: 4rpx;
-}
-
-/**上标、下标**/
-.h2w__sup,
-.h2w__sub {
-    font-size: 75%;
-    position: relative;
-}
-
-.h2w__sup {
-    top: -0.5em;
-}
-
-.h2w__sub {
-    bottom: -0.25em;
-}
-
-/**emoji表情**/
-.h2w__g-emoji {
-    margin: 0 0.1em;
-    /* font-family: "Apple Color Emoji", "Segoe UI", "Segoe UI Emoji", "Segoe UI Symbol"; */
-}
-
-/**内置元素**/
-image,
-video {
-    width: 100%;
-    /* margin: 10rpx auto; */
-}
-
-image {
-    height: auto;
-}
-
-video {
-    height: 220px;
-}

+ 0 - 87
towxml/style/theme/dark.wxss

@@ -1,87 +0,0 @@
-/*音频播放器样式*/
-.h2w-dark  .audioForH2w {
-    background: #1f1f1f;
-}
-
-.h2w-dark .audioForH2w__cover {
-    background: black;
-}
-
-.h2w-dark .audioForH2w__schedule {
-    background: rgba(0, 255, 0, 0.2);
-}
-
-.h2w-dark .audioForH2w__icon {
-    border-color: transparent transparent transparent #fff;
-}
-
-/*正文样式*/
-.h2w-dark {
-  color:#ddd;
-  background-color:#000;
-}
-
-/**标题**/
-.h2w-dark .h2w__h1,
-.h2w-dark .h2w__h2 {
-    border-color:#3d3d3d;
-}
-
-
-/**表格**/
-.h2w-dark .h2w__thead .h2w__tr {
-    background-color:#1f1f1f;
-}
-.h2w-dark .h2w__table .h2w__tr:nth-child(2n){
-    background-color:#090909;
-}
-.h2w-dark .h2w__th,
-.h2w-dark .h2w__td {
-    border-color:#333;
-}
-
-
-/**代码块**/
-.h2w-dark .h2w__pre,
-.h2w-dark .h2w__pre .h2w__code {
-    background-color:#1b1b1b;
-    border-color:#262626;
-}
-
-.h2w-dark .h2w__code {
-    background-color:#272822;
-    border-color:#1b1c18;
-}
-
-
-/**块元素**/
-.h2w-dark .h2w__blockquote {
-    border-left-color:#10230f;
-}
-
-/**内连元素**/
-.h2w-dark .h2w__a {
-    color:#1aad16; border-color:#4d804b;
-}
-
-.h2w-dark .h2w__hr {
-    background-color:#242424;
-}
-
-.h2w-dark .h2w__mark {
-    background:yellow;
-    color:black;
-}
-
-.h2w-dark .h2w__todoCheckbox .wx-checkbox-input {
-    background:#2e2e2e; border-color:#494949;
-}
-.h2w-dark .h2w__todoCheckbox .wx-checkbox-input.wx-checkbox-input-checked {
-    background:green; border-color:#4d804b;
-}
-.h2w-dark .h2w__todoCheckbox .wx-checkbox-input.wx-checkbox-input-checked::before {
-    color:white;
-}
-
-/**代码高亮样式**/
-@import '/towxml/plugins/hljs/style/monokai.wxss';

+ 0 - 75
towxml/style/theme/light.wxss

@@ -1,75 +0,0 @@
-/*音频播放器样式*/
-.h2w-light .audioForH2w {
-    background: #f1f1f1;
-}
-
-.h2w-light .audioForH2w__cover {
-    background: black;
-}
-
-.h2w-light .audioForH2w__schedule {
-    background: rgba(0, 255, 0, 0.1);
-}
-
-.h2w-light .audioForH2w__icon {
-    border-color: transparent transparent transparent #fff;
-}
-
-/*正文样式*/
-.h2w-light {
-  color:#333;
-  background-color:white;
-}
-
-/**标题**/
-.h2w-light .h2w__h1,
-.h2w-light .h2w__h2 {
-    border-color:#eee;
-}
-
-
-/**表格**/
-.h2w-light .h2w__thead .h2w__tr {
-    background-color:#f6f8fa;
-}
-.h2w-light .h2w__table .h2w__tr:nth-child(2n){
-    background-color:#fbfcfd;
-}
-.h2w-light .h2w__th,
-.h2w-light .h2w__td {
-    border-color:#dfe2e5;
-}
-
-
-/**代码块**/
-.h2w-light .h2w__pre {
-    background-color:#f6f8fa;
-    border-color:#eaedf0;
-}
-
-.h2w-light .h2w__code {
-    color: red;
-}
-
-
-/**块元素**/
-.h2w-light .h2w__blockquote {
-    border-left-color:#dfe2e5;
-}
-
-/**内连元素**/
-.h2w-light .h2w__a {
-    color:#1aad16; border-color:#b9d9b8;
-}
-
-.h2w-light .h2w__hr {
-    background-color:#eee;
-}
-
-.h2w-light .h2w__mark {
-    background:yellow;
-    color:black;
-}
-
-/**代码高亮样式**/
-@import '/towxml/plugins/hljs/style/github.wxss';

+ 2 - 2
utils/const.js

@@ -2,8 +2,8 @@
 module.exports = {
   // productApi: 'https://reader.lingjiao.cn/readerProduct/',
   // productApi: 'https://readertest.lingjiao.cn:442/readerProduct/',
-  productApi:  'https://reader-efun.lingjiao.cn/readerProduct/',
+  productApi:  'https://reader-test.efunbox.cn/readerProduct/',
   // baseApi: 'https://reader.lingjiao.cn/readerBase/'
   // baseApi: 'https://readertest.lingjiao.cn:442/readerBase/'
-  baseApi: 'https://reader-efun.lingjiao.cn/readerBase/'
+  baseApi: 'https://reader-test.efunbox.cn/readerBase/'
 }