admin
2020-12-26 ed286a9b800bfd3a784c5c34598518ca13bf9c45
'小程序完善'
12个文件已修改
1个文件已添加
79 ■■■■ 已修改文件
.tea/entryFiles-production/index$.web.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
.tea/entryFiles-production/index$.worker.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
image/portrait_default.png 补丁 | 查看 | 原始文档 | blame | 历史
pages/activity-detail/activity-detail.axml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/goods/goods.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/lucky-record/lucky-record.axml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mine/mine.axml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mine/mine.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/msg-record/msg-record.axml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/msg-record/msg-record.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/rewards/rewards.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/template/template.axml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
util/help.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.tea/entryFiles-production/index$.web.js
@@ -30,7 +30,7 @@
require('../../pages/activity-detail/activity-detail?hash=3ff7dd30a3ea0de70909d48b0b8ce5bda62ef62e');
require('../../pages/assist-process/assist-process?hash=f1b7dc4ca438ceda80574161c70b1f25cb9fb567');
require('../../pages/lucky-coupon/lucky-coupon?hash=f1b7dc4ca438ceda80574161c70b1f25cb9fb567');
require('../../pages/msg-record/msg-record?hash=59bab5c4a4a4ec930e168925c97c3057ac83fa7d');
require('../../pages/msg-record/msg-record?hash=428ae1fc7930c1018c56f69f43d3453112ebabbd');
require('../../pages/assist-friends/assist-friends?hash=59bab5c4a4a4ec930e168925c97c3057ac83fa7d');
require('../../pages/msg-setting/msg-setting?hash=5f504890acbcf3bad0486fc198ac7448dd406718');
require('../../pages/lucky-record/lucky-record?hash=f1b7dc4ca438ceda80574161c70b1f25cb9fb567');
.tea/entryFiles-production/index$.worker.js
@@ -59,7 +59,7 @@
require('../../pages/activity-detail/activity-detail?hash=3ff7dd30a3ea0de70909d48b0b8ce5bda62ef62e');
require('../../pages/assist-process/assist-process?hash=f1b7dc4ca438ceda80574161c70b1f25cb9fb567');
require('../../pages/lucky-coupon/lucky-coupon?hash=f1b7dc4ca438ceda80574161c70b1f25cb9fb567');
require('../../pages/msg-record/msg-record?hash=59bab5c4a4a4ec930e168925c97c3057ac83fa7d');
require('../../pages/msg-record/msg-record?hash=428ae1fc7930c1018c56f69f43d3453112ebabbd');
require('../../pages/assist-friends/assist-friends?hash=59bab5c4a4a4ec930e168925c97c3057ac83fa7d');
require('../../pages/msg-setting/msg-setting?hash=5f504890acbcf3bad0486fc198ac7448dd406718');
require('../../pages/lucky-record/lucky-record?hash=f1b7dc4ca438ceda80574161c70b1f25cb9fb567');
image/portrait_default.png
pages/activity-detail/activity-detail.axml
@@ -3,8 +3,8 @@
    <view class="top">
      <view class="banner">
        <swiper indicator-dots="{{false}}" autoplay="true" interval="{{5000}}" circular="{{true}}">
          <swiper-item >
            <image onTap="onBannerClick" mode="aspectFill" src="{{activity.activity.poster}}"/>
          <swiper-item a:for="{{activity.activity.bannerList}}" >
            <image onTap="onBannerClick" mode="aspectFill" src="{{item}}"/>
          </swiper-item >
        </swiper>
        <!--<popover position="topRight" show="true" showMask="{{false}}"></popover> -->
