liyongli 3 years ago
parent
commit
3baf9afe48

+ 0 - 76
miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.js

@@ -1,76 +0,0 @@
-'use strict';
-Object.defineProperty(exports, '__esModule', { value: true });
-var component_1 = require('../common/component');
-var button_1 = require('../mixins/button');
-component_1.VantComponent({
-  mixins: [button_1.button],
-  props: {
-    show: Boolean,
-    title: String,
-    cancelText: String,
-    description: String,
-    round: {
-      type: Boolean,
-      value: true,
-    },
-    zIndex: {
-      type: Number,
-      value: 100,
-    },
-    actions: {
-      type: Array,
-      value: [],
-    },
-    overlay: {
-      type: Boolean,
-      value: true,
-    },
-    closeOnClickOverlay: {
-      type: Boolean,
-      value: true,
-    },
-    closeOnClickAction: {
-      type: Boolean,
-      value: true,
-    },
-    safeAreaInsetBottom: {
-      type: Boolean,
-      value: true,
-    },
-  },
-  methods: {
-    onSelect: function (event) {
-      var _this = this;
-      var index = event.currentTarget.dataset.index;
-      var _a = this.data,
-        actions = _a.actions,
-        closeOnClickAction = _a.closeOnClickAction,
-        canIUseGetUserProfile = _a.canIUseGetUserProfile;
-      var item = actions[index];
-      if (item) {
-        this.$emit('select', item);
-        if (closeOnClickAction) {
-          this.onClose();
-        }
-        if (item.openType === 'getUserInfo' && canIUseGetUserProfile) {
-          wx.getUserProfile({
-            desc: item.getUserProfileDesc || '  ',
-            complete: function (userProfile) {
-              _this.$emit('getuserinfo', userProfile);
-            },
-          });
-        }
-      }
-    },
-    onCancel: function () {
-      this.$emit('cancel');
-    },
-    onClose: function () {
-      this.$emit('close');
-    },
-    onClickOverlay: function () {
-      this.$emit('click-overlay');
-      this.onClose();
-    },
-  },
-});

+ 0 - 8
miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.json

@@ -1,8 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "van-icon": "../icon/index",
-    "van-popup": "../popup/index",
-    "van-loading": "../loading/index"
-  }
-}

+ 0 - 69
miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.wxml

@@ -1,69 +0,0 @@
-<wxs src="../wxs/utils.wxs" module="utils" />
-
-<van-popup
-  show="{{ show }}"
-  position="bottom"
-  round="{{ round }}"
-  z-index="{{ zIndex }}"
-  overlay="{{ overlay }}"
-  custom-class="van-action-sheet"
-  safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
-  close-on-click-overlay="{{ closeOnClickOverlay }}"
-  bind:close="onClickOverlay"
->
-  <view wx:if="{{ title }}" class="van-action-sheet__header">
-    {{ title }}
-    <van-icon
-      name="cross"
-      custom-class="van-action-sheet__close"
-      bind:click="onClose"
-    />
-  </view>
-  <view wx:if="{{ description }}" class="van-action-sheet__description van-hairline--bottom">
-    {{ description }}
-  </view>
-  <view wx:if="{{ actions && actions.length }}">
-    <!-- button外包一层view,防止actions动态变化,导致渲染时button被打散 -->
-    <button
-      wx:for="{{ actions }}"
-      wx:key="index"
-      open-type="{{ item.disabled || item.loading || (canIUseGetUserProfile && item.openType === 'getUserInfo') ? '' : item.openType }}"
-      style="{{ item.color ? 'color: ' + item.color : '' }}"
-      class="{{ utils.bem('action-sheet__item', { disabled: item.disabled || item.loading }) }} {{ item.className || '' }}"
-      hover-class="van-action-sheet__item--hover"
-      data-index="{{ index }}"
-      bindtap="{{ item.disabled || item.loading ? '' : 'onSelect' }}"
-      bindgetuserinfo="onGetUserInfo"
-      bindcontact="onContact"
-      bindgetphonenumber="onGetPhoneNumber"
-      binderror="onError"
-      bindlaunchapp="onLaunchApp"
-      bindopensetting="onOpenSetting"
-      lang="{{ lang }}"
-      session-from="{{ sessionFrom }}"
-      send-message-title="{{ sendMessageTitle }}"
-      send-message-path="{{ sendMessagePath }}"
-      send-message-img="{{ sendMessageImg }}"
-      show-message-card="{{ showMessageCard }}"
-      app-parameter="{{ appParameter }}"
-    >
-      <block wx:if="{{ !item.loading }}">
-        {{ item.name }}
-        <view wx:if="{{ item.subname }}" class="van-action-sheet__subname" >{{ item.subname }}</view>
-      </block>
-      <van-loading wx:else custom-class="van-action-sheet__loading" size="22px" />
-    </button>
-  </view>
-  <slot />
-  <block wx:if="{{ cancelText }}">
-    <view class="van-action-sheet__gap" />
-    <view
-      class="van-action-sheet__cancel"
-      hover-class="van-action-sheet__cancel--hover"
-      hover-stay-time="70"
-      bind:tap="onCancel"
-    >
-      {{ cancelText }}
-    </view>
-  </block>
-</van-popup>

