liyongli před 3 roky
rodič
revize
d769544ed6
84 změnil soubory, kde provedl 496 přidání a 3286 odebrání
  1. 27 0
      cloudfunctions/quickstartFunctions/createQuestionRecord/index.js
  2. 31 0
      cloudfunctions/quickstartFunctions/getQuestionRecord/index.js
  3. 6 0
      cloudfunctions/quickstartFunctions/index.js
  4. 0 2
      miniprogram/app.js
  5. 3 8
      miniprogram/app.json
  6. 0 147
      miniprogram/pages/analysis/index.js
  7. 0 16
      miniprogram/pages/analysis/index.json
  8. 0 144
      miniprogram/pages/analysis/index.wxml
  9. 0 194
      miniprogram/pages/analysis/index.wxss
  10. 23 6
      miniprogram/pages/answer/index.js
  11. 1 1
      miniprogram/pages/answer/index.wxml
  12. 0 22
      miniprogram/pages/answerErr/index.js
  13. 0 5
      miniprogram/pages/answerErr/index.json
  14. 0 9
      miniprogram/pages/answerErr/index.wxml
  15. 0 1
      miniprogram/pages/answerErr/index.wxss
  16. 5 0
      miniprogram/pages/answerInfo/index.js
  17. 4 1
      miniprogram/pages/answerInfo/index.wxml
  18. 2 7
      miniprogram/pages/answerInfo/index.wxss
  19. 112 0
      miniprogram/pages/detail/index.js
  20. 3 0
      miniprogram/pages/detail/index.json
  21. 7 0
      miniprogram/pages/detail/index.wxml
  22. 76 0
      miniprogram/pages/detail/index.wxss
  23. 4 0
      miniprogram/pages/detail/template/text/index.wxml
  24. 16 0
      miniprogram/pages/detail/template/video/index.wxml
  25. 0 66
      miniprogram/pages/feedback/index.js
  26. 0 2
      miniprogram/pages/feedback/index.wxml
  27. 0 66
      miniprogram/pages/history/index.js
  28. 0 2
      miniprogram/pages/history/index.wxml
  29. 0 66
      miniprogram/pages/historyList/index.js
  30. 0 2
      miniprogram/pages/historyList/index.wxml
  31. 0 2
      miniprogram/pages/my/index.wxml
  32. 20 3
      miniprogram/pages/problemPage/index.js
  33. 0 66
      miniprogram/pages/rank/index.js
  34. 0 2
      miniprogram/pages/rank/index.wxml
  35. 0 66
      miniprogram/pages/rankList/index.js
  36. 0 2
      miniprogram/pages/rankList/index.wxml
  37. 123 0
      miniprogram/pages/record/index.js
  38. 3 0
      miniprogram/pages/record/index.json
  39. 8 0
      miniprogram/pages/record/index.wxml
  40. 14 0
      miniprogram/pages/record/index.wxss
  41. 1 1
      miniprogram/pages/result/index.js
  42. 3 0
      miniprogram/pages/result/index.json
  43. 3 0
      miniprogram/pages/result/index.wxml
  44. 1 0
      miniprogram/pages/result/index.wxss
  45. 0 0
      miniprogram/utils/Bmob-1.6.5.min.js
  46. 0 407
      miniprogram/wux/animation-group/index.js
  47. 0 3
      miniprogram/wux/animation-group/index.json
  48. 0 3
      miniprogram/wux/animation-group/index.wxml
  49. 0 250
      miniprogram/wux/animation-group/index.wxss
  50. 0 98
      miniprogram/wux/button/index.js
  51. 0 3
      miniprogram/wux/button/index.json
  52. 0 22
      miniprogram/wux/button/index.wxml
  53. 0 309
      miniprogram/wux/button/index.wxss
  54. 0 38
      miniprogram/wux/cell-group/index.js
  55. 0 3
      miniprogram/wux/cell-group/index.json
  56. 0 7
      miniprogram/wux/cell-group/index.wxml
  57. 0 33
      miniprogram/wux/cell-group/index.wxss
  58. 0 79
      miniprogram/wux/cell/index.js
  59. 0 3
      miniprogram/wux/cell/index.json
  60. 0 21
      miniprogram/wux/cell/index.wxml
  61. 0 77
      miniprogram/wux/cell/index.wxss
  62. 0 176
      miniprogram/wux/countdown/index.js
  63. 0 220
      miniprogram/wux/countup/index.js
  64. 0 77
      miniprogram/wux/helpers/baseBehavior.js
  65. 0 18
      miniprogram/wux/helpers/colors.js
  66. 0 38
      miniprogram/wux/helpers/gestures.js
  67. 0 17
      miniprogram/wux/helpers/mergeOptionsToData.js
  68. 0 47
      miniprogram/wux/index.js
  69. 0 35
      miniprogram/wux/prompt/index.js
  70. 0 6
      miniprogram/wux/prompt/index.json
  71. 0 15
      miniprogram/wux/prompt/index.wxml
  72. 0 47
      miniprogram/wux/prompt/index.wxss
  73. 0 46
      miniprogram/wux/radio-group/index.js
  74. 0 6
      miniprogram/wux/radio-group/index.json
  75. 0 3
      miniprogram/wux/radio-group/index.wxml
  76. 0 0
      miniprogram/wux/radio-group/index.wxss
  77. 0 76
      miniprogram/wux/radio/index.js
  78. 0 6
      miniprogram/wux/radio/index.json
  79. 0 6
      miniprogram/wux/radio/index.wxml
  80. 0 12
      miniprogram/wux/radio/index.wxss
  81. 0 73
      miniprogram/wux/result/index.js
  82. 0 6
      miniprogram/wux/result/index.json
  83. 0 55
      miniprogram/wux/result/index.wxml
  84. 0 36
      miniprogram/wux/result/index.wxss

+ 27 - 0
cloudfunctions/quickstartFunctions/createQuestionRecord/index.js

@@ -0,0 +1,27 @@
+const cloud = require('wx-server-sdk')
+
+cloud.init({
+  env: cloud.DYNAMIC_CURRENT_ENV
+})
+const db = cloud.database()
+const QuestionRecord = db.collection("questionRecord");
+
+// 修改数据库信息云函数入口函数
+exports.main = async (event, context) => {
+  try {
+    const QRData = event.data || {};
+    const QR = await QuestionRecord.add({ data: QRData });
+    return {
+      code: 0,
+      data: {
+        ...QRData,
+        _id: QR._id
+      }
+    }
+  } catch (e) {
+    return {
+      code: 1,
+      errMsg: e
+    }
+  }
+}

+ 31 - 0
cloudfunctions/quickstartFunctions/getQuestionRecord/index.js

@@ -0,0 +1,31 @@
+const cloud = require('wx-server-sdk')
+
+cloud.init({
+  env: cloud.DYNAMIC_CURRENT_ENV
+})
+const db = cloud.database()
+const QuestionRecord = db.collection("questionRecord");
+
+// 修改数据库信息云函数入口函数
+exports.main = async (event, context) => {
+  try {
+    const QRData = event.data || {};
+    const wxContext = cloud.getWXContext();
+    const que = {
+      userId: wxContext.OPENID
+    };
+    let Page = QRData.Page || 1;
+    let Size = QRData.Size || 20;
+    QRData.queId && (que.queId = QRData.queId);
+    const QR = await QuestionRecord.where(que).skip((Page - 1) * Size).limit(Page * Size).get();
+    return {
+      code: 0,
+      data: QR.data || []
+    }
+  } catch (e) {
+    return {
+      code: 1,
+      errMsg: e
+    }
+  }
+}

+ 6 - 0
cloudfunctions/quickstartFunctions/index.js

@@ -1,6 +1,8 @@
 const getUser = require('./getUser/index')
 const createUser = require('./createUser/index')
 const questionBank = require('./questionBank/index')
+const createQuestionRecord = require('./createQuestionRecord/index')
+const getQuestionRecord = require('./getQuestionRecord/index')
 
 // 云函数入口函数
 exports.main = async (event, context) => {
@@ -14,5 +16,9 @@ exports.main = async (event, context) => {
     case 'questionBankList':
       // 获得题库
       return await questionBank.main(event, context)
+    case 'createQuestionRecord':
+      return await createQuestionRecord.main(event, context)
+    case 'getQuestionRecord':
+      return await getQuestionRecord.main(event, context)
   }
 }

+ 0 - 2
miniprogram/app.js

@@ -1,8 +1,6 @@
 //app.js
-const Bmob = require('utils/Bmob-1.6.5.min.js');
 const utils = require('utils/util.js');
 wx.cloud.init();
-Bmob.initialize("", "");
 wx.u = utils
 App({
   onLaunch: function () {

+ 3 - 8
miniprogram/app.json

@@ -3,15 +3,10 @@
     "pages/problemPage/index",
     "pages/index/index",
     "pages/answer/index",
-    "pages/history/index",
-    "pages/answerErr/index",
     "pages/answerInfo/index",
-    "pages/analysis/index",
-    "pages/rank/index",
-    "pages/rankList/index",
-    "pages/my/index",
-    "pages/historyList/index",
-    "pages/feedback/index"
+    "pages/result/index",
+    "pages/record/index",
+    "pages/detail/index"
   ],
   "window": {
     "backgroundTextStyle": "light",

+ 0 - 147
miniprogram/pages/analysis/index.js

@@ -1,147 +0,0 @@
-// pages/analysis/index.js
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-    s: ['A. ', 'B. ', 'C. ', 'D. ', 'E. '],
-    questionInfo:{},
-    loading: true,
-    result:{},
-    disabled:true,
-    actionVisible:false,
-    index:0,
-    chose:[],
-    showVideo: false,
-    showHelpVideo:false
-  },
-
-  onLoad (options) {
-    var that = this;
-    wx.getSystemInfo({
-      success(res) {
-        that.setData({
-          windowWidth: res.windowWidth
-        })
-      }
-    })
-    var objectId = options.objectId
-    wx.u.getHistory(objectId).then(res => {
-      console.log(res)
-      var right = res.result.score
-      var wrong = res.result.questionList.length - right
-      var persent = parseFloat(right/res.result.questionList.length * 100).toFixed(2)
-      console.log(persent)
-      this.setData({
-        loading:false,
-        result:res.result,
-        right: right,
-        wrong: wrong,
-        persent: persent,
-        total: res.result.questionList.length
-      })
-      this.setThisData(this.data.index)
-    })   
-  },
-  onReady(res) {
-    this.videoContext = wx.createVideoContext('myVideo')
-    this.helpVideoContext = wx.createVideoContext('helpVideo')
-  },
-  setThisData(i){
-    console.log(i)
-    const r = this.data.result.questionList
-    const answer = []
-    var current = "";
-    var currentD = [];
-    console.log(r)
-    for(var j=0;j<r[i].choseList.length;j++){
-      if(r[i].choseList[j].isChose){
-        answer.push(this.data.s[j] + r[i].choseList[j].item)
-      }
-    }
-    this.setData({
-      current: current,
-      currentD: currentD,
-      questionInfo: r[i],
-      answer: answer,
-    })
-    console.log(this.data.current)
-  },
-  handlePageChange({ detail }){
-    const action = detail.type;
-    const r = this.data.result.questionList
-    
-    
-    if (action === 'next') {
-      if(this.data.index >= (r.length-1)){
-        console.log(this.data.index)
-        return;
-      }
-      this.setThisData((this.data.index +1));
-      this.setData({
-        index: (this.data.index + 1),
-      })
-    } else {
-      this.setThisData((this.data.index - 1));
-      this.setData({
-        index: (this.data.index - 1),
-      })
-    }
-  },
-  //弹出统计下拉层
-  handleOpen() {
-    this.hideVideo()
-    this.hideHelpVideo()
-    this.setData({
-      actionVisible: true
-    })
-  },
-  //关闭统计下拉层
-  actionCancel() {
-    this.setData({
-      actionVisible: false
-    })
-  },
-  dump(e){
-    console.log(e)
-    var index = e.currentTarget.dataset.index
-    this.setThisData(index)
-    this.setData({
-      index:index,
-      actionVisible: false
-    })
-  },
-  //放大图片
-  showPic: function (e) {
-    const src = e.currentTarget.dataset.src;
-    wx.previewImage({
-      current: src,
-      urls: [src]
-    })
-  },
-  showVideo() {
-    this.videoContext.play()
-    this.setData({
-      showVideo: true
-    })
-  },
-  hideVideo: function () {
-    this.videoContext.pause()
-    this.setData({
-      showVideo: false
-    });
-  },
-  showHelpVideo() {
-    this.helpVideoContext.play()
-    this.setData({
-      showHelpVideo: true
-    })
-  },
-  hideHelpVideo: function () {
-    this.helpVideoContext.pause()
-    this.setData({
-      showHelpVideo: false
-    });
-  },
-})

+ 0 - 16
miniprogram/pages/analysis/index.json

@@ -1,16 +0,0 @@
-{
-  "usingComponents": {
-    "i-spin": "../../dist/spin/index",
-    "i-row": "../../dist/row/index",
-    "i-col": "../../dist/col/index",
-    "i-tag": "../../dist/tag/index",
-    "i-panel": "../../dist/panel/index",
-    "i-radio-group": "../../dist/radio-group/index",
-    "i-radio": "../../dist/radio/index",
-    "i-page": "../../dist/page/index",
-    "i-checkbox-group": "../../dist/checkbox-group/index",
-    "i-checkbox": "../../dist/checkbox/index",
-    "i-icon": "../../dist/icon/index",
-    "i-action-sheet": "../../dist/action-sheet/index"
-  }
-}

+ 0 - 144
miniprogram/pages/analysis/index.wxml

