Rorschach 5 years ago
parent
commit
f95557aec0
64 changed files with 275 additions and 10364 deletions
  1. 0 270
      .history/component/hot/hot_20190129191712.js
  2. 0 117
      .history/component/hot/hot_20190129191834.wxml
  3. 0 269
      .history/component/hot/hot_20190325152142.js
  4. 0 118
      .history/component/hot/hot_20190325152225.wxml
  5. 0 270
      .history/component/hot/hot_20190325152253.js
  6. 0 270
      .history/component/hot/hot_20190327111152.js
  7. 0 270
      .history/component/hot/hot_20190327111215.js
  8. 0 268
      .history/component/hot/hot_20190327135616.js
  9. 0 117
      .history/component/hot/hot_20190327135616.wxml
  10. 0 269
      .history/component/hot/hot_20190327143311.js
  11. 0 343
      .history/component/share/share_20190128152337.js
  12. 0 347
      .history/component/share/share_20190322145541.js
  13. 0 340
      .history/pages/index/index_20190315155712.js
  14. 0 342
      .history/pages/index/index_20190327153623.js
  15. 0 727
      .history/pages/social/works/works_20190218174331.js
  16. 0 727
      .history/pages/social/works/works_20190327112337.js
  17. 0 173
      .history/pages/user/myEdit/myEdit_20190123180844.js
  18. 0 208
      .history/pages/user/myEdit/myEdit_20190123180844.wxss
  19. 0 55
      .history/pages/user/myEdit/myEdit_20190128180953.wxml
  20. 0 58
      .history/pages/user/myEdit/myEdit_20190327140358.wxml
  21. 0 220
      .history/pages/user/myEdit/myEdit_20190327140358.wxss
  22. 0 221
      .history/pages/user/myEdit/myEdit_20190327142456.wxss
  23. 0 59
      .history/pages/user/myEdit/myEdit_20190327142622.wxml
  24. 0 227
      .history/pages/user/myEdit/myEdit_20190327142622.wxss
  25. 0 228
      .history/pages/user/myEdit/myEdit_20190327143355.wxss
  26. 0 196
      .history/pages/user/myEdit/myEdit_20190327145648.js
  27. 0 59
      .history/pages/user/myEdit/myEdit_20190327145648.wxml
  28. 0 196
      .history/pages/user/myEdit/myEdit_20190327151305.js
  29. 0 196
      .history/pages/user/myEdit/myEdit_20190327151535.js
  30. 0 199
      .history/pages/user/myEdit/myEdit_20190327151604.js
  31. 0 199
      .history/pages/user/myEdit/myEdit_20190327151715.js
  32. 0 199
      .history/pages/user/myEdit/myEdit_20190327151800.js
  33. 0 201
      .history/pages/user/myEdit/myEdit_20190327152518.js
  34. 0 200
      .history/pages/user/myEdit/myEdit_20190327152604.js
  35. 0 201
      .history/pages/user/myEdit/myEdit_20190327152657.js
  36. 0 59
      .history/pages/user/myEdit/myEdit_20190327152925.wxml
  37. 0 202
      .history/pages/user/myEdit/myEdit_20190327153000.js
  38. 0 203
      .history/pages/user/myEdit/myEdit_20190327153148.js
  39. 0 203
      .history/pages/user/myEdit/myEdit_20190327153246.js
  40. 0 59
      .history/pages/user/myEdit/myEdit_20190327153405.wxml
  41. 0 228
      .history/pages/user/myEdit/myEdit_20190327154940.wxss
  42. 0 62
      .history/pages/user/myEdit/myEdit_20190327155027.wxml
  43. 0 61
      .history/pages/user/myEdit/myEdit_20190327155316.wxml
  44. 0 61
      .history/pages/user/myEdit/myEdit_20190327161816.wxml
  45. 0 61
      .history/pages/user/myEdit/myEdit_20190327162022.wxml
  46. 0 228
      .history/pages/user/myEdit/myEdit_20190327162022.wxss
  47. 0 229
      .history/pages/user/myEdit/myEdit_20190327162112.wxss
  48. 0 84
      .history/project.config_20190315155909.json
  49. 0 84
      .history/project.config_20190322144916.json
  50. 0 7
      .history/utils/const_20190315160409.js
  51. 0 7
      .history/utils/const_20190322144916.js
  52. 17 10
      component/my/my.js
  53. 3 3
      component/my/my.wxml
  54. 7 1
      component/myModal/myModal.wxml
  55. 30 10
      component/myModal/myModal.wxss
  56. 31 16
      pages/index/index.js
  57. 5 39
      pages/main/class/class.js
  58. 40 72
      pages/social/works/works.js
  59. 16 4
      pages/vipPage/vip/vip.js
  60. 2 2
      pages/vipPage/vip/vip.wxml
  61. 78 8
      pages/vipPage/vipCode/vipCode.js
  62. 7 2
      pages/vipPage/vipCode/vipCode.wxml
  63. 22 0
      pages/vipPage/vipCode/vipCode.wxss
  64. 17 0
      utils/APIClient.js

+ 0 - 270
.history/component/hot/hot_20190129191712.js

@@ -1,270 +0,0 @@
-import httpRequestApi from '../../utils/APIClient';
-import {
-  formatDate
-} from '../../utils/util';
-export const hotInit = (that) => {
-  if (!that.data.hotData) {
-    that.setData({
-      hotData: {
-        title: '热门',
-        autoplay: false,
-        swiperCurrent: 0,
-        interval: 5000,
-        duration: 700,
-        circular: true,
-        hotWareCardFirst: 'hotWareCardFirst',
-        hotWareCard: 'hotWareCard',
-        hotSearch: '',
-        banner: [],
-        recommend: [],
-        hotWorks: [],
-        winH: that.data.winH,
-        searchIcon: true,
-        unReadMessageNum: 0,
-        myCourse: [],
-        inputFocus: false,
-        inputValue: ''
-        // circular: true
-      }
-    })
-  }
-  // 搜索方法
-  that.searchHandler = () => {
-      if (that.data.hotInput.lenght !== 0) {
-        wx.navigateTo({
-          url: `../main/searchResult/searchResult?keyWords=${that.data.hotInput}`
-        })
-      }
-      const str = 'hotData.inputValue';
-      that.setData({
-        [str]: ''
-      })
-    },
-    // 输入框获取焦点 放大镜消失
-    that.searchIconDisappear = () => {
-      const str = 'hotData.searchIcon'
-      that.setData({
-        [str]: false
-      })
-    },
-    that.searchIconCome = () => {
-      const str = 'hotData.searchIcon'
-      that.setData({
-        [str]: true
-      })
-    }
-
-  // 输入框输入
-  that.inputHandler = (e) => {
-      that.setData({
-        hotInput: e.detail.value
-      });
-    },
-    // 输入框聚焦
-    that.inputFocus = () => {
-      const str = 'hotData.inputFocus'
-      that.setData({
-        [str]: true
-      });
-      console.log(that.data.hotData.inputFocus)
-    },
-    // 打开全部课本
-    that.openBooks = (e) => {
-      wx.navigateTo({
-        url: `../main/books/books`
-      })
-    }
-  // 打开更多页面
-  that.openMore = () => {
-    wx.navigateTo({
-      url: `../main/week/week`
-    })
-  }
-  // 打开课程页面
-  that.openClass = (e, lessonId) => {
-    if (lessonId) {
-      wx.navigateTo({
-        url: `../main/class/class?id=${lessonId}`
-      })
-    } else {
-      let id = e.currentTarget.dataset.classid;
-      let title = e.currentTarget.dataset.title;
-      wx.navigateTo({
-        url: `../main/class/class?id=${id}&title=${title}`
-      })
-    }
-  }
-  // 打开用户作品页面
-  that.openWorks = (e) => {
-    let readId = e.currentTarget.dataset.readid;
-    let title = e.currentTarget.dataset.title;
-    wx.navigateTo({
-      url: `../social/works/works?id=${readId}&title=${title}`
-    })
-  }
-  that.getIndex = () => {
-    const uid = wx.getStorageSync('uid');
-    httpRequestApi.getIndex(
-      uid
-    ).success((res) => {
-      const recommend = res.data.data.recommendLesson;
-      const recommendTemp = [];
-      recommend.forEach(item => {
-        const oTemp = {};
-        oTemp.img = item.boothContent;
-        oTemp.classId = item.operationContent;
-        oTemp.title = item.title;
-        oTemp.summary = item.summary;
-        recommendTemp.push(oTemp);
-      });
-      let recommendIndex = 'hotData.recommend';
-      that.setData({
-        [recommendIndex]: recommendTemp
-      });
-      httpRequestApi.userIntoPage('pages/index/index', '首页推荐').success((res) => {
-
-      })
-    })
-  }
-  that.getHotRecommend = (uid) => {
-    httpRequestApi.getHotRecommend(
-      uid
-    ).success((res) => {
-      // 点击切换按钮时 只刷新我的课程和未读消息 官方推荐和热门不加载
-      const recommendRes = res.data.data;
-      console.log(that.data.hotData.hotWorks.length)
-      if (that.data.hotData.hotWorks.length > 0) {
-        const myCourseStr = 'hotData.myCourse'
-        const isMessageNormal = 'hotData.isMessageNormal'
-        const unReadMessageContent = 'hotData.unReadMessageContent'
-        // unread为true时显示 未读消息,unread为false时显示通知消息,并且通知消息不可读
-        that.setData({
-          [myCourseStr]: recommendRes.myCourse,
-          [isMessageNormal]: recommendRes.unread,
-          // [unReadMessageContent]: recommendRes.unread ? recommendRes.unreadMsg.content : recommendRes.annunciateMsg.content,
-          [unReadMessageContent]: recommendRes.annunciateMsg.content,
-        })
-
-        return;
-      }
-      recommendRes.hotReader.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 ? item.user.avatar : '';
-        temp.profession = item.user ? item.user.profession : '';
-        temp.uid = item.user ? item.user.uid : '';
-        // temp.avatar = item.user.avatar;
-        temp.nickName = item.user ? item.user.wechatName : '';
-        // recommendWorks.push(temp);
-        that.data.hotData.hotWorks.push(temp);
-      });
-      const hotStr = 'hotData.hotWorks'
-      const myCourseStr = 'hotData.myCourse'
-      const isMessageNormal = 'hotData.isMessageNormal'
-      const unReadMessageContent = 'hotData.unReadMessageContent'
-      that.setData({
-        [hotStr]: that.data.hotData.hotWorks,
-        [myCourseStr]: recommendRes.myCourse,
-        [isMessageNormal]: recommendRes.unread,
-        // [unReadMessageContent]: recommendRes.unread ? recommendRes.unreadMsg.content : recommendRes.annunciateMsg.content,
-        [unReadMessageContent]: recommendRes.annunciateMsg.content,
-        unfinishedCount: recommendRes.unfinishedCount
-      })
-    })
-  }
-
-  that.getHotRecommendSecond = (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.avatar = item.user.avatar;
-        temp.nickName = item.user.wechatName;
-        // recommendWorks.push(temp);
-        that.data.hotData.hotWorks.push(temp);
-      });
-      const hotStr = 'hotData.hotWorks'
-      that.setData({
-        [hotStr]: that.data.hotData.hotWorks,
-        recommendTotalNo: res.data.data.totalNo
-      })
-    })
-  }
-  // 去全部课本
-  that.goToBooks = () => {
-    wx.navigateTo({
-      url: `../main/books/books`
-    })
-  }
-  that.bannerTap = (e) => {
-      const type = e.currentTarget.dataset.type;
-      const id = e.currentTarget.dataset.id;
-      switch (type) {
-        case 'LESSON':
-          that.openClass('tap', id);
-          break;
-      }
-    },
-    that.goToUsers = (e) => {
-      console.log(e)
-      let uid = e.currentTarget.dataset.uid;
-      wx.navigateTo({
-        url: `../../pages/user/myworks/myworks?uid=${uid}`
-      });
-    }
-  // 下拉加载
-  that.scrollUpdate = (e) => {
-    console.log(e)
-  }
-  console.log(that.data.hotData.recommend)
-
-  if (wx.getStorageSync('uid')) {
-    that.getIndex();
-    that.getHotRecommend(wx.getStorageSync('uid'));
-  }
-  // that.getIndex();
-
-  // 获取全部课本
-  // that.getBookList();
-  // that.swiperChange = (e) => {
-  //   const str = 'hotData.swiperCurrent'
-  //   that.setData({
-  //     [str]: e.detail.current
-  //   });
-  // }
-  //跳转到课程详情
-  that.goToBook = function (e) {
-    console.log(e.currentTarget.dataset)
-    let id = e.currentTarget.dataset.id;
-    let title = e.currentTarget.dataset.title;
-    console.log(id)
-    wx.navigateTo({
-      url: `/pages/groupPage/grade-details/grade-details?productId=${id}&title=${title}`
-    })
-  }
-  that.swiperChange = (e) => {
-    const str = 'hotData.swiperCurrent'
-    that.setData({
-      [str]: e.detail.current
-    });
-  }
-}

+ 0 - 117
.history/component/hot/hot_20190129191834.wxml

@@ -1,117 +0,0 @@
-<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.isMessageNormal}}">
-        <image class="messageIcon" src="../../static/image/message_icon.png" />
-        <text class="messageText">{{hotData.unReadMessageContent}}</text>
-    </view>
-    <view class="myCourseSection">
-        <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="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>
-        <view bindtap="inputFocus" class="searchBtn" wx:if="{{hotData.searchIcon}}">
-            <!-- <icon type="search" size="14" /> -->
-            <image src="../../static/image/search_new.png" alt="" />
-        </view>
-        <view class="allBooks" bindtap="goToBooks">全部课程</view>
-        <!-- <form bindsubmit="submitTest" report-submit="{{true}}" class="allBooks">
-            <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">
-            <view wx:for="{{hotData.hotWorks}}" wx:key="{{index}}" class="worksCard" bindtap="openWorks" data-readId="{{item.classId}}" data-title="{{item.title}}">
-                <view class="topData">
-                    <view class="worksLeft" catchtap="goToUsers" data-uid="{{item.uid}}">
-                        <image class="authorAvatar" lazy-load="true" src="{{item.avatar}}" />
-                        <view class="profession" wx:if="{{item.profession}}">
-                            {{item.profession}}
-                        </view>
-                        <view class="worksInfo">
-                            <view class="authorName">{{item.nickName}}</view>
-                            <view class="time">{{item.time}}</view>
-                        </view>
-                    </view>
-                    <view class="numberInfo">
-                        <view class="wareCardPlays">
-                            <image class="wareCardPlaysImg" lazy-load="true" src="../../static/image/hotPlays.png" />
-                            <text>{{item.plays}}</text>
-                        </view>
-                        <view class="wareCardLikes">
-                            <image class="wareCardLikesImg" lazy-load="true" src="../../static/image/flower_small_pink.png" />
-                            <text>{{item.likes}}</text>
-                        </view>
-                    </view>
-                </view>
-                <image class="wareCardImg" src="{{item.img}}" />
-                <view class="titleSummary">
-                    <text class="wareCardTitle">{{item.title}}</text>
-                    <text class="wareCardTip">{{item.summary}}</text>
-                </view>
-            </view>
-        </view>
-    </view>
-</template>

+ 0 - 269
.history/component/hot/hot_20190325152142.js

@@ -1,269 +0,0 @@
-import httpRequestApi from '../../utils/APIClient';
-import {
-  formatDate
-} from '../../utils/util';
-export const hotInit = (that) => {
-  if (!that.data.hotData) {
-    that.setData({
-      hotData: {
-        title: '热门',
-        autoplay: false,
-        swiperCurrent: 0,
-        interval: 5000,
-        duration: 700,
-        circular: true,
-        hotWareCardFirst: 'hotWareCardFirst',
-        hotWareCard: 'hotWareCard',
-        hotSearch: '',
-        banner: [],
-        recommend: [],
-        hotWorks: [],
-        winH: that.data.winH,
-        searchIcon: true,
-        unReadMessageNum: 0,
-        myCourse: [],
-        inputFocus: false,
-        inputValue: ''
-        // circular: true
-      }
-    })
-  }
-  // 搜索方法
-  that.searchHandler = () => {
-      if (that.data.hotInput.lenght !== 0) {
-        wx.navigateTo({
-          url: `../main/searchResult/searchResult?keyWords=${that.data.hotInput}`
-        })
-      }
-      const str = 'hotData.inputValue';
-      that.setData({
-        [str]: ''
-      })
-    },
-    // 输入框获取焦点 放大镜消失
-    that.searchIconDisappear = () => {
-      const str = 'hotData.searchIcon'
-      that.setData({
-        [str]: false
-      })
-    },
-    that.searchIconCome = () => {
-      const str = 'hotData.searchIcon'
-      that.setData({
-        [str]: true
-      })
-    }
-
-  // 输入框输入
-  that.inputHandler = (e) => {
-      that.setData({
-        hotInput: e.detail.value
-      });
-    },
-    // 输入框聚焦
-    that.inputFocus = () => {
-      const str = 'hotData.inputFocus'
-      that.setData({
-        [str]: true
-      });
-      console.log(that.data.hotData.inputFocus)
-    },
-    // 打开全部课本
-    that.openBooks = (e) => {
-      wx.navigateTo({
-        url: `../main/books/books`
-      })
-    }
-  // 打开更多页面
-  that.openMore = () => {
-    wx.navigateTo({
-      url: `../main/week/week`
-    })
-  }
-  // 打开课程页面
-  that.openClass = (e, lessonId) => {
-    if (lessonId) {
-      wx.navigateTo({
-        url: `../main/class/class?id=${lessonId}`
-      })
-    } else {
-      let id = e.currentTarget.dataset.classid;
-      let title = e.currentTarget.dataset.title;
-      wx.navigateTo({
-        url: `../main/class/class?id=${id}&title=${title}`
-      })
-    }
-  }
-  // 打开用户作品页面
-  that.openWorks = (e) => {
-    let readId = e.currentTarget.dataset.readid;
-    let title = e.currentTarget.dataset.title;
-    wx.navigateTo({
-      url: `../social/works/works?id=${readId}&title=${title}`
-    })
-  }
-  that.getIndex = () => {
-    const uid = wx.getStorageSync('uid');
-    httpRequestApi.getIndex(
-      uid
-    ).success((res) => {
-      const recommend = res.data.data.recommendLesson;
-      const recommendTemp = [];
-      recommend.forEach(item => {
-        const oTemp = {};
-        oTemp.img = item.boothContent;
-        oTemp.classId = item.operationContent;
-        oTemp.title = item.title;
-        oTemp.summary = item.summary;
-        recommendTemp.push(oTemp);
-      });
-      let recommendIndex = 'hotData.recommend';
-      that.setData({
-        [recommendIndex]: recommendTemp
-      });
-      httpRequestApi.userIntoPage('pages/index/index', '首页推荐').success((res) => {
-
-      })
-    })
-  }
-  that.getHotRecommend = (uid) => {
-    httpRequestApi.getHotRecommend(
-      uid
-    ).success((res) => {
-      // 点击切换按钮时 只刷新我的课程和未读消息 官方推荐和热门不加载
-      const recommendRes = res.data.data;
-      console.log(that.data.hotData.hotWorks.length)
-      if (that.data.hotData.hotWorks.length > 0) {
-        const myCourseStr = 'hotData.myCourse'
-        const isMessageNormal = 'hotData.isMessageNormal'
-        const unReadMessageContent = 'hotData.unReadMessageContent'
-        // unread为true时显示 未读消息,unread为false时显示通知消息,并且通知消息不可读
-        that.setData({
-          [myCourseStr]: recommendRes.myCourse,
-          [isMessageNormal]: recommendRes.unread,
-          // [unReadMessageContent]: recommendRes.unread ? recommendRes.unreadMsg.content : recommendRes.annunciateMsg.content,
-          [unReadMessageContent]: unreadMsg.title,
-        })
-
-        return;
-      }
-      recommendRes.hotReader.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 ? item.user.avatar : '';
-        temp.profession = item.user ? item.user.profession : '';
-        temp.uid = item.user ? item.user.uid : '';
-        // temp.avatar = item.user.avatar;
-        temp.nickName = item.user ? item.user.wechatName : '';
-        // recommendWorks.push(temp);
-        that.data.hotData.hotWorks.push(temp);
-      });
-      const hotStr = 'hotData.hotWorks'
-      const myCourseStr = 'hotData.myCourse'
-      const isMessageNormal = 'hotData.isMessageNormal'
-      const unReadMessageContent = 'hotData.unReadMessageContent'
-      that.setData({
-        [hotStr]: that.data.hotData.hotWorks,
-        [myCourseStr]: recommendRes.myCourse,
-        [isMessageNormal]: recommendRes.unread,
-        [unReadMessageContent]: recommendRes.unread ? recommendRes.unreadMsg.content : recommendRes.annunciateMsg.content,
-        unfinishedCount: recommendRes.unfinishedCount
-      })
-    })
-  }
-
-  that.getHotRecommendSecond = (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.avatar = item.user.avatar;
-        temp.nickName = item.user.wechatName;
-        // recommendWorks.push(temp);
-        that.data.hotData.hotWorks.push(temp);
-      });
-      const hotStr = 'hotData.hotWorks'
-      that.setData({
-        [hotStr]: that.data.hotData.hotWorks,
-        recommendTotalNo: res.data.data.totalNo
-      })
-    })
-  }
-  // 去全部课本
-  that.goToBooks = () => {
-    wx.navigateTo({
-      url: `../main/books/books`
-    })
-  }
-  that.bannerTap = (e) => {
-      const type = e.currentTarget.dataset.type;
-      const id = e.currentTarget.dataset.id;
-      switch (type) {
-        case 'LESSON':
-          that.openClass('tap', id);
-          break;
-      }
-    },
-    that.goToUsers = (e) => {
-      console.log(e)
-      let uid = e.currentTarget.dataset.uid;
-      wx.navigateTo({
-        url: `../../pages/user/myworks/myworks?uid=${uid}`
-      });
-    }
-  // 下拉加载
-  that.scrollUpdate = (e) => {
-    console.log(e)
-  }
-  console.log(that.data.hotData.recommend)
-
-  if (wx.getStorageSync('uid')) {
-    that.getIndex();
-    that.getHotRecommend(wx.getStorageSync('uid'));
-  }
-  // that.getIndex();
-
-  // 获取全部课本
-  // that.getBookList();
-  // that.swiperChange = (e) => {
-  //   const str = 'hotData.swiperCurrent'
-  //   that.setData({
-  //     [str]: e.detail.current
-  //   });
-  // }
-  //跳转到课程详情
-  that.goToBook = function (e) {
-    console.log(e.currentTarget.dataset)
-    let id = e.currentTarget.dataset.id;
-    let title = e.currentTarget.dataset.title;
-    console.log(id)
-    wx.navigateTo({
-      url: `/pages/groupPage/grade-details/grade-details?productId=${id}&title=${title}`
-    })
-  }
-  that.swiperChange = (e) => {
-    const str = 'hotData.swiperCurrent'
-    that.setData({
-      [str]: e.detail.current
-    });
-  }
-}

+ 0 - 118
.history/component/hot/hot_20190325152225.wxml

@@ -1,118 +0,0 @@
-<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.isMessageNormal}}"> -->
-    <view class="messageSection" bindtap="goToMessage">
-        <image class="messageIcon" src="../../static/image/message_icon.png" />
-        <text class="messageText">{{hotData.unReadMessageContent}}</text>
-    </view>
-    <view class="myCourseSection">
-        <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="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>
-        <view bindtap="inputFocus" class="searchBtn" wx:if="{{hotData.searchIcon}}">
-            <!-- <icon type="search" size="14" /> -->
-            <image src="../../static/image/search_new.png" alt="" />
-        </view>
-        <view class="allBooks" bindtap="goToBooks">全部课程</view>
-        <!-- <form bindsubmit="submitTest" report-submit="{{true}}" class="allBooks">
-            <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">
-            <view wx:for="{{hotData.hotWorks}}" wx:key="{{index}}" class="worksCard" bindtap="openWorks" data-readId="{{item.classId}}" data-title="{{item.title}}">
-                <view class="topData">
-                    <view class="worksLeft" catchtap="goToUsers" data-uid="{{item.uid}}">
-                        <image class="authorAvatar" lazy-load="true" src="{{item.avatar}}" />
-                        <view class="profession" wx:if="{{item.profession}}">
-                            {{item.profession}}
-                        </view>
-                        <view class="worksInfo">
-                            <view class="authorName">{{item.nickName}}</view>
-                            <view class="time">{{item.time}}</view>
-                        </view>
-                    </view>
-                    <view class="numberInfo">
-                        <view class="wareCardPlays">
-                            <image class="wareCardPlaysImg" lazy-load="true" src="../../static/image/hotPlays.png" />
-                            <text>{{item.plays}}</text>
-                        </view>
-                        <view class="wareCardLikes">
-                            <image class="wareCardLikesImg" lazy-load="true" src="../../static/image/flower_small_pink.png" />
-                            <text>{{item.likes}}</text>
-                        </view>
-                    </view>
-                </view>
-                <image class="wareCardImg" src="{{item.img}}" />
-                <view class="titleSummary">
-                    <text class="wareCardTitle">{{item.title}}</text>
-                    <text class="wareCardTip">{{item.summary}}</text>
-                </view>
-            </view>
-        </view>
-    </view>
-</template>

+ 0 - 270
.history/component/hot/hot_20190325152253.js

@@ -1,270 +0,0 @@
-import httpRequestApi from '../../utils/APIClient';
-import {
-  formatDate
-} from '../../utils/util';
-export const hotInit = (that) => {
-  if (!that.data.hotData) {
-    that.setData({
-      hotData: {
-        title: '热门',
-        autoplay: false,
-        swiperCurrent: 0,
-        interval: 5000,
-        duration: 700,
-        circular: true,
-        hotWareCardFirst: 'hotWareCardFirst',
-        hotWareCard: 'hotWareCard',
-        hotSearch: '',
-        banner: [],
-        recommend: [],
-        hotWorks: [],
-        winH: that.data.winH,
-        searchIcon: true,
-        unReadMessageNum: 0,
-        myCourse: [],
-        inputFocus: false,
-        inputValue: ''
-        // circular: true
-      }
-    })
-  }
-  // 搜索方法
-  that.searchHandler = () => {
-      if (that.data.hotInput.lenght !== 0) {
-        wx.navigateTo({
-          url: `../main/searchResult/searchResult?keyWords=${that.data.hotInput}`
-        })
-      }
-      const str = 'hotData.inputValue';
-      that.setData({
-        [str]: ''
-      })
-    },
-    // 输入框获取焦点 放大镜消失
-    that.searchIconDisappear = () => {
-      const str = 'hotData.searchIcon'
-      that.setData({
-        [str]: false
-      })
-    },
-    that.searchIconCome = () => {
-      const str = 'hotData.searchIcon'
-      that.setData({
-        [str]: true
-      })
-    }
-
-  // 输入框输入
-  that.inputHandler = (e) => {
-      that.setData({
-        hotInput: e.detail.value
-      });
-    },
-    // 输入框聚焦
-    that.inputFocus = () => {
-      const str = 'hotData.inputFocus'
-      that.setData({
-        [str]: true
-      });
-      console.log(that.data.hotData.inputFocus)
-    },
-    // 打开全部课本
-    that.openBooks = (e) => {
-      wx.navigateTo({
-        url: `../main/books/books`
-      })
-    }
-  // 打开更多页面
-  that.openMore = () => {
-    wx.navigateTo({
-      url: `../main/week/week`
-    })
-  }
-  // 打开课程页面
-  that.openClass = (e, lessonId) => {
-    if (lessonId) {
-      wx.navigateTo({
-        url: `../main/class/class?id=${lessonId}`
-      })
-    } else {
-      let id = e.currentTarget.dataset.classid;
-      let title = e.currentTarget.dataset.title;
-      wx.navigateTo({
-        url: `../main/class/class?id=${id}&title=${title}`
-      })
-    }
-  }
-  // 打开用户作品页面
-  that.openWorks = (e) => {
-    let readId = e.currentTarget.dataset.readid;
-    let title = e.currentTarget.dataset.title;
-    wx.navigateTo({
-      url: `../social/works/works?id=${readId}&title=${title}`
-    })
-  }
-  that.getIndex = () => {
-    const uid = wx.getStorageSync('uid');
-    httpRequestApi.getIndex(
-      uid
-    ).success((res) => {
-      const recommend = res.data.data.recommendLesson;
-      const recommendTemp = [];
-      recommend.forEach(item => {
-        const oTemp = {};
-        oTemp.img = item.boothContent;
-        oTemp.classId = item.operationContent;
-        oTemp.title = item.title;
-        oTemp.summary = item.summary;
-        recommendTemp.push(oTemp);
-      });
-      let recommendIndex = 'hotData.recommend';
-      that.setData({
-        [recommendIndex]: recommendTemp
-      });
-      httpRequestApi.userIntoPage('pages/index/index', '首页推荐').success((res) => {
-
-      })
-    })
-  }
-  that.getHotRecommend = (uid) => {
-    httpRequestApi.getHotRecommend(
-      uid
-    ).success((res) => {
-      // 点击切换按钮时 只刷新我的课程和未读消息 官方推荐和热门不加载
-      const recommendRes = res.data.data;
-      console.log(that.data.hotData.hotWorks.length)
-      if (that.data.hotData.hotWorks.length > 0) {
-        const myCourseStr = 'hotData.myCourse'
-        const isMessageNormal = 'hotData.isMessageNormal'
-        const unReadMessageContent = 'hotData.unReadMessageContent'
-        // unread为true时显示 未读消息,unread为false时显示通知消息,并且通知消息不可读
-        that.setData({
-          [myCourseStr]: recommendRes.myCourse,
-          [isMessageNormal]: recommendRes.unread,
-          // [unReadMessageContent]: recommendRes.unread ? recommendRes.unreadMsg.content : recommendRes.annunciateMsg.content,
-          [unReadMessageContent]: unreadMsg.title,
-        })
-
-        return;
-      }
-      recommendRes.hotReader.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 ? item.user.avatar : '';
-        temp.profession = item.user ? item.user.profession : '';
-        temp.uid = item.user ? item.user.uid : '';
-        // temp.avatar = item.user.avatar;
-        temp.nickName = item.user ? item.user.wechatName : '';
-        // recommendWorks.push(temp);
-        that.data.hotData.hotWorks.push(temp);
-      });
-      const hotStr = 'hotData.hotWorks'
-      const myCourseStr = 'hotData.myCourse'
-      const isMessageNormal = 'hotData.isMessageNormal'
-      const unReadMessageContent = 'hotData.unReadMessageContent'
-      that.setData({
-        [hotStr]: that.data.hotData.hotWorks,
-        [myCourseStr]: recommendRes.myCourse,
-        [isMessageNormal]: recommendRes.unread,
-        // [unReadMessageContent]: recommendRes.unread ? recommendRes.unreadMsg.content : recommendRes.annunciateMsg.content,
-        [unReadMessageContent]: unreadMsg.title,
-        unfinishedCount: recommendRes.unfinishedCount
-      })
-    })
-  }
-
-  that.getHotRecommendSecond = (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.avatar = item.user.avatar;
-        temp.nickName = item.user.wechatName;
-        // recommendWorks.push(temp);
-        that.data.hotData.hotWorks.push(temp);
-      });
-      const hotStr = 'hotData.hotWorks'
-      that.setData({
-        [hotStr]: that.data.hotData.hotWorks,
-        recommendTotalNo: res.data.data.totalNo
-      })
-    })
-  }
-  // 去全部课本
-  that.goToBooks = () => {
-    wx.navigateTo({
-      url: `../main/books/books`
-    })
-  }
-  that.bannerTap = (e) => {
-      const type = e.currentTarget.dataset.type;
-      const id = e.currentTarget.dataset.id;
-      switch (type) {
-        case 'LESSON':
-          that.openClass('tap', id);
-          break;
-      }
-    },
-    that.goToUsers = (e) => {
-      console.log(e)
-      let uid = e.currentTarget.dataset.uid;
-      wx.navigateTo({
-        url: `../../pages/user/myworks/myworks?uid=${uid}`
-      });
-    }
-  // 下拉加载
-  that.scrollUpdate = (e) => {
-    console.log(e)
-  }
-  console.log(that.data.hotData.recommend)
-
-  if (wx.getStorageSync('uid')) {
-    that.getIndex();
-    that.getHotRecommend(wx.getStorageSync('uid'));
-  }
-  // that.getIndex();
-
-  // 获取全部课本
-  // that.getBookList();
-  // that.swiperChange = (e) => {
-  //   const str = 'hotData.swiperCurrent'
-  //   that.setData({
-  //     [str]: e.detail.current
-  //   });
-  // }
-  //跳转到课程详情
-  that.goToBook = function (e) {
-    console.log(e.currentTarget.dataset)
-    let id = e.currentTarget.dataset.id;
-    let title = e.currentTarget.dataset.title;
-    console.log(id)
-    wx.navigateTo({
-      url: `/pages/groupPage/grade-details/grade-details?productId=${id}&title=${title}`
-    })
-  }
-  that.swiperChange = (e) => {
-    const str = 'hotData.swiperCurrent'
-    that.setData({
-      [str]: e.detail.current
-    });
-  }
-}

+ 0 - 270
.history/component/hot/hot_20190327111152.js