File diff suppressed because it is too large
+ 0 - 0
miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.wxss


+ 1 - 7
miniprogram/miniprogram_npm/@vant/weapp/button/index.js

@@ -58,13 +58,7 @@ component_1.VantComponent({
         getUserProfileDesc = _a.getUserProfileDesc,
         lang = _a.lang;
       if (openType === 'getUserInfo' && canIUseGetUserProfile) {
-        wx.getUserProfile({
-          desc: getUserProfileDesc || '  ',
-          lang: lang || 'en',
-          complete: function (userProfile) {
-            _this.$emit('getuserinfo', userProfile);
-          },
-        });
+        _this.$emit('getuserinfo', {});
       }
     },
   },

+ 1 - 1
miniprogram/miniprogram_npm/@vant/weapp/common/version.js

@@ -53,6 +53,6 @@ function canIUseCanvas2d() {
 }
 exports.canIUseCanvas2d = canIUseCanvas2d;
 function canIUseGetUserProfile() {
-  return !!wx.getUserProfile;
+  return false;
 }
 exports.canIUseGetUserProfile = canIUseGetUserProfile;

+ 0 - 246
miniprogram/miniprogram_npm/@vant/weapp/uploader/index.js

@@ -1,246 +0,0 @@
-'use strict';
-var __assign =
-  (this && this.__assign) ||
-  function () {
-    __assign =
-      Object.assign ||
-      function (t) {
-        for (var s, i = 1, n = arguments.length; i < n; i++) {
-          s = arguments[i];
-          for (var p in s)
-            if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
-        }
-        return t;
-      };
-    return __assign.apply(this, arguments);
-  };
-Object.defineProperty(exports, '__esModule', { value: true });
-var component_1 = require('../common/component');
-var utils_1 = require('./utils');
-var shared_1 = require('./shared');
-var validator_1 = require('../common/validator');
-component_1.VantComponent({
-  props: __assign(
-    __assign(
-      {
-        disabled: Boolean,
-        multiple: Boolean,
-        uploadText: String,
-        useBeforeRead: Boolean,
-        afterRead: null,
-        beforeRead: null,
-        previewSize: {
-          type: null,
-          value: 80,
-        },
-        name: {
-          type: null,
-          value: '',
-        },
-        accept: {
-          type: String,
-          value: 'image',
-        },
-        fileList: {
-          type: Array,
-          value: [],
-          observer: 'formatFileList',
-        },
-        maxSize: {
-          type: Number,
-          value: Number.MAX_VALUE,
-        },
-        maxCount: {
-          type: Number,
-          value: 100,
-        },
-        deletable: {
-          type: Boolean,
-          value: true,
-        },
-        showUpload: {
-          type: Boolean,
-          value: true,
-        },
-        previewImage: {
-          type: Boolean,
-          value: true,
-        },
-        previewFullImage: {
-          type: Boolean,
-          value: true,
-        },
-        imageFit: {
-          type: String,
-          value: 'scaleToFill',
-        },
-        uploadIcon: {
-          type: String,
-          value: 'photograph',
-        },
-      },
-      shared_1.chooseImageProps
-    ),
-    shared_1.chooseVideoProps
-  ),
-  data: {
-    lists: [],
-    isInCount: true,
-  },
-  methods: {
-    formatFileList: function () {
-      var _a = this.data,
-        _b = _a.fileList,
-        fileList = _b === void 0 ? [] : _b,
-        maxCount = _a.maxCount;
-      var lists = fileList.map(function (item) {
-        return __assign(__assign({}, item), {
-          isImage: utils_1.isImageFile(item),
-          isVideo: utils_1.isVideoFile(item),
-          deletable: validator_1.isBoolean(item.deletable)
-            ? item.deletable
-            : true,
-        });
-      });
-      this.setData({ lists: lists, isInCount: lists.length < maxCount });
-    },
-    getDetail: function (index) {
-      return {
-        name: this.data.name,
-        index: index == null ? this.data.fileList.length : index,
-      };
-    },
-    startUpload: function () {
-      var _this = this;
-      var _a = this.data,
-        maxCount = _a.maxCount,
-        multiple = _a.multiple,
-        lists = _a.lists,
-        disabled = _a.disabled;
-      if (disabled) return;
-      utils_1
-        .chooseFile(
-          __assign(__assign({}, this.data), {
-            maxCount: maxCount - lists.length,
-          })
-        )
-        .then(function (res) {
-          _this.onBeforeRead(multiple ? res : res[0]);
-        })
-        .catch(function (error) {
-          _this.$emit('error', error);
-        });
-    },
-    onBeforeRead: function (file) {
-      var _this = this;
-      var _a = this.data,
-        beforeRead = _a.beforeRead,
-        useBeforeRead = _a.useBeforeRead;
-      var res = true;
-      if (typeof beforeRead === 'function') {
-        res = beforeRead(file, this.getDetail());
-      }
-      if (useBeforeRead) {
-        res = new Promise(function (resolve, reject) {
-          _this.$emit(
-            'before-read',
-            __assign(__assign({ file: file }, _this.getDetail()), {
-              callback: function (ok) {
-                ok ? resolve() : reject();
-              },
-            })
-          );
-        });
-      }
-      if (!res) {
-        return;
-      }
-      if (validator_1.isPromise(res)) {
-        res.then(function (data) {
-          return _this.onAfterRead(data || file);
-        });
-      } else {
-        this.onAfterRead(file);
-      }
-    },
-    onAfterRead: function (file) {
-      var _a = this.data,
-        maxSize = _a.maxSize,
-        afterRead = _a.afterRead;
-      var oversize = Array.isArray(file)
-        ? file.some(function (item) {
-            return item.size > maxSize;
-          })
-        : file.size > maxSize;
-      if (oversize) {
-        this.$emit('oversize', __assign({ file: file }, this.getDetail()));
-        return;
-      }
-      if (typeof afterRead === 'function') {
-        afterRead(file, this.getDetail());
-      }
-      this.$emit('after-read', __assign({ file: file }, this.getDetail()));
-    },
-    deleteItem: function (event) {
-      var index = event.currentTarget.dataset.index;
-      this.$emit(
-        'delete',
-        __assign(__assign({}, this.getDetail(index)), {
-          file: this.data.fileList[index],
-        })
-      );
-    },
-    onPreviewImage: function (event) {
-      if (!this.data.previewFullImage) return;
-      var index = event.currentTarget.dataset.index;
-      var lists = this.data.lists;
-      var item = lists[index];
-      wx.previewImage({
-        urls: lists
-          .filter(function (item) {
-            return utils_1.isImageFile(item);
-          })
-          .map(function (item) {
-            return item.url;
-          }),
-        current: item.url,
-        fail: function () {
-          wx.showToast({ title: '预览图片失败', icon: 'none' });
-        },
-      });
-    },
-    onPreviewVideo: function (event) {
-      if (!this.data.previewFullImage) return;
-      var index = event.currentTarget.dataset.index;
-      var lists = this.data.lists;
-      wx.previewMedia({
-        sources: lists
-          .filter(function (item) {
-            return utils_1.isVideoFile(item);
-          })
-          .map(function (item) {
-            return __assign(__assign({}, item), { type: 'video' });
-          }),
-        current: index,
-        fail: function () {
-          wx.showToast({ title: '预览视频失败', icon: 'none' });
-        },
-      });
-    },
-    onPreviewFile: function (event) {
-      var index = event.currentTarget.dataset.index;
-      wx.openDocument({
-        filePath: this.data.lists[index].url,
-        showMenu: true,
-      });
-    },
-    onClickPreview: function (event) {
-      var index = event.currentTarget.dataset.index;
-      var item = this.data.lists[index];
-      this.$emit(
-        'click-preview',
-        __assign(__assign({}, item), this.getDetail(index))
-      );
-    },
-  },
-});