@@ -1,144 +0,0 @@
-<!--pages/analysis/index.wxml-->
-<view class='page'>
-  <i-spin fix size="large" wx:if="{{loading}}"></i-spin>
-  <view class="header-model2 css-shadow-bottom">
-    <i-row>
-      <i-col span="15" i-class="col-class-down">
-        <text class="model2-timepiece">题目:{{result.questionMenu}}</text>
-      </i-col>
-    </i-row>
-  </view>
-  <!--题目-->
-  <view style='padding-bottom:44px;'>
-    <view class="question-list">
-      <view class="question-list-title">
-        <i-tag class="i-tags" name="单选" type="border" color="blue" wx:if="{{questionInfo.type==1}}">
-          单选
-        </i-tag>
-        <i-tag class="i-tags" name="多选" type="border" color="blue" wx:if="{{questionInfo.type==2}}">
-          多选
-        </i-tag>
-        <text class='question-title'>{{questionInfo.title}}</text>
-      </view>
-    </view>
-    <image wx:if="{{questionInfo.picUrl}}" style="width: 100%; height: 200px; background-color: #fff;" mode="aspectFit" src="{{questionInfo.picUrl}}" data-src="{{questionInfo.picUrl}}" catchtap="showPic"></image>
-    <audio wx:if="{{questionInfo.audio}}" style="width:{{windowWidth}}px;margin-bottom:10px;text-align:center;" src="{{questionInfo.audio}}" id="myAudio" controls loop></audio>
-    <view wx:if="{{questionInfo.video}}" class='view' style='width:{{windowWidthpx}};height:225px;' bindtap='showVideo' hidden='{{showVideo}}'></view>
-    <video wx:if="{{questionInfo.video}}" hidden='{{!showVideo}}' src="{{questionInfo.video}}" objectFit="cover" style="width:{{windowWidth}}px;margin-bottom:10px;" page-gesture="true" show-fullscreen-btn="false" id="myVideo" bindpause='hideVideo' bindended='hideVideo' controls>
-    </video>
-    <!--答案选择 - 单选-->
-    <i-panel wx:if="{{questionInfo.type==1}}">
-      <i-radio-group wx:for="{{questionInfo.choseList}}" wx:key="item.id" current="{{current}}">
-        <i-radio disabled="{{disabled}}" position="left" value="{{s[index]}}{{item.item}}">
-        </i-radio>
-      </i-radio-group>
-    </i-panel>
-
-    <!--答案选择 - 多选-->
-    <i-panel wx:if="{{questionInfo.type==2}}">
-      <i-checkbox-group current="{{currentD}}" wx:for="{{questionInfo.choseList}}" wx:key="{{item.id}}">
-        <i-checkbox disabled="{{disabled}}" wx:key="{{index}}" position="left" wx:key="{{item.id}}" value="{{s[index]}}{{item.item}}">
-        </i-checkbox>
-      </i-checkbox-group>
-    </i-panel>
-
-    <!--帮助-->
-    <i-panel>
-      <view>
-        <view class='answer'>
-          <view class='answerTitle'>正确答案:</view>
-          <view class='answerContent'>
-            <view wx:for="{{answer}}" wx:key="answer">{{item}}</view>
-          </view>
-          <view class='answerTitle'>你的答案:</view>
-          <view wx:if="{{questionInfo.choose.length>0}}" class='answerContent'>
-            <view wx:for="{{questionInfo.choose}}" wx:key="answer">{{item}}</view>
-          </view>
-          <view wx:else class='answerContent'>
-            <view>空</view>
-          </view>
-          <view class='answerTitle'>解析:</view>
-          <view wx:if="{{questionInfo.help !=''}}" class='answerContent'>
-            {{questionInfo.help}}
-          </view>
-        </view>
-        
-        <image wx:if="{{questionInfo.helpPicUrl}}" style="width: 100%; height: 200px; background-color: #fff;padding:0;" mode="aspectFit" src="{{questionInfo.helpPicUrl}}" data-src="{{questionInfo.helpPicUrl}}" catchtap="showPic"></image>
-        <audio wx:if="{{questionInfo.helpAudioUrl}}" style="width:{{windowWidth}}px;margin-bottom:10px;text-align:center;" src="{{questionInfo.helpAudioUrl}}" id="myAudio" controls loop></audio>
-        <view wx:if="{{questionInfo.helpVideoUrl}}" class='view' style='width:{{windowWidthpx}};height:225px;' bindtap='showHelpVideo' hidden='{{showHelpVideo}}'></view>
-        <video wx:if="{{questionInfo.helpVideoUrl}}" hidden='{{!showHelpVideo}}' src="{{questionInfo.helpVideoUrl}}" objectFit="cover" style="width:{{windowWidth}}px;margin-bottom:10px;" page-gesture="true" show-fullscreen-btn="false" id="helpVideo"  bindpause='hideHelpVideo' bindended='hideHelpVideo' controls></video>
-        <view wx:if="{{questionInfo.help == '' && questionInfo.helpPicUrl == '' && questionInfo.helpAudioUrl == '' && questionInfo.helpVideoUrl == '' }}" class='answerContent'>
-          无
-        </view>
-      </view>
-    </i-panel>
-
-    <!--底部栏-->
-    <view class='css-shadow tab-bar'>
-      <!-- 分页 -->
-      <i-page current="{{ index+1 }}" total="total" bind:change="handlePageChange">
-        <view slot="prev">
-          <i-icon type="return"></i-icon>
-          上一题
-        </view>
-        <view slot="content">
-          <i-row>
-            <i-col span="23">
-              <view>
-                <button class="footer-defbtn" bindtap='handleOpen'>
-                  <i-icon type="task" size='25' color="#3D971C" class='footer-btn-text' />
-                  <view class='footer-btn-text'>
-                    <text>{{index+1}}/{{total}}</text>
-                  </view>
-                </button>
-              </view>
-            </i-col>
-          </i-row>
-        </view>
-        <view slot="next">
-          <view style='height:100%;'>
-            下一题
-            <i-icon type="enter"></i-icon>
-          </view>
-        </view>
-      </i-page>
-    </view>
-    <!--下拉弹出-->
-    <i-action-sheet visible="{{ actionVisible }}" actions="" bind:cancel="actionCancel" bind:click="actionClickItem">
-      <view slot="header" style="padding:2px">
-        <view class="i-action-header">
-          <i-row>
-            <i-col span="20" i-class="col-class">
-              <view class="i-action-header-left">
-                <text>正确: <text style="font-weight: bold;color:#3D971C">{{right}}</text></text>
-                <text>错误: <text style="font-weight: bold;color:#A01E32">{{(wrong)}}</text></text>
-                <text>正确率: <text style="font-weight: bold;color:#18836b">{{persent}}%</text></text>
-              </view>
-            </i-col>
-            <i-col span="4" i-class="col-class">
-              <view class="i-action-header-r">
-
-                <button style="padding:0px;" bindtap="actionCancel" size="small">关闭</button>
-
-              </view>
-            </i-col>
-          </i-row>
-        </view>
-        <scroll-view>
-          <view class='i-action-ico'>
-
-            <view wx:for="{{result.questionList}}" class="i-action-ico-bor" wx:for-index="idx" for:key="i" data-index="{{idx}}" bindtap='dump'>
-              <view class=" {{item.judge==1?'succ':item.judge==0?'err':''}}">
-                <i-icon type="right" color="#3D971C" wx:if="{{item.judge==1}}" size="14" />
-                <i-icon type="close" color="#A01E32" wx:if="{{item.judge==0}}" size="14" />
-                <text>{{idx+1}}</text>
-              </view>
-            </view>
-            <!-- <view>1 </view> -->
-          </view>
-        </scroll-view>
-      </view>
-    </i-action-sheet>
-    <!--下拉弹出-->
-  </view>
-</view>

+ 0 - 194
miniprogram/pages/analysis/index.wxss

@@ -1,194 +0,0 @@
-/* pages/analysis/index.wxss */
-page {
-  overflow-x: hidden;
-}
-
-button::after {
-  border: none;
-}
-
-.i-action-header {
-  padding: 6px;
-  text-align: left;
-}
-
-.i-action-header-left {
-  text-align: left;
-  font-size: 14px;
-}
-
-.i-action-header-left>text {
-  margin-right: 8px;
-}
-
-.i-action-header-left>text>text {
-  font-weight: bold;
-}
-
-.i-action-header-r {
-  display: flex;
-  justify-content: right;
-  align-items: right;
-}
-
-.i-action-header-r>button {
-  margin: 0px;
-  flex: 1;
-  right: 0px;
-  width: 60px;
-  height: 24px;
-  text-align: center;
-  vertical-align: middle;
-  touch-action: manipulation;
-  cursor: pointer;
-  background-image: none;
-  white-space: nowrap;
-  user-select: none;
-  font-size: 14px;
-  border-radius: 2px;
-  border: 0 !important;
-  position: relative;
-  text-decoration: none;
-  line-height: 24px;
-  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
-  color: #fff !important;
-  background: #ff9c5e !important;
-}
-
-input {
-  outline: none;
-  border: none;
-  list-style: none;
-}
-
-.header-model2 {
-  padding: 12px 8px;
-  position: relative;
-}
-
-.col-class {
-  text-align: center;
-}
-
-.col-class-down {
-  text-align: center;
-}
-
-.col-class-sub {
-  position: absolute;
-  left: 76%;
-}
-
-.header-btn {
-  float: right;
-  height: 20px !important;
-  line-height: 20px !important;
-  margin: 0px !important;
-}
-
-.btn-text {
-  vertical-align: middle;
-}
-
-.model2-timepiece {
-  border: 1px solid #2db7f5;
-  border-radius: 5px;
-  padding: 5px 6px;
-}
-
-.submit {
-  background: #2db7f5;
-  padding: 7px 16px;
-  border-radius: 5px;
-  color: #fff;
-}
-
-view.i-action-ico {
-  display: flex;
-  flex-wrap: wrap;
-  padding: 6px;
-}
-
-view.i-action-ico-bor {
-  width: 10%;
-  display: flex;
-  flex-wrap: wrap;
-  align-items: center;
-}
-
-view.i-action-ico-bor>view {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 100%;
-  text-align: center;
-  margin: 1px;
-  background: #f8f8f8;
-  border-radius: 5px;
-  height: 30px;
-}
-
-view.i-action-ico-bor>view.err {
-  color: #a01e32;
-  background: #fba4b1;
-}
-
-view.i-action-ico-bor>view.succ {
-  color: #3d971c;
-  background: #b6f49f;
-}
-
-view.i-action-ico-bor>view.def {
-  color: #18836b;
-  background: #95e4d2;
-}
-
-.question-list {
-  padding: 15px;
-}
-
-.question-list-title {
-  font-size: 15px;
-}
-
-.question-title {
-  margin-left: 8px;
-  line-height: 25px;
-}
-
-.tab-bar {
-  background: #fff;
-  position: fixed;
-  bottom: 0px;
-  width: 100%;
-}
-
-.footer-defbtn {
-  line-height: 22px;
-  background-color: #fff;
-  font-size: 14px;
-  padding: 0;
-}
-
-.answer{
-  padding:26rpx;
-}
-.answerTitle{
-  color: #717171;
-  font-size: 32rpx;
-  margin-bottom: 26rpx;
-}
-.answerContent{
-  font-size: 32rpx;
-  margin-bottom: 26rpx;
-}
-.view{
-	background-color: #000;
-	vertical-align: top;
-	background-image: url('https://upload-images.jianshu.io/upload_images/6673460-7f784471f2c4e4c0.png');
-	background-repeat: no-repeat;
-	background-position: center;
-	background-size: 60rpx;
-	margin: 10rpx 0;
-}
-

+ 23 - 6
miniprogram/pages/answer/index.js