@@ -1,270 +0,0 @@
-import httpRequestApi from '../../utils/APIClient';
-import {
-  formatDate
-} from '../../utils/util';
-export const hotInit = (that) => {
-  if (!that.data.hotData) {
-    that.setData({
-      hotData: {
-        title: '热门',
-        autoplay: false,
-        swiperCurrent: 0,
-        interval: 5000,
-        duration: 700,
-        circular: true,
-        hotWareCardFirst: 'hotWareCardFirst',
-        hotWareCard: 'hotWareCard',
-        hotSearch: '',
-        banner: [],
-        recommend: [],
-        hotWorks: [],
-        winH: that.data.winH,
-        searchIcon: true,
-        unReadMessageNum: 0,
-        myCourse: [],
-        inputFocus: false,
-        inputValue: ''
-        // circular: true
-      }
-    })
-  }
-  // 搜索方法
-  that.searchHandler = () => {
-      if (that.data.hotInput.lenght !== 0) {
-        wx.navigateTo({
-          url: `../main/searchResult/searchResult?keyWords=${that.data.hotInput}`
-        })
-      }
-      const str = 'hotData.inputValue';
-      that.setData({
-        [str]: ''
-      })
-    },
-    // 输入框获取焦点 放大镜消失
-    that.searchIconDisappear = () => {
-      const str = 'hotData.searchIcon'
-      that.setData({
-        [str]: false
-      })
-    },
-    that.searchIconCome = () => {
-      const str = 'hotData.searchIcon'
-      that.setData({
-        [str]: true
-      })
-    }
-
-  // 输入框输入
-  that.inputHandler = (e) => {
-      that.setData({
-        hotInput: e.detail.value
-      });
-    },
-    // 输入框聚焦
-    that.inputFocus = () => {
-      const str = 'hotData.inputFocus'
-      that.setData({
-        [str]: true
-      });
-      console.log(that.data.hotData.inputFocus)
-    },
-    // 打开全部课本
-    that.openBooks = (e) => {
-      wx.navigateTo({
-        url: `../main/books/books`
-      })
-    }
-  // 打开更多页面
-  that.openMore = () => {
-    wx.navigateTo({
-      url: `../main/week/week`
-    })
-  }
-  // 打开课程页面
-  that.openClass = (e, lessonId) => {
-    if (lessonId) {
-      wx.navigateTo({
-        url: `../main/class/class?id=${lessonId}`
-      })
-    } else {
-      let id = e.currentTarget.dataset.classid;
-      let title = e.currentTarget.dataset.title;
-      wx.navigateTo({
-        url: `../main/class/class?id=${id}&title=${title}`
-      })
-    }
-  }
-  // 打开用户作品页面
-  that.openWorks = (e) => {
-    let readId = e.currentTarget.dataset.readid;
-    let title = e.currentTarget.dataset.title;
-    wx.navigateTo({
-      url: `../social/works/works?id=${readId}&title=${title}`
-    })
-  }
-  that.getIndex = () => {
-    const uid = wx.getStorageSync('uid');
-    httpRequestApi.getIndex(
-      uid
-    ).success((res) => {
-      const recommend = res.data.data.recommendLesson;
-      const recommendTemp = [];
-      recommend.forEach(item => {
-        const oTemp = {};
-        oTemp.img = item.boothContent;
-        oTemp.classId = item.operationContent;
-        oTemp.title = item.title;
-        oTemp.summary = item.summary;
-        recommendTemp.push(oTemp);
-      });
-      let recommendIndex = 'hotData.recommend';
-      that.setData({
-        [recommendIndex]: recommendTemp
-      });
-      httpRequestApi.userIntoPage('pages/index/index', '首页推荐').success((res) => {
-
-      })
-    })
-  }
-  that.getHotRecommend = (uid) => {
-    httpRequestApi.getHotRecommend(
-      uid
-    ).success((res) => {
-      // 点击切换按钮时 只刷新我的课程和未读消息 官方推荐和热门不加载
-      const recommendRes = res.data.data;
-      console.log(that.data.hotData.hotWorks.length)
-      if (that.data.hotData.hotWorks.length > 0) {
-        const myCourseStr = 'hotData.myCourse'
-        const isMessageNormal = 'hotData.isMessageNormal'
-        const unReadMessageContent = 'hotData.unReadMessageContent'
-        // unread为true时显示 未读消息,unread为false时显示通知消息,并且通知消息不可读
-        that.setData({
-          [myCourseStr]: recommendRes.myCourse,
-          [isMessageNormal]: recommendRes.unread,
-          // [unReadMessageContent]: recommendRes.unread ? recommendRes.unreadMsg.content : recommendRes.annunciateMsg.content,
-          [unReadMessageContent]: recommendRes.annunciateMsg.content,
-        })
-
-        return;
-      }
-      recommendRes.hotReader.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 ? item.user.avatar : '';
-        temp.profession = item.user ? item.user.profession : '';
-        temp.uid = item.user ? item.user.uid : '';
-        // temp.avatar = item.user.avatar;
-        temp.nickName = item.user ? item.user.wechatName : '';
-        // recommendWorks.push(temp);
-        that.data.hotData.hotWorks.push(temp);
-      });
-      const hotStr = 'hotData.hotWorks'
-      const myCourseStr = 'hotData.myCourse'
-      const isMessageNormal = 'hotData.isMessageNormal'
-      const unReadMessageContent = 'hotData.unReadMessageContent'
-      that.setData({
-        [hotStr]: that.data.hotData.hotWorks,
-        [myCourseStr]: recommendRes.myCourse,
-        [isMessageNormal]: recommendRes.unread,
-        // [unReadMessageContent]: recommendRes.unread ? recommendRes.unreadMsg.content : recommendRes.annunciateMsg.content,
-        [unReadMessageContent]: urecommendRes.annunciateMsg.content,
-        unfinishedCount: recommendRes.unfinishedCount
-      })
-    })
-  }
-
-  that.getHotRecommendSecond = (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.avatar = item.user.avatar;
-        temp.nickName = item.user.wechatName;
-        // recommendWorks.push(temp);
-        that.data.hotData.hotWorks.push(temp);
-      });
-      const hotStr = 'hotData.hotWorks'
-      that.setData({
-        [hotStr]: that.data.hotData.hotWorks,
-        recommendTotalNo: res.data.data.totalNo
-      })
-    })
-  }
-  // 去全部课本
-  that.goToBooks = () => {
-    wx.navigateTo({
-      url: `../main/books/books`
-    })
-  }
-  that.bannerTap = (e) => {
-      const type = e.currentTarget.dataset.type;
-      const id = e.currentTarget.dataset.id;
-      switch (type) {
-        case 'LESSON':
-          that.openClass('tap', id);
-          break;
-      }
-    },
-    that.goToUsers = (e) => {
-      console.log(e)
-      let uid = e.currentTarget.dataset.uid;
-      wx.navigateTo({
-        url: `../../pages/user/myworks/myworks?uid=${uid}`
-      });
-    }
-  // 下拉加载
-  that.scrollUpdate = (e) => {
-    console.log(e)
-  }
-  console.log(that.data.hotData.recommend)
-
-  if (wx.getStorageSync('uid')) {
-    that.getIndex();
-    that.getHotRecommend(wx.getStorageSync('uid'));
-  }
-  // that.getIndex();
-
-  // 获取全部课本
-  // that.getBookList();
-  // that.swiperChange = (e) => {
-  //   const str = 'hotData.swiperCurrent'
-  //   that.setData({
-  //     [str]: e.detail.current
-  //   });
-  // }
-  //跳转到课程详情
-  that.goToBook = function (e) {
-    console.log(e.currentTarget.dataset)
-    let id = e.currentTarget.dataset.id;
-    let title = e.currentTarget.dataset.title;
-    console.log(id)
-    wx.navigateTo({
-      url: `/pages/groupPage/grade-details/grade-details?productId=${id}&title=${title}`
-    })
-  }
-  that.swiperChange = (e) => {
-    const str = 'hotData.swiperCurrent'
-    that.setData({
-      [str]: e.detail.current
-    });
-  }
-}

+ 0 - 270
.history/component/hot/hot_20190327111215.js

@@ -1,270 +0,0 @@
-import httpRequestApi from '../../utils/APIClient';
-import {
-  formatDate
-} from '../../utils/util';
-export const hotInit = (that) => {
-  if (!that.data.hotData) {
-    that.setData({
-      hotData: {
-        title: '热门',
-        autoplay: false,
-        swiperCurrent: 0,
-        interval: 5000,
-        duration: 700,
-        circular: true,
-        hotWareCardFirst: 'hotWareCardFirst',
-        hotWareCard: 'hotWareCard',
-        hotSearch: '',
-        banner: [],
-        recommend: [],
-        hotWorks: [],
-        winH: that.data.winH,
-        searchIcon: true,
-        unReadMessageNum: 0,
-        myCourse: [],
-        inputFocus: false,
-        inputValue: ''
-        // circular: true
-      }
-    })
-  }
-  // 搜索方法
-  that.searchHandler = () => {
-      if (that.data.hotInput.lenght !== 0) {
-        wx.navigateTo({
-          url: `../main/searchResult/searchResult?keyWords=${that.data.hotInput}`
-        })
-      }
-      const str = 'hotData.inputValue';
-      that.setData({
-        [str]: ''
-      })
-    },
-    // 输入框获取焦点 放大镜消失
-    that.searchIconDisappear = () => {
-      const str = 'hotData.searchIcon'
-      that.setData({
-        [str]: false
-      })
-    },
-    that.searchIconCome = () => {
-      const str = 'hotData.searchIcon'
-      that.setData({
-        [str]: true
-      })
-    }
-
-  // 输入框输入
-  that.inputHandler = (e) => {
-      that.setData({
-        hotInput: e.detail.value
-      });
-    },
-    // 输入框聚焦
-    that.inputFocus = () => {
-      const str = 'hotData.inputFocus'
-      that.setData({
-        [str]: true
-      });
-      console.log(that.data.hotData.inputFocus)
-    },
-    // 打开全部课本
-    that.openBooks = (e) => {
-      wx.navigateTo({
-        url: `../main/books/books`
-      })
-    }
-  // 打开更多页面
-  that.openMore = () => {
-    wx.navigateTo({
-      url: `../main/week/week`
-    })
-  }
-  // 打开课程页面
-  that.openClass = (e, lessonId) => {
-    if (lessonId) {
-      wx.navigateTo({
-        url: `../main/class/class?id=${lessonId}`
-      })
-    } else {
-      let id = e.currentTarget.dataset.classid;
-      let title = e.currentTarget.dataset.title;
-      wx.navigateTo({
-        url: `../main/class/class?id=${id}&title=${title}`
-      })
-    }
-  }
-  // 打开用户作品页面
-  that.openWorks = (e) => {
-    let readId = e.currentTarget.dataset.readid;
-    let title = e.currentTarget.dataset.title;
-    wx.navigateTo({
-      url: `../social/works/works?id=${readId}&title=${title}`
-    })
-  }
-  that.getIndex = () => {
-    const uid = wx.getStorageSync('uid');
-    httpRequestApi.getIndex(
-      uid
-    ).success((res) => {
-      const recommend = res.data.data.recommendLesson;
-      const recommendTemp = [];
-      recommend.forEach(item => {
-        const oTemp = {};
-        oTemp.img = item.boothContent;
-        oTemp.classId = item.operationContent;
-        oTemp.title = item.title;
-        oTemp.summary = item.summary;
-        recommendTemp.push(oTemp);
-      });
-      let recommendIndex = 'hotData.recommend';
-      that.setData({
-        [recommendIndex]: recommendTemp
-      });
-      httpRequestApi.userIntoPage('pages/index/index', '首页推荐').success((res) => {
-
-      })
-    })
-  }
-  that.getHotRecommend = (uid) => {
-    httpRequestApi.getHotRecommend(
-      uid
-    ).success((res) => {
-      // 点击切换按钮时 只刷新我的课程和未读消息 官方推荐和热门不加载
-      const recommendRes = res.data.data;
-      console.log(that.data.hotData.hotWorks.length)
-      if (that.data.hotData.hotWorks.length > 0) {
-        const myCourseStr = 'hotData.myCourse'
-        const isMessageNormal = 'hotData.isMessageNormal'
-        const unReadMessageContent = 'hotData.unReadMessageContent'
-        // unread为true时显示 未读消息,unread为false时显示通知消息,并且通知消息不可读
-        that.setData({
-          [myCourseStr]: recommendRes.myCourse,
-          [isMessageNormal]: recommendRes.unread,
-          // [unReadMessageContent]: recommendRes.unread ? recommendRes.unreadMsg.content : recommendRes.annunciateMsg.content,
-          [unReadMessageContent]: recommendRes.annunciateMsg.content,
-        })
-
-        return;
-      }
-      recommendRes.hotReader.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 ? item.user.avatar : '';
-        temp.profession = item.user ? item.user.profession : '';
-        temp.uid = item.user ? item.user.uid : '';
-        // temp.avatar = item.user.avatar;
-        temp.nickName = item.user ? item.user.wechatName : '';
-        // recommendWorks.push(temp);
-        that.data.hotData.hotWorks.push(temp);
-      });
-      const hotStr = 'hotData.hotWorks'
-      const myCourseStr = 'hotData.myCourse'
-      const isMessageNormal = 'hotData.isMessageNormal'
-      const unReadMessageContent = 'hotData.unReadMessageContent'
-      that.setData({
-        [hotStr]: that.data.hotData.hotWorks,
-        [myCourseStr]: recommendRes.myCourse,
-        [isMessageNormal]: recommendRes.unread,
-        // [unReadMessageContent]: recommendRes.unread ? recommendRes.unreadMsg.content : recommendRes.annunciateMsg.content,
-        [unReadMessageContent]: recommendRes.annunciateMsg.content,
-        unfinishedCount: recommendRes.unfinishedCount
-      })
-    })
-  }
-
-  that.getHotRecommendSecond = (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.avatar = item.user.avatar;
-        temp.nickName = item.user.wechatName;
-        // recommendWorks.push(temp);
-        that.data.hotData.hotWorks.push(temp);
-      });
-      const hotStr = 'hotData.hotWorks'
-      that.setData({
-        [hotStr]: that.data.hotData.hotWorks,
-        recommendTotalNo: res.data.data.totalNo
-      })
-    })
-  }
-  // 去全部课本
-  that.goToBooks = () => {
-    wx.navigateTo({
-      url: `../main/books/books`
-    })
-  }
-  that.bannerTap = (e) => {
-      const type = e.currentTarget.dataset.type;
-      const id = e.currentTarget.dataset.id;
-      switch (type) {
-        case 'LESSON':
-          that.openClass('tap', id);
-          break;
-      }
-    },
-    that.goToUsers = (e) => {
-      console.log(e)
-      let uid = e.currentTarget.dataset.uid;
-      wx.navigateTo({
-        url: `../../pages/user/myworks/myworks?uid=${uid}`
-      });
-    }
-  // 下拉加载
-  that.scrollUpdate = (e) => {
-    console.log(e)
-  }
-  console.log(that.data.hotData.recommend)
-
-  if (wx.getStorageSync('uid')) {
-    that.getIndex();
-    that.getHotRecommend(wx.getStorageSync('uid'));
-  }
-  // that.getIndex();
-
-  // 获取全部课本
-  // that.getBookList();
-  // that.swiperChange = (e) => {
-  //   const str = 'hotData.swiperCurrent'
-  //   that.setData({
-  //     [str]: e.detail.current
-  //   });
-  // }
-  //跳转到课程详情
-  that.goToBook = function (e) {
-    console.log(e.currentTarget.dataset)
-    let id = e.currentTarget.dataset.id;
-    let title = e.currentTarget.dataset.title;
-    console.log(id)
-    wx.navigateTo({
-      url: `/pages/groupPage/grade-details/grade-details?productId=${id}&title=${title}`
-    })
-  }
-  that.swiperChange = (e) => {
-    const str = 'hotData.swiperCurrent'
-    that.setData({
-      [str]: e.detail.current
-    });
-  }
-}

+ 0 - 268
.history/component/hot/hot_20190327135616.js

@@ -1,268 +0,0 @@
-import httpRequestApi from '../../utils/APIClient';
-import {
-  formatDate
-} from '../../utils/util';
-export const hotInit = (that) => {
-  if (!that.data.hotData) {
-    that.setData({
-      hotData: {
-        title: '热门',
-        autoplay: false,
-        swiperCurrent: 0,
-        interval: 5000,
-        duration: 700,
-        circular: true,
-        hotWareCardFirst: 'hotWareCardFirst',
-        hotWareCard: 'hotWareCard',
-        hotSearch: '',
-        banner: [],
-        recommend: [],
-        hotWorks: [],
-        winH: that.data.winH,
-        searchIcon: true,
-        unReadMessageNum: 0,
-        myCourse: [],
-        inputFocus: false,
-        inputValue: ''
-        // circular: true
-      }
-    })
-  }
-  // 搜索方法
-  that.searchHandler = () => {
-      if (that.data.hotInput.lenght !== 0) {
-        wx.navigateTo({
-          url: `../main/searchResult/searchResult?keyWords=${that.data.hotInput}`
-        })
-      }
-      const str = 'hotData.inputValue';
-      that.setData({
-        [str]: ''
-      })
-    },
-    // 输入框获取焦点 放大镜消失
-    that.searchIconDisappear = () => {
-      const str = 'hotData.searchIcon'
-      that.setData({
-        [str]: false
-      })
-    },
-    that.searchIconCome = () => {
-      const str = 'hotData.searchIcon'
-      that.setData({
-        [str]: true
-      })
-    }
-
-  // 输入框输入
-  that.inputHandler = (e) => {
-      that.setData({
-        hotInput: e.detail.value
-      });
-    },
-    // 输入框聚焦
-    that.inputFocus = () => {
-      const str = 'hotData.inputFocus'
-      that.setData({
-        [str]: true
-      });
-      console.log(that.data.hotData.inputFocus)
-    },
-    // 打开全部课本
-    that.openBooks = (e) => {
-      wx.navigateTo({
-        url: `../main/books/books`
-      })
-    }
-  // 打开更多页面
-  that.openMore = () => {
-    wx.navigateTo({
-      url: `../main/week/week`
-    })
-  }
-  // 打开课程页面
-  that.openClass = (e, lessonId) => {
-    if (lessonId) {
-      wx.navigateTo({
-        url: `../main/class/class?id=${lessonId}`
-      })
-    } else {
-      let id = e.currentTarget.dataset.classid;
-      let title = e.currentTarget.dataset.title;
-      wx.navigateTo({
-        url: `../main/class/class?id=${id}&title=${title}`
-      })
-    }
-  }
-  // 打开用户作品页面
-  that.openWorks = (e) => {
-    let readId = e.currentTarget.dataset.readid;
-    let title = e.currentTarget.dataset.title;
-    wx.navigateTo({
-      url: `../social/works/works?id=${readId}&title=${title}`
-    })
-  }
-  that.getIndex = () => {
-    const uid = wx.getStorageSync('uid');
-    httpRequestApi.getIndex(
-      uid
-    ).success((res) => {
-      const recommend = res.data.data.recommendLesson;
-      const recommendTemp = [];
-      recommend.forEach(item => {
-        const oTemp = {};
-        oTemp.img = item.boothContent;
-        oTemp.classId = item.operationContent;
-        oTemp.title = item.title;
-        oTemp.summary = item.summary;
-        recommendTemp.push(oTemp);
-      });
-      let recommendIndex = 'hotData.recommend';
-      that.setData({
-        [recommendIndex]: recommendTemp
-      });
-      httpRequestApi.userIntoPage('pages/index/index', '首页推荐').success((res) => {
-
-      })
-    })
-  }
-  that.getHotRecommend = (uid) => {
-    httpRequestApi.getHotRecommend(
-      uid
-    ).success((res) => {
-      // 点击切换按钮时 只刷新我的课程和未读消息 官方推荐和热门不加载
-      const recommendRes = res.data.data;
-      console.log(that.data.hotData.hotWorks.length)
-      if (that.data.hotData.hotWorks.length > 0) {
-        const myCourseStr = 'hotData.myCourse'
-        const isMessageNormal = 'hotData.isMessageNormal'
-        const unReadMessageContent = 'hotData.unReadMessageContent'
-        // unread为true时显示 未读消息,unread为false时显示通知消息,并且通知消息不可读
-        that.setData({
-          [myCourseStr]: recommendRes.myCourse,
-          [isMessageNormal]: recommendRes.unread,
-          [unReadMessageContent]: recommendRes.unread ? recommendRes.unreadMsg.title : '',
-        })
-
-        return;
-      }
-      recommendRes.hotReader.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 ? item.user.avatar : '';
-        temp.profession = item.user ? item.user.profession : '';
-        temp.uid = item.user ? item.user.uid : '';
-        // temp.avatar = item.user.avatar;
-        temp.nickName = item.user ? item.user.wechatName : '';
-        // recommendWorks.push(temp);
-        that.data.hotData.hotWorks.push(temp);
-      });
-      const hotStr = 'hotData.hotWorks'
-      const myCourseStr = 'hotData.myCourse'
-      const isMessageNormal = 'hotData.isMessageNormal'
-      const unReadMessageContent = 'hotData.unReadMessageContent'
-      that.setData({
-        [hotStr]: that.data.hotData.hotWorks,
-        [myCourseStr]: recommendRes.myCourse,
-        [isMessageNormal]: recommendRes.unread,
-        [unReadMessageContent]: recommendRes.unread ? recommendRes.unreadMsg.title : '',
-        unfinishedCount: recommendRes.unfinishedCount
-      })
-    })
-  }
-
-  that.getHotRecommendSecond = (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.avatar = item.user.avatar;
-        temp.nickName = item.user.wechatName;
-        // recommendWorks.push(temp);
-        that.data.hotData.hotWorks.push(temp);
-      });
-      const hotStr = 'hotData.hotWorks'
-      that.setData({
-        [hotStr]: that.data.hotData.hotWorks,
-        recommendTotalNo: res.data.data.totalNo
-      })
-    })
-  }
-  // 去全部课本
-  that.goToBooks = () => {
-    wx.navigateTo({
-      url: `../main/books/books`
-    })
-  }
-  that.bannerTap = (e) => {
-      const type = e.currentTarget.dataset.type;
-      const id = e.currentTarget.dataset.id;
-      switch (type) {
-        case 'LESSON':
-          that.openClass('tap', id);
-          break;
-      }
-    },
-    that.goToUsers = (e) => {
-      console.log(e)
-      let uid = e.currentTarget.dataset.uid;
-      wx.navigateTo({
-        url: `../../pages/user/myworks/myworks?uid=${uid}`
-      });
-    }
-  // 下拉加载
-  that.scrollUpdate = (e) => {
-    console.log(e)
-  }
-  console.log(that.data.hotData.recommend)
-
-  if (wx.getStorageSync('uid')) {
-    that.getIndex();
-    that.getHotRecommend(wx.getStorageSync('uid'));
-  }
-  // that.getIndex();
-
-  // 获取全部课本
-  // that.getBookList();
-  // that.swiperChange = (e) => {
-  //   const str = 'hotData.swiperCurrent'
-  //   that.setData({
-  //     [str]: e.detail.current
-  //   });
-  // }
-  //跳转到课程详情
-  that.goToBook = function (e) {
-    console.log(e.currentTarget.dataset)
-    let id = e.currentTarget.dataset.id;
-    let title = e.currentTarget.dataset.title;
-    console.log(id)
-    wx.navigateTo({
-      url: `/pages/groupPage/grade-details/grade-details?productId=${id}&title=${title}`
-    })
-  }
-  that.swiperChange = (e) => {
-    const str = 'hotData.swiperCurrent'
-    that.setData({
-      [str]: e.detail.current
-    });
-  }
-}

+ 0 - 117
.history/component/hot/hot_20190327135616.wxml

@@ -1,117 +0,0 @@
-<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.isMessageNormal}}">
-        <image class="messageIcon" src="../../static/image/message_icon.png" />
-        <text class="messageText">{{hotData.unReadMessageContent}}</text>
-    </view>
-    <view class="myCourseSection">
-        <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="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>
-        <view bindtap="inputFocus" class="searchBtn" wx:if="{{hotData.searchIcon}}">
-            <!-- <icon type="search" size="14" /> -->
-            <image src="../../static/image/search_new.png" alt="" />
-        </view>
-        <view class="allBooks" bindtap="goToBooks">全部课程</view>
-        <!-- <form bindsubmit="submitTest" report-submit="{{true}}" class="allBooks">
-            <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">
-            <view wx:for="{{hotData.hotWorks}}" wx:key="{{index}}" class="worksCard" bindtap="openWorks" data-readId="{{item.classId}}" data-title="{{item.title}}">
-                <view class="topData">
-                    <view class="worksLeft" catchtap="goToUsers" data-uid="{{item.uid}}">
-                        <image class="authorAvatar" lazy-load="true" src="{{item.avatar}}" />
-                        <view class="profession" wx:if="{{item.profession}}">
-                            {{item.profession}}
-                        </view>
-                        <view class="worksInfo">
-                            <view class="authorName">{{item.nickName}}</view>
-                            <view class="time">{{item.time}}</view>
-                        </view>
-                    </view>
-                    <view class="numberInfo">
-                        <view class="wareCardPlays">
-                            <image class="wareCardPlaysImg" lazy-load="true" src="../../static/image/hotPlays.png" />
-                            <text>{{item.plays}}</text>
-                        </view>
-                        <view class="wareCardLikes">
-                            <image class="wareCardLikesImg" lazy-load="true" src="../../static/image/flower_small_pink.png" />
-                            <text>{{item.likes}}</text>
-                        </view>
-                    </view>
-                </view>
-                <image class="wareCardImg" src="{{item.img}}" />
-                <view class="titleSummary">
-                    <text class="wareCardTitle">{{item.title}}</text>
-                    <text class="wareCardTip">{{item.summary}}</text>
-                </view>
-            </view>
-        </view>
-    </view>
-</template>

+ 0 - 269
.history/component/hot/hot_20190327143311.js

@@ -1,269 +0,0 @@
-import httpRequestApi from '../../utils/APIClient';
-import {
-  formatDate
-} from '../../utils/util';
-export const hotInit = (that) => {
-  if (!that.data.hotData) {
-    that.setData({
-      hotData: {
-        title: '热门',
-        autoplay: false,
-        swiperCurrent: 0,
-        interval: 5000,
-        duration: 700,
-        circular: true,
-        hotWareCardFirst: 'hotWareCardFirst',
-        hotWareCard: 'hotWareCard',
-        hotSearch: '',
-        banner: [],
-        recommend: [],
-        hotWorks: [],
-        winH: that.data.winH,
-        searchIcon: true,
-        unReadMessageNum: 0,
-        myCourse: [],
-        inputFocus: false,
-        inputValue: ''
-        // circular: true
-      }
-    })
-  }
-  // 搜索方法
-  that.searchHandler = () => {
-      if (that.data.hotInput.lenght !== 0) {
-        wx.navigateTo({
-          url: `../main/searchResult/searchResult?keyWords=${that.data.hotInput}`
-        })
-      }
-      const str = 'hotData.inputValue';
-      that.setData({
-        [str]: ''
-      })
-    },
-    // 输入框获取焦点 放大镜消失
-    that.searchIconDisappear = () => {
-      const str = 'hotData.searchIcon'
-      that.setData({
-        [str]: false
-      })
-    },
-    that.searchIconCome = () => {
-      const str = 'hotData.searchIcon'
-      that.setData({
-        [str]: true
-      })
-    }
-
-  // 输入框输入
-  that.inputHandler = (e) => {
-      that.setData({
-        hotInput: e.detail.value
-      });
-    },
-    // 输入框聚焦
-    that.inputFocus = () => {
-      const str = 'hotData.inputFocus'
-      that.setData({
-        [str]: true
-      });
-      console.log(that.data.hotData.inputFocus)
-    },
-    // 打开全部课本
-    that.openBooks = (e) => {
-      wx.navigateTo({
-        url: `../main/books/books`
-      })
-    }
-  // 打开更多页面
-  that.openMore = () => {
-    wx.navigateTo({
-      url: `../main/week/week`
-    })
-  }
-  // 打开课程页面
-  that.openClass = (e, lessonId) => {
-    if (lessonId) {
-      wx.navigateTo({
-        url: `../main/class/class?id=${lessonId}`
-      })
-    } else {
-      let id = e.currentTarget.dataset.classid;
-      let title = e.currentTarget.dataset.title;
-      wx.navigateTo({
-        url: `../main/class/class?id=${id}&title=${title}`
-      })
-    }
-  }
-  // 打开用户作品页面
-  that.openWorks = (e) => {
-    let readId = e.currentTarget.dataset.readid;
-    let title = e.currentTarget.dataset.title;
-    wx.navigateTo({
-      url: `../social/works/works?id=${readId}&title=${title}`
-    })
-  }
-  that.getIndex = () => {
-    const uid = wx.getStorageSync('uid');
-    httpRequestApi.getIndex(
-      uid
-    ).success((res) => {
-      const recommend = res.data.data.recommendLesson;
-      const recommendTemp = [];
-      recommend.forEach(item => {
-        const oTemp = {};
-        oTemp.img = item.boothContent;
-        oTemp.classId = item.operationContent;
-        oTemp.title = item.title;
-        oTemp.summary = item.summary;
-        recommendTemp.push(oTemp);
-      });
-      let recommendIndex = 'hotData.recommend';
-      that.setData({
-        [recommendIndex]: recommendTemp
-      });
-      httpRequestApi.userIntoPage('pages/index/index', '首页推荐').success((res) => {
-
-      })
-    })
-  }
-  that.getHotRecommend = (uid) => {
-    httpRequestApi.getHotRecommend(
-      uid
-    ).success((res) => {
-      // 点击切换按钮时 只刷新我的课程和未读消息 官方推荐和热门不加载
-      const recommendRes = res.data.data;
-      console.log(that.data.hotData.hotWorks.length)
-      if (that.data.hotData.hotWorks.length > 0) {
-        const myCourseStr = 'hotData.myCourse'
-        const isMessageNormal = 'hotData.isMessageNormal'
-        const unReadMessageContent = 'hotData.unReadMessageContent'
-        // unread为true时显示 未读消息,unread为false时显示通知消息,并且通知消息不可读
-        that.setData({
-          [myCourseStr]: recommendRes.myCourse,
-          [isMessageNormal]: recommendRes.unread,
-          // [unReadMessageContent]: recommendRes.unread ? recommendRes.unreadMsg.title : '',
-          [unReadMessageContent]: recommendRes.unread ? recommendRes.unreadMsg.content : recommendRes.annunciateMsg.content
-        })
-
-        return;
-      }
-      recommendRes.hotReader.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 ? item.user.avatar : '';
-        temp.profession = item.user ? item.user.profession : '';
-        temp.uid = item.user ? item.user.uid : '';
-        // temp.avatar = item.user.avatar;
-        temp.nickName = item.user ? item.user.wechatName : '';
-        // recommendWorks.push(temp);
-        that.data.hotData.hotWorks.push(temp);
-      });
-      const hotStr = 'hotData.hotWorks'
-      const myCourseStr = 'hotData.myCourse'
-      const isMessageNormal = 'hotData.isMessageNormal'
-      const unReadMessageContent = 'hotData.unReadMessageContent'
-      that.setData({
-        [hotStr]: that.data.hotData.hotWorks,
-        [myCourseStr]: recommendRes.myCourse,
-        [isMessageNormal]: recommendRes.unread,
-        [unReadMessageContent]: recommendRes.unread ? recommendRes.unreadMsg.content : recommendRes.annunciateMsg.content,
-        unfinishedCount: recommendRes.unfinishedCount
-      })
-    })
-  }
-
-  that.getHotRecommendSecond = (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.avatar = item.user.avatar;
-        temp.nickName = item.user.wechatName;
-        // recommendWorks.push(temp);
-        that.data.hotData.hotWorks.push(temp);
-      });
-      const hotStr = 'hotData.hotWorks'
-      that.setData({
-        [hotStr]: that.data.hotData.hotWorks,
-        recommendTotalNo: res.data.data.totalNo
-      })
-    })
-  }
-  // 去全部课本
-  that.goToBooks = () => {
-    wx.navigateTo({
-      url: `../main/books/books`
-    })
-  }
-  that.bannerTap = (e) => {
-      const type = e.currentTarget.dataset.type;
-      const id = e.currentTarget.dataset.id;
-      switch (type) {
-        case 'LESSON':
-          that.openClass('tap', id);
-          break;
-      }
-    },
-    that.goToUsers = (e) => {
-      console.log(e)
-      let uid = e.currentTarget.dataset.uid;
-      wx.navigateTo({
-        url: `../../pages/user/myworks/myworks?uid=${uid}`
-      });
-    }
-  // 下拉加载
-  that.scrollUpdate = (e) => {
-    console.log(e)
-  }
-  console.log(that.data.hotData.recommend)
-
-  if (wx.getStorageSync('uid')) {
-    that.getIndex();
-    that.getHotRecommend(wx.getStorageSync('uid'));
-  }
-  // that.getIndex();
-
-  // 获取全部课本
-  // that.getBookList();
-  // that.swiperChange = (e) => {
-  //   const str = 'hotData.swiperCurrent'
-  //   that.setData({
-  //     [str]: e.detail.current
-  //   });
-  // }
-  //跳转到课程详情
-  that.goToBook = function (e) {
-    console.log(e.currentTarget.dataset)
-    let id = e.currentTarget.dataset.id;
-    let title = e.currentTarget.dataset.title;
-    console.log(id)
-    wx.navigateTo({
-      url: `/pages/groupPage/grade-details/grade-details?productId=${id}&title=${title}`
-    })
-  }
-  that.swiperChange = (e) => {
-    const str = 'hotData.swiperCurrent'
-    that.setData({
-      [str]: e.detail.current
-    });
-  }
-}

+ 0 - 343
.history/component/share/share_20190128152337.js

@@ -1,343 +0,0 @@
-// component/shar-dialog/shar-dialog.js
-import httpRequestApi from '../../utils/APIClient';
-Component({
-  /**
-   * 组件的属性列表
-   */
-  properties: {
-    shareType: {
-      type: 'String',
-      value: ''
-    },
-    shareId: {
-      type: 'String',
-      value: ''
-    }
-  },
-
-  /**
-   * 组件的初始数据
-   */
-  data: {
-    shareFlag: false,
-    imgUrls: '',
-    avatar: '',
-    author: '',
-    iconImg: '',
-    title: '',
-    path: '',
-    QRCodeImagePath: '',
-    QRCodeImageLocalPath: '',
-    groupPurchaseInfo: {},
-    groupType: '',
-    animationData: {},
-    touchMove: true,
-    randomSologan: [
-      '开发右脑最简单的方式就是大声朗读',
-      '大声朗读  有利于建立自信心',
-      '大声朗读  能帮助孩子提高写作能力',
-      '朗读是感知世界的一种重要方式',
-      '增强记忆力的方法之一大声朗读',
-      '大声朗读是语感形成的最佳途径',
-      '大声朗读  还原课文的诗性美',
-      '在朗读中  提升孩子的思辨能力',
-      '重温经典课文  享受亲子美好时光',
-      '大声朗读  能帮助孩子提高写作能力'
-    ]
-  },
-
-  /**
-   * 组件的方法列表
-   */
-  methods: {
-    touchMove: function () {
-      return false
-    },
-    poster: function () {
-      const that = this;
-      wx.showLoading({
-        title: '专属海报生成中',
-        // mask: true
-      })
-      httpRequestApi.createQRCode(this.data.QRData).success(res => {
-        // 下载二维码
-        wx.downloadFile({
-          url: res.data.data,
-          success: res => {
-            this.setData({
-              QRCodeImagePath: res.tempFilePath
-            },()=>{
-              this.saveAvatar();
-            })
-          }
-        });
-      })
-    },
-    makeImage: function () {
-      const ctx = wx.createCanvasContext('myCanvas');
-      // 画出背景和相同内容
-      if (this.data.shareType === 'works') {
-        ctx.drawImage('../../../static/image/works_poster.jpg', 0, 0, 1200, 2100, 0, 0, 600, 1050); //插入图片  
-      } else {
-        ctx.drawImage('../../../static/image/group_poster.jpg', 0, 0, 1200, 2100, 0, 0, 600, 1050); //插入图片  
-      }
-      ctx.save()
-      ctx.beginPath()
-      ctx.fill()
-      ctx.setFontSize(25)
-      ctx.setFillStyle('#fff')
-      ctx.fillText('课文朗读 每天5分钟', (300 - ctx.measureText('课文朗读 每天5分钟').width) / 2, 54.5)
-      ctx.setFontSize(16)
-      let randomSologan =this.data.randomSologan[Math.floor(Math.random()*10)];
-      ctx.fillText(randomSologan, (300 - ctx.measureText(randomSologan).width) / 2, 75.5)
-      ctx.setFontSize(15)
-      ctx.setFillStyle('#838383')
-      ctx.fillText('长按识别二维码', 130.5, 391)
-      ctx.setFontSize(12)
-      ctx.setFillStyle('#838383')
-      ctx.fillText('接收邀请,获得你的课程吧', 130.5, 409.5) /*  */
-      // 头像
-      console.log('画头像')
-      if (this.data.shareType === 'works') {
-        ctx.arc(150, 160, 36, 0, 2 * Math.PI, true)
-        ctx.clip(); //剪切头像区域
-        ctx.drawImage(this.data.avatar, 116, 126, 68, 68);
-        ctx.arc(150, 160, 34, 0, 2 * Math.PI, false)
-        ctx.setFillStyle('#ff6f42')
-        ctx.fill();
-        ctx.clip(); //剪切头像区域
-        ctx.restore(); //恢复之前保存的绘图上下文 恢复之前保存的绘图上下午即状态 可以继续绘制
-        ctx.setFontSize(15)
-        ctx.setFillStyle('#ff6f42')
-        ctx.fillText(this.data.author, (300 - ctx.measureText(this.data.author).width) / 2, 220)
-        ctx.setFillStyle('#434343')
-        ctx.fillText('播音主持特长生', (300 - ctx.measureText('播音主持特长生').width) / 2, 243)
-        ctx.setFontSize(15)
-        ctx.setFillStyle('#434343')
-        ctx.fillText('使出洪荒之力,声情并茂地朗诵了', (300 - ctx.measureText('使出洪荒之力,声情并茂地朗诵了').width) / 2, 262)
-        ctx.fillText(`《${this.data.title}》`, (300 - ctx.measureText(`《${this.data.title}》`).width) / 2, 284)
-      } else {
-        ctx.arc(64, 146, 29, 0, 2 * Math.PI, true)
-        ctx.clip(); //剪切头像区域
-        ctx.drawImage(this.data.avatar, 37, 119, 54, 54);
-        ctx.arc(64, 146, 27, 0, 2 * Math.PI, false)
-        ctx.setFillStyle('#ff6f42')
-        ctx.fill();
-        ctx.clip(); //剪切头像区域
-        //插入图片  
-        ctx.restore(); //恢复之前保存的绘图上下文 恢复之前保存的绘图上下午即状态 可以继续绘制
-        ctx.setFontSize(18)
-        ctx.setFillStyle('#ff6f42')
-        ctx.fillText(this.data.author, 100, 143.5)
-        ctx.setFontSize(16)
-        ctx.setFillStyle('#434343')
-        ctx.fillText('邀您和我一起大声朗读', 100, 167.5)
-        ctx.drawImage(this.data.iconImg, 27, 194, 247, 103.5);
-        ctx.setFontSize(15)
-        ctx.setFillStyle('#434343')
-        ctx.fillText('朗朗读书声,是世界上最美妙的声音', (300 - ctx.measureText('朗朗读书声,是世界上最美妙的声音').width) / 2, 327.5)
-      }
-      console.log('花二维码')
-      console.log(this.data)
-      console.log(this.data.avatar)
-      ctx.drawImage(this.data.QRCodeImagePath, 35, 351, 90, 90);
-      ctx.draw();
-      setTimeout(() => {
-        wx.canvasToTempFilePath({
-          x: 0,
-          y: 0,
-          width: 300,
-          height: 525,
-          destWidth: 1200,
-          destHeight: 2100,
-          canvasId: 'myCanvas',
-          success: (res) => {
-            this.setData({
-              imgUrls: res.tempFilePath
-            })
-            wx.hideLoading()
-          },
-          fail: (res) => {
-            console.log(res)
-            wx.hideLoading();
-          }
-        })
-      }, 400)
-
-    },
-    saveIcon: function(){
-      wx.downloadFile({
-        url: this.data.iconImg,
-        success: res => {
-          this.setData({
-            iconImg: res.tempFilePath
-          },()=>{
-            console.log(this.data.iconImg)
-            this.makeImage();
-          })
-        }
-      });
-    },
-    saveAvatar: function(){
-      wx.downloadFile({
-        url: this.data.avatar,
-        success: res => {
-          this.setData({
-            avatar: res.tempFilePath
-          },()=>{
-            if (this.data.shareType === 'group'){
-              this.saveIcon();
-            } else {
-              this.makeImage();
-            }
-          })
-        }
-      });
-    },
-    share: function (data) {
-      console.log(data)
-      if (this.data.shareType === 'works') {
-
-        this.setData({
-          shareFlag: !this.data.shareFlag,
-          avatar: data.avatar,
-          author: data.author,
-          iconImg: data.iconImg,
-          title: data.title,
-          productId: data.productId,
-          // path: data.path,
-          QRData: {
-            page: data.path,
-            scene: data.scene,
-            qrCodeId: this.data.shareId
-          }
-        })
-      }
-      if (this.data.shareType === 'group') {
-        console.log(data)
-        console.log('团购分享')
-        this.setData({
-          shareFlag: !this.data.shareFlag,
-          avatar: data.avatar,
-          author: data.author,
-          iconImg: data.iconImg,
-          title: data.title,
-          // path: data.path,
-          QRData: {
-            page: data.path,
-            scene: data.scene,
-            qrCodeId: this.data.shareId
-          },
-          groupPurchaseInfo: data.groupPurchaseInfo,
-          groupType: data.groupType
-        })
-      }
-      this.poster();
-
-      if (this.data.shareType === 'class') {
-        console.log('课程分享')
-        this.setData({
-          shareFlag: !this.data.shareFlag
-        })
-      }
-      // 动画测试
-      this.animation = wx.createAnimation({
-        duration: 700,
-        timingFunction: 'ease',
-      })
-      this.animation.bottom(0).step();
-      this.setData({
-        animationData: this.animation.export()
-      })
-      // 动画测试
-    },
-    //关闭弹框
-    close: function (e) {
-      this.animation = wx.createAnimation({
-        duration: 400,
-        timingFunction: 'ease',
-      })
-      this.animation.bottom(-300).step();
-      this.setData({
-        animationData: this.animation.export()
-      }, () => {
-        setTimeout(() => {
-          this.setData({
-            shareFlag: !this.data.shareFlag,
-            imgUrls: ''
-          })
-          this.triggerEvent('ShareDialogClose', {})
-        }, 200)
-      })
-      wx.hideLoading()
-    },
-    nothing: function (e) {
-      return
-    },
-    // 保存最终图片
-    PreservationImg: function () {
-      // this.getImgAuthorize()
-      wx.saveImageToPhotosAlbum({
-        filePath: this.data.imgUrls,
-        success: (res) => {
-          console.log(res)
-          const data = {};
-          console.log('productId', this.data.productId)
-          // 团购分享记录
-          if (this.data.shareType === 'group') {
-            data.shareTypeEnum = 'POSTER';
-            data.shareContentEnum = 'GROUP';
-            data.productId = this.data.groupPurchaseInfo.productId;
-          }
-          // 朗读分享记录
-          if (this.data.shareType === 'works') {
-            data.shareTypeEnum = 'POSTER';
-            data.shareContentEnum = 'READ';
-            data.productId = this.data.productId;
-          }
-          httpRequestApi.shareRecord(data).success((res) => {
-            console.log(res)
-          })
-          this.setData({
-            imgUrls: false
-          })
-        },
-        fail: res => {
-          wx.getSetting({
-            success(res) {
-              if (!res.authSetting['scope.writePhotosAlbum']) {
-                // wx.showToast({
-                //   title: '无权限操作',
-                //   icon: 'fail',
-                //   duration: 800
-                // })
-                wx.showModal({
-                  title: '无法保存分享图片到相册',
-                  content: '点击右上角浮点按钮->进入关于->点击右上角按钮->设置,进行授权',
-                  confirmText: '我知道了',
-                  showCancel: false,
-                  success(res) {
-                    console.log('用户点击确定')
-                  }
-                })
-              }
-            }
-          })
-        }
-      })
-    },
-    shareFriend: function () {
-      this.triggerEvent('customevent', {})
-    }
-  },
-  onShareAppMessage: (res) => {
-    if (res.from === 'button') {
-      // 来自页面内转发按钮
-      console.log(res.target)
-    }
-    return {
-      title: this.data.title,
-      path: this.data.path
-    }
-  },
-})

+ 0 - 347
.history/component/share/share_20190322145541.js

@@ -1,347 +0,0 @@
-// component/shar-dialog/shar-dialog.js
-import httpRequestApi from '../../utils/APIClient';
-Component({
-  /**
-   * 组件的属性列表
-   */
-  properties: {
-    shareType: {
-      type: 'String',
-      value: ''
-    },
-    shareId: {
-      type: 'String',
-      value: ''
-    }
-  },
-
-  /**
-   * 组件的初始数据
-   */
-  data: {
-    shareFlag: false,
-    imgUrls: '',
-    avatar: '',
-    author: '',
-    iconImg: '',
-    title: '',
-    path: '',
-    QRCodeImagePath: '',
-    QRCodeImageLocalPath: '',
-    groupPurchaseInfo: {},
-    groupType: '',
-    animationData: {},
-    touchMove: true,
-    randomSologan: [
-      '开发右脑最简单的方式就是大声朗读',
-      '大声朗读  有利于建立自信心',
-      '大声朗读  能帮助孩子提高写作能力',
-      '朗读是感知世界的一种重要方式',
-      '增强记忆力的方法之一大声朗读',
-      '大声朗读是语感形成的最佳途径',
-      '大声朗读  还原课文的诗性美',
-      '在朗读中  提升孩子的思辨能力',
-      '重温经典课文  享受亲子美好时光',
-      '大声朗读  能帮助孩子提高写作能力'
-    ]
-  },
-
-  /**
-   * 组件的方法列表
-   */
-  methods: {
-    touchMove: function () {
-      return false
-    },
-    poster: function () {
-      const that = this;
-      wx.showLoading({
-        title: '专属海报生成中',
-        // mask: true
-      })
-      httpRequestApi.createQRCode(this.data.QRData).success(res => {
-        // 下载二维码
-        wx.downloadFile({
-          url: res.data.data,
-          success: res => {
-            this.setData({
-              QRCodeImagePath: res.tempFilePath
-            }, () => {
-              this.saveAvatar();
-            })
-          }
-        });
-      })
-    },
-    makeImage: function () {
-      const ctx = wx.createCanvasContext('myCanvas');
-      // 画出背景和相同内容
-      if (this.data.shareType === 'works') {
-        ctx.drawImage('../../../static/image/works_poster.jpg', 0, 0, 1200, 2100, 0, 0, 600, 1050); //插入图片  
-      } else {
-        ctx.drawImage('../../../static/image/group_poster.jpg', 0, 0, 1200, 2100, 0, 0, 600, 1050); //插入图片  
-      }
-      ctx.save()
-      ctx.beginPath()
-      ctx.fill()
-      ctx.setFontSize(25)
-      ctx.setFillStyle('#fff')
-      ctx.fillText('课文朗读 每天5分钟', (300 - ctx.measureText('课文朗读 每天5分钟').width) / 2, 54.5)
-      ctx.setFontSize(16)
-      let randomSologan = this.data.randomSologan[Math.floor(Math.random() * 10)];
-      ctx.fillText(randomSologan, (300 - ctx.measureText(randomSologan).width) / 2, 75.5)
-      ctx.setFontSize(15)
-      ctx.setFillStyle('#838383')
-      ctx.fillText('长按识别二维码', 130.5, 391)
-      ctx.setFontSize(12)
-      ctx.setFillStyle('#838383')
-      ctx.fillText('接收邀请,获得你的课程吧', 130.5, 409.5) /*  */
-      // 头像
-      console.log('画头像')
-      if (this.data.shareType === 'works') {
-        ctx.arc(150, 160, 36, 0, 2 * Math.PI, true)
-        ctx.clip(); //剪切头像区域
-        ctx.drawImage(this.data.avatar, 116, 126, 68, 68);
-        ctx.arc(150, 160, 34, 0, 2 * Math.PI, false)
-        ctx.setFillStyle('#ff6f42')
-        ctx.fill();
-        ctx.clip(); //剪切头像区域
-        ctx.restore(); //恢复之前保存的绘图上下文 恢复之前保存的绘图上下午即状态 可以继续绘制
-        ctx.setFontSize(15)
-        ctx.setFillStyle('#ff6f42')
-        ctx.fillText(this.data.author, (300 - ctx.measureText(this.data.author).width) / 2, 220)
-        ctx.setFillStyle('#434343')
-        ctx.fillText('播音主持特长生', (300 - ctx.measureText('播音主持特长生').width) / 2, 243)
-        ctx.setFontSize(15)
-        ctx.setFillStyle('#434343')
-        ctx.fillText('使出洪荒之力,声情并茂地朗诵了', (300 - ctx.measureText('使出洪荒之力,声情并茂地朗诵了').width) / 2, 262)
-        ctx.fillText(`《${this.data.title}》`, (300 - ctx.measureText(`《${this.data.title}》`).width) / 2, 284)
-      } else {
-        ctx.arc(64, 146, 29, 0, 2 * Math.PI, true)
-        ctx.clip(); //剪切头像区域
-        ctx.drawImage(this.data.avatar, 37, 119, 54, 54);
-        ctx.arc(64, 146, 27, 0, 2 * Math.PI, false)
-        ctx.setFillStyle('#ff6f42')
-        ctx.fill();
-        ctx.clip(); //剪切头像区域
-        //插入图片  
-        ctx.restore(); //恢复之前保存的绘图上下文 恢复之前保存的绘图上下午即状态 可以继续绘制
-        ctx.setFontSize(18)
-        ctx.setFillStyle('#ff6f42')
-        ctx.fillText(this.data.author, 100, 143.5)
-        ctx.setFontSize(16)
-        ctx.setFillStyle('#434343')
-        ctx.fillText('邀您和我一起大声朗读', 100, 167.5)
-        ctx.drawImage(this.data.iconImg, 27, 194, 247, 103.5);
-        ctx.setFontSize(15)
-        ctx.setFillStyle('#434343')
-        ctx.fillText('朗朗读书声,是世界上最美妙的声音', (300 - ctx.measureText('朗朗读书声,是世界上最美妙的声音').width) / 2, 327.5)
-      }
-      console.log('花二维码')
-      console.log(this.data)
-      console.log(this.data.avatar)
-      ctx.drawImage(this.data.QRCodeImagePath, 35, 351, 90, 90);
-      ctx.draw();
-      setTimeout(() => {
-        wx.canvasToTempFilePath({
-          x: 0,
-          y: 0,
-          width: 300,
-          height: 525,
-          destWidth: 1200,
-          destHeight: 2100,
-          canvasId: 'myCanvas',
-          success: (res) => {
-            this.setData({
-              imgUrls: res.tempFilePath
-            })
-            wx.hideLoading()
-          },
-          fail: (res) => {
-            console.log(res)
-            wx.hideLoading();
-          }
-        })
-      }, 400)
-
-    },
-    saveIcon: function () {
-      wx.downloadFile({
-        url: this.data.iconImg,
-        success: res => {
-          this.setData({
-            iconImg: res.tempFilePath
-          }, () => {
-            console.log(this.data.iconImg)
-            this.makeImage();
-          })
-        }
-      });
-    },
-    saveAvatar: function () {
-      wx.downloadFile({
-        url: this.data.avatar,
-        success: res => {
-          this.setData({
-            avatar: res.tempFilePath
-          }, () => {
-            if (this.data.shareType === 'group') {
-              this.saveIcon();
-            } else {
-              this.makeImage();
-            }
-          })
-        }
-      });
-    },
-    share: function (data) {
-      console.log(data)
-      if (this.data.shareType === 'works') {
-
-        this.setData({
-          shareFlag: !this.data.shareFlag,
-          avatar: data.avatar,
-          author: data.author,
-          iconImg: data.iconImg,
-          title: data.title,
-          productId: data.productId,
-          // path: data.path,
-          QRData: {
-            page: data.path,
-            scene: data.scene,
-            qrCodeId: this.data.shareId
-          }
-        })
-      }
-      if (this.data.shareType === 'group') {
-        console.log(data)
-        console.log('团购分享')
-        this.setData({
-          shareFlag: !this.data.shareFlag,
-          avatar: data.avatar,
-          author: data.author,
-          iconImg: data.iconImg,
-          title: data.title,
-          // path: data.path,
-          QRData: {
-            page: data.path,
-            scene: data.scene,
-            qrCodeId: this.data.shareId
-          },
-          groupPurchaseInfo: data.groupPurchaseInfo,
-          groupType: data.groupType
-        })
-      }
-      this.poster();
-
-      if (this.data.shareType === 'class') {
-        console.log('课程分享')
-        this.setData({
-          shareFlag: !this.data.shareFlag
-        })
-      }
-      // 动画测试
-      this.animation = wx.createAnimation({
-        duration: 700,
-        timingFunction: 'ease',
-      })
-      this.animation.bottom(0).step();
-      this.setData({
-        animationData: this.animation.export()
-      })
-      // 动画测试
-    },
-    //关闭弹框
-    close: function (e) {
-      this.animation = wx.createAnimation({
-        duration: 400,
-        timingFunction: 'ease',
-      })
-      this.animation.bottom(-300).step();
-      this.setData({
-        animationData: this.animation.export()
-      }, () => {
-        setTimeout(() => {
-          this.setData({
-            shareFlag: !this.data.shareFlag,
-            imgUrls: ''
-          })
-          this.triggerEvent('ShareDialogClose', {})
-        }, 200)
-      })
-      wx.hideLoading()
-    },
-    nothing: function (e) {
-      return
-    },
-    // 保存最终图片
-    PreservationImg: function () {
-      // this.getImgAuthorize()
-      wx.saveImageToPhotosAlbum({
-        filePath: this.data.imgUrls,
-        success: (res) => {
-          wx.showToast({
-            title: '海报已保存,快去分享吧',
-            icon: 'success',
-            duration: 800
-          })
-          const data = {};
-          // 团购分享记录
-          if (this.data.shareType === 'group') {
-            data.shareTypeEnum = 'POSTER';
-            data.shareContentEnum = 'GROUP';
-            data.productId = this.data.groupPurchaseInfo.productId;
-          }
-          // 朗读分享记录
-          if (this.data.shareType === 'works') {
-            data.shareTypeEnum = 'POSTER';
-            data.shareContentEnum = 'READ';
-            data.productId = this.data.productId;
-          }
-          httpRequestApi.shareRecord(data).success((res) => {
-            console.log(res)
-          })
-
-          this.setData({
-            imgUrls: false
-          })
-        },
-        fail: res => {
-          wx.getSetting({
-            success(res) {
-              if (!res.authSetting['scope.writePhotosAlbum']) {
-                // wx.showToast({
-                //   title: '无权限操作',
-                //   icon: 'fail',
-                //   duration: 800
-                // })
-                wx.showModal({
-                  title: '无法保存分享图片到相册',
-                  content: '点击右上角浮点按钮->进入关于->点击右上角按钮->设置,进行授权',
-                  confirmText: '我知道了',
-                  showCancel: false,
-                  success(res) {
-                    console.log('用户点击确定')
-                  }
-                })
-              }
-            }
-          })
-        }
-      })
-    },
-    shareFriend: function () {
-      this.triggerEvent('customevent', {})
-    }
-  },
-  onShareAppMessage: (res) => {
-    if (res.from === 'button') {
-      // 来自页面内转发按钮
-      console.log(res.target)
-    }
-    return {
-      title: this.data.title,
-      path: this.data.path
-    }
-  },
-})

+ 0 - 340
.history/pages/index/index_20190315155712.js

@@ -1,340 +0,0 @@
-//index.js
-//获取应用实例
-import {
-  getOpenidSessionKey
-} from '../../utils/httpUtil';
-import {
-  formatDate
-} from '../../utils/util';
-
-const app = getApp()
-
-import {
-  hotInit
-} from '../../component/hot/hot';
-import {
-  groupInit
-} from '../../component/group/group';
-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 {
-  GetQueryString
-} from '../../utils/util';
-
-Page({
-  data: {
-    tab: [{
-        name: '我的',
-        templates: 'my',
-      },
-      {
-        name: '发现',
-        templates: 'hot',
-      },
-      {
-        name: '热团',
-        templates: 'group',
-      },
-      // {
-      //   name: '动态',
-      //   templates: 'follow',
-      // },
-
-    ],
-    winH: 568,
-    myIndex: 1,
-    followData: [],
-    recommendPageNo: 0,
-    recommendTotalNo: 1,
-    followPageNo: 1,
-    followPageTotalNo: 1,
-    myData: {},
-    templates: 'hot',
-    title: 'index中的title',
-    jurisdictionFlag: true,
-    hotInput: '12345',
-    mineSettingInfo: '528',
-    hide: true,
-    isIOS: app.globalData.isIOS,
-    ifHaveMore: true,
-    indexSignDialog: false,
-    indexMissionDialog: false,
-    unfinishedCount: 0
-  },
-  jurisdiction: function() {
-    //隐藏弹框
-    this.setData({
-      hide: !this.data.hide
-    })
-    //登录页信息
-    this.onShow();
-  },
-  //tab点击
-  switcher: function({
-    currentTarget
-  }) {
-    if (currentTarget.dataset.index === this.data.myIndex) return;
-    this.updateData(currentTarget.dataset.index);
-  },
-  // 根据index 更新template
-  updateData: function(index) {
-    let myIndex = index;
-    let templates = this.data.tab[myIndex].templates;
-    this.setData({
-      myIndex,
-      templates
-    });
-    if (myIndex == 0) {
-      // groupInit(this);
-      this.setData({
-        followPageNo: 1,
-      })
-      myInit(this);
-    }
-    if (myIndex == 1) {
-      // this.setData({
-      //   recommendPageNo: 0
-      // })
-      hotInit(this);
-    }
-    if (myIndex == 2) {
-      groupInit(this);
-    }
-  },
-  onLoad: function(options) {
-    this.uid = wx.getStorageSync('uid');
-    wx.getSystemInfo({
-      success: (res) => {
-        this.setData({
-          winH: res.windowHeight
-        });
-      }
-    });
-    if (options.index) {
-      this.updateData(options.index)
-    }
-    setTimeout(() => {
-      if (wx.getStorageSync('uid')) {
-        httpRequestApi.userLoginRecord().success(res => {
-          if (res.data.data && res.data.data.length !== 0) {
-            // 有数据弹签到
-            if (this.data.unfinishedCount > 0) {
-              this.setData({
-                indexSignDialog: true
-              })
-            }
-
-          } else {
-            // 没数据弹任务
-            let oldDay = wx.getStorageSync('oldDay');
-            let newDate = new Date();
-            let day = newDate.getDate() < 10 ? '0' + newDate.getDate() : newDate.getDate()
-            let timeStep = (newDate.getMonth() + 1).toString() + day
-            if (oldDay) {
-              let temp = parseInt(timeStep) - parseInt(oldDay)
-              if (temp > 0) {
-                wx.setStorageSync('oldDay', timeStep);
-                this.setData({
-                  indexMissionDialog: true
-                })
-              }
-            } else {
-              wx.setStorageSync('oldDay', timeStep);
-              this.setData({
-                indexMissionDialog: true
-              })
-            }
-          }
-        })
-      }
-    }, 2800)
-    // hotInit(this)
-    // this.init();
-
-  },
-  onShow: function() {
-    wx.setNavigationBarTitle({
-      title: '小学课文朗读配音'
-    })
-    // this.init();
-    getOpenidSessionKey((res) => {
-      hotInit(this)
-    }, (error) => {
-      // console.log(error)
-
-      wx.setStorageSync('userSourseType', 'normal')
-      this.setData({
-        hide: !this.data.hide
-      })
-      return;
-    });
-    if (this.data.myIndex === 0) {
-      // 从修改信息页面退回
-      this.getUserWorksInfo(true);
-    }
-  },
-  onHide: function() {
-    const str = 'hotData.inputFocus'
-    this.setData({
-      [str]: false
-    });
-  },
-  //初始化数据
-  // init: function () {
-  //   httputil.getOpenidSessionKey((res) => {
-  //     console.log('微信的用户信息', res)
-
-  //   }, (error) => {
-  //     console.log(1111111111111111)
-  //     // this.jurisdiction()
-  //     wx.navigateTo({
-  //       url: '../../loginPage/loginPage'
-  //     })
-  //   });
-  // },
-  // 获取用户信息
-  getUserWorksInfo: function(flag) {
-    console.log(flag)
-    if (flag) {
-      httpRequestApi.getUserWorksInfo().success(res => {
-        const str = 'myData.user.user.nickName';
-        this.setData({
-          [str]: res.data.data.user.nickName
-        })
-      })
-      return;
-    }
-    const userLocal = wx.getStorageSync('user')
-    console.log(userLocal)
-    const str = 'myData.user';
-    this.setData({
-      [str]: userLocal
-    })
-    httpRequestApi.getUserWorksInfo().success(res => {
-      this.data.myData.user = res.data.data;
-      httpRequestApi.userIntoPage('pages/index/index', '首页我的').success((res) => {})
-      if (this.data.myData.user.myRead) {
-        this.data.myData.user.myRead.gmtCreated = formatDate(this.data.myData.user.myRead.gmtCreated, 4)
-      }
-      this.setData({
-        myData: this.data.myData,
-      });
-    }).fail(error => {
-      console.log(error)
-    })
-  },
-  // 触底加载
-  onReachBottom: function() {
-    console.log(this.data.myIndex)
-    if (this.data.myIndex === 0) {
-      this.setData({
-        followPageNo: this.data.followPageNo + 1
-      })
-      if (this.data.followPageNo <= this.data.followPageTotalNo) {
-        this.getFollowWorks(this.data.followPageNo, 3);
-
-      } else {
-        console.log('没有更多')
-        this.setData({
-          ifHaveMore: false
-        })
-      }
-    }
-    // 当前在推荐页面 加载推荐
-    if (this.data.myIndex === 1) {
-      console.log(this.data.recommendPageNo)
-      console.log(this.data.recommendTotalNo)
-      this.setData({
-        recommendPageNo: this.data.recommendPageNo + 1
-      })
-      if (this.data.recommendPageNo <= this.data.recommendTotalNo) {
-        this.getHotRecommendSecond(this.uid, this.data.recommendPageNo, 3);
-
-      } else {
-        console.log('没有更多')
-      }
-    }
-
-  },
-  onPullDownRefresh: function() {
-    //当前在团购页下拉加载
-    if (this.data.myIndex === 0) {
-      // groupInit(this);
-    }
-
-    wx.showNavigationBarLoading() //在标题栏中显示加载
-    //模拟加载
-    setTimeout(function() {
-      wx.hideNavigationBarLoading() //完成停止加载
-      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`
-    });
-    const str = 'hotData.unReadMessageNum';
-    this.setData({
-      [str]: 0
-    })
-  },
-  toMyCollage: function(e) {
-    if (app.globalData.isIOS) {
-      wx.navigateTo({
-        url: `../../pages/groupPage/my-group/my-group?title=我的助力`
-      });
-    } else {
-      wx.navigateTo({
-        url: `../../pages/groupPage/my-group/my-group?title=我的拼团`
-      });
-    }
-
-  },
-  toMyCourse: function() {
-    wx.navigateTo({
-      url: `../../pages/user/mycourse/mycourse?title=我的课程`
-    });
-  },
-  goToFlower: function() {
-    wx.navigateTo({
-      url: `../../pages/social/littleFlower/littleFlower`
-    });
-  },
-  signInBtn: function(e) {
-    this.setData({
-      indexSignDialog: false
-    })
-    console.log(e.detail.formId)
-    httpRequestApi.postFormId(e.detail.formId).success(res => {
-      console.log(res)
-    })
-    this.goToFlower();
-  },
-  missionBtn: function() {
-    this.setData({
-      indexMissionDialog: false
-    })
-    this.goToFlower();
-  }
-})

+ 0 - 342
.history/pages/index/index_20190327153623.js

@@ -1,342 +0,0 @@
-//index.js
-//获取应用实例
-import {
-  getOpenidSessionKey
-} from '../../utils/httpUtil';
-import {
-  formatDate
-} from '../../utils/util';
-
-const app = getApp()
-
-import {
-  hotInit
-} from '../../component/hot/hot';
-import {
-  groupInit
-} from '../../component/group/group';
-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 {
-  GetQueryString
-} from '../../utils/util';
-
-Page({
-  data: {
-    tab: [{
-        name: '我的',
-        templates: 'my',
-      },
-      {
-        name: '发现',
-        templates: 'hot',
-      },
-      {
-        name: '热团',
-        templates: 'group',
-      },
-      // {
-      //   name: '动态',
-      //   templates: 'follow',
-      // },
-
-    ],
-    winH: 568,
-    myIndex: 1,
-    followData: [],
-    recommendPageNo: 0,
-    recommendTotalNo: 1,
-    followPageNo: 1,
-    followPageTotalNo: 1,
-    myData: {},
-    templates: 'hot',
-    title: 'index中的title',
-    jurisdictionFlag: true,
-    hotInput: '12345',
-    mineSettingInfo: '528',
-    hide: true,
-    isIOS: app.globalData.isIOS,
-    ifHaveMore: true,
-    indexSignDialog: false,
-    indexMissionDialog: false,
-    unfinishedCount: 0
-  },
-  jurisdiction: function() {
-    //隐藏弹框
-    this.setData({
-      hide: !this.data.hide
-    })
-    //登录页信息
-    this.onShow();
-  },
-  //tab点击
-  switcher: function({
-    currentTarget
-  }) {
-    if (currentTarget.dataset.index === this.data.myIndex) return;
-    this.updateData(currentTarget.dataset.index);
-  },
-  // 根据index 更新template
-  updateData: function(index) {
-    let myIndex = index;
-    let templates = this.data.tab[myIndex].templates;
-    this.setData({
-      myIndex,
-      templates
-    });
-    if (myIndex == 0) {
-      // groupInit(this);
-      this.setData({
-        followPageNo: 1,
-      })
-      myInit(this);
-    }
-    if (myIndex == 1) {
-      // this.setData({
-      //   recommendPageNo: 0
-      // })
-      hotInit(this);
-    }
-    if (myIndex == 2) {
-      groupInit(this);
-    }
-  },
-  onLoad: function(options) {
-    this.uid = wx.getStorageSync('uid');
-    wx.getSystemInfo({
-      success: (res) => {
-        this.setData({
-          winH: res.windowHeight
-        });
-      }
-    });
-    if (options.index) {
-      this.updateData(options.index)
-    }
-    setTimeout(() => {
-      if (wx.getStorageSync('uid')) {
-        httpRequestApi.userLoginRecord().success(res => {
-          if (res.data.data && res.data.data.length !== 0) {
-            // 有数据弹签到
-            if (this.data.unfinishedCount > 0) {
-              this.setData({
-                indexSignDialog: true
-              })
-            }
-
-          } else {
-            // 没数据弹任务
-            let oldDay = wx.getStorageSync('oldDay');
-            let newDate = new Date();
-            let day = newDate.getDate() < 10 ? '0' + newDate.getDate() : newDate.getDate()
-            let timeStep = (newDate.getMonth() + 1).toString() + day
-            if (oldDay) {
-              let temp = parseInt(timeStep) - parseInt(oldDay)
-              if (temp > 0) {
-                wx.setStorageSync('oldDay', timeStep);
-                this.setData({
-                  indexMissionDialog: true
-                })
-              }
-            } else {
-              wx.setStorageSync('oldDay', timeStep);
-              this.setData({
-                indexMissionDialog: true
-              })
-            }
-          }
-        })
-      }
-    }, 2800)
-    // hotInit(this)
-    // this.init();
-
-  },
-  onShow: function() {
-    wx.setNavigationBarTitle({
-      title: '小学课文朗读配音'
-    })
-    // this.init();
-    getOpenidSessionKey((res) => {
-      hotInit(this)
-    }, (error) => {
-      // console.log(error)
-
-      wx.setStorageSync('userSourseType', 'normal')
-      this.setData({
-        hide: !this.data.hide
-      })
-      return;
-    });
-    if (this.data.myIndex === 0) {
-      // 从修改信息页面退回
-      this.getUserWorksInfo(true);
-    }
-  },
-  onHide: function() {
-    const str = 'hotData.inputFocus'
-    this.setData({
-      [str]: false
-    });
-  },
-  //初始化数据
-  // init: function () {
-  //   httputil.getOpenidSessionKey((res) => {
-  //     console.log('微信的用户信息', res)
-
-  //   }, (error) => {
-  //     console.log(1111111111111111)
-  //     // this.jurisdiction()
-  //     wx.navigateTo({
-  //       url: '../../loginPage/loginPage'
-  //     })
-  //   });
-  // },
-  // 获取用户信息
-  getUserWorksInfo: function(flag) {
-    console.log(flag)
-    if (flag) {
-      httpRequestApi.getUserWorksInfo().success(res => {
-        const str = 'myData.user.user.nickName';
-        const avatarStr = 'myData.user.user.avatar';
-        this.setData({
-          [str]: res.data.data.user.nickName,
-          [avatarStr]: res.data.data.user.avatar
-        })
-      })
-      return;
-    }
-    const userLocal = wx.getStorageSync('user')
-    console.log(userLocal)
-    const str = 'myData.user';
-    this.setData({
-      [str]: userLocal
-    })
-    httpRequestApi.getUserWorksInfo().success(res => {
-      this.data.myData.user = res.data.data;
-      httpRequestApi.userIntoPage('pages/index/index', '首页我的').success((res) => {})
-      if (this.data.myData.user.myRead) {
-        this.data.myData.user.myRead.gmtCreated = formatDate(this.data.myData.user.myRead.gmtCreated, 4)
-      }
-      this.setData({
-        myData: this.data.myData,
-      });
-    }).fail(error => {
-      console.log(error)
-    })
-  },
-  // 触底加载
-  onReachBottom: function() {
-    console.log(this.data.myIndex)
-    if (this.data.myIndex === 0) {
-      this.setData({
-        followPageNo: this.data.followPageNo + 1
-      })
-      if (this.data.followPageNo <= this.data.followPageTotalNo) {
-        this.getFollowWorks(this.data.followPageNo, 3);
-
-      } else {
-        console.log('没有更多')
-        this.setData({
-          ifHaveMore: false
-        })
-      }
-    }
-    // 当前在推荐页面 加载推荐
-    if (this.data.myIndex === 1) {
-      console.log(this.data.recommendPageNo)
-      console.log(this.data.recommendTotalNo)
-      this.setData({
-        recommendPageNo: this.data.recommendPageNo + 1
-      })
-      if (this.data.recommendPageNo <= this.data.recommendTotalNo) {
-        this.getHotRecommendSecond(this.uid, this.data.recommendPageNo, 3);
-
-      } else {
-        console.log('没有更多')
-      }
-    }
-
-  },
-  onPullDownRefresh: function() {
-    //当前在团购页下拉加载
-    if (this.data.myIndex === 0) {
-      // groupInit(this);
-    }
-
-    wx.showNavigationBarLoading() //在标题栏中显示加载
-    //模拟加载
-    setTimeout(function() {
-      wx.hideNavigationBarLoading() //完成停止加载
-      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`
-    });
-    const str = 'hotData.unReadMessageNum';
-    this.setData({
-      [str]: 0
-    })
-  },
-  toMyCollage: function(e) {
-    if (app.globalData.isIOS) {
-      wx.navigateTo({
-        url: `../../pages/groupPage/my-group/my-group?title=我的助力`
-      });
-    } else {
-      wx.navigateTo({
-        url: `../../pages/groupPage/my-group/my-group?title=我的拼团`
-      });
-    }
-
-  },
-  toMyCourse: function() {
-    wx.navigateTo({
-      url: `../../pages/user/mycourse/mycourse?title=我的课程`
-    });
-  },
-  goToFlower: function() {
-    wx.navigateTo({
-      url: `../../pages/social/littleFlower/littleFlower`
-    });
-  },
-  signInBtn: function(e) {
-    this.setData({
-      indexSignDialog: false
-    })
-    console.log(e.detail.formId)
-    httpRequestApi.postFormId(e.detail.formId).success(res => {
-      console.log(res)
-    })
-    this.goToFlower();
-  },
-  missionBtn: function() {
-    this.setData({
-      indexMissionDialog: false
-    })
-    this.goToFlower();
-  }
-})