+ 0 - 7
miniprogram/miniprogram_npm/@vant/weapp/uploader/index.json

@@ -1,7 +0,0 @@
-{
-  "component": true,
-  "usingComponents": {
-    "van-icon": "../icon/index",
-    "van-loading": "../loading/index"
-  }
-}

+ 0 - 83
miniprogram/miniprogram_npm/@vant/weapp/uploader/index.wxml

@@ -1,83 +0,0 @@
-<wxs src="../wxs/utils.wxs" module="utils" />
-<wxs src="./index.wxs" module="computed" />
-
-<view class="van-uploader">
-  <view class="van-uploader__wrapper">
-    <!-- 预览样式 -->
-    <view
-      wx:if="{{ previewImage }}"
-      wx:for="{{ lists }}"
-      wx:key="index"
-      class="van-uploader__preview"
-      data-index="{{ index }}"
-      bindtap="onClickPreview"
-    >
-      <image
-        wx:if="{{ item.isImage }}"
-        mode="{{ imageFit }}"
-        src="{{ item.thumb || item.url }}"
-        alt="{{ item.name || ('图片' + index) }}"
-        class="van-uploader__preview-image"
-        style="{{ computed.sizeStyle({ previewSize }) }}"
-        data-index="{{ index }}"
-        bindtap="onPreviewImage"
-      />
-      <video
-        wx:elif="{{ item.isVideo }}"
-        src="{{ item.url }}"
-        title="{{ item.name || ('视频' + index) }}"
-        poster="{{ item.thumb }}"
-        autoplay="{{ item.autoplay }}"
-        class="van-uploader__preview-image"
-        style="{{ computed.sizeStyle({ previewSize }) }}"
-        data-index="{{ index }}"
-        bindtap="onPreviewVideo"
-      >
-      </video>
-      <view
-        wx:else
-        class="van-uploader__file"
-        style="{{ computed.sizeStyle({ previewSize }) }}"
-        data-index="{{ index }}"
-        bindtap="onPreviewFile"
-      >
-        <van-icon name="description" class="van-uploader__file-icon" />
-        <view class="van-uploader__file-name van-ellipsis">{{ item.name || item.url }}</view>
-      </view>
-      <view
-        wx:if="{{ item.status === 'uploading' || item.status === 'failed' }}"
-        class="van-uploader__mask"
-      >
-       <van-icon wx:if="{{ item.status === 'failed' }}" name="close" class="van-uploader__mask-icon" />
-       <van-loading wx:else custom-class="van-uploader__loading" />
-       <text wx:if="{{ item.message }}" class="van-uploader__mask-message">{{ item.message }}</text>
-      </view>
-      <view
-        wx:if="{{ deletable && item.deletable }}"
-        data-index="{{ index }}"
-        class="van-uploader__preview-delete"
-        catch:tap="deleteItem"
-      >
-        <van-icon name="cross" class="van-uploader__preview-delete-icon" />
-      </view>
-    </view>
-
-    <!-- 上传样式 -->
-    <block wx:if="{{ isInCount }}">
-      <view class="van-uploader__slot" bindtap="startUpload">
-        <slot />
-      </view>
-
-      <!-- 默认上传样式 -->
-      <view
-        wx:if="{{ showUpload }}"
-        class="van-uploader__upload {{ disabled ? 'van-uploader__upload--disabled': ''}}"
-        style="{{ computed.sizeStyle({ previewSize }) }}"
-        bindtap="startUpload"
-      >
-        <van-icon name="{{ uploadIcon }}" class="van-uploader__upload-icon" />
-        <text wx:if="{{ uploadText }}" class="van-uploader__upload-text">{{ uploadText }}</text>
-      </view>
-    </block>
-  </view>
-</view>