@@ -56,7 +56,14 @@ Page({
       let d = new Date();
       let c = d - this.actTime;
       let Q = app.globalData.selectQuestion;
-      if (c >= Q.duration) return clearInterval(this.interval);
+      if (c >= Q.duration) {
+        wx.showModal({
+          title: "提示",
+          content: '时间到请点击确认后交卷',
+          success: this.isSubmit
+        })
+        return clearInterval(this.interval);
+      }
       let longTime = Q.duration - c;
       let h = Math.floor(longTime / 3600000);
       let m = Math.floor(longTime % 3600000 / 60000);
@@ -123,10 +130,9 @@ Page({
     wx.showModal(modal)
   },
   isSubmit() {
-    this.answer;
     let p = {
       queId: app.globalData.selectQuestion._id,
-      userId: app.globalData.userInfo._id,
+      userId: app.globalData.userInfo._openid,
       startTime: this.actTime,
       endTime: new Date(),
       answer: this.answer
@@ -139,12 +145,23 @@ Page({
       v.answer.map(r => {
         isAdd = (new RegExp(r.select)).test(an)
       })
-      console.log(isAdd)
       if (v.answer.length === this.answer[i].length && isAdd) score++;
     }
     p.score = score;
-    let recordList = app.globalData.userInfo.recordList || [];
-    recordList ? recordList.push(p) : recordList = [p];
+    wx.showLoading();
+    wx.cloud.callFunction({
+      name: "quickstartFunctions",
+      data: {
+        type: "createQuestionRecord",
+        data: p
+      }
+    }).then(res => {
+      console.log(res);
+
+    }).catch(err => {
+      console.log(err)
+      wx.hideLoading()
+    })
   },
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 1 - 1
miniprogram/pages/answer/index.wxml

@@ -43,7 +43,7 @@
     </view>
     <view class="Fcenter">{{data.current}}/{{data.total}}</view>
     <view wx:if="{{data.current >= data.total}}" style="padding-top: {{(height[0] - 29)/2}}px;">
-      <button style="" type="warn" size="mini" bindtap="submit">交卷</button>
+      <button type="warn" size="mini" bindtap="submit">交卷</button>
     </view>
     <view wx:else bindtap="next">
       下一题

+ 0 - 22
miniprogram/pages/answerErr/index.js

@@ -1,22 +0,0 @@
-Page({
-  data: {
-    icon: {
-      type: 'warn',
-      color: '#ef473a',
-    },
-    buttons: [{
-      type: 'balanced',
-      block: true,
-      text: '重新加载',
-    }
-    ],
-  },
-  onClick(e) {
-    console.log(e)
-    const { index } = e.detail
-
-    index === 0 && wx.switchTab({
-      url: '/pages/select/index',
-    })
-  },
-})

+ 0 - 5
miniprogram/pages/answerErr/index.json

@@ -1,5 +0,0 @@
-{
-  "usingComponents": {
-    "wux-result": "../../wux/result/index"
-  }
-}

+ 0 - 9
miniprogram/pages/answerErr/index.wxml

@@ -1,9 +0,0 @@
-<!--pages/answerErr/index.wxml-->
-<wux-result
-    icon="{{ icon }}"
-    title="加载失败"
-    label="题目加载失败,返回重新加载。"
-    buttons="{{ buttons }}"
-    fixed
-    bind:click="onClick"
-/>

+ 0 - 1
miniprogram/pages/answerErr/index.wxss

@@ -1 +0,0 @@
-/* pages/answerErr/index.wxss */

+ 5 - 0
miniprogram/pages/answerInfo/index.js

@@ -21,6 +21,11 @@ Page({
       }
     })
   },
+  record(){
+    wx.navigateTo({
+      url: '/pages/record/index'
+    })
+  },
   start() {
     wx.reLaunch({
       url: '/pages/answer/index'

+ 4 - 1
miniprogram/pages/answerInfo/index.wxml

@@ -16,7 +16,10 @@
     本题库共{{question.list.length}}小题,包含单项选择题和多项选择题,每小题1分。单项选择题只有1个正确答案,多项选择题有多个正确答案,请从每题的备选答案中选出你认为正确的答案。答题不可修改,时间到,系统自动交卷。
   </text>
   </view>
-  <view class='startAnswer' bindtap='start'>
+  <view class='startAnswer' bindtap='start' style="margin-top: 100rpx;">
     答题
   </view>
+  <view class='startAnswer' bindtap='record'>
+    查看记录
+  </view>
 </view>

+ 2 - 7
miniprogram/pages/answerInfo/index.wxss

@@ -27,18 +27,13 @@
 
 }
 .startAnswer{
-  position: fixed;
-  bottom: 30%;
-  left: 50%;
-  margin-left: -125rpx;
   font-size: 30rpx;
   background-color: #2db7f5;
   width: 250rpx;
   height: 80rpx;
+  line-height: 80rpx;
   border-radius: 100rpx;
   color: #ffffff;
   text-align: center;
-  justify-content:center;
-  display:flex;
-  align-items:center;
+  margin: 30rpx auto 0 auto;
 }

+ 112 - 0
miniprogram/pages/detail/index.js

@@ -0,0 +1,112 @@
+// pages/detail/index.js
+const app = getApp();
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    detail: {},
+    playUrl: "",
+    videoData:{}
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    let que = app.globalData.selectQuestion || {};
+    wx.setNavigationBarTitle({
+      title: que.name
+    })
+    if (que.type === "video") {
+      que.content = que.content.map(v => {
+        v.play_count = this.formatNumber(v.play_count);
+        return v
+      })
+    }
+    this.setData({
+      detail: que || {}
+    })
+  },
+  formatNumber: function (n) {
+    if (isNaN(n)) return 0;
+    var out = n;
+    if (out >= 100000000) {
+      out = (out / 100000000).toFixed(2) + '亿';
+    } else if (out >= 10000) {
+      out = (out / 10000).toFixed(2) + '万';
+    }
+    return out
+  },
+  playVideo(e) {
+    this.setData({
+      playUrl: e.currentTarget.dataset.url || ""
+    })
+  },
+  bindloadedmetadata(e){
+    let p = {
+      ...e.detail
+    }
+    let sys = wx.getSystemInfoSync();
+    console.log(e.detail,sys.windowWidth);
+    p.height = p.height/p.width * sys.windowWidth;
+    p.width = sys.windowWidth;
+    this.setData({
+      videoData: p
+    })
+  },
+  closeVideo(){
+    this.setData({
+      playUrl: ""
+    })
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
miniprogram/pages/detail/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 7 - 0
miniprogram/pages/detail/index.wxml

@@ -0,0 +1,7 @@
+<!--pages/detail/index.wxml-->
+<import src="./template/text/index.wxml"></import>
+<import src="./template/video/index.wxml"></import>
+<view class="detail">
+  <template wx:if="{{detail.type === 'text'}}" is="text" data="{{...detail}}"></template>
+  <template wx:if="{{detail.type === 'video'}}" is="video" data="{{...detail, playUrl, videoData}}"></template>
+</view>

+ 76 - 0
miniprogram/pages/detail/index.wxss

@@ -0,0 +1,76 @@
+/* pages/detail/index.wxss */
+.detail {
+  min-height: 100%;
+  box-sizing: border-box;
+}
+
+.detail .timeStyle {
+  text-align: right;
+  padding-top: 10rpx;
+  font-size: 12px;
+  box-sizing: border-box;
+  color: #919191;
+}
+
+.detail .titleStyle {
+  text-align: left;
+  box-sizing: border-box;
+  padding-top: 10rpx;
+  font-size: 14px;
+  color: #282828;
+}
+
+.detail .videoList {
+  box-sizing: border-box;
+  display: inline-block;
+  width: 375rpx;
+  padding: 14px 12px;
+}
+
+.detail .mantle {
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  background-color: rgba(0, 0, 0, 0.6);
+}
+
+.detail .close {
+  border-radius: 50%;
+  border: 1rpx solid #fff;
+  width: 2em;
+  height: 2em;
+  position: relative;
+  float: right;
+  margin: 20rpx 20rpx 0 0;
+}
+
+.detail .left,
+.detail .right {
+  height: 1rpx;
+  border-radius: 5rpx;
+  background-color: #fff;
+  width: 1.6em;
+  position: absolute;
+  top: 50%;
+  left: 0.2em;
+  transform: rotate(45deg);
+  -ms-transform: rotate(45deg);
+  -moz-transform: rotate(45deg);
+  -webkit-transform: rotate(45deg);
+  -o-transform: rotate(45deg);
+}
+.detail .right{
+  transform: rotate(-45deg);
+  -ms-transform: rotate(-45deg);
+  -moz-transform: rotate(-45deg);
+  -webkit-transform: rotate(-45deg);
+  -o-transform: rotate(-45deg);
+}
+.detail .playVideo{
+  position: absolute;
+  top: 50%;
+  width: 750rpx;
+  transform: translatey(-50%);
+}

+ 4 - 0
miniprogram/pages/detail/template/text/index.wxml

@@ -0,0 +1,4 @@
+<template name="text">
+  <rich-text wx:if="{{content}}" style="width:730rpx;margin: 10rpx auto;display:block" nodes="{{content}}"></rich-text>
+  <view class="timeStyle" wx:if="{{time}}"> 发表日期:{{time}}</view>
+</template>

+ 16 - 0
miniprogram/pages/detail/template/video/index.wxml

@@ -0,0 +1,16 @@
+<template name="video">
+  <view class="videoList" wx:for="{{content || []}}" wx:key="title" data-url="{{item.url}}" bindtap="playVideo">
+    <image style="width: 100%;" src="{{item.imgUrl}}"></image>
+    <view class="titleStyle" wx:if="{{item.title}}">{{item.title}}</view>
+    <view class="titleStyle">播放次数:{{item.play_count}}</view>
+  </view>
+
+
+  <view class="mantle" wx:if="{{playUrl}}">
+    <view class="close" bindtap="closeVideo">
+      <view class="left"></view>
+      <view class="right"></view>
+    </view>
+    <video style="height:{{videoData.height}}px;width:{{videoData.width}}px" bindloadedmetadata="bindloadedmetadata" class="playVideo" src="{{playUrl}}"></video>
+  </view>
+</template>

+ 0 - 66
miniprogram/pages/feedback/index.js

@@ -1,66 +0,0 @@
-// pages/feedback/index.js
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 2
miniprogram/pages/feedback/index.wxml

@@ -1,2 +0,0 @@
-<!--pages/feedback/index.wxml-->
-<text>pages/feedback/index.wxml</text>

+ 0 - 66
miniprogram/pages/history/index.js

@@ -1,66 +0,0 @@
-// pages/history/index.js
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 2
miniprogram/pages/history/index.wxml

@@ -1,2 +0,0 @@
-<!--pages/history/index.wxml-->
-<text>pages/history/index.wxml</text>

+ 0 - 66
miniprogram/pages/historyList/index.js

@@ -1,66 +0,0 @@
-// pages/historyList/index.js
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 2
miniprogram/pages/historyList/index.wxml

@@ -1,2 +0,0 @@
-<!--pages/historyList/index.wxml-->
-<text>pages/historyList/index.wxml</text>

+ 0 - 2
miniprogram/pages/my/index.wxml

@@ -1,2 +0,0 @@
-<!--pages/my/index.wxml-->
-<text>pages/my/index.wxml</text>

+ 20 - 3
miniprogram/pages/problemPage/index.js

@@ -6,17 +6,24 @@ Page({
    * 页面的初始数据
    */
   Page: 1,
-  Size: 10,
+  Size: 5,
+  isMore: true,
   data: {
     question: [],
     showEnd: false
   },
   tonext(e) {
+    app.globalData.selectQuestion = this.data.question[e.currentTarget.dataset.i] || { list: [] };
+    if(app.globalData.selectQuestion.type != 'questionBank'){
+      wx.navigateTo({
+        url: '/pages/detail/index',
+      })
+      return
+    }
     if (!app.globalData.userInfo || !app.globalData.userInfo.phone) wx.navigateTo({
       url: '/pages/index/index',
     })
     else {
-      app.globalData.selectQuestion = this.data.question[e.currentTarget.dataset.i] || { list: [] };
       wx.navigateTo({
         url: '/pages/answerInfo/index',
       })
@@ -26,6 +33,9 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    this.getData();
+  },
+  getData() {
     const that = this;
     wx.cloud.callFunction({
       name: "quickstartFunctions",
@@ -39,8 +49,12 @@ Page({
     }).then(res => {
       wx.hideLoading();
       if (res.result.code !== 0) return;
+      let li = that.data.question || [];
+      let newli = res.result.data.list || [];
+      if(!newli.length) that.isMore = false;
+      li = [...li, ...newli]
       that.setData({
-        question: res.result.data.list || [],
+        question: li,
         showEnd: res.result.data.total <= that.Page * that.Size
       })
     }).catch(err => {
@@ -94,6 +108,9 @@ Page({
    */
   onReachBottom: function () {
     // 添加数据
+    if(!this.isMore) return
+    this.Page++;
+    this.getData()
   },
 
   /**

+ 0 - 66
miniprogram/pages/rank/index.js

@@ -1,66 +0,0 @@
-// pages/rank/index.js
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 2
miniprogram/pages/rank/index.wxml

@@ -1,2 +0,0 @@
-<!--pages/rank/index.wxml-->
-<text>pages/rank/index.wxml</text>

+ 0 - 66
miniprogram/pages/rankList/index.js

@@ -1,66 +0,0 @@
-// pages/rankList/index.js
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function () {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function () {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function () {
-
-  }
-})

+ 0 - 2
miniprogram/pages/rankList/index.wxml

@@ -1,2 +0,0 @@
-<!--pages/rankList/index.wxml-->
-<text>pages/rankList/index.wxml</text>

+ 123 - 0
miniprogram/pages/record/index.js

@@ -0,0 +1,123 @@
+// pages/record/index.js
+const app = getApp();
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  Page: 1,
+  Size: 5,
+  data: {
+    list: []
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    wx.setNavigationBarTitle({
+      title: app.globalData.selectQuestion.name
+    })
+    this.getData();
+  },
+  getData() {
+    const that = this;
+    wx.showLoading();
+    wx.cloud.callFunction({
+      name: "quickstartFunctions",
+      data: {
+        type: "getQuestionRecord",
+        data: {
+          queId: app.globalData.selectQuestion._id,
+          Page: this.Page,
+          Size: this.Size
+        }
+      }
+    }).then(res => {
+      if (res.result.code !== 0) return wx.showToast({
+        title: '网络繁忙',
+      })
+      let oldli = that.data.list || [];
+      let li = res.result.data || [];
+      li = li.map(v => {
+        return {
+          ...v,
+          startTime: this.formatTime(v.startTime),
+          endTime: this.formatTime(v.endTime),
+        }
+      })
+      that.setData({
+        list: [...oldli, ...li]
+      })
+      wx.hideLoading()
+    }).catch(err => {
+      console.log(err)
+      wx.hideLoading()
+    })
+  },
+  formatTime(T) {
+    let date = new Date(T);
+    let y = date.getFullYear();
+    let m = date.getMonth() * 1 + 1;
+    let d = date.getDate();
+    let h = date.getHours();
+    let min = date.getMinutes() * 1 + 1;
+    let s = date.getSeconds();
+    let out = y;
+    m > 9 ? out += '-' + m : out += '-0' + m;
+    d > 9 ? out += '-' + d + ' ' : out += '-0' + d + ' ';
+    h > 9 ? out += h + ":" : out += h + ':';
+    min > 9 ? out += min + ":" : out += '0' + min + ':';
+    s > 9 ? out += s : out += '0' + s;
+    return out;
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+    this.Page++;
+    this.getData();
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
miniprogram/pages/record/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 8 - 0
miniprogram/pages/record/index.wxml

@@ -0,0 +1,8 @@
+<!--pages/record/index.wxml-->
+<view class="record">
+  <view class="recordItem" wx:for="{{list}}" wx:key="_id">
+    <view class="line">开始时间: {{item.startTime}}</view>
+    <view class="line">结束时间: {{item.endTime}}</view>
+    <view class="line">所得分数: {{item.score}}分</view>
+  </view>
+</view>

+ 14 - 0
miniprogram/pages/record/index.wxss

@@ -0,0 +1,14 @@
+/* pages/record/index.wxss */
+.record{
+  width: 750rpx;
+  min-height: 100%;
+  background-color: #f7f9f8;
+}
+.recordItem{
+  padding: 21rpx 26rpx;
+  border-bottom: 1rpx solid #dfdfdf;
+}
+.line{
+  height: 2em;
+  line-height: 2em;
+}

+ 1 - 1
miniprogram/pages/my/index.js → miniprogram/pages/result/index.js

@@ -1,4 +1,4 @@
-// pages/my/index.js
+// pages/result/index.js
 Page({
 
   /**

+ 3 - 0
miniprogram/pages/result/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 3 - 0
miniprogram/pages/result/index.wxml

@@ -0,0 +1,3 @@
+<!--pages/result/index.wxml-->
+<view>本次答题获得:
+</view>

+ 1 - 0
miniprogram/pages/result/index.wxss

@@ -0,0 +1 @@
+/* pages/result/index.wxss */

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
miniprogram/utils/Bmob-1.6.5.min.js


+ 0 - 407
miniprogram/wux/animation-group/index.js

@@ -1,407 +0,0 @@
-const ENTER = 'enter'
-const ENTERING = 'entering'
-const ENTERED = 'entered'
-const EXIT = 'exit'
-const EXITING = 'exiting'
-const EXITED = 'exited'
-const UNMOUNTED = 'unmounted'
-
-const TRANSITION = 'transition'
-const ANIMATION = 'animation'
-
-const TIMEOUT = 1000 / 60
-
-const defaultClassNames = {
-    enter: '', // 进入过渡的开始状态,在过渡过程完成之后移除
-    enterActive: '', // 进入过渡的结束状态,在过渡过程完成之后移除
-    enterDone: '', // 进入过渡的完成状态
-    exit: '', // 离开过渡的开始状态,在过渡过程完成之后移除
-    exitActive: '', // 离开过渡的结束状态,在过渡过程完成之后移除
-    exitDone: '', // 离开过渡的完成状态
-}
-
-Component({
-    externalClasses: ['wux-class'],
-    data: {
-        animateCss: '', // 动画样式
-        animateStatus: EXITED, // 动画状态,可选值 entering、entered、exiting、exited
-        isMounting: false, // 是否首次挂载
-    },
-    properties: {
-        // 触发组件进入或离开过渡的状态
-        in: {
-            type: Boolean,
-            value: false,
-            observer(newVal) {
-                if (this.data.isMounting) {
-                    this.updated(newVal)
-                }
-            },
-        },
-        // 过渡的类名
-        classNames: {
-            type: null,
-            value: defaultClassNames,
-        },
-        // 过渡持续时间
-        duration: {
-            type: null,
-            value: null,
-        },
-        // 过渡动效的类型
-        type: {
-            type: String,
-            value: TRANSITION,
-        },
-        // 首次挂载时是否触发进入过渡
-        appear: {
-            type: Boolean,
-            value: false,
-        },
-        // 是否启用进入过渡
-        enter: {
-            type: Boolean,
-            value: true,
-        },
-        // 是否启用离开过渡
-        exit: {
-            type: Boolean,
-            value: true,
-        },
-        // 首次进入过渡时是否懒挂载组件
-        mountOnEnter: {
-            type: Boolean,
-            value: true,
-        },
-        // 离开过渡完成时是否卸载组件
-        unmountOnExit: {
-            type: Boolean,
-            value: true,
-        },
-    },
-    methods: {
-        /**
-         * 监听过渡或动画的回调函数
-         */
-        addEventListener() {
-            const { animateStatus } = this.data
-            const { enter, exit } = this.getTimeouts()
-
-            if (animateStatus === ENTERING && !enter && this.data.enter) {
-                this.performEntered()
-            }
-
-            if (animateStatus === EXITING && !exit && this.data.exit) {
-                this.performExited()
-            }
-        },
-        /**
-         * 会在 WXSS transition 或 wx.createAnimation 动画结束后触发
-         */
-        onTransitionEnd() {
-            if (this.data.type === TRANSITION) {
-                this.addEventListener()
-            }
-        },
-        /**
-         * 会在一个 WXSS animation 动画完成时触发
-         */
-        onAnimationEnd() {
-            if (this.data.type === ANIMATION) {
-                this.addEventListener()
-            }
-        },
-        /**
-         * 更新组件状态
-         * @param {String} nextStatus 下一状态,ENTERING 或 EXITING
-         * @param {Boolean} mounting 是否首次挂载
-         */
-        updateStatus(nextStatus, mounting = false) {
-            if (nextStatus !== null) {
-                this.cancelNextCallback()
-                this.isAppearing = mounting
-
-                if (nextStatus === ENTERING) {
-                    this.performEnter()
-                } else {
-                    this.performExit()
-                }
-            }
-        },
-        /**
-         * 进入过渡
-         */
-        performEnter() {
-            const { className, activeClassName } = this.getClassNames(ENTER)
-            const { enter } = this.getTimeouts()
-            const enterParams = {
-                animateStatus: ENTER,
-                animateCss: className,
-            }
-            const enteringParams = {
-                animateStatus: ENTERING,
-                animateCss: `${className} ${activeClassName}`,
-            }
-
-            // 若已禁用进入过渡,则更新状态至 ENTERED
-            if (!this.isAppearing && !this.data.enter) {
-                return this.performEntered()
-            }
-
-            // 第一阶段:设置进入过渡的开始状态,并触发 ENTER 事件
-            // 第二阶段:延迟一帧后,设置进入过渡的结束状态,并触发 ENTERING 事件
-            // 第三阶段:若已设置过渡的持续时间,则延迟指定时间后触发进入过渡完成 performEntered,否则等待触发 onTransitionEnd 或 onAnimationEnd
-            this.safeSetData(enterParams, () => {
-                this.triggerEvent('change', { animateStatus: ENTER })
-                this.triggerEvent(ENTER, { isAppearing: this.isAppearing })
-
-                // 由于有些时候不能正确的触发动画完成的回调,具体原因未知
-                // 所以采用延迟一帧的方式来确保可以触发回调
-                this.delayHandler(TIMEOUT, () => {
-                    this.safeSetData(enteringParams, () => {
-                        this.triggerEvent('change', { animateStatus: ENTERING })
-                        this.triggerEvent(ENTERING, { isAppearing: this.isAppearing })
-
-                        if (enter) {
-                            this.delayHandler(enter, this.performEntered)
-                        }
-                    })
-                })
-            })
-        },
-        /**
-         * 进入过渡完成
-         */
-        performEntered() {
-            const { doneClassName } = this.getClassNames(ENTER)
-            const enteredParams = {
-                animateStatus: ENTERED,
-                animateCss: doneClassName,
-            }
-
-            // 第三阶段:设置进入过渡的完成状态,并触发 ENTERED 事件            
-            this.safeSetData(enteredParams, () => {
-                this.triggerEvent('change', { animateStatus: ENTERED })
-                this.triggerEvent(ENTERED, { isAppearing: this.isAppearing })
-            })
-        },
-        /**
-         * 离开过渡
-         */
-        performExit() {
-            const { className, activeClassName } = this.getClassNames(EXIT)
-            const { exit } = this.getTimeouts()
-            const exitParams = {
-                animateStatus: EXIT,
-                animateCss: className,
-            }
-            const exitingParams = {
-                animateStatus: EXITING,
-                animateCss: `${className} ${activeClassName}`,
-            }
-
-            // 若已禁用离开过渡,则更新状态至 EXITED
-            if (!this.data.exit) {
-                return this.performExited()
-            }
-
-            // 第一阶段:设置离开过渡的开始状态,并触发 EXIT 事件
-            // 第二阶段:延迟一帧后,设置离开过渡的结束状态,并触发 EXITING 事件
-            // 第三阶段:若已设置过渡的持续时间,则延迟指定时间后触发离开过渡完成 performExited,否则等待触发 onTransitionEnd 或 onAnimationEnd
-            this.safeSetData(exitParams, () => {
-                this.triggerEvent('change', { animateStatus: EXIT })
-                this.triggerEvent(EXIT)
-
-                this.delayHandler(TIMEOUT, () => {
-                    this.safeSetData(exitingParams, () => {
-                        this.triggerEvent('change', { animateStatus: EXITING })
-                        this.triggerEvent(EXITING)
-
-                        if (exit) {
-                            this.delayHandler(exit, this.performExited)
-                        }
-                    })
-                })
-            })
-        },
-        /**
-         * 离开过渡完成
-         */
-        performExited() {
-            const { doneClassName } = this.getClassNames(EXIT)
-            const exitedParams = {
-                animateStatus: EXITED,
-                animateCss: doneClassName,
-            }
-
-            // 第三阶段:设置离开过渡的完成状态,并触发 EXITED 事件
-            this.safeSetData(exitedParams, () => {
-                this.triggerEvent('change', { animateStatus: EXITED })
-                this.triggerEvent(EXITED)
-
-                // 判断离开过渡完成时是否卸载组件
-                if (this.data.unmountOnExit) {
-                    this.setData({ animateStatus: UNMOUNTED }, () => {
-                        this.triggerEvent('change', { animateStatus: UNMOUNTED })
-                    })
-                }
-            })
-        },
-        /**
-         * 获取指定状态下的类名
-         * @param {String} type 过渡类型,enter 或 exit
-         */
-        getClassNames(type) {
-            const { classNames } = this.data
-            const className = typeof classNames !== 'string' ? classNames[type] : `${classNames}-${type}`
-            const activeClassName = typeof classNames !== 'string' ? classNames[`${type}Active`] : `${classNames}-${type}-active`
-            const doneClassName = typeof classNames !== 'string' ? classNames[`${type}Done`] : `${classNames}-${type}-done`
-
-            return {
-                className,
-                activeClassName,
-                doneClassName,
-            }
-        },
-        /**
-         * 获取过渡持续时间
-         */
-        getTimeouts() {
-            const { duration } = this.data
-
-            if (duration !== null && typeof duration === 'object') {
-                return {
-                    enter: duration.enter,
-                    exit: duration.exit,
-                }
-            } else if (typeof duration === 'number') {
-                return {
-                    enter: duration,
-                    exit: duration,
-                }
-            }
-
-            return {}
-        },
-        /**
-         * 属性值 in 被更改时的响应函数
-         * @param {Boolean} newVal 触发组件进入或离开过渡的状态
-         */
-        updated(newVal) {
-            let { animateStatus } = this.pendingData || this.data
-            let nextStatus = null
-
-            if (newVal) {
-                if (animateStatus === UNMOUNTED) {
-                    animateStatus = EXITED
-                    this.setData({ animateStatus: EXITED }, () => {
-                        this.triggerEvent('change', { animateStatus: EXITED })
-                    })
-                }
-                if (animateStatus !== ENTER && animateStatus !== ENTERING && animateStatus !== ENTERED) {
-                    nextStatus = ENTERING
-                }
-            } else {
-                if (animateStatus === ENTER || animateStatus === ENTERING || animateStatus === ENTERED) {
-                    nextStatus = EXITING
-                }
-            }
-
-            this.updateStatus(nextStatus)
-        },
-        /**
-         * safeSetData
-         * @param {Object} nextData 数据对象
-         * @param {Function} callback 回调函数
-         */
-        safeSetData(nextData, callback) {
-            this.pendingData = Object.assign({}, this.data, nextData)
-            callback = this.setNextCallback(callback)
-
-            this.setData(nextData, () => {
-                this.pendingData = null
-                callback()
-            })
-        },
-        /**
-         * 设置下一回调函数
-         * @param {Function} callback 回调函数
-         */
-        setNextCallback(callback) {
-            let active = true
-
-            this.nextCallback = (event) => {
-                if (active) {
-                    active = false
-                    this.nextCallback = null
-
-                    callback.call(this, event)
-                }
-            }
-
-            this.nextCallback.cancel = () => {
-                active = false
-            }
-
-            return this.nextCallback
-        },
-        /**
-         * 取消下一回调函数
-         */
-        cancelNextCallback() {
-            if (this.nextCallback !== null) {
-                this.nextCallback.cancel()
-                this.nextCallback = null
-            }
-        },
-        /**
-         * 延迟一段时间触发回调
-         * @param {Number} timeout 延迟时间
-         * @param {Function} handler 回调函数
-         */
-        delayHandler(timeout, handler) {
-            if (timeout) {
-                this.setNextCallback(handler)
-                setTimeout(this.nextCallback, timeout)
-            }
-        },
-        /**
-         * 点击事件
-         */
-        onTap() {
-            this.triggerEvent('click')
-        },
-    },
-    created() {
-        this.nextCallback = null
-    },
-    attached() {
-        let animateStatus = null
-        let appearStatus = null
-
-        if (this.data.in) {
-            if (this.data.appear) {
-                animateStatus = EXITED
-                appearStatus = ENTERING
-            } else {
-                animateStatus = ENTERED
-            }
-        } else {
-            if (this.data.unmountOnExit || this.data.mountOnEnter) {
-                animateStatus = UNMOUNTED
-            } else {
-                animateStatus = EXITED
-            }
-        }
-
-        // 由于小程序组件首次挂载时 observer 事件总是优先于 attached 事件
-        // 所以使用 isMounting 来强制优先触发 attached 事件
-        this.safeSetData({ animateStatus, isMounting: true }, () => {
-            this.triggerEvent('change', { animateStatus })
-            this.updateStatus(appearStatus, true)
-        })
-    },
-    detached() {
-        this.cancelNextCallback()
-    },
-})

+ 0 - 3
miniprogram/wux/animation-group/index.json

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

+ 0 - 3
miniprogram/wux/animation-group/index.wxml

@@ -1,3 +0,0 @@
-<view class="wux-class {{ animateCss }}" bindtap="onTap" bindtransitionend="onTransitionEnd" bindanimationend="onAnimationEnd" wx:if="{{ animateStatus !== 'unmounted' }}">
-    <slot></slot>
-</view>

+ 0 - 250
miniprogram/wux/animation-group/index.wxss

@@ -1,250 +0,0 @@
-.wux-animate--fadeIn-enter {
-  -webkit-transition: opacity .3s;
-  transition: opacity .3s;
-  opacity: 0;
-}
-.wux-animate--fadeIn-enter-active,
-.wux-animate--fadeIn-enter-done {
-  opacity: 1;
-}
-.wux-animate--fadeIn-exit {
-  -webkit-transition: opacity .3s;
-  transition: opacity .3s;
-  opacity: 1;
-}
-.wux-animate--fadeIn-exit-active,
-.wux-animate--fadeIn-exit-done {
-  opacity: 0;
-}
-.wux-animate--fadeInDown-enter {
-  -webkit-transition: opacity .3s, -webkit-transform .3s;
-  transition: opacity .3s, -webkit-transform .3s;
-  transition: opacity .3s, transform .3s;
-  transition: opacity .3s, transform .3s, -webkit-transform .3s;
-  opacity: 0;
-  -webkit-transform: translate3d(0, -100%, 0);
-          transform: translate3d(0, -100%, 0);
-}
-.wux-animate--fadeInDown-enter-active,
-.wux-animate--fadeInDown-enter-done {
-  opacity: 1;
-  -webkit-transform: none;
-          transform: none;
-}
-.wux-animate--fadeInDown-exit {
-  -webkit-transition: opacity .3s, -webkit-transform .3s;
-  transition: opacity .3s, -webkit-transform .3s;
-  transition: opacity .3s, transform .3s;
-  transition: opacity .3s, transform .3s, -webkit-transform .3s;
-  opacity: 1;
-  -webkit-transform: none;
-          transform: none;
-}
-.wux-animate--fadeInDown-exit-active,
-.wux-animate--fadeInDown-exit-done {
-  opacity: 0;
-  -webkit-transform: translate3d(0, -100%, 0);
-          transform: translate3d(0, -100%, 0);
-}
-.wux-animate--fadeInLeft-enter {
-  -webkit-transition: opacity .3s, -webkit-transform .3s;
-  transition: opacity .3s, -webkit-transform .3s;
-  transition: opacity .3s, transform .3s;
-  transition: opacity .3s, transform .3s, -webkit-transform .3s;
-  opacity: 0;
-  -webkit-transform: translate3d(-100%, 0, 0);
-          transform: translate3d(-100%, 0, 0);
-}
-.wux-animate--fadeInLeft-enter-active,
-.wux-animate--fadeInLeft-enter-done {
-  opacity: 1;
-  -webkit-transform: none;
-          transform: none;
-}
-.wux-animate--fadeInLeft-exit {
-  -webkit-transition: opacity .3s, -webkit-transform .3s;
-  transition: opacity .3s, -webkit-transform .3s;
-  transition: opacity .3s, transform .3s;
-  transition: opacity .3s, transform .3s, -webkit-transform .3s;
-  opacity: 1;
-  -webkit-transform: none;
-          transform: none;
-}
-.wux-animate--fadeInLeft-exit-active,
-.wux-animate--fadeInLeft-exit-done {
-  opacity: 0;
-  -webkit-transform: translate3d(-100%, 0, 0);
-          transform: translate3d(-100%, 0, 0);
-}
-.wux-animate--fadeInRight-enter {
-  -webkit-transition: opacity .3s, -webkit-transform .3s;
-  transition: opacity .3s, -webkit-transform .3s;
-  transition: opacity .3s, transform .3s;
-  transition: opacity .3s, transform .3s, -webkit-transform .3s;
-  opacity: 0;
-  -webkit-transform: translate3d(100%, 0, 0);
-          transform: translate3d(100%, 0, 0);
-}
-.wux-animate--fadeInRight-enter-active,
-.wux-animate--fadeInRight-enter-done {
-  opacity: 1;
-  -webkit-transform: none;
-          transform: none;
-}
-.wux-animate--fadeInRight-exit {
-  -webkit-transition: opacity .3s, -webkit-transform .3s;
-  transition: opacity .3s, -webkit-transform .3s;
-  transition: opacity .3s, transform .3s;
-  transition: opacity .3s, transform .3s, -webkit-transform .3s;
-  opacity: 1;
-  -webkit-transform: none;
-          transform: none;
-}
-.wux-animate--fadeInRight-exit-active,
-.wux-animate--fadeInRight-exit-done {
-  opacity: 0;
-  -webkit-transform: translate3d(100%, 0, 0);
-          transform: translate3d(100%, 0, 0);
-}
-.wux-animate--fadeInUp-enter {
-  -webkit-transition: opacity .3s, -webkit-transform .3s;
-  transition: opacity .3s, -webkit-transform .3s;
-  transition: opacity .3s, transform .3s;
-  transition: opacity .3s, transform .3s, -webkit-transform .3s;
-  opacity: 0;
-  -webkit-transform: translate3d(0, 100%, 0);
-          transform: translate3d(0, 100%, 0);
-}
-.wux-animate--fadeInUp-enter-active,
-.wux-animate--fadeInUp-enter-done {
-  opacity: 1;
-  -webkit-transform: none;
-          transform: none;
-}
-.wux-animate--fadeInUp-exit {
-  -webkit-transition: opacity .3s, -webkit-transform .3s;
-  transition: opacity .3s, -webkit-transform .3s;
-  transition: opacity .3s, transform .3s;
-  transition: opacity .3s, transform .3s, -webkit-transform .3s;
-  opacity: 1;
-  -webkit-transform: none;
-          transform: none;
-}
-.wux-animate--fadeInUp-exit-active,
-.wux-animate--fadeInUp-exit-done {
-  opacity: 0;
-  -webkit-transform: translate3d(0, 100%, 0);
-          transform: translate3d(0, 100%, 0);
-}
-.wux-animate--slideInUp-enter {
-  -webkit-transition: -webkit-transform .3s;
-  transition: -webkit-transform .3s;
-  transition: transform .3s;
-  transition: transform .3s, -webkit-transform .3s;
-  -webkit-transform: translate3d(0, 100%, 0);
-          transform: translate3d(0, 100%, 0);
-  visibility: visible;
-}
-.wux-animate--slideInUp-enter-active,
-.wux-animate--slideInUp-enter-done {
-  -webkit-transform: translateZ(0);
-          transform: translateZ(0);
-}
-.wux-animate--slideInUp-exit {
-  -webkit-transition: -webkit-transform .3s;
-  transition: -webkit-transform .3s;
-  transition: transform .3s;
-  transition: transform .3s, -webkit-transform .3s;
-  -webkit-transform: translateZ(0);
-          transform: translateZ(0);
-}
-.wux-animate--slideInUp-exit-active,
-.wux-animate--slideInUp-exit-done {
-  -webkit-transform: translate3d(0, 100%, 0);
-          transform: translate3d(0, 100%, 0);
-  visibility: visible;
-}
-.wux-animate--slideInDown-enter {
-  -webkit-transition: -webkit-transform .3s;
-  transition: -webkit-transform .3s;
-  transition: transform .3s;
-  transition: transform .3s, -webkit-transform .3s;
-  -webkit-transform: translate3d(0, -100%, 0);
-          transform: translate3d(0, -100%, 0);
-  visibility: visible;
-}
-.wux-animate--slideInDown-enter-active,
-.wux-animate--slideInDown-enter-done {
-  -webkit-transform: translateZ(0);
-          transform: translateZ(0);
-}
-.wux-animate--slideInDown-exit {
-  -webkit-transition: -webkit-transform .3s;
-  transition: -webkit-transform .3s;
-  transition: transform .3s;
-  transition: transform .3s, -webkit-transform .3s;
-  -webkit-transform: translateZ(0);
-          transform: translateZ(0);
-}
-.wux-animate--slideInDown-exit-active,
-.wux-animate--slideInDown-exit-done {
-  -webkit-transform: translate3d(0, -100%, 0);
-          transform: translate3d(0, -100%, 0);
-  visibility: visible;
-}
-.wux-animate--slideInLeft-enter {
-  -webkit-transition: -webkit-transform .3s;
-  transition: -webkit-transform .3s;
-  transition: transform .3s;
-  transition: transform .3s, -webkit-transform .3s;
-  -webkit-transform: translate3d(-100%, 0, 0);
-          transform: translate3d(-100%, 0, 0);
-  visibility: visible;
-}
-.wux-animate--slideInLeft-enter-active,
-.wux-animate--slideInLeft-enter-done {
-  -webkit-transform: translateZ(0);
-          transform: translateZ(0);
-}
-.wux-animate--slideInLeft-exit {
-  -webkit-transition: -webkit-transform .3s;
-  transition: -webkit-transform .3s;
-  transition: transform .3s;
-  transition: transform .3s, -webkit-transform .3s;
-  -webkit-transform: translateZ(0);
-          transform: translateZ(0);
-}
-.wux-animate--slideInLeft-exit-active,
-.wux-animate--slideInLeft-exit-done {
-  -webkit-transform: translate3d(-100%, 0, 0);
-          transform: translate3d(-100%, 0, 0);
-  visibility: visible;
-}
-.wux-animate--slideInRight-enter {
-  -webkit-transition: -webkit-transform .3s;
-  transition: -webkit-transform .3s;
-  transition: transform .3s;
-  transition: transform .3s, -webkit-transform .3s;
-  -webkit-transform: translate3d(100%, 0, 0);
-          transform: translate3d(100%, 0, 0);
-  visibility: visible;
-}
-.wux-animate--slideInRight-enter-active,
-.wux-animate--slideInRight-enter-done {
-  -webkit-transform: translateZ(0);
-          transform: translateZ(0);
-}
-.wux-animate--slideInRight-exit {
-  -webkit-transition: -webkit-transform .3s;
-  transition: -webkit-transform .3s;
-  transition: transform .3s;
-  transition: transform .3s, -webkit-transform .3s;
-  -webkit-transform: translateZ(0);
-          transform: translateZ(0);
-}
-.wux-animate--slideInRight-exit-active,
-.wux-animate--slideInRight-exit-done {
-  -webkit-transform: translate3d(100%, 0, 0);
-          transform: translate3d(100%, 0, 0);
-  visibility: visible;
-}

+ 0 - 98
miniprogram/wux/button/index.js

@@ -1,98 +0,0 @@
-Component({
-    externalClasses: ['wux-class', 'wux-hover-class'],
-    properties: {
-        type: {
-            type: String,
-            value: 'stable',
-        },
-        clear: {
-            type: Boolean,
-            value: false,
-        },
-        block: {
-            type: Boolean,
-            value: false,
-        },
-        full: {
-            type: Boolean,
-            value: false,
-        },
-        outline: {
-            type: Boolean,
-            value: false,
-        },
-        size: {
-            type: String,
-            value: 'default',
-        },
-        disabled: {
-            type: Boolean,
-            value: false,
-        },
-        loading: {
-            type: Boolean,
-            value: false,
-        },
-        formType: {
-            type: String,
-            value: '',
-        },
-        openType: {
-            type: String,
-            value: '',
-        },
-        hoverStopPropagation: {
-            type: Boolean,
-            value: false,
-        },
-        hoverStartTime: {
-            type: Number,
-            value: 20,
-        },
-        hoverStayTime: {
-            type: Number,
-            value: 70,
-        },
-        lang: {
-            type: String,
-            value: 'en',
-        },
-        sessionFrom: {
-            type: String,
-            value: '',
-        },
-        sendMessageTitle: {
-            type: String,
-            value: '',
-        },
-        sendMessagePath: {
-            type: String,
-            value: '',
-        },
-        sendMessageImg: {
-            type: String,
-            value: '',
-        },
-        showMessageCard: {
-            type: Boolean,
-            value: false,
-        },
-    },
-
-    methods: {
-        onTap() {
-            if (!this.data.disabled) {
-                this.triggerEvent('click')
-            }
-        },
-        bindgetuserinfo(e) {
-            this.triggerEvent('getuserinfo', e.detail)
-        },
-        bindcontact(e) {
-            this.triggerEvent('contact', e.detail)
-        },
-        bindgetphonenumber(e) {
-            this.triggerEvent('getphonenumber', e.detail)
-        },
-    },
-})

+ 0 - 3
miniprogram/wux/button/index.json

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

+ 0 - 22
miniprogram/wux/button/index.wxml

@@ -1,22 +0,0 @@
-<button
-    class="wux-class wux-button {{ type ? 'wux-button--' + type : '' }} {{ size ? 'wux-button--' + size : '' }} {{ block ? 'wux-button--block' : '' }} {{ full ? 'wux-button--full' : '' }} {{ clear ? 'wux-button--clear' : '' }} {{ outline ? 'wux-button--outline' : '' }} {{ disabled ? 'wux-button--disabled' : '' }}"
-    loading="{{ loading }}"
-    form-type="{{ formType }}"
-    open-type="{{ openType }}"
-    hover-class="wux-hover-class {{ !disabled ? 'wux-button--hover' : 'none' }}"
-    hover-stop-propagation="{{ hoverStopPropagation }}"
-    hover-start-time="{{ hoverStartTime }}"
-    hover-stay-time="{{ hoverStayTime }}"
-    lang="{{ lang }}"
-    bindgetuserinfo="bindgetuserinfo"
-    session-from="{{ sessionFrom }}"
-    send-message-title="{{ sendMessageTitle }}"
-    send-message-path="{{ sendMessagePath }}"
-    send-message-img="{{ sendMessageImg }}"
-    show-message-card="{{ showMessageCard }}"
-    bindcontact="bindcontact"
-    bindgetphonenumber="bindgetphonenumber"
-    bindtap="onTap"
->
-    <slot></slot>
-</button>

+ 0 - 309
miniprogram/wux/button/index.wxss

@@ -1,309 +0,0 @@
-.wux-button {
-  position: relative;
-  display: inline-block;
-  box-sizing: border-box;
-  margin: 0;
-  padding: 0 24rpx;
-  min-width: 104rpx;
-  min-height: 88rpx;
-  border: 2rpx solid transparent;
-  border-radius: 8rpx;
-  vertical-align: middle;
-  text-align: center;
-  text-overflow: ellipsis;
-  font-size: 32rpx;
-  line-height: 84rpx;
-  cursor: pointer;
-}
-.wux-button:after {
-  content: " ";
-  width: 100%;
-  height: 100%;
-  position: absolute;
-  top: -12rpx;
-  right: -12rpx;
-  bottom: -12rpx;
-  left: -12rpx;
-  border: none;
-  -webkit-transform: none;
-          transform: none;
-  -webkit-transform-origin: 0 0;
-          transform-origin: 0 0;
-  box-sizing: border-box;
-  border-radius: 0;
-}
-.wux-button--disabled {
-  opacity: .4;
-}
-.wux-button--small {
-  padding: 4rpx 8rpx 2rpx;
-  min-width: 56rpx;
-  min-height: 60rpx;
-  font-size: 24rpx;
-  line-height: 52rpx;
-}
-.wux-button--large {
-  padding: 0 32rpx;
-  min-width: 136rpx;
-  min-height: 118rpx;
-  font-size: 40rpx;
-  line-height: 106rpx;
-}
-.wux-button--block,
-.wux-button--full {
-  width: 100%;
-  margin-top: 20rpx;
-  margin-bottom: 20rpx;
-}
-.wux-button--block {
-  display: block;
-  clear: both;
-}
-.wux-button--block:after {
-  clear: both;
-}
-.wux-button--full {
-  display: block;
-  margin-right: 0;
-  margin-left: 0;
-  border-right-width: 0;
-  border-left-width: 0;
-  border-radius: 0;
-}
-.wux-button--outline.wux-button--hover {
-  color: #fff !important;
-}
-.wux-button--light {
-  border-color: transparent;
-  background-color: #fff;
-  color: #fff;
-}
-.wux-button--light.wux-button--outline {
-  border-color: #fff;
-  background-color: transparent;
-  color: #fff;
-}
-.wux-button--light.wux-button--clear {
-  background-color: transparent;
-  color: #e6e6e6;
-}
-.wux-button--light.wux-button--clear.wux-button--hover {
-  background-color: rgba(0, 0, 0, 0);
-  color: #fff;
-}
-.wux-button--light.wux-button--hover {
-  background-color: #e6e6e6;
-  color: #fff;
-}
-.wux-button--stable {
-  border-color: transparent;
-  background-color: #f8f8f8;
-  color: #fff;
-}
-.wux-button--stable.wux-button--outline {
-  border-color: #f8f8f8;
-  background-color: transparent;
-  color: #f8f8f8;
-}
-.wux-button--stable.wux-button--clear {
-  background-color: transparent;
-  color: #dfdfdf;
-}
-.wux-button--stable.wux-button--clear.wux-button--hover {
-  background-color: rgba(0, 0, 0, 0);
-  color: #f8f8f8;
-}
-.wux-button--stable.wux-button--hover {
-  background-color: #dfdfdf;
-  color: #fff;
-}
-.wux-button--positive {
-  border-color: transparent;
-  background-color: #387ef5;
-  color: #fff;
-}
-.wux-button--positive.wux-button--outline {
-  border-color: #387ef5;
-  background-color: transparent;
-  color: #387ef5;
-}
-.wux-button--positive.wux-button--clear {
-  background-color: transparent;
-  color: #0c60ee;
-}
-.wux-button--positive.wux-button--clear.wux-button--hover {
-  background-color: rgba(0, 0, 0, 0);
-  color: #387ef5;
-}
-.wux-button--positive.wux-button--hover {
-  background-color: #0c60ee;
-  color: #fff;
-}
-.wux-button--calm {
-  border-color: transparent;
-  background-color: #11c1f3;
-  color: #fff;
-}
-.wux-button--calm.wux-button--outline {
-  border-color: #11c1f3;
-  background-color: transparent;
-  color: #11c1f3;
-}
-.wux-button--calm.wux-button--clear {
-  background-color: transparent;
-  color: #0a9dc7;
-}
-.wux-button--calm.wux-button--clear.wux-button--hover {
-  background-color: rgba(0, 0, 0, 0);
-  color: #11c1f3;
-}
-.wux-button--calm.wux-button--hover {
-  background-color: #0a9dc7;
-  color: #fff;
-}
-.wux-button--assertive {
-  border-color: transparent;
-  background-color: #ef473a;
-  color: #fff;
-}
-.wux-button--assertive.wux-button--outline {
-  border-color: #ef473a;
-  background-color: transparent;
-  color: #ef473a;
-}
-.wux-button--assertive.wux-button--clear {
-  background-color: transparent;
-  color: #e42112;
-}
-.wux-button--assertive.wux-button--clear.wux-button--hover {
-  background-color: rgba(0, 0, 0, 0);
-  color: #ef473a;
-}
-.wux-button--assertive.wux-button--hover {
-  background-color: #e42112;
-  color: #fff;
-}
-.wux-button--balanced {
-  border-color: transparent;
-  background-color: #2db7f5;
-  color: #fff;
-}
-.wux-button--balanced.wux-button--outline {
-  border-color: #33cd5f;
-  background-color: transparent;
-  color: #33cd5f;
-}
-.wux-button--balanced.wux-button--clear {
-  background-color: transparent;
-  color: #28a54c;
-}
-.wux-button--balanced.wux-button--clear.wux-button--hover {
-  background-color: rgba(0, 0, 0, 0);
-  color: #33cd5f;
-}
-.wux-button--balanced.wux-button--hover {
-  background-color: #2db7f5;
-  color: #fff;
-}
-.wux-button--energized {
-  border-color: transparent;
-  background-color: #ffc900;
-  color: #fff;
-}
-.wux-button--energized.wux-button--outline {
-  border-color: #ffc900;
-  background-color: transparent;
-  color: #ffc900;
-}
-.wux-button--energized.wux-button--clear {
-  background-color: transparent;
-  color: #cca100;
-}
-.wux-button--energized.wux-button--clear.wux-button--hover {
-  background-color: rgba(0, 0, 0, 0);
-  color: #ffc900;
-}
-.wux-button--energized.wux-button--hover {
-  background-color: #cca100;
-  color: #fff;
-}
-.wux-button--royal {
-  border-color: transparent;
-  background-color: #886aea;
-  color: #fff;
-}
-.wux-button--royal.wux-button--outline {
-  border-color: #886aea;
-  background-color: transparent;
-  color: #886aea;
-}
-.wux-button--royal.wux-button--clear {
-  background-color: transparent;
-  color: #643de4;
-}
-.wux-button--royal.wux-button--clear.wux-button--hover {
-  background-color: rgba(0, 0, 0, 0);
-  color: #886aea;
-}
-.wux-button--royal.wux-button--hover {
-  background-color: #643de4;
-  color: #fff;
-}
-.wux-button--dark {
-  border-color: transparent;
-  background-color: #444;
-  color: #fff;
-}
-.wux-button--dark.wux-button--outline {
-  border-color: #444;
-  background-color: transparent;
-  color: #444;
-}
-.wux-button--dark.wux-button--clear {
-  background-color: transparent;
-  color: #2b2b2b;
-}
-.wux-button--dark.wux-button--clear.wux-button--hover {
-  background-color: rgba(0, 0, 0, 0);
-  color: #444;
-}
-.wux-button--dark.wux-button--hover {
-  background-color: #2b2b2b;
-  color: #fff;
-}
-.wux-button--light {
-  border-color: transparent;
-  background-color: #fff;
-  color: #444;
-}
-.wux-button--light.wux-button--outline {
-  border-color: #ddd;
-  background-color: transparent;
-  color: #ddd;
-}
-.wux-button--light.wux-button--clear.wux-button--hover {
-  background-color: rgba(0, 0, 0, 0);
-  color: #ddd;
-}
-.wux-button--light.wux-button--hover {
-  background-color: #e6e6e6;
-  color: #fff;
-}
-.wux-button--stable {
-  border-color: transparent;
-  background-color: #f8f8f8;
-  color: #444;
-}
-.wux-button--stable.wux-button--outline {
-  border-color: #b2b2b2;
-  background-color: transparent;
-  color: #b2b2b2;
-}
-.wux-button--stable.wux-button--clear.wux-button--hover {
-  background-color: rgba(0, 0, 0, 0);
-  color: #b2b2b2;
-}
-.wux-button--stable.wux-button--hover {
-  background-color: #dfdfdf;
-  color: #fff;
-}

+ 0 - 38
miniprogram/wux/cell-group/index.js

@@ -1,38 +0,0 @@
-Component({
-    externalClasses: ['wux-class'],
-    relations: {
-        '../cell/index': {
-            type: 'child',
-            linked() {
-                this.updateIsLastElement('../cell/index')
-            },
-            linkChanged() {
-                this.updateIsLastElement('../cell/index')
-            },
-            unlinked() {
-                this.updateIsLastElement('../cell/index')
-            },
-        },
-    },
-    properties: {
-        title: {
-            type: String,
-            value: '',
-        },
-        label: {
-            type: String,
-            value: '',
-        },
-    },
-    methods: {
-        updateIsLastElement() {
-            const elements = this.getRelationNodes('../cell/index')
-            if (elements.length > 0) {
-                const lastIndex = elements.length - 1
-                elements.forEach((element, index) => {
-                    element.updateIsLastElement(index === lastIndex)
-                })
-            }
-        },
-    },
-})

+ 0 - 3
miniprogram/wux/cell-group/index.json

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

+ 0 - 7
miniprogram/wux/cell-group/index.wxml

@@ -1,7 +0,0 @@
-<view class="wux-class wux-cell-group">
-    <view class="wux-cell-group__hd" wx:if="{{ title }}">{{ title }}</view>
-    <view class="wux-cell-group__bd">
-        <slot></slot>
-    </view>
-    <view class="wux-cell-group__ft" wx:if="{{ label }}">{{ label }}</view>
-</view>

+ 0 - 33
miniprogram/wux/cell-group/index.wxss

@@ -1,33 +0,0 @@
-.wux-cell-group__hd {
-  padding: 30rpx 30rpx 18rpx;
-  font-size: 28rpx;
-  color: #888;
-  width: 100%;
-  box-sizing: border-box;
-}
-.wux-cell-group__bd {
-  position: relative;
-  background-color: #fff;
-}
-.wux-cell-group__bd:after {
-  content: " ";
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 200%;
-  height: 200%;
-  -webkit-transform: scale(0.5);
-          transform: scale(0.5);
-  -webkit-transform-origin: 0 0;
-          transform-origin: 0 0;
-  pointer-events: none;
-  box-sizing: border-box;
-  border: 0 solid #D9D9D9;
-  border-top-width: 2rpx;
-  border-bottom-width: 2rpx;
-}
-.wux-cell-group__ft {
-  padding: 18rpx 30rpx 30rpx;
-  font-size: 28rpx;
-  color: #888;
-}

+ 0 - 79
miniprogram/wux/cell/index.js

@@ -1,79 +0,0 @@
-Component({
-    externalClasses: ['wux-class'],
-    options: {
-        multipleSlots: true,
-    },
-    relations: {
-        '../cell-group/index': {
-            type: 'parent',
-        },
-    },
-    data: {
-        isLast: false,
-    },
-    properties: {
-        hoverClass: {
-            type: String,
-            value: 'wux-cell--hover',
-        },
-        thumb: {
-            type: String,
-            value: '',
-        },
-        title: {
-            type: String,
-            value: '',
-        },
-        label: {
-            type: String,
-            value: '',
-        },
-        extra: {
-            type: String,
-            value: '',
-        },
-        isLink: {
-            type: Boolean,
-            value: false,
-        },
-        openType: {
-            type: String,
-            value: 'navigateTo',
-        },
-        url: {
-            type: String,
-            value: '',
-        },
-        delta: {
-            type: Number,
-            value: 1,
-        },
-    },
-    methods: {
-        onTap() {
-            const { url, isLink, openType, delta } = this.data
-            const navigate = [
-                'navigateTo',
-                'redirectTo',
-                'switchTab',
-                'navigateBack',
-                'reLaunch',
-            ]
-
-            this.triggerEvent('click')
-
-            if (!isLink || !url) {
-                return false
-            } else if (!navigate.includes(openType)) {
-                return console.warn('openType 属性可选值为 navigateTo、redirectTo、switchTab、navigateBack、reLaunch', openType)
-            } else if (openType === 'navigateBack') {
-                return wx[openType].call(wx, { delta })
-            } else {
-                return wx[openType].call(wx, { url })
-            }
-        },
-        updateIsLastElement(isLast) {
-            this.setData({ isLast })
-        },
-    },
-})

+ 0 - 3
miniprogram/wux/cell/index.json

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

+ 0 - 21
miniprogram/wux/cell/index.wxml

@@ -1,21 +0,0 @@
-<view bindtap="onTap" class="wux-class wux-cell {{ isLast ? 'wux-cell--last' : '' }} {{ isLink ? 'wux-cell--access' : '' }}" hover-class="{{ hoverClass }}">
-    <view class="wux-cell__hd">
-        <block wx:if="{{ thumb }}">
-            <image class="wux-cell__thumb" src="{{ thumb }}" />
-        </block>
-        <block wx:else>
-            <slot name="header"></slot>
-        </block>
-    </view>
-    <view class="wux-cell__bd">
-        <view wx:if="{{ title }}" class="wux-cell__text">{{ title }}</view>
-        <view wx:if="{{ label }}" class="wux-cell__desc">{{ label }}</view>
-        <slot></slot>
-    </view>
-    <view class="wux-cell__ft">
-        <block wx:if="{{ extra }}">{{ extra }}</block>
-        <block wx:else>
-            <slot name="footer"></slot>
-        </block>
-    </view>
-</view>

+ 0 - 77
miniprogram/wux/cell/index.wxss

@@ -1,77 +0,0 @@
-.wux-cell {
-  padding: 20rpx 30rpx;
-  position: relative;
-  display: -webkit-box;
-  display: -webkit-flex;
-  display: flex;
-  -webkit-box-align: center;
-  -webkit-align-items: center;
-          align-items: center;
-  background: #fff;
-}
-.wux-cell:after {
-  content: " ";
-  position: absolute;
-  left: 0;
-  bottom: 0;
-  right: 0;
-  height: 2rpx;
-  border-bottom: 2rpx solid #D9D9D9;
-  color: #D9D9D9;
-  -webkit-transform-origin: 0 100%;
-          transform-origin: 0 100%;
-  -webkit-transform: scaleY(0.5);
-          transform: scaleY(0.5);
-  left: 30rpx;
-}
-.wux-cell--last:after {
-  display: none;
-}
-.wux-cell--hover {
-  background-color: #ECECEC;
-}
-.wux-cell__thumb {
-  display: block;
-  width: 40rpx;
-  height: 40rpx;
-  margin-right: 10rpx;
-}
-.wux-cell__bd {
-  -webkit-box-flex: 1;
-  -webkit-flex: 1;
-          flex: 1;
-}
-.wux-cell__text {
-  text-align: left;
-}
-.wux-cell__desc {
-  text-align: left;
-  line-height: 1.2;
-  font-size: 24rpx;
-  color: #808080;
-}
-.wux-cell__ft {
-  text-align: right;
-  color: #808080;
-}
-.wux-cell--access .wux-cell__ft {
-  padding-right: 26rpx;
-  position: relative;
-}
-.wux-cell--access .wux-cell__ft:after {
-  content: " ";
-  display: inline-block;
-  height: 12rpx;
-  width: 12rpx;
-  border-width: 4rpx 4rpx 0 0;
-  border-color: #C8C8CD;
-  border-style: solid;
-  -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
-          transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
-  position: relative;
-  top: -4rpx;
-  position: absolute;
-  top: 50%;
-  margin-top: -8rpx;
-  right: 4rpx;
-}

+ 0 - 176
miniprogram/wux/countdown/index.js

@@ -1,176 +0,0 @@
-class Countdown {
-    constructor(options = {}, page = getCurrentPages()[getCurrentPages().length - 1]) {
-        Object.assign(this, {
-            page,
-            options,
-        })
-        this.__init()
-    }
-
-    /**
-     * 初始化
-     */
-    __init() {
-        this.setData = this.page.setData.bind(this.page)
-        this.restart(this.options)
-    }
-
-    /**
-     * 默认参数
-     */
-    setDefaults() {
-        return {
-            date: `June 7, 2087 15:03:25`,
-            refresh: 1000,
-            offset: 0,
-            onEnd() {},
-            render(date) {},
-        }
-    }
-
-    /**
-     * 合并参数
-     */
-    mergeOptions(options) {
-        const defaultOptions = this.setDefaults()
-
-        for (let i in defaultOptions) {
-            if (defaultOptions.hasOwnProperty(i)) {
-                this.options[i] = typeof options[i] !== `undefined` ? options[i] : defaultOptions[i]
-
-                if (i === `date` && typeof this.options.date !== `object`) {
-                    this.options.date = new Date(this.options.date)
-                }
-
-                if (typeof this.options[i] === `function`) {
-                    this.options[i] = this.options[i].bind(this)
-                }
-            }
-        }
-
-        if (typeof this.options.date !== `object`) {
-            this.options.date = new Date(this.options.date)
-        }
-    }
-
-    /**
-     * 计算日期差
-     */
-    getDiffDate() {
-        let diff = (this.options.date.getTime() - Date.now() + this.options.offset) / 1000
-
-        let dateData = {
-            years: 0,
-            days: 0,
-            hours: 0,
-            min: 0,
-            sec: 0,
-            millisec: 0,
-        }
-
-        if (diff <= 0) {
-            if (this.interval) {
-                this.stop()
-                this.options.onEnd()
-            }
-            return dateData
-        }
-
-        if (diff >= (365.25 * 86400)) {
-            dateData.years = Math.floor(diff / (365.25 * 86400))
-            diff -= dateData.years * 365.25 * 86400
-        }
-
-        if (diff >= 86400) {
-            dateData.days = Math.floor(diff / 86400)
-            diff -= dateData.days * 86400
-        }
-
-        if (diff >= 3600) {
-            dateData.hours = Math.floor(diff / 3600)
-            diff -= dateData.hours * 3600
-        }
-
-        if (diff >= 60) {
-            dateData.min = Math.floor(diff / 60)
-            diff -= dateData.min * 60
-        }
-
-        dateData.sec = Math.round(diff)
-
-        dateData.millisec = diff % 1 * 1000
-
-        return dateData
-    }
-
-    /**
-     * 补零
-     */
-    leadingZeros(num, length = 2) {
-        num = String(num)
-        if (num.length > length) return num
-        return (Array(length + 1).join(`0`) + num).substr(-length)
-    }
-
-    /**
-     * 更新组件
-     */
-    update(newDate) {
-        this.options.date = typeof newDate !== `object` ? new Date(newDate) : newDate
-        this.render()
-        return this
-    }
-
-    /**
-     * 停止倒计时
-     */
-    stop() {
-        if (this.interval) {
-            clearInterval(this.interval)
-            this.interval = !1
-        }
-        return this
-    }
-
-    /**
-     * 渲染组件
-     */
-    render() {
-        this.options.render(this.getDiffDate())
-        return this
-    }
-
-    /**
-     * 启动倒计时
-     */
-    start() {
-        if (this.interval) return !1
-        this.render()
-        if (this.options.refresh) {
-            this.interval = setInterval(() => {
-                this.render()
-            }, this.options.refresh)
-        }
-        return this
-    }
-
-    /**
-     * 更新offset
-     */
-    updateOffset(offset) {
-        this.options.offset = offset
-        return this
-    }
-
-    /**
-     * 重启倒计时
-     */
-    restart(options = {}) {
-        this.mergeOptions(options)
-        this.interval = !1
-        this.start()
-        return this
-    }
-}
-
-export default Countdown

+ 0 - 220
miniprogram/wux/countup/index.js

@@ -1,220 +0,0 @@
-class CountUp {
-    constructor(startVal, endVal, decimals, duration, options = {}, page = getCurrentPages()[getCurrentPages().length - 1]) {
-        Object.assign(this, {
-            page,
-            startVal,
-            endVal,
-            decimals,
-            duration,
-            options,
-        })
-        this.__init()
-    }
-
-    /**
-     * 初始化
-     */
-    __init() {
-        this.setData = this.page.setData.bind(this.page)
-
-        this.lastTime = 0
-
-        // merge options
-        this.mergeOptions(this.options)
-
-        this.startVal = Number(this.startVal)
-        this.cacheVal = this.startVal
-        this.endVal = Number(this.endVal)
-        this.countDown = (this.startVal > this.endVal)
-        this.frameVal = this.startVal
-        this.decimals = Math.max(0, this.decimals || 0)
-        this.dec = Math.pow(10, this.decimals)
-        this.duration = Number(this.duration) * 1000 || 2000
-
-        // format startVal on initialization
-        this.printValue(this.formattingFn(this.startVal))
-    }
-
-    /**
-     * 默认参数
-     */
-    setDefaultOptions() {
-        return {
-            useEasing: true, // toggle easing
-            useGrouping: true, // 1,000,000 vs 1000000
-            separator: `,`, // character to use as a separator
-            decimal: `.`, // character to use as a decimal
-            easingFn: null, // optional custom easing closure function, default is Robert Penner's easeOutExpo
-            formattingFn: null, // optional custom formatting function, default is this.formatNumber below
-            printValue(value) {}, // printValue
-        }
-    }
-
-    /**
-     * 合并参数
-     */
-    mergeOptions(options) {
-        const defaultOptions = this.setDefaultOptions()
-
-        // extend default options with passed options object
-        for (let key in defaultOptions) {
-            if (defaultOptions.hasOwnProperty(key)) {
-                this.options[key] = typeof options[key] !== `undefined` ? options[key] : defaultOptions[key]
-                if (typeof this.options[key] === `function`) {
-                    this.options[key] = this.options[key].bind(this)
-                }
-            }
-        }
-
-        if (this.options.separator === ``) { this.options.useGrouping = !1 }
-        if (!this.options.prefix) this.options.prefix = ``
-        if (!this.options.suffix) this.options.suffix = ``
-
-        this.easingFn = this.options.easingFn ? this.options.easingFn : this.easeOutExpo
-        this.formattingFn = this.options.formattingFn ? this.options.formattingFn : this.formatNumber
-        this.printValue = this.options.printValue ? this.options.printValue : function() {}
-    }
-
-    /**
-     * 创建定时器
-     */
-    requestAnimationFrame(callback) {
-        let currTime = new Date().getTime()
-        let timeToCall = Math.max(0, 16 - (currTime - this.lastTime))
-        let timeout = setTimeout(() => {
-            callback.bind(this)(currTime + timeToCall)
-        }, timeToCall)
-        this.lastTime = currTime + timeToCall
-        return timeout
-    }
-
-    /**
-     * 清空定时器
-     */
-    cancelAnimationFrame(timeout) {
-        clearTimeout(timeout)
-    }
-
-    /**
-     * 格式化数字
-     */
-    formatNumber(nStr) {
-        nStr = nStr.toFixed(this.decimals)
-        nStr += ``
-        let x, x1, x2, rgx
-        x = nStr.split(`.`)
-        x1 = x[0]
-        x2 = x.length > 1 ? this.options.decimal + x[1] : ``
-        rgx = /(\d+)(\d{3})/
-        if (this.options.useGrouping) {
-            while (rgx.test(x1)) {
-                x1 = x1.replace(rgx, `$1` + this.options.separator + `$2`)
-            }
-        }
-        return this.options.prefix + x1 + x2 + this.options.suffix
-    }
-
-    /**
-     * 过渡效果
-     */
-    easeOutExpo(t, b, c, d) {
-        return c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b
-    }
-
-    /**
-     * 计数函数
-     */
-    count(timestamp) {
-        if (!this.startTime) { this.startTime = timestamp }
-
-        this.timestamp = timestamp
-        const progress = timestamp - this.startTime
-        this.remaining = this.duration - progress
-
-        // to ease or not to ease
-        if (this.options.useEasing) {
-            if (this.countDown) {
-                this.frameVal = this.startVal - this.easingFn(progress, 0, this.startVal - this.endVal, this.duration)
-            } else {
-                this.frameVal = this.easingFn(progress, this.startVal, this.endVal - this.startVal, this.duration)
-            }
-        } else {
-            if (this.countDown) {
-                this.frameVal = this.startVal - ((this.startVal - this.endVal) * (progress / this.duration))
-            } else {
-                this.frameVal = this.startVal + (this.endVal - this.startVal) * (progress / this.duration)
-            }
-        }
-
-        // don't go past endVal since progress can exceed duration in the last frame
-        if (this.countDown) {
-            this.frameVal = (this.frameVal < this.endVal) ? this.endVal : this.frameVal
-        } else {
-            this.frameVal = (this.frameVal > this.endVal) ? this.endVal : this.frameVal
-        }
-
-        // decimal
-        this.frameVal = Math.round(this.frameVal * this.dec) / this.dec
-
-        // format and print value
-        this.printValue(this.formattingFn(this.frameVal))
-
-        // whether to continue
-        if (progress < this.duration) {
-            this.rAF = this.requestAnimationFrame(this.count)
-        } else {
-            if (this.callback) { this.callback() }
-        }
-    }
-
-    /**
-     * 启动计数器
-     */
-    start(callback) {
-        this.callback = callback
-        this.rAF = this.requestAnimationFrame(this.count)
-        return !1
-    }
-
-    /**
-     * 停止计数器
-     */
-    pauseResume() {
-        if (!this.paused) {
-            this.paused = !0
-            this.cancelAnimationFrame(this.rAF)
-        } else {
-            this.paused = !1
-            delete this.startTime
-            this.duration = this.remaining
-            this.startVal = this.frameVal
-            this.requestAnimationFrame(this.count)
-        }
-    }
-
-    /**
-     * 重置计数器
-     */
-    reset() {
-        this.paused = !1
-        delete this.startTime
-        this.startVal = this.cacheVal
-        this.cancelAnimationFrame(this.rAF)
-        this.printValue(this.formattingFn(this.startVal))
-    }
-
-    /**
-     * 更新计数器
-     */
-    update(newEndVal) {
-        this.cancelAnimationFrame(this.rAF)
-        this.paused = !1
-        delete this.startTime
-        this.startVal = this.frameVal
-        this.endVal = Number(newEndVal)
-        this.countDown = (this.startVal > this.endVal)
-        this.rAF = this.requestAnimationFrame(this.count)
-    }
-}
-
-export default CountUp

+ 0 - 77
miniprogram/wux/helpers/baseBehavior.js

@@ -1,77 +0,0 @@
-/**
- * Simple bind, faster than native
- *
- * @param {Function} fn
- * @param {Object} ctx
- * @return {Function}
- */
-const bind = (fn, ctx) => {
-    return (...args) => {
-        return args.length ? fn.apply(ctx, args) : fn.call(ctx)
-    }
-}
-
-/**
- * Object assign
- */
-const assign = (...args) => Object.assign({}, ...args)
-
-export default Behavior({
-    properties: {
-        visible: {
-            type: Boolean,
-            value: false,
-        },
-    },
-    methods: {
-        /**
-         * 合并参数并绑定方法
-         * 
-         * @param {Object} opts 参数对象
-         * @param {Object} fns 方法挂载的属性
-         */
-        $$mergeOptionsAndBindMethods(opts = {}, fns = this.fns) {
-            const options = Object.assign({}, opts)
-
-            for (const key in options) {
-                if (options.hasOwnProperty(key) && typeof options[key] === 'function') {
-                    fns[key] = bind(options[key], this)
-                    delete options[key]
-                }
-            }
-
-            return options
-        },
-        /**
-         * Promise setData
-         * @param {Array} args 参数对象
-         */
-        $$setData(...args) {
-            const params = assign({}, ...args)
-
-            return new Promise((resolve) => {
-                this.setData(params, resolve)
-            })
-        },
-        /**
-         * 延迟指定时间执行回调函数
-         * @param {Function} callback 回调函数
-         * @param {Number} timeout 延迟时间
-         */
-        $$requestAnimationFrame(callback = () => {}, timeout = 1000 / 60) {
-            return new Promise((resolve) => setTimeout(resolve, timeout)).then(callback)
-        },
-    },
-    /**
-     * 组件生命周期函数,在组件实例进入页面节点树时执行
-     */
-    created() {
-        this.fns = {}
-    },
-    /**
-     * 组件生命周期函数,在组件实例被从页面节点树移除时执行
-     */
-    detached() {
-        this.fns = {}
-    },
-})

+ 0 - 18
miniprogram/wux/helpers/colors.js

@@ -1,18 +0,0 @@
-export const colors = {
-    'light': '#ddd',
-    'stable': '#b2b2b2',
-    'positive': '#387ef5',
-    'calm': '#11c1f3',
-    'balanced': '#33cd5f',
-    'energized': '#ffc900',
-    'assertive': '#ef473a',
-    'royal': '#886aea',
-    'dark': '#444',
-}
-
-export const isPresetColor = (color) => {
-    if (!color) {
-        return false
-    }
-    return colors[color] ? colors[color] : color
-}

+ 0 - 38
miniprogram/wux/helpers/gestures.js

@@ -1,38 +0,0 @@
-/**
- * 获取触摸点位置信息
- */
-export const getTouchPoints = (e, index = 0) => {
-	const { pageX: x, pageY: y } = e.touches[index] || e.changedTouches[index]
-	return {
-        x,
-        y,
-    }
-}
-
-/**
- * 获取触摸点个数
- */
-export const getPointsNumber = (e) => e.touches && e.touches.length || e.changedTouches && e.changedTouches.length
-
-/**
- * 判断是否为同一点
- */
-export const isEqualPoints = (p1, p2) => p1.x === p2.x && p1.y === p2.y
-
-/**
- * 判断是否为相近的两点
- */
-export const isNearbyPoints = (p1, p2, DOUBLE_TAP_RADIUS = 25) => {
-	const xMove = Math.abs(p1.x - p2.x)
-	const yMove = Math.abs(p1.y - p2.y)
-	return xMove < DOUBLE_TAP_RADIUS & yMove < DOUBLE_TAP_RADIUS
-}
-
-/**
- * 获取两点之间的距离
- */
-export const getPointsDistance = (p1, p2) => {
-	const xMove = Math.abs(p1.x - p2.x)
-	const yMove = Math.abs(p1.y - p2.y)
-	return Math.sqrt(xMove * xMove + yMove * yMove)
-}

+ 0 - 17
miniprogram/wux/helpers/mergeOptionsToData.js

@@ -1,17 +0,0 @@
-/**
- * 过滤对象的函数属性
- * @param {Object} opts
- */
-const mergeOptionsToData = (opts = {}) => {
-    const options = Object.assign({}, opts)
-
-    for (const key in options) {
-        if (options.hasOwnProperty(key) && typeof options[key] === 'function') {
-            delete options[key]
-        }
-    }
-
-    return options
-}
-
-export default mergeOptionsToData

+ 0 - 47
miniprogram/wux/index.js

@@ -1,47 +0,0 @@
-import $wuxCountDown from './countdown/index'
-import $wuxCountUp from './countup/index'
-
-/**
- * 使用选择器选择组件实例节点,返回匹配到的第一个组件实例对象
- * @param {String} selector 节点选择器
- * @param {Object} ctx 页面栈或组件的实例,默认为当前页面栈实例
- */
-const getCtx = (selector, ctx = getCurrentPages()[getCurrentPages().length - 1]) => {
-    const componentCtx = ctx.selectComponent(selector)
-
-    if (!componentCtx) {
-        throw new Error('无法找到对应的组件,请按文档说明使用组件')
-    }
-
-    return componentCtx
-}
-
-const $wuxActionSheet = (selector = '#wux-actionsheet', ctx) => getCtx(selector, ctx)
-const $wuxBackdrop = (selector = '#wux-backdrop', ctx) => getCtx(selector, ctx)
-const $wuxToast = (selector = '#wux-toast', ctx) => getCtx(selector, ctx)
-const $wuxLoading = (selector = '#wux-loading', ctx) => getCtx(selector, ctx)
-const $wuxDialog = (selector = '#wux-dialog', ctx) => getCtx(selector, ctx)
-const $wuxToptips = (selector = '#wux-toptips', ctx) => getCtx(selector, ctx)
-const $wuxGallery = (selector = '#wux-gallery', ctx) => getCtx(selector, ctx)
-const $wuxNotification = (selector = '#wux-notification', ctx) => getCtx(selector, ctx)
-const $wuxKeyBoard = (selector = '#wux-keyboard', ctx) => getCtx(selector, ctx)
-const $wuxSelect = (selector = '#wux-select', ctx) => getCtx(selector, ctx)
-const $wuxCalendar = (selector = '#wux-calendar', ctx) => getCtx(selector, ctx)
-const $stopWuxRefresher = (selector = '#wux-refresher', ctx) => getCtx(selector, ctx).finishPullToRefresh()
-
-export {
-    $wuxActionSheet,
-    $wuxBackdrop,
-    $wuxToast,
-    $wuxLoading,
-    $wuxDialog,
-    $wuxToptips,
-    $wuxGallery,
-    $wuxNotification,
-    $wuxKeyBoard,
-    $wuxSelect,
-    $wuxCalendar,
-    $stopWuxRefresher,
-    $wuxCountDown,
-    $wuxCountUp,
-}

+ 0 - 35
miniprogram/wux/prompt/index.js

@@ -1,35 +0,0 @@
-import baseBehavior from '../helpers/baseBehavior'
-
-Component({
-    behaviors: [baseBehavior],
-    externalClasses: ['wux-class'],
-    properties: {
-        icon: {
-            type: String,
-            value: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAHdElNRQfgCxwAHyE2vHbUAAACWUlEQVRo3u2ZP2gTcRTHP7EpBTOJWrDSxdZBxE0yCC3UdilqUBCs4B8ogVfr0EnQ6lAEsylIXR6moFA1g6IoSAct7WhxUBQFsS5aLDgWcWitLjG5y11zufxyl8Hfd8n7vd+79z738svvfkfAysrqf1fC3609jHGYtnDJJBEuHiDpU7yNAkfj6sAmH990fOV9ADTN8fjK+3VA4izvB9AfL4B3EbY67E75Vn9qHeSCHAzfgQZJIU+f7moaAPvpAC7FAKAnPJ6EprkOQFbP6OZIAbSdgna5PEf4wSt6i8O7/NRx3RZdB84B4y7PGFsrYq7RExGAppgAhnV72ScDdDFVGi7ST4s8jqoD/77/UadTvkiW0wB8pltmZX3jBEYAmizd6YSmKiYfATAStLGadWDAYQ+5p+QXF4G5oBQGANrObccwr50VAXmG5HdQFs8RQpfoKA023Ip1N5c563E/5Qrvwj3NkqGiAU2Q5gYHfCczZPio55mvtuyMADTDHbZUDdnDLOhJKbiu+1O23Qe3sGsgFVC+HFejQgLIA1ro40OVkGUO0SpTtWYM/SuQdZljL/t44jM5T5od8lzWas8XehECCLznmO7kDc6HTLcshs9lsA/IEsOO4Wg95U13whmHPV1fCiMAWWWkaOZkpQkAwP3i52S9CQwBZIUccE+WmwQA3AKu1n+5MYB8JyufmggAte96EQGYyQJYAAtgASyA90y46rC/ahM68DLiigtBAFHfdC4AQBZ4GGH5tzwL6gCc8n3paIRe01v52trQ/wuqaI0X3JQZ80RWVlYN11+uNXxr6IunHwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNi0xMS0yOFQwMDozMTozMyswODowMBHRiXcAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTYtMTEtMjhUMDA6MzE6MzMrMDg6MDBgjDHLAAAAAElFTkSuQmCC',
-        },
-        title: {
-            type: String,
-            value: '',
-        },
-        text: {
-            type: String,
-            value: '',
-        },
-        buttons: {
-            type: Array,
-            value: [],
-        },
-    },
-    methods: {
-        /**
-         * 点击按钮触发事件
-         */
-        buttonClicked(e) {
-            const { index } = e.currentTarget.dataset
-            const value = this.data.buttons[index]
-
-            this.triggerEvent('click', { index, value })
-        },
-    },
-})

+ 0 - 6
miniprogram/wux/prompt/index.json

@@ -1,6 +0,0 @@
-{
-    "component": true,
-    "usingComponents": {
-        "wux-animation-group": "../animation-group/index"
-    }
-}

+ 0 - 15
miniprogram/wux/prompt/index.wxml

@@ -1,15 +0,0 @@
-<wux-animation-group wux-class="wux-prompt" in="{{ visible }}" class-names="wux-animate--fadeIn">
-    <view class="wux-prompt__bd">
-        <image src="{{ icon }}" class="wux-prompt__icon" wx:if="{{ icon }}" />
-        <view class="wux-prompt__title" wx:if="{{ title }}">{{ title }}</view>
-        <view class="wux-prompt__text" wx:if="{{ text }}">{{ text }}</view>
-        <view class="wux-prompt__buttons" wx:if="{{ buttons && !!buttons.length }}">
-            <block wx:for="{{ buttons }}" wx:key="">
-                <button type="{{ item.type || 'default' }}" size="{{ item.size || 'default' }}" loading="{{ item.loading }}" plain="{{ item.plain }}" disabled="{{ item.disabled }}" class="wux-prompt__button {{ item.className }}" hover-class="{{ item.haveClass || 'wux-prompt__button--hover' }}"
-                    bindtap="buttonClicked" data-index="{{ index }}">
-	        		{{ item.text }}
-	        	</button>
-            </block>
-        </view>
-    </view>
-</wux-animation-group>

+ 0 - 47
miniprogram/wux/prompt/index.wxss

@@ -1,47 +0,0 @@
-.wux-prompt {
-  display: -webkit-box;
-  display: -webkit-flex;
-  display: flex;
-  height: 100%;
-  -webkit-box-align: center;
-  -webkit-align-items: center;
-          align-items: center;
-  -webkit-box-pack: center;
-  -webkit-justify-content: center;
-          justify-content: center;
-  color: #939393;
-  background-color: #f2f3f4;
-}
-.wux-prompt__bd {
-  margin-top: 0;
-  text-align: center;
-}
-.wux-prompt__icon {
-  width: 128rpx;
-  height: 128rpx;
-}
-.wux-prompt__title {
-  font-size: 32rpx;
-  font-weight: bold;
-  color: #333;
-  margin: 4rpx 0;
-}
-.wux-prompt__text {
-  font-size: 24rpx;
-  margin: 4rpx 0;
-}
-.wux-prompt__button {
-  font-size: 26rpx;
-  line-height: 2;
-  margin: 8rpx auto;
-  width: 200rpx;
-  padding: 4rpx 0;
-  border: 2rpx solid #eee;
-}
-.wux-prompt__button:after {
-  display: none;
-}
-.wux-prompt__button--hover {
-  color: rgba(0, 0, 0, 0.6) !important;
-  background-color: #DEDEDE !important;
-}

+ 0 - 46
miniprogram/wux/radio-group/index.js

@@ -1,46 +0,0 @@
-Component({
-    externalClasses: ['wux-class'],
-    behaviors: ['wx://form-field'],
-    relations: {
-        '../radio/index': {
-            type: 'child',
-            linked() {
-                this.changeValue()
-            },
-            linkChanged() {
-                this.changeValue()
-            },
-            unlinked() {
-                this.changeValue()
-            },
-        },
-    },
-    properties: {
-        value: {
-            type: String,
-            value: '',
-            observer: 'changeValue',
-        },
-        title: {
-            type: String,
-            value: '',
-        },
-        label: {
-            type: String,
-            value: '',
-        },
-    },
-    methods: {
-        changeValue(value = this.data.value) {
-            const elements = this.getRelationNodes('../radio/index')
-            if (elements.length > 0) {
-                elements.forEach((element, index) => {
-                    element.changeValue(value === element.data.value, index)
-                })
-            }
-        },
-        emitEvent(value) {
-            this.triggerEvent('change', value)
-        },
-    },
-})

+ 0 - 6
miniprogram/wux/radio-group/index.json

@@ -1,6 +0,0 @@
-{
-    "component": true,
-    "usingComponents": {
-        "wux-cell-group": "../cell-group/index"
-    }
-}

+ 0 - 3
miniprogram/wux/radio-group/index.wxml

@@ -1,3 +0,0 @@
-<wux-cell-group wux-class="wux-radio-group" title="{{ title }}" label="{{ label }}">
-    <slot></slot>
-</wux-cell-group>

+ 0 - 0
miniprogram/wux/radio-group/index.wxss


+ 0 - 76
miniprogram/wux/radio/index.js

@@ -1,76 +0,0 @@
-import { isPresetColor } from '../helpers/colors'
-
-Component({
-    externalClasses: ['wux-class'],
-    relations: {
-        '../radio-group/index': {
-            type: 'parent',
-        },
-    },
-    properties: {
-        thumb: {
-            type: String,
-            value: '',
-        },
-        title: {
-            type: String,
-            value: '',
-        },
-        label: {
-            type: String,
-            value: '',
-        },
-        value: {
-            type: String,
-            value: '',
-        },
-        checked: {
-            type: Boolean,
-            value: false,
-        },
-        disabled: {
-            type: Boolean,
-            value: false,
-        },
-        color: {
-            type: String,
-            value: 'balanced',
-            observer(newVal) {
-                this.setData({
-                    radioColor: isPresetColor(newVal),
-                })
-            },
-        },
-    },
-    data: {
-        index: 0,
-    },
-    methods: {
-        radioChange() {
-            const { value, checked, index, disabled } = this.data
-            const parent = this.getRelationNodes('../radio-group/index')[0]
-            const item = {
-                checked: !checked,
-                value,
-                index,
-            }
-
-            if (disabled) {
-                return false
-            }
-
-            parent ? parent.emitEvent(item) : this.triggerEvent('change', item)
-        },
-        changeValue(checked = false, index = 0) {
-            this.setData({
-                checked,
-                index,
-            })
-        },
-    },
-    attached() {
-        this.setData({
-            radioColor: isPresetColor(this.data.color),
-        })
-    },
-})

+ 0 - 6
miniprogram/wux/radio/index.json

@@ -1,6 +0,0 @@
-{
-    "component": true,
-    "usingComponents": {
-        "wux-cell": "../cell/index"
-    }
-}

+ 0 - 6
miniprogram/wux/radio/index.wxml

@@ -1,6 +0,0 @@
-<wux-cell wux-class="wux-radio" thumb="{{ thumb }}" title="{{ title }}" label="{{ label }}" bind:click="radioChange">
-    <label slot="footer">
-        <radio value="{{ value }}" checked="{{ checked }}" color="{{ radioColor }}" disabled="{{ disabled }}" class="wux-radio__input" />
-        <icon class="wux-radio__icon" type="success_no_circle" size="16" color="{{ !disabled ? radioColor : '#666' }}" hidden="{{ !checked }}" />
-    </label>
-</wux-cell>

+ 0 - 12
miniprogram/wux/radio/index.wxss

@@ -1,12 +0,0 @@
-.wux-radio__input {
-  position: absolute;
-  top: 0;
-  left: 0;
-  opacity: 0;
-  width: 100%;
-  height: 100%;
-  z-index: 2;
-  border: 0 none;
-  -webkit-appearance: none;
-          appearance: none;
-}

+ 0 - 73
miniprogram/wux/result/index.js

@@ -1,73 +0,0 @@
-const defaultIcon = {
-    type: 'success',
-    size: 93,
-    color: '#33cd5f',
-}
-
-const getIcon = (icon) => {
-    if (icon !== null && typeof icon === 'object') {
-        return Object.assign({}, defaultIcon, icon)
-    } else if (typeof icon === 'string') {
-        return Object.assign({}, defaultIcon, {
-            type: icon,
-        })
-    }
-    return defaultIcon
-}
-
-Component({
-    externalClasses: ['wux-class'],
-    properties: {
-        icon: {
-            type: null,
-            value: defaultIcon,
-            observer(newVal) {
-                this.setData({
-                    resultIcon: getIcon(newVal),
-                })
-            },
-        },
-        title: {
-            type: String,
-            value: '',
-        },
-        label: {
-            type: String,
-            value: '',
-        },
-        buttons: {
-            type: Array,
-            value: [],
-        },
-        extra: {
-            type: String,
-            value: '',
-        },
-        fixed: {
-            type: Boolean,
-            value: false,
-        },
-    },
-    methods: {
-        onClick(e) {
-            this.triggerEvent('click', e.currentTarget.dataset)
-        },
-        bindgetuserinfo(e) {
-            this.triggerEvent('getuserinfo', { ...e.detail, ...e.currentTarget.dataset })
-        },
-        bindcontact(e) {
-            this.triggerEvent('contact', { ...e.detail, ...e.currentTarget.dataset })
-        },
-        bindgetphonenumber(e) {
-            this.triggerEvent('getphonenumber', { ...e.detail, ...e.currentTarget.dataset })
-        },
-    },
-    data: {
-        resultIcon: null,
-    },
-    attached() {
-        this.setData({
-            resultIcon: getIcon(this.data.icon),
-        })
-    },
-})

+ 0 - 6
miniprogram/wux/result/index.json

@@ -1,6 +0,0 @@
-{
-    "component": true,
-    "usingComponents": {
-        "wux-button": "../button/index"
-    }
-}

+ 0 - 55
miniprogram/wux/result/index.wxml

@@ -1,55 +0,0 @@
-<view class="wux-class wux-result {{ fixed ? 'wux-result--fixed' : '' }}">
-    <view class="wux-result__hd">
-        <view wx:if="{{ resultIcon }}" class="wux-result__icon">
-            <icon type="{{ resultIcon.type }}" size="{{ resultIcon.size }}" color="{{ resultIcon.color }}" />
-        </view>
-        <block wx:else>
-            <slot name="header"></slot>
-        </block>
-    </view>
-    <view class="wux-result__bd">
-        <view wx:if="{{ title }}" class="wux-result__title">{{ title }}</view>
-        <view wx:if="{{ label }}" class="wux-result__desc">{{ label }}</view>
-        <view wx:if="{{ buttons.length }}" class="wux-result__buttons">
-            <block wx:for="{{ buttons }}" wx:for-item="button" wx:key="index">
-                <wux-button
-                    type="{{ button.type }}"
-                    clear="{{ button.clear }}"
-                    block="{{ button.block }}"
-                    full="{{ button.full }}"
-                    outline="{{ button.outline }}"
-                    size="{{ button.size }}"
-                    disabled="{{ button.disabled }}"
-                    loading="{{ button.loading }}"
-                    form-type="{{ button.formType }}"
-                    open-type="{{ button.openType }}"
-                    hover-stop-propagation="{{ button.hoverStopPropagation }}"
-                    hover-start-time="{{ button.hoverStartTime }}"
-                    hover-stay-time="{{ button.hoverStayTime }}"
-                    lang="{{ button.lang }}"
-                    bind:getuserinfo="bindgetuserinfo"
-                    session-from="{{ button.sessionFrom }}"
-                    send-message-title="{{ button.sendMessageTitle }}"
-                    send-message-path="{{ button.sendMessagePath }}"
-                    send-message-img="{{ button.sendMessageImg }}"
-                    show-message-card="{{ button.showMessageCard }}"
-                    bind:contact="bindcontact"
-                    bind:getphonenumber="bindgetphonenumber"
-                    data-index="{{ index }}"
-                    bind:click="onClick"
-                >
-                    {{ button.text }}
-                </wux-button>
-            </block>
-        </view>
-        <slot></slot>
-    </view>
-    <view class="wux-result__ft">
-        <block wx:if="{{ extra }}">
-            <text>{{ extra }}</text>
-        </block>
-        <block wx:else>
-            <slot name="footer"></slot>
-        </block>
-    </view>
-</view>

+ 0 - 36
miniprogram/wux/result/index.wxss

@@ -1,36 +0,0 @@
-.wux-result {
-  padding-top: 0;
-  text-align: center;
-}
-.wux-result__bd {
-  padding: 60rpx 40rpx;
-}
-.wux-result__icon {
-  padding-top: 72rpx;
-  text-align: center;
-}
-.wux-result__title {
-  margin-bottom: 10rpx;
-  font-weight: 400;
-  font-size: 40rpx;
-}
-.wux-result__desc {
-  font-size: 28rpx;
-  color: #808080;
-}
-.wux-result__buttons {
-  margin-top: 60rpx;
-}
-.wux-result__ft {
-  font-size: 28rpx;
-  color: #808080;
-}
-.wux-result--fixed .wux-result__ft {
-  position: fixed;
-  left: 0;
-  bottom: 0;
-  width: 100%;
-  padding: 30rpx;
-  text-align: center;
-  box-sizing: border-box;
-}

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů