lll
liukangdong
2024-08-01 e6e0218a1abd7395d00ade401c6ea6a02e7c3ece
lll
已添加2个文件
已修改41个文件
423 ■■■■ 文件已修改
wechat_jiaxuan/api/index.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/components/disCase/index.wxml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/components/disProduct/index.wxml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/components/disRealpic/index.wxml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/consult/consult.wxml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/design/design.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/detailDis/product.js 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/homeId/index.wxml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/index/index.js 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/index/index.less 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/index/index.wxml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/index/index.wxss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/productVideo/index.wxml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/store/staff.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/userinfo/collect.wxml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/pages/userinfo/favorite.wxml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/utils/math.wxs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/disCase/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/disCase/index.wxml 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/disProduct/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/disProduct/index.wxml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/disRealpic/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/components/disRealpic/index.wxml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/consult/consult.wxml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/download/index.js 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/download/index.wxml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/homeId/index.wxml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/index/index.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/index/index.less 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/index/index.wxml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/index/index.wxss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/select.js 91 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/select.less 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/select.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/kefu/select.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/productVideo/index.wxml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/store/index.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/store/index.less 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/store/index.wxss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/store/staff.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/userinfo/collect.wxml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/pages/work/index.wxml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_staff/utils/format.wxs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wechat_jiaxuan/api/index.js
@@ -211,7 +211,8 @@
export const actionDo = (data) => {
  return request({
    url: '/web/customer/actionDo',
    data
    data,
    loading: '0'
  })
}
// æˆ‘çš„ é¢„约列表
wechat_jiaxuan/components/disCase/index.wxml
@@ -48,7 +48,7 @@
              <image wx:else data-code="like_cancel" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
              <text class="num {{item.isCollection ? 'primary' : ''}}">{{ item.collectCount }}</text>
              <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
              <text>{{ item.viewCount }}</text>
              <text>{{ math.formarCount(item.viewCount) }}</text>
            </view>
          </view>
        </view>
@@ -58,6 +58,5 @@
      </scroll-view>
    </view>
  </view>
</view>
<wxs module="math" src="../../utils/math.wxs"></wxs>
wechat_jiaxuan/components/disProduct/index.wxml
@@ -48,7 +48,7 @@
                <image wx:else class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
                <text class="num {{item.isCollection ? 'primary' : ''}}">{{ item.collectCount || 0 }}</text>
                <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
                <text>{{ item.viewCount || 0 }}</text>
                <text>{{ math.formarCount(item.viewCount) }}</text>
              </view>
            </view>
            <view wx:if="{{ datalist.length == 0 }}" class="empty_wrap">
@@ -58,7 +58,5 @@
      </view>
    </view>
  </view>
</view>
<wxs module="math" src="../../utils/math.wxs"></wxs>
wechat_jiaxuan/components/disRealpic/index.wxml
@@ -54,7 +54,7 @@
            <image wx:else data-code="like_cancel" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collected.png"></image>
            <text class="num {{item.isCollection ? 'primary' : ''}}">{{ item.collectCount }}</text>
            <image class="icon" src="../../static/icon/zixun_ic_liulan.png" ></image>
            <text>{{ item.viewCount }}</text>
            <text>{{ math.formarCount(item.viewCount) }}</text>
          </view>
        </view>
        <view wx:if="{{ dataList.length == 0 }}" class="empty_wrap">
@@ -67,3 +67,4 @@
  <videoPlay class="videoPlay"/>
</view>
<wxs module="math" src="../../utils/math.wxs"></wxs>
wechat_jiaxuan/pages/consult/consult.wxml
@@ -31,7 +31,7 @@
        <view>{{ item.publishDt || '' }}</view>
        <view class="df_sb">
          <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
          <text>{{ item.viewCount }}</text>
          <text>{{ math.formarCount(item.viewCount) }}</text>
        </view>
      </view>
    </view>
@@ -40,3 +40,4 @@
    </view>
  </view>