+ 0 - 14
miniprogram/miniprogram_npm/@vant/weapp/uploader/index.wxs

@@ -1,14 +0,0 @@
-/* eslint-disable */
-var style = require('../wxs/style.wxs');
-var addUnit = require('../wxs/add-unit.wxs');
-
-function sizeStyle(data) {
-  return style({
-    width: addUnit(data.previewSize),
-    height: addUnit(data.previewSize),
-  });
-}
-
-module.exports = {
-  sizeStyle: sizeStyle,
-};

File diff suppressed because it is too large
+ 0 - 0
miniprogram/miniprogram_npm/@vant/weapp/uploader/index.wxss


+ 0 - 33
miniprogram/miniprogram_npm/@vant/weapp/uploader/shared.js

@@ -1,33 +0,0 @@
-'use strict';
-Object.defineProperty(exports, '__esModule', { value: true });
-exports.chooseVideoProps = exports.chooseImageProps = void 0;
-// props for choose image
-exports.chooseImageProps = {
-  sizeType: {
-    type: Array,
-    value: ['original', 'compressed'],
-  },
-  capture: {
-    type: Array,
-    value: ['album', 'camera'],
-  },
-};
-// props for choose video
-exports.chooseVideoProps = {
-  capture: {
-    type: Array,
-    value: ['album', 'camera'],
-  },
-  compressed: {
-    type: Boolean,
-    value: true,
-  },
-  maxDuration: {
-    type: Number,
-    value: 60,
-  },
-  camera: {
-    type: String,
-    value: 'back',
-  },
-};