+ 0 - 727
.history/pages/social/works/works_20190218174331.js

@@ -1,727 +0,0 @@
-import httpRequestApi from '../../../utils/APIClient';
-import {
-    formatDate
-} from '../../../utils/util';
-import {
-    getOpenidSessionKey
-} from '../../../utils/httpUtil';
-const app = getApp()
-Page({
-    data: {
-        fullScreenBtn: false,
-        playBtn: true,
-        gesture: false,
-        author: '',
-        videoSrc: '',
-        total: '',
-        authorAvatar: '',
-        user: [],
-        inputValue: '',
-        inputSBValue: '',
-        replyList: [],
-        howMuch: '200',
-        moneySelect: 'moneySelect',
-        moneyNormal: 'moneyNormal',
-        ifReward: false,
-        id: '',
-        path: '',
-        replyModal: false,
-        totalRead: 0,
-        pageNo: 1,
-        pageSize: 3,
-        goBackHome: false,
-        isIOS: app.globalData.isIOS,
-        alertFlag: false,
-        modalType: "text",
-        noScroll: '',
-        modalText: [{
-                text: '您还不是本课程的会员',
-                type: 'bigOrange'
-            },
-            {
-                text: '您可以开团,拼团成功获得使用权',
-                type: 'normal'
-            }
-        ],
-        modalBtnText: '去开团',
-        isModalShow: false,
-        modalCloseShow: true,
-        hide: true,
-        addComeOut: '',
-        flowerNum: '6'
-        // shareFlag: false
-    },
-    showAlert: function () {
-        this.setData({
-            alertFlag: !this.data.alertFlag
-        })
-    },
-    onLoad: function (option) {
-        console.log(option)
-        console.log(option.flowerCount)
-        console.log(option.flowerCount === 0)
-        if (option.flowerCount) {
-            this.setData({
-                fromReading: true
-            })
-            this.flowerAnimationHandler();
-            // setTimeout(() => {
-            //     this.openShare();
-            // }, 300)
-            if (option.flowerCount > 0) {
-                this.setData({
-                    flowerNum: option.flowerCount
-                })
-            }
-        }
-        getOpenidSessionKey((res) => {
-            let id = option.id ? option.id : option.scene.replace('QR', '')
-            if (option.scene || option.shareCard) {
-                this.setData({
-                    goBackHome: true
-                })
-            }
-            // wx.setNavigationBarTitle({
-            //     title: option.title //页面标题为路由参数
-            // })
-            this.uid = wx.getStorageSync('uid');
-            let stackSize = 1;
-            if (option.stackSize) {
-                stackSize = option.stackSize;
-            }
-            this.setData({
-                // title: option.title,
-                id,
-                myUid: this.uid,
-                stackSize
-            },()=>{
-                this.getWorks(this.uid, id);
-            })
-            
-        }, (error) => {
-            wx.setStorageSync('userSourseType','reading')
-            this.setData({
-                hide: !this.data.hide,
-                onLoadOption: option
-            })
-            return;
-        });
-    },
-    onHide: function () {
-        // this.data.stackSize >= 2
-        console.log('hide')
-        if (this.innerAudioContext) {
-            console.log('音频应该被暂停')
-            this.innerAudioContext.pause();
-        }
-        // this.videoCtx = null
-    },
-    onUnload: function () {
-        console.log(this.videoPlayTime)
-        if (this.videoPlayTime) {
-            const data = {
-                "title": this.data.title,
-                "lessonId": this.data.classId,
-                "productId": this.data.productId,
-                "playStopTime": Math.ceil(this.videoPlayTime),
-                "userReadId": this.data.userReadId,
-                "type": 'READ',
-            }
-            httpRequestApi.playLogReport(data).success(res => {
-                console.log(res)
-            })
-        }
-
-        if (this.innerAudioContext) {
-            this.innerAudioContext.destroy();
-        }
-        this.videoCtx = null
-        // let videoCtx = wx.createVideoContext('worksVideo', this);
-        // videoCtx.stop();
-    },
-    getWorks: function (uid, id) {
-        httpRequestApi.getWorksDetail(uid, id, this.data.goBackHome ? 'READ_SHARE' : '').success((res) => {
-            const others = res.data.data.otherRead;
-            const author = res.data.data.user;
-            const works = res.data.data.userRead;
-            wx.setNavigationBarTitle({
-                title: works.title //页面标题为路由参数
-            })
-            const othersTemp = [];
-            others.forEach((item) => {
-                const temp = {};
-                temp.uid = item.userRead.id;
-                temp.title = item.userRead.title;
-                temp.image = item.user.avatar;
-                temp.nickName = item.user.wechatName;
-                othersTemp.push(temp);
-            });
-            this.setData({
-                user: othersTemp,
-                totalRead: res.data.data.totalRead,
-                author: author.wechatName,
-                authorAvatar: author.avatar,
-                authorProfession: author.profession,
-                authorUid: author.uid,
-                videoSrc: works.originVideo,
-                audioSrc: works.audioPath,
-                iconImg: works.iconImg,
-                classId: works.lessonId,
-                isLike: res.data.data.isLike,
-                isFans: res.data.data.isFans,
-                title: works.title,
-                userReadId: works.id
-            })
-            httpRequestApi.checkLesson(works.lessonId).success(res => {
-                const productId = res.data.data[0];
-                this.setData({
-                    productId
-                })
-            });
-            // 设置音频路径
-            this.innerAudioContext = wx.createInnerAudioContext();
-            this.innerAudioContext.onPause((res) => {
-                // 播放音频失败的回调
-                console.log('音频暂停')
-            })
-            this.innerAudioContext.src = this.data.audioSrc; // 这里可以是录音的临时路径
-            if(this.data.fromReading){
-                setTimeout(()=>{
-                    this.openShare()
-                })
-            }
-
-
-        });
-    },
-    onShow() {
-        if(this.data.myUid){
-            this.setData({
-                replyList: [],
-                pageNo: 1,
-                pageSize: 2
-            }, () => {
-                this.getReply();
-            })
-        }
-    },
-    videoPlayHandler: function () {
-        this.setData({
-            videoLoad: true
-        }, () => {
-            this.videoCtx = wx.createVideoContext('worksVideo', this);
-            this.videoCtx.play();
-        })
-    },
-    likeWorks: function (e) {
-        // + 1 + 1的动画
-        this.setData({
-            addComeOut: 'add-one-come-out'
-            // isLike: true
-        })
-        setTimeout(() => {
-            if (this.data.addComeOut) {
-                this.setData({
-                    addComeOut: ''
-                })
-            }
-        }, 1100)
-
-        // 恭喜获得x朵小红花
-        if (this.data.isLike) {
-            // wx.showToast({
-            //     title: '不要重复点赞哦',
-            //     icon: 'fail',
-            //     duration: 1000
-            // })
-            return;
-        }
-        httpRequestApi.likeWorks(this.uid, this.data.id).success(res => {
-            this.setData({
-                isLike: true,
-                flowerNum: res.data.count
-            }, () => {
-                if (res.data.count > 0) {
-                    this.flowerAnimationHandler();
-                }
-            });
-        })
-
-    },
-    // 弹出分享框
-    openShare: function (e) {
-        console.log(this.data.authorAvatar)
-        console.log(this.data.author)
-        console.log(this.data.iconImg)
-        console.log(this.data.title)
-        console.log(this.data.id)
-        if (this.data.authorAvatar && this.data.author && this.data.iconImg && this.data.title && this.data.id) {
-            this.shareDialog = this.selectComponent("#share-dialog");
-            const data = {
-                avatar: this.data.authorAvatar,
-                author: this.data.author,
-                iconImg: this.data.iconImg,
-                title: this.data.title,
-                path: `pages/social/works/works`,
-                scene: this.data.id,
-                productId: this.data.productId
-                // tip: this.data.tip,
-            }
-            // console.log(data)
-            this.setData({
-                noScroll: 'noScroll'
-            })
-            this.shareDialog.share(data);
-        }
-    },
-    // 分享框关闭
-    shareDialogClose: function (e) {
-        this.setData({
-            noScroll: ''
-        })
-    },
-    videoPlay: function () {
-        // 视频开始 先结束 再开始
-        // this.innerAudioContext.play();
-        // this.innerAudioContext.pause();
-        // wx.showToast({
-        //     title: '加载中',
-        //     icon: 'loading',
-        //     duration: 600
-        // })
-        // setTimeout(() => {
-        this.innerAudioContext.play();
-        // }, 800)
-        // httpRequestApi.playWorks(this.uid, this.data.id).success(() => {
-        //     console.log('容个错')
-        // });
-    },
-    // 视频播放完毕销毁录音
-    videoEnd: function (e) {
-        console.log(e)
-
-        this.innerAudioContext.stop();
-    },
-    videoPause: function () {
-        console.log('视频暂停')
-        this.innerAudioContext.pause();
-    },
-    videoWaiting: function () {
-        console.log('视频缓冲')
-        this.innerAudioContext.pause();
-    },
-    videoProgress: function (e) {
-        if (e.detail.buffered <= 10) {
-            this.innerAudioContext.pause();
-        } else {
-            this.innerAudioContext.play();
-        }
-    },
-    videoTimeupdate: function (e) {
-        this.videoPlayTime = e.detail.currentTime
-        if (e.detail.currentTime - this.innerAudioContext.currentTime >= 1) {
-            this.innerAudioContext.seek(e.detail.currentTime - 0.1);
-        }
-    },
-    goToReading: function () {
-        const classId = this.data.classId;
-
-
-        httpRequestApi.areYouSuper(this.data.productId).success(res => {
-            if (res.data.success) {
-                wx.navigateTo({
-                    url: `../../main/reading/reading?id=${classId}`
-                })
-            } else {
-                // ios用户 并且没有购买过此书
-                // if (this.data.isIOS) {
-                //     wx.showModal({
-                //         title: '暂不支持',
-                //         content: '十分抱歉,由于相关规定,您暂时无法在这里朗读',
-                //         success(res) {
-                //             if (res.confirm) {
-                //                 console.log('用户点击确定')
-                //             } else if (res.cancel) {
-                //                 console.log('用户点击取消')
-                //             }
-                //         }
-                //     })
-                //     return;
-                // }
-                console.log('chulaiba')
-                this.setData({
-                    isModalShow: true
-                })
-                // wx.showModal({
-                //     title: '您未购买过本书,不能朗读',
-                //     content: '超值团购进行中,快去看看',
-                //     success(res) {
-                //         if (res.confirm) {
-                //             console.log('用户点击确定')
-                //             wx.navigateTo({
-                //                 url: `../../groupPage/grade-details/grade-details?productId=${productId}`
-                //             })
-                //         } else if (res.cancel) {
-                //             console.log('用户点击取消')
-                //         }
-                //     }
-                // })
-            }
-        })
-    },
-    onShareAppMessage: function () {
-        console.log(this.data.productId);
-        const data = {
-            shareTypeEnum: 'LINK',
-            shareContentEnum: 'READ',
-            productId: this.data.productId
-        }
-        httpRequestApi.shareRecord(data).success((res) => {
-            console.log(res)
-        })
-        return {
-            title: '一样的课文,不一样的味道!我的配音表演已开始,求各位大咖围观、点评!',
-            path: `pages/social/works/works?id=${this.data.id}&title=${this.data.title}&shareCard=true`,
-            imageUrl: `https://efunbox.lingjiao.cn/reader/resource/share/read_${this.data.productId}.jpg`,
-        }
-    },
-    follow: function () {
-        let followUid = this.data.authorUid;
-        if (this.data.isFans) {
-            httpRequestApi.cancerFollow(this.uid, followUid).success((res) => {
-                this.setData({
-                    isFans: false
-                })
-                wx.showToast({
-                    title: '取消关注',
-                    icon: 'success',
-                    duration: 1000
-                })
-            });
-        } else {
-            httpRequestApi.followUser(this.uid, followUid).success((res) => {
-                this.setData({
-                    isFans: true
-                })
-                wx.showToast({
-                    title: '关注啦',
-                    icon: 'success',
-                    duration: 1000
-                })
-            });
-        }
-    },
-    // 点赞评论
-    likeCommend: function (e) {
-        console.log(e);
-        // let uid = wx.getStorageSync('uid');
-        let followUid = e.currentTarget.dataset.id;
-        let index = e.currentTarget.dataset.index;
-        httpRequestApi.likeCommend(this.uid, followUid).success(res => {
-            console.log(res);
-            const str = `replyList[${index}].likes`;
-            const strImg = `replyList[${index}].isLike`;
-            this.setData({
-                [str]: res.data.data.favors,
-                [strImg]: true
-            })
-        });
-    },
-    // 去用户主页
-    goToUsers: function (e) {
-        let uid = e.currentTarget.dataset.uid;
-        wx.navigateTo({
-            url: `../../user/myworks/myworks?uid=${uid}`
-        });
-    },
-    // 去其他用户的作品页
-    goToOthers: function (e) {
-        this.data.stackSize++;
-        console.log(this.data.stackSize)
-        if (this.data.stackSize >= 3) {
-            console.log('跳转', this.data.stackSize)
-            wx.redirectTo({
-                url: `../../social/works/works?id=${e.currentTarget.dataset.uid}&title=${e.currentTarget.dataset.title}&stackSize=${this.data.stackSize}`
-            })
-        } else {
-            console.log('下一个页面', this.data.stackSize)
-            wx.navigateTo({
-                url: `../../social/works/works?id=${e.currentTarget.dataset.uid}&title=${e.currentTarget.dataset.title}&stackSize=${this.data.stackSize}`
-            })
-        }
-
-    },
-    // 查询回复
-    getReply: function () {
-        // let uid = wx.getStorageSync('uid');
-        let columnId = this.data.id;
-        let pageNo = this.data.pageNo;
-        let pageSize = this.data.pageSize;
-        httpRequestApi.getReply(this.uid, columnId, pageNo, pageSize).success((res) => {
-            const replyList = res.data.data.list;
-            // const replyTemp = [];
-            replyList.forEach((item) => {
-                const temp = {};
-                temp.nickName = item.user.wechatName;
-                temp.avatar = item.user.avatar;
-                temp.profession = item.user.profession;
-                temp.uid = item.user.uid;
-                // temp.text = decodeURI(item.detailDesc);
-                temp.text = item.detailDesc;
-                temp.id = item.id;
-                temp.replyCount = item.replyCount;
-                temp.time = formatDate(item.gmtCreated, 3);
-                temp.likes = item.postsAttributeInfo.favors || 0;
-                temp.isLike = item.isLike;
-                this.data.replyList.push(temp);
-            });
-            this.setData({
-                replyList: this.data.replyList,
-                total: res.data.data.totalSize,
-                totalPage: res.data.data.totalNo
-            })
-        });
-    },
-    // 打开回复详情页
-    goToDetail: function (e) {
-        let id = e.currentTarget.dataset.id;
-        // let count = e.currentTarget.dataset.count;
-        wx.navigateTo({
-            url: `../../social/replyDetail/replyDetail?id=${id}&productId=${this.data.productId}`
-        })
-    },
-    //  绑定输入框内容
-    inputValue: function (e) {
-        this.setData({
-            inputValue: e.detail.value
-        });
-    },
-    // 发布回复
-    sendHandler: function () {
-        console.log(this.data.productId)
-        if (this.data.inputValue !== '') {
-            // let uid = wx.getStorageSync('uid');
-            let data = {
-                "columnId": this.data.id,
-                colunmNames: 'what',
-                // "detailDesc": encodeURI(this.data.inputValue)
-                "detailDesc": this.data.inputValue,
-                productId: this.data.productId
-            }
-            httpRequestApi.postReply(this.uid, data).success(res => {
-                console.log(res)
-                this.setData({
-                    inputValue: '',
-                    pageNo: 1,
-                    replyList: [],
-                    flowerNum: res.data.count
-                })
-                this.getReply();
-                if (res.data.count > 0) {
-                    this.flowerAnimationHandler();
-                }
-            });
-            // 评论成功后刷新数据
-
-        }
-    },
-    flowerAnimationHandler: function () {
-        this.flowerBox = this.selectComponent("#flower-box");
-        this.flowerBox.comeOut();
-    },
-    // 触底加载
-    onReachBottom: function () {
-        // 当前在推荐页面 加载推荐
-        if (this.data.pageNo <= this.data.totalPage) {
-            this.setData({
-                pageNo: this.data.pageNo + 1
-            }, () => {
-                this.getReply();
-            })
-        }
-
-
-    },
-    // 设置点击时的id
-    setSBId: function (e) {
-        this.setData({
-            replySBId: e.currentTarget.dataset.id,
-            replyModal: true,
-            replyIndex: e.currentTarget.dataset.index
-        })
-    },
-    // 回复某个评论
-    replySB: function () {
-        const data = {
-            postsId: this.data.replySBId,
-            content: this.data.inputSBValue,
-            productId: this.data.productId
-        }
-        httpRequestApi.postReplyComment(this.uid, data).success(res => {
-            const replyWho = this.data.replyList[this.data.replyIndex];
-            const indexStr = `replyList[${this.data.replyIndex}]`;
-            replyWho.replyCount++;
-            this.setData({
-                replyModal: false,
-                [indexStr]: replyWho
-            })
-        });
-    },
-    // 获取回复楼中楼的内容
-    inputSBValue: function (e) {
-        this.setData({
-            inputSBValue: e.detail.value
-        });
-    },
-    // 选择金额
-    setMoney: function (e) {
-        this.setData({
-            howMuch: e.currentTarget.dataset.money
-        })
-    },
-    reward: function () {
-        if (this.data.isIOS) {
-            return
-        };
-        this.setData({
-            ifReward: true
-        })
-    },
-    quitReward: function () {
-        this.setData({
-            ifReward: false
-        })
-    },
-    // 奖励
-    rewardMoney: function () {
-        const data = {
-            targetUid: this.data.authorUid,
-            amount: this.data.howMuch
-        }
-        // let uid = wx.getStorageSync('uid');
-        httpRequestApi.rewardMoney(this.uid, data).success(res => {
-            if (res.data.message) {
-                wx.showModal({
-                    title: '提示',
-                    content: res.data.message,
-                    success(res) {
-                        if (res.confirm) {
-                            console.log('用户点击确定')
-                        } else if (res.cancel) {
-                            console.log('用户点击取消')
-                        }
-                    }
-                })
-                return false;
-            }
-            this.payMoney(res.data.data);
-        })
-
-    },
-    //支付
-    payMoney: function (orderInfo) {
-        if (this.data.haveTapMoney) {
-            return false
-        }
-        this.setData({
-            haveTapMoney: true
-        })
-        wx.requestPayment({
-            'appId': orderInfo.appId,
-            'timeStamp': orderInfo.timeStamp,
-            'nonceStr': orderInfo.nonceStr,
-            'package': orderInfo.package,
-            'signType': orderInfo.signType,
-            'paySign': orderInfo.sign,
-            'success': res => {
-                this.setData({
-                    modalType: 'image',
-                    isModalShow: true,
-                    modalCloseShow: false,
-                    modalBtnText: '确定',
-                    haveTapMoney: false,
-                    ifReward: false
-                })
-                // wx.showModal({
-                //     title: '提示',
-                //     content: '支付成功',
-                //     success(res) {
-                //         if (res.confirm) {
-                //             this.setData({
-                //                 ifReward: false
-                //             })
-                //         } else if (res.cancel) {
-                //             this.setData({
-                //                 ifReward: false
-                //             })
-                //         }
-                //     }
-                // })
-
-            },
-            'fail': res => {
-                this.setData({
-                    haveTapMoney: false,
-                })
-                console.log('支付失败', res)
-            }
-        })
-    },
-    // 回到首页
-    goBackHome: function () {
-        wx.redirectTo({
-            url: '../../index/index'
-        })
-    },
-    modalConfirmHandler: function () {
-
-        if (this.data.modalType === 'image') {
-            this.setData({
-                modalType: 'text',
-                isModalShow: false,
-                ifReward: false,
-                modalCloseShow: true,
-                modalBtnText: "去开团",
-                // ifReward: false
-            })
-            return false
-        }
-        this.setData({
-            isModalShow: false
-        })
-        wx.navigateTo({
-            url: `../../groupPage/grade-details/grade-details?productId=${this.data.productId}`
-        })
-    },
-    modalCloseHandler: function () {
-        this.setData({
-            isModalShow: false
-        })
-    },
-    jurisdiction: function () {
-        //隐藏弹框
-        this.setData({
-            hide: !this.data.hide
-        })
-        //登录页信息
-        this.onLoad(this.data.onLoadOption);
-    },
-    goToClass: function () {
-
-        if (!this.data.isIOS && this.videoCtx) {
-            this.innerAudioContext.stop();
-            this.innerAudioContext.destroy();
-            this.videoCtx.stop();
-            this.setData({
-                videoLoad: false
-            })
-        }
-
-        setTimeout(() => {
-            wx.navigateTo({
-                url: `../../main/class/class?id=${this.data.classId}`
-            })
-        }, 100)
-
-    }
-})

+ 0 - 727
.history/pages/social/works/works_20190327112337.js