pages/goods/goods.js
@@ -1,11 +1,15 @@
import { loadBC } from 'miniapp-bc-user'
var help = require('/util/help.js');
Page({
  data: {
    pluginOptions: {
      relationId: '513796574' // 如果插件有 pluginOptions
    }
  },
  onLoad() { },
  onLoad() {
    my.hideFavoriteMenu();
    help.setPageNavBar(null);
  },
  async onReady() {
    try {
      await loadBC();
pages/lucky-record/lucky-record.axml
@@ -13,7 +13,7 @@
  </flex>
  <view class="container" >
    <scroll-view a:if="{{!showEmptyDefault&&list.length>0}}" scroll-y onScrollToLower="scrollMytrip" enable-back-to-top="true">
      <view a:for="{{list}}" class="item lucky-activity-item">
      <view a:for="{{list}}" class="item lucky-activity-item" data-item="{{item}}" onTap="clickItem">
        <view class="poster">
          <image mode="aspectFill" src="{{item.activity.poster}}"></image>
        </view>
pages/mine/mine.axml
@@ -14,8 +14,13 @@
    </button>
  </flex>
  <flex a:else class="user" align="center" a:if="{{logined}}">
    <image mode="scaleToFill" class="portrait" src="/image/portrait-test.jpg"/>
    <button type="ghost" class="login" open-type="{{!logined?'getAuthorize':''}}" onGetAuthorize="onGetAuthorize" onError="onAuthError" scope='userInfo'>
    <image mode="scaleToFill" class="portrait" src="/image/portrait_default.png"/>
    <view style="width:480rpx;margin-right:10rpx;margin-left:31rpx;">
      <text class="nick-name">
     未登录
      </text>
    </view>
    <button type="ghost" class="logout" open-type="{{!logined?'getAuthorize':''}}" onGetAuthorize="onGetAuthorize" onError="onAuthError" scope='userInfo'>
    登录
    </button>
  </flex>
@@ -52,13 +57,13 @@
    退出登录后将hello及时查看到抽奖进度、中奖状态、领取奖品等状态更新和提醒
      </view>
      <view style="display:flex;justify-content:space-between">
        <button type="ghost"  hover-class="btn-ghost-hover" onTap="onLogout">
        <button type="ghost" hover-class="btn-ghost-hover" onTap="onLogout">
      确定退出
        </button>
        <button type="primary"  class="btn-primary"  hover-class="btn-primary-hover" onTap="onCloseLogout">
        <button type="primary" class="btn-primary" hover-class="btn-primary-hover" onTap="onCloseLogout">
      考虑一下
        </button>
      </view>
    </view>
  </modal>
  </view>
</view>
pages/mine/mine.js
@@ -21,6 +21,7 @@
    })
  },
  onLoad() {
    my.hideFavoriteMenu();
    $this = this;
    help.setPageNavBar(null);
    my.getStorage({ key: 'user' }, function (res) {
pages/msg-record/msg-record.axml
@@ -19,7 +19,7 @@
          <view class="title">
          {{content.title}}
          </view>
          <rich-text class="content" nodes=" {{content.content}}" onTap="tap"></rich-text>
          <rich-text class="content" nodes=" {{content.content}}" data-item="{{content}}" onTap="onContentClick"></rich-text>
        </flex>
      </view>
    </view>
pages/msg-record/msg-record.js
@@ -16,7 +16,7 @@
  onLoad() {
    help.setPageNavBar("消息记录");
    $this = this;
     this.requestUserMsgList(1, true);
    this.requestUserMsgList(1, true);
  },
  onPullDownRefresh() {
    console.log('onPullDownRefresh', new Date());
@@ -34,9 +34,9 @@
  convertToRichText(list, callback) {
    for (var i = 0; i < list.length; i++) {
      for (var j = 0; j < list[i].contentList.length; j++) {
        help.loadRichTextNode(list[i].contentList[j].content.replace('#theme',getApp().themeColor), function (res) {
        help.loadRichTextNode(list[i].contentList[j].content.replace('#theme', getApp().themeColor), function (res) {
          list[i].contentList[j].content = res;
          if (i == list.length - 1 && j == list[i].contentList.length-1) {
          if (i == list.length - 1 && j == list[i].contentList.length - 1) {
            callback(list);
          }
        });
@@ -84,7 +84,7 @@
        console.log(res)
        if (res.code == 0) {
          var list = res.data.data;
          console.log("数据:"+ list.length);
          console.log("数据:" + list.length);
          //数据预处理
          $this.convertToRichText(list, function (list) {
            console.log("富文本转换完成")
@@ -152,5 +152,13 @@
      console.log('scrollMytrip执行异常:', e);
    }
  },
  //内容点击
  onContentClick(event) {
    const content = help.getEventParam(event, 'item');
    if (content.jump) {
      help.jump(content.jump);
    }
  },
});
pages/rewards/rewards.js
@@ -42,6 +42,9 @@
      isRequesting: true,
      showEmptyDefault: false
    });
    if (first) {
      my.showNavigationBarLoading();
    }
    api.getRecommendActivity({
      data: {
        page: page
@@ -81,6 +84,7 @@
        }
      },
      complete: function () {
        my.hideNavigationBarLoading();
        my.stopPullDownRefresh();
        setTimeout(() => {
          $this.setData({
@@ -126,7 +130,7 @@
              showOutDateModal: true
            });
          }
        }
      }
    });
pages/template/template.axml
@@ -74,7 +74,7 @@
<template name="page-result-empty">
  <view style="height:100%;  display: flex;flex-direction: column;justify-content: center;align-items: center;">
  <view style="min-height:80vh; display: flex;flex-direction: column;justify-content: center;align-items: center;">
    <image mode="scaleToFill" style="width:181rpx;height:248rpx;" src="/image/icon/icon_page_result_empty.png"/>
    <view style="font-size: 30rpx;color: #333333;line-height: 39rpx;margin-top:37rpx;">
      <text>{{title}}</text>
@@ -83,7 +83,7 @@
</template>
<template name="page-footer">
 <footer type="end" content="—— 我是底线的 ——" a:if="{{showFooter}}"/>
 <footer type="end" content="— 我是有底线的 —" a:if="{{showFooter}}"/>
</template>
util/help.js
@@ -110,6 +110,25 @@
        callback(res.data);
      }
    });
  },
  /**
   * 跳转
   * @param {*} jump
   */
  jump(jump) {
    if (!jump) {
      return;
    }
    switch (jump.jumpType) {
      case 'page':
        my.navigateTo({
          url: jump.params.url
        });
    }
  }