+ 0 - 158
miniprogram/miniprogram_npm/@vant/weapp/uploader/utils.js

@@ -1,158 +0,0 @@
-'use strict';
-var __assign =
-  (this && this.__assign) ||
-  function () {
-    __assign =
-      Object.assign ||
-      function (t) {
-        for (var s, i = 1, n = arguments.length; i < n; i++) {
-          s = arguments[i];
-          for (var p in s)
-            if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
-        }
-        return t;
-      };
-    return __assign.apply(this, arguments);
-  };
-Object.defineProperty(exports, '__esModule', { value: true });
-exports.chooseFile = exports.isVideoFile = exports.isImageFile = void 0;
-var utils_1 = require('../common/utils');
-var validator_1 = require('../common/validator');
-function isImageFile(item) {
-  if (item.isImage != null) {
-    return item.isImage;
-  }
-  if (item.type) {
-    return item.type === 'image';
-  }
-  if (item.url) {
-    return validator_1.isImageUrl(item.url);
-  }
-  return false;
-}
-exports.isImageFile = isImageFile;
-function isVideoFile(item) {
-  if (item.isVideo != null) {
-    return item.isVideo;
-  }
-  if (item.type) {
-    return item.type === 'video';
-  }
-  if (item.url) {
-    return validator_1.isVideoUrl(item.url);
-  }
-  return false;
-}
-exports.isVideoFile = isVideoFile;
-function formatImage(res) {
-  return res.tempFiles.map(function (item) {
-    return __assign(__assign({}, utils_1.pickExclude(item, ['path'])), {
-      type: 'image',
-      url: item.path,
-      thumb: item.path,
-    });
-  });
-}
-function formatVideo(res) {
-  return [
-    __assign(
-      __assign(
-        {},
-        utils_1.pickExclude(res, [
-          'tempFilePath',
-          'thumbTempFilePath',
-          'errMsg',
-        ])
-      ),
-      { type: 'video', url: res.tempFilePath, thumb: res.thumbTempFilePath }
-    ),
-  ];
-}
-function formatMedia(res) {
-  return res.tempFiles.map(function (item) {
-    return __assign(
-      __assign(
-        {},
-        utils_1.pickExclude(item, [
-          'fileType',
-          'thumbTempFilePath',
-          'tempFilePath',
-        ])
-      ),
-      {
-        type: res.type,
-        url: item.tempFilePath,
-        thumb:
-          res.type === 'video' ? item.thumbTempFilePath : item.tempFilePath,
-      }
-    );
-  });
-}
-function formatFile(res) {
-  return res.tempFiles.map(function (item) {
-    return __assign(__assign({}, utils_1.pickExclude(item, ['path'])), {
-      url: item.path,
-    });
-  });
-}
-function chooseFile(_a) {
-  var accept = _a.accept,
-    multiple = _a.multiple,
-    capture = _a.capture,
-    compressed = _a.compressed,
-    maxDuration = _a.maxDuration,
-    sizeType = _a.sizeType,
-    camera = _a.camera,
-    maxCount = _a.maxCount;
-  return new Promise(function (resolve, reject) {
-    switch (accept) {
-      case 'image':
-        wx.chooseImage({
-          count: multiple ? Math.min(maxCount, 9) : 1,
-          sourceType: capture,
-          sizeType: sizeType,
-          success: function (res) {
-            return resolve(formatImage(res));
-          },
-          fail: reject,
-        });
-        break;
-      case 'media':
-        wx.chooseMedia({
-          count: multiple ? Math.min(maxCount, 9) : 1,
-          sourceType: capture,
-          maxDuration: maxDuration,
-          sizeType: sizeType,
-          camera: camera,
-          success: function (res) {
-            return resolve(formatMedia(res));
-          },
-          fail: reject,
-        });
-        break;
-      case 'video':
-        wx.chooseVideo({
-          sourceType: capture,
-          compressed: compressed,
-          maxDuration: maxDuration,
-          camera: camera,
-          success: function (res) {
-            return resolve(formatVideo(res));
-          },
-          fail: reject,
-        });
-        break;
-      default:
-        wx.chooseMessageFile({
-          count: multiple ? maxCount : 1,
-          type: accept,
-          success: function (res) {
-            return resolve(formatFile(res));
-          },
-          fail: reject,
-        });
-        break;
-    }
-  });
-}
-exports.chooseFile = chooseFile;