@@ -1,727 +0,0 @@
-import httpRequestApi from '../../../utils/APIClient';
-import {
-    formatDate
-} from '../../../utils/util';
-import {
-    getOpenidSessionKey
-} from '../../../utils/httpUtil';
-const app = getApp()
-Page({
-    data: {
-        fullScreenBtn: false,
-        playBtn: true,
-        gesture: false,
-        author: '',
-        videoSrc: '',
-        total: '',
-        authorAvatar: '',
-        user: [],
-        inputValue: '',
-        inputSBValue: '',
-        replyList: [],
-        howMuch: '200',
-        moneySelect: 'moneySelect',
-        moneyNormal: 'moneyNormal',
-        ifReward: false,
-        id: '',
-        path: '',
-        replyModal: false,
-        totalRead: 0,
-        pageNo: 1,
-        pageSize: 3,
-        goBackHome: false,
-        isIOS: app.globalData.isIOS,
-        alertFlag: false,
-        modalType: "text",
-        noScroll: '',
-        modalText: [{
-                text: '您还不是本课程的会员',
-                type: 'bigOrange'
-            },
-            {
-                text: '您可以开团,拼团成功获得使用权',
-                type: 'normal'
-            }
-        ],
-        modalBtnText: '去开团',
-        isModalShow: false,
-        modalCloseShow: true,
-        hide: true,
-        addComeOut: '',
-        flowerNum: '6'
-        // shareFlag: false
-    },
-    showAlert: function () {
-        this.setData({
-            alertFlag: !this.data.alertFlag
-        })
-    },
-    onLoad: function (option) {
-        console.log(option)
-        console.log(option.flowerCount)
-        console.log(option.flowerCount === 0)
-        if (option.flowerCount) {
-            this.setData({
-                fromReading: true
-            })
-            this.flowerAnimationHandler();
-            // setTimeout(() => {
-            //     this.openShare();
-            // }, 300)
-            if (option.flowerCount > 0) {
-                this.setData({
-                    flowerNum: option.flowerCount
-                })
-            }
-        }
-        getOpenidSessionKey((res) => {
-            let id = option.id ? option.id : option.scene.replace('QR', '')
-            if (option.scene || option.shareCard) {
-                this.setData({
-                    goBackHome: true
-                })
-            }
-            // wx.setNavigationBarTitle({
-            //     title: option.title //页面标题为路由参数
-            // })
-            this.uid = wx.getStorageSync('uid');
-            let stackSize = 1;
-            if (option.stackSize) {
-                stackSize = option.stackSize;
-            }
-            this.setData({
-                // title: option.title,
-                id,
-                myUid: this.uid,
-                stackSize
-            },()=>{
-                this.getWorks(this.uid, id);
-            })
-            
-        }, (error) => {
-            wx.setStorageSync('userSourseType','reading')
-            this.setData({
-                hide: !this.data.hide,
-                onLoadOption: option
-            })
-            return;
-        });
-    },
-    onHide: function () {
-        // this.data.stackSize >= 2
-        console.log('hide')
-        if (this.innerAudioContext) {
-            console.log('音频应该被暂停')
-            this.innerAudioContext.pause();
-        }
-        // this.videoCtx = null
-    },
-    onUnload: function () {
-        console.log(this.data.productId)
-        if (this.videoPlayTime) {
-            const data = {
-                "title": this.data.title,
-                "lessonId": this.data.classId,
-                "productId": this.data.productId,
-                "playStopTime": Math.ceil(this.videoPlayTime),
-                "userReadId": this.data.userReadId,
-                "type": 'READ',
-            }
-            httpRequestApi.playLogReport(data).success(res => {
-                console.log(res)
-            })
-        }
-
-        if (this.innerAudioContext) {
-            this.innerAudioContext.destroy();
-        }
-        this.videoCtx = null
-        // let videoCtx = wx.createVideoContext('worksVideo', this);
-        // videoCtx.stop();
-    },
-    getWorks: function (uid, id) {
-        httpRequestApi.getWorksDetail(uid, id, this.data.goBackHome ? 'READ_SHARE' : '').success((res) => {
-            const others = res.data.data.otherRead;
-            const author = res.data.data.user;
-            const works = res.data.data.userRead;
-            wx.setNavigationBarTitle({
-                title: works.title //页面标题为路由参数
-            })
-            const othersTemp = [];
-            others.forEach((item) => {
-                const temp = {};
-                temp.uid = item.userRead.id;
-                temp.title = item.userRead.title;
-                temp.image = item.user.avatar;
-                temp.nickName = item.user.wechatName;
-                othersTemp.push(temp);
-            });
-            this.setData({
-                user: othersTemp,
-                totalRead: res.data.data.totalRead,
-                author: author.wechatName,
-                authorAvatar: author.avatar,
-                authorProfession: author.profession,
-                authorUid: author.uid,
-                videoSrc: works.originVideo,
-                audioSrc: works.audioPath,
-                iconImg: works.iconImg,
-                classId: works.lessonId,
-                isLike: res.data.data.isLike,
-                isFans: res.data.data.isFans,
-                title: works.title,
-                userReadId: works.id
-            })
-            httpRequestApi.checkLesson(works.lessonId).success(res => {
-                const productId = res.data.data[0];
-                this.setData({
-                    productId
-                })
-            });
-            // 设置音频路径
-            this.innerAudioContext = wx.createInnerAudioContext();
-            this.innerAudioContext.onPause((res) => {
-                // 播放音频失败的回调
-                console.log('音频暂停')
-            })
-            this.innerAudioContext.src = this.data.audioSrc; // 这里可以是录音的临时路径
-            if(this.data.fromReading){
-                setTimeout(()=>{
-                    this.openShare()
-                })
-            }
-
-
-        });
-    },
-    onShow() {
-        if(this.data.myUid){
-            this.setData({
-                replyList: [],
-                pageNo: 1,
-                pageSize: 2
-            }, () => {
-                this.getReply();
-            })
-        }
-    },
-    videoPlayHandler: function () {
-        this.setData({
-            videoLoad: true
-        }, () => {
-            this.videoCtx = wx.createVideoContext('worksVideo', this);
-            this.videoCtx.play();
-        })
-    },
-    likeWorks: function (e) {
-        // + 1 + 1的动画
-        this.setData({
-            addComeOut: 'add-one-come-out'
-            // isLike: true
-        })
-        setTimeout(() => {
-            if (this.data.addComeOut) {
-                this.setData({
-                    addComeOut: ''
-                })
-            }
-        }, 1100)
-
-        // 恭喜获得x朵小红花
-        if (this.data.isLike) {
-            // wx.showToast({
-            //     title: '不要重复点赞哦',
-            //     icon: 'fail',
-            //     duration: 1000
-            // })
-            return;
-        }
-        httpRequestApi.likeWorks(this.uid, this.data.id).success(res => {
-            this.setData({
-                isLike: true,
-                flowerNum: res.data.count
-            }, () => {
-                if (res.data.count > 0) {
-                    this.flowerAnimationHandler();
-                }
-            });
-        })
-
-    },
-    // 弹出分享框
-    openShare: function (e) {
-        console.log(this.data.authorAvatar)
-        console.log(this.data.author)
-        console.log(this.data.iconImg)
-        console.log(this.data.title)
-        console.log(this.data.id)
-        if (this.data.authorAvatar && this.data.author && this.data.iconImg && this.data.title && this.data.id) {
-            this.shareDialog = this.selectComponent("#share-dialog");
-            const data = {
-                avatar: this.data.authorAvatar,
-                author: this.data.author,
-                iconImg: this.data.iconImg,
-                title: this.data.title,
-                path: `pages/social/works/works`,
-                scene: this.data.id,
-                productId: this.data.productId
-                // tip: this.data.tip,
-            }
-            // console.log(data)
-            this.setData({
-                noScroll: 'noScroll'
-            })
-            this.shareDialog.share(data);
-        }
-    },
-    // 分享框关闭
-    shareDialogClose: function (e) {
-        this.setData({
-            noScroll: ''
-        })
-    },
-    videoPlay: function () {
-        // 视频开始 先结束 再开始
-        // this.innerAudioContext.play();
-        // this.innerAudioContext.pause();
-        // wx.showToast({
-        //     title: '加载中',
-        //     icon: 'loading',
-        //     duration: 600
-        // })
-        // setTimeout(() => {
-        this.innerAudioContext.play();
-        // }, 800)
-        // httpRequestApi.playWorks(this.uid, this.data.id).success(() => {
-        //     console.log('容个错')
-        // });
-    },
-    // 视频播放完毕销毁录音
-    videoEnd: function (e) {
-        console.log(e)
-
-        this.innerAudioContext.stop();
-    },
-    videoPause: function () {
-        console.log('视频暂停')
-        this.innerAudioContext.pause();
-    },
-    videoWaiting: function () {
-        console.log('视频缓冲')
-        this.innerAudioContext.pause();
-    },
-    videoProgress: function (e) {
-        if (e.detail.buffered <= 10) {
-            this.innerAudioContext.pause();
-        } else {
-            this.innerAudioContext.play();
-        }
-    },
-    videoTimeupdate: function (e) {
-        this.videoPlayTime = e.detail.currentTime
-        if (e.detail.currentTime - this.innerAudioContext.currentTime >= 1) {
-            this.innerAudioContext.seek(e.detail.currentTime - 0.1);
-        }
-    },
-    goToReading: function () {
-        const classId = this.data.classId;
-
-
-        httpRequestApi.areYouSuper(this.data.productId).success(res => {
-            if (res.data.success) {
-                wx.navigateTo({
-                    url: `../../main/reading/reading?id=${classId}`
-                })
-            } else {
-                // ios用户 并且没有购买过此书
-                // if (this.data.isIOS) {
-                //     wx.showModal({
-                //         title: '暂不支持',
-                //         content: '十分抱歉,由于相关规定,您暂时无法在这里朗读',
-                //         success(res) {
-                //             if (res.confirm) {
-                //                 console.log('用户点击确定')
-                //             } else if (res.cancel) {
-                //                 console.log('用户点击取消')
-                //             }
-                //         }
-                //     })
-                //     return;
-                // }
-                console.log('chulaiba')
-                this.setData({
-                    isModalShow: true
-                })
-                // wx.showModal({
-                //     title: '您未购买过本书,不能朗读',
-                //     content: '超值团购进行中,快去看看',
-                //     success(res) {
-                //         if (res.confirm) {
-                //             console.log('用户点击确定')
-                //             wx.navigateTo({
-                //                 url: `../../groupPage/grade-details/grade-details?productId=${productId}`
-                //             })
-                //         } else if (res.cancel) {
-                //             console.log('用户点击取消')
-                //         }
-                //     }
-                // })
-            }
-        })
-    },
-    onShareAppMessage: function () {
-        console.log(this.data.productId);
-        const data = {
-            shareTypeEnum: 'LINK',
-            shareContentEnum: 'READ',
-            productId: this.data.productId
-        }
-        httpRequestApi.shareRecord(data).success((res) => {
-            console.log(res)
-        })
-        return {
-            title: '一样的课文,不一样的味道!我的配音表演已开始,求各位大咖围观、点评!',
-            path: `pages/social/works/works?id=${this.data.id}&title=${this.data.title}&shareCard=true`,
-            imageUrl: `https://efunbox.lingjiao.cn/reader/resource/share/read_${this.data.productId}.jpg`,
-        }
-    },
-    follow: function () {
-        let followUid = this.data.authorUid;
-        if (this.data.isFans) {
-            httpRequestApi.cancerFollow(this.uid, followUid).success((res) => {
-                this.setData({
-                    isFans: false
-                })
-                wx.showToast({
-                    title: '取消关注',
-                    icon: 'success',
-                    duration: 1000
-                })
-            });
-        } else {
-            httpRequestApi.followUser(this.uid, followUid).success((res) => {
-                this.setData({
-                    isFans: true
-                })
-                wx.showToast({
-                    title: '关注啦',
-                    icon: 'success',
-                    duration: 1000
-                })
-            });
-        }
-    },
-    // 点赞评论
-    likeCommend: function (e) {
-        console.log(e);
-        // let uid = wx.getStorageSync('uid');
-        let followUid = e.currentTarget.dataset.id;
-        let index = e.currentTarget.dataset.index;
-        httpRequestApi.likeCommend(this.uid, followUid).success(res => {
-            console.log(res);
-            const str = `replyList[${index}].likes`;
-            const strImg = `replyList[${index}].isLike`;
-            this.setData({
-                [str]: res.data.data.favors,
-                [strImg]: true
-            })
-        });
-    },
-    // 去用户主页
-    goToUsers: function (e) {
-        let uid = e.currentTarget.dataset.uid;
-        wx.navigateTo({
-            url: `../../user/myworks/myworks?uid=${uid}`
-        });
-    },
-    // 去其他用户的作品页
-    goToOthers: function (e) {
-        this.data.stackSize++;
-        console.log(this.data.stackSize)
-        if (this.data.stackSize >= 3) {
-            console.log('跳转', this.data.stackSize)
-            wx.redirectTo({
-                url: `../../social/works/works?id=${e.currentTarget.dataset.uid}&title=${e.currentTarget.dataset.title}&stackSize=${this.data.stackSize}`
-            })
-        } else {
-            console.log('下一个页面', this.data.stackSize)
-            wx.navigateTo({
-                url: `../../social/works/works?id=${e.currentTarget.dataset.uid}&title=${e.currentTarget.dataset.title}&stackSize=${this.data.stackSize}`
-            })
-        }
-
-    },
-    // 查询回复
-    getReply: function () {
-        // let uid = wx.getStorageSync('uid');
-        let columnId = this.data.id;
-        let pageNo = this.data.pageNo;
-        let pageSize = this.data.pageSize;
-        httpRequestApi.getReply(this.uid, columnId, pageNo, pageSize).success((res) => {
-            const replyList = res.data.data.list;
-            // const replyTemp = [];
-            replyList.forEach((item) => {
-                const temp = {};
-                temp.nickName = item.user.wechatName;
-                temp.avatar = item.user.avatar;
-                temp.profession = item.user.profession;
-                temp.uid = item.user.uid;
-                // temp.text = decodeURI(item.detailDesc);
-                temp.text = item.detailDesc;
-                temp.id = item.id;
-                temp.replyCount = item.replyCount;
-                temp.time = formatDate(item.gmtCreated, 3);
-                temp.likes = item.postsAttributeInfo.favors || 0;
-                temp.isLike = item.isLike;
-                this.data.replyList.push(temp);
-            });
-            this.setData({
-                replyList: this.data.replyList,
-                total: res.data.data.totalSize,
-                totalPage: res.data.data.totalNo
-            })
-        });
-    },
-    // 打开回复详情页
-    goToDetail: function (e) {
-        let id = e.currentTarget.dataset.id;
-        // let count = e.currentTarget.dataset.count;
-        wx.navigateTo({
-            url: `../../social/replyDetail/replyDetail?id=${id}&productId=${this.data.productId}`
-        })
-    },
-    //  绑定输入框内容
-    inputValue: function (e) {
-        this.setData({
-            inputValue: e.detail.value
-        });
-    },
-    // 发布回复
-    sendHandler: function () {
-        console.log(this.data.productId)
-        if (this.data.inputValue !== '') {
-            // let uid = wx.getStorageSync('uid');
-            let data = {
-                "columnId": this.data.id,
-                colunmNames: 'what',
-                // "detailDesc": encodeURI(this.data.inputValue)
-                "detailDesc": this.data.inputValue,
-                productId: this.data.productId
-            }
-            httpRequestApi.postReply(this.uid, data).success(res => {
-                console.log(res)
-                this.setData({
-                    inputValue: '',
-                    pageNo: 1,
-                    replyList: [],
-                    flowerNum: res.data.count
-                })
-                this.getReply();
-                if (res.data.count > 0) {
-                    this.flowerAnimationHandler();
-                }
-            });
-            // 评论成功后刷新数据
-
-        }
-    },
-    flowerAnimationHandler: function () {
-        this.flowerBox = this.selectComponent("#flower-box");
-        this.flowerBox.comeOut();
-    },
-    // 触底加载
-    onReachBottom: function () {
-        // 当前在推荐页面 加载推荐
-        if (this.data.pageNo <= this.data.totalPage) {
-            this.setData({
-                pageNo: this.data.pageNo + 1
-            }, () => {
-                this.getReply();
-            })
-        }
-
-
-    },
-    // 设置点击时的id
-    setSBId: function (e) {
-        this.setData({
-            replySBId: e.currentTarget.dataset.id,
-            replyModal: true,
-            replyIndex: e.currentTarget.dataset.index
-        })
-    },
-    // 回复某个评论
-    replySB: function () {
-        const data = {
-            postsId: this.data.replySBId,
-            content: this.data.inputSBValue,
-            productId: this.data.productId
-        }
-        httpRequestApi.postReplyComment(this.uid, data).success(res => {
-            const replyWho = this.data.replyList[this.data.replyIndex];
-            const indexStr = `replyList[${this.data.replyIndex}]`;
-            replyWho.replyCount++;
-            this.setData({
-                replyModal: false,
-                [indexStr]: replyWho
-            })
-        });
-    },
-    // 获取回复楼中楼的内容
-    inputSBValue: function (e) {
-        this.setData({
-            inputSBValue: e.detail.value
-        });
-    },
-    // 选择金额
-    setMoney: function (e) {
-        this.setData({
-            howMuch: e.currentTarget.dataset.money
-        })
-    },
-    reward: function () {
-        if (this.data.isIOS) {
-            return
-        };
-        this.setData({
-            ifReward: true
-        })
-    },
-    quitReward: function () {
-        this.setData({
-            ifReward: false
-        })
-    },
-    // 奖励
-    rewardMoney: function () {
-        const data = {
-            targetUid: this.data.authorUid,
-            amount: this.data.howMuch
-        }
-        // let uid = wx.getStorageSync('uid');
-        httpRequestApi.rewardMoney(this.uid, data).success(res => {
-            if (res.data.message) {
-                wx.showModal({
-                    title: '提示',
-                    content: res.data.message,
-                    success(res) {
-                        if (res.confirm) {
-                            console.log('用户点击确定')
-                        } else if (res.cancel) {
-                            console.log('用户点击取消')
-                        }
-                    }
-                })
-                return false;
-            }
-            this.payMoney(res.data.data);
-        })
-
-    },
-    //支付
-    payMoney: function (orderInfo) {
-        if (this.data.haveTapMoney) {
-            return false
-        }
-        this.setData({
-            haveTapMoney: true
-        })
-        wx.requestPayment({
-            'appId': orderInfo.appId,
-            'timeStamp': orderInfo.timeStamp,
-            'nonceStr': orderInfo.nonceStr,
-            'package': orderInfo.package,
-            'signType': orderInfo.signType,
-            'paySign': orderInfo.sign,
-            'success': res => {
-                this.setData({
-                    modalType: 'image',
-                    isModalShow: true,
-                    modalCloseShow: false,
-                    modalBtnText: '确定',
-                    haveTapMoney: false,
-                    ifReward: false
-                })
-                // wx.showModal({
-                //     title: '提示',
-                //     content: '支付成功',
-                //     success(res) {
-                //         if (res.confirm) {
-                //             this.setData({
-                //                 ifReward: false
-                //             })
-                //         } else if (res.cancel) {
-                //             this.setData({
-                //                 ifReward: false
-                //             })
-                //         }
-                //     }
-                // })
-
-            },
-            'fail': res => {
-                this.setData({
-                    haveTapMoney: false,
-                })
-                console.log('支付失败', res)
-            }
-        })
-    },
-    // 回到首页
-    goBackHome: function () {
-        wx.redirectTo({
-            url: '../../index/index'
-        })
-    },
-    modalConfirmHandler: function () {
-
-        if (this.data.modalType === 'image') {
-            this.setData({
-                modalType: 'text',
-                isModalShow: false,
-                ifReward: false,
-                modalCloseShow: true,
-                modalBtnText: "去开团",
-                // ifReward: false
-            })
-            return false
-        }
-        this.setData({
-            isModalShow: false
-        })
-        wx.navigateTo({
-            url: `../../groupPage/grade-details/grade-details?productId=${this.data.productId}`
-        })
-    },
-    modalCloseHandler: function () {
-        this.setData({
-            isModalShow: false
-        })
-    },
-    jurisdiction: function () {
-        //隐藏弹框
-        this.setData({
-            hide: !this.data.hide
-        })
-        //登录页信息
-        this.onLoad(this.data.onLoadOption);
-    },
-    goToClass: function () {
-
-        if (!this.data.isIOS && this.videoCtx) {
-            this.innerAudioContext.stop();
-            this.innerAudioContext.destroy();
-            this.videoCtx.stop();
-            this.setData({
-                videoLoad: false
-            })
-        }
-
-        setTimeout(() => {
-            wx.navigateTo({
-                url: `../../main/class/class?id=${this.data.classId}`
-            })
-        }, 100)
-
-    }
-})

+ 0 - 173
.history/pages/user/myEdit/myEdit_20190123180844.js