</view>
<wxs module="math" src="../../utils/math.wxs"></wxs>
wechat_jiaxuan/pages/design/design.js
@@ -47,6 +47,10 @@
      }
    })
    const member =  wx.getStorageSync('member')
    this.setData({
      phone: member.phone
    })
  },
  onSubmit() {
wechat_jiaxuan/pages/detailDis/product.js
@@ -30,22 +30,6 @@
      actionType: 'view',
      id: options.id
    })
    const member = wx.getStorageSync('member') || {}
    if(!member.id){
      getMemberInfo().then(res => {
        this.setData({
          member: res.data
        })
      })
    }
  },
  onShow() {
    const member = wx.getStorageSync('member') || {}
    if(member && member.id){
      this.setData({
        member
      })
    }
  },
  onUnload() {
    console.log('详情进行了销毁');
@@ -123,6 +107,9 @@
      wx.setNavigationBarTitle({
        title: res.data.title
      })
      getMemberInfo().then(res => {
        this.setData({ member: res.data })
      })
    })
  },
  playVideo() {
wechat_jiaxuan/pages/homeId/index.wxml
@@ -17,7 +17,7 @@
        <view>{{ item.publishDt }}</view>
        <view class="df_sb">
          <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
          <text>{{ item.viewCount || 0 }}</text>
          <text>{{ math.formarCount(item.viewCount) }}</text>
        </view>
      </view>
    </view>
@@ -26,3 +26,4 @@
    </view>
  </view>
</view>
<wxs module="math" src="../../utils/math.wxs"></wxs>
wechat_jiaxuan/pages/index/index.js
@@ -8,7 +8,9 @@
  getZhongTaiVideoPage,
  getZhongTaiProductNewsPage
} from '../../api/index'
import { eventBus } from '../../utils/eventBus'
import {
  eventBus
} from '../../utils/eventBus'
const app = getApp()
Page({
@@ -31,6 +33,10 @@
    consultList: [],
    consultImgHeight: 0,
    videoTop: 0,
    windowHeight: 0,
    videoPlay: true,
    productVideo: {},
    bannerSwiperOption: {
      indicatorDots: true,
@@ -51,9 +57,25 @@
    console.log('首页的onLoadLogin',options,`{"token":"${app.globalData.token}"}`);
    this.initData()
  },
  onReady() {
    const windowInfo = wx.getWindowInfo()
    setTimeout(() => {
      const query = wx.createSelectorQuery()
      query.select('.product_video').boundingClientRect(function (rect) {
        rect.top // èŠ‚ç‚¹çš„ä¸Šè¾¹ç•Œåæ ‡
        rect.bottom // èŠ‚ç‚¹çš„ä¸‹è¾¹ç•Œåæ ‡
      }).exec(res => {
        console.log('res', res);
        console.log(windowInfo.windowHeight)
        this.setData({ videoTop: res[0].top,windowHeight: windowInfo.windowHeight})
      })
    }, 2000)
  },
  onShow() {
    const member = wx.getStorageSync('member')
    this.setData({ member })
    this.setData({
      member
    })
    
    eventBus.once("reloadHome", () => {
      console.log('reloadHome');
@@ -209,8 +231,13 @@
  },
  videoClick(e) {
    const {
      videourl
      videourl,
      id
    } = e.currentTarget.dataset
    actionDo({
      actionType: 'view',
      id
    })
    let videoPlay = this.selectComponent('.videoPlay'); 
    if(videoPlay){ 
      videoPlay.startPlayVideo(videourl,this );
@@ -259,7 +286,10 @@
        url: '/pages/webView/index',
        success: function(res) {
          // é€šè¿‡eventChannel向被打开页面传送数据
          res.eventChannel.emit('acceptDataFromOpenerPage', { link: item.content, title: item.title })
          res.eventChannel.emit('acceptDataFromOpenerPage', {
            link: item.content,
            title: item.title
          })
        }
      })
    }else{
@@ -332,8 +362,20 @@
  /**
   * ç”Ÿå‘½å‘¨æœŸå‡½æ•°--监听页面初次渲染完成
   */
  bindVideoPlay() {
    const { id } = this.data.productVideo[0]
    actionDo({
      actionType: 'view',
      id
    })
  },
  onPageScroll(e) {
    const { videoTop, windowHeight, videoPlay } = this.data
    if(e.scrollTop - 100 > videoTop - (windowHeight / 2) && videoPlay ){
      this.setData({ videoPlay: false })
      let videoplay = wx.createVideoContext('myvideo', this)
      videoplay.play();
    }
    let scrollTop = e.scrollTop / 100
    if (scrollTop <= 0.1) {
      this.setData({
wechat_jiaxuan/pages/index/index.less
@@ -137,6 +137,9 @@
        height: 376rpx;
      }
    }
    video{
      width: 100%;
    }
  }
wechat_jiaxuan/pages/index/index.wxml
@@ -56,10 +56,11 @@
      </view>
      <image class="ar_right" src="../../static/icon/home_ar@2x.png"></image>
    </view>
    <view  bindtap="videoClick" data-videourl="{{ productVideo[0].videoUrl }}" class="video_wrap">
    <video bindplay="bindVideoPlay" id="myvideo" src="{{ productVideo[0].videoUrl }}" show-fullscreen-btn></video>
    <!-- <view  bindtap="videoClick" data-id="{{ productVideo[0].id }}" data-videourl="{{ productVideo[0].videoUrl }}" class="video_wrap">
      <image class="img" src="{{ productVideo[0].coverImage }}" mode="aspectFill"></image>
      <image class="play" src="../../static/icon/ic_play.png"></image>
    </view>
    </view> -->
  </view>
  <!-- æ”»ç•¥ -->
  <view class="strategy">
wechat_jiaxuan/pages/index/index.wxss
@@ -124,6 +124,9 @@
  width: 670rpx;
  height: 376rpx;
}
.container .product_video video {
  width: 100%;
}
.container .strategy {
  padding: 44rpx 40rpx;
  background: #F7F7F7;
wechat_jiaxuan/pages/productVideo/index.wxml
@@ -25,7 +25,7 @@
        <view>{{ item.publishDt }}</view>
        <view class="df_sb">
          <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
          <text>{{ item.viewCount }}</text>
          <text>{{ math.formarCount(item.viewCount) }}</text>
        </view>
      </view>
    </view>
@@ -40,3 +40,4 @@
  </view > -->
  <videoPlay class='videoPlay' /> 
</view>
<wxs module="math" src="../../utils/math.wxs"></wxs>
wechat_jiaxuan/pages/store/staff.wxml
@@ -61,7 +61,7 @@
  <van-popup show="{{ isShow }}"  closeable round bind:close="onClose">
    <view class="modal">
      <view class="header">
        <image class="avatar" src="{{ info.imgurlFull }}"></image>
        <image show-menu-by-longpress class="avatar" src="{{ info.imgurlFull }}"></image>
        <view class="content">
            <view class="name">{{ info.name }}</view>
            <view class="desc">导购 ï½œ {{ info.jobDate || 5 }}年经验</view>
wechat_jiaxuan/pages/userinfo/collect.wxml
@@ -24,7 +24,7 @@
        <image class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
        <text class="num {{true ? 'primary' : ''}}">{{ item.collectCount }}</text>
        <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
        <text>{{ item.viewCount }}</text>
        <text>{{ math.formarCount(item.viewCount) }}</text>
      </view>
    </view>
    <view wx:if="{{ dataList.length == 0 }}" class="empty_wrap">
@@ -32,3 +32,4 @@
    </view>
  </view>
</view>
<wxs module="math" src="../../utils/math.wxs"></wxs>
wechat_jiaxuan/pages/userinfo/favorite.wxml
@@ -25,7 +25,7 @@
        <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
        <text class="num {{true ? 'primary' : ''}}">{{ item.collectCount }}</text>
        <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
        <text>{{ item.viewCount }}</text>
        <text>{{ math.formarCount(item.viewCount) }}</text>
      </view>
    </view>
    <view wx:if="{{ dataList.length == 0 }}" class="empty_wrap">
@@ -33,3 +33,4 @@
    </view>
  </view>
</view>
<wxs module="math" src="../../utils/math.wxs"></wxs>
wechat_jiaxuan/utils/math.wxs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
var formarCount = function(num) {
  if(!num){
    return 0
  }else{
    if(num > 10000){
      return (num / 10000).toFixed(0) + 'w+'
    }else if(num > 10000000000){
      return (num / 10000000000).toFixed(0) + '亿+'
    }else{
      return num
    }
  }
}
module.exports = {
  formarCount: formarCount
};
wechat_staff/components/disCase/index.js
@@ -19,7 +19,7 @@
    pageNum: 1,
    pageSize: 10,
    query: '',
    sortType: 'NORMAL',
    sortType: '',
    catalogCode: 'whole_case'
  },
  attached() {
wechat_staff/components/disCase/index.wxml
@@ -28,11 +28,11 @@
      </view>
      <view wx:if="{{ activeParam.length > 0 }}" class="shade"></view>
      <view class="status">
        <view class="item {{ sortType == 'NORMAL' ? 'active' : '' }}" data-status="NORMAL" bindtap="statusChange">默认</view>
        <view class="item {{ sortType == '' ? 'active' : '' }}" data-status="" bindtap="statusChange">默认</view>
        <view class="separate"></view>
        <view class="item {{ sortType == 'HOT' ? 'active' : '' }}" data-status="HOT" bindtap="statusChange">最热</view>
        <view class="item {{ sortType == 'greet' ? 'active' : '' }}" data-status="greet" bindtap="statusChange">最热</view>
        <view class="separate"></view>
        <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">最新</view>
        <view class="item {{ sortType == 'time' ? 'active' : '' }}" data-status="time" bindtap="statusChange">最新</view>
      </view>
      <!-- goods_list -->
      <scroll-view bindscrolltolower="scrolltolower" scroll-y enable-passive enable-flex class="goods_list">
@@ -48,7 +48,7 @@
              <image wx:else data-code="like_cancel" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
              <text class="num {{item.isCollection ? 'primary' : ''}}">{{ item.collectCount }}</text>
              <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
              <text>{{ item.viewCount }}</text>
              <text>{{ format.formarCount(item.viewCount) }}</text>
            </view>
          </view>
        </view>
@@ -58,6 +58,5 @@
      </scroll-view>
    </view>
  </view>
</view>
<wxs module="format" src="../../utils/format.wxs"></wxs>
wechat_staff/components/disProduct/index.js
@@ -19,7 +19,7 @@
    pageSize: 10,
    total: 0,
    query: '',
    sortType: 'NORMAL',
    sortType: '',
    catalogCode: ""
  },
   attached() {
wechat_staff/components/disProduct/index.wxml
@@ -30,11 +30,11 @@
        </view>
        <view wx:if="{{ activeParam.length > 0 }}" class="shade"></view>
        <view class="status">
          <view class="item {{ sortType == 'NORMAL' ? 'active' : '' }}" data-status="NORMAL" bindtap="statusChange">默认</view>
          <view class="item {{ sortType == '' ? 'active' : '' }}" data-status="" bindtap="statusChange">默认</view>
          <view class="separate"></view>
          <view class="item {{ sortType == 'HOT' ? 'active' : '' }}" data-status="HOT" bindtap="statusChange">最热</view>
          <view class="item {{ sortType == 'greet' ? 'active' : '' }}" data-status="greet" bindtap="statusChange">最热</view>
          <view class="separate"></view>
          <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">最新</view>
          <view class="item {{ sortType == 'time' ? 'active' : '' }}" data-status="time" bindtap="statusChange">最新</view>
        </view>
        <scroll-view bindscrolltolower="scrolltolower" scroll-y    enable-passive enable-flex class="goods_list">
            <view wx:for="{{ datalist }}" data-id="{{item.id}}" class="item" bindtap="handleDetail">
@@ -48,7 +48,7 @@
                <image wx:else class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
                <text class="num {{item.isCollection ? 'primary' : ''}}">{{ item.collectCount || 0 }}</text>
                <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
                <text>{{ item.viewCount || 0 }}</text>
                <text>{{ format.formarCount(item.viewCount) }}</text>
              </view>
            </view>
            <view wx:if="{{ datalist.length == 0 }}" class="empty_wrap">
@@ -58,7 +58,5 @@
      </view>
    </view>
  </view>
</view>
<wxs module="format" src="../../utils/format.wxs"></wxs>
wechat_staff/components/disRealpic/index.js
@@ -18,7 +18,7 @@
    pageNum: 1,
    pageSize: 10,
    query: '',
    sortType: 'NORMAL',
    sortType: '',
    catalogCode: 'real_case'
  },
  attached() {
wechat_staff/components/disRealpic/index.wxml
@@ -29,11 +29,11 @@
      </view>
      <view wx:if="{{ activeParam.length > 0 }}" class="shade"></view>
      <view class="status">
        <view class="item {{ sortType == 'NORMAL' ? 'active' : '' }}" data-status="NORMAL" bindtap="statusChange">默认</view>
        <view class="item {{ sortType == '' ? 'active' : '' }}" data-status="" bindtap="statusChange">默认</view>
        <view class="separate"></view>
        <view class="item {{ sortType == 'HOT' ? 'active' : '' }}" data-status="HOT" bindtap="statusChange">最热</view>
        <view class="item {{ sortType == 'greet' ? 'active' : '' }}" data-status="greet" bindtap="statusChange">最热</view>
        <view class="separate"></view>
        <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">最新</view>
        <view class="item {{ sortType == 'time' ? 'active' : '' }}" data-status="time" bindtap="statusChange">最新</view>
      </view>
      <!-- goods_list -->
      <scroll-view bindscrolltolower="scrolltolower" scroll-y enable-passive enable-flex class="goods_list">
@@ -54,7 +54,7 @@
            <image wx:else data-code="like_cancel" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
            <text class="num {{item.isCollection ? 'primary' : ''}}">{{ item.collectCount }}</text>
            <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
            <text>{{ item.viewCount }}</text>
            <text>{{ format.formarCount(item.viewCount) }}</text>
          </view>
        </view>
        <view wx:if="{{ dataList.length == 0 }}" class="empty_wrap">
@@ -66,3 +66,4 @@
  <videoPlay class="videoPlay"/>
</view>
<wxs module="format" src="../../utils/format.wxs"></wxs>
wechat_staff/pages/consult/consult.wxml
@@ -34,7 +34,7 @@
        <view>{{ item.publishDt || '' }}</view>
        <view class="df_sb">
          <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
          <text>{{ item.viewCount }}</text>
          <text>{{ format.formarCount(item.viewCount) }}</text>
        </view>
      </view>
    </view>
@@ -43,3 +43,4 @@
    </view>
  </view>
</view>
<wxs module="format" src="../../utils/format.wxs"></wxs>
wechat_staff/pages/download/index.js
@@ -42,12 +42,15 @@
          item.paddingStatus = 2
        }
      })
      this.setData({ downloadList })
      this.setData({
        downloadList
      })
      downloadList.forEach(item => {
        if (item.checked) {
          if (that.data.takeQrcode == 1) {
          getContentShareImg({
            articleId: `${downloadConfig.id}_${downloadConfig.path}`,
            type: this.takeQrcode ? 0 : 1,
              type: that.data.takeQrcode ? 1 : 0,
            imgurl: item.url
          }).then(res => {
            wx.downloadFile({
@@ -59,7 +62,9 @@
                    success: res => {
                      item.paddingStatus = 3
                      item.checked = false
                      that.setData({ downloadList })
                        that.setData({
                          downloadList
                        })
                      wx.showToast({
                        title: '保存成功',
                        icon: "none"
@@ -68,7 +73,9 @@
                    fail: res => {
                      item.paddingStatus = 4
                      item.checked = false
                      that.setData({ downloadList })
                        that.setData({
                          downloadList
                        })
                      wx.showToast({
                        title: '保存失败',
                        icon: "none"
@@ -80,6 +87,41 @@
              }
            })
          })
          }else{
            wx.downloadFile({
              url: item.url,
              success: res => {
                if (res.statusCode === 200) {
                  wx.saveImageToPhotosAlbum({
                    filePath: res.tempFilePath,
                    success: res => {
                      item.paddingStatus = 3
                      item.checked = false
                      that.setData({
                        downloadList
                      })
                      wx.showToast({
                        title: '保存成功',
                        icon: "none"
                      })
                    },
                    fail: res => {
                      item.paddingStatus = 4
                      item.checked = false
                      that.setData({
                        downloadList
                      })
                      wx.showToast({
                        title: '保存失败',
                        icon: "none"
                      })
                    }
                  })
                }
              }
            })
          }
        }
      })
    })
@@ -128,12 +170,14 @@
  itemCheck(e) {
    const i = e.currentTarget.dataset.i
    const {
      downloadList,
      checkedAll
      downloadList
    } = this.data
    let count = 0
    downloadList.forEach((item, index) => {
      if (index === i) {
        if (item.paddingStatus == 3) {
          item.paddingStatus = 0
        }
        item.checked = !item.checked
      }
      if (item.checked) {
wechat_staff/pages/download/index.wxml
@@ -1,11 +1,11 @@
<view>
  <view class="list">
    <view wx:for="{{ downloadList }}" class="item">
    <view data-i="{{index}}" bindtap="itemCheck" wx:for="{{ downloadList }}" class="item">
      <image class="img" src="{{ item.url }}" mode="aspectFill"></image>
      <view wx:if="{{ item.paddingStatus == 2 }}" class="shade">等待下载</view>
      <view wx:if="{{ item.paddingStatus == 3 }}" class="shade">下载完成</view>
      <image data-i="{{index}}" bindtap="itemCheck" wx:if="{{ item.checked }}" class="check" src="../../static/icon/ic_select_sel@2x.png"></image>
      <image wx:else data-i="{{index}}" bindtap="itemCheck" class="check" src="../../static/icon/ic_select.png"></image>
      <image wx:if="{{ item.checked }}" class="check" src="../../static/icon/ic_select_sel@2x.png"></image>
      <image wx:else bindtap="itemCheck" class="check" src="../../static/icon/ic_select.png"></image>
    </view>
  </view>
  <!--  -->
wechat_staff/pages/homeId/index.wxml
@@ -17,9 +17,10 @@
      <view>{{ item.publishDt }}</view>
      <view class="df_sb">
        <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
        <text>{{ item.viewCount || 0 }}</text>
          <text>{{ format.formarCount(item.viewCount) }}</text>
      </view>
    </view>
  </view>
</view>
</view>
<wxs module="format" src="../../utils/format.wxs"></wxs>
wechat_staff/pages/index/index.js
@@ -19,6 +19,10 @@
    serviceHeight: 0,
    serviceList: [],
    videoTop: 0,
    windowHeight: 0,
    videoPlay: true,
    bannerSwiperOption: {
      indicatorDots: true,
      vertical: false,
@@ -36,6 +40,20 @@
  },
  onShow() {
    this.initData()
  },
  onReady() {
    const windowInfo = wx.getWindowInfo()
    setTimeout(() => {
      const query = wx.createSelectorQuery()
      query.select('.product_video').boundingClientRect(function (rect) {
        rect.top // èŠ‚ç‚¹çš„ä¸Šè¾¹ç•Œåæ ‡
        rect.bottom // èŠ‚ç‚¹çš„ä¸‹è¾¹ç•Œåæ ‡
      }).exec(res => {
        console.log('res', res);
        console.log(windowInfo.windowHeight)
        this.setData({ videoTop: res[0].top,windowHeight: windowInfo.windowHeight})
      })
    }, 2000)
  },
  initData() {
    // æ¯æ—¥ä¸Šæ–°
@@ -102,6 +120,21 @@
      })
    })
  },
  bindVideoPlay() {
    const { id } = this.data.productVideo[0]
    actionDo({
      actionType: 'view',
      id
    })
  },
  onPageScroll(e) {
    const { videoTop, windowHeight, videoPlay } = this.data
    if(e.scrollTop > videoTop - (windowHeight / 2) && videoPlay ){
      this.setData({ videoPlay: false })
      let videoplay = wx.createVideoContext('myvideo', this)
      videoplay.play();
    }
  },
  promotionClick() {
    wx.navigateTo({
      url: '/pages/promotion/index',
wechat_staff/pages/index/index.less
@@ -134,6 +134,9 @@
      height: 376rpx;
    }
  }
  video{
    width: 100%;
  }
}
.consult_swiper {
wechat_staff/pages/index/index.wxml
@@ -62,10 +62,11 @@
      </view>
      <image class="ar_right" src="../../static/icon/home_ar@2x.png"></image>
    </view>
    <view bindtap="videoClick" data-videourl="{{ productVideo[0].videoUrl }}" class="video_wrap">
    <video bindplay="bindVideoPlay" id="myvideo" src="{{ productVideo[0].videoUrl }}" show-fullscreen-btn></video>
    <!-- <view bindtap="videoClick" data-videourl="{{ productVideo[0].videoUrl }}" class="video_wrap">
      <image class="img" src="{{ productVideo[0].coverImage }}" mode="aspectFill"></image>
      <image class="play" src="../../static/icon/ic_play.png" mode="widthFix"></image>
    </view>
    </view> -->
  </view>
  <!-- æ”»ç•¥ -->
  <view class="strategy">
wechat_staff/pages/index/index.wxss
@@ -126,6 +126,9 @@
  width: 670rpx;
  height: 376rpx;
}
.product_video video {
  width: 100%;
}
.consult_swiper {
  width: 100%;
}
wechat_staff/pages/kefu/select.js
@@ -1,5 +1,11 @@
import { getCustomerList, getCrmAuthUrl, batchAddLike } from '../../api/index'
const { HYEventBus } = require('hy-event-store')
import {
  getCustomerList,
  getCrmAuthUrl,
  batchAddLike
} from '../../api/index'
const {
  HYEventBus
} = require('hy-event-store')
const eventBus = new HYEventBus()
Page({
@@ -31,36 +37,75 @@
    
  }, 
  handleSub() {
    const { customer } = this.data
    const {
      customer
    } = this.data
    const enjoyList = wx.getStorageSync('enjoyList') || []
    if(!customer.userId) return wx.showToast({
      title: '请先选择要关联的客户', icon: 'none'
      title: '请先选择要关联的客户',
      icon: 'none'
    })
    batchAddLike({
      articleIds: enjoyList.filter(i => i.checked).map(i => i.id).join(','),
      customerId: customer.userId
      customerId: customer.platSourceId,
      platSourceId: customer.platSourceId,
      platSource: customer.platSource
    }).then(res => {
      setTimeout(() => {
        wx.showToast({
          title: '绑定成功',icon: 'none'
        })
      }, 500)
      this.setData({
        customer: {}
      })
      this.setData({
        total: 0,
        dataList: [],
        page: 1
      })
      this.getList()
    })
  },
  tabsClick(e) {
    const flag = e.currentTarget.dataset.tab
    this.setData({flag})
    this.setData({total: 0,dataList: [], page: 1, customer: {}})
    this.setData({
      flag
    })
    this.setData({
      total: 0,
      dataList: [],
      page: 1,
      customer: {}
    })
    this.getList()
  },
  itemCheck(e) {
    const item = e.currentTarget.dataset.item
    console.log('item', item);
    this.setData({ customer: item })
    this.setData({
      customer: item
    })
  },
  reloadList() {
    this.setData({total: 0,dataList: [], page: 1})
    this.setData({
      total: 0,
      dataList: [],
      page: 1
    })
    this.getList()
  },
  scrolltolower() {
    console.log('触底事件');
    const { total, dataList, page } = this.data
    const {
      total,
      dataList,
      page
    } = this.data
    if(total > dataList.length){
      this.setData({ page: page + 1 })
      this.setData({
        page: page + 1
      })
      this.getList()
    }else{
      wx.showToast({
@@ -70,9 +115,17 @@
    }
  },
  getList() {
    const { flag, page, pageSize, keyWords } = this.data
    const {
      flag,
      page,
      pageSize,
      keyWords
    } = this.data
    getCustomerList({
      flag, page, pageSize, keyWords
      flag,
      page,
      pageSize,
      keyWords
    }).then(res => {
      if(res.data){
        this.setData({
@@ -83,15 +136,21 @@
    })
  },
  jumpClient() { 
    getCrmAuthUrl({type:1}).then(res => {
      this.setData({ url: res.data })
    getCrmAuthUrl({
      type: 1
    }).then(res => {
      this.setData({
        url: res.data
      })
      const url =res.data
      wx.navigateTo({
        url: '/pages/webView/index',
        success: function(res1) {
          // é€šè¿‡eventChannel向被打开页面传送数据 
          console.log(url)
          res1.eventChannel.emit('data',{link:url} );
          res1.eventChannel.emit('data', {
            link: url
          });
        }
      })
    }) 
wechat_staff/pages/kefu/select.less
@@ -16,7 +16,6 @@
    align-items: center;
    font-size: 32rpx;
    color: #555555;
    margin-right: 60rpx;
    .name{}
    .border{
      width: 40rpx;
wechat_staff/pages/kefu/select.wxml
@@ -23,7 +23,7 @@
      <view wx:if="{{ flag == 0 }}" class="item">
        <view class="item_content">
          <view class="checked_wrap">
            <image data-item="{{ item }}" bindtap="itemCheck" wx:if="{{ customer.userId == item.userId }}" class="icon" src="../../static/icon/ic_video@2x.png" mode="widthFix"></image>
            <image data-item="{{ item }}" bindtap="itemCheck" wx:if="{{ customer.platSourceId == item.platSourceId }}" class="icon" src="../../static/icon/ic_video@2x.png" mode="widthFix"></image>
            <image wx:else data-item="{{ item }}" bindtap="itemCheck" class="icon" src="../../static/icon/ic_select@2x.png" mode="widthFix"></image>
            <image class="avatar" src="../../static/images/default_avatar.png"></image>
          </view>
@@ -52,7 +52,7 @@
      <view wx:if="{{ flag == 1 }}" class="item">
        <view class="item_content">
          <view class="checked_wrap">
            <image data-item="{{ item }}" bindtap="itemCheck"  wx:if="{{ customer.userId == item.userId }}" class="icon" src="../../static/icon/ic_video@2x.png" mode="widthFix"></image>
            <image data-item="{{ item }}" bindtap="itemCheck"  wx:if="{{ customer.platSourceId == item.platSourceId }}" class="icon" src="../../static/icon/ic_video@2x.png" mode="widthFix"></image>
            <image data-item="{{ item }}" bindtap="itemCheck"  wx:else class="icon" src="../../static/icon/ic_select@2x.png" mode="widthFix"></image>
            <image class="avatar" src="../../static/images/default_avatar.png"></image>
          </view>
wechat_staff/pages/kefu/select.wxss
@@ -17,7 +17,6 @@
  align-items: center;
  font-size: 32rpx;
  color: #555555;
  margin-right: 60rpx;
}
.main_tab .item .border {
  width: 40rpx;
wechat_staff/pages/productVideo/index.wxml
@@ -26,7 +26,7 @@
        <view>{{ item.publishDt }}</view>
        <view class="df_sb">
          <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
          <text>{{ item.viewCount }}</text>
          <text>{{ format.formarCount(item.viewCount) }}</text>
        </view>
      </view>
    </view>
@@ -34,3 +34,4 @@
  
  <videoPlay class='videoPlay' /> 
</view>
<wxs module="format" src="../../utils/format.wxs"></wxs>
wechat_staff/pages/store/index.js
@@ -22,10 +22,10 @@
  loadShopList(params) {
    loadShopList({}).then(res => { 
      if(res.data &&res.data){
        const t = '';
        let t = '';
        res.data.forEach(item => {
          if(item.seqNameList && item.seqNameList.length){
            const tindex =0;
            let tindex =0;
            item.seqNameList.forEach(element => {
              if(tindex>0){
                t =t+"、"
@@ -45,8 +45,8 @@
  getShopInfo(id){  
     getShopDetail(id).then(res => {
      if(res.data && res.data.seqNameList){
        const t = '';
        const tindex =0;
        let t = '';
        let tindex =0;
        res.data.seqNameList.array.forEach(element => {
          if(tindex>0){
            t =t+"、"
wechat_staff/pages/store/index.less
@@ -2,6 +2,9 @@
  background-color: #f7f7f7;
  padding: 30rpx 40rpx;
}
page{
  background-color: #f7f7f7;
}
.list{
  .item{
    padding: 30rpx;
wechat_staff/pages/store/index.wxss
@@ -2,6 +2,9 @@
  background-color: #f7f7f7;
  padding: 30rpx 40rpx;
}
page {
  background-color: #f7f7f7;
}
.list .item {
  padding: 30rpx;
  width: 670rpx;
wechat_staff/pages/store/staff.wxml
@@ -67,7 +67,7 @@
          <view class="desc">导购 ï½œ {{userInfo.jobDate ||'5'}}年经验</view>
        </view>
      </view>
      <image class="qrcode" src="{{userInfo.qrcodeImgFull}}"></image>
      <image show-menu-by-longpress class="qrcode" src="{{userInfo.qrcodeImgFull}}"></image>
      <view class="text">长按图片识别二维码</view>
    </view>
  </van-popup>
wechat_staff/pages/userinfo/collect.wxml
@@ -25,7 +25,7 @@
        <image wx:else class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
        <text class="num {{true ? 'primary' : ''}}">{{ item.collectCount }}</text>
        <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
        <text>{{ item.viewCount }}</text>
        <text>{{ format.formarCount(item.viewCount) }}</text>
      </view>
    </view>
    <view wx:if="{{ dataList.length == 0 }}" class="empty_wrap">
@@ -33,3 +33,4 @@
    </view>
  </view>
</view>
<wxs module="format" src="../../utils/format.wxs"></wxs>
wechat_staff/pages/work/index.wxml
@@ -46,7 +46,7 @@
          <view class="desc">导购 ï½œ {{userInfo.jobDate ||'0'}}年经验</view>
        </view>
      </view>
      <image class="qrcode" src="{{userInfo.qrcodeImgFull}}"></image>
      <image show-menu-by-longpress class="qrcode" src="{{userInfo.qrcodeImgFull}}"></image>
      <view class="text">长按图片识别二维码</view>
    </view>
  </van-popup>
wechat_staff/utils/format.wxs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
var formarCount = function(num) {
  if(!num){
    return 0
  }else{
    if(num > 10000){
      return (num / 10000).toFixed(0) + 'w+'
    }else if(num > 10000000000){
      return (num / 10000000000).toFixed(0) + '亿+'
    }else{
      return num
    }
  }
}
module.exports = {
  formarCount: formarCount
};