+ 46 - 6
miniprogram/pages/index/index.wxml

@@ -65,14 +65,54 @@
       </cover-view>
     </cover-view>
     <cover-view class="local_dialog_body">
-      <cover-view style="padding-right:5px;white-space:pre-wrap;line-height: 1.5em;width:490rpx;margin: 0 auto;">
-        <cover-view wx:key="id" wx:for="{{detailList}}">
-          <cover-view style="line-height:1.8em;font-weight: bold;">{{item.platform}}:</cover-view>
-          <cover-view style="line-height:1.8em" wx:key="id" wx:for="{{item.list || []}}" wx:for-item="v"
-            wx:for-index="i">{{v.title}}:{{format.formatNumber(v.play_count)}}</cover-view>
+      <cover-view class="local_dialog_main">
+        <cover-view style="background-color: #999; height: 1rpx;"></cover-view>
+        <cover-view class="local_dialog_totalStyle" style="text-align: center;">
+          <cover-view class="local_dialog_left titalItem">
+            平台
+            <cover-view class="local_dialog_line"> </cover-view>
+          </cover-view>
+          <cover-view class="local_dialog_right titalItem">
+            合计
+          </cover-view>
         </cover-view>
+        <cover-view style="background-color: #999; height: 1rpx;"></cover-view>
+        <cover-view class="local_dialog_left">
+          <cover-view wx:key="id" wx:for="{{detailList}}">
+            <cover-view style="line-height:1.8em;font-weight: bold;">{{item.platform}}:</cover-view>
+            <cover-view style="line-height:1.8em" wx:key="id" wx:for="{{item.list || []}}" wx:for-item="v"
+              wx:for-index="i">
+              {{format.shenglueh(v.title)}}:{{format.formatNumber(v.play_count)}}
+            </cover-view>
+          </cover-view>
+          <cover-view class="local_dialog_line"> </cover-view>
+        </cover-view>
+        <cover-view class="local_dialog_right">
+          <cover-view>{{format.formatNumber(getData.total.play_main_stream_count)}}</cover-view>
+        </cover-view>
+        <cover-view style="background-color: #999; height: 1rpx;"></cover-view>
+        <cover-view class="local_dialog_totalStyle">
+          <cover-view class="local_dialog_left titalItem" style="line-height:1.8em;color: #000">
+            其它平台
+            <cover-view class="local_dialog_line"> </cover-view>
+          </cover-view>
+          <cover-view class="local_dialog_right titalItem" style="padding-left: 10rpx;line-height:1.8em;color: #000">
+            {{format.formatNumber(getData.total.play_orther_count)}}
+          </cover-view>
+        </cover-view>
+        <cover-view style="background-color: #999; height: 1rpx;"></cover-view>
+        <cover-view class="local_dialog_totalStyle">
+          <cover-view class="local_dialog_left titalItem" style="line-height:1.8em;color: #000">
+            总计
+            <cover-view class="local_dialog_line"> </cover-view>
+          </cover-view>
+          <cover-view class="local_dialog_right titalItem" style="padding-left: 10rpx;line-height:1.8em;color: #000">
+            {{format.formatNumber(getData.total.play_count)}}
+          </cover-view>
+        </cover-view>
+        <cover-view style="background-color: #999; height: 1rpx;"></cover-view>
       </cover-view>