@@ -1,173 +0,0 @@
-import httpRequestApi from '../../../utils/APIClient';
-import {
-  formatDate
-} from '../../../utils/util';
-Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    user: {},
-    sexs: [],
-    occupations: [],
-    date: '',
-    msg: '',
-    nickname: ''
-  },
-  saveNickName: function (e) {
-    let nickname = e.detail.value;
-    this.setData({
-      nicename: nickname
-    });
-  },
-  saveAddress: function (e) {
-    let msg = e.detail.value;
-    this.setData({
-      msg: msg
-    });
-  },
-  bindDateChange: function (e) {
-    console.log(e.detail.value)
-    this.setData({
-      date: e.detail.value
-    });
-  },
-  optionAction: function (e) {
-    console.log(e.detail.value);
-  },
-  optionSetting: function (e) {
-    console.log(e.detail.value);
-  },
-  formSubmit: function (e) {
-    console.log(e.detail.value)
-    if(e.detail.value.nickname === ''){
-      return false
-    }
-    // const uid = wx.getStorageSync('uid');
-    const data = {
-      nickName: e.detail.value.nickname || '',
-      mobile: '',
-      gender: e.detail.value.radioGroup1,
-      schoolProvince: '',
-      schoolCity: '',
-      schoolName: e.detail.value.address || '',
-      profession: e.detail.value.radioGroup2 || '',
-      birthday: e.detail.value.picker || ''
-    }
-    httpRequestApi.settingUserInfo(data).success(res => {
-      console.log(res.data.data); //修改资料成功后 调用 getUserInfo
-      // wx.redirectTo({
-      //   url: '/pages/index/index?index=3'
-      // });
-      wx.setStorageSync('user',res.data.data);
-      wx.navigateBack({
-        delta: 1
-      })
-    });
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  getUserInfo: function () {
-
-  },
-  onLoad: function (option) {
-    httpRequestApi.getUserInfo().success(res => {
-      const user = res.data.data
-      console.log(user)
-      const birthday = user.birthday ? formatDate(user.birthday, 2) : '2018-01-01';
-      console.log(birthday)
-      this.setData({
-        user: user,
-        date: birthday,
-        sexs: [{
-            value: 2,
-            checked: user.gender === 2 ? true : false,
-            sex: '女'
-          },
-          {
-            value: 1,
-            checked: user.gender === 1 ? true : false,
-            sex: '男'
-          }
-        ],
-        occupations: [{
-            value: '家长',
-            checked: user.profession === '家长' ? true : false
-          },
-          {
-            value: '老师',
-            checked: user.profession === '老师' ? true : false
-          },
-          {
-            value: '学生',
-            checked: user.profession === '学生' ? true : false
-          }
-        ],
-
-      })
-      console.log(this.data.date)
-      if (option.title) {
-        wx.setNavigationBarTitle({
-          title: option.title //页面标题为路由参数
-        });
-        this.setData({
-          title: option.title
-        });
-      }
-      httpRequestApi.userIntoPage('pages/user/myEdit/myEdit','修改资料页面').success((res)=>{
-        
-      })
-    });
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 208
.history/pages/user/myEdit/myEdit_20190123180844.wxss

@@ -1,208 +0,0 @@
-/* page{
-  width: 750rpx;
-  height: 1206rpx;
-  padding-top: 0;
-  background: #F7F7F7;
-} */
-
-.setting-info{
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  padding: 0 17rpx;
-  font-size: 32rpx;
-  color: #5E5E5E;
-  background: #F7F7F7;
-}
-
-.nickname-box{
-  margin-top: 34rpx;
-  width: 716rpx;
-  height: 88rpx;
-  position: relative;
-  box-sizing: border-box;
-  padding: 22rpx 0 22rpx 26rpx;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  border-radius: 12rpx;
-}
-
-.user-action{
-  /* min-width: 100rpx; */
-  /* max-width: 400rpx; */
-  width: 74%;
-}
-
-.nickname{
-  width: 74%;
-}
-
-.setting-title{
-  display: inline-block;
-  width: 145rpx;
-  text-align: center;
-}
-
-.placeholderStyle{
-  font-size: 32rpx;
-  color: #737373;
-}
-
-.edit-img{
-  position: absolute;
-  right:50rpx;
-  top: 24rpx;
-  width: 22rpx;
-  height: 32rpx;
-}
-
-.icon{
-  width: 100%;
-  height: 100%;
-}
-
-.sex-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-}
-
-.school-title,.radio-each,.birthday-title,.occupation-title{
-  margin-right: 30rpx;
-}
-
-.radio-group{
-  display: flex;
-  height: 42rpx;
-  overflow: hidden;
-  /* margin-top: -8rpx; */
-}
-
-/* .sex-title{
-  position: relative;
-  top: 10rpx;
-} */
-
-.radio{
-  margin-right: 50rpx;
-  display: flex;
-  
-}
-
-radio .wx-radio-input.wx-radio-input-checked::before{
-   border-radius: 50%;
-   width: 8rpx; 
-   height: 8rpx; 
-   text-align: center;
-   font-size:0rpx; /* 对勾大小 去掉 */
-   background-color: #FF5E00; 
-   transform:translate(-50%, -50%) scale(1);
-   -webkit-transform:translate(-50%, -50%) scale(1);
-}
-
-radio{
-  margin-left: 20rpx;
-  border-radius: 50%;
-  width: 28rpx;/* 最好是4的倍数,不然会不在中间 */
-  height: 28rpx;
-  border: 4rpx solid #FF8100;/* 设置边框(外圆) */
-  font-size: 0;/* 让边框重合 */
-  margin-top: 6rpx;
-}
-radio .wx-radio-input{
-   border-radius: 50%;
-   width: 28rpx;
-   height: 28rpx; 
-   border: none;/* 替换边框(隐藏原有边框) */
-}
-
-radio .wx-radio-input.wx-radio-input-checked{
-   border: none;
-   background: #f00; 
-}
-
-
-.birthday-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-  position: relative;
-  overflow:hidden;
-
-}
-
-.occupation-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-}
-
-.school-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-  position: relative;
-}
-
-.address{
-  /* width: 420rpx; */
-  /* height: 88rpx; */
-  width: 74%;
-}
-
-.edit-image{
-  position: absolute;
-  right: 50rpx;
-  top: 24rpx;
-  width: 22rpx;
-  height: 32rpx;
-}
-
-.submit-btn{
-  margin-top: 392rpx;
-  width: 716rpx;
-  height: 200rpx;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-
-.btn{
-  font-size: 40rpx;
-  color: #FFFFFF;
-  width: 464rpx;
-  line-height: 80rpx;
-  border-radius: 80rpx;
-  background: #FF9209;
-}
-
-picker {
-  width: 100%;
-}
-
-

+ 0 - 55
.history/pages/user/myEdit/myEdit_20190128180953.wxml

@@ -1,55 +0,0 @@
-<view>
-  <view class='setting-info'>
-    <form bindsubmit="formSubmit" class='form'>
-      <view class='nickname-box'>
-        <text class='setting-title'>宝贝昵称</text>
-        <view class='user-action'>
-          <input name='nickname' class='nickname' type='text' maxlength="9" placeholder='{{user.nickName}}' placeholder-class='placeholderStyle' focus='{{ true }}' value='{{user.nickName}}' bindblur='saveNickName'>
-          </input>
-        </view>
-        <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='sex-box'>
-        <view class='setting-title'>性别</view>
-        <radio-group name='radioGroup1' class="radio-group" bindchange="optionAction">
-          <label class="radio" wx:for="{{ sexs }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.sex }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='birthday-box'>
-        <picker name='picker' mode="date" value="{{ date }}" start="1900-01-01" end="2020-09-01" bindchange="bindDateChange">
-            <view class="picker">
-              <text class='setting-title'>生日</text>
-              <text>{{ date }}</text>
-            </view>
-        </picker>
-         <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='occupation-box'>
-        <text class='setting-title'>职业</text>
-        <radio-group name='radioGroup2' class="radio-group" bindchange="optionSetting">
-          <label class="radio" wx:for="{{ occupations }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.value }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='school-box'>
-        <text class='setting-title'>学校</text>
-        <input name='address' maxlength="14" class='address' type='text' placeholder='{{user.schoolName}}' value='{{ user.schoolName }}' bindblur='saveAddress'></input>
-        <view class='edit-image'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class="submit-btn">
-        <button class='btn' formType="submit">保存</button>
-      </view>
-    </form>
-  </view>
-</view>

+ 0 - 58
.history/pages/user/myEdit/myEdit_20190327140358.wxml

@@ -1,58 +0,0 @@
-<view>
-  <view class='setting-info'>
-    <form bindsubmit="formSubmit" class='form'>
-      <view class="avatarBox">
-        <image src="{{user.avatar}}" class="avatarImage" />
-      </view>
-      <view class='nickname-box'>
-        <text class='setting-title'>宝贝昵称</text>
-        <view class='user-action'>
-          <input name='nickname' class='nickname' type='text' maxlength="9" placeholder='{{user.nickName}}' placeholder-class='placeholderStyle' focus='{{ true }}' value='{{user.nickName}}' bindblur='saveNickName'>
-          </input>
-        </view>
-        <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='sex-box'>
-        <view class='setting-title'>性别</view>
-        <radio-group name='radioGroup1' class="radio-group" bindchange="optionAction">
-          <label class="radio" wx:for="{{ sexs }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.sex }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='birthday-box'>
-        <picker name='picker' mode="date" value="{{ date }}" start="1900-01-01" end="2020-09-01" bindchange="bindDateChange">
-            <view class="picker">
-              <text class='setting-title'>生日</text>
-              <text>{{ date }}</text>
-            </view>
-        </picker>
-         <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='occupation-box'>
-        <text class='setting-title'>职业</text>
-        <radio-group name='radioGroup2' class="radio-group" bindchange="optionSetting">
-          <label class="radio" wx:for="{{ occupations }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.value }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='school-box'>
-        <text class='setting-title'>学校</text>
-        <input name='address' maxlength="14" class='address' type='text' placeholder='{{user.schoolName}}' value='{{ user.schoolName }}' bindblur='saveAddress'></input>
-        <view class='edit-image'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class="submit-btn">
-        <button class='btn' formType="submit">保存</button>
-      </view>
-    </form>
-  </view>
-</view>

+ 0 - 220
.history/pages/user/myEdit/myEdit_20190327140358.wxss

@@ -1,220 +0,0 @@
-/* page{
-  width: 750rpx;
-  height: 1206rpx;
-  padding-top: 0;
-  background: #F7F7F7;
-} */
-
-.setting-info{
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  padding: 0 17rpx;
-  font-size: 32rpx;
-  color: #5E5E5E;
-  background: #F7F7F7;
-}
-
-.nickname-box{
-  margin-top: 34rpx;
-  width: 716rpx;
-  height: 88rpx;
-  position: relative;
-  box-sizing: border-box;
-  padding: 22rpx 0 22rpx 26rpx;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  border-radius: 12rpx;
-}
-
-.user-action{
-  /* min-width: 100rpx; */
-  /* max-width: 400rpx; */
-  width: 74%;
-}
-
-.nickname{
-  width: 74%;
-}
-
-.setting-title{
-  display: inline-block;
-  width: 145rpx;
-  text-align: center;
-}
-
-.placeholderStyle{
-  font-size: 32rpx;
-  color: #737373;
-}
-
-.edit-img{
-  position: absolute;
-  right:50rpx;
-  top: 24rpx;
-  width: 22rpx;
-  height: 32rpx;
-}
-
-.icon{
-  width: 100%;
-  height: 100%;
-}
-
-.sex-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-}
-
-.school-title,.radio-each,.birthday-title,.occupation-title{
-  margin-right: 30rpx;
-}
-
-.radio-group{
-  display: flex;
-  height: 42rpx;
-  overflow: hidden;
-  /* margin-top: -8rpx; */
-}
-
-/* .sex-title{
-  position: relative;
-  top: 10rpx;
-} */
-
-.radio{
-  margin-right: 50rpx;
-  display: flex;
-  
-}
-
-radio .wx-radio-input.wx-radio-input-checked::before{
-   border-radius: 50%;
-   width: 8rpx; 
-   height: 8rpx; 
-   text-align: center;
-   font-size:0rpx; /* 对勾大小 去掉 */
-   background-color: #FF5E00; 
-   transform:translate(-50%, -50%) scale(1);
-   -webkit-transform:translate(-50%, -50%) scale(1);
-}
-
-radio{
-  margin-left: 20rpx;
-  border-radius: 50%;
-  width: 28rpx;/* 最好是4的倍数,不然会不在中间 */
-  height: 28rpx;
-  border: 4rpx solid #FF8100;/* 设置边框(外圆) */
-  font-size: 0;/* 让边框重合 */
-  margin-top: 6rpx;
-}
-radio .wx-radio-input{
-   border-radius: 50%;
-   width: 28rpx;
-   height: 28rpx; 
-   border: none;/* 替换边框(隐藏原有边框) */
-}
-
-radio .wx-radio-input.wx-radio-input-checked{
-   border: none;
-   background: #f00; 
-}
-
-
-.birthday-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-  position: relative;
-  overflow:hidden;
-
-}
-
-.occupation-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-}
-
-.school-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-  position: relative;
-}
-
-.address{
-  /* width: 420rpx; */
-  /* height: 88rpx; */
-  width: 74%;
-}
-
-.edit-image{
-  position: absolute;
-  right: 50rpx;
-  top: 24rpx;
-  width: 22rpx;
-  height: 32rpx;
-}
-
-.submit-btn{
-  margin-top: 392rpx;
-  width: 716rpx;
-  height: 200rpx;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-
-.btn{
-  font-size: 40rpx;
-  color: #FFFFFF;
-  width: 464rpx;
-  line-height: 80rpx;
-  border-radius: 80rpx;
-  background: #FF9209;
-}
-
-picker {
-  width: 100%;
-}
-
-.avatarBox{
-  width: 100%;
-  height: 200rpx;
-  margin: 0 auto;
-}
-.avatarImage{
-  width: 200rpx;
-  height: 200rpx;
-  border-radius: 50%;
-  margin: 0 auto;
-}
-
-

+ 0 - 221
.history/pages/user/myEdit/myEdit_20190327142456.wxss

@@ -1,221 +0,0 @@
-/* page{
-  width: 750rpx;
-  height: 1206rpx;
-  padding-top: 0;
-  background: #F7F7F7;
-} */
-
-.setting-info{
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  padding: 0 17rpx;
-  font-size: 32rpx;
-  color: #5E5E5E;
-  background: #F7F7F7;
-}
-
-.nickname-box{
-  margin-top: 34rpx;
-  width: 716rpx;
-  height: 88rpx;
-  position: relative;
-  box-sizing: border-box;
-  padding: 22rpx 0 22rpx 26rpx;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  border-radius: 12rpx;
-}
-
-.user-action{
-  /* min-width: 100rpx; */
-  /* max-width: 400rpx; */
-  width: 74%;
-}
-
-.nickname{
-  width: 74%;
-}
-
-.setting-title{
-  display: inline-block;
-  width: 145rpx;
-  text-align: center;
-}
-
-.placeholderStyle{
-  font-size: 32rpx;
-  color: #737373;
-}
-
-.edit-img{
-  position: absolute;
-  right:50rpx;
-  top: 24rpx;
-  width: 22rpx;
-  height: 32rpx;
-}
-
-.icon{
-  width: 100%;
-  height: 100%;
-}
-
-.sex-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-}
-
-.school-title,.radio-each,.birthday-title,.occupation-title{
-  margin-right: 30rpx;
-}
-
-.radio-group{
-  display: flex;
-  height: 42rpx;
-  overflow: hidden;
-  /* margin-top: -8rpx; */
-}
-
-/* .sex-title{
-  position: relative;
-  top: 10rpx;
-} */
-
-.radio{
-  margin-right: 50rpx;
-  display: flex;
-  
-}
-
-radio .wx-radio-input.wx-radio-input-checked::before{
-   border-radius: 50%;
-   width: 8rpx; 
-   height: 8rpx; 
-   text-align: center;
-   font-size:0rpx; /* 对勾大小 去掉 */
-   background-color: #FF5E00; 
-   transform:translate(-50%, -50%) scale(1);
-   -webkit-transform:translate(-50%, -50%) scale(1);
-}
-
-radio{
-  margin-left: 20rpx;
-  border-radius: 50%;
-  width: 28rpx;/* 最好是4的倍数,不然会不在中间 */
-  height: 28rpx;
-  border: 4rpx solid #FF8100;/* 设置边框(外圆) */
-  font-size: 0;/* 让边框重合 */
-  margin-top: 6rpx;
-}
-radio .wx-radio-input{
-   border-radius: 50%;
-   width: 28rpx;
-   height: 28rpx; 
-   border: none;/* 替换边框(隐藏原有边框) */
-}
-
-radio .wx-radio-input.wx-radio-input-checked{
-   border: none;
-   background: #f00; 
-}
-
-
-.birthday-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-  position: relative;
-  overflow:hidden;
-
-}
-
-.occupation-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-}
-
-.school-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-  position: relative;
-}
-
-.address{
-  /* width: 420rpx; */
-  /* height: 88rpx; */
-  width: 74%;
-}
-
-.edit-image{
-  position: absolute;
-  right: 50rpx;
-  top: 24rpx;
-  width: 22rpx;
-  height: 32rpx;
-}
-
-.submit-btn{
-  margin-top: 392rpx;
-  width: 716rpx;
-  height: 200rpx;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-
-.btn{
-  font-size: 40rpx;
-  color: #FFFFFF;
-  width: 464rpx;
-  line-height: 80rpx;
-  border-radius: 80rpx;
-  background: #FF9209;
-}
-
-picker {
-  width: 100%;
-}
-
-.avatarBox{
-  width: 100%;
-  height: 200rpx;
-  margin: 0 auto;
-}
-.avatarImage{
-  width: 120rpx;
-  height: 120rpx;
-  border-radius: 50%;
-  margin: 0 auto;
-  display: block;
-}
-
-

+ 0 - 59
.history/pages/user/myEdit/myEdit_20190327142622.wxml

@@ -1,59 +0,0 @@
-<view>
-  <view class='setting-info'>
-    <form bindsubmit="formSubmit" class='form'>
-      <view class="avatarBox">
-        <image src="{{user.avatar}}" class="avatarImage" />
-        <view class="avatar-text">修改头像</view>
-      </view>
-      <view class='nickname-box'>
-        <text class='setting-title'>宝贝昵称</text>
-        <view class='user-action'>
-          <input name='nickname' class='nickname' type='text' maxlength="9" placeholder='{{user.nickName}}' placeholder-class='placeholderStyle' focus='{{ true }}' value='{{user.nickName}}' bindblur='saveNickName'>
-          </input>
-        </view>
-        <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='sex-box'>
-        <view class='setting-title'>性别</view>
-        <radio-group name='radioGroup1' class="radio-group" bindchange="optionAction">
-          <label class="radio" wx:for="{{ sexs }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.sex }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='birthday-box'>
-        <picker name='picker' mode="date" value="{{ date }}" start="1900-01-01" end="2020-09-01" bindchange="bindDateChange">
-            <view class="picker">
-              <text class='setting-title'>生日</text>
-              <text>{{ date }}</text>
-            </view>
-        </picker>
-         <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='occupation-box'>
-        <text class='setting-title'>职业</text>
-        <radio-group name='radioGroup2' class="radio-group" bindchange="optionSetting">
-          <label class="radio" wx:for="{{ occupations }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.value }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='school-box'>
-        <text class='setting-title'>学校</text>
-        <input name='address' maxlength="14" class='address' type='text' placeholder='{{user.schoolName}}' value='{{ user.schoolName }}' bindblur='saveAddress'></input>
-        <view class='edit-image'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class="submit-btn">
-        <button class='btn' formType="submit">保存</button>
-      </view>
-    </form>
-  </view>
-</view>

+ 0 - 227
.history/pages/user/myEdit/myEdit_20190327142622.wxss

@@ -1,227 +0,0 @@
-/* page{
-  width: 750rpx;
-  height: 1206rpx;
-  padding-top: 0;
-  background: #F7F7F7;
-} */
-
-.setting-info{
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  padding: 0 17rpx;
-  font-size: 32rpx;
-  color: #5E5E5E;
-  background: #F7F7F7;
-}
-
-.nickname-box{
-  margin-top: 34rpx;
-  width: 716rpx;
-  height: 88rpx;
-  position: relative;
-  box-sizing: border-box;
-  padding: 22rpx 0 22rpx 26rpx;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  border-radius: 12rpx;
-}
-
-.user-action{
-  /* min-width: 100rpx; */
-  /* max-width: 400rpx; */
-  width: 74%;
-}
-
-.nickname{
-  width: 74%;
-}
-
-.setting-title{
-  display: inline-block;
-  width: 145rpx;
-  text-align: center;
-}
-
-.placeholderStyle{
-  font-size: 32rpx;
-  color: #737373;
-}
-
-.edit-img{
-  position: absolute;
-  right:50rpx;
-  top: 24rpx;
-  width: 22rpx;
-  height: 32rpx;
-}
-
-.icon{
-  width: 100%;
-  height: 100%;
-}
-
-.sex-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-}
-
-.school-title,.radio-each,.birthday-title,.occupation-title{
-  margin-right: 30rpx;
-}
-
-.radio-group{
-  display: flex;
-  height: 42rpx;
-  overflow: hidden;
-  /* margin-top: -8rpx; */
-}
-
-/* .sex-title{
-  position: relative;
-  top: 10rpx;
-} */
-
-.radio{
-  margin-right: 50rpx;
-  display: flex;
-  
-}
-
-radio .wx-radio-input.wx-radio-input-checked::before{
-   border-radius: 50%;
-   width: 8rpx; 
-   height: 8rpx; 
-   text-align: center;
-   font-size:0rpx; /* 对勾大小 去掉 */
-   background-color: #FF5E00; 
-   transform:translate(-50%, -50%) scale(1);
-   -webkit-transform:translate(-50%, -50%) scale(1);
-}
-
-radio{
-  margin-left: 20rpx;
-  border-radius: 50%;
-  width: 28rpx;/* 最好是4的倍数,不然会不在中间 */
-  height: 28rpx;
-  border: 4rpx solid #FF8100;/* 设置边框(外圆) */
-  font-size: 0;/* 让边框重合 */
-  margin-top: 6rpx;
-}
-radio .wx-radio-input{
-   border-radius: 50%;
-   width: 28rpx;
-   height: 28rpx; 
-   border: none;/* 替换边框(隐藏原有边框) */
-}
-
-radio .wx-radio-input.wx-radio-input-checked{
-   border: none;
-   background: #f00; 
-}
-
-
-.birthday-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-  position: relative;
-  overflow:hidden;
-
-}
-
-.occupation-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-}
-
-.school-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-  position: relative;
-}
-
-.address{
-  /* width: 420rpx; */
-  /* height: 88rpx; */
-  width: 74%;
-}
-
-.edit-image{
-  position: absolute;
-  right: 50rpx;
-  top: 24rpx;
-  width: 22rpx;
-  height: 32rpx;
-}
-
-.submit-btn{
-  margin-top: 392rpx;
-  width: 716rpx;
-  height: 200rpx;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-
-.btn{
-  font-size: 40rpx;
-  color: #FFFFFF;
-  width: 464rpx;
-  line-height: 80rpx;
-  border-radius: 80rpx;
-  background: #FF9209;
-}
-
-picker {
-  width: 100%;
-}
-
-.avatarBox{
-  width: 100%;
-  height: 200rpx;
-  margin: 0 auto;
-}
-.avatarImage{
-  width: 120rpx;
-  height: 120rpx;
-  border-radius: 50%;
-  margin: 0 auto;
-  display: block;
-  margin-top: 30rpx;
-}
-.avatar-text{
-  width: 100%;
-  font-size: 28rpx;
-  color: #444;
-  text-align: center;
-}
-

+ 0 - 228
.history/pages/user/myEdit/myEdit_20190327143355.wxss

@@ -1,228 +0,0 @@
-/* page{
-  width: 750rpx;
-  height: 1206rpx;
-  padding-top: 0;
-  background: #F7F7F7;
-} */
-
-.setting-info{
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  padding: 0 17rpx;
-  font-size: 32rpx;
-  color: #5E5E5E;
-  background: #F7F7F7;
-}
-
-.nickname-box{
-  margin-top: 34rpx;
-  width: 716rpx;
-  height: 88rpx;
-  position: relative;
-  box-sizing: border-box;
-  padding: 22rpx 0 22rpx 26rpx;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  border-radius: 12rpx;
-}
-
-.user-action{
-  /* min-width: 100rpx; */
-  /* max-width: 400rpx; */
-  width: 74%;
-}
-
-.nickname{
-  width: 74%;
-}
-
-.setting-title{
-  display: inline-block;
-  width: 145rpx;
-  text-align: center;
-}
-
-.placeholderStyle{
-  font-size: 32rpx;
-  color: #737373;
-}
-
-.edit-img{
-  position: absolute;
-  right:50rpx;
-  top: 24rpx;
-  width: 22rpx;
-  height: 32rpx;
-}
-
-.icon{
-  width: 100%;
-  height: 100%;
-}
-
-.sex-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-}
-
-.school-title,.radio-each,.birthday-title,.occupation-title{
-  margin-right: 30rpx;
-}
-
-.radio-group{
-  display: flex;
-  height: 42rpx;
-  overflow: hidden;
-  /* margin-top: -8rpx; */
-}
-
-/* .sex-title{
-  position: relative;
-  top: 10rpx;
-} */
-
-.radio{
-  margin-right: 50rpx;
-  display: flex;
-  
-}
-
-radio .wx-radio-input.wx-radio-input-checked::before{
-   border-radius: 50%;
-   width: 8rpx; 
-   height: 8rpx; 
-   text-align: center;
-   font-size:0rpx; /* 对勾大小 去掉 */
-   background-color: #FF5E00; 
-   transform:translate(-50%, -50%) scale(1);
-   -webkit-transform:translate(-50%, -50%) scale(1);
-}
-
-radio{
-  margin-left: 20rpx;
-  border-radius: 50%;
-  width: 28rpx;/* 最好是4的倍数,不然会不在中间 */
-  height: 28rpx;
-  border: 4rpx solid #FF8100;/* 设置边框(外圆) */
-  font-size: 0;/* 让边框重合 */
-  margin-top: 6rpx;
-}
-radio .wx-radio-input{
-   border-radius: 50%;
-   width: 28rpx;
-   height: 28rpx; 
-   border: none;/* 替换边框(隐藏原有边框) */
-}
-
-radio .wx-radio-input.wx-radio-input-checked{
-   border: none;
-   background: #f00; 
-}
-
-
-.birthday-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-  position: relative;
-  overflow:hidden;
-
-}
-
-.occupation-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-}
-
-.school-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-  position: relative;
-}
-
-.address{
-  /* width: 420rpx; */
-  /* height: 88rpx; */
-  width: 74%;
-}
-
-.edit-image{
-  position: absolute;
-  right: 50rpx;
-  top: 24rpx;
-  width: 22rpx;
-  height: 32rpx;
-}
-
-.submit-btn{
-  margin-top: 392rpx;
-  width: 716rpx;
-  height: 200rpx;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-
-.btn{
-  font-size: 40rpx;
-  color: #FFFFFF;
-  width: 464rpx;
-  line-height: 80rpx;
-  border-radius: 80rpx;
-  background: #FF9209;
-}
-
-picker {
-  width: 100%;
-}
-
-.avatarBox{
-  width: 100%;
-  height: 200rpx;
-  margin: 0 auto;
-}
-.avatarImage{
-  width: 120rpx;
-  height: 120rpx;
-  border-radius: 50%;
-  margin: 0 auto;
-  display: block;
-  margin-top: 30rpx;
-}
-.avatar-text{
-  width: 100%;
-  font-size: 34rpx;
-  color: #444;
-  text-align: center;
-  margin-top: 24rpx;
-}
-

+ 0 - 196
.history/pages/user/myEdit/myEdit_20190327145648.js

@@ -1,196 +0,0 @@
-import httpRequestApi from '../../../utils/APIClient';
-import {
-  formatDate
-} from '../../../utils/util';
-Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    user: {},
-    sexs: [],
-    occupations: [],
-    date: '',
-    msg: '',
-    nickname: ''
-  },
-  saveNickName: function (e) {
-    let nickname = e.detail.value;
-    this.setData({
-      nicename: nickname
-    });
-  },
-  saveAddress: function (e) {
-    let msg = e.detail.value;
-    this.setData({
-      msg: msg
-    });
-  },
-  bindDateChange: function (e) {
-    console.log(e.detail.value)
-    this.setData({
-      date: e.detail.value
-    });
-  },
-  optionAction: function (e) {
-    console.log(e.detail.value);
-  },
-  optionSetting: function (e) {
-    console.log(e.detail.value);
-  },
-  changeAvatar: function(e){
-    wx.chooseImage({
-      count: 1,
-      sizeType: ['original', 'compressed'],
-      sourceType: ['album', 'camera'],
-      success(res) {
-        // tempFilePath可以作为img标签的src属性显示图片
-        const tempFilePaths = res.tempFilePaths
-        wx.uploadFile({
-          url: 'https://reader.lingjiao.cn/readerBase/file/upload',
-          filePath: tempFilePaths,
-          name: '头像',
-          header: {
-              uid: wx.getStorageSync('uid')
-          },
-          success: (res) => {
-              console.log(res)
-          }
-
-      })
-      }
-    })
-  },
-  formSubmit: function (e) {
-    console.log(e.detail.value)
-    if(e.detail.value.nickname === ''){
-      return false
-    }
-    // const uid = wx.getStorageSync('uid');
-    const data = {
-      nickName: e.detail.value.nickname || '',
-      mobile: '',
-      gender: e.detail.value.radioGroup1,
-      schoolProvince: '',
-      schoolCity: '',
-      schoolName: e.detail.value.address || '',
-      profession: e.detail.value.radioGroup2 || '',
-      birthday: e.detail.value.picker || ''
-    }
-    httpRequestApi.settingUserInfo(data).success(res => {
-      console.log(res.data.data); //修改资料成功后 调用 getUserInfo
-      // wx.redirectTo({
-      //   url: '/pages/index/index?index=3'
-      // });
-      wx.setStorageSync('user',res.data.data);
-      wx.navigateBack({
-        delta: 1
-      })
-    });
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  getUserInfo: function () {
-
-  },
-  onLoad: function (option) {
-    httpRequestApi.getUserInfo().success(res => {
-      const user = res.data.data
-      console.log(user)
-      const birthday = user.birthday ? formatDate(user.birthday, 2) : '2018-01-01';
-      console.log(birthday)
-      this.setData({
-        user: user,
-        date: birthday,
-        sexs: [{
-            value: 2,
-            checked: user.gender === 2 ? true : false,
-            sex: '女'
-          },
-          {
-            value: 1,
-            checked: user.gender === 1 ? true : false,
-            sex: '男'
-          }
-        ],
-        occupations: [{
-            value: '家长',
-            checked: user.profession === '家长' ? true : false
-          },
-          {
-            value: '老师',
-            checked: user.profession === '老师' ? true : false
-          },
-          {
-            value: '学生',
-            checked: user.profession === '学生' ? true : false
-          }
-        ],
-
-      })
-      console.log(this.data.date)
-      if (option.title) {
-        wx.setNavigationBarTitle({
-          title: option.title //页面标题为路由参数
-        });
-        this.setData({
-          title: option.title
-        });
-      }
-      httpRequestApi.userIntoPage('pages/user/myEdit/myEdit','修改资料页面').success((res)=>{
-        
-      })
-    });
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 59
.history/pages/user/myEdit/myEdit_20190327145648.wxml

@@ -1,59 +0,0 @@
-<view>
-  <view class='setting-info'>
-    <form bindsubmit="formSubmit" class='form'>
-      <view class="avatarBox" bindtap="changeAvatar">
-        <image src="{{user.avatar}}" class="avatarImage" />
-        <view class="avatar-text">修改头像</view>
-      </view>
-      <view class='nickname-box'>
-        <text class='setting-title'>宝贝昵称</text>
-        <view class='user-action'>
-          <input name='nickname' class='nickname' type='text' maxlength="9" placeholder='{{user.nickName}}' placeholder-class='placeholderStyle' focus='{{ true }}' value='{{user.nickName}}' bindblur='saveNickName'>
-          </input>
-        </view>
-        <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='sex-box'>
-        <view class='setting-title'>性别</view>
-        <radio-group name='radioGroup1' class="radio-group" bindchange="optionAction">
-          <label class="radio" wx:for="{{ sexs }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.sex }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='birthday-box'>
-        <picker name='picker' mode="date" value="{{ date }}" start="1900-01-01" end="2020-09-01" bindchange="bindDateChange">
-            <view class="picker">
-              <text class='setting-title'>生日</text>
-              <text>{{ date }}</text>
-            </view>
-        </picker>
-         <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='occupation-box'>
-        <text class='setting-title'>职业</text>
-        <radio-group name='radioGroup2' class="radio-group" bindchange="optionSetting">
-          <label class="radio" wx:for="{{ occupations }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.value }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='school-box'>
-        <text class='setting-title'>学校</text>
-        <input name='address' maxlength="14" class='address' type='text' placeholder='{{user.schoolName}}' value='{{ user.schoolName }}' bindblur='saveAddress'></input>
-        <view class='edit-image'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class="submit-btn">
-        <button class='btn' formType="submit">保存</button>
-      </view>
-    </form>
-  </view>
-</view>

+ 0 - 196
.history/pages/user/myEdit/myEdit_20190327151305.js

@@ -1,196 +0,0 @@
-import httpRequestApi from '../../../utils/APIClient';
-import {
-  formatDate
-} from '../../../utils/util';
-Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    user: {},
-    sexs: [],
-    occupations: [],
-    date: '',
-    msg: '',
-    nickname: ''
-  },
-  saveNickName: function (e) {
-    let nickname = e.detail.value;
-    this.setData({
-      nicename: nickname
-    });
-  },
-  saveAddress: function (e) {
-    let msg = e.detail.value;
-    this.setData({
-      msg: msg
-    });
-  },
-  bindDateChange: function (e) {
-    console.log(e.detail.value)
-    this.setData({
-      date: e.detail.value
-    });
-  },
-  optionAction: function (e) {
-    console.log(e.detail.value);
-  },
-  optionSetting: function (e) {
-    console.log(e.detail.value);
-  },
-  changeAvatar: function(e){
-    wx.chooseImage({
-      count: 1,
-      sizeType: ['original', 'compressed'],
-      sourceType: ['album', 'camera'],
-      success(res) {
-        // tempFilePath可以作为img标签的src属性显示图片
-        const tempFilePaths = res.tempFilePaths
-        console.log(tempFilePaths)
-      //   wx.uploadFile({
-      //     url: 'https://reader.lingjiao.cn/readerBase/file/upload',
-      //     filePath: tempFilePaths,
-      //     name: '头像',
-      //     header: {
-      //         uid: wx.getStorageSync('uid')
-      //     },
-      //     success: (res) => {
-      //         console.log(res)
-      //     }
-      // })
-      }
-    })
-  },
-  formSubmit: function (e) {
-    console.log(e.detail.value)
-    if(e.detail.value.nickname === ''){
-      return false
-    }
-    // const uid = wx.getStorageSync('uid');
-    const data = {
-      nickName: e.detail.value.nickname || '',
-      mobile: '',
-      gender: e.detail.value.radioGroup1,
-      schoolProvince: '',
-      schoolCity: '',
-      schoolName: e.detail.value.address || '',
-      profession: e.detail.value.radioGroup2 || '',
-      birthday: e.detail.value.picker || ''
-    }
-    httpRequestApi.settingUserInfo(data).success(res => {
-      console.log(res.data.data); //修改资料成功后 调用 getUserInfo
-      // wx.redirectTo({
-      //   url: '/pages/index/index?index=3'
-      // });
-      wx.setStorageSync('user',res.data.data);
-      wx.navigateBack({
-        delta: 1
-      })
-    });
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  getUserInfo: function () {
-
-  },
-  onLoad: function (option) {
-    httpRequestApi.getUserInfo().success(res => {
-      const user = res.data.data
-      console.log(user)
-      const birthday = user.birthday ? formatDate(user.birthday, 2) : '2018-01-01';
-      console.log(birthday)
-      this.setData({
-        user: user,
-        date: birthday,
-        sexs: [{
-            value: 2,
-            checked: user.gender === 2 ? true : false,
-            sex: '女'
-          },
-          {
-            value: 1,
-            checked: user.gender === 1 ? true : false,
-            sex: '男'
-          }
-        ],
-        occupations: [{
-            value: '家长',
-            checked: user.profession === '家长' ? true : false
-          },
-          {
-            value: '老师',
-            checked: user.profession === '老师' ? true : false
-          },
-          {
-            value: '学生',
-            checked: user.profession === '学生' ? true : false
-          }
-        ],
-
-      })
-      console.log(this.data.date)
-      if (option.title) {
-        wx.setNavigationBarTitle({
-          title: option.title //页面标题为路由参数
-        });
-        this.setData({
-          title: option.title
-        });
-      }
-      httpRequestApi.userIntoPage('pages/user/myEdit/myEdit','修改资料页面').success((res)=>{
-        
-      })
-    });
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 196
.history/pages/user/myEdit/myEdit_20190327151535.js

@@ -1,196 +0,0 @@
-import httpRequestApi from '../../../utils/APIClient';
-import {
-  formatDate
-} from '../../../utils/util';
-Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    user: {},
-    sexs: [],
-    occupations: [],
-    date: '',
-    msg: '',
-    nickname: ''
-  },
-  saveNickName: function (e) {
-    let nickname = e.detail.value;
-    this.setData({
-      nicename: nickname
-    });
-  },
-  saveAddress: function (e) {
-    let msg = e.detail.value;
-    this.setData({
-      msg: msg
-    });
-  },
-  bindDateChange: function (e) {
-    console.log(e.detail.value)
-    this.setData({
-      date: e.detail.value
-    });
-  },
-  optionAction: function (e) {
-    console.log(e.detail.value);
-  },
-  optionSetting: function (e) {
-    console.log(e.detail.value);
-  },
-  changeAvatar: function(e){
-    wx.chooseImage({
-      count: 1,
-      sizeType: ['original', 'compressed'],
-      sourceType: ['album', 'camera'],
-      success(res) {
-        // tempFilePath可以作为img标签的src属性显示图片
-        const localImage = res.tempFilePaths[0];
-        
-        wx.uploadFile({
-          url: 'https://reader.lingjiao.cn/readerBase/file/upload',
-          filePath: tempFilePaths,
-          name: '头像',
-          header: {
-              uid: wx.getStorageSync('uid')
-          },
-          success: (res) => {
-              console.log(res)
-          }
-      })
-      }
-    })
-  },
-  formSubmit: function (e) {
-    console.log(e.detail.value)
-    if(e.detail.value.nickname === ''){
-      return false
-    }
-    // const uid = wx.getStorageSync('uid');
-    const data = {
-      nickName: e.detail.value.nickname || '',
-      mobile: '',
-      gender: e.detail.value.radioGroup1,
-      schoolProvince: '',
-      schoolCity: '',
-      schoolName: e.detail.value.address || '',
-      profession: e.detail.value.radioGroup2 || '',
-      birthday: e.detail.value.picker || ''
-    }
-    httpRequestApi.settingUserInfo(data).success(res => {
-      console.log(res.data.data); //修改资料成功后 调用 getUserInfo
-      // wx.redirectTo({
-      //   url: '/pages/index/index?index=3'
-      // });
-      wx.setStorageSync('user',res.data.data);
-      wx.navigateBack({
-        delta: 1
-      })
-    });
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  getUserInfo: function () {
-
-  },
-  onLoad: function (option) {
-    httpRequestApi.getUserInfo().success(res => {
-      const user = res.data.data
-      console.log(user)
-      const birthday = user.birthday ? formatDate(user.birthday, 2) : '2018-01-01';
-      console.log(birthday)
-      this.setData({
-        user: user,
-        date: birthday,
-        sexs: [{
-            value: 2,
-            checked: user.gender === 2 ? true : false,
-            sex: '女'
-          },
-          {
-            value: 1,
-            checked: user.gender === 1 ? true : false,
-            sex: '男'
-          }
-        ],
-        occupations: [{
-            value: '家长',
-            checked: user.profession === '家长' ? true : false
-          },
-          {
-            value: '老师',
-            checked: user.profession === '老师' ? true : false
-          },
-          {
-            value: '学生',
-            checked: user.profession === '学生' ? true : false
-          }
-        ],
-
-      })
-      console.log(this.data.date)
-      if (option.title) {
-        wx.setNavigationBarTitle({
-          title: option.title //页面标题为路由参数
-        });
-        this.setData({
-          title: option.title
-        });
-      }
-      httpRequestApi.userIntoPage('pages/user/myEdit/myEdit','修改资料页面').success((res)=>{
-        
-      })
-    });
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 199
.history/pages/user/myEdit/myEdit_20190327151604.js

@@ -1,199 +0,0 @@
-import httpRequestApi from '../../../utils/APIClient';
-import {
-  formatDate
-} from '../../../utils/util';
-Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    user: {},
-    sexs: [],
-    occupations: [],
-    date: '',
-    msg: '',
-    nickname: ''
-  },
-  saveNickName: function (e) {
-    let nickname = e.detail.value;
-    this.setData({
-      nicename: nickname
-    });
-  },
-  saveAddress: function (e) {
-    let msg = e.detail.value;
-    this.setData({
-      msg: msg
-    });
-  },
-  bindDateChange: function (e) {
-    console.log(e.detail.value)
-    this.setData({
-      date: e.detail.value
-    });
-  },
-  optionAction: function (e) {
-    console.log(e.detail.value);
-  },
-  optionSetting: function (e) {
-    console.log(e.detail.value);
-  },
-  changeAvatar: function(e){
-    wx.chooseImage({
-      count: 1,
-      sizeType: ['original', 'compressed'],
-      sourceType: ['album', 'camera'],
-      success(res) {
-        // tempFilePath可以作为img标签的src属性显示图片
-        const localImage = res.tempFilePaths[0];
-        // const str = 'user.avatar'
-        // this.setData({
-        //   [str]: localImage
-        // })
-        wx.uploadFile({
-          url: 'https://reader.lingjiao.cn/readerBase/file/upload',
-          filePath: localImage,
-          name: '头像',
-          header: {
-              uid: wx.getStorageSync('uid')
-          },
-          success: (res) => {
-              console.log(res)
-          }
-      })
-      }
-    })
-  },
-  formSubmit: function (e) {
-    console.log(e.detail.value)
-    if(e.detail.value.nickname === ''){
-      return false
-    }
-    // const uid = wx.getStorageSync('uid');
-    const data = {
-      nickName: e.detail.value.nickname || '',
-      mobile: '',
-      gender: e.detail.value.radioGroup1,
-      schoolProvince: '',
-      schoolCity: '',
-      schoolName: e.detail.value.address || '',
-      profession: e.detail.value.radioGroup2 || '',
-      birthday: e.detail.value.picker || ''
-    }
-    httpRequestApi.settingUserInfo(data).success(res => {
-      console.log(res.data.data); //修改资料成功后 调用 getUserInfo
-      // wx.redirectTo({
-      //   url: '/pages/index/index?index=3'
-      // });
-      wx.setStorageSync('user',res.data.data);
-      wx.navigateBack({
-        delta: 1
-      })
-    });
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  getUserInfo: function () {
-
-  },
-  onLoad: function (option) {
-    httpRequestApi.getUserInfo().success(res => {
-      const user = res.data.data
-      console.log(user)
-      const birthday = user.birthday ? formatDate(user.birthday, 2) : '2018-01-01';
-      console.log(birthday)
-      this.setData({
-        user: user,
-        date: birthday,
-        sexs: [{
-            value: 2,
-            checked: user.gender === 2 ? true : false,
-            sex: '女'
-          },
-          {
-            value: 1,
-            checked: user.gender === 1 ? true : false,
-            sex: '男'
-          }
-        ],
-        occupations: [{
-            value: '家长',
-            checked: user.profession === '家长' ? true : false
-          },
-          {
-            value: '老师',
-            checked: user.profession === '老师' ? true : false
-          },
-          {
-            value: '学生',
-            checked: user.profession === '学生' ? true : false
-          }
-        ],
-
-      })
-      console.log(this.data.date)
-      if (option.title) {
-        wx.setNavigationBarTitle({
-          title: option.title //页面标题为路由参数
-        });
-        this.setData({
-          title: option.title
-        });
-      }
-      httpRequestApi.userIntoPage('pages/user/myEdit/myEdit','修改资料页面').success((res)=>{
-        
-      })
-    });
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 199
.history/pages/user/myEdit/myEdit_20190327151715.js

@@ -1,199 +0,0 @@
-import httpRequestApi from '../../../utils/APIClient';
-import {
-  formatDate
-} from '../../../utils/util';
-Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    user: {},
-    sexs: [],
-    occupations: [],
-    date: '',
-    msg: '',
-    nickname: ''
-  },
-  saveNickName: function (e) {
-    let nickname = e.detail.value;
-    this.setData({
-      nicename: nickname
-    });
-  },
-  saveAddress: function (e) {
-    let msg = e.detail.value;
-    this.setData({
-      msg: msg
-    });
-  },
-  bindDateChange: function (e) {
-    console.log(e.detail.value)
-    this.setData({
-      date: e.detail.value
-    });
-  },
-  optionAction: function (e) {
-    console.log(e.detail.value);
-  },
-  optionSetting: function (e) {
-    console.log(e.detail.value);
-  },
-  changeAvatar: function(e){
-    wx.chooseImage({
-      count: 1,
-      sizeType: ['original', 'compressed'],
-      sourceType: ['album', 'camera'],
-      success(res) {
-        // tempFilePath可以作为img标签的src属性显示图片
-        const localImage = res.tempFilePaths[0];
-        // const str = 'user.avatar'
-        // this.setData({
-        //   [str]: localImage
-        // })
-        wx.uploadFile({
-          url: 'https://readertest.lingjiao.cn/readerBase/file/upload',
-          filePath: localImage,
-          name: '头像',
-          header: {
-              uid: wx.getStorageSync('uid')
-          },
-          success: (res) => {
-              console.log(res)
-          }
-      })
-      }
-    })
-  },
-  formSubmit: function (e) {
-    console.log(e.detail.value)
-    if(e.detail.value.nickname === ''){
-      return false
-    }
-    // const uid = wx.getStorageSync('uid');
-    const data = {
-      nickName: e.detail.value.nickname || '',
-      mobile: '',
-      gender: e.detail.value.radioGroup1,
-      schoolProvince: '',
-      schoolCity: '',
-      schoolName: e.detail.value.address || '',
-      profession: e.detail.value.radioGroup2 || '',
-      birthday: e.detail.value.picker || ''
-    }
-    httpRequestApi.settingUserInfo(data).success(res => {
-      console.log(res.data.data); //修改资料成功后 调用 getUserInfo
-      // wx.redirectTo({
-      //   url: '/pages/index/index?index=3'
-      // });
-      wx.setStorageSync('user',res.data.data);
-      wx.navigateBack({
-        delta: 1
-      })
-    });
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  getUserInfo: function () {
-
-  },
-  onLoad: function (option) {
-    httpRequestApi.getUserInfo().success(res => {
-      const user = res.data.data
-      console.log(user)
-      const birthday = user.birthday ? formatDate(user.birthday, 2) : '2018-01-01';
-      console.log(birthday)
-      this.setData({
-        user: user,
-        date: birthday,
-        sexs: [{
-            value: 2,
-            checked: user.gender === 2 ? true : false,
-            sex: '女'
-          },
-          {
-            value: 1,
-            checked: user.gender === 1 ? true : false,
-            sex: '男'
-          }
-        ],
-        occupations: [{
-            value: '家长',
-            checked: user.profession === '家长' ? true : false
-          },
-          {
-            value: '老师',
-            checked: user.profession === '老师' ? true : false
-          },
-          {
-            value: '学生',
-            checked: user.profession === '学生' ? true : false
-          }
-        ],
-
-      })
-      console.log(this.data.date)
-      if (option.title) {
-        wx.setNavigationBarTitle({
-          title: option.title //页面标题为路由参数
-        });
-        this.setData({
-          title: option.title
-        });
-      }
-      httpRequestApi.userIntoPage('pages/user/myEdit/myEdit','修改资料页面').success((res)=>{
-        
-      })
-    });
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 199
.history/pages/user/myEdit/myEdit_20190327151800.js

@@ -1,199 +0,0 @@
-import httpRequestApi from '../../../utils/APIClient';
-import {
-  formatDate
-} from '../../../utils/util';
-Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    user: {},
-    sexs: [],
-    occupations: [],
-    date: '',
-    msg: '',
-    nickname: ''
-  },
-  saveNickName: function (e) {
-    let nickname = e.detail.value;
-    this.setData({
-      nicename: nickname
-    });
-  },
-  saveAddress: function (e) {
-    let msg = e.detail.value;
-    this.setData({
-      msg: msg
-    });
-  },
-  bindDateChange: function (e) {
-    console.log(e.detail.value)
-    this.setData({
-      date: e.detail.value
-    });
-  },
-  optionAction: function (e) {
-    console.log(e.detail.value);
-  },
-  optionSetting: function (e) {
-    console.log(e.detail.value);
-  },
-  changeAvatar: function(e){
-    wx.chooseImage({
-      count: 1,
-      sizeType: ['original', 'compressed'],
-      sourceType: ['album', 'camera'],
-      success(res) {
-        // tempFilePath可以作为img标签的src属性显示图片
-        const localImage = res.tempFilePaths[0];
-        // const str = 'user.avatar'
-        // this.setData({
-        //   [str]: localImage
-        // })
-        wx.uploadFile({
-          url: 'https://readertest.lingjiao.cn/readerBase/file/upload',
-          filePath: localImage,
-          name: '头像',
-          header: {
-              uid: wx.getStorageSync('uid')
-          },
-          success: (res) => {
-              console.log(JSON.parse(res.data))
-          }
-      })
-      }
-    })
-  },
-  formSubmit: function (e) {
-    console.log(e.detail.value)
-    if(e.detail.value.nickname === ''){
-      return false
-    }
-    // const uid = wx.getStorageSync('uid');
-    const data = {
-      nickName: e.detail.value.nickname || '',
-      mobile: '',
-      gender: e.detail.value.radioGroup1,
-      schoolProvince: '',
-      schoolCity: '',
-      schoolName: e.detail.value.address || '',
-      profession: e.detail.value.radioGroup2 || '',
-      birthday: e.detail.value.picker || ''
-    }
-    httpRequestApi.settingUserInfo(data).success(res => {
-      console.log(res.data.data); //修改资料成功后 调用 getUserInfo
-      // wx.redirectTo({
-      //   url: '/pages/index/index?index=3'
-      // });
-      wx.setStorageSync('user',res.data.data);
-      wx.navigateBack({
-        delta: 1
-      })
-    });
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  getUserInfo: function () {
-
-  },
-  onLoad: function (option) {
-    httpRequestApi.getUserInfo().success(res => {
-      const user = res.data.data
-      console.log(user)
-      const birthday = user.birthday ? formatDate(user.birthday, 2) : '2018-01-01';
-      console.log(birthday)
-      this.setData({
-        user: user,
-        date: birthday,
-        sexs: [{
-            value: 2,
-            checked: user.gender === 2 ? true : false,
-            sex: '女'
-          },
-          {
-            value: 1,
-            checked: user.gender === 1 ? true : false,
-            sex: '男'
-          }
-        ],
-        occupations: [{
-            value: '家长',
-            checked: user.profession === '家长' ? true : false
-          },
-          {
-            value: '老师',
-            checked: user.profession === '老师' ? true : false
-          },
-          {
-            value: '学生',
-            checked: user.profession === '学生' ? true : false
-          }
-        ],
-
-      })
-      console.log(this.data.date)
-      if (option.title) {
-        wx.setNavigationBarTitle({
-          title: option.title //页面标题为路由参数
-        });
-        this.setData({
-          title: option.title
-        });
-      }
-      httpRequestApi.userIntoPage('pages/user/myEdit/myEdit','修改资料页面').success((res)=>{
-        
-      })
-    });
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 201
.history/pages/user/myEdit/myEdit_20190327152518.js

@@ -1,201 +0,0 @@
-import httpRequestApi from '../../../utils/APIClient';
-import {
-  formatDate
-} from '../../../utils/util';
-Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    user: {},
-    sexs: [],
-    occupations: [],
-    date: '',
-    msg: '',
-    nickname: ''
-  },
-  saveNickName: function (e) {
-    let nickname = e.detail.value;
-    this.setData({
-      nicename: nickname
-    });
-  },
-  saveAddress: function (e) {
-    let msg = e.detail.value;
-    this.setData({
-      msg: msg
-    });
-  },
-  bindDateChange: function (e) {
-    console.log(e.detail.value)
-    this.setData({
-      date: e.detail.value
-    });
-  },
-  optionAction: function (e) {
-    console.log(e.detail.value);
-  },
-  optionSetting: function (e) {
-    console.log(e.detail.value);
-  },
-  changeAvatar: function(e){
-    wx.chooseImage({
-      count: 1,
-      sizeType: ['compressed'],
-      sourceType: ['album', 'camera'],
-      success(res) {
-        // tempFilePath可以作为img标签的src属性显示图片
-        const localImage = res.tempFilePaths[0];
-        // const str = 'user.avatar'
-        // this.setData({
-        //   [str]: localImage
-        // })
-        wx.uploadFile({
-          url: 'https://readertest.lingjiao.cn/readerBase/file/upload',
-          filePath: localImage,
-          name: '头像',
-          header: {
-              uid: wx.getStorageSync('uid')
-          },
-          success: (res) => {
-              // console.log(JSON.parse(res.data));
-              const newAvatar = JSON.parse(res.data).data;
-              console.log(newAvatar)
-          }
-      })
-      }
-    })
-  },
-  formSubmit: function (e) {
-    console.log(e.detail.value)
-    if(e.detail.value.nickname === ''){
-      return false
-    }
-    // const uid = wx.getStorageSync('uid');
-    const data = {
-      nickName: e.detail.value.nickname || '',
-      mobile: '',
-      gender: e.detail.value.radioGroup1,
-      schoolProvince: '',
-      schoolCity: '',
-      schoolName: e.detail.value.address || '',
-      profession: e.detail.value.radioGroup2 || '',
-      birthday: e.detail.value.picker || ''
-    }
-    httpRequestApi.settingUserInfo(data).success(res => {
-      console.log(res.data.data); //修改资料成功后 调用 getUserInfo
-      // wx.redirectTo({
-      //   url: '/pages/index/index?index=3'
-      // });
-      wx.setStorageSync('user',res.data.data);
-      wx.navigateBack({
-        delta: 1
-      })
-    });
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  getUserInfo: function () {
-
-  },
-  onLoad: function (option) {
-    httpRequestApi.getUserInfo().success(res => {
-      const user = res.data.data
-      console.log(user)
-      const birthday = user.birthday ? formatDate(user.birthday, 2) : '2018-01-01';
-      console.log(birthday)
-      this.setData({
-        user: user,
-        date: birthday,
-        sexs: [{
-            value: 2,
-            checked: user.gender === 2 ? true : false,
-            sex: '女'
-          },
-          {
-            value: 1,
-            checked: user.gender === 1 ? true : false,
-            sex: '男'
-          }
-        ],
-        occupations: [{
-            value: '家长',
-            checked: user.profession === '家长' ? true : false
-          },
-          {
-            value: '老师',
-            checked: user.profession === '老师' ? true : false
-          },
-          {
-            value: '学生',
-            checked: user.profession === '学生' ? true : false
-          }
-        ],
-
-      })
-      console.log(this.data.date)
-      if (option.title) {
-        wx.setNavigationBarTitle({
-          title: option.title //页面标题为路由参数
-        });
-        this.setData({
-          title: option.title
-        });
-      }
-      httpRequestApi.userIntoPage('pages/user/myEdit/myEdit','修改资料页面').success((res)=>{
-        
-      })
-    });
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 200
.history/pages/user/myEdit/myEdit_20190327152604.js

@@ -1,200 +0,0 @@
-import httpRequestApi from '../../../utils/APIClient';
-import {
-  formatDate
-} from '../../../utils/util';
-Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    user: {},
-    sexs: [],
-    occupations: [],
-    date: '',
-    msg: '',
-    nickname: ''
-  },
-  saveNickName: function (e) {
-    let nickname = e.detail.value;
-    this.setData({
-      nicename: nickname
-    });
-  },
-  saveAddress: function (e) {
-    let msg = e.detail.value;
-    this.setData({
-      msg: msg
-    });
-  },
-  bindDateChange: function (e) {
-    console.log(e.detail.value)
-    this.setData({
-      date: e.detail.value
-    });
-  },
-  optionAction: function (e) {
-    console.log(e.detail.value);
-  },
-  optionSetting: function (e) {
-    console.log(e.detail.value);
-  },
-  changeAvatar: function (e) {
-    wx.chooseImage({
-      count: 1,
-      sizeType: ['compressed'],
-      sourceType: ['album', 'camera'],
-      success(res) {
-        // tempFilePath可以作为img标签的src属性显示图片
-        const localImage = res.tempFilePaths[0];
-        wx.uploadFile({
-          url: 'https://readertest.lingjiao.cn/readerBase/file/upload',
-          filePath: localImage,
-          name: '头像',
-          header: {
-            uid: wx.getStorageSync('uid')
-          },
-          success: (res) => {
-            // console.log(JSON.parse(res.data));
-            const newAvatar = JSON.parse(res.data).data;
-            const str = 'user.avatar'
-            this.setData({
-              [str]: newAvatar
-            })
-          }
-        })
-      }
-    })
-  },
-  formSubmit: function (e) {
-    console.log(e.detail.value)
-    if (e.detail.value.nickname === '') {
-      return false
-    }
-    // const uid = wx.getStorageSync('uid');
-    const data = {
-      nickName: e.detail.value.nickname || '',
-      mobile: '',
-      gender: e.detail.value.radioGroup1,
-      schoolProvince: '',
-      schoolCity: '',
-      schoolName: e.detail.value.address || '',
-      profession: e.detail.value.radioGroup2 || '',
-      birthday: e.detail.value.picker || ''
-    }
-    httpRequestApi.settingUserInfo(data).success(res => {
-      console.log(res.data.data); //修改资料成功后 调用 getUserInfo
-      // wx.redirectTo({
-      //   url: '/pages/index/index?index=3'
-      // });
-      wx.setStorageSync('user', res.data.data);
-      wx.navigateBack({
-        delta: 1
-      })
-    });
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  getUserInfo: function () {
-
-  },
-  onLoad: function (option) {
-    httpRequestApi.getUserInfo().success(res => {
-      const user = res.data.data
-      console.log(user)
-      const birthday = user.birthday ? formatDate(user.birthday, 2) : '2018-01-01';
-      console.log(birthday)
-      this.setData({
-        user: user,
-        date: birthday,
-        sexs: [{
-            value: 2,
-            checked: user.gender === 2 ? true : false,
-            sex: '女'
-          },
-          {
-            value: 1,
-            checked: user.gender === 1 ? true : false,
-            sex: '男'
-          }
-        ],
-        occupations: [{
-            value: '家长',
-            checked: user.profession === '家长' ? true : false
-          },
-          {
-            value: '老师',
-            checked: user.profession === '老师' ? true : false
-          },
-          {
-            value: '学生',
-            checked: user.profession === '学生' ? true : false
-          }
-        ],
-
-      })
-      console.log(this.data.date)
-      if (option.title) {
-        wx.setNavigationBarTitle({
-          title: option.title //页面标题为路由参数
-        });
-        this.setData({
-          title: option.title
-        });
-      }
-      httpRequestApi.userIntoPage('pages/user/myEdit/myEdit', '修改资料页面').success((res) => {
-
-      })
-    });
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 201
.history/pages/user/myEdit/myEdit_20190327152657.js

@@ -1,201 +0,0 @@
-import httpRequestApi from '../../../utils/APIClient';
-import {
-  formatDate
-} from '../../../utils/util';
-Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    user: {},
-    sexs: [],
-    occupations: [],
-    date: '',
-    msg: '',
-    nickname: ''
-  },
-  saveNickName: function (e) {
-    let nickname = e.detail.value;
-    this.setData({
-      nicename: nickname
-    });
-  },
-  saveAddress: function (e) {
-    let msg = e.detail.value;
-    this.setData({
-      msg: msg
-    });
-  },
-  bindDateChange: function (e) {
-    console.log(e.detail.value)
-    this.setData({
-      date: e.detail.value
-    });
-  },
-  optionAction: function (e) {
-    console.log(e.detail.value);
-  },
-  optionSetting: function (e) {
-    console.log(e.detail.value);
-  },
-  changeAvatar: function (e) {
-    const _this = this;
-    wx.chooseImage({
-      count: 1,
-      sizeType: ['compressed'],
-      sourceType: ['album', 'camera'],
-      success(res) {
-        // tempFilePath可以作为img标签的src属性显示图片
-        const localImage = res.tempFilePaths[0];
-        wx.uploadFile({
-          url: 'https://readertest.lingjiao.cn/readerBase/file/upload',
-          filePath: localImage,
-          name: '头像',
-          header: {
-            uid: wx.getStorageSync('uid')
-          },
-          success: (res) => {
-            // console.log(JSON.parse(res.data));
-            const newAvatar = JSON.parse(res.data).data;
-            const str = 'user.avatar'
-            _this.setData({
-              [str]: newAvatar
-            })
-          }
-        })
-      }
-    })
-  },
-  formSubmit: function (e) {
-    console.log(e.detail.value)
-    if (e.detail.value.nickname === '') {
-      return false
-    }
-    // const uid = wx.getStorageSync('uid');
-    const data = {
-      nickName: e.detail.value.nickname || '',
-      mobile: '',
-      gender: e.detail.value.radioGroup1,
-      schoolProvince: '',
-      schoolCity: '',
-      schoolName: e.detail.value.address || '',
-      profession: e.detail.value.radioGroup2 || '',
-      birthday: e.detail.value.picker || ''
-    }
-    httpRequestApi.settingUserInfo(data).success(res => {
-      console.log(res.data.data); //修改资料成功后 调用 getUserInfo
-      // wx.redirectTo({
-      //   url: '/pages/index/index?index=3'
-      // });
-      wx.setStorageSync('user', res.data.data);
-      wx.navigateBack({
-        delta: 1
-      })
-    });
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  getUserInfo: function () {
-
-  },
-  onLoad: function (option) {
-    httpRequestApi.getUserInfo().success(res => {
-      const user = res.data.data
-      console.log(user)
-      const birthday = user.birthday ? formatDate(user.birthday, 2) : '2018-01-01';
-      console.log(birthday)
-      this.setData({
-        user: user,
-        date: birthday,
-        sexs: [{
-            value: 2,
-            checked: user.gender === 2 ? true : false,
-            sex: '女'
-          },
-          {
-            value: 1,
-            checked: user.gender === 1 ? true : false,
-            sex: '男'
-          }
-        ],
-        occupations: [{
-            value: '家长',
-            checked: user.profession === '家长' ? true : false
-          },
-          {
-            value: '老师',
-            checked: user.profession === '老师' ? true : false
-          },
-          {
-            value: '学生',
-            checked: user.profession === '学生' ? true : false
-          }
-        ],
-
-      })
-      console.log(this.data.date)
-      if (option.title) {
-        wx.setNavigationBarTitle({
-          title: option.title //页面标题为路由参数
-        });
-        this.setData({
-          title: option.title
-        });
-      }
-      httpRequestApi.userIntoPage('pages/user/myEdit/myEdit', '修改资料页面').success((res) => {
-
-      })
-    });
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 59
.history/pages/user/myEdit/myEdit_20190327152925.wxml

@@ -1,59 +0,0 @@
-<view>
-  <view class='setting-info'>
-    <form bindsubmit="formSubmit" class='form'>
-      <view class="avatarBox" bindtap="changeAvatar" name="avatar" value="user.avatar">
-        <image src="{{user.avatar}}" class="avatarImage" />
-        <view class="avatar-text">修改头像</view>
-      </view>
-      <view class='nickname-box'>
-        <text class='setting-title'>宝贝昵称</text>
-        <view class='user-action'>
-          <input name='nickname' class='nickname' type='text' maxlength="9" placeholder='{{user.nickName}}' placeholder-class='placeholderStyle' focus='{{ true }}' value='{{user.nickName}}' bindblur='saveNickName'>
-          </input>
-        </view>
-        <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='sex-box'>
-        <view class='setting-title'>性别</view>
-        <radio-group name='radioGroup1' class="radio-group" bindchange="optionAction">
-          <label class="radio" wx:for="{{ sexs }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.sex }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='birthday-box'>
-        <picker name='picker' mode="date" value="{{ date }}" start="1900-01-01" end="2020-09-01" bindchange="bindDateChange">
-            <view class="picker">
-              <text class='setting-title'>生日</text>
-              <text>{{ date }}</text>
-            </view>
-        </picker>
-         <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='occupation-box'>
-        <text class='setting-title'>职业</text>
-        <radio-group name='radioGroup2' class="radio-group" bindchange="optionSetting">
-          <label class="radio" wx:for="{{ occupations }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.value }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='school-box'>
-        <text class='setting-title'>学校</text>
-        <input name='address' maxlength="14" class='address' type='text' placeholder='{{user.schoolName}}' value='{{ user.schoolName }}' bindblur='saveAddress'></input>
-        <view class='edit-image'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class="submit-btn">
-        <button class='btn' formType="submit">保存</button>
-      </view>
-    </form>
-  </view>
-</view>

+ 0 - 202
.history/pages/user/myEdit/myEdit_20190327153000.js

@@ -1,202 +0,0 @@
-import httpRequestApi from '../../../utils/APIClient';
-import {
-  formatDate
-} from '../../../utils/util';
-Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    user: {},
-    sexs: [],
-    occupations: [],
-    date: '',
-    msg: '',
-    nickname: ''
-  },
-  saveNickName: function (e) {
-    let nickname = e.detail.value;
-    this.setData({
-      nicename: nickname
-    });
-  },
-  saveAddress: function (e) {
-    let msg = e.detail.value;
-    this.setData({
-      msg: msg
-    });
-  },
-  bindDateChange: function (e) {
-    console.log(e.detail.value)
-    this.setData({
-      date: e.detail.value
-    });
-  },
-  optionAction: function (e) {
-    console.log(e.detail.value);
-  },
-  optionSetting: function (e) {
-    console.log(e.detail.value);
-  },
-  changeAvatar: function (e) {
-    const _this = this;
-    wx.chooseImage({
-      count: 1,
-      sizeType: ['compressed'],
-      sourceType: ['album', 'camera'],
-      success(res) {
-        // tempFilePath可以作为img标签的src属性显示图片
-        const localImage = res.tempFilePaths[0];
-        wx.uploadFile({
-          url: 'https://readertest.lingjiao.cn/readerBase/file/upload',
-          filePath: localImage,
-          name: '头像',
-          header: {
-            uid: wx.getStorageSync('uid')
-          },
-          success: (res) => {
-            // console.log(JSON.parse(res.data));
-            const newAvatar = JSON.parse(res.data).data;
-            const str = 'user.avatar'
-            _this.setData({
-              [str]: newAvatar
-            })
-          }
-        })
-      }
-    })
-  },
-  formSubmit: function (e) {
-    console.log(e.detail.value)
-    console.log(e)
-    if (e.detail.value.nickname === '') {
-      return false
-    }
-    // const uid = wx.getStorageSync('uid');
-    const data = {
-      nickName: e.detail.value.nickname || '',
-      mobile: '',
-      gender: e.detail.value.radioGroup1,
-      schoolProvince: '',
-      schoolCity: '',
-      schoolName: e.detail.value.address || '',
-      profession: e.detail.value.radioGroup2 || '',
-      birthday: e.detail.value.picker || ''
-    }
-    httpRequestApi.settingUserInfo(data).success(res => {
-      console.log(res.data.data); //修改资料成功后 调用 getUserInfo
-      // wx.redirectTo({
-      //   url: '/pages/index/index?index=3'
-      // });
-      wx.setStorageSync('user', res.data.data);
-      wx.navigateBack({
-        delta: 1
-      })
-    });
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  getUserInfo: function () {
-
-  },
-  onLoad: function (option) {
-    httpRequestApi.getUserInfo().success(res => {
-      const user = res.data.data
-      console.log(user)
-      const birthday = user.birthday ? formatDate(user.birthday, 2) : '2018-01-01';
-      console.log(birthday)
-      this.setData({
-        user: user,
-        date: birthday,
-        sexs: [{
-            value: 2,
-            checked: user.gender === 2 ? true : false,
-            sex: '女'
-          },
-          {
-            value: 1,
-            checked: user.gender === 1 ? true : false,
-            sex: '男'
-          }
-        ],
-        occupations: [{
-            value: '家长',
-            checked: user.profession === '家长' ? true : false
-          },
-          {
-            value: '老师',
-            checked: user.profession === '老师' ? true : false
-          },
-          {
-            value: '学生',
-            checked: user.profession === '学生' ? true : false
-          }
-        ],
-
-      })
-      console.log(this.data.date)
-      if (option.title) {
-        wx.setNavigationBarTitle({
-          title: option.title //页面标题为路由参数
-        });
-        this.setData({
-          title: option.title
-        });
-      }
-      httpRequestApi.userIntoPage('pages/user/myEdit/myEdit', '修改资料页面').success((res) => {
-
-      })
-    });
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 203
.history/pages/user/myEdit/myEdit_20190327153148.js

@@ -1,203 +0,0 @@
-import httpRequestApi from '../../../utils/APIClient';
-import {
-  formatDate
-} from '../../../utils/util';
-Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    user: {},
-    sexs: [],
-    occupations: [],
-    date: '',
-    msg: '',
-    nickname: ''
-  },
-  saveNickName: function (e) {
-    let nickname = e.detail.value;
-    this.setData({
-      nicename: nickname
-    });
-  },
-  saveAddress: function (e) {
-    let msg = e.detail.value;
-    this.setData({
-      msg: msg
-    });
-  },
-  bindDateChange: function (e) {
-    console.log(e.detail.value)
-    this.setData({
-      date: e.detail.value
-    });
-  },
-  optionAction: function (e) {
-    console.log(e.detail.value);
-  },
-  optionSetting: function (e) {
-    console.log(e.detail.value);
-  },
-  changeAvatar: function (e) {
-    const _this = this;
-    wx.chooseImage({
-      count: 1,
-      sizeType: ['compressed'],
-      sourceType: ['album', 'camera'],
-      success(res) {
-        // tempFilePath可以作为img标签的src属性显示图片
-        const localImage = res.tempFilePaths[0];
-        wx.uploadFile({
-          url: 'https://readertest.lingjiao.cn/readerBase/file/upload',
-          filePath: localImage,
-          name: '头像',
-          header: {
-            uid: wx.getStorageSync('uid')
-          },
-          success: (res) => {
-            // console.log(JSON.parse(res.data));
-            const newAvatar = JSON.parse(res.data).data;
-            const str = 'user.avatar'
-            _this.setData({
-              [str]: newAvatar
-            })
-          }
-        })
-      }
-    })
-  },
-  formSubmit: function (e) {
-    console.log(e.detail.value)
-    console.log(e)
-    if (e.detail.value.nickname === '') {
-      return false
-    }
-    // const uid = wx.getStorageSync('uid');
-    const data = {
-      nickName: e.detail.value.nickname || '',
-      mobile: '',
-      gender: e.detail.value.radioGroup1,
-      schoolProvince: '',
-      schoolCity: '',
-      schoolName: e.detail.value.address || '',
-      profession: e.detail.value.radioGroup2 || '',
-      birthday: e.detail.value.picker || '',
-      avatar: this.user.avatar
-    }
-    httpRequestApi.settingUserInfo(data).success(res => {
-      console.log(res.data.data); //修改资料成功后 调用 getUserInfo
-      // wx.redirectTo({
-      //   url: '/pages/index/index?index=3'
-      // });
-      wx.setStorageSync('user', res.data.data);
-      wx.navigateBack({
-        delta: 1
-      })
-    });
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  getUserInfo: function () {
-
-  },
-  onLoad: function (option) {
-    httpRequestApi.getUserInfo().success(res => {
-      const user = res.data.data
-      console.log(user)
-      const birthday = user.birthday ? formatDate(user.birthday, 2) : '2018-01-01';
-      console.log(birthday)
-      this.setData({
-        user: user,
-        date: birthday,
-        sexs: [{
-            value: 2,
-            checked: user.gender === 2 ? true : false,
-            sex: '女'
-          },
-          {
-            value: 1,
-            checked: user.gender === 1 ? true : false,
-            sex: '男'
-          }
-        ],
-        occupations: [{
-            value: '家长',
-            checked: user.profession === '家长' ? true : false
-          },
-          {
-            value: '老师',
-            checked: user.profession === '老师' ? true : false
-          },
-          {
-            value: '学生',
-            checked: user.profession === '学生' ? true : false
-          }
-        ],
-
-      })
-      console.log(this.data.date)
-      if (option.title) {
-        wx.setNavigationBarTitle({
-          title: option.title //页面标题为路由参数
-        });
-        this.setData({
-          title: option.title
-        });
-      }
-      httpRequestApi.userIntoPage('pages/user/myEdit/myEdit', '修改资料页面').success((res) => {
-
-      })
-    });
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 203
.history/pages/user/myEdit/myEdit_20190327153246.js

@@ -1,203 +0,0 @@
-import httpRequestApi from '../../../utils/APIClient';
-import {
-  formatDate
-} from '../../../utils/util';
-Page({
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    user: {},
-    sexs: [],
-    occupations: [],
-    date: '',
-    msg: '',
-    nickname: ''
-  },
-  saveNickName: function (e) {
-    let nickname = e.detail.value;
-    this.setData({
-      nicename: nickname
-    });
-  },
-  saveAddress: function (e) {
-    let msg = e.detail.value;
-    this.setData({
-      msg: msg
-    });
-  },
-  bindDateChange: function (e) {
-    console.log(e.detail.value)
-    this.setData({
-      date: e.detail.value
-    });
-  },
-  optionAction: function (e) {
-    console.log(e.detail.value);
-  },
-  optionSetting: function (e) {
-    console.log(e.detail.value);
-  },
-  changeAvatar: function (e) {
-    const _this = this;
-    wx.chooseImage({
-      count: 1,
-      sizeType: ['compressed'],
-      sourceType: ['album', 'camera'],
-      success(res) {
-        // tempFilePath可以作为img标签的src属性显示图片
-        const localImage = res.tempFilePaths[0];
-        wx.uploadFile({
-          url: 'https://readertest.lingjiao.cn/readerBase/file/upload',
-          filePath: localImage,
-          name: '头像',
-          header: {
-            uid: wx.getStorageSync('uid')
-          },
-          success: (res) => {
-            // console.log(JSON.parse(res.data));
-            const newAvatar = JSON.parse(res.data).data;
-            const str = 'user.avatar'
-            _this.setData({
-              [str]: newAvatar
-            })
-          }
-        })
-      }
-    })
-  },
-  formSubmit: function (e) {
-    console.log(e.detail.value)
-    console.log(e)
-    if (e.detail.value.nickname === '') {
-      return false
-    }
-    // const uid = wx.getStorageSync('uid');
-    const data = {
-      nickName: e.detail.value.nickname || '',
-      mobile: '',
-      gender: e.detail.value.radioGroup1,
-      schoolProvince: '',
-      schoolCity: '',
-      schoolName: e.detail.value.address || '',
-      profession: e.detail.value.radioGroup2 || '',
-      birthday: e.detail.value.picker || '',
-      avatar: this.data.user.avatar
-    }
-    httpRequestApi.settingUserInfo(data).success(res => {
-      console.log(res.data.data); //修改资料成功后 调用 getUserInfo
-      // wx.redirectTo({
-      //   url: '/pages/index/index?index=3'
-      // });
-      wx.setStorageSync('user', res.data.data);
-      wx.navigateBack({
-        delta: 1
-      })
-    });
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  getUserInfo: function () {
-
-  },
-  onLoad: function (option) {
-    httpRequestApi.getUserInfo().success(res => {
-      const user = res.data.data
-      console.log(user)
-      const birthday = user.birthday ? formatDate(user.birthday, 2) : '2018-01-01';
-      console.log(birthday)
-      this.setData({
-        user: user,
-        date: birthday,
-        sexs: [{
-            value: 2,
-            checked: user.gender === 2 ? true : false,
-            sex: '女'
-          },
-          {
-            value: 1,
-            checked: user.gender === 1 ? true : false,
-            sex: '男'
-          }
-        ],
-        occupations: [{
-            value: '家长',
-            checked: user.profession === '家长' ? true : false
-          },
-          {
-            value: '老师',
-            checked: user.profession === '老师' ? true : false
-          },
-          {
-            value: '学生',
-            checked: user.profession === '学生' ? true : false
-          }
-        ],
-
-      })
-      console.log(this.data.date)
-      if (option.title) {
-        wx.setNavigationBarTitle({
-          title: option.title //页面标题为路由参数
-        });
-        this.setData({
-          title: option.title
-        });
-      }
-      httpRequestApi.userIntoPage('pages/user/myEdit/myEdit', '修改资料页面').success((res) => {
-
-      })
-    });
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 59
.history/pages/user/myEdit/myEdit_20190327153405.wxml

@@ -1,59 +0,0 @@
-<view>
-  <view class='setting-info'>
-    <form bindsubmit="formSubmit" class='form'>
-      <view class="avatarBox"  name="avatar" value="user.avatar">
-        <image src="{{user.avatar}}" bindtap="changeAvatar"  class="avatarImage" />
-        <view class="avatar-text" bindtap="changeAvatar">修改头像</view>
-      </view>
-      <view class='nickname-box'>
-        <text class='setting-title'>宝贝昵称</text>
-        <view class='user-action'>
-          <input name='nickname' class='nickname' type='text' maxlength="9" placeholder='{{user.nickName}}' placeholder-class='placeholderStyle' focus='{{ true }}' value='{{user.nickName}}' bindblur='saveNickName'>
-          </input>
-        </view>
-        <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='sex-box'>
-        <view class='setting-title'>性别</view>
-        <radio-group name='radioGroup1' class="radio-group" bindchange="optionAction">
-          <label class="radio" wx:for="{{ sexs }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.sex }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='birthday-box'>
-        <picker name='picker' mode="date" value="{{ date }}" start="1900-01-01" end="2020-09-01" bindchange="bindDateChange">
-            <view class="picker">
-              <text class='setting-title'>生日</text>
-              <text>{{ date }}</text>
-            </view>
-        </picker>
-         <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='occupation-box'>
-        <text class='setting-title'>职业</text>
-        <radio-group name='radioGroup2' class="radio-group" bindchange="optionSetting">
-          <label class="radio" wx:for="{{ occupations }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.value }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='school-box'>
-        <text class='setting-title'>学校</text>
-        <input name='address' maxlength="14" class='address' type='text' placeholder='{{user.schoolName}}' value='{{ user.schoolName }}' bindblur='saveAddress'></input>
-        <view class='edit-image'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class="submit-btn">
-        <button class='btn' formType="submit">保存</button>
-      </view>
-    </form>
-  </view>
-</view>

+ 0 - 228
.history/pages/user/myEdit/myEdit_20190327154940.wxss

@@ -1,228 +0,0 @@
-/* page{
-  width: 750rpx;
-  height: 1206rpx;
-  padding-top: 0;
-  background: #F7F7F7;
-} */
-
-.setting-info{
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  padding: 0 17rpx;
-  font-size: 32rpx;
-  color: #5E5E5E;
-  background: #F7F7F7;
-}
-
-.nickname-box{
-  margin-top: 34rpx;
-  width: 716rpx;
-  height: 88rpx;
-  position: relative;
-  box-sizing: border-box;
-  padding: 22rpx 0 22rpx 26rpx;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  border-radius: 12rpx;
-}
-
-.user-action{
-  /* min-width: 100rpx; */
-  /* max-width: 400rpx; */
-  width: 74%;
-}
-
-.nickname{
-  width: 74%;
-}
-
-.setting-title{
-  display: inline-block;
-  width: 145rpx;
-  text-align: center;
-}
-
-.placeholderStyle{
-  font-size: 32rpx;
-  color: #737373;
-}
-
-.edit-img{
-  position: absolute;
-  right:50rpx;
-  top: 24rpx;
-  width: 22rpx;
-  height: 32rpx;
-}
-
-.icon{
-  width: 100%;
-  height: 100%;
-}
-
-.sex-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-}
-
-.school-title,.radio-each,.birthday-title,.occupation-title{
-  margin-right: 30rpx;
-}
-
-.radio-group{
-  display: flex;
-  height: 42rpx;
-  overflow: hidden;
-  /* margin-top: -8rpx; */
-}
-
-/* .sex-title{
-  position: relative;
-  top: 10rpx;
-} */
-
-.radio{
-  margin-right: 50rpx;
-  display: flex;
-  
-}
-
-radio .wx-radio-input.wx-radio-input-checked::before{
-   border-radius: 50%;
-   width: 8rpx; 
-   height: 8rpx; 
-   text-align: center;
-   font-size:0rpx; /* 对勾大小 去掉 */
-   background-color: #FF5E00; 
-   transform:translate(-50%, -50%) scale(1);
-   -webkit-transform:translate(-50%, -50%) scale(1);
-}
-
-radio{
-  margin-left: 20rpx;
-  border-radius: 50%;
-  width: 28rpx;/* 最好是4的倍数,不然会不在中间 */
-  height: 28rpx;
-  border: 4rpx solid #FF8100;/* 设置边框(外圆) */
-  font-size: 0;/* 让边框重合 */
-  margin-top: 6rpx;
-}
-radio .wx-radio-input{
-   border-radius: 50%;
-   width: 28rpx;
-   height: 28rpx; 
-   border: none;/* 替换边框(隐藏原有边框) */
-}
-
-radio .wx-radio-input.wx-radio-input-checked{
-   border: none;
-   background: #f00; 
-}
-
-
-.birthday-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-  position: relative;
-  overflow:hidden;
-
-}
-
-.occupation-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-}
-
-.school-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-  position: relative;
-}
-
-.address{
-  /* width: 420rpx; */
-  /* height: 88rpx; */
-  width: 74%;
-}
-
-.edit-image{
-  position: absolute;
-  right: 50rpx;
-  top: 24rpx;
-  width: 22rpx;
-  height: 32rpx;
-}
-
-.submit-btn{
-  margin-top: 392rpx;
-  width: 716rpx;
-  height: 200rpx;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-
-.btn{
-  font-size: 40rpx;
-  color: #FFFFFF;
-  width: 464rpx;
-  line-height: 80rpx;
-  border-radius: 80rpx;
-  background: #FF9209;
-}
-
-picker {
-  width: 100%;
-}
-
-.avatarBox{
-  width: 100%;
-  height: 200rpx;
-  margin: 0 auto;
-}
-.avatarImage{
-  width: 120rpx;
-  height: 120rpx;
-  border-radius: 50%;
-  margin: 0 auto;
-  display: block;
-  margin-top: 30rpx;
-}
-.avatar-text{
-  width: 100%;
-  font-size: 34rpx;
-  color: rgb(0, 162, 255);
-  text-align: center;
-  margin-top: 24rpx;
-}
-

+ 0 - 62
.history/pages/user/myEdit/myEdit_20190327155027.wxml

@@ -1,62 +0,0 @@
-<view>
-  <view class='setting-info'>
-    <form bindsubmit="formSubmit" class='form'>
-      <view class="avatarBox"  name="avatar" value="user.avatar">
-        <image src="{{user.avatar}}" bindtap="changeAvatar"  class="avatarImage" />
-        <view class="avatar-text" bindtap="changeAvatar">
-        <text >修改头像</text>
-        <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='nickname-box'>
-        <text class='setting-title'>宝贝昵称</text>
-        <view class='user-action'>
-          <input name='nickname' class='nickname' type='text' maxlength="9" placeholder='{{user.nickName}}' placeholder-class='placeholderStyle' focus='{{ true }}' value='{{user.nickName}}' bindblur='saveNickName'>
-          </input>
-        </view>
-        <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='sex-box'>
-        <view class='setting-title'>性别</view>
-        <radio-group name='radioGroup1' class="radio-group" bindchange="optionAction">
-          <label class="radio" wx:for="{{ sexs }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.sex }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='birthday-box'>
-        <picker name='picker' mode="date" value="{{ date }}" start="1900-01-01" end="2020-09-01" bindchange="bindDateChange">
-            <view class="picker">
-              <text class='setting-title'>生日</text>
-              <text>{{ date }}</text>
-            </view>
-        </picker>
-         <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='occupation-box'>
-        <text class='setting-title'>职业</text>
-        <radio-group name='radioGroup2' class="radio-group" bindchange="optionSetting">
-          <label class="radio" wx:for="{{ occupations }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.value }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='school-box'>
-        <text class='setting-title'>学校</text>
-        <input name='address' maxlength="14" class='address' type='text' placeholder='{{user.schoolName}}' value='{{ user.schoolName }}' bindblur='saveAddress'></input>
-        <view class='edit-image'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class="submit-btn">
-        <button class='btn' formType="submit">保存</button>
-      </view>
-    </form>
-  </view>
-</view>

+ 0 - 61
.history/pages/user/myEdit/myEdit_20190327155316.wxml

@@ -1,61 +0,0 @@
-<view>
-  <view class="avatarBox" name="avatar" value="user.avatar">
-    <image src="{{user.avatar}}" bindtap="changeAvatar" class="avatarImage" />
-    <view class="avatar-text" bindtap="changeAvatar">
-      <text>修改头像</text>
-      <image src='../../../static/image/edit_new.png' class='icon'></image>
-    </view>
-  </view>
-  <view class='setting-info'>
-    <form bindsubmit="formSubmit" class='form'>
-      <view class='nickname-box'>
-        <text class='setting-title'>宝贝昵称</text>
-        <view class='user-action'>
-          <input name='nickname' class='nickname' type='text' maxlength="9" placeholder='{{user.nickName}}' placeholder-class='placeholderStyle' focus='{{ true }}' value='{{user.nickName}}' bindblur='saveNickName'></input>
-        </view>
-        <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='sex-box'>
-        <view class='setting-title'>性别</view>
-        <radio-group name='radioGroup1' class="radio-group" bindchange="optionAction">
-          <label class="radio" wx:for="{{ sexs }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.sex }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='birthday-box'>
-        <picker name='picker' mode="date" value="{{ date }}" start="1900-01-01" end="2020-09-01" bindchange="bindDateChange">
-          <view class="picker">
-            <text class='setting-title'>生日</text>
-            <text>{{ date }}</text>
-          </view>
-        </picker>
-        <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='occupation-box'>
-        <text class='setting-title'>职业</text>
-        <radio-group name='radioGroup2' class="radio-group" bindchange="optionSetting">
-          <label class="radio" wx:for="{{ occupations }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.value }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='school-box'>
-        <text class='setting-title'>学校</text>
-        <input name='address' maxlength="14" class='address' type='text' placeholder='{{user.schoolName}}' value='{{ user.schoolName }}' bindblur='saveAddress'></input>
-        <view class='edit-image'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class="submit-btn">
-        <button class='btn' formType="submit">保存</button>
-      </view>
-    </form>
-  </view>
-</view>

+ 0 - 61
.history/pages/user/myEdit/myEdit_20190327161816.wxml

@@ -1,61 +0,0 @@
-<view style="background:#f7f7f7;">
-  <view class="avatarBox" name="avatar" value="user.avatar">
-    <image src="{{user.avatar}}" bindtap="changeAvatar" class="avatarImage" />
-    <view class="avatar-text" bindtap="changeAvatar">
-      <text>修改头像</text>
-      <image src='../../../static/image/edit_new.png' class='icon'></image>
-    </view>
-  </view>
-  <view class='setting-info'>
-    <form bindsubmit="formSubmit" class='form'>
-      <view class='nickname-box'>
-        <text class='setting-title'>宝贝昵称</text>
-        <view class='user-action'>
-          <input name='nickname' class='nickname' type='text' maxlength="9" placeholder='{{user.nickName}}' placeholder-class='placeholderStyle' focus='{{ true }}' value='{{user.nickName}}' bindblur='saveNickName'></input>
-        </view>
-        <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='sex-box'>
-        <view class='setting-title'>性别</view>
-        <radio-group name='radioGroup1' class="radio-group" bindchange="optionAction">
-          <label class="radio" wx:for="{{ sexs }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.sex }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='birthday-box'>
-        <picker name='picker' mode="date" value="{{ date }}" start="1900-01-01" end="2020-09-01" bindchange="bindDateChange">
-          <view class="picker">
-            <text class='setting-title'>生日</text>
-            <text>{{ date }}</text>
-          </view>
-        </picker>
-        <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='occupation-box'>
-        <text class='setting-title'>职业</text>
-        <radio-group name='radioGroup2' class="radio-group" bindchange="optionSetting">
-          <label class="radio" wx:for="{{ occupations }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.value }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='school-box'>
-        <text class='setting-title'>学校</text>
-        <input name='address' maxlength="14" class='address' type='text' placeholder='{{user.schoolName}}' value='{{ user.schoolName }}' bindblur='saveAddress'></input>
-        <view class='edit-image'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class="submit-btn">
-        <button class='btn' formType="submit">保存</button>
-      </view>
-    </form>
-  </view>
-</view>

+ 0 - 61
.history/pages/user/myEdit/myEdit_20190327162022.wxml

@@ -1,61 +0,0 @@
-<view style="background:#f7f7f7;margin-top:-30rpx;">
-  <view class="avatarBox" name="avatar" value="user.avatar">
-    <image src="{{user.avatar}}" bindtap="changeAvatar" class="avatarImage" />
-    <view class="avatar-text" bindtap="changeAvatar">
-      <text>修改头像</text>
-      <image src='../../../static/image/edit_new.png' class='icon'></image>
-    </view>
-  </view>
-  <view class='setting-info'>
-    <form bindsubmit="formSubmit" class='form'>
-      <view class='nickname-box'>
-        <text class='setting-title'>宝贝昵称</text>
-        <view class='user-action'>
-          <input name='nickname' class='nickname' type='text' maxlength="9" placeholder='{{user.nickName}}' placeholder-class='placeholderStyle' focus='{{ true }}' value='{{user.nickName}}' bindblur='saveNickName'></input>
-        </view>
-        <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='sex-box'>
-        <view class='setting-title'>性别</view>
-        <radio-group name='radioGroup1' class="radio-group" bindchange="optionAction">
-          <label class="radio" wx:for="{{ sexs }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.sex }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='birthday-box'>
-        <picker name='picker' mode="date" value="{{ date }}" start="1900-01-01" end="2020-09-01" bindchange="bindDateChange">
-          <view class="picker">
-            <text class='setting-title'>生日</text>
-            <text>{{ date }}</text>
-          </view>
-        </picker>
-        <view class='edit-img'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class='occupation-box'>
-        <text class='setting-title'>职业</text>
-        <radio-group name='radioGroup2' class="radio-group" bindchange="optionSetting">
-          <label class="radio" wx:for="{{ occupations }}" wx:key="{{ index }}">
-            <text class='sex-title'>{{ item.value }}</text>
-            <radio value="{{ item.value }}" checked="{{ item.checked }}" color='#fff' />
-          </label>
-        </radio-group>
-      </view>
-      <view class='school-box'>
-        <text class='setting-title'>学校</text>
-        <input name='address' maxlength="14" class='address' type='text' placeholder='{{user.schoolName}}' value='{{ user.schoolName }}' bindblur='saveAddress'></input>
-        <view class='edit-image'>
-          <image src='../../../static/image/edit_new.png' class='icon'></image>
-        </view>
-      </view>
-      <view class="submit-btn">
-        <button class='btn' formType="submit">保存</button>
-      </view>
-    </form>
-  </view>
-</view>

+ 0 - 228
.history/pages/user/myEdit/myEdit_20190327162022.wxss

@@ -1,228 +0,0 @@
-/* page{
-  width: 750rpx;
-  height: 1206rpx;
-  padding-top: 0;
-  background: #F7F7F7;
-} */
-
-.setting-info{
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  padding: 0 17rpx;
-  font-size: 32rpx;
-  color: #5E5E5E;
-  background: #F7F7F7;
-}
-
-.nickname-box{
-  margin-top: 34rpx;
-  width: 716rpx;
-  height: 88rpx;
-  position: relative;
-  box-sizing: border-box;
-  padding: 22rpx 0 22rpx 26rpx;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  border-radius: 12rpx;
-}
-
-.user-action{
-  /* min-width: 100rpx; */
-  /* max-width: 400rpx; */
-  width: 74%;
-}
-
-.nickname{
-  width: 74%;
-}
-
-.setting-title{
-  display: inline-block;
-  width: 145rpx;
-  text-align: center;
-}
-
-.placeholderStyle{
-  font-size: 32rpx;
-  color: #737373;
-}
-
-.edit-img{
-  position: absolute;
-  right:50rpx;
-  top: 24rpx;
-  width: 22rpx;
-  height: 32rpx;
-}
-
-.icon{
-  width: 100%;
-  height: 100%;
-}
-
-.sex-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-}
-
-.school-title,.radio-each,.birthday-title,.occupation-title{
-  margin-right: 30rpx;
-}
-
-.radio-group{
-  display: flex;
-  height: 42rpx;
-  overflow: hidden;
-  /* margin-top: -8rpx; */
-}
-
-/* .sex-title{
-  position: relative;
-  top: 10rpx;
-} */
-
-.radio{
-  margin-right: 50rpx;
-  display: flex;
-  
-}
-
-radio .wx-radio-input.wx-radio-input-checked::before{
-   border-radius: 50%;
-   width: 8rpx; 
-   height: 8rpx; 
-   text-align: center;
-   font-size:0rpx; /* 对勾大小 去掉 */
-   background-color: #FF5E00; 
-   transform:translate(-50%, -50%) scale(1);
-   -webkit-transform:translate(-50%, -50%) scale(1);
-}
-
-radio{
-  margin-left: 20rpx;
-  border-radius: 50%;
-  width: 28rpx;/* 最好是4的倍数,不然会不在中间 */
-  height: 28rpx;
-  border: 4rpx solid #FF8100;/* 设置边框(外圆) */
-  font-size: 0;/* 让边框重合 */
-  margin-top: 6rpx;
-}
-radio .wx-radio-input{
-   border-radius: 50%;
-   width: 28rpx;
-   height: 28rpx; 
-   border: none;/* 替换边框(隐藏原有边框) */
-}
-
-radio .wx-radio-input.wx-radio-input-checked{
-   border: none;
-   background: #f00; 
-}
-
-
-.birthday-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-  position: relative;
-  overflow:hidden;
-
-}
-
-.occupation-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-}
-
-.school-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-  position: relative;
-}
-
-.address{
-  /* width: 420rpx; */
-  /* height: 88rpx; */
-  width: 74%;
-}
-
-.edit-image{
-  position: absolute;
-  right: 50rpx;
-  top: 24rpx;
-  width: 22rpx;
-  height: 32rpx;
-}
-
-.submit-btn{
-  margin-top: 392rpx;
-  width: 716rpx;
-  height: 200rpx;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-
-.btn{
-  font-size: 40rpx;
-  color: #FFFFFF;
-  width: 464rpx;
-  line-height: 80rpx;
-  border-radius: 80rpx;
-  background: #FF9209;
-}
-
-picker {
-  width: 100%;
-}
-
-.avatarBox{
-  width: 100%;
-  height: 200rpx;
-  margin: 10rpx auto 0;
-}
-.avatarImage{
-  width: 120rpx;
-  height: 120rpx;
-  border-radius: 50%;
-  margin: 0 auto;
-  display: block;
-  margin-top: 30rpx;
-}
-.avatar-text{
-  width: 100%;
-  font-size: 34rpx;
-  color: rgb(0, 162, 255);
-  text-align: center;
-  margin-top: 24rpx;
-}
-

+ 0 - 229
.history/pages/user/myEdit/myEdit_20190327162112.wxss

@@ -1,229 +0,0 @@
-/* page{
-  width: 750rpx;
-  height: 1206rpx;
-  padding-top: 0;
-  background: #F7F7F7;
-} */
-
-.setting-info{
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  padding: 0 17rpx;
-  font-size: 32rpx;
-  color: #5E5E5E;
-  background: #F7F7F7;
-}
-
-.nickname-box{
-  margin-top: 34rpx;
-  width: 716rpx;
-  height: 88rpx;
-  position: relative;
-  box-sizing: border-box;
-  padding: 22rpx 0 22rpx 26rpx;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  border-radius: 12rpx;
-}
-
-.user-action{
-  /* min-width: 100rpx; */
-  /* max-width: 400rpx; */
-  width: 74%;
-}
-
-.nickname{
-  width: 74%;
-}
-
-.setting-title{
-  display: inline-block;
-  width: 145rpx;
-  text-align: center;
-}
-
-.placeholderStyle{
-  font-size: 32rpx;
-  color: #737373;
-}
-
-.edit-img{
-  position: absolute;
-  right:50rpx;
-  top: 24rpx;
-  width: 22rpx;
-  height: 32rpx;
-}
-
-.icon{
-  width: 100%;
-  height: 100%;
-}
-
-.sex-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-}
-
-.school-title,.radio-each,.birthday-title,.occupation-title{
-  margin-right: 30rpx;
-}
-
-.radio-group{
-  display: flex;
-  height: 42rpx;
-  overflow: hidden;
-  /* margin-top: -8rpx; */
-}
-
-/* .sex-title{
-  position: relative;
-  top: 10rpx;
-} */
-
-.radio{
-  margin-right: 50rpx;
-  display: flex;
-  
-}
-
-radio .wx-radio-input.wx-radio-input-checked::before{
-   border-radius: 50%;
-   width: 8rpx; 
-   height: 8rpx; 
-   text-align: center;
-   font-size:0rpx; /* 对勾大小 去掉 */
-   background-color: #FF5E00; 
-   transform:translate(-50%, -50%) scale(1);
-   -webkit-transform:translate(-50%, -50%) scale(1);
-}
-
-radio{
-  margin-left: 20rpx;
-  border-radius: 50%;
-  width: 28rpx;/* 最好是4的倍数,不然会不在中间 */
-  height: 28rpx;
-  border: 4rpx solid #FF8100;/* 设置边框(外圆) */
-  font-size: 0;/* 让边框重合 */
-  margin-top: 6rpx;
-}
-radio .wx-radio-input{
-   border-radius: 50%;
-   width: 28rpx;
-   height: 28rpx; 
-   border: none;/* 替换边框(隐藏原有边框) */
-}
-
-radio .wx-radio-input.wx-radio-input-checked{
-   border: none;
-   background: #f00; 
-}
-
-
-.birthday-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-  position: relative;
-  overflow:hidden;
-
-}
-
-.occupation-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-}
-
-.school-box{
-  margin-top: 20rpx;
-  width: 716rpx;
-  height: 88rpx;
-  box-sizing: border-box;
-  display: flex;
-  align-items: center;
-  background: #FFFFFF;
-  padding: 22rpx 0 22rpx 26rpx;
-  border-radius: 12rpx;
-  position: relative;
-}
-
-.address{
-  /* width: 420rpx; */
-  /* height: 88rpx; */
-  width: 74%;
-}
-
-.edit-image{
-  position: absolute;
-  right: 50rpx;
-  top: 24rpx;
-  width: 22rpx;
-  height: 32rpx;
-}
-
-.submit-btn{
-  margin-top: 392rpx;
-  width: 716rpx;
-  height: 200rpx;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-
-.btn{
-  font-size: 40rpx;
-  color: #FFFFFF;
-  width: 464rpx;
-  line-height: 80rpx;
-  border-radius: 80rpx;
-  background: #FF9209;
-}
-
-picker {
-  width: 100%;
-}
-
-.avatarBox{
-  width: 100%;
-  height: 200rpx;
-  margin: 0 auto;
-  padding-top: 30rpx;
-}
-.avatarImage{
-  width: 120rpx;
-  height: 120rpx;
-  border-radius: 50%;
-  margin: 0 auto;
-  display: block;
-  margin-top: 30rpx;
-}
-.avatar-text{
-  width: 100%;
-  font-size: 34rpx;
-  color: rgb(0, 162, 255);
-  text-align: center;
-  margin-top: 24rpx;
-}
-

+ 0 - 84
.history/project.config_20190315155909.json

@@ -1,84 +0,0 @@
-{
-  "description": "项目配置文件",
-  "packOptions": {
-    "ignore": []
-  },
-  "setting": {
-    "urlCheck": true,
-    "es6": true,
-    "postcss": true,
-    "minified": true,
-    "newFeature": true
-  },
-  "compileType": "miniprogram",
-  "libVersion": "2.3.2",
-  "appid": "wxdfa8a4f1623d28db",
-  "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,
-  "condition": {
-    "search": {
-      "current": -1,
-      "list": []
-    },
-    "conversation": {
-      "current": -1,
-      "list": []
-    },
-    "plugin": {
-      "current": -1,
-      "list": []
-    },
-    "game": {
-      "currentL": -1,
-      "list": []
-    },
-    "miniprogram": {
-      "current": 5,
-      "list": [{
-          "id": -1,
-          "name": "小红花",
-          "pathName": "pages/social/littleFlower/littleFlower",
-          "query": ""
-        },
-        {
-          "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",
-          "scene": null
-        }
-      ]
-    }
-  }
-}

+ 0 - 84
.history/project.config_20190322144916.json

@@ -1,84 +0,0 @@
-{
-  "description": "项目配置文件",
-  "packOptions": {
-    "ignore": []
-  },
-  "setting": {
-    "urlCheck": true,
-    "es6": true,
-    "postcss": true,
-    "minified": true,
-    "newFeature": true
-  },
-  "compileType": "miniprogram",
-  "libVersion": "2.3.2",
-  "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,
-  "condition": {
-    "search": {
-      "current": -1,
-      "list": []
-    },
-    "conversation": {
-      "current": -1,
-      "list": []
-    },
-    "plugin": {
-      "current": -1,
-      "list": []
-    },
-    "game": {
-      "currentL": -1,
-      "list": []
-    },
-    "miniprogram": {
-      "current": 5,
-      "list": [{
-          "id": -1,
-          "name": "小红花",
-          "pathName": "pages/social/littleFlower/littleFlower",
-          "query": ""
-        },
-        {
-          "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",
-          "scene": null
-        }
-      ]
-    }
-  }
-}

+ 0 - 7
.history/utils/const_20190315160409.js

@@ -1,7 +0,0 @@
-// 常量列表
-module.exports = {
-  productApi: 'https://reader.lingjiao.cn/readerProduct/',
-  // productApi: 'https://readertest.lingjiao.cn/readerProduct/',
-  baseApi: 'https://reader.lingjiao.cn/readerBase/'
-  // baseApi: 'https://readertest.lingjiao.cn/readerBase/'
-}

+ 0 - 7
.history/utils/const_20190322144916.js

@@ -1,7 +0,0 @@
-// 常量列表
-module.exports = {
-  // productApi: 'https://reader.lingjiao.cn/readerProduct/',
-  productApi: 'https://readertest.lingjiao.cn/readerProduct/',
-  // baseApi: 'https://reader.lingjiao.cn/readerBase/'
-  baseApi: 'https://readertest.lingjiao.cn/readerBase/'
-}

+ 17 - 10
component/my/my.js

@@ -19,9 +19,10 @@ export const myInit = (that) => {
       isIOS: app.globalData.isIOS,
       isVIP: true
     },
-    followData:[]
+    followData: []
   });
   that.getUserWorksInfo();
+  that.getUserAuth(); //用户鉴权
   console.log(that.data.myData)
   that.toMyEdit = (e) => {
       let title = e.currentTarget.dataset.title;
@@ -34,7 +35,7 @@ export const myInit = (that) => {
         url: `../user/myconcern/myconcern?title=我的关注`
       });
     }
-    that.toMyRead = e => {
+  that.toMyRead = e => {
       wx.navigateTo({
         url: `../user/myread/myread?title=我的朗读`
       });
@@ -74,18 +75,24 @@ export const myInit = (that) => {
         })
       });
     },
-    that.toWalletDetail = function(e) {
+    that.toWalletDetail = function (e) {
       wx.navigateTo({
         url: `../../pages/user/walletDetails/walletDetails?title=资金明细`
       });
     },
-    that.toVIPBuy = function(e) {
-      // wx.navigateTo({
-      //   url: `../../pages/vipPage/vip/vip`
-      // });
-      wx.navigateTo({
-        url: `../../pages/vipPage/vipCode/vipCode`
-      });
+    that.toVIPBuy = function (e) {
+      if (app.globalData.isIOS) {
+        wx.navigateTo({
+          url: `../../pages/vipPage/vipCode/vipCode`
+        });
+
+      } else {
+        wx.navigateTo({
+          url: `../../pages/vipPage/vip/vip`
+        });
+      }
+
+
     },
     that.getFollowWorks(1, 3);
 }

+ 3 - 3
component/my/my.wxml

@@ -28,7 +28,7 @@
         </view>
       </view>
       <!-- ios只显示红花 -->
-      <view class="only-flower" wx:if="{{myData.isIOS}}" bindtap="goToFlower">
+      <!-- <view class="only-flower" wx:if="{{myData.isIOS}}" bindtap="goToFlower">
         <view class="grey-point"></view>
         <view class="flower-amount">
           <image class="" src='../../static/image/flower_small.png' />
@@ -39,9 +39,9 @@
           个任务福利还没有完成
         </view>
         <view class="flower-tips" wx:if="{{myData.user.unfinishedAmount <= 0}}">今天任务全部完成,真棒</view>
-      </view>
+      </view> -->
       <!-- android 显示两个 -->
-      <view class="wallet-section" wx:if="{{!myData.isIOS}}">
+      <view class="wallet-section" >
         <!-- <view class="wallet-box" bindtap="toWalletDetail">
           <view class="grey-point"></view>
           <image class="wallet-icon" src='../../static/image/wallet.png' />

+ 7 - 1
component/myModal/myModal.wxml

@@ -13,13 +13,19 @@
         <cover-view class="paySuccess">恭喜您支付成功</cover-view>
         <cover-view class="btn" bindtap="confirm">确定</cover-view>
     </cover-view>
-    <cover-view class="box" wx:if="{{type === 'androidVIP'}}">
+    <cover-view class="box havePadding" wx:if="{{type === 'androidVIP'}}">
         <!-- <cover-view class="text" wx:for="{{text}}"></cover-view> -->
         <cover-image class="androidVIPImg" src="../../static/vip/crown.png"></cover-image>
         <cover-view class="androidVIPText">快去开通VIP</cover-view>
         <cover-view class="androidVIPText">享受更多权益吧</cover-view>
         <cover-view class="btn" bindtap="confirm">确定</cover-view>
     </cover-view>
+    <cover-view class="box havePadding" wx:if="{{type === 'iosCode'}}">
+        <cover-image class="androidVIPImg" src="../../static/vip/crown.png"></cover-image>
+        <cover-view class="androidVIPText">由于相关规范,ios功能暂不可用</cover-view>
+        <cover-view class="androidVIPText">联系客服解锁哦</cover-view>
+        <cover-view class="btn" bindtap="confirm">立即解锁</cover-view>
+    </cover-view>
     <cover-image class="close" src="../../static/groupImg/cha.png" bindtap="close" wx:if="{{isCloseShow}}">
         <!-- <cover-image src="" /> -->
     </cover-image>

+ 30 - 10
component/myModal/myModal.wxss

@@ -20,12 +20,15 @@
     bottom: 0;
     position: relative;
     /* padding-top: 66rpx; */
-    box-sizing:border-box;
+    box-sizing: border-box;
+    overflow: visible;
 }
-.havePadding{
+
+.havePadding {
     padding-top: 66rpx;
 }
-.btn{
+
+.btn {
     width: 464rpx;
     height: 80rpx;
     line-height: 80rpx;
@@ -40,6 +43,7 @@
     right: 0;
     margin: auto;
 }
+
 .orange {
     font-size: 40rpx;
     text-align: center;
@@ -52,8 +56,14 @@
     color: #252525;
     font-size: 28rpx;
     margin-top: 20rpx;
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+
 }
-.close{
+
+.close {
     width: 78rpx;
     height: 78rpx;
     position: absolute;
@@ -61,23 +71,33 @@
     right: 0;
     margin: 38rpx auto 0;
 }
-.paySuccess{
+
+.paySuccess {
     color: #6bc74c;
     font-size: 36rpx;
     text-align: center
 }
-.paySuccessImg{
+
+.paySuccessImg {
     width: 160rpx;
     height: 160rpx;
     margin: 46rpx auto 14rpx;
 }
-.androidVIPImg{
+
+.androidVIPImg {
     width: 160rpx;
     height: 160rpx;
-    margin: 0rpx auto 14rpx;
+    position: absolute;
+    top: -89rpx;
+    margin: 0 auto;
+    left: 0;
+    right: 0;
+
 }
-.androidVIPText{
+
+.androidVIPText {
     color: #0D0D0D;
     font-size: 40rpx;
-    text-align: center
+    text-align: center;
+    margin-top: 30rpx;
 }

+ 31 - 16
pages/index/index.js

@@ -73,7 +73,7 @@ Page({
     indexMissionDialog: false,
     unfinishedCount: 0
   },
-  jurisdiction: function() {
+  jurisdiction: function () {
     //隐藏弹框
     this.setData({
       hide: !this.data.hide
@@ -82,14 +82,14 @@ Page({
     this.updateData(0)
   },
   //tab点击
-  switcher: function({
+  switcher: function ({
     currentTarget
   }) {
     if (currentTarget.dataset.index === this.data.myIndex) return;
     this.updateData(currentTarget.dataset.index);
   },
   // 根据index 更新template
-  updateData: function(index) {
+  updateData: function (index) {
     let myIndex = index;
     let templates = this.data.tab[myIndex].templates;
     this.setData({
@@ -123,7 +123,7 @@ Page({
       groupInit(this);
     }
   },
-  onLoad: function(options) {
+  onLoad: function (options) {
     this.uid = wx.getStorageSync('uid');
     wx.getSystemInfo({
       success: (res) => {
@@ -174,7 +174,7 @@ Page({
     // this.init();
 
   },
-  onShow: function() {
+  onShow: function () {
     wx.setNavigationBarTitle({
       title: '小学课文朗读配音'
     })
@@ -195,7 +195,7 @@ Page({
       this.getUserWorksInfo(true);
     }
   },
-  onHide: function() {
+  onHide: function () {
     const str = 'hotData.inputFocus'
     this.setData({
       [str]: false
@@ -215,7 +215,7 @@ Page({
   //   });
   // },
   // 获取用户信息
-  getUserWorksInfo: function(flag) {
+  getUserWorksInfo: function (flag) {
     console.log(flag)
     if (flag) {
       httpRequestApi.getUserWorksInfo().success(res => {
@@ -248,7 +248,7 @@ Page({
     })
   },
   // 触底加载
-  onReachBottom: function() {
+  onReachBottom: function () {
     console.log(this.data.myIndex)
     if (this.data.myIndex === 0) {
       this.setData({
@@ -280,7 +280,7 @@ Page({
     }
 
   },
-  onPullDownRefresh: function() {
+  onPullDownRefresh: function () {
     //当前在团购页下拉加载
     if (this.data.myIndex === 0) {
       // groupInit(this);
@@ -288,7 +288,7 @@ Page({
 
     wx.showNavigationBarLoading() //在标题栏中显示加载
     //模拟加载
-    setTimeout(function() {
+    setTimeout(function () {
       wx.hideNavigationBarLoading() //完成停止加载
       wx.stopPullDownRefresh() //停止下拉刷新
     }, 1500);
@@ -307,7 +307,7 @@ Page({
   //     console.log('错误', error)
   //   })
   // },
-  goToMessage: function() {
+  goToMessage: function () {
     wx.navigateTo({
       url: `../../pages/social/insideMessage/insideMessage`
     });
@@ -316,7 +316,7 @@ Page({
       [str]: 0
     })
   },
-  toMyCollage: function(e) {
+  toMyCollage: function (e) {
     if (app.globalData.isIOS) {
       wx.navigateTo({
         url: `../../pages/groupPage/my-group/my-group?title=我的助力`
@@ -328,17 +328,17 @@ Page({
     }
 
   },
-  toMyCourse: function() {
+  toMyCourse: function () {
     wx.navigateTo({
       url: `../../pages/user/mycourse/mycourse?title=我的课程`
     });
   },
-  goToFlower: function() {
+  goToFlower: function () {
     wx.navigateTo({
       url: `../../pages/social/littleFlower/littleFlower`
     });
   },
-  signInBtn: function(e) {
+  signInBtn: function (e) {
     this.setData({
       indexSignDialog: false
     })
@@ -348,10 +348,25 @@ Page({
     })
     this.goToFlower();
   },
-  missionBtn: function() {
+  missionBtn: function () {
     this.setData({
       indexMissionDialog: false
     })
     this.goToFlower();
+  },
+  getUserAuth: function () {
+    httpRequestApi.getUserAuth().success(res => {
+      console.log(res)
+      const str = 'myData.isVIP'
+      if(res.data.data){
+        this.setData({
+          [str]: true
+        })
+      }else{
+        this.setData({
+          [str]: false
+        })
+      }
+    })
   }
 })

+ 5 - 39
pages/main/class/class.js

@@ -122,16 +122,9 @@ Page({
     })
   },
   goToReading: function () {
-
-    let classId = this.data.id;
-    // httpRequestApi.checkLesson(classId).success(res => {
-    //   const productId = res.data.data[0];
-    //   this.setData({
-    //     productId
-    //   })
-    // });
+    
     getOpenidSessionKey((res) => {
-      httpRequestApi.areYouSuper(this.data.productId).success(res => {
+      httpRequestApi.getUserAuth().success(res => {
         if (res.data.success) {
           const that = this;
           wx.authorize({
@@ -156,38 +149,11 @@ Page({
             }
           })
         } else {
-          // ios用户 并且没有购买过此书
-          // if (app.globalData.isIOS) {
-          //   wx.showModal({
-          //     title: '暂不支持',
-          //     content: '十分抱歉,由于相关规定,您暂时无法在这里朗读',
-          //     success(res) {
-          //       if (res.confirm) {
-          //         console.log('用户点击确定')
-          //       } else if (res.cancel) {
-          //         console.log('用户点击取消')
-          //       }
-          //     }
-          //   })
-          //   return;
-          // }
+          console.log('chulaiba')
           this.setData({
-            isModalShow: true
+              modalType: this.data.isIOS ? 'iosCode' : 'androidVIP',
+              isModalShow: true
           })
-          // wx.showModal({
-          //   title: '您未购买过本书,不能朗读',
-          //   content: '超值团购进行中,快去看看',
-          //   success(res) {
-          //     if (res.confirm) {
-          //       console.log('用户点击确定')
-          //       wx.navigateTo({
-          //         url: `../../groupPage/grade-details/grade-details?productId=${productId}`
-          //       })
-          //     } else if (res.cancel) {
-          //       console.log('用户点击取消')
-          //     }
-          //   }
-          // })
         }
       })
     }, (error) => {

+ 40 - 72
pages/social/works/works.js

@@ -37,26 +37,23 @@ Page({
         alertFlag: false,
         modalType: "text",
         noScroll: '',
-        modalText: app.globalData.isIOS ?
-            [{
-                    text: '由于相关规范,ios功能暂不可用',
-                    type: 'bigOrange'
-                },
-                {
-                    text: '联系客服解锁哦',
-                    type: 'normal'
-                }
-            ]
-            :
-            [{
-                    text: '快去开通VIP',
-                    type: 'bigOrange'
-                },
-                {
-                    text: '享受更多权益吧',
-                    type: 'normal'
-                }
-            ],
+        modalText: app.globalData.isIOS ? [{
+                text: '由于相关规范,ios功能暂不可用',
+                type: 'bigOrange'
+            },
+            {
+                text: '联系客服解锁哦',
+                type: 'normal'
+            }
+        ] : [{
+                text: '快去开通VIP',
+                type: 'bigOrange'
+            },
+            {
+                text: '享受更多权益吧',
+                type: 'normal'
+            }
+        ],
         modalBtnText: '解锁课程',
         isModalShow: false,
         modalCloseShow: true,
@@ -387,11 +384,10 @@ Page({
         // } 
     },
     goToReading: function () {
-        console.log('chulaiba')
-        this.setData({
-            isModalShow: true
-        })
-        return
+        // this.setData({
+        //     isModalShow: true
+        // })
+        // return
         const classId = this.data.classId;
         if (this.innerAudioContext && this.videoCtx) {
             this.videoCtx.pause();
@@ -400,8 +396,8 @@ Page({
             console.log('关闭音频')
         }
         getOpenidSessionKey((res) => {
-            httpRequestApi.areYouSuper(this.data.productId).success(res => {
-                if (res.data.success) {
+            httpRequestApi.getUserAuth().success(res => {
+                if (res.data.data) {
                     wx.authorize({
                         scope: 'scope.record',
                         success() {
@@ -424,39 +420,12 @@ Page({
                         }
                     })
                 } else {
-                    // ios用户 并且没有购买过此书
-                    // if (this.data.isIOS) {
-                    //     wx.showModal({
-                    //         title: '暂不支持',
-                    //         content: '十分抱歉,由于相关规定,您暂时无法在这里朗读',
-                    //         success(res) {
-                    //             if (res.confirm) {
-                    //                 console.log('用户点击确定')
-                    //             } else if (res.cancel) {
-                    //                 console.log('用户点击取消')
-                    //             }
-                    //         }
-                    //     })
-                    //     return;
-                    // }
                     console.log('chulaiba')
                     this.setData({
+                        modalType: this.data.isIOS ? 'iosCode' : 'androidVIP',
                         isModalShow: true
                     })
-                    // wx.showModal({
-                    //     title: '您未购买过本书,不能朗读',
-                    //     content: '超值团购进行中,快去看看',
-                    //     success(res) {
-                    //         if (res.confirm) {
-                    //             console.log('用户点击确定')
-                    //             wx.navigateTo({
-                    //                 url: `../../groupPage/grade-details/grade-details?productId=${productId}`
-                    //             })
-                    //         } else if (res.cancel) {
-                    //             console.log('用户点击取消')
-                    //         }
-                    //     }
-                    // })
+
                 }
             })
         }, (error) => {
@@ -773,24 +742,23 @@ Page({
         })
     },
     modalConfirmHandler: function () {
-
-        if (this.data.modalType === 'image') {
-            this.setData({
-                modalType: 'text',
-                isModalShow: false,
-                ifReward: false,
-                modalCloseShow: true,
-                modalBtnText: "去开团",
-                // ifReward: false
+        if (this.data.isIOS) {
+            wx.setClipboardData({
+                data: '微信号',
+                success: function (res) {
+                    wx.getClipboardData({
+                        success: function (res) {
+                            console.log(res.data) // data
+                        }
+                    })
+                }
+            })
+        } else {
+            wx.navigateTo({
+                url: `../../vipPage/vip/vip`
             })
-            return false
         }
-        this.setData({
-            isModalShow: false
-        })
-        wx.navigateTo({
-            url: `../../groupPage/grade-details/grade-details?productId=${this.data.productId}`
-        })
+
     },
     modalCloseHandler: function () {
         this.setData({

+ 16 - 4
pages/vipPage/vip/vip.js

@@ -1,15 +1,17 @@
 // pages/user/walletDetails/walletDetails.js
 import Date from '../../../utils/util.js'
 import APIClient from '../../../utils/APIClient.js'
+import utils from '../../../utils/util'
 Page({
 
   data: {
     buyBtnText: '立即开通',
     price: '29',
-    originPrice: '99',
+    bottomText: '原价99元/年',
     productId: 0,
     modalType: 'image',
     isModalShow: false,
+    isVIP: false
   },
   onLoad: function (options) {
     if (options.title) {
@@ -25,6 +27,18 @@ Page({
     }).fail(err => {
       console.log(err);
     });
+    APIClient.getUserAuth().success(res => {
+      if (res.data.data) {
+        this.setData({
+          isVIP: true,
+          bottomText: `有效期:${utils.formatDate(res.data.data.endTime,2)}`
+        })
+      } else {
+        this.setData({
+          isVIP: false
+        })
+      }
+    })
   },
 
   createOrder() {
@@ -50,9 +64,7 @@ Page({
       },
       'fail': function (res) {
         console.log('支付失败', res)
-        that.setData({
-          haveTapMoney: false
-        })
+        
       }
     })
   },

+ 2 - 2
pages/vipPage/vip/vip.wxml

@@ -9,9 +9,9 @@
                 <text class="priceIcon">¥</text>
                 <text>{{price}}</text>
             </view>
-            <text class="originPrice">原价{{originPrice}}元/年</text>
+            <text class="originPrice">{{bottomText}}</text>
         </view>
     </view>
-    <view class="buyBtn" bindtap="createOrder">{{buyBtnText}}</view>
+    <view class="buyBtn" bindtap="createOrder">{{isVIP? '续费' : '立即开通'}}</view>
     <myModal id="myModal" type="{{'androidVIP'}}" isCloseShow="{{false}}" wx:if="{{isModalShow}}" bindconfirm="modalConfirmHandler" />
 </view>

+ 78 - 8
pages/vipPage/vipCode/vipCode.js

@@ -10,6 +10,17 @@ Page({
     productId: 0,
     modalType: 'image',
     isModalShow: false,
+    isCloseShow: false,
+    modalText: [{
+        text: '您发起的团购尚未完成',
+        type: 'bigOrange'
+      },
+      {
+        text: '拼团成功,才能发起新的团购',
+        type: 'bigOrange'
+      }
+    ],
+    closeCallBack: false
   },
   onLoad: function (options) {
     if (options.title) {
@@ -20,19 +31,78 @@ Page({
   },
 
   activeVIP() {
-    // APIClient.postOrder(this.data.productId).success(res => {
-    //   this.prePayMap(res.data.data)
-    // }).fail(err => {
-    //   console.log(err);
-    // });
+
+    console.log(11111, this.data.code)
+    APIClient.postActiveCode(this.data.code).success(res => {
+      switch (res.data.code) {
+        case 200:
+          this.setData({
+            isModalShow: true,
+            modalText: [{
+                text: '激活成功!',
+                type: 'bigOrange'
+              },
+              {
+                text: '您已获得一年VIP权限',
+                type: 'bigOrange'
+              }
+            ],
+            closeCallBack: 'index'
+          })
+          break;
+        case 531:
+          // 激活码已经用过了
+          this.setData({
+            isModalShow: true,
+            modalText: [{
+                text: '激活失败!',
+                type: 'bigOrange'
+              },
+              {
+                text: '验证码已经使用过了',
+                type: 'bigOrange'
+              }
+            ]
+          })
+          break;
+        case 404:
+          //激活码不存在
+          this.setData({
+            isModalShow: true,
+            modalText: [{
+                text: '激活失败!',
+                type: 'bigOrange'
+              },
+              {
+                text: '验证码错误',
+                type: 'bigOrange'
+              }
+            ]
+          })
+          break;
+        default:
+          break;
+      }
+
+    }).fail(err => {
+      console.log(err);
+    });
+  },
+  saveValue(e) {
+    console.log(e)
+    this.setData({
+      code: e.detail.value
+    });
   },
 
   modalConfirmHandler() {
     this.setData({
       isModalShow: false
     })
-    wx.redirectTo({
-      url: `/pages/index/index`
-    })
+    if (this.data.closeCallBack === 'index') {
+      wx.redirectTo({
+        url: `/pages/index/index`
+      })
+    }
   },
 })

+ 7 - 2
pages/vipPage/vipCode/vipCode.wxml

@@ -1,6 +1,11 @@
 <view class="vipCode">
     <view class="greenHolder"></view>
-    <input  maxlength="10" class='code' type='number' placeholder='在此处输入或粘贴激活码' ></input>
+    <input  maxlength="10" class='code' bindinput='saveValue' type='number' placeholder='在此处输入或粘贴激活码' ></input>
     <view class="buyBtn" bindtap="activeVIP">{{buyBtnText}}</view>
-    <myModal id="myModal" type="{{'androidVIP'}}" isCloseShow="{{false}}" wx:if="{{isModalShow}}" bindconfirm="modalConfirmHandler" />
+    <view class="bottomText">
+        <view class="text">注意:</view>
+        <view class="text">1.小程序暂不支持开通会员,详情请咨询客服,获取激活码。</view>
+        <view class="text">2.粘贴激活码时请检测两端是否有空格或其他字符。</view>
+    </view>
+    <myModal id="myModal" type="{{'text'}}" text="{{modalText}}" isCloseShow="{{isCloseShow}}" wx:if="{{isModalShow}}" bindconfirm="modalConfirmHandler" />
 </view>

+ 22 - 0
pages/vipPage/vipCode/vipCode.wxss

@@ -40,4 +40,26 @@
     margin: 200rpx auto 0;
     background: #ff9312;
     border-radius: 48rpx;
+}
+
+.bottomText {
+    height: 150rpx;
+    width: 100%;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    position: absolute;
+    bottom: 200rpx;
+    color: #6a6a6a;
+    font-size: 25rpx;
+    padding-left: 54rpx;
+
+}
+
+.text {
+    width: 100%;
+    text-align: left;
+    margin-bottom: 10rpx;
+
 }

+ 17 - 0
utils/APIClient.js

@@ -503,5 +503,22 @@ module.exports = {
     }).data({
       productId
     }).url(url).method('POST').send();
+  },
+  //激活码激活
+  postActiveCode(code){
+    console.log(22222,code)
+    let url = getBaseUrl('wx/activationCode');
+    return request.getInstance().header({
+      uid: wx.getStorageSync('uid'),
+    }).data({
+      code
+    }).url(url).method('POST').send();
+  },
+  // 会员鉴权
+  getUserAuth(){
+    let url = getBaseUrl('wx/auth');
+    return request.getInstance().header({
+      uid: wx.getStorageSync('uid')
+    }).url(url).send();
   }
 }