From e6e0218a1abd7395d00ade401c6ea6a02e7c3ece Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 01 八月 2024 18:20:28 +0800
Subject: [PATCH] lll
---
wechat_staff/pages/productVideo/index.wxml | 5
wechat_staff/components/disRealpic/index.js | 2
wechat_jiaxuan/pages/consult/consult.wxml | 5
wechat_staff/pages/index/index.wxml | 5
wechat_staff/pages/index/index.wxss | 3
wechat_staff/utils/format.wxs | 16 +
wechat_staff/pages/store/index.js | 8
wechat_jiaxuan/utils/math.wxs | 16 +
wechat_staff/pages/kefu/select.wxml | 4
wechat_staff/components/disCase/index.wxml | 13
wechat_jiaxuan/pages/store/staff.wxml | 2
wechat_staff/pages/kefu/select.js | 111 ++++++++--
wechat_jiaxuan/pages/index/index.js | 78 ++++++-
wechat_jiaxuan/pages/userinfo/favorite.wxml | 5
wechat_staff/pages/consult/consult.wxml | 5
wechat_jiaxuan/pages/detailDis/product.js | 19 -
wechat_staff/pages/index/index.less | 3
wechat_jiaxuan/pages/homeId/index.wxml | 5
wechat_staff/pages/userinfo/collect.wxml | 5
wechat_jiaxuan/pages/productVideo/index.wxml | 5
wechat_jiaxuan/components/disCase/index.wxml | 7
wechat_jiaxuan/pages/index/index.less | 3
wechat_staff/pages/store/index.less | 3
wechat_staff/pages/store/staff.wxml | 2
wechat_staff/pages/homeId/index.wxml | 39 ++-
wechat_staff/pages/kefu/select.wxss | 1
wechat_jiaxuan/api/index.js | 3
wechat_staff/components/disProduct/index.js | 2
wechat_staff/components/disCase/index.js | 2
wechat_staff/pages/kefu/select.less | 1
wechat_jiaxuan/pages/design/design.js | 4
wechat_staff/pages/work/index.wxml | 2
wechat_staff/pages/index/index.js | 33 +++
wechat_staff/components/disProduct/index.wxml | 14
wechat_jiaxuan/components/disRealpic/index.wxml | 5
wechat_jiaxuan/pages/index/index.wxml | 5
wechat_jiaxuan/pages/index/index.wxss | 3
wechat_staff/pages/download/index.js | 70 +++++-
wechat_staff/pages/download/index.wxml | 6
wechat_jiaxuan/pages/userinfo/collect.wxml | 5
wechat_staff/components/disRealpic/index.wxml | 11
wechat_jiaxuan/components/disProduct/index.wxml | 8
wechat_staff/pages/store/index.wxss | 3
43 files changed, 386 insertions(+), 161 deletions(-)
diff --git a/wechat_jiaxuan/api/index.js b/wechat_jiaxuan/api/index.js
index 695b235..f8a3a98 100644
--- a/wechat_jiaxuan/api/index.js
+++ b/wechat_jiaxuan/api/index.js
@@ -211,7 +211,8 @@
export const actionDo = (data) => {
return request({
url: '/web/customer/actionDo',
- data
+ data,
+ loading: '0'
})
}
// 鎴戠殑 棰勭害鍒楄〃
diff --git a/wechat_jiaxuan/components/disCase/index.wxml b/wechat_jiaxuan/components/disCase/index.wxml
index 12bc189..d5d6dd4 100644
--- a/wechat_jiaxuan/components/disCase/index.wxml
+++ b/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>
\ No newline at end of file
+</view>
+<wxs module="math" src="../../utils/math.wxs"></wxs>
\ No newline at end of file
diff --git a/wechat_jiaxuan/components/disProduct/index.wxml b/wechat_jiaxuan/components/disProduct/index.wxml
index 4c5358a..c99c55b 100644
--- a/wechat_jiaxuan/components/disProduct/index.wxml
+++ b/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>
\ No newline at end of file
+</view>
+<wxs module="math" src="../../utils/math.wxs"></wxs>
\ No newline at end of file
diff --git a/wechat_jiaxuan/components/disRealpic/index.wxml b/wechat_jiaxuan/components/disRealpic/index.wxml
index 65e6908..1985f82 100644
--- a/wechat_jiaxuan/components/disRealpic/index.wxml
+++ b/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">
@@ -66,4 +66,5 @@
<videoPlay class="videoPlay"/>
-</view>
\ No newline at end of file
+</view>
+<wxs module="math" src="../../utils/math.wxs"></wxs>
\ No newline at end of file
diff --git a/wechat_jiaxuan/pages/consult/consult.wxml b/wechat_jiaxuan/pages/consult/consult.wxml
index 1db5332..5080bc5 100644
--- a/wechat_jiaxuan/pages/consult/consult.wxml
+++ b/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>
@@ -39,4 +39,5 @@
<image class="default_empty" src="../../static/images/default_empty.png"></image>
</view>
</view>
-</view>
\ No newline at end of file
+</view>
+<wxs module="math" src="../../utils/math.wxs"></wxs>
\ No newline at end of file
diff --git a/wechat_jiaxuan/pages/design/design.js b/wechat_jiaxuan/pages/design/design.js
index 9db973d..2fcac78 100644
--- a/wechat_jiaxuan/pages/design/design.js
+++ b/wechat_jiaxuan/pages/design/design.js
@@ -47,6 +47,10 @@
}
})
+ const member = wx.getStorageSync('member')
+ this.setData({
+ phone: member.phone
+ })
},
onSubmit() {
diff --git a/wechat_jiaxuan/pages/detailDis/product.js b/wechat_jiaxuan/pages/detailDis/product.js
index 7f9866a..4c4970b 100644
--- a/wechat_jiaxuan/pages/detailDis/product.js
+++ b/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() {
diff --git a/wechat_jiaxuan/pages/homeId/index.wxml b/wechat_jiaxuan/pages/homeId/index.wxml
index 74954d6..0fd5ff0 100644
--- a/wechat_jiaxuan/pages/homeId/index.wxml
+++ b/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>
@@ -25,4 +25,5 @@
<image class="default_empty" src="../../static/images/default_empty.png"></image>
</view>
</view>
-</view>
\ No newline at end of file
+</view>
+<wxs module="math" src="../../utils/math.wxs"></wxs>
\ No newline at end of file
diff --git a/wechat_jiaxuan/pages/index/index.js b/wechat_jiaxuan/pages/index/index.js
index 097386a..02195f8 100644
--- a/wechat_jiaxuan/pages/index/index.js
+++ b/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,
@@ -46,15 +52,31 @@
HOME_CLASS_B2: '',
HOME_CLASS_C: '',
},
- onLoadLogin(options){
+ onLoadLogin(options) {
// 宸茬粡鐧诲綍锛屽彲浠ヨ蛋渚濊禆token鐨勯�昏緫浜�
- console.log('棣栭〉鐨刼nLoadLogin',options,`{"token":"${app.globalData.token}"}`);
+ console.log('棣栭〉鐨刼nLoadLogin', 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');
this.onLoad()
@@ -88,16 +110,16 @@
})
break;
case '2':
- if(member && member.phone){
+ if (member && member.phone) {
wx.navigateTo({
url: '/pages/design/design'
})
- }else{
+ } else {
wx.navigateTo({
url: '/pages/auth/auth',
})
}
-
+
// wx.navigateTo({
// url: '/pages/wonderful_activity/index',
// success: function(res) {
@@ -209,11 +231,16 @@
},
videoClick(e) {
const {
- videourl
+ videourl,
+ id
} = e.currentTarget.dataset
- let videoPlay = this.selectComponent('.videoPlay');
- if(videoPlay){
- videoPlay.startPlayVideo(videourl,this );
+ actionDo({
+ actionType: 'view',
+ id
+ })
+ let videoPlay = this.selectComponent('.videoPlay');
+ if (videoPlay) {
+ videoPlay.startPlayVideo(videourl, this);
}
// wx.previewMedia({
// sources: [{
@@ -254,17 +281,20 @@
actionType: 'view',
id: item.id
})
- if(item.contentType == 'link'){
+ if (item.contentType == 'link') {
wx.navigateTo({
url: '/pages/webView/index',
- success: function(res) {
+ 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{
+ } else {
wx.navigateTo({
- url: '/pages/consult/detail?id='+item.id,
+ url: '/pages/consult/detail?id=' + item.id,
})
}
// wx.navigateTo({
@@ -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({
diff --git a/wechat_jiaxuan/pages/index/index.less b/wechat_jiaxuan/pages/index/index.less
index df84746..15cd49b 100644
--- a/wechat_jiaxuan/pages/index/index.less
+++ b/wechat_jiaxuan/pages/index/index.less
@@ -137,6 +137,9 @@
height: 376rpx;
}
}
+ video{
+ width: 100%;
+ }
}
diff --git a/wechat_jiaxuan/pages/index/index.wxml b/wechat_jiaxuan/pages/index/index.wxml
index c9640b7..ec86e1e 100644
--- a/wechat_jiaxuan/pages/index/index.wxml
+++ b/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">
diff --git a/wechat_jiaxuan/pages/index/index.wxss b/wechat_jiaxuan/pages/index/index.wxss
index 8b6df09..d890b43 100644
--- a/wechat_jiaxuan/pages/index/index.wxss
+++ b/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;
diff --git a/wechat_jiaxuan/pages/productVideo/index.wxml b/wechat_jiaxuan/pages/productVideo/index.wxml
index 13f53e4..219e1ea 100644
--- a/wechat_jiaxuan/pages/productVideo/index.wxml
+++ b/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>
@@ -39,4 +39,5 @@
</view>
</view > -->
<videoPlay class='videoPlay' />
-</view>
\ No newline at end of file
+</view>
+<wxs module="math" src="../../utils/math.wxs"></wxs>
\ No newline at end of file
diff --git a/wechat_jiaxuan/pages/store/staff.wxml b/wechat_jiaxuan/pages/store/staff.wxml
index 30e825c..dba38ff 100644
--- a/wechat_jiaxuan/pages/store/staff.wxml
+++ b/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>
diff --git a/wechat_jiaxuan/pages/userinfo/collect.wxml b/wechat_jiaxuan/pages/userinfo/collect.wxml
index fb67bce..9ef35ba 100644
--- a/wechat_jiaxuan/pages/userinfo/collect.wxml
+++ b/wechat_jiaxuan/pages/userinfo/collect.wxml
@@ -24,11 +24,12 @@
<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">
<image class="default_empty" src="../../static/images/default_empty.png"></image>
</view>
</view>
-</view>
\ No newline at end of file
+</view>
+<wxs module="math" src="../../utils/math.wxs"></wxs>
\ No newline at end of file
diff --git a/wechat_jiaxuan/pages/userinfo/favorite.wxml b/wechat_jiaxuan/pages/userinfo/favorite.wxml
index c871d98..fea76d3 100644
--- a/wechat_jiaxuan/pages/userinfo/favorite.wxml
+++ b/wechat_jiaxuan/pages/userinfo/favorite.wxml
@@ -25,11 +25,12 @@
<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">
<image class="default_empty" src="../../static/images/default_empty.png"></image>
</view>
</view>
-</view>
\ No newline at end of file
+</view>
+<wxs module="math" src="../../utils/math.wxs"></wxs>
\ No newline at end of file
diff --git a/wechat_jiaxuan/utils/math.wxs b/wechat_jiaxuan/utils/math.wxs
new file mode 100644
index 0000000..125ac39
--- /dev/null
+++ b/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
+};
\ No newline at end of file
diff --git a/wechat_staff/components/disCase/index.js b/wechat_staff/components/disCase/index.js
index f4551fa..64b1b4c 100644
--- a/wechat_staff/components/disCase/index.js
+++ b/wechat_staff/components/disCase/index.js
@@ -19,7 +19,7 @@
pageNum: 1,
pageSize: 10,
query: '',
- sortType: 'NORMAL',
+ sortType: '',
catalogCode: 'whole_case'
},
attached() {
diff --git a/wechat_staff/components/disCase/index.wxml b/wechat_staff/components/disCase/index.wxml
index 5bbf5ff..79f64e4 100644
--- a/wechat_staff/components/disCase/index.wxml
+++ b/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>
\ No newline at end of file
+</view>
+<wxs module="format" src="../../utils/format.wxs"></wxs>
\ No newline at end of file
diff --git a/wechat_staff/components/disProduct/index.js b/wechat_staff/components/disProduct/index.js
index 3da72a6..1af2ab8 100644
--- a/wechat_staff/components/disProduct/index.js
+++ b/wechat_staff/components/disProduct/index.js
@@ -19,7 +19,7 @@
pageSize: 10,
total: 0,
query: '',
- sortType: 'NORMAL',
+ sortType: '',
catalogCode: ""
},
attached() {
diff --git a/wechat_staff/components/disProduct/index.wxml b/wechat_staff/components/disProduct/index.wxml
index 0d2634d..152cc2d 100644
--- a/wechat_staff/components/disProduct/index.wxml
+++ b/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>
\ No newline at end of file
+</view>
+<wxs module="format" src="../../utils/format.wxs"></wxs>
\ No newline at end of file
diff --git a/wechat_staff/components/disRealpic/index.js b/wechat_staff/components/disRealpic/index.js
index e1ffb3c..c05e2e9 100644
--- a/wechat_staff/components/disRealpic/index.js
+++ b/wechat_staff/components/disRealpic/index.js
@@ -18,7 +18,7 @@
pageNum: 1,
pageSize: 10,
query: '',
- sortType: 'NORMAL',
+ sortType: '',
catalogCode: 'real_case'
},
attached() {
diff --git a/wechat_staff/components/disRealpic/index.wxml b/wechat_staff/components/disRealpic/index.wxml
index 1a43096..f10a0d9 100644
--- a/wechat_staff/components/disRealpic/index.wxml
+++ b/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">
@@ -65,4 +65,5 @@
</view>
<videoPlay class="videoPlay"/>
-</view>
\ No newline at end of file
+</view>
+<wxs module="format" src="../../utils/format.wxs"></wxs>
\ No newline at end of file
diff --git a/wechat_staff/pages/consult/consult.wxml b/wechat_staff/pages/consult/consult.wxml
index fd5ed45..287470e 100644
--- a/wechat_staff/pages/consult/consult.wxml
+++ b/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>
@@ -42,4 +42,5 @@
<image class="default_empty" src="../../static/images/default_empty.png"></image>
</view>
</view>
-</view>
\ No newline at end of file
+</view>
+<wxs module="format" src="../../utils/format.wxs"></wxs>
\ No newline at end of file
diff --git a/wechat_staff/pages/download/index.js b/wechat_staff/pages/download/index.js
index aa5fd1e..dff5661 100644
--- a/wechat_staff/pages/download/index.js
+++ b/wechat_staff/pages/download/index.js
@@ -42,16 +42,54 @@
item.paddingStatus = 2
}
})
- this.setData({ downloadList })
+ this.setData({
+ downloadList
+ })
downloadList.forEach(item => {
if (item.checked) {
- getContentShareImg({
- articleId: `${downloadConfig.id}_${downloadConfig.path}`,
- type: this.takeQrcode ? 0 : 1,
- imgurl: item.url
- }).then(res => {
+ if (that.data.takeQrcode == 1) {
+ getContentShareImg({
+ articleId: `${downloadConfig.id}_${downloadConfig.path}`,
+ type: that.data.takeQrcode ? 1 : 0,
+ imgurl: item.url
+ }).then(res => {
+ wx.downloadFile({
+ url: res.data,
+ 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"
+ })
+ }
+ })
+
+ }
+ }
+ })
+ })
+ }else{
wx.downloadFile({
- url: res.data,
+ url: item.url,
success: res => {
if (res.statusCode === 200) {
wx.saveImageToPhotosAlbum({
@@ -59,7 +97,9 @@
success: res => {
item.paddingStatus = 3
item.checked = false
- that.setData({ downloadList })
+ that.setData({
+ downloadList
+ })
wx.showToast({
title: '淇濆瓨鎴愬姛',
icon: "none"
@@ -68,18 +108,20 @@
fail: res => {
item.paddingStatus = 4
item.checked = false
- that.setData({ downloadList })
+ 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) {
diff --git a/wechat_staff/pages/download/index.wxml b/wechat_staff/pages/download/index.wxml
index 92e32eb..65c4606 100644
--- a/wechat_staff/pages/download/index.wxml
+++ b/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>
<!-- -->
diff --git a/wechat_staff/pages/homeId/index.wxml b/wechat_staff/pages/homeId/index.wxml
index 9199dc3..99bac2e 100644
--- a/wechat_staff/pages/homeId/index.wxml
+++ b/wechat_staff/pages/homeId/index.wxml
@@ -1,25 +1,26 @@
<view class="container">
-<!-- 鍒嗙被 -->
-<view class="home_tabs" style="width: 100%;">
- <scroll-view scroll-x="true" style="width: 710rpx;margin-bottom: 30rpx;">
- <view class="scroll_cate">
- <view bindtap="cateClick" data-code="{{item.labelValueCode}}" wx:for="{{ tagList }}" class="item {{ tagCodes == item.labelValueCode ? 'active': '' }}">{{ item.labelValueName }}</view>
- </view>
- </scroll-view>
-</view>
-<!-- content -->
-<view class="content">
- <view wx:for="{{ dataList }}" class="item" bindtap="itemClick" data-item="{{item}}">
- <image class="img" src="{{ item.coverImage }}" mode="widthFix"></image>
- <view class="title">{{ item.title }}</view>
- <view class="df_sb static">
- <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>
+ <!-- 鍒嗙被 -->
+ <view class="home_tabs" style="width: 100%;">
+ <scroll-view scroll-x="true" style="width: 710rpx;margin-bottom: 30rpx;">
+ <view class="scroll_cate">
+ <view bindtap="cateClick" data-code="{{item.labelValueCode}}" wx:for="{{ tagList }}" class="item {{ tagCodes == item.labelValueCode ? 'active': '' }}">{{ item.labelValueName }}</view>
+ </view>
+ </scroll-view>
+ </view>
+ <!-- content -->
+ <view class="content">
+ <view wx:for="{{ dataList }}" class="item" bindtap="itemClick" data-item="{{item}}">
+ <image class="img" src="{{ item.coverImage }}" mode="widthFix"></image>
+ <view class="title">{{ item.title }}</view>
+ <view class="df_sb static">
+ <view>{{ item.publishDt }}</view>
+ <view class="df_sb">
+ <image class="liulan" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
+ <text>{{ format.formarCount(item.viewCount) }}</text>
+ </view>
</view>
</view>
</view>
</view>
-</view>
\ No newline at end of file
+<wxs module="format" src="../../utils/format.wxs"></wxs>
\ No newline at end of file
diff --git a/wechat_staff/pages/index/index.js b/wechat_staff/pages/index/index.js
index 39f047c..571385e 100644
--- a/wechat_staff/pages/index/index.js
+++ b/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',
diff --git a/wechat_staff/pages/index/index.less b/wechat_staff/pages/index/index.less
index 51fc4ff..f0bb3b0 100644
--- a/wechat_staff/pages/index/index.less
+++ b/wechat_staff/pages/index/index.less
@@ -134,6 +134,9 @@
height: 376rpx;
}
}
+ video{
+ width: 100%;
+ }
}
.consult_swiper {
diff --git a/wechat_staff/pages/index/index.wxml b/wechat_staff/pages/index/index.wxml
index de6e867..356b2f4 100644
--- a/wechat_staff/pages/index/index.wxml
+++ b/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">
diff --git a/wechat_staff/pages/index/index.wxss b/wechat_staff/pages/index/index.wxss
index 1575ecc..70a75e1 100644
--- a/wechat_staff/pages/index/index.wxss
+++ b/wechat_staff/pages/index/index.wxss
@@ -126,6 +126,9 @@
width: 670rpx;
height: 376rpx;
}
+.product_video video {
+ width: 100%;
+}
.consult_swiper {
width: 100%;
}
diff --git a/wechat_staff/pages/kefu/select.js b/wechat_staff/pages/kefu/select.js
index 4243571..e994262 100644
--- a/wechat_staff/pages/kefu/select.js
+++ b/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({
@@ -28,41 +34,80 @@
bottomLift: app.bottomLift
})
this.getList()
-
- },
+
+ },
handleSub() {
- const { customer } = this.data
+ const {
+ customer
+ } = this.data
const enjoyList = wx.getStorageSync('enjoyList') || []
- if(!customer.userId) return wx.showToast({
- title: '璇峰厛閫夋嫨瑕佸叧鑱旂殑瀹㈡埛', icon: 'none'
+ if (!customer.userId) return wx.showToast({
+ 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
- if(total > dataList.length){
- this.setData({ page: page + 1 })
+ const {
+ total,
+ dataList,
+ page
+ } = this.data
+ if (total > dataList.length) {
+ this.setData({
+ page: page + 1
+ })
this.getList()
- }else{
+ } else {
wx.showToast({
title: '鏆傛棤鏇村鏁版嵁',
icon: 'none'
@@ -70,11 +115,19 @@
}
},
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){
+ if (res.data) {
this.setData({
total: res.data.total,
dataList: [...this.data.dataList, ...res.data.data]
@@ -82,19 +135,25 @@
}
})
},
- jumpClient() {
- getCrmAuthUrl({type:1}).then(res => {
- this.setData({ url: res.data })
- const url =res.data
+ jumpClient() {
+ getCrmAuthUrl({
+ type: 1
+ }).then(res => {
+ this.setData({
+ url: res.data
+ })
+ const url = res.data
wx.navigateTo({
url: '/pages/webView/index',
- success: function(res1) {
+ success: function (res1) {
// 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
console.log(url)
- res1.eventChannel.emit('data',{link:url} );
+ res1.eventChannel.emit('data', {
+ link: url
+ });
}
})
- })
+ })
},
onReady() {
diff --git a/wechat_staff/pages/kefu/select.less b/wechat_staff/pages/kefu/select.less
index 6f4c75e..812fa81 100644
--- a/wechat_staff/pages/kefu/select.less
+++ b/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;
diff --git a/wechat_staff/pages/kefu/select.wxml b/wechat_staff/pages/kefu/select.wxml
index a8a85d2..05250b2 100644
--- a/wechat_staff/pages/kefu/select.wxml
+++ b/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>
diff --git a/wechat_staff/pages/kefu/select.wxss b/wechat_staff/pages/kefu/select.wxss
index 673eff5..0deedb2 100644
--- a/wechat_staff/pages/kefu/select.wxss
+++ b/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;
diff --git a/wechat_staff/pages/productVideo/index.wxml b/wechat_staff/pages/productVideo/index.wxml
index b3ea2c8..0ce81d1 100644
--- a/wechat_staff/pages/productVideo/index.wxml
+++ b/wechat_staff/pages/productVideo/index.wxml
@@ -26,11 +26,12 @@
<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>
</view>
<videoPlay class='videoPlay' />
-</view>
\ No newline at end of file
+</view>
+<wxs module="format" src="../../utils/format.wxs"></wxs>
\ No newline at end of file
diff --git a/wechat_staff/pages/store/index.js b/wechat_staff/pages/store/index.js
index 666ccef..e27fe20 100644
--- a/wechat_staff/pages/store/index.js
+++ b/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+"銆�"
diff --git a/wechat_staff/pages/store/index.less b/wechat_staff/pages/store/index.less
index 1931d1a..1c31cbd 100644
--- a/wechat_staff/pages/store/index.less
+++ b/wechat_staff/pages/store/index.less
@@ -2,6 +2,9 @@
background-color: #f7f7f7;
padding: 30rpx 40rpx;
}
+page{
+ background-color: #f7f7f7;
+}
.list{
.item{
padding: 30rpx;
diff --git a/wechat_staff/pages/store/index.wxss b/wechat_staff/pages/store/index.wxss
index 9e36894..05377ac 100644
--- a/wechat_staff/pages/store/index.wxss
+++ b/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;
diff --git a/wechat_staff/pages/store/staff.wxml b/wechat_staff/pages/store/staff.wxml
index b675fe3..cfb0d38 100644
--- a/wechat_staff/pages/store/staff.wxml
+++ b/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>
diff --git a/wechat_staff/pages/userinfo/collect.wxml b/wechat_staff/pages/userinfo/collect.wxml
index 793fc3a..dcedb30 100644
--- a/wechat_staff/pages/userinfo/collect.wxml
+++ b/wechat_staff/pages/userinfo/collect.wxml
@@ -25,11 +25,12 @@
<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">
<image class="default_empty" src="../../static/images/default_empty.png"></image>
</view>
</view>
-</view>
\ No newline at end of file
+</view>
+<wxs module="format" src="../../utils/format.wxs"></wxs>
\ No newline at end of file
diff --git a/wechat_staff/pages/work/index.wxml b/wechat_staff/pages/work/index.wxml
index 4050138..db266d2 100644
--- a/wechat_staff/pages/work/index.wxml
+++ b/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>
diff --git a/wechat_staff/utils/format.wxs b/wechat_staff/utils/format.wxs
new file mode 100644
index 0000000..125ac39
--- /dev/null
+++ b/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
+};
\ No newline at end of file
--
Gitblit v1.9.3