-      <cover-view style="height:25px"></cover-view>
     </cover-view>
+    <cover-view style="height:25px"></cover-view>
   </cover-view>
 </cover-view>

+ 43 - 2
miniprogram/pages/index/index.wxss

@@ -114,12 +114,53 @@
 }
 
 .local_dialog_body {
-  max-height: 60vh;
+  box-sizing: border-box;
+  max-height: 80vh;
   overflow: hidden;
   overflow-y: scroll;
-  padding: 8px 15px 0 15px;
+  padding: 8px 15px 8px 15px;
   white-space: normal;
   line-height: 2em;
   font-size: 14px;
   color: #222;
+}
+.local_dialog_main {
+  box-sizing: border-box;
+  width: 100%;
+  margin: 0 auto;
+  line-height: 1.5em;
+  white-space:pre-wrap;
+  vertical-align: middle;
+  /* border-bottom: 1px solid #999; */
+}
+.local_dialog_left{
+  box-sizing: border-box;
+  /* border-right: 1rpx solid #999; */
+  vertical-align: middle;
+  display:inline-block;
+  position: relative;
+  width: 70%;
+}
+.local_dialog_line{
+  width: 1rpx;
+  background-color: #999;
+  position: absolute;
+  top:0;
+  bottom: 0;
+  right: 0;
+}
+.local_dialog_right{
+  box-sizing: border-box;
+  display:inline-block;
+  padding-left: 10rpx;
+  vertical-align: middle;
+  width: 30%;
+}
+.local_dialog_totalStyle{
+  box-sizing: border-box;
+  /* border-top: 1px solid #999; */
+}
+.local_dialog_totalStyle .titalItem{
+  box-sizing: border-box;
+  padding: 5rpx 0;
 }

+ 0 - 120
miniprogram/pages/marvellous/index.js

@@ -10,7 +10,6 @@ Page({
     pageList: [],
     select: { count: 0 },
     pageType: "",
-    showSelect: false,
     showVideo: "",
     showAnVideo: true
   },
@@ -81,7 +80,6 @@ Page({
 
   },
   showImg(e) {
-    if (this.data.showSelect) return this.btnSelect(e);
     if (this.data.pageType === "video") return this.showVideo(e);
     if (this.data.pageType === "img") return this.showImage(e);
   },
@@ -112,31 +110,12 @@ Page({
       pageList[li[0]].list[li[1]].select = false;
     }
     this.setData({
-      showSelect: false,
       pageList,
       select: {
         count: 0
       }
     })
   },
-  btnSelect: function (e) {
-    if (this.data.select.count > 9) return;
-    let d = e.currentTarget.dataset;
-    let pageList = this.data.pageList;
-    let select = this.data.select;
-    pageList[d.key].list[d.o].select = !pageList[d.key].list[d.o].select;
-    if (pageList[d.key].list[d.o].select) {
-      select[d.key + "-" + d.o] = d.url;
-      select.count++;
-    } else {
-      select[d.key + "-" + d.o] = undefined;
-      select.count--;
-    }
-    this.setData({
-      pageList: pageList,
-      select
-    })
-  },
   format: function (res) {
     if (!res) return ""
     let T = new Date(res || 0);
@@ -149,105 +128,6 @@ Page({
 
     return year + "-" + (month > 9 ? month : "0" + month) + "-" + day + " " + (hour > 9 ? hour : '0' + hour) + ":" + (min > 9 ? min : '0' + min) + ":" + (sec > 9 ? sec : '0' + sec);
   },
-  saveAsset: function () {
-    if (this.data.select.count === 0) return;
-    let _this = this;
-    // 权限判断
-    wx.getSetting({
-      success: function (res) {
-        if (!res['scope.writePhotosAlbum']) {
-          wx.authorize({
-            scope: 'scope.writePhotosAlbum',
-            success: function (res) {
-              wx.showLoading();
-              let keys = Object.keys(_this.data.select);
-              _this.downCount = keys.length - 1;
-              for (let i = 0; i < keys.length; i++) {
-                const v = keys[i];
-                if (v === 'count') continue;
-                _this.downFile(v);
-              }
-            },
-            fail: function (err) {
-              wx.showToast({
-                title: '未获取权限',
-                icon: "none"
-              })
-            }
-          })
-          return
-        }
-        wx.showLoading();
-        let keys = Object.keys(this.data.select);
-        _this.downCount = keys.length - 1;
-        for (let i = 0; i < keys.length; i++) {
-          const v = keys[i];
-          if (v === 'count') continue;
-          _this.downFile(v);
-        }
-      },
-      fail: function (err) {
-        wx.showToast({
-          title: '未获取权限',
-          icon: "none"
-        })
-      }
-    })
-  },
-  downFile: function (v) {
-    let _this = this;
-    wx.cloud.downloadFile({
-      fileID: _this.data.select[v],
-      success: function (res) {
-        if (_this.data.pageType === "img") {
-          _this.saveImage(res.tempFilePath)
-        } else {
-          _this.savevideo(res.tempFilePath)
-        }
-      },
-      fail: function (err) {
-        wx.showToast({
-          title: "下载失败:" + _this.data.select[v],
-          icon: "none"
-        })
-        _this.downCount--;
-        if (_this.downCount <= 0) {
-          wx.hideLoading();
-        }
-      }
-    })
-  },
-  saveImage: function (tempFilePath) {
-    let _this = this;
-    wx.saveImageToPhotosAlbum({
-      filePath: tempFilePath,
-      success: function (res) {
-        _this.downEnd();
-      },
-      fail: function (err) {
-        wx.showToast({
-          title: '下载失败',
-          icon: "none"
-        })
-        _this.downEnd();
-      }
-    })
-  },
-  savevideo: function (tempFilePath) {
-    wx.saveVideoToPhotosAlbum({
-      filePath: tempFilePath,
-      success: function (res) {
-        _this.downEnd();
-      },
-      fail: function (err) {
-        wx.showToast({
-          title: '下载失败',
-          icon: "none"
-        })
-        _this.downEnd();
-      }
-    })
-  },
   downEnd: function () {
     this.downCount--;
     if (this.downCount <= 0) {

+ 0 - 4
miniprogram/pages/marvellous/index.wxml

@@ -25,10 +25,6 @@
       </view>
     </view>
   </view>
-  <view class="bottomBtn" wx:if="{{showSelect}}">
-    <view class="btn" bindtap="longClose">取消</view>
-    <view class="btn" style="border-left: 1rpx solid #fff;" bindtap="saveAsset">确认({{select.count}})</view>
-  </view>
 
   <!-- 视频 -->
   <view class="videoM " style="display: {{showVideo == '' ? 'none': 'block'}}">

+ 7 - 1
miniprogram/wxs/until.wxs

@@ -7,7 +7,13 @@ module.exports = {
     } else if (out >= 10000) {
       out = (out / 10000).toFixed(2) + '万';
     }
-
     return out
+  },
+  shenglueh: function (t) {
+    if (t.length <= 7) return t
+    var li = t.split("")
+    li.splice(7);
+    li.push("...")
+    return li.join("")
   }
 }

+ 7 - 4
project.config.json

@@ -20,9 +20,9 @@
     "uploadWithSourceMap": true,
     "compileHotReLoad": false,
     "lazyloadPlaceholderEnable": false,
-    "useMultiFrameRuntime": true,
-    "useApiHook": true,
-    "useApiHostProcess": true,
+    "useMultiFrameRuntime": false,
+    "useApiHook": false,
+    "useApiHostProcess": false,
     "babelSetting": {
       "ignore": [],
       "disablePlugins": [],
@@ -34,7 +34,10 @@
     "packNpmManually": false,
     "packNpmRelationList": [],
     "minifyWXSS": true,
-    "showES6CompileOption": false
+    "disableUseStrict": false,
+    "minifyWXML": true,
+    "showES6CompileOption": false,
+    "useCompilerPlugins": false
   },
   "appid": "wxc54a75206e5dfc60",
   "projectname": "derunsanqin",

+ 8 - 1
project.private.config.json

@@ -11,7 +11,14 @@
       "list": []
     },
     "miniprogram": {
-      "list": []
+      "list": [
+        {
+          "name": "pages/index/index",
+          "pathName": "pages/index/index",
+          "query": "",
+          "scene": null
+        }
+      ]
     }
   }
 }

Some files were not shown because too many files changed in this diff