From 680028df90e18299ea72d242a28a3ddcd9a0441c Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 24 七月 2024 13:45:36 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
wechat_staff/pages/detailDis/case.wxml | 46
server/web/src/main/java/com/doumee/api/web/CustomerApi.java | 1
wechat_staff/pages/discover/discover.wxml | 37
wechat_staff/package.json | 3
wechat_staff/pages/detailDis/realpic.json | 7
wechat_staff/pages/detailDis/product.json | 8
wechat_jiaxuan/components/disProduct/index.less | 2
wechat_staff/components/buoyClient/index.less | 1
wechat_jiaxuan/app.js | 55
wechat_staff/project.private.config.json | 4
wechat_staff/pages/kefu/select.wxml | 80
wechat_staff/components/detailFooter/index.wxml | 36
wechat_staff/components/disCase/index.wxml | 155 -
wechat_jiaxuan/pages/consult/detail.wxml | 2
wechat_staff/components/detailFooter/index.json | 4
wechat_staff/pages/webView/index.js | 2
wechat_jiaxuan/pages/consult/detail.js | 5
wechat_staff/components/disRealpic/index.less | 127 +
wechat_staff/static/icon/wechat.png | 0
wechat_staff/pages/detailDis/realpic.wxml | 32
wechat_staff/pages/kefu/select.wxss | 56
wechat_staff/components/disProduct/index.js | 173 ++
wechat_staff/pages/detailDis/product.wxss | 46
wechat_staff/components/disCase/index.less | 45
wechat_staff/pages/kefu/select.less | 50
wechat_jiaxuan/project.private.config.json | 4
wechat_staff/components/disProduct/index.wxss | 45
wechat_jiaxuan/pages/sets/index.js | 68 +
wechat_staff/pages/detailDis/product.less | 57
wechat_staff/pages/discover/discover.less | 17
wechat_staff/api/index.js | 77 +
wechat_jiaxuan/components/disProduct/index.wxml | 2
wechat_staff/components/buoyClient/index.wxml | 4
wechat_staff/components/disRealpic/index.wxss | 85 +
wechat_staff/components/disRealpic/index.js | 177 +++
wechat_staff/pages/detailDis/case.wxss | 64 +
wechat_jiaxuan/pages/kefu/index.wxss | 3
wechat_staff/pages/discover/discover.wxss | 10
wechat_jiaxuan/components/disProduct/index.js | 2
wechat_staff/pages/detailDis/realpic.less | 39
wechat_staff/pages/discover/discover.js | 17
wechat_staff/components/detailFooter/index.wxss | 97 +
wechat_staff/components/disCase/index.wxss | 35
wechat_staff/pages/detailDis/case.json | 8
wechat_staff/pages/detailDis/product.js | 169 ++
wechat_staff/components/disProduct/index.less | 138 +
wechat_staff/pages/store/staff.js | 3
wechat_staff/pages/kefu/select.js | 61 +
wechat_staff/components/detailFooter/index.js | 33
wechat_jiaxuan/pages/index/index.js | 15
wechat_staff/utils/config.js | 4
wechat_jiaxuan/package-lock.json | 6
wechat_staff/static/icon/ic_yixiang.png | 0
wechat_staff/pages/detailDis/realpic.wxss | 34
wechat_staff/package-lock.json | 39
wechat_staff/pages/detailDis/case.js | 76 +
wechat_staff/pages/detailDis/case.less | 67 +
wechat_staff/pages/discover/discover.json | 3
wechat_staff/pages/detailDis/realpic.js | 137 +
wechat_staff/components/disCase/index.js | 151 ++
wechat_staff/pages/detailDis/product.wxml | 74
wechat_staff/components/detailFooter/index.less | 101 +
/dev/null | 0
wechat_staff/components/buoyClient/index.js | 16
wechat_jiaxuan/package.json | 1
wechat_staff/components/disProduct/index.wxml | 149 -
wechat_staff/static/icon/download.png | 0
wechat_jiaxuan/components/disProduct/index.wxss | 2
wechat_staff/components/buoyClient/index.wxss | 1
wechat_staff/components/disRealpic/index.wxml | 157 -
70 files changed, 2,392 insertions(+), 833 deletions(-)
diff --git a/server/web/src/main/java/com/doumee/api/web/CustomerApi.java b/server/web/src/main/java/com/doumee/api/web/CustomerApi.java
index a4ba170..d356e41 100644
--- a/server/web/src/main/java/com/doumee/api/web/CustomerApi.java
+++ b/server/web/src/main/java/com/doumee/api/web/CustomerApi.java
@@ -360,6 +360,7 @@
return ApiResponse.success("鏌ヨ鎴愬姛",newsService.getCustomizedNewsDetail(id));
}
+ @UserLoginRequired
@LoginRequired
@ApiOperation(value = "淇濆瓨鎺ㄥ箍鍜ㄨ鍒嗕韩璁板綍", notes = "瀹㈡埛绔皬绋嬪簭")
@GetMapping("/saveShareRecord")
diff --git a/wechat_jiaxuan/app.js b/wechat_jiaxuan/app.js
index 17d1f15..b72e299 100644
--- a/wechat_jiaxuan/app.js
+++ b/wechat_jiaxuan/app.js
@@ -13,37 +13,32 @@
this.globalData.bottomLift = WindowInfo.screenHeight - WindowInfo.safeArea.bottom;
}
// 鎺堟潈鐧诲綍
- const member = wx.getStorageSync('member')
- if (member && member.token) {
-
- } else {
- wx.login({
- timeout: 5000,
- success(res) {
- if (res.code) {
- //鍙戣捣缃戠粶璇锋眰
- wxLoginCustomer({
- code: res.code
- }).then(res => {
- console.log(res)
- if (res && res.data.member) {
- wx.setStorageSync('member', res.data.member)
- wx.setStorageSync('openid', res.data.member.openid)
- wx.setStorageSync('sessionKey', res.data.sessionKey)
- wx.setStorageSync('token', res.data.token)
- } else {
- console.log('鐧诲綍澶辫触锛�')
- }
- })
- } else {
- console.log('鐧诲綍澶辫触锛�' + res)
- }
- },
- fail(err) {
- console.log(err)
+ wx.login({
+ timeout: 5000,
+ success(res) {
+ if (res.code) {
+ //鍙戣捣缃戠粶璇锋眰
+ wxLoginCustomer({
+ code: res.code
+ }).then(res => {
+ console.log(res)
+ if (res && res.data.member) {
+ wx.setStorageSync('member', res.data.member)
+ wx.setStorageSync('openid', res.data.member.openid)
+ wx.setStorageSync('sessionKey', res.data.sessionKey)
+ wx.setStorageSync('token', res.data.token)
+ } else {
+ console.log('鐧诲綍澶辫触锛�')
+ }
+ })
+ } else {
+ console.log('鐧诲綍澶辫触锛�' + res)
}
- })
- }
+ },
+ fail(err) {
+ console.log(err)
+ }
+ })
diff --git a/wechat_jiaxuan/components/disProduct/index.js b/wechat_jiaxuan/components/disProduct/index.js
index abd00dd..cc33cd8 100644
--- a/wechat_jiaxuan/components/disProduct/index.js
+++ b/wechat_jiaxuan/components/disProduct/index.js
@@ -96,7 +96,7 @@
},
cateClick(e) {
const catalogCode = e.currentTarget.dataset.code
- this.setData({ catalogCode })
+ this.setData({ catalogCode, tagCodes: [] })
this.setData({ pageNum: 1,datalist: [],total: 0})
this.getTag()
this.getList()
diff --git a/wechat_jiaxuan/components/disProduct/index.less b/wechat_jiaxuan/components/disProduct/index.less
index e4a18e4..ddbda83 100644
--- a/wechat_jiaxuan/components/disProduct/index.less
+++ b/wechat_jiaxuan/components/disProduct/index.less
@@ -213,7 +213,7 @@
}
.num {
- margin-right: 16rpx;
+ margin-right: 28rpx;
}
.primary {
diff --git a/wechat_jiaxuan/components/disProduct/index.wxml b/wechat_jiaxuan/components/disProduct/index.wxml
index b9bd8b2..578a03f 100644
--- a/wechat_jiaxuan/components/disProduct/index.wxml
+++ b/wechat_jiaxuan/components/disProduct/index.wxml
@@ -40,7 +40,7 @@
<view wx:for="{{ datalist }}" data-id="{{item.id}}" class="item" bindtap="handleDetail">
<view class="img_wrap">
<image src="{{ item.coverImage }}" class="img" mode="widthFix"></image>
- <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
+ <image wx:if="{{ item.isNew }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
</view>
<view class="name">{{ item.title }}</view>
<view class="info">
diff --git a/wechat_jiaxuan/components/disProduct/index.wxss b/wechat_jiaxuan/components/disProduct/index.wxss
index e0c4bfe..b7161a6 100644
--- a/wechat_jiaxuan/components/disProduct/index.wxss
+++ b/wechat_jiaxuan/components/disProduct/index.wxss
@@ -193,7 +193,7 @@
margin-right: 8rpx;
}
.main_content .main_right .goods_list .item .info .num {
- margin-right: 16rpx;
+ margin-right: 28rpx;
}
.main_content .main_right .goods_list .item .info .primary {
color: var(--themeColor);
diff --git a/wechat_jiaxuan/package-lock.json b/wechat_jiaxuan/package-lock.json
index ca54ef1..d942acc 100644
--- a/wechat_jiaxuan/package-lock.json
+++ b/wechat_jiaxuan/package-lock.json
@@ -11,6 +11,7 @@
"dependencies": {
"@vant/area-data": "^1.1.3",
"@vant/weapp": "^1.11.6",
+ "hy-event-store": "^1.3.1",
"mp-html": "^2.5.0",
"vant-weapp": "^0.5.28"
}
@@ -25,6 +26,11 @@
"resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.11.6.tgz",
"integrity": "sha512-a3heReWYT2gNdsyj6x1hBwsM8V8NrjcPAmle86NH2CD2V/i/h0le75piW6KntSfOPCwekVWMBKhysNrBpJeKdw=="
},
+ "node_modules/hy-event-store": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/hy-event-store/-/hy-event-store-1.3.1.tgz",
+ "integrity": "sha512-uD+14mz4ONiAs9cX/csjUJ2pHTPFciE3JvIbZ+lsbaXopZWbnETEjwJ0a4l5GqNGcltcW3gJjlnUXCJPBoABfg=="
+ },
"node_modules/mp-html": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/mp-html/-/mp-html-2.5.0.tgz",
diff --git a/wechat_jiaxuan/package.json b/wechat_jiaxuan/package.json
index 0c407fb..4c96408 100644
--- a/wechat_jiaxuan/package.json
+++ b/wechat_jiaxuan/package.json
@@ -5,6 +5,7 @@
"dependencies": {
"@vant/area-data": "^1.1.3",
"@vant/weapp": "^1.11.6",
+ "hy-event-store": "^1.3.1",
"mp-html": "^2.5.0",
"vant-weapp": "^0.5.28"
},
diff --git a/wechat_jiaxuan/pages/consult/detail.js b/wechat_jiaxuan/pages/consult/detail.js
index a1462ae..0419117 100644
--- a/wechat_jiaxuan/pages/consult/detail.js
+++ b/wechat_jiaxuan/pages/consult/detail.js
@@ -22,6 +22,11 @@
})
this.getDetail(options.id)
},
+ handleDesign() {
+ wx.navigateTo({
+ url: '/pages/design/design',
+ })
+ },
getDetail(id) {
getProductNewsInfo({ id }).then(res => {
this.setData({ info: res.data })
diff --git a/wechat_jiaxuan/pages/consult/detail.wxml b/wechat_jiaxuan/pages/consult/detail.wxml
index e929287..9768b3e 100644
--- a/wechat_jiaxuan/pages/consult/detail.wxml
+++ b/wechat_jiaxuan/pages/consult/detail.wxml
@@ -18,7 +18,7 @@
<image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image>
<view class="name">鍒嗕韩</view>
</button>
- <view class="sub_btn">
+ <view class="sub_btn" bindtap="handleDesign">
<image class="sheji" src="../../static/icon/ic_sheji.png" mode="widthFix"></image>
<view>鍏嶈垂棰勭害涓撳睘璁捐</view>
</view>
diff --git a/wechat_jiaxuan/pages/index/index.js b/wechat_jiaxuan/pages/index/index.js
index 68b0262..701604f 100644
--- a/wechat_jiaxuan/pages/index/index.js
+++ b/wechat_jiaxuan/pages/index/index.js
@@ -8,6 +8,8 @@
getZhongTaiVideoPage,
getZhongTaiProductNewsPage
} from '../../api/index'
+const { HYEventBus } = require('hy-event-store')
+const eventBus = new HYEventBus()
Page({
/**
@@ -45,6 +47,7 @@
HOME_CLASS_C: '',
},
onShow() {
+ let that = this
const member = wx.getStorageSync('member')
if (member && (member.authStatus == '1' || member.authStatus == '2')) {
getMemberInfo().then(res => {
@@ -57,17 +60,17 @@
member
})
}
+ eventBus.on("reloadHome", () => {
+ console.log('reloadHome');
+ this.onLoad()
+ })
},
onLoad(options) {
const member = wx.getStorageSync('member')
this.initDictData()
- if (member && member.token) {
+ setTimeout(() => {
this.initData()
- } else {
- setTimeout(() => {
- this.initData()
- }, 1200)
- }
+ }, 1200)
},
changePath(e) {
let index = e.currentTarget.dataset.type
diff --git a/wechat_jiaxuan/pages/kefu/index.wxss b/wechat_jiaxuan/pages/kefu/index.wxss
index f88cc07..2003098 100644
--- a/wechat_jiaxuan/pages/kefu/index.wxss
+++ b/wechat_jiaxuan/pages/kefu/index.wxss
@@ -12,6 +12,9 @@
height: 100rpx;
padding: 12rpx 40rpx;
}
+.footer .btns .btn {
+ padding-top: 20rpx;
+}
.footer .sub_btn {
flex: 1;
display: flex;
diff --git a/wechat_jiaxuan/pages/sets/index.js b/wechat_jiaxuan/pages/sets/index.js
index 67eae09..7b2701b 100644
--- a/wechat_jiaxuan/pages/sets/index.js
+++ b/wechat_jiaxuan/pages/sets/index.js
@@ -1,4 +1,9 @@
-import { wxLogOff } from '../../api/index'
+import {
+ wxLogOff,
+ wxLoginCustomer
+} from '../../api/index'
+const { HYEventBus } = require('hy-event-store')
+const eventBus = new HYEventBus()
Page({
/**
@@ -15,26 +20,63 @@
},
showLogout() {
- this.setData({show: true})
+ this.setData({
+ show: true
+ })
},
onClose() {
- this.setData({show: false})
+ this.setData({
+ show: false
+ })
},
onSubLgout() {
+ let that = this
wxLogOff().then(res => {
- wx.removeStorageSync('token')
- wx.removeStorageSync('member')
- wx.removeStorageSync('code')
- wx.showToast({
- title: '娉ㄩ攢鎴愬姛',
- })
- wx.switchTab({
- url: '/pages/index/index',
+ wx.clearStorage()
+ wx.login({
+ timeout: 5000,
+ success(res) {
+ if (res.code) {
+ //鍙戣捣缃戠粶璇锋眰
+ wxLoginCustomer({
+ code: res.code
+ }).then(res => {
+ console.log(res)
+ if (res && res.data.token) {
+ wx.setStorageSync('sessionKey', res.data.sessionKey)
+ wx.setStorageSync('token', res.data.token)
+ wx.showToast({
+ title: '娉ㄩ攢鎴愬姛',
+ })
+ setTimeout(() => {
+ wx.switchTab({
+ url: '/pages/index/index',
+ })
+ }, 500)
+ setTimeout(() => {
+ eventBus.emit("reloadHome")
+ }, 1000)
+ } else {
+ console.log('鐧诲綍澶辫触锛�')
+ }
+ })
+ } else {}
+ },
+ fail(err) {
+ wx.showToast({
+ title: '娉ㄩ攢澶辫触',
+ })
+ wx.switchTab({
+ url: '/pages/index/index',
+ })
+ }
})
})
},
- changeDeal(e){
- const { label } = e.currentTarget.dataset
+ changeDeal(e) {
+ const {
+ label
+ } = e.currentTarget.dataset
wx.navigateTo({
url: '/pages/sets/protocol?label=' + label,
})
diff --git a/wechat_jiaxuan/project.private.config.json b/wechat_jiaxuan/project.private.config.json
index 065ed7b..3a25112 100644
--- a/wechat_jiaxuan/project.private.config.json
+++ b/wechat_jiaxuan/project.private.config.json
@@ -53,8 +53,8 @@
},
{
"name": "",
- "pathName": "pages/homeId/index",
- "query": "code=zb_deco_jdid&name=%E5%AE%B6%E7%9A%84iD",
+ "pathName": "pages/kefu/index",
+ "query": "",
"launchMode": "default",
"scene": null
}
diff --git a/wechat_jiaxuan/static/icon/test.png b/wechat_jiaxuan/static/icon/test.png
deleted file mode 100644
index 4820384..0000000
--- a/wechat_jiaxuan/static/icon/test.png
+++ /dev/null
Binary files differ
diff --git a/wechat_staff/api/index.js b/wechat_staff/api/index.js
index 4cc60e9..399269d 100644
--- a/wechat_staff/api/index.js
+++ b/wechat_staff/api/index.js
@@ -134,6 +134,14 @@
data
})
}
+// 鑾峰彇瀹㈡埛-娼滃鍒楄〃
+export const getCustomerList = (data) => {
+ return request({
+ url: '/web/personnel/getCustomerList',
+ method: "POST",
+ data
+ })
+}
export const getUserCard = (data) => {
return request({
url: '/web/personnel/getUserCard',
@@ -186,6 +194,75 @@
data
})
}
+// 鍒嗙被浜у搧 鍒嗛〉鍒楄〃 涓彴
+export const getZhongTaiProductPage = (data) => {
+ return request({
+ url: '/web/customer/getZhongTaiProductPage',
+ method: 'POST',
+ data
+ })
+}
+// 涓彴 鍒嗙被浜у搧璇︽儏
+export const getProductInfo = (data) => {
+ return request({
+ url: '/web/customer/getProductInfo',
+ data
+ })
+}
+// 鍒嗙被妗堜緥 鍒嗛〉鍒楄〃 涓彴
+export const getZhongTaiWholecasePage = (data) => {
+ return request({
+ url: '/web/customer/getZhongTaiWholecasePage',
+ method: 'POST',
+ data
+ })
+}
+// 鍒嗙被妗堜緥 璇︽儏
+export const getWholecaseInfo = (data) => {
+ return request({
+ url: '/web/customer/getWholecaseInfo',
+ data
+ })
+}
+// 鍒嗙被瀹炴櫙 鍒嗛〉鍒楄〃 涓彴
+export const getZhongTaiRealcasePage = (data) => {
+ return request({
+ url: '/web/customer/getZhongTaiRealcasePage',
+ method: 'POST',
+ data
+ })
+}
+// 鍒嗙被瀹炴櫙 璇︽儏
+export const getRealcaseInfo = (data) => {
+ return request({
+ url: '/web/customer/getRealcaseInfo',
+ data
+ })
+}
+// 浜у搧璧勮 鍒嗛〉鍒楄〃 涓彴
+export const getZhongTaiProductNewsPage = (data) => {
+ return request({
+ url: '/web/customer/getZhongTaiProductNewsPage',
+ method: 'POST',
+ data
+ })
+}
+// 浜у搧璧勮 璇︽儏
+export const getProductNewsInfo = (data) => {
+ return request({
+ url: '/web/customer/getProductNewsInfo',
+ method: 'GET',
+ data
+ })
+}
+// 鍐呭 鏀惰棌
+export const collectContent = (data) => {
+ return request({
+ url: '/web/customer/collectContent',
+ method: 'GET',
+ data
+ })
+}
// 0鍏冨畾鍒朵俊鎭�
export const saveFreeCustomizationApply = (data) => {
return request({
diff --git a/wechat_staff/components/buoyClient/index.js b/wechat_staff/components/buoyClient/index.js
index c154c3b..72c265e 100644
--- a/wechat_staff/components/buoyClient/index.js
+++ b/wechat_staff/components/buoyClient/index.js
@@ -1,10 +1,13 @@
-// components/buoyClient/index.js
+import { getCrmAuthUrl } from '../../api/index'
Component({
/**
* 缁勪欢鐨勫睘鎬у垪琛�
*/
properties: {
-
+ showPurpose: {
+ type: String,
+ value: '0'
+ }
},
/**
@@ -21,6 +24,15 @@
jumpPage(e) {
const urls = [ '/pages/kefu/fond', '/pages/store/staff' ]
const i = e.currentTarget.dataset.i
+ if(i == 2){
+ getCrmAuthUrl({type:1}).then(res => {
+ console.log(res.data)
+ this.setData({ url: res.data })
+ wx.navigateTo({
+ url: '/pages/webView/index?link=' + res.data,
+ })
+ })
+ }
console.log('i', i);
wx.navigateTo({
url: urls[i],
diff --git a/wechat_staff/components/buoyClient/index.less b/wechat_staff/components/buoyClient/index.less
index 332ff1c..fd6a834 100644
--- a/wechat_staff/components/buoyClient/index.less
+++ b/wechat_staff/components/buoyClient/index.less
@@ -1,6 +1,5 @@
.wrap{
width: 100rpx;
- height: 232rpx;
background: rgba(255,255,255,0.86);
box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0,0,0,0.2);
border-radius: 8rpx 0rpx 0rpx 8rpx;
diff --git a/wechat_staff/components/buoyClient/index.wxml b/wechat_staff/components/buoyClient/index.wxml
index ff35286..2b4074c 100644
--- a/wechat_staff/components/buoyClient/index.wxml
+++ b/wechat_staff/components/buoyClient/index.wxml
@@ -4,6 +4,10 @@
<image src="../../static/icon/ic_kehuxihuan.png" mode="widthFix"></image>
<view>瀹㈡埛鍠滄</view>
</view>
+ <view wx:if="{{ showPurpose && showPurpose == '1' }}" class="item" data-i="2" bindtap="jumpPage">
+ <image src="../../static/icon/ic_yixiang.png" mode="widthFix"></image>
+ <view>鎰忓悜鐧昏</view>
+ </view>
<view class="item" data-i="1" bindtap="jumpPage">
<image src="../../static/icon/ic_mingpian.png" mode="widthFix"></image>
<view>涓汉鍚嶇墖</view>
diff --git a/wechat_staff/components/buoyClient/index.wxss b/wechat_staff/components/buoyClient/index.wxss
index 1d3aef2..8c9009e 100644
--- a/wechat_staff/components/buoyClient/index.wxss
+++ b/wechat_staff/components/buoyClient/index.wxss
@@ -1,6 +1,5 @@
.wrap {
width: 100rpx;
- height: 232rpx;
background: rgba(255, 255, 255, 0.86);
box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0, 0, 0, 0.2);
border-radius: 8rpx 0rpx 0rpx 8rpx;
diff --git a/wechat_staff/components/detailFooter/index.js b/wechat_staff/components/detailFooter/index.js
new file mode 100644
index 0000000..de45c6d
--- /dev/null
+++ b/wechat_staff/components/detailFooter/index.js
@@ -0,0 +1,33 @@
+// components/detailFooter/index.js
+Component({
+ /**
+ * 缁勪欢鐨勫睘鎬у垪琛�
+ */
+ properties: {
+
+ },
+
+ /**
+ * 缁勪欢鐨勫垵濮嬫暟鎹�
+ */
+ data: {
+ bottomLift: 0,
+ showShare: false
+ },
+ attached() {
+ var app = getApp().globalData
+ this.setData({
+ bottomLift: app.bottomLift
+ })
+ },
+ methods: {
+ openShare() {
+ console.log('鐐瑰嚮鎵撳紑');
+ this.setData({ showShare: true })
+ },
+ onClose() {
+ console.log('鐐瑰嚮鍏抽棴');
+ this.setData({ showShare: false })
+ },
+ }
+})
diff --git a/wechat_staff/components/detailFooter/index.json b/wechat_staff/components/detailFooter/index.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/wechat_staff/components/detailFooter/index.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/wechat_staff/components/detailFooter/index.less b/wechat_staff/components/detailFooter/index.less
new file mode 100644
index 0000000..840ec0a
--- /dev/null
+++ b/wechat_staff/components/detailFooter/index.less
@@ -0,0 +1,101 @@
+.main_wrap{
+
+}
+.footer_wrap {
+ position: fixed;
+ z-index: 999;
+ bottom: 0;
+ left: 0;
+ width: 750rpx;
+ padding: 0rpx 40rpx;
+ background-color: #fff;
+ box-shadow: 0rpx -1rpx 0rpx 0rpx #EEEEEE;
+ .content{
+ height: 100rpx;
+ align-items: center;
+ display: flex;
+ justify-content: space-between;
+ }
+ .btns{
+ display: flex;
+ align-items: center;
+ height: 100rpx;
+ .btn{
+ padding: 0;
+ margin-top: 16rpx;
+ }
+ }
+ .share {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 72rpx;
+ width: 188rpx;
+ background-color: var(--themeColor);
+ font-weight: 500;
+ color: #FFFFFF;
+ border-radius: 8rpx;
+ .sheji{
+ width: 28rpx;
+ margin-right: 8rpx;
+ }
+ }
+ .item {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ font-size: 20rpx;
+ color: #666666;
+ margin-right: 48rpx;
+ image {
+ width: 44rpx;
+ height: 40rpx;
+ margin-bottom: 2rpx;
+ }
+ }
+}
+.shade_modal{
+ position: fixed;
+ bottom: 0;
+ width: 100%;
+ z-index: 9999;
+ background-color: #fff;
+ border-radius: 24rpx 24rpx 0rpx 0rpx;
+ .btns{
+ display: flex;
+ height: 264rpx;
+ display: flex;
+ align-items: center;
+ padding: 0 40rpx;
+ .item{
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ flex: 1;
+ font-size: 26rpx;
+ background-color: #fff;
+ image{
+ width: 80rpx;
+ height: 80rpx;
+ margin-bottom: 10rpx;
+ }
+ }
+ }
+ .cancel{
+ height: 100rpx;
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border: 1rpx solid #e5e5e5;
+ }
+}
+.shade{
+ position: fixed;
+ width: 100%;
+ height: 100%;
+ z-index: 1000;
+ background-color: rgba(0,0,0,.5);
+}
\ No newline at end of file
diff --git a/wechat_staff/components/detailFooter/index.wxml b/wechat_staff/components/detailFooter/index.wxml
new file mode 100644
index 0000000..ed66dfa
--- /dev/null
+++ b/wechat_staff/components/detailFooter/index.wxml
@@ -0,0 +1,36 @@
+<view class="main_wrap">
+ <view class="footer_wrap" style="padding-bottom: {{bottomLift}}px;">
+ <view class="content">
+ <view class="btns">
+ <view class="item">
+ <image src="../../static/icon/detail_nav_like_sel@2x.png"></image>
+ <text>鍠滄</text>
+ </view>
+ <view class="item">
+ <image src="../../static/icon/detail_nav_collected.png"></image>
+ <text>鏀惰棌</text>
+ </view>
+ <view class="item">
+ <image src="../../static/icon/detail_nav_download@2x.png"></image>
+ <text>涓嬭浇</text>
+ </view>
+ </view>
+ <view bindtap="openShare" class="share">鍒嗕韩</view>
+ </view>
+ </view>
+ <!-- -->
+ <view class="shade_modal" style="padding-bottom: {{bottomLift}}px;">
+ <view class="btns">
+ <button open-type="share" class="item" bindtap="handleShare">
+ <image src="../../static/icon/wechat.png"></image>
+ <view>灏忕▼搴忓垎浜�</view>
+ </button>
+ <button class="item" bindtap="handleDown">
+ <image src="../../static/icon/download.png"></image>
+ <view>涓嬭浇娴锋姤</view>
+ </button>
+ </view>
+ <view bindtap="onClose" class="cancel">鍙栨秷</view>
+ </view>
+ <view class="shade" bindtap="onClose"></view>
+</view>
\ No newline at end of file
diff --git a/wechat_staff/components/detailFooter/index.wxss b/wechat_staff/components/detailFooter/index.wxss
new file mode 100644
index 0000000..4209fa7
--- /dev/null
+++ b/wechat_staff/components/detailFooter/index.wxss
@@ -0,0 +1,97 @@
+.footer_wrap {
+ position: fixed;
+ z-index: 999;
+ bottom: 0;
+ left: 0;
+ width: 750rpx;
+ padding: 0rpx 40rpx;
+ background-color: #fff;
+ box-shadow: 0rpx -1rpx 0rpx 0rpx #EEEEEE;
+}
+.footer_wrap .content {
+ height: 100rpx;
+ align-items: center;
+ display: flex;
+ justify-content: space-between;
+}
+.footer_wrap .btns {
+ display: flex;
+ align-items: center;
+ height: 100rpx;
+}
+.footer_wrap .btns .btn {
+ padding: 0;
+ margin-top: 16rpx;
+}
+.footer_wrap .share {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 72rpx;
+ width: 188rpx;
+ background-color: var(--themeColor);
+ font-weight: 500;
+ color: #FFFFFF;
+ border-radius: 8rpx;
+}
+.footer_wrap .share .sheji {
+ width: 28rpx;
+ margin-right: 8rpx;
+}
+.footer_wrap .item {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ font-size: 20rpx;
+ color: #666666;
+ margin-right: 48rpx;
+}
+.footer_wrap .item image {
+ width: 44rpx;
+ height: 40rpx;
+ margin-bottom: 2rpx;
+}
+.shade_modal {
+ position: fixed;
+ bottom: 0;
+ width: 100%;
+ z-index: 9999;
+ background-color: #fff;
+ border-radius: 24rpx 24rpx 0rpx 0rpx;
+}
+.shade_modal .btns {
+ height: 264rpx;
+ display: flex;
+ align-items: center;
+ padding: 0 40rpx;
+}
+.shade_modal .btns .item {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ flex: 1;
+ font-size: 26rpx;
+ background-color: #fff;
+}
+.shade_modal .btns .item image {
+ width: 80rpx;
+ height: 80rpx;
+ margin-bottom: 10rpx;
+}
+.shade_modal .cancel {
+ height: 100rpx;
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border: 1rpx solid #e5e5e5;
+}
+.shade {
+ position: fixed;
+ width: 100%;
+ height: 100%;
+ z-index: 1000;
+ background-color: rgba(0, 0, 0, 0.5);
+}
diff --git a/wechat_staff/components/disCase/index.js b/wechat_staff/components/disCase/index.js
index a76c4eb..96fca1a 100644
--- a/wechat_staff/components/disCase/index.js
+++ b/wechat_staff/components/disCase/index.js
@@ -1,24 +1,151 @@
-// components/disCase/index.js
+import { getCataLogTagList, getZhongTaiWholecasePage, actionDo } from '../../api/index'
Component({
/**
* 缁勪欢鐨勫睘鎬у垪琛�
*/
properties: {
-
+ menuButtonInfo: Object
},
data: {
- showParams: false,
- activeStatus: '0'
+ activeIndex: -1,
+ activeParam: [],
+ selParam: '',
+ tagCodes: [],
+
+
+ cateList: [],
+ dataList: [],
+ total: 0,
+ pageNum: 1,
+ pageSize: 10,
+ query: '',
+ sortType: 'NORMAL',
+ catalogCode: 'whole_case'
+ },
+ attached() {
+ this.getCatelist()
},
methods: {
- handleDetail(e) {
- wx.navigateTo({
- url: '/pages/detailDis/case',
+ getCatelist(){
+ const { catalogCode } = this.data
+ getCataLogTagList({
+ catalogCode
+ }).then(res => {
+ if(res.data && res.data.length > 0){
+ this.setData({
+ cateList: res.data
+ })
+ setTimeout(() => {
+ this.getList()
+ }, 300)
+ }
})
},
- changeShowParams(){
- const showParams = !this.data.showParams
- this.setData({showParams})
+ getList() {
+ const { sortType, query, tagCodes, pageNum, pageSize,catalogCode } = this.data
+ getZhongTaiWholecasePage({
+ catalogCode,pageNum,pageSize,tagCodes, sortType,query
+ }).then(res => {
+ if(res.data){
+ this.setData({
+ total: res.data.total,
+ dataList: [...this.data.dataList, ...res.data.records],
+ })
+ }
+ })
+ },
+ scrolltolower() {
+ console.log('瑙﹀簳浜嬩欢');
+ const { total, dataList, pageNum } = this.data
+ if(total > dataList.length){
+ this.setData({ pageNum: pageNum + 1 })
+ this.getList()
+ }else{
+ wx.showToast({
+ title: '鏆傛棤鏇村鏁版嵁',
+ icon: 'none'
+ })
+ }
+ },
+ statusChange(e) {
+ const sortType = e.currentTarget.dataset.status
+ this.setData({sortType})
+ this.setData({ pageNum: 1,dataList: [],total: 0})
+ this.getList()
+ },
+ handleAction(e){
+ const actionType = e.currentTarget.dataset.code
+ const id = e.currentTarget.dataset.id
+ actionDo({
+ actionType,
+ id
+ }).then(res => {
+ this.getList()
+ })
+ },
+ handleDetail(e) {
+ const id = e.currentTarget.dataset.id
+ wx.navigateTo({
+ url: '/pages/detailDis/case?id=' + id,
+ })
+ },
+ tagClick(e) {
+ const code = e.currentTarget.dataset.code
+ const paramIndex = e.currentTarget.dataset.index
+ const { cateList, tagCodes, activeParam, activeIndex } = this.data
+ const index = tagCodes.indexOf(code)
+
+ if(index === -1){
+ // 鍚宲aram閲宑ode閲嶅
+ if(activeParam && activeParam.length > 0){
+ activeParam.forEach(item => {
+ const indexTemp = tagCodes.indexOf(item.labelValueCode)
+ if(indexTemp > -1){
+ tagCodes.splice(indexTemp, 1)
+ }
+ })
+ }
+ tagCodes.push(code)
+ cateList[activeIndex].paramIndex = paramIndex
+ cateList[activeIndex].paramName = activeParam[paramIndex].labelValueName
+ }else{
+ tagCodes.splice(index, 1)
+ cateList[activeIndex].paramIndex = -1
+ cateList[activeIndex].paramName = ''
+ }
+ this.setData({ pageNum: 1,dataList: [],total: 0})
+ this.setData({ tagCodes, cateList })
+ console.log('tagCodes', tagCodes);
+ },
+ cancelParam() {
+ const { cateList } = this.data
+ cateList.forEach(item => {
+ item.paramIndex = -1
+ item.paramName = ''
+ })
+ this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 })
+ },
+ bindblur() {
+ this.setData({ pageNum: 1,dataList: [],total: 0})
+ this.getList()
+ },
+ subParam() {
+ this.setData({ activeParam: [] })
+ this.setData({ pageNum: 1,dataList: [],total: 0})
+ this.getList()
+ },
+ changeShowParams(e){
+ const { cateList } = this.data
+ const activeIndex = e.currentTarget.dataset.index
+ if(activeIndex === this.data.activeIndex){
+ this.setData({ activeIndex: -1, activeParam: [], selParam: '' })
+ }else{
+ this.setData({
+ activeIndex,
+ activeParam: cateList[activeIndex].valueVos
+ })
+ }
+
// this.setData({showTwo: false})
},
changeTwo(){
@@ -26,9 +153,5 @@
this.setData({showTwo})
this.setData({showOne: false})
},
- statusChange(e) {
- const activeStatus = e.currentTarget.dataset.status
- this.setData({activeStatus})
- }
}
})
diff --git a/wechat_staff/components/disCase/index.less b/wechat_staff/components/disCase/index.less
index 10e7bfb..52e9388 100644
--- a/wechat_staff/components/disCase/index.less
+++ b/wechat_staff/components/disCase/index.less
@@ -1,4 +1,4 @@
-.search_wrap {
+.search_wrap{
width: 670rpx;
height: 72rpx;
margin: 24rpx auto;
@@ -8,30 +8,42 @@
display: flex;
align-items: center;
background-color: #F7F7F7;
-
- image {
+ image{
width: 28rpx;
margin-right: 16rpx;
}
}
-
.app {
height: 100%;
width: 100%;
+ .home_content{
+ height: 100%;
+ }
}
-.main_content {
- height: calc(100% - 120rpx);
+.home_top{
+ position: fixed;
+ z-index: 9999;
+ width: 100%;
+ background-color: #fff;
+}
+.main_content{
+ height: 100%;
+ padding-top: 120rpx;
+ .query_wrap_scroll{
+ width: 750rpx;
+ padding: 0 40rpx;
+ }
.query_wrap {
display: flex;
- padding: 0 16rpx;
.item {
+ margin-right: 36rpx;
height: 88rpx;
display: flex;
+ flex-shrink: 0;
align-items: center;
justify-content: center;
color: #666666;
- flex: 1;
.name {
margin-right: 6rpx;
}
@@ -39,13 +51,15 @@
}
.query_param {
position: absolute;
- z-index: 99;
+ z-index: 999;
background-color: #fff;
width: 100%;
.list {
width: 100%;
display: flex;
flex-wrap: wrap;
+ max-height: 400rpx;
+ overflow: auto;
padding: 30rpx 40rpx;
.item {
width: 202rpx;
@@ -89,17 +103,22 @@
}
}
}
+ .shade{
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0,0,0,.5);
+ z-index: 99;
+ }
.status {
display: flex;
padding: 0rpx 40rpx;
- margin: 20rpx 0;
align-items: center;
-
+ height: 100rpx;
.active {
color: var(--themeColor);
}
-
.separate {
margin: 0 12rpx;
width: 1rpx;
@@ -108,7 +127,9 @@
}
}
.goods_list{
+ box-sizing: border-box;
padding: 12rpx 40rpx;
+ height: calc( 100% - 188rpx);
.item{
width: 100%;
margin-bottom: 32rpx;
diff --git a/wechat_staff/components/disCase/index.wxml b/wechat_staff/components/disCase/index.wxml
index 0e72d83..1d0bda2 100644
--- a/wechat_staff/components/disCase/index.wxml
+++ b/wechat_staff/components/disCase/index.wxml
@@ -1,119 +1,60 @@
<view class="app">
- <view class="search_wrap">
- <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
- <input type="text" placeholder="鎼滅储浜у搧鍚嶇О" />
+ <view class="home_top" style="top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px">
+ <view class="search_wrap">
+ <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
+ <input bindconfirm="bindblur" bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="鎼滅储妗堜緥鍚嶇О" />
+ </view>
</view>
<!-- -->
- <view class="main_content">
- <view class="query_wrap">
- <view class="item" bindtap="changeShowParams">
- <view class="name">椋庢牸</view>
- <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" />
- </view>
- <view class="item" bindtap="changeShowParams">
- <view class="name">绌洪棿</view>
- <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" />
- </view>
- <view class="item" bindtap="changeShowParams">
- <view class="name">闂村悕</view>
- <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" />
- </view>
- <view class="item" bindtap="changeShowParams">
- <view class="name">闂寸О</view>
- <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" />
- </view>
- <view class="item" bindtap="changeShowParams">
- <view class="name">绌虹О</view>
- <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" />
- </view>
- </view>
- <view wx:if="{{ showParams }}" class="query_param">
- <view class="list">
- <view class="item active">涓滆姖鐢佃</view>
- <view class="item">涓滆姖鍟婄殑鏃舵拻鐨勪唬鐢佃</view>
- <view class="item">涓滆姖鐢佃</view>
- <view class="item">涓滆姖鐢佃</view>
- <view class="item">涓滆姖鐢佃</view>
- </view>
- <view class="btns">
- <view class="btn" bindtap="changeShowParams">鍙栨秷</view>
- <view class="btn sub">纭</view>
- </view>
- </view>
- <view class="status">
- <view class="item {{ activeStatus == '0' ? 'active' : '' }}" data-status="0" bindtap="statusChange">榛樿</view>
- <view class="separate"></view>
- <view class="item {{ activeStatus == '1' ? 'active' : '' }}" data-status="1" bindtap="statusChange">鏈�鐑�</view>
- <view class="separate"></view>
- <view class="item {{ activeStatus == '2' ? 'active' : '' }}" data-status="2" bindtap="statusChange">鏈�鏂�</view>
- </view>
- <!-- goods_list -->
- <view class="goods_list">
- <view class="item" bindtap="handleDetail">
- <view class="img_wrap">
- <image src="../../static/icon/test.png" class="img"></image>
- <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
- </view>
- <view class="content">
- <view class="name">閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸</view>
- <view class="info">
- <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
- <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
- <text class="num {{true ? 'primary' : ''}}">34</text>
- <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
- <text>1000</text>
+ <view class="home_content" style="padding-top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px;">
+ <view class="main_content">
+ <scroll-view class="query_wrap_scroll" scroll-x>
+ <view class="query_wrap">
+ <view data-index="{{ index }}" wx:for="{{ cateList }}" class="item" bindtap="changeShowParams">
+ <view class="name">{{ item.paramName || item.labelName }}</view>
+ <van-icon name="{{ activeIndex === index ? 'arrow-up' : 'arrow-down' }}" />
</view>
</view>
- </view>
- <view class="item">
- <view class="img_wrap">
- <image src="../../static/icon/test.png" class="img"></image>
- <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
+ </scroll-view>
+ <!-- param -->
+ <view wx:if="{{ activeParam && activeParam.length > 0 }}" class="query_param">
+ <view class="list">
+ <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].paramIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
</view>
- <view class="content">
- <view class="name">閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸</view>
- <view class="info">
- <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
- <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
- <text class="num {{true ? 'primary' : ''}}">34</text>
- <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
- <text>1000</text>
+ <view class="btns">
+ <view class="btn" bindtap="cancelParam">鍙栨秷</view>
+ <view bindtap="subParam" class="btn sub">纭</view>
+ </view>
+ </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="separate"></view>
+ <view class="item {{ sortType == 'HOT' ? 'active' : '' }}" data-status="HOT" bindtap="statusChange">鏈�鐑�</view>
+ <view class="separate"></view>
+ <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">鏈�鏂�</view>
+ </view>
+ <!-- goods_list -->
+ <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">
+ <view class="img_wrap">
+ <image src="{{ item.coverImage }}" class="img"></image>
+ <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
+ </view>
+ <view class="content">
+ <view class="name">{{ item.title }}</view>
+ <view class="info">
+ <image wx:if="{{ !item.collection }}" data-code="like" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
+ <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.collection ? 'primary' : ''}}">{{ item.collectCount }}</text>
+ <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
+ <text>{{ item.viewCount }}</text>
+ </view>
</view>
</view>
- </view>
- <view class="item">
- <view class="img_wrap">
- <image src="../../static/icon/test.png" class="img"></image>
- <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
- </view>
- <view class="content">
- <view class="name">閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸</view>
- <view class="info">
- <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
- <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
- <text class="num {{true ? 'primary' : ''}}">34</text>
- <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
- <text>1000</text>
- </view>
- </view>
- </view>
- <view class="item">
- <view class="img_wrap">
- <image src="../../static/icon/test.png" class="img"></image>
- <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
- </view>
- <view class="content">
- <view class="name">閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸</view>
- <view class="info">
- <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
- <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
- <text class="num {{true ? 'primary' : ''}}">34</text>
- <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
- <text>1000</text>
- </view>
- </view>
- </view>
+ </scroll-view>
</view>
</view>
+
</view>
\ No newline at end of file
diff --git a/wechat_staff/components/disCase/index.wxss b/wechat_staff/components/disCase/index.wxss
index 21a13d7..ef73ac8 100644
--- a/wechat_staff/components/disCase/index.wxss
+++ b/wechat_staff/components/disCase/index.wxss
@@ -17,27 +17,41 @@
height: 100%;
width: 100%;
}
+.app .home_content {
+ height: 100%;
+}
+.home_top {
+ position: fixed;
+ z-index: 9999;
+ width: 100%;
+ background-color: #fff;
+}
.main_content {
- height: calc(100% - 120rpx);
+ height: 100%;
+ padding-top: 120rpx;
+}
+.main_content .query_wrap_scroll {
+ width: 750rpx;
+ padding: 0 40rpx;
}
.main_content .query_wrap {
display: flex;
- padding: 0 16rpx;
}
.main_content .query_wrap .item {
+ margin-right: 36rpx;
height: 88rpx;
display: flex;
+ flex-shrink: 0;
align-items: center;
justify-content: center;
color: #666666;
- flex: 1;
}
.main_content .query_wrap .item .name {
margin-right: 6rpx;
}
.main_content .query_param {
position: absolute;
- z-index: 99;
+ z-index: 999;
background-color: #fff;
width: 100%;
}
@@ -45,6 +59,8 @@
width: 100%;
display: flex;
flex-wrap: wrap;
+ max-height: 400rpx;
+ overflow: auto;
padding: 30rpx 40rpx;
}
.main_content .query_param .list .item {
@@ -85,11 +101,18 @@
background: var(--themeColor);
color: #fff;
}
+.main_content .shade {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 99;
+}
.main_content .status {
display: flex;
padding: 0rpx 40rpx;
- margin: 20rpx 0;
align-items: center;
+ height: 100rpx;
}
.main_content .status .active {
color: var(--themeColor);
@@ -101,7 +124,9 @@
background-color: #333333;
}
.main_content .goods_list {
+ box-sizing: border-box;
padding: 12rpx 40rpx;
+ height: calc(100% - 188rpx);
}
.main_content .goods_list .item {
width: 100%;
diff --git a/wechat_staff/components/disProduct/index.js b/wechat_staff/components/disProduct/index.js
index ecc66a4..cc33cd8 100644
--- a/wechat_staff/components/disProduct/index.js
+++ b/wechat_staff/components/disProduct/index.js
@@ -1,39 +1,174 @@
-// components/disProduct/index.js
+import { getCatalogList,getCataLogTagList, getZhongTaiProductPage } from '../../api/index'
Component({
/**
* 缁勪欢鐨勫睘鎬у垪琛�
*/
properties: {
-
+ menuButtonInfo: Object
},
/**
* 缁勪欢鐨勫垵濮嬫暟鎹�
*/
data: {
- showOne: false,
- showTwo: false,
- activeStatus: '0'
+ activeIndex: -1,
+ activeParam: [],
+ tagCodes: [],
+
+ cateList: [],
+ secondCateList: [],
+ datalist: [],
+ pageNum: 1,
+ pageSize: 10,
+ total: 0,
+ query: '',
+ sortType: 'NORMAL',
+ catalogCode: ""
+ },
+ attached() {
+ this.getCatelist()
+ var app = getApp()
+ console.log('globalData', app.globalData);
+ if(app.globalData.catalogCode){
+ this.setData({ catalogCode: app.globalData.catalogCode })
+ setTimeout(() => {
+ console.log('catalogCode', this.data.catalogCode);
+ getApp().globalData.catalogCode = ''
+ }, 2000)
+ }
},
methods: {
- handleDetail(e) {
- wx.navigateTo({
- url: '/pages/detailDis/product',
+ getCatelist(){
+ getCatalogList({
+ catalogCode: 'product_intro'
+ }).then(res => {
+ if(res.data && res.data.length > 0){
+ this.setData({
+ catalogCode: this.data.catalogCode || res.data[0].code,
+ cateList: res.data
+ })
+ this.getTag()
+ setTimeout(() => {
+ this.getList()
+ }, 300)
+ }
})
},
- changeOne(){
- const showOne = !this.data.showOne
- this.setData({showOne})
- this.setData({showTwo: false})
+ getTag() {
+ const catalogCode = this.data.catalogCode
+ getCataLogTagList({
+ catalogCode
+ }).then(res => {
+ this.setData({
+ secondCateList: res.data || [],
+ activeParam: []
+ })
+ })
},
- changeTwo(){
- const showTwo = !this.data.showTwo
- this.setData({showTwo})
- this.setData({showOne: false})
+ bindblur() {
+ console.log('澶卞幓鐒︾偣');
+ this.setData({ pageNum: 1,datalist: [],total: 0})
+ this.getList()
+ },
+ getList() {
+ const { catalogCode,tagCodes, pageNum, pageSize, sortType, query } = this.data
+ getZhongTaiProductPage({
+ catalogCode,pageNum,pageSize,sortType,query,tagCodes
+ }).then(res => {
+ this.setData({
+ datalist: [...this.data.datalist, ...res.data.records],
+ total: res.data.total
+ })
+ })
+ },
+ scrolltolower() {
+ console.log('瑙﹀簳浜嬩欢');
+ const { total, datalist, pageNum } = this.data
+ if(total > datalist.length){
+ this.setData({ pageNum: pageNum + 1 })
+ this.getList()
+ }else{
+ wx.showToast({
+ title: '鏆傛棤鏇村鏁版嵁',
+ icon: 'none'
+ })
+ }
+ },
+ cateClick(e) {
+ const catalogCode = e.currentTarget.dataset.code
+ this.setData({ catalogCode, tagCodes: [] })
+ this.setData({ pageNum: 1,datalist: [],total: 0})
+ this.getTag()
+ this.getList()
},
statusChange(e) {
- const activeStatus = e.currentTarget.dataset.status
- this.setData({activeStatus})
- }
+ const sortType = e.currentTarget.dataset.status
+ this.setData({sortType})
+ this.setData({ pageNum: 1,datalist: [],total: 0})
+ this.getList()
+ },
+ handleDetail(e) {
+ const id = e.currentTarget.dataset.id
+ wx.navigateTo({
+ url: '/pages/detailDis/product?id=' + id,
+ })
+ },
+ tagClick(e) {
+ const code = e.currentTarget.dataset.code
+ const paramIndex = e.currentTarget.dataset.index
+ const { secondCateList, tagCodes, activeParam, activeIndex } = this.data
+ const index = tagCodes.indexOf(code)
+ console.log('code', code);
+ console.log('tagCodes', tagCodes);
+ if(index === -1){
+ // 鍚宲aram閲宑ode閲嶅
+ if(activeParam && activeParam.length > 0){
+ activeParam.forEach(item => {
+ const indexTemp = tagCodes.indexOf(item.labelValueCode)
+ if(indexTemp > -1){
+ tagCodes.splice(indexTemp, 1)
+ }
+ })
+ }
+ tagCodes.push(code)
+ secondCateList[activeIndex].paramIndex = paramIndex
+ secondCateList[activeIndex].paramName = activeParam[paramIndex].labelValueName
+ }else{
+ tagCodes.splice(index, 1)
+ secondCateList[activeIndex].paramIndex = -1
+ secondCateList[activeIndex].paramName = ''
+ }
+ this.setData({ pageNum: 1,datalist: [],total: 0})
+ this.setData({ tagCodes, secondCateList })
+ },
+ changeShowParams(e){
+ const { secondCateList } = this.data
+ const activeIndex = e.currentTarget.dataset.index
+ console.log('activeIndex', activeIndex);
+ console.log('secondCateList', secondCateList);
+ if(activeIndex === this.data.activeIndex){
+ this.setData({ activeIndex: -1, activeParam: [] })
+ }else{
+ this.setData({
+ activeIndex,
+ activeParam: secondCateList[activeIndex].valueVos
+ })
+ }
+ console.log('activeParam', this.data.activeParam);
+ // this.setData({showTwo: false})
+ },
+ cancelParam() {
+ const { secondCateList } = this.data
+ secondCateList.forEach(item => {
+ item.paramIndex = -1
+ item.paramName = ''
+ })
+ this.setData({ tagCodes: [],activeParam: [],secondCateList,activeIndex: -1 })
+ },
+ subParam() {
+ this.setData({ activeParam: [] })
+ this.setData({ pageNum: 1,datalist: [],total: 0})
+ this.getList()
+ },
}
})
diff --git a/wechat_staff/components/disProduct/index.less b/wechat_staff/components/disProduct/index.less
index e3a87fb..ce63b2a 100644
--- a/wechat_staff/components/disProduct/index.less
+++ b/wechat_staff/components/disProduct/index.less
@@ -1,4 +1,6 @@
-.search_wrap{
+
+
+.search_wrap {
width: 670rpx;
height: 72rpx;
margin: 24rpx auto;
@@ -8,25 +10,38 @@
display: flex;
align-items: center;
background-color: #F7F7F7;
- image{
+
+ image {
width: 28rpx;
margin-right: 16rpx;
}
}
-.app{
+.app {
height: 100%;
width: 100%;
+ .home_content{
+ height: 100%;
+ }
}
-.main_content{
+
+.home_top {
+ position: fixed;
+ z-index: 9999;
+ width: 100%;
+ background-color: #fff;
+}
+
+.main_content {
display: flex;
- height: calc( 100% - 120rpx );
- .main_left{
+ padding-top: 120rpx;
+ height: 100%;
+ .main_left {
width: 160rpx;
height: 100%;
- overflow-y: auto;
border-radius: 0rpx 16rpx 16rpx 0rpx;
- .item{
+
+ .item {
width: 160rpx;
height: 100rpx;
background: #F7F7F7;
@@ -37,40 +52,48 @@
justify-content: center;
align-items: center;
}
- .active{
+
+ .active {
background-color: #fff;
font-weight: 500;
font-size: 30rpx;
color: #111111;
}
}
- .main_right{
+
+ .main_right {
flex: 1;
position: relative;
- .query_wrap{
+ height: 100%;
+ .query_wrap {
display: flex;
- .item{
+ width: 100%;
+ .item {
+ width: 50%;
height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
- color: #666666;
- flex: 1;
- .name{
+ color: #666666;
+ .name {
margin-right: 12rpx;
}
}
}
- .query_form{
+
+ .query_form {
position: absolute;
- z-index: 99;
+ z-index: 999;
background-color: #fff;
- .list{
+
+ .list {
width: 100%;
display: flex;
flex-wrap: wrap;
padding: 30rpx 40rpx;
- .item{
+ max-height: 400rpx;
+ overflow: auto;
+ .item {
width: 154rpx;
height: 72rpx;
text-align: center;
@@ -84,18 +107,22 @@
text-overflow: ellipsis;
margin-right: 24rpx;
margin-bottom: 24rpx;
- &:nth-of-type(3n){
+
+ &:nth-of-type(3n) {
margin-right: 0;
}
}
- .active{
+
+ .active {
color: var(--themeColor);
- background: rgba(176,135,113,0.08);
+ background: rgba(176, 135, 113, 0.08);
}
}
- .btns{
+
+ .btns {
display: flex;
- .btn{
+
+ .btn {
width: 296rpx;
height: 88rpx;
background: #E5E5E5;
@@ -104,46 +131,62 @@
justify-content: center;
align-items: center;
}
- .sub{
+
+ .sub {
background: var(--themeColor);
color: #fff;
}
}
}
- .status{
+ .shade{
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0,0,0,.5);
+ z-index: 99;
+ }
+
+ .status {
display: flex;
padding: 0rpx 40rpx;
- margin: 20rpx 0;
align-items: center;
- .active{
+ height: 92rpx;
+ .active {
color: var(--themeColor);
}
- .separate{
+
+ .separate {
margin: 0 12rpx;
width: 1rpx;
height: 28rpx;
background-color: #333333;
}
}
- .goods_list{
+
+ .goods_list {
+ height: calc( 100% - 182rpx);
+ width: 590rpx;
display: flex;
flex-wrap: wrap;
+ box-sizing: border-box;
justify-content: space-between;
padding: 12rpx 40rpx;
- .item{
+ .item {
+ width: 242rpx;
flex-shrink: 0;
margin-bottom: 32rpx;
- .img_wrap{
+ .img_wrap {
width: 242rpx;
- height: 136rpx;
border-radius: 8rpx;
overflow: hidden;
position: relative;
- .img{
- width: 100%;
- height: 100%;
+
+ .img {
+ width: 242rpx;
+ height: 216rpx;
}
- .new{
+
+ .new {
width: 72rpx;
position: absolute;
left: 0;
@@ -151,21 +194,30 @@
z-index: 10;
}
}
- .name{
+
+ .name {
margin: 12rpx 0 8rpx;
+ display: -webkit-box; //灏嗙洅瀛愯浆鎹负寮规�х洅瀛�
+ -webkit-box-orient: vertical; //鏂囨湰鏄剧ず鏂瑰紡锛岄粯璁ゆ按骞�
+ -webkit-line-clamp: 1; //璁剧疆鏄剧ず澶氬皯琛�
+ overflow: hidden;
}
- .info{
+
+ .info {
display: flex;
align-items: center;
color: #666666;
- .icon{
+
+ .icon {
width: 28rpx;
margin-right: 8rpx;
}
- .num{
- margin-right: 16rpx;
+
+ .num {
+ margin-right: 28rpx;
}
- .primary{
+
+ .primary {
color: var(--themeColor);
}
}
diff --git a/wechat_staff/components/disProduct/index.wxml b/wechat_staff/components/disProduct/index.wxml
index d9ce151..3ee90c9 100644
--- a/wechat_staff/components/disProduct/index.wxml
+++ b/wechat_staff/components/disProduct/index.wxml
@@ -1,116 +1,61 @@
<view class="app">
- <view class="search_wrap">
- <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
- <input type="text" placeholder="鎼滅储浜у搧鍚嶇О" />
- </view>
- <view class="main_content">
- <view class="main_left">
- <view class="item active">鍏ㄥ眿瀹氬埗</view>
- <view class="item">鍏ㄥ眿瀹氬埗</view>
- <view class="item">鍏ㄥ眿瀹氬埗</view>
- <view class="item">鍏ㄥ眿瀹氬埗</view>
- <view class="item">鍏ㄥ眿瀹氬埗</view>
- <view class="item">鍏ㄥ眿瀹氬埗</view>
- <view class="item">鍏ㄥ眿瀹氬埗</view>
- <view class="item">鍏ㄥ眿瀹氬埗</view>
- <view class="item">鍏ㄥ眿瀹氬埗</view>
- <view class="item">鍏ㄥ眿瀹氬埗</view>
- <view class="item">鍏ㄥ眿瀹氬埗</view>
- <view class="item">鍏ㄥ眿瀹氬埗</view>
- <view class="item">鍏ㄥ眿瀹氬埗</view>
- <view class="item">鍏ㄥ眿瀹氬埗</view>
- <view class="item">鍏ㄥ眿瀹氬埗</view>
+ <view class="home_top" style="top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px">
+ <view class="search_wrap">
+ <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
+ <input bindconfirm="bindblur" bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="鎼滅储浜у搧鍚嶇О" />
</view>
- <view class="main_right">
- <view class="query_wrap">
- <view class="item" bindtap="changeOne">
- <view class="name">瑁呬慨椋庢牸</view>
- <van-icon name="{{ showOne ? 'arrow-up' : 'arrow-down' }}" />
- </view>
- <view class="item" bindtap="changeTwo">
- <view class="name">绌洪棿鍚嶇О</view>
- <van-icon name="{{ showTwo ? 'arrow-up' : 'arrow-down' }}" />
- </view>
- </view>
- <view wx:if="{{ showOne }}" class="query_form">
- <view class="list">
- <view class="item active">涓滆姖鐢佃</view>
- <view class="item">涓滆姖鍟婄殑鏃舵拻鐨勪唬鐢佃</view>
- <view class="item">涓滆姖鐢佃</view>
- <view class="item">涓滆姖鐢佃</view>
- <view class="item">涓滆姖鐢佃</view>
- </view>
- <view class="btns">
- <view class="btn" bindtap="changeOne">鍙栨秷</view>
- <view class="btn sub">纭</view>
- </view>
- </view>
- <view wx:if="{{ showTwo }}" class="query_form">
- <view class="list">
- <view class="item active">瀹滃</view>
- <view class="item">瀹滃</view>
- <view class="item">瀹滃</view>
- <view class="item">瀹滃</view>
- <view class="item">瀹滃</view>
- </view>
- <view class="btns">
- <view class="btn" bindtap="changeTwo">鍙栨秷</view>
- <view class="btn sub">纭</view>
- </view>
- </view>
- <view class="status">
- <view class="item {{ activeStatus == '0' ? 'active' : '' }}" data-status="0" bindtap="statusChange">榛樿</view>
- <view class="separate"></view>
- <view class="item {{ activeStatus == '1' ? 'active' : '' }}" data-status="1" bindtap="statusChange">鏈�鐑�</view>
- <view class="separate"></view>
- <view class="item {{ activeStatus == '2' ? 'active' : '' }}" data-status="2" bindtap="statusChange">鏈�鏂�</view>
- </view>
- <view class="goods_list">
- <view class="item" bindtap="handleDetail">
- <view class="img_wrap">
- <image src="../../static/icon/test.png" class="img"></image>
- <image wx:if="{{ true }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
- </view>
- <view class="name">閽㈢惔鏇�</view>
- <view class="info">
- <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
- <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
- <text class="num {{true ? 'primary' : ''}}">34</text>
- <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
- <text>1000</text>
+ </view>
+ <view class="home_content" style="padding-top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px;">
+ <view class="main_content">
+ <scroll-view class="main_left" enable-flex scroll-y>
+ <!-- <view class="main_left"> -->
+ <view data-code="{{item.code}}" bindtap="cateClick" wx:for="{{cateList}}" class="item {{ catalogCode == item.code ? 'active' : '' }}">{{ item.name }}</view>
+ <!-- </view> -->
+ </scroll-view>
+ <view class="main_right">
+ <view class="query_wrap">
+ <view data-index="{{index}}" wx:for="{{ secondCateList }}" class="item" bindtap="changeShowParams">
+ <view class="name">{{ item.paramName || item.labelName }}</view>
+ <van-icon name="{{ index == activeIndex ? 'arrow-up' : 'arrow-down' }}" />
</view>
</view>
- <view class="item">
- <view class="img_wrap">
- <image src="../../static/icon/test.png" class="img"></image>
- <image wx:if="{{ true }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
+ <view wx:if="{{ activeParam.length > 0 }}" class="query_form">
+ <view class="list">
+ <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ secondCateList[activeIndex].paramIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
</view>
- <view class="name">閽㈢惔鏇�</view>
- <view class="info">
- <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
- <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
- <text class="num {{true ? 'primary' : ''}}">34</text>
- <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
- <text>1000</text>
+ <view class="btns">
+ <view class="btn" bindtap="cancelParam">鍙栨秷</view>
+ <view class="btn sub" bindtap="subParam">纭</view>
</view>
</view>
- <view class="item">
- <view class="img_wrap">
- <image src="../../static/icon/test.png" class="img"></image>
- <image wx:if="{{ true }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
- </view>
- <view class="name">閽㈢惔鏇�</view>
- <view class="info">
- <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
- <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
- <text class="num {{true ? 'primary' : ''}}">34</text>
- <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
- <text>1000</text>
- </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="separate"></view>
+ <view class="item {{ sortType == 'HOT' ? 'active' : '' }}" data-status="HOT" bindtap="statusChange">鏈�鐑�</view>
+ <view class="separate"></view>
+ <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" 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">
+ <view class="img_wrap">
+ <image src="{{ item.coverImage }}" class="img" mode="aspectFit"></image>
+ <image wx:if="{{ item.isNew }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
+ </view>
+ <view class="name">{{ item.title }}</view>
+ <view class="info">
+ <image wx:if="{{ !item.isCollection }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
+ <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>
+ </view>
+ </view>
+ </scroll-view>
</view>
</view>
</view>
+
</view>
\ No newline at end of file
diff --git a/wechat_staff/components/disProduct/index.wxss b/wechat_staff/components/disProduct/index.wxss
index e67a710..e06d6ca 100644
--- a/wechat_staff/components/disProduct/index.wxss
+++ b/wechat_staff/components/disProduct/index.wxss
@@ -17,14 +17,23 @@
height: 100%;
width: 100%;
}
+.app .home_content {
+ height: 100%;
+}
+.home_top {
+ position: fixed;
+ z-index: 9999;
+ width: 100%;
+ background-color: #fff;
+}
.main_content {
display: flex;
- height: calc(100% - 120rpx);
+ padding-top: 120rpx;
+ height: 100%;
}
.main_content .main_left {
width: 160rpx;
height: 100%;
- overflow-y: auto;
border-radius: 0rpx 16rpx 16rpx 0rpx;
}
.main_content .main_left .item {
@@ -47,24 +56,26 @@
.main_content .main_right {
flex: 1;
position: relative;
+ height: 100%;
}
.main_content .main_right .query_wrap {
display: flex;
+ width: 100%;
}
.main_content .main_right .query_wrap .item {
+ width: 50%;
height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
color: #666666;
- flex: 1;
}
.main_content .main_right .query_wrap .item .name {
margin-right: 12rpx;
}
.main_content .main_right .query_form {
position: absolute;
- z-index: 99;
+ z-index: 999;
background-color: #fff;
}
.main_content .main_right .query_form .list {
@@ -72,6 +83,8 @@
display: flex;
flex-wrap: wrap;
padding: 30rpx 40rpx;
+ max-height: 400rpx;
+ overflow: auto;
}
.main_content .main_right .query_form .list .item {
width: 154rpx;
@@ -111,11 +124,18 @@
background: var(--themeColor);
color: #fff;
}
+.main_content .main_right .shade {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 99;
+}
.main_content .main_right .status {
display: flex;
padding: 0rpx 40rpx;
- margin: 20rpx 0;
align-items: center;
+ height: 92rpx;
}
.main_content .main_right .status .active {
color: var(--themeColor);
@@ -127,25 +147,28 @@
background-color: #333333;
}
.main_content .main_right .goods_list {
+ height: calc(100% - 182rpx);
+ width: 590rpx;
display: flex;
flex-wrap: wrap;
+ box-sizing: border-box;
justify-content: space-between;
padding: 12rpx 40rpx;
}
.main_content .main_right .goods_list .item {
+ width: 242rpx;
flex-shrink: 0;
margin-bottom: 32rpx;
}
.main_content .main_right .goods_list .item .img_wrap {
width: 242rpx;
- height: 136rpx;
border-radius: 8rpx;
overflow: hidden;
position: relative;
}
.main_content .main_right .goods_list .item .img_wrap .img {
- width: 100%;
- height: 100%;
+ width: 242rpx;
+ height: 216rpx;
}
.main_content .main_right .goods_list .item .img_wrap .new {
width: 72rpx;
@@ -156,6 +179,10 @@
}
.main_content .main_right .goods_list .item .name {
margin: 12rpx 0 8rpx;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 1;
+ overflow: hidden;
}
.main_content .main_right .goods_list .item .info {
display: flex;
@@ -167,7 +194,7 @@
margin-right: 8rpx;
}
.main_content .main_right .goods_list .item .info .num {
- margin-right: 16rpx;
+ margin-right: 28rpx;
}
.main_content .main_right .goods_list .item .info .primary {
color: var(--themeColor);
diff --git a/wechat_staff/components/disRealpic/index.js b/wechat_staff/components/disRealpic/index.js
index 17259f9..034a81c 100644
--- a/wechat_staff/components/disRealpic/index.js
+++ b/wechat_staff/components/disRealpic/index.js
@@ -1,24 +1,177 @@
-// components/disCase/index.js
+import { getCataLogTagList, getZhongTaiRealcasePage, actionDo } from '../../api/index'
Component({
/**
* 缁勪欢鐨勫睘鎬у垪琛�
*/
properties: {
-
+ menuButtonInfo: Object
},
data: {
- showParams: false,
- activeStatus: '0'
+ activeIndex: -1,
+ activeParam: [],
+ selParam: '',
+ tagCodes: [],
+
+
+ cateList: [],
+ dataList: [],
+ pageNum: 1,
+ pageSize: 10,
+ query: '',
+ sortType: 'NORMAL',
+ catalogCode: 'real_case'
+ },
+ attached() {
+ this.getCatelist()
},
methods: {
- handleDetail(e) {
- wx.navigateTo({
- url: '/pages/detailDis/realpic',
+ getCatelist(){
+ const { catalogCode } = this.data
+ getCataLogTagList({
+ catalogCode
+ }).then(res => {
+ if(res.data && res.data.length > 0){
+ this.setData({
+ cateList: res.data
+ })
+ setTimeout(() => {
+ this.getList()
+ }, 300)
+ }
})
},
- changeShowParams(){
- const showParams = !this.data.showParams
- this.setData({showParams})
+ getList() {
+ const { sortType, query, tagCodes, pageNum, pageSize,catalogCode } = this.data
+ getZhongTaiRealcasePage({
+ catalogCode,tagCodes,pageNum,pageSize, sortType,query
+ }).then(res => {
+ this.setData({
+ dataList: [...this.data.dataList, ...res.data.records],
+ total: res.data.total,
+ })
+ })
+ },
+ scrolltolower() {
+ console.log('瑙﹀簳浜嬩欢');
+ const { total, dataList, pageNum } = this.data
+ if(total > dataList.length){
+ this.setData({ pageNum: pageNum + 1 })
+ this.getList()
+ }else{
+ wx.showToast({
+ title: '鏆傛棤鏇村鏁版嵁',
+ icon: 'none'
+ })
+ }
+ },
+ videoClick(e) {
+ const { videourl } = e.currentTarget.dataset
+ wx.previewMedia({
+ sources: [{ url: videourl, type: 'video' }]
+ })
+ },
+ priviewFull(e){
+ const item = e.currentTarget.dataset.item
+ console.log('item', item);
+ wx.navigateTo({
+ url: '/pages/webView/index?link=' + item.openContent,
+ success: function(res) {
+ // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ res.eventChannel.emit('acceptDataFromOpenerPage', { link: item.openContent, title: item.title })
+ }
+ })
+ },
+ statusChange(e) {
+ const sortType = e.currentTarget.dataset.status
+ this.setData({sortType})
+ this.setData({ pageNum: 1,dataList: [],total: 0})
+ this.getList()
+ },
+ handleAction(e){
+ const actionType = e.currentTarget.dataset.code
+ const id = e.currentTarget.dataset.id
+ actionDo({
+ actionType,
+ id
+ }).then(res => {
+ this.getList()
+ })
+ },
+ handleDetail(e) {
+ const item = e.currentTarget.dataset.item
+ console.log('item', item);
+ if(item.openType == 'video'){
+ wx.previewMedia({
+ sources: [{ url: item.openContent, type: 'video' }]
+ })
+ }
+ if(item.openType == 'link'){
+ wx.navigateTo({
+ url: '/pages/webView/index?link=' + item.openContent,
+ })
+ }
+ if(item.openType == 'page'){
+ wx.navigateTo({
+ url: '/pages/detailDis/realpic?id=' + item.id,
+ })
+ }
+ },
+ tagClick(e) {
+ const code = e.currentTarget.dataset.code
+ const paramIndex = e.currentTarget.dataset.index
+ const { cateList, tagCodes, activeParam, activeIndex } = this.data
+ const index = tagCodes.indexOf(code)
+
+ if(index === -1){
+ if(activeParam && activeParam.length > 0){
+ activeParam.forEach(item => {
+ const indexTemp = tagCodes.indexOf(item.labelValueCode)
+ if(indexTemp > -1){
+ tagCodes.splice(indexTemp, 1)
+ }
+ })
+ }
+ tagCodes.push(code)
+ cateList[activeIndex].paramIndex = paramIndex
+ cateList[activeIndex].paramName = activeParam[paramIndex].labelValueName
+ }else{
+ tagCodes.splice(index, 1)
+ cateList[activeIndex].paramIndex = -1
+ cateList[activeIndex].paramName = ''
+ }
+ this.setData({ pageNum: 1,dataList: [],total: 0})
+ this.setData({ tagCodes, cateList })
+ console.log('tagCodes', tagCodes);
+ },
+ cancelParam() {
+ const { cateList } = this.data
+ cateList.forEach(item => {
+ item.paramIndex = -1
+ item.paramName = ''
+ })
+ this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 })
+ },
+ bindblur() {
+ this.setData({ pageNum: 1,dataList: [],total: 0})
+ this.getList()
+ },
+ subParam() {
+ this.setData({ activeParam: [] })
+ this.setData({ pageNum: 1,dataList: [],total: 0})
+ this.getList()
+ },
+ changeShowParams(e){
+ const { cateList } = this.data
+ const activeIndex = e.currentTarget.dataset.index
+ if(activeIndex === this.data.activeIndex){
+ this.setData({ activeIndex: -1, activeParam: [], selParam: '' })
+ }else{
+ this.setData({
+ activeIndex,
+ activeParam: cateList[activeIndex].valueVos
+ })
+ }
+
// this.setData({showTwo: false})
},
changeTwo(){
@@ -26,9 +179,5 @@
this.setData({showTwo})
this.setData({showOne: false})
},
- statusChange(e) {
- const activeStatus = e.currentTarget.dataset.status
- this.setData({activeStatus})
- }
}
})
diff --git a/wechat_staff/components/disRealpic/index.less b/wechat_staff/components/disRealpic/index.less
index 409cd72..6ed5ae6 100644
--- a/wechat_staff/components/disRealpic/index.less
+++ b/wechat_staff/components/disRealpic/index.less
@@ -18,35 +18,56 @@
.app {
height: 100%;
width: 100%;
+ .home_content{
+ height: 100%;
+ }
}
+.home_top{
+ position: fixed;
+ z-index: 9999;
+ width: 100%;
+ background-color: #fff;
+}
+.main_content{
+ height: 100%;
+ padding-top: 120rpx;
-.main_content {
- height: calc(100% - 120rpx);
+ .query_wrap_scroll {
+ width: 750rpx;
+ padding: 0 40rpx;
+ }
+
.query_wrap {
display: flex;
- padding: 0 16rpx;
+
.item {
+ margin-right: 36rpx;
height: 88rpx;
display: flex;
+ flex-shrink: 0;
align-items: center;
justify-content: center;
color: #666666;
- flex: 1;
+
.name {
margin-right: 6rpx;
}
}
}
+
.query_param {
position: absolute;
- z-index: 99;
+ z-index: 999;
background-color: #fff;
width: 100%;
+
.list {
width: 100%;
display: flex;
flex-wrap: wrap;
padding: 30rpx 40rpx;
+ max-height: 400rpx;
+ overflow: auto;
.item {
width: 202rpx;
height: 72rpx;
@@ -66,13 +87,16 @@
margin-right: 0;
}
}
+
.active {
color: var(--themeColor);
background: rgba(176, 135, 113, 0.08);
}
}
+
.btns {
display: flex;
+
.btn {
flex: 1;
height: 88rpx;
@@ -89,13 +113,19 @@
}
}
}
+ .shade{
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0,0,0,.5);
+ z-index: 99;
+ }
.status {
display: flex;
padding: 0rpx 40rpx;
- margin: 20rpx 0;
+ height: 100rpx;
align-items: center;
-
.active {
color: var(--themeColor);
}
@@ -107,59 +137,98 @@
background-color: #333333;
}
}
- .goods_list{
+
+ .goods_list {
padding: 12rpx 40rpx;
+ height: calc( 100% - 188rpx);
+ box-sizing: border-box;
display: flex;
flex-wrap: wrap;
- justify-content: space-between;
- .item{
+ justify-content: space-around;
+ .item {
width: 324rpx;
- margin-bottom: 60rpx;
- .img_wrap{
+ margin-bottom: 32rpx;
+
+ .img_wrap {
width: 100%;
height: 182rpx;
border-radius: 8rpx;
overflow: hidden;
position: relative;
- .img{
+
+ .play {
+ width: 60rpx;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ z-index: 1;
+ }
+
+ .full {
+ position: absolute;
+ top: 32rpx;
+ right: 32rpx;
+ font-size: 20rpx;
+ color: rgba(255, 255, 255, 0.8);
+ width: 112rpx;
+ height: 42rpx;
+ background: rgba(0, 0, 0, 0.54);
+ border-radius: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+ .icon {
+ width: 24rpx;
+ margin-right: 4rpx;
+ }
+ }
+
+ .img {
width: 100%;
height: 100%;
}
- .tag{
- padding: 0 10rpx;
- height: 46rpx;
- line-height: 46rpx;
- text-align: center;
- background: rgba(0,0,0,0.4);
- border-radius: 8rpx;
+
+ .new {
+ width: 72rpx;
position: absolute;
- left: 12rpx;
- top: 16rpx;
- color: #fff;
- font-size: 24rpx;
+ left: 0;
+ top: 0;
z-index: 10;
}
}
- .name{
+
+ .content {
+ display: flex;
+ justify-content: space-between;
+ padding: 0 10rpx;
+ }
+
+ .name {
margin: 12rpx 0 8rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
}
- .info{
+
+ .info {
display: flex;
align-items: center;
color: #666666;
margin-left: 12rpx;
- .icon{
+
+ .icon {
width: 28rpx;
margin-right: 8rpx;
}
- .num{
+
+ .num {
margin-right: 28rpx;
}
- .primary{
+
+ .primary {
color: var(--themeColor);
}
}
diff --git a/wechat_staff/components/disRealpic/index.wxml b/wechat_staff/components/disRealpic/index.wxml
index b770866..7d967f4 100644
--- a/wechat_staff/components/disRealpic/index.wxml
+++ b/wechat_staff/components/disRealpic/index.wxml
@@ -1,119 +1,66 @@
<view class="app">
- <view class="search_wrap">
- <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
- <input type="text" placeholder="鎼滅储浜у搧鍚嶇О" />
+ <view class="home_top" style="top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px">
+ <view class="search_wrap">
+ <image src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
+ <input bindconfirm="bindblur" bindblur="bindblur" model:value="{{ query }}" type="text" placeholder="鎼滅储瀹炴櫙鍚嶇О" />
+ </view>
</view>
+
<!-- -->
- <view class="main_content">
- <view class="query_wrap">
- <view class="item" bindtap="changeShowParams">
- <view class="name">椋庢牸</view>
- <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" />
- </view>
- <view class="item" bindtap="changeShowParams">
- <view class="name">绌洪棿</view>
- <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" />
- </view>
- <view class="item" bindtap="changeShowParams">
- <view class="name">闂村悕</view>
- <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" />
- </view>
- <view class="item" bindtap="changeShowParams">
- <view class="name">闂寸О</view>
- <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" />
- </view>
- <view class="item" bindtap="changeShowParams">
- <view class="name">绌虹О</view>
- <van-icon name="{{ showParams ? 'arrow-up' : 'arrow-down' }}" />
- </view>
- </view>
- <view wx:if="{{ showParams }}" class="query_param">
- <view class="list">
- <view class="item active">涓滆姖鐢佃</view>
- <view class="item">涓滆姖鍟婄殑鏃舵拻鐨勪唬鐢佃</view>
- <view class="item">涓滆姖鐢佃</view>
- <view class="item">涓滆姖鐢佃</view>
- <view class="item">涓滆姖鐢佃</view>
- </view>
- <view class="btns">
- <view class="btn" bindtap="changeShowParams">鍙栨秷</view>
- <view class="btn sub">纭</view>
- </view>
- </view>
- <view class="status">
- <view class="item {{ activeStatus == '0' ? 'active' : '' }}" data-status="0" bindtap="statusChange">榛樿</view>
- <view class="separate"></view>
- <view class="item {{ activeStatus == '1' ? 'active' : '' }}" data-status="1" bindtap="statusChange">鏈�鐑�</view>
- <view class="separate"></view>
- <view class="item {{ activeStatus == '2' ? 'active' : '' }}" data-status="2" bindtap="statusChange">鏈�鏂�</view>
- </view>
- <!-- goods_list -->
- <view class="goods_list">
- <view class="item" bindtap="handleDetail">
- <view class="img_wrap">
- <image src="../../static/icon/test.png" class="img"></image>
- <view class="tag">瀹炴媿</view>
- </view>
- <view class="content">
- <view class="name">閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸</view>
- <view class="info">
- <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
- <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
- <text class="num {{true ? 'primary' : ''}}">34</text>
- <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
- <text>1000</text>
+ <view class="home_content" style="padding-top:{{ menuButtonInfo.top + menuButtonInfo.height + 6 }}px;">
+ <view class="main_content">
+ <scroll-view class="query_wrap_scroll" scroll-x>
+ <view class="query_wrap">
+ <view data-index="{{ index }}" wx:for="{{ cateList }}" class="item" bindtap="changeShowParams">
+ <view class="name">{{ item.paramName || item.labelName }}</view>
+ <van-icon name="{{ activeIndex === index ? 'arrow-up' : 'arrow-down' }}" />
</view>
</view>
- </view>
- <view class="item">
- <view class="img_wrap">
- <image src="../../static/icon/test.png" class="img"></image>
- <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
+ </scroll-view>
+ <!-- param -->
+ <view wx:if="{{ activeParam && activeParam.length > 0 }}" class="query_param">
+ <view class="list">
+ <view data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ cateList[activeIndex].paramIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
</view>
- <view class="content">
- <view class="name">閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸</view>
+ <view class="btns">
+ <view class="btn" bindtap="cancelParam">鍙栨秷</view>
+ <view bindtap="subParam" class="btn sub">纭</view>
+ </view>
+ </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="separate"></view>
+ <view class="item {{ sortType == 'HOT' ? 'active' : '' }}" data-status="HOT" bindtap="statusChange">鏈�鐑�</view>
+ <view class="separate"></view>
+ <view class="item {{ sortType == 'LATEST' ? 'active' : '' }}" data-status="LATEST" bindtap="statusChange">鏈�鏂�</view>
+ </view>
+ <!-- goods_list -->
+ <scroll-view bindscrolltolower="scrolltolower" scroll-y enable-passive enable-flex class="goods_list">
+ <view wx:for="{{ dataList }}" data-item="{{item}}" class="item" bindtap="handleDetail">
+ <view class="img_wrap">
+ <image src="{{ item.coverImage }}" class="img"></image>
+ <view wx:if="{{ item.openType == 'link' }}" data-item="{{item}}" bindtap="priviewFull" class="full">
+ <image class="icon" src="../../static/icon/ic_720.png" mode="widthFix"></image>
+ <text>鍏ㄦ櫙</text>
+ </view>
+ <image wx:if="{{ item.openType == 'video' }}" bindtap="videoClick" data-videourl="{{ item.openContent }}" class="play" src="../../static/icon/ic_play.png" mode="widthFix"></image>
+ <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
+ </view>
+ <view class="content">
+ <view class="name">{{ item.title }}</view>
+ </view>
<view class="info">
- <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
- <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
- <text class="num {{true ? 'primary' : ''}}">34</text>
+ <image wx:if="{{ !item.collection }}" data-code="like" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
+ <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.collection ? 'primary' : ''}}">{{ item.collectCount }}</text>
<image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
- <text>1000</text>
+ <text>{{ item.viewCount }}</text>
</view>
</view>
- </view>
- <view class="item">
- <view class="img_wrap">
- <image src="../../static/icon/test.png" class="img"></image>
- <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
- </view>
- <view class="content">
- <view class="name">閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸</view>
- <view class="info">
- <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
- <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
- <text class="num {{true ? 'primary' : ''}}">34</text>
- <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
- <text>1000</text>
- </view>
- </view>
- </view>
- <view class="item">
- <view class="img_wrap">
- <image src="../../static/icon/test.png" class="img"></image>
- <image wx:if="{{ false }}" class="new" src="../../static/icon/chanpin_ic_new@2x.png" mode="widthFix"></image>
- </view>
- <view class="content">
- <view class="name">閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸閽㈢惔鏇查挗鐞存洸</view>
- <view class="info">
- <image wx:if="{{ false }}" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
- <image wx:else="" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
- <text class="num {{true ? 'primary' : ''}}">34</text>
- <image class="icon" src="../../static/icon/zixun_ic_liulan.png" mode="widthFix"></image>
- <text>1000</text>
- </view>
- </view>
- </view>
+ </scroll-view>
</view>
</view>
+
</view>
\ No newline at end of file
diff --git a/wechat_staff/components/disRealpic/index.wxss b/wechat_staff/components/disRealpic/index.wxss
index afcbd96..44f0e3c 100644
--- a/wechat_staff/components/disRealpic/index.wxss
+++ b/wechat_staff/components/disRealpic/index.wxss
@@ -17,27 +17,41 @@
height: 100%;
width: 100%;
}
+.app .home_content {
+ height: 100%;
+}
+.home_top {
+ position: fixed;
+ z-index: 9999;
+ width: 100%;
+ background-color: #fff;
+}
.main_content {
- height: calc(100% - 120rpx);
+ height: 100%;
+ padding-top: 120rpx;
+}
+.main_content .query_wrap_scroll {
+ width: 750rpx;
+ padding: 0 40rpx;
}
.main_content .query_wrap {
display: flex;
- padding: 0 16rpx;
}
.main_content .query_wrap .item {
+ margin-right: 36rpx;
height: 88rpx;
display: flex;
+ flex-shrink: 0;
align-items: center;
justify-content: center;
color: #666666;
- flex: 1;
}
.main_content .query_wrap .item .name {
margin-right: 6rpx;
}
.main_content .query_param {
position: absolute;
- z-index: 99;
+ z-index: 999;
background-color: #fff;
width: 100%;
}
@@ -46,6 +60,8 @@
display: flex;
flex-wrap: wrap;
padding: 30rpx 40rpx;
+ max-height: 400rpx;
+ overflow: auto;
}
.main_content .query_param .list .item {
width: 202rpx;
@@ -85,10 +101,17 @@
background: var(--themeColor);
color: #fff;
}
+.main_content .shade {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 99;
+}
.main_content .status {
display: flex;
padding: 0rpx 40rpx;
- margin: 20rpx 0;
+ height: 100rpx;
align-items: center;
}
.main_content .status .active {
@@ -102,13 +125,15 @@
}
.main_content .goods_list {
padding: 12rpx 40rpx;
+ height: calc(100% - 188rpx);
+ box-sizing: border-box;
display: flex;
flex-wrap: wrap;
- justify-content: space-between;
+ justify-content: space-around;
}
.main_content .goods_list .item {
width: 324rpx;
- margin-bottom: 60rpx;
+ margin-bottom: 32rpx;
}
.main_content .goods_list .item .img_wrap {
width: 100%;
@@ -117,24 +142,48 @@
overflow: hidden;
position: relative;
}
+.main_content .goods_list .item .img_wrap .play {
+ width: 60rpx;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ z-index: 1;
+}
+.main_content .goods_list .item .img_wrap .full {
+ position: absolute;
+ top: 32rpx;
+ right: 32rpx;
+ font-size: 20rpx;
+ color: rgba(255, 255, 255, 0.8);
+ width: 112rpx;
+ height: 42rpx;
+ background: rgba(0, 0, 0, 0.54);
+ border-radius: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.main_content .goods_list .item .img_wrap .full .icon {
+ width: 24rpx;
+ margin-right: 4rpx;
+}
.main_content .goods_list .item .img_wrap .img {
width: 100%;
height: 100%;
}
-.main_content .goods_list .item .img_wrap .tag {
- padding: 0 10rpx;
- height: 46rpx;
- line-height: 46rpx;
- text-align: center;
- background: rgba(0, 0, 0, 0.4);
- border-radius: 8rpx;
+.main_content .goods_list .item .img_wrap .new {
+ width: 72rpx;
position: absolute;
- left: 12rpx;
- top: 16rpx;
- color: #fff;
- font-size: 24rpx;
+ left: 0;
+ top: 0;
z-index: 10;
}
+.main_content .goods_list .item .content {
+ display: flex;
+ justify-content: space-between;
+ padding: 0 10rpx;
+}
.main_content .goods_list .item .name {
margin: 12rpx 0 8rpx;
white-space: nowrap;
diff --git a/wechat_staff/package-lock.json b/wechat_staff/package-lock.json
index 6a01a9b..1a3fc03 100644
--- a/wechat_staff/package-lock.json
+++ b/wechat_staff/package-lock.json
@@ -1,33 +1,54 @@
{
"name": "wechat_staff",
"version": "1.0.0",
- "lockfileVersion": 1,
+ "lockfileVersion": 3,
"requires": true,
- "dependencies": {
- "@vant/weapp": {
+ "packages": {
+ "": {
+ "name": "wechat_staff",
+ "version": "1.0.0",
+ "license": "ISC",
+ "dependencies": {
+ "@vant/weapp": "^1.11.6",
+ "hy-event-store": "^1.3.1",
+ "miniprogram-sm-crypto": "^0.3.13",
+ "moment": "^2.30.1",
+ "mp-html": "^2.5.0"
+ },
+ "devDependencies": {}
+ },
+ "node_modules/@vant/weapp": {
"version": "1.11.6",
"resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.11.6.tgz",
"integrity": "sha512-a3heReWYT2gNdsyj6x1hBwsM8V8NrjcPAmle86NH2CD2V/i/h0le75piW6KntSfOPCwekVWMBKhysNrBpJeKdw=="
},
- "jsbn": {
+ "node_modules/hy-event-store": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/hy-event-store/-/hy-event-store-1.3.1.tgz",
+ "integrity": "sha512-uD+14mz4ONiAs9cX/csjUJ2pHTPFciE3JvIbZ+lsbaXopZWbnETEjwJ0a4l5GqNGcltcW3gJjlnUXCJPBoABfg=="
+ },
+ "node_modules/jsbn": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/jsbn/-/jsbn-1.1.0.tgz",
"integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A=="
},
- "miniprogram-sm-crypto": {
+ "node_modules/miniprogram-sm-crypto": {
"version": "0.3.13",
"resolved": "https://registry.npmmirror.com/miniprogram-sm-crypto/-/miniprogram-sm-crypto-0.3.13.tgz",
"integrity": "sha512-H7qwbCEmIXZzekCSgEWeHh1mb4cnz0E42YH3U5xqpOaJBB2Sj9ySq0hTGv0f+Jwo5SknABR6fw+EtjnMyJ/O/Q==",
- "requires": {
+ "dependencies": {
"jsbn": "^1.1.0"
}
},
- "moment": {
+ "node_modules/moment": {
"version": "2.30.1",
"resolved": "https://registry.npmmirror.com/moment/-/moment-2.30.1.tgz",
- "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how=="
+ "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
+ "engines": {
+ "node": "*"
+ }
},
- "mp-html": {
+ "node_modules/mp-html": {
"version": "2.5.0",
"resolved": "https://registry.npmmirror.com/mp-html/-/mp-html-2.5.0.tgz",
"integrity": "sha512-uvBH5tIaDIlj8qaxsvNXU3RKX0jvXOo3J6FAi/notUv/ds6j79UUTE82aDkxxUk0eLUU0CiCqMrR7WWnytk30Q=="
diff --git a/wechat_staff/package.json b/wechat_staff/package.json
index 9f4b08b..a19af05 100644
--- a/wechat_staff/package.json
+++ b/wechat_staff/package.json
@@ -6,7 +6,8 @@
"@vant/weapp": "^1.11.6",
"miniprogram-sm-crypto": "^0.3.13",
"moment": "^2.30.1",
- "mp-html": "^2.5.0"
+ "mp-html": "^2.5.0",
+ "hy-event-store": "^1.3.1"
},
"devDependencies": {},
"scripts": {
diff --git a/wechat_staff/pages/detailDis/case.js b/wechat_staff/pages/detailDis/case.js
index 8adf1e3..09050e9 100644
--- a/wechat_staff/pages/detailDis/case.js
+++ b/wechat_staff/pages/detailDis/case.js
@@ -1,11 +1,12 @@
-// pages/detailDis/case.js
+import { actionDo, getWholecaseInfo } from '../../api/index'
Page({
/**
* 椤甸潰鐨勫垵濮嬫暟鎹�
*/
data: {
- bottomLift: 0
+ bottomLift: 0,
+ showShare: false
},
/**
@@ -16,13 +17,72 @@
this.setData({
bottomLift: app.bottomLift
})
+ this.getDetail(options.id)
+ actionDo({
+ actionType: 'view',
+ id: options.id
+ })
+ const member = wx.getStorageSync('member')
+ this.setData({id: options.id, member})
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
- */
- onReady() {
-
+ priviewFull(){
+ let { panorama: link, title } = this.data.info
+ wx.navigateTo({
+ url: '/pages/webView/index',
+ success: function(res) {
+ // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ res.eventChannel.emit('acceptDataFromOpenerPage', { link, title })
+ }
+ })
+ },
+ openShare() {
+ this.setData({showShare: true})
+ },
+ handleShare() {
+ console.log('鐐瑰嚮浜嗗垎浜�');
+ actionDo({ actionType: 'share', id: this.data.info.id })
+ },
+ // onShareAppMessage: function () {
+ // // let { productDetail, userInfo } = this.data
+ // return {
+ // title: productDetail.title,
+ // path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0'
+ // }
+ // },
+ handleAction(e){
+ const actionType = e.currentTarget.dataset.code
+ const { info } = this.data
+ actionDo({
+ actionType,
+ id: this.data.info.id
+ }).then(res => {
+ info.collection = !info.collection
+ this.setData({info})
+ wx.showToast({
+ title: actionType == 'collect' ? '鏀惰棌鎴愬姛' : '鍙栨秷鏀惰棌',
+ })
+ })
+ },
+ getDetail(id) {
+ getWholecaseInfo({id}).then(res => {
+ this.setData({ info: res.data })
+ wx.setNavigationBarTitle({
+ title: res.data.title
+ })
+ })
+ },
+ handleDesign() {
+ wx.navigateTo({
+ url: '/pages/design/design',
+ })
+ },
+ playVideo() {
+ wx.previewMedia({
+ sources: [{ url: this.data.info.video, type: 'video' }]
+ })
+ },
+ onClose() {
+ this.setData({showShare: false})
},
/**
diff --git a/wechat_staff/pages/detailDis/case.json b/wechat_staff/pages/detailDis/case.json
index 69c292b..9a09920 100644
--- a/wechat_staff/pages/detailDis/case.json
+++ b/wechat_staff/pages/detailDis/case.json
@@ -1,4 +1,8 @@
{
- "usingComponents": {},
- "navigationBarTitleText": "妗堜緥璇︽儏"
+ "usingComponents": {
+ "van-popup": "@vant/weapp/popup/index",
+ "mp-html": "mp-html",
+ "buoyClient": "../../components/buoyClient/index"
+ },
+ "navigationBarTitleText": ""
}
\ No newline at end of file
diff --git a/wechat_staff/pages/detailDis/case.less b/wechat_staff/pages/detailDis/case.less
index e77c3dd..f9e84c7 100644
--- a/wechat_staff/pages/detailDis/case.less
+++ b/wechat_staff/pages/detailDis/case.less
@@ -15,9 +15,28 @@
}
.fullview_wrap {
+ position: relative;
.banner {
width: 100%;
border-radius: 8rpx;
+ }
+ .full{
+ position: absolute;
+ top: 32rpx;
+ right: 32rpx;
+ font-size: 20rpx;
+ color: rgba(255,255,255,0.8);
+ width: 112rpx;
+ height: 42rpx;
+ background: rgba(0,0,0,0.54);
+ border-radius: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ .icon{
+ width: 24rpx;
+ margin-right: 4rpx;
+ }
}
}
@@ -50,13 +69,31 @@
.list{
.item{
.content{
+ margin-top: 20rpx;
font-weight: 300;
font-size: 28rpx;
color: #333333;
}
+ .img{
+ width: 100%;
+ }
}
}
+}
+.spaceList{
+ .item{
+ margin-bottom: 60rpx;
+ .name{
+ font-weight: 600;
+ font-size: 36rpx;
+ color: #111111;
+ }
+ .img{
+ width: 100%;
+ border-radius: 8rpx;
+ }
+ }
}
.footer {
position: fixed;
@@ -100,4 +137,34 @@
width: 44rpx;
}
}
+}
+.share_modal{
+ .btns{
+ display: flex;
+ min-height: 320rpx;
+ display: flex;
+ align-items: center;
+ .item{
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ flex: 1;
+ font-size: 26rpx;
+ background-color: #fff;
+ image{
+ width: 80rpx;
+ height: 80rpx;
+ margin-bottom: 10rpx;
+ }
+ }
+ }
+ .cancel{
+ height: 80rpx;
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border: 1rpx solid #e5e5e5;
+ }
}
\ No newline at end of file
diff --git a/wechat_staff/pages/detailDis/case.wxml b/wechat_staff/pages/detailDis/case.wxml
index 67b4fbe..768b6f1 100644
--- a/wechat_staff/pages/detailDis/case.wxml
+++ b/wechat_staff/pages/detailDis/case.wxml
@@ -1,44 +1,40 @@
<view class="container">
- <view class="main_title">绠�娆ч鏍�70m虏涓ゅ眳瀹�</view>
- <view class="time">鍙戝竷鏃堕棿锛�2021-08-21 10:0</view>
+ <buoyClient showPurpose="1" />
+ <view class="main_title">{{ info.title }}</view>
+ <view class="time">鍙戝竷鏃堕棿锛歿{ info.publishDt }}</view>
<view class="fullview_wrap">
- <image class="banner" src="../../static/icon/test.png" mode="widthFix"></image>
+ <view bindtap="priviewFull" wx:if="{{ info.panorama }}" class="full">
+ <image class="icon" src="../../static/icon/ic_720.png" mode="widthFix"></image>
+ <text>鍏ㄦ櫙</text>
+ </view>
+ <image class="banner" src="{{ info.coverImage }}" mode="widthFix"></image>
</view>
<view class="h1">甯冪疆鍥�</view>
- <image class="img" src="../../static/icon/test.png" mode="widthFix"></image>
+ <image class="img" src="{{ info.layoutUlr }}" mode="widthFix"></image>
<view class="analysis">
<view class="h2">妗堜緥瑙f瀽</view>
- <view class="text">涓轰繚鐣欏叆鎴风殑鍌ㄧ撼绌洪棿锛屽皢鍗敓闂寸殑闂ㄧЩ鍔ㄤ竴娈佃窛绂伙紝鏂逛究浜嗗叆鎴疯吹鐨勮缃紝鍌ㄧ墿闂村皝闂仛涓诲崸琛e附闂达紝澧炲姞绌洪棿浣跨敤鐜囧拰鎴垮眿鏁翠綋鎬с�傚鍘呯殑鏍煎眬璁捐澧炲姞浜嗙┖闂寸殑灞傛鎰熴��</view>
+ <view class="text">{{ info.caseInfo }}</view>
</view>
<view class="list">
- <view class="item">
- <view class="h1">01.瀹㈠巺</view>
- <image src="" mode="widthFix" />
- <view class="content">鐪嬫儻浜嗘暣榻愬垝涓�鐨勭幓鐠冨悐鏌滐紝閲戣壊妗嗗瀷鐜婚棬鍚婃煖鍙堟槸涓嶄竴鏍风殑瀹$編锛岃竟妗嗗井鏂滃垏鍏ワ紝宸﹀彸瀵圭О鍒嗗竷锛岀伅鍏夋槧琛笅锛岀編鍛崇粴涓藉濮�</view>
- </view>
- <view class="item">
- <view class="h1">01.瀹㈠巺</view>
- <image src="" mode="widthFix" />
- <view class="content">鐪嬫儻浜嗘暣榻愬垝涓�鐨勭幓鐠冨悐鏌滐紝閲戣壊妗嗗瀷鐜婚棬鍚婃煖鍙堟槸涓嶄竴鏍风殑瀹$編锛岃竟妗嗗井鏂滃垏鍏ワ紝宸﹀彸瀵圭О鍒嗗竷锛岀伅鍏夋槧琛笅锛岀編鍛崇粴涓藉濮�</view>
- </view>
- <view class="item">
- <view class="h1">01.瀹㈠巺</view>
- <image src="" mode="widthFix" />
- <view class="content">鐪嬫儻浜嗘暣榻愬垝涓�鐨勭幓鐠冨悐鏌滐紝閲戣壊妗嗗瀷鐜婚棬鍚婃煖鍙堟槸涓嶄竴鏍风殑瀹$編锛岃竟妗嗗井鏂滃垏鍏ワ紝宸﹀彸瀵圭О鍒嗗竷锛岀伅鍏夋槧琛笅锛岀編鍛崇粴涓藉濮�</view>
+ <view wx:for="{{ info.apiSpaceCaseVos }}" class="item">
+ <view class="h1">{{ item.spaceName }}</view>
+ <image class="img" wx:for="{{ item.imgList }}" wx:for-item="img" src="{{ img }}" mode="widthFix" />
+ <view class="content">{{ item.spaceDesc }}</view>
</view>
</view>
<!-- footer -->
<view class="footer" style="padding-bottom: {{bottomLift}}px;">
<view class="btns">
- <view class="item">
- <image class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
+ <button class="item btn">
+ <image data-code="collect_cancel" bindtap="handleAction" wx:if="{{ info.collection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
+ <image wx:else data-code="collect" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
<view class="name">鏀惰棌</view>
- </view>
- <view class="item">
+ </button>
+ <button open-type="share" class="item btn" bindtap="handleShare">
<image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image>
<view class="name">鍒嗕韩</view>
- </view>
- <view class="sub_btn">
+ </button>
+ <view class="sub_btn" bindtap="handleDesign">
<image class="sheji" src="../../static/icon/ic_sheji.png" mode="widthFix"></image>
<view>鍏嶈垂棰勭害涓撳睘璁捐</view>
</view>
diff --git a/wechat_staff/pages/detailDis/case.wxss b/wechat_staff/pages/detailDis/case.wxss
index 837f098..dfeb97b 100644
--- a/wechat_staff/pages/detailDis/case.wxss
+++ b/wechat_staff/pages/detailDis/case.wxss
@@ -12,9 +12,30 @@
color: #999999;
margin-bottom: 48rpx;
}
+.container .fullview_wrap {
+ position: relative;
+}
.container .fullview_wrap .banner {
width: 100%;
border-radius: 8rpx;
+}
+.container .fullview_wrap .full {
+ position: absolute;
+ top: 32rpx;
+ right: 32rpx;
+ font-size: 20rpx;
+ color: rgba(255, 255, 255, 0.8);
+ width: 112rpx;
+ height: 42rpx;
+ background: rgba(0, 0, 0, 0.54);
+ border-radius: 30rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.container .fullview_wrap .full .icon {
+ width: 24rpx;
+ margin-right: 4rpx;
}
.container .img {
width: 100%;
@@ -41,9 +62,25 @@
color: #333333;
}
.container .list .item .content {
+ margin-top: 20rpx;
font-weight: 300;
font-size: 28rpx;
color: #333333;
+}
+.container .list .item .img {
+ width: 100%;
+}
+.spaceList .item {
+ margin-bottom: 60rpx;
+}
+.spaceList .item .name {
+ font-weight: 600;
+ font-size: 36rpx;
+ color: #111111;
+}
+.spaceList .item .img {
+ width: 100%;
+ border-radius: 8rpx;
}
.footer {
position: fixed;
@@ -88,3 +125,30 @@
.footer .item .icon {
width: 44rpx;
}
+.share_modal .btns {
+ min-height: 320rpx;
+ display: flex;
+ align-items: center;
+}
+.share_modal .btns .item {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ flex: 1;
+ font-size: 26rpx;
+ background-color: #fff;
+}
+.share_modal .btns .item image {
+ width: 80rpx;
+ height: 80rpx;
+ margin-bottom: 10rpx;
+}
+.share_modal .cancel {
+ height: 80rpx;
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border: 1rpx solid #e5e5e5;
+}
diff --git a/wechat_staff/pages/detailDis/product.js b/wechat_staff/pages/detailDis/product.js
index 8f0de89..0d00d28 100644
--- a/wechat_staff/pages/detailDis/product.js
+++ b/wechat_staff/pages/detailDis/product.js
@@ -1,13 +1,19 @@
-// pages/detailDis/product.js
+import {
+ shareContent,
+ getProductInfo,
+ actionDo
+} from '../../api/index'
Page({
-
/**
* 椤甸潰鐨勫垵濮嬫暟鎹�
*/
data: {
- bottomLift: 0
+ bottomLift: 0,
+ id: '',
+ info: {},
+ member: {},
+ showShare: false
},
-
/**
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
*/
@@ -16,46 +22,145 @@
this.setData({
bottomLift: app.bottomLift
})
+ this.getDetail(options.id)
+ actionDo({
+ actionType: 'view',
+ id: options.id
+ })
+ const member = wx.getStorageSync('member')
+ this.setData({
+ id: options.id,
+ member
+ })
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
- */
- onReady() {
-
+ handleAction(e) {
+ const actionType = e.currentTarget.dataset.code
+ const {
+ info
+ } = this.data
+ actionDo({
+ actionType,
+ id: this.data.info.id
+ }).then(res => {
+ info.collection = !info.collection
+ this.setData({
+ info
+ })
+ wx.showToast({
+ title: actionType == 'collect' ? '鏀惰棌鎴愬姛' : '鍙栨秷鏀惰棌',
+ })
+ })
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
- */
- onShow() {
-
+ getDetail(id) {
+ getProductInfo({
+ id
+ }).then(res => {
+ this.setData({
+ info: res.data
+ })
+ wx.setNavigationBarTitle({
+ title: res.data.title
+ })
+ })
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌
- */
+ playVideo() {
+ wx.previewMedia({
+ sources: [{
+ url: this.data.info.video,
+ type: 'video'
+ }]
+ })
+ },
+ bannerbindload(e) {
+ const {
+ height,
+ width
+ } = e.detail
+ let activeHeight = height * 670 / width
+ this.setData({
+ bannerHeight: activeHeight
+ })
+ },
+ handleDesign() {
+ wx.navigateTo({
+ url: '/pages/design/design',
+ })
+ },
+ openShare() {
+ this.setData({
+ showShare: true
+ })
+ },
+ handleShare() {
+ console.log('鐐瑰嚮浜嗗垎浜�');
+ actionDo({
+ actionType: 'share',
+ id: this.data.info.id
+ })
+ // shareContent({id: this.data.info.id || this.data.id}).then(res => {
+ // this.setData({showShare: false})
+ // })
+ },
+ // onShareAppMessage: function () {
+ // // let { productDetail, userInfo } = this.data
+ // return {
+ // title: productDetail.title,
+ // path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0'
+ // }
+ // },
+ onClose() {
+ this.setData({
+ showShare: false
+ })
+ },
+ handleDown() {
+ let {
+ info
+ } = this.data
+ wx.showToast({
+ title: '涓嬭浇涓�',
+ icon: 'loading'
+ })
+ console.log('info.picUrls', info)
+ wx.downloadFile({
+ url: info.picUrls,
+ success(res) {
+ // console.log(res)
+ wx.saveImageToPhotosAlbum({
+ filePath: res.tempFilePath,
+ success(data) {
+ that.toSaveCaseShare()
+ wx.showToast({
+ title: '涓嬭浇鎴愬姛',
+ })
+ },
+ fail(error) {
+ console.log(error)
+ wx.showToast({
+ title: '涓嬭浇澶辫触',
+ icon: 'error'
+ })
+ }
+ })
+ },
+ fail(err) {
+ console.log(err.errMsg)
+ wx.showToast({
+ title: '涓嬭浇澶辫触',
+ icon: 'error'
+ })
+ }
+ })
+ },
onHide() {
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇
- */
onUnload() {
},
-
- /**
- * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔
- */
onPullDownRefresh() {
},
-
- /**
- * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
- */
onReachBottom() {
},
diff --git a/wechat_staff/pages/detailDis/product.json b/wechat_staff/pages/detailDis/product.json
index 8835af0..3786d8c 100644
--- a/wechat_staff/pages/detailDis/product.json
+++ b/wechat_staff/pages/detailDis/product.json
@@ -1,3 +1,9 @@
{
- "usingComponents": {}
+ "usingComponents": {
+ "van-popup": "@vant/weapp/popup/index",
+ "mp-html": "mp-html",
+ "buoyClient": "../../components/buoyClient/index",
+ "detailFooter": "../../components/detailFooter/index"
+ },
+ "navigationBarTitleText": ""
}
\ No newline at end of file
diff --git a/wechat_staff/pages/detailDis/product.less b/wechat_staff/pages/detailDis/product.less
index c088474..15588ae 100644
--- a/wechat_staff/pages/detailDis/product.less
+++ b/wechat_staff/pages/detailDis/product.less
@@ -40,9 +40,16 @@
color: #fff;
}
}
-
+.main_app{
+ padding-bottom: 160rpx;
+}
page {
background-color: #f7f7f7;
+}
+.banner_swiper{
+ image{
+ width: 100%;
+ }
}
.main_content {
@@ -50,16 +57,15 @@
border-radius: 16rpx 16rpx 0rpx 0rpx;
background-color: #fff;
margin-bottom: 20rpx;
-
.title {
font-weight: 500;
font-size: 36rpx;
+ margin-bottom: 16rpx;
}
-
.desc {
font-size: 26rpx;
color: #555555;
- margin: 16rpx 0 26rpx;
+ margin-bottom: 26rpx;
}
.text {
@@ -68,7 +74,18 @@
margin-bottom: 40rpx;
}
}
-
+.spaceList{
+ .item{
+ .name{
+ font-weight: 600;
+ font-size: 36rpx;
+ color: #111111;
+ }
+ .img{
+ width: 100%;
+ }
+ }
+}
.counselor {
width: 670rpx;
padding: 0 0 0 30rpx;
@@ -121,11 +138,27 @@
font-size: 36rpx;
margin-bottom: 32rpx;
}
-
- video {
+ .img_wrap{
width: 100%;
- border: 1px solid;
border-radius: 8rpx;
+ position: relative;
+ .img{
+ width: 100%;
+ }
+ .play{
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ width: 136rpx;
+ height: 58rpx;
+ line-height: 56rpx;
+ text-align: center;
+ background: rgba(0,0,0,0.54);
+ border-radius: 30rpx;
+ font-size: 26rpx;
+ color: rgba(255,255,255,0.8);
+ }
}
}
@@ -141,15 +174,17 @@
.line {
display: flex;
- height: 62rpx;
+ height: 32rpx;
margin-bottom: 24rpx;
.label {
+ width: 120rpx;
font-size: 24rpx;
color: #666666;
}
.val {
+ flex: 1;
font-size: 24rpx;
color: #333333;
}
@@ -167,6 +202,10 @@
display: flex;
align-items: center;
height: 100rpx;
+ .btn{
+ padding: 0;
+ margin-top: 16rpx;
+ }
}
.sub_btn {
display: flex;
diff --git a/wechat_staff/pages/detailDis/product.wxml b/wechat_staff/pages/detailDis/product.wxml
index 244cdce..6743e03 100644
--- a/wechat_staff/pages/detailDis/product.wxml
+++ b/wechat_staff/pages/detailDis/product.wxml
@@ -1,5 +1,7 @@
-<view>
- <view class="user">
+<view class="main_app">
+ <buoyClient showPurpose="1" />
+ <detailFooter />
+ <view class="user" wx:if="{{ false }}">
<view class="avatar"></view>
<view class="content">
<view class="name">涓佹鏋�</view>
@@ -7,55 +9,43 @@
</view>
<view class="btn">鑱旂郴TA</view>
</view>
+ <!-- banner杞挱 -->
+ <swiper class="banner_swiper" circular indicator-dots autoplay style="height:{{bannerHeight}}rpx" duration>
+ <block wx:for="{{ info.bannerImgList }}">
+ <swiper-item>
+ <image bindload="bannerbindload" mode="widthFix" src="{{ item }}"></image>
+ </swiper-item>
+ </block>
+ </swiper>
<view class="main_content">
- <view class="title">鑾タ鍋囨棩-椁愬巺</view>
- <view class="desc">绠�娆ч鏍�</view>
- <view class="text">瀹跺眳椋庢牸涓嶅浛浜庡浐鏈夊舰寮忥紝鍘ㄦ埧鍔熻兘涓嶅眬闄愪簬涓�鏃ヤ笁椁愩��
- 鍏冪礌涓庢潗璐ㄧ鎾炲嚭鐨勪笉浠呮槸璁捐鎰燂紝鏇存槸涓�绉嶉矞鏄庣殑涓嶆嫎
- 涓�鏍肩殑鐜颁唬鎬佸害锛岃瀺鍚堝綋涓嬫祦琛岀編瀛︼紝鏋勮绌洪棿鐨勬棤椋庢牸
- 鍖栥��</view>
- <view class="user counselor">
- <view class="avatar_wrap">
- <image class="avatar" mode="widthFix" src="../../static/icon/home_ic_guwen@2x.png"></image>
- </view>
- <view class="content">
- <view class="name">鎮ㄧ殑涓撳睘瀹跺眳椤鹃棶</view>
- <view class="desc">鎮ㄨ韩杈圭殑鍏ㄥ眿璁捐涓撳</view>
- </view>
- <view class="btn">鍘荤湅鐪�</view>
- </view>
+ <view class="title">{{ info.title }}</view>
+ <view class="desc" wx:if="{{ info.subtitle }}">{{ info.subtitle }}</view>
+ <view class="text">{{ info.intro }}</view>
</view>
<!-- video -->
- <view class="video">
+ <view wx:if="{{ info.video }}" class="video">
<view class="title">浜у搧瑙嗛</view>
- <video src=""></video>
+ <view class="img_wrap">
+ <image class="img" src="{{ info.coverImage }}" mode="widthFix"></image>
+ <view bindtap="playVideo" class="play">鎾斁</view>
+ </view>
</view>
<view class="detail">
<view class="title">浜у搧璇︽儏</view>
- <view class="line">
- <view class="label">鍝佸悕锛�</view>
- <view class="val">鑾タ鍋囨棩-椁愬巺</view>
- </view>
- <view class="line">
- <view class="label">宸ヨ壓锛�</view>
- <view class="val">鑾タ鍋囨棩-椁愬巺</view>
+ <view class="line" wx:for="{{ info.productParamList }}">
+ <view class="label">{{ item.paramName }}锛�</view>
+ <view class="val">{{ item.paramValue }}</view>
</view>
</view>
- <!-- footer -->
- <view class="footer" style="padding-bottom: {{bottomLift}}px;">
- <view class="btns">
- <view class="item">
- <image class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
- <view class="name">鏀惰棌</view>
- </view>
- <view class="item">
- <image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image>
- <view class="name">鍒嗕韩</view>
- </view>
- <view class="sub_btn">
- <image class="sheji" src="../../static/icon/ic_sheji.png" mode="widthFix"></image>
- <view>鍏嶈垂棰勭害涓撳睘璁捐</view>
- </view>
+ <!-- 瀵屾枃鏈� -->
+ <view>
+ <mp-html content="{{info.content}}"></mp-html>
+ </view>
+ <view class="spaceList">
+ <view class="item" wx:for="{{ info.spaceList }}">
+ <!-- <view class="name">{{ item.spaceName }}</view> -->
+ <image src="{{ item.spaceImg }}" mode="widthFix" class="img"></image>
+ <!-- <mp-html content="{{item.spaceContent}}"></mp-html> -->
</view>
</view>
</view>
\ No newline at end of file
diff --git a/wechat_staff/pages/detailDis/product.wxss b/wechat_staff/pages/detailDis/product.wxss
index 6226e87..ddf8552 100644
--- a/wechat_staff/pages/detailDis/product.wxss
+++ b/wechat_staff/pages/detailDis/product.wxss
@@ -35,8 +35,14 @@
font-size: 26rpx;
color: #fff;
}
+.main_app {
+ padding-bottom: 160rpx;
+}
page {
background-color: #f7f7f7;
+}
+.banner_swiper image {
+ width: 100%;
}
.main_content {
padding: 52rpx 40rpx 40rpx;
@@ -47,16 +53,25 @@
.main_content .title {
font-weight: 500;
font-size: 36rpx;
+ margin-bottom: 16rpx;
}
.main_content .desc {
font-size: 26rpx;
color: #555555;
- margin: 16rpx 0 26rpx;
+ margin-bottom: 26rpx;
}
.main_content .text {
font-size: 26rpx;
color: #555555;
margin-bottom: 40rpx;
+}
+.spaceList .item .name {
+ font-weight: 600;
+ font-size: 36rpx;
+ color: #111111;
+}
+.spaceList .item .img {
+ width: 100%;
}
.counselor {
width: 670rpx;
@@ -102,10 +117,27 @@
font-size: 36rpx;
margin-bottom: 32rpx;
}
-.video video {
+.video .img_wrap {
width: 100%;
- border: 1px solid;
border-radius: 8rpx;
+ position: relative;
+}
+.video .img_wrap .img {
+ width: 100%;
+}
+.video .img_wrap .play {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ width: 136rpx;
+ height: 58rpx;
+ line-height: 56rpx;
+ text-align: center;
+ background: rgba(0, 0, 0, 0.54);
+ border-radius: 30rpx;
+ font-size: 26rpx;
+ color: rgba(255, 255, 255, 0.8);
}
.detail {
padding: 52rpx 40rpx 40rpx;
@@ -118,14 +150,16 @@
}
.detail .line {
display: flex;
- height: 62rpx;
+ height: 32rpx;
margin-bottom: 24rpx;
}
.detail .line .label {
+ width: 120rpx;
font-size: 24rpx;
color: #666666;
}
.detail .line .val {
+ flex: 1;
font-size: 24rpx;
color: #333333;
}
@@ -143,6 +177,10 @@
align-items: center;
height: 100rpx;
}
+.footer .btns .btn {
+ padding: 0;
+ margin-top: 16rpx;
+}
.footer .sub_btn {
display: flex;
justify-content: center;
diff --git a/wechat_staff/pages/detailDis/realpic.js b/wechat_staff/pages/detailDis/realpic.js
index 6016c13..9d56aa5 100644
--- a/wechat_staff/pages/detailDis/realpic.js
+++ b/wechat_staff/pages/detailDis/realpic.js
@@ -1,11 +1,15 @@
-// pages/detailDis/realpic.js
+import { getRealcaseInfo, actionDo } from '../../api/index'
Page({
/**
* 椤甸潰鐨勫垵濮嬫暟鎹�
*/
data: {
- bottomLift: 0
+ bottomLift: 0,
+ id: '',
+ info: {},
+ member: {},
+ showShare: false
},
/**
@@ -16,46 +20,119 @@
this.setData({
bottomLift: app.bottomLift
})
+ this.getDetail(options.id)
+ actionDo({
+ actionType: 'view',
+ id: options.id
+ })
+ const member = wx.getStorageSync('member')
+ this.setData({id: options.id, member})
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
- */
- onReady() {
-
+ handleAction(e){
+ const actionType = e.currentTarget.dataset.code
+ const { info } = this.data
+ actionDo({
+ actionType,
+ id: this.data.info.id
+ }).then(res => {
+ info.collection = !info.collection
+ wx.showToast({
+ title: actionType == 'collect' ? '鏀惰棌鎴愬姛' : '鍙栨秷鏀惰棌',
+ })
+ this.setData({info})
+ })
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
- */
- onShow() {
-
+ getDetail(id) {
+ getRealcaseInfo({id}).then(res => {
+ this.setData({ info: res.data })
+ wx.setNavigationBarTitle({
+ title: res.data.title
+ })
+ })
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌
- */
+ playVideo() {
+ wx.previewMedia({
+ sources: [{ url: this.data.info.video, type: 'video' }]
+ })
+ },
+ bannerbindload(e) {
+ const { height, width } = e.detail
+ let activeHeight = height * 670 / width
+ this.setData({
+ bannerHeight: activeHeight
+ })
+ },
+ handleDesign() {
+ wx.navigateTo({
+ url: '/pages/design/design',
+ })
+ },
+ openShare() {
+ this.setData({showShare: true})
+ },
+ handleShare() {
+ console.log('鐐瑰嚮浜嗗垎浜�');
+ actionDo({ actionType: 'share', id: this.data.info.id })
+ // shareContent({id: this.data.info.id || this.data.id}).then(res => {
+ // this.setData({showShare: false})
+ // })
+ },
+ // onShareAppMessage: function () {
+ // // let { productDetail, userInfo } = this.data
+ // return {
+ // title: productDetail.title,
+ // path: '/pages/index/index?id=' + productDetail.id + '&shareuserid=' + userInfo.id + '&type=0'
+ // }
+ // },
+ onClose() {
+ this.setData({showShare: false})
+ },
+ handleDown() {
+ let { info } = this.data
+ wx.showToast({
+ title: '涓嬭浇涓�',
+ icon: 'loading'
+ })
+ console.log('info.picUrls', info)
+ wx.downloadFile({
+ url: info.picUrls,
+ success (res) {
+ // console.log(res)
+ wx.saveImageToPhotosAlbum({
+ filePath: res.tempFilePath,
+ success(data) {
+ that.toSaveCaseShare()
+ wx.showToast({
+ title: '涓嬭浇鎴愬姛',
+ })
+ },
+ fail(error) {
+ console.log(error)
+ wx.showToast({
+ title: '涓嬭浇澶辫触',
+ icon: 'error'
+ })
+ }
+ })
+ },
+ fail (err) {
+ console.log(err.errMsg)
+ wx.showToast({
+ title: '涓嬭浇澶辫触',
+ icon: 'error'
+ })
+ }
+ })
+ },
onHide() {
},
-
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇
- */
onUnload() {
},
-
- /**
- * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔
- */
onPullDownRefresh() {
},
-
- /**
- * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁�
- */
onReachBottom() {
},
diff --git a/wechat_staff/pages/detailDis/realpic.json b/wechat_staff/pages/detailDis/realpic.json
index d29e33b..4781b50 100644
--- a/wechat_staff/pages/detailDis/realpic.json
+++ b/wechat_staff/pages/detailDis/realpic.json
@@ -1,4 +1,7 @@
{
- "usingComponents": {},
- "navigationBarTitleText": "瀹炴櫙璇︽儏"
+ "usingComponents": {
+ "van-popup": "@vant/weapp/popup/index",
+ "buoyClient": "../../components/buoyClient/index"
+ },
+ "navigationBarTitleText": ""
}
\ No newline at end of file
diff --git a/wechat_staff/pages/detailDis/realpic.less b/wechat_staff/pages/detailDis/realpic.less
index 6a65d1b..4a93520 100644
--- a/wechat_staff/pages/detailDis/realpic.less
+++ b/wechat_staff/pages/detailDis/realpic.less
@@ -1,13 +1,18 @@
.container {
padding: 0 40rpx 220rpx;
-
+ .info_item{
+ width: 100%;
+ }
.main_title {
font-weight: 500;
font-size: 44rpx;
color: #222222;
margin: 32rpx 0;
}
-
+ .desc{
+ margin-top: 24rpx;
+ line-height: 42rpx;
+ }
.time {
font-size: 26rpx;
color: #999999;
@@ -70,4 +75,34 @@
width: 44rpx;
}
}
+}
+.share_modal{
+ .btns{
+ display: flex;
+ min-height: 320rpx;
+ display: flex;
+ align-items: center;
+ .item{
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ flex: 1;
+ font-size: 26rpx;
+ background-color: #fff;
+ image{
+ width: 80rpx;
+ height: 80rpx;
+ margin-bottom: 10rpx;
+ }
+ }
+ }
+ .cancel{
+ height: 80rpx;
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border: 1rpx solid #e5e5e5;
+ }
}
\ No newline at end of file
diff --git a/wechat_staff/pages/detailDis/realpic.wxml b/wechat_staff/pages/detailDis/realpic.wxml
index 9938b5f..4766d86 100644
--- a/wechat_staff/pages/detailDis/realpic.wxml
+++ b/wechat_staff/pages/detailDis/realpic.wxml
@@ -1,32 +1,28 @@
<view class="container">
- <view class="main_title">绠�娆ч鏍�70m虏涓ゅ眳瀹�</view>
- <view class="time">鍙戝竷鏃堕棿锛�2021-08-21 10:0</view>
- <view class="list">
+ <buoyClient showPurpose="1" />
+ <view class="main_title">{{ info.title }}</view>
+ <view class="time">鍙戝竷鏃堕棿锛歿{ info.publishDt }}</view>
+ <image class="info_item" wx:for="{{ info.contentImgList }}" src="{{ item }}" mode="widthFix"></image>
+ <view class="desc">{{ info.contentText || '' }}</view>
+ <!-- <view class="list">
<view class="item">
<image src="" mode="widthFix" />
<view class="content">鐪嬫儻浜嗘暣榻愬垝涓�鐨勭幓鐠冨悐鏌滐紝閲戣壊妗嗗瀷鐜婚棬鍚婃煖鍙堟槸涓嶄竴鏍风殑瀹$編锛岃竟妗嗗井鏂滃垏鍏ワ紝宸﹀彸瀵圭О鍒嗗竷锛岀伅鍏夋槧琛笅锛岀編鍛崇粴涓藉濮�</view>
</view>
- <view class="item">
- <image src="" mode="widthFix" />
- <view class="content">鐪嬫儻浜嗘暣榻愬垝涓�鐨勭幓鐠冨悐鏌滐紝閲戣壊妗嗗瀷鐜婚棬鍚婃煖鍙堟槸涓嶄竴鏍风殑瀹$編锛岃竟妗嗗井鏂滃垏鍏ワ紝宸﹀彸瀵圭О鍒嗗竷锛岀伅鍏夋槧琛笅锛岀編鍛崇粴涓藉濮�</view>
- </view>
- <view class="item">
- <image src="" mode="widthFix" />
- <view class="content">鐪嬫儻浜嗘暣榻愬垝涓�鐨勭幓鐠冨悐鏌滐紝閲戣壊妗嗗瀷鐜婚棬鍚婃煖鍙堟槸涓嶄竴鏍风殑瀹$編锛岃竟妗嗗井鏂滃垏鍏ワ紝宸﹀彸瀵圭О鍒嗗竷锛岀伅鍏夋槧琛笅锛岀編鍛崇粴涓藉濮�</view>
- </view>
- </view>
+ </view> -->
<!-- footer -->
<view class="footer" style="padding-bottom: {{bottomLift}}px;">
<view class="btns">
- <view class="item">
- <image class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
+ <button class="item btn">
+ <image data-code="collect_cancel" bindtap="handleAction" wx:if="{{ info.collection }}" class="icon" src="../../static/icon/detail_nav_collected.png" mode="widthFix"></image>
+ <image wx:else data-code="collect" bindtap="handleAction" class="icon" src="../../static/icon/detail_nav_collect.png" mode="widthFix"></image>
<view class="name">鏀惰棌</view>
- </view>
- <view class="item">
+ </button>
+ <button open-type="share" class="item btn" bindtap="handleShare">
<image class="icon" src="../../static/icon/detail_nav_share.png" mode="widthFix"></image>
<view class="name">鍒嗕韩</view>
- </view>
- <view class="sub_btn">
+ </button>
+ <view class="sub_btn" bindtap="handleDesign">
<image class="sheji" src="../../static/icon/ic_sheji.png" mode="widthFix"></image>
<view>鍏嶈垂棰勭害涓撳睘璁捐</view>
</view>
diff --git a/wechat_staff/pages/detailDis/realpic.wxss b/wechat_staff/pages/detailDis/realpic.wxss
index 9148934..02d76c5 100644
--- a/wechat_staff/pages/detailDis/realpic.wxss
+++ b/wechat_staff/pages/detailDis/realpic.wxss
@@ -1,11 +1,18 @@
.container {
padding: 0 40rpx 220rpx;
}
+.container .info_item {
+ width: 100%;
+}
.container .main_title {
font-weight: 500;
font-size: 44rpx;
color: #222222;
margin: 32rpx 0;
+}
+.container .desc {
+ margin-top: 24rpx;
+ line-height: 42rpx;
}
.container .time {
font-size: 26rpx;
@@ -64,3 +71,30 @@
.footer .item .icon {
width: 44rpx;
}
+.share_modal .btns {
+ min-height: 320rpx;
+ display: flex;
+ align-items: center;
+}
+.share_modal .btns .item {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ flex: 1;
+ font-size: 26rpx;
+ background-color: #fff;
+}
+.share_modal .btns .item image {
+ width: 80rpx;
+ height: 80rpx;
+ margin-bottom: 10rpx;
+}
+.share_modal .cancel {
+ height: 80rpx;
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border: 1rpx solid #e5e5e5;
+}
diff --git a/wechat_staff/pages/discover/discover.js b/wechat_staff/pages/discover/discover.js
index 9e16cde..81d364b 100644
--- a/wechat_staff/pages/discover/discover.js
+++ b/wechat_staff/pages/discover/discover.js
@@ -1,4 +1,4 @@
-// pages/discover/discover.js
+import { getCataLogTagList, getCatalogList } from '../../api/index'
Page({
/**
@@ -6,20 +6,19 @@
*/
data: {
menuButtonInfo: {},
- activeTabs: '0'
- },
+ catalogCode: "product_intro",
+ activeCate: '',
- /**
- * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
- */
+ height: 0,
+ top: 0,
+ },
onLoad(options) {
let menuButtonInfo = wx.getMenuButtonBoundingClientRect();
this.setData({menuButtonInfo})
- console.log('WindowInfo', menuButtonInfo);
},
tabsClick(e) {
- const activeTabs = e.currentTarget.dataset.tab
- this.setData({activeTabs})
+ const catalogCode = e.currentTarget.dataset.code
+ this.setData({catalogCode})
},
/**
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
diff --git a/wechat_staff/pages/discover/discover.json b/wechat_staff/pages/discover/discover.json
index 632ff7d..eb8784a 100644
--- a/wechat_staff/pages/discover/discover.json
+++ b/wechat_staff/pages/discover/discover.json
@@ -2,7 +2,8 @@
"usingComponents": {
"disProduct": "../../components/disProduct",
"disCase": "../../components/disCase",
- "disRealpic": "../../components/disRealpic"
+ "disRealpic": "../../components/disRealpic",
+ "buoyClient": "../../components/buoyClient/index"
},
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
diff --git a/wechat_staff/pages/discover/discover.less b/wechat_staff/pages/discover/discover.less
index f37a748..06df3a0 100644
--- a/wechat_staff/pages/discover/discover.less
+++ b/wechat_staff/pages/discover/discover.less
@@ -1,8 +1,9 @@
.main_tab{
+ position: relative;
display: flex;
- align-items: flex-end;
- height: 88rpx;
+ align-items: center;
padding: 0 40rpx;
+ // border: 1px solid red;
.item{
width: 76rpx;
font-size: 32rpx;
@@ -24,7 +25,13 @@
}
}
}
-.container{
+.home_tab{
+ position: fixed;
+ z-index: 999;
+ width: 100%;
+ background-color: #fff;
}
-.main_content{
-}
\ No newline at end of file
+
+// .main_content{
+// padding-top: 200rpx;
+// }
\ No newline at end of file
diff --git a/wechat_staff/pages/discover/discover.wxml b/wechat_staff/pages/discover/discover.wxml
index 9a877da..bab498f 100644
--- a/wechat_staff/pages/discover/discover.wxml
+++ b/wechat_staff/pages/discover/discover.wxml
@@ -1,23 +1,26 @@
<view class="container">
- <view style="height: {{ menuButtonInfo.top }}px;"></view>
- <view class="main_tab">
- <view class="item {{ activeTabs == '0' ? 'active' : '' }}" data-tab="0" bindtap="tabsClick">
- <view class="name">浜у搧</view>
- <view class="border"></view>
- </view>
- <view class="item {{ activeTabs == '1' ? 'active' : '' }}" data-tab="1" bindtap="tabsClick">
- <view class="name">妗堜緥</view>
- <view class="border"></view>
- </view>
- <view class="item {{ activeTabs == '2' ? 'active' : '' }}" data-tab="2" bindtap="tabsClick">
- <view class="name">瀹炴櫙</view>
- <view class="border"></view>
+ <buoyClient />
+ <view class="home_tab">
+ <view style="height: {{ menuButtonInfo.top - 6 }}px;"></view>
+ <view class="main_tab" style="height: {{ menuButtonInfo.height + 12 }}px;">
+ <view class="item {{ catalogCode == 'product_intro' ? 'active' : '' }}" data-code="product_intro" bindtap="tabsClick">
+ <view class="name">浜у搧</view>
+ <view class="border"></view>
+ </view>
+ <view class="item {{ catalogCode == 'whole_case' ? 'active' : '' }}" data-code="whole_case" bindtap="tabsClick">
+ <view class="name">妗堜緥</view>
+ <view class="border"></view>
+ </view>
+ <view class="item {{ catalogCode == 'real_case' ? 'active' : '' }}" data-code="real_case" bindtap="tabsClick">
+ <view class="name">瀹炴櫙</view>
+ <view class="border"></view>
+ </view>
</view>
</view>
<!-- -->
- <view class="main_content" style="height: calc( 100vh - {{menuButtonInfo.top}}px - 88rpx )">
- <disProduct wx:if="{{ activeTabs == '0' }}" />
- <disCase wx:if="{{ activeTabs == '1' }}" />
- <disRealpic wx:if="{{ activeTabs == '2' }}" />
+ <view class="main_content" style="height: 100vh">
+ <disProduct menuButtonInfo="{{ menuButtonInfo }}" wx:if="{{ catalogCode == 'product_intro' }}" />
+ <disCase menuButtonInfo="{{ menuButtonInfo }}" wx:if="{{ catalogCode == 'whole_case' }}" />
+ <disRealpic menuButtonInfo="{{ menuButtonInfo }}" wx:if="{{ catalogCode == 'real_case' }}" />
</view>
</view>
\ No newline at end of file
diff --git a/wechat_staff/pages/discover/discover.wxss b/wechat_staff/pages/discover/discover.wxss
index a97b40c..9ac8a0c 100644
--- a/wechat_staff/pages/discover/discover.wxss
+++ b/wechat_staff/pages/discover/discover.wxss
@@ -1,7 +1,7 @@
.main_tab {
+ position: relative;
display: flex;
- align-items: flex-end;
- height: 88rpx;
+ align-items: center;
padding: 0 40rpx;
}
.main_tab .item {
@@ -23,3 +23,9 @@
.main_tab .active .border {
background: linear-gradient(270deg, rgba(255, 255, 255, 0.56) 0%, rgba(206, 144, 111, 0.88) 100%);
}
+.home_tab {
+ position: fixed;
+ z-index: 999;
+ width: 100%;
+ background-color: #fff;
+}
diff --git a/wechat_staff/pages/kefu/select.js b/wechat_staff/pages/kefu/select.js
index 2daf226..8c8cfdf 100644
--- a/wechat_staff/pages/kefu/select.js
+++ b/wechat_staff/pages/kefu/select.js
@@ -1,12 +1,21 @@
-// pages/discover/discover.js
+import { getCustomerList, getCrmAuthUrl } from '../../api/index'
+const { HYEventBus } = require('hy-event-store')
+const eventBus = new HYEventBus()
Page({
/**
* 椤甸潰鐨勫垵濮嬫暟鎹�
*/
data: {
- activeTabs: '0',
- bottomLift: 0
+ bottomLift: 0,
+
+ keyWords: '',
+ dataList: [],
+ total: 0,
+ flag: 0,
+ page: 1,
+ pageSize: 10,
+
},
/**
@@ -17,10 +26,52 @@
this.setData({
bottomLift: app.bottomLift
})
+ this.getList()
},
tabsClick(e) {
- const activeTabs = e.currentTarget.dataset.tab
- this.setData({activeTabs})
+ const flag = e.currentTarget.dataset.tab
+ this.setData({flag})
+ this.setData({total: 0,dataList: [], page: 1})
+ this.getList()
+ },
+ reloadList() {
+ 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 })
+ this.getList()
+ }else{
+ wx.showToast({
+ title: '鏆傛棤鏇村鏁版嵁',
+ icon: 'none'
+ })
+ }
+ },
+ getList() {
+ const { flag, page, pageSize, keyWords } = this.data
+ getCustomerList({
+ flag, page, pageSize, keyWords
+ }).then(res => {
+ if(res.data){
+ this.setData({
+ total: res.data.total,
+ dataList: [...this.data.dataList, ...res.data.data]
+ })
+ }
+ })
+ },
+ jumpClient() {
+ getCrmAuthUrl({type:1}).then(res => {
+ console.log(res.data)
+ this.setData({ url: res.data })
+ wx.navigateTo({
+ url: '/pages/webView/index?link=' + res.data,
+ })
+ })
},
handleSub() {
console.log('鐐瑰嚮楗夸簡');
diff --git a/wechat_staff/pages/kefu/select.less b/wechat_staff/pages/kefu/select.less
index aae0fe5..b183920 100644
--- a/wechat_staff/pages/kefu/select.less
+++ b/wechat_staff/pages/kefu/select.less
@@ -55,9 +55,9 @@
width: 100%;
}
.icon{
- width: 26rpx;
+ width: 28rpx;
margin-top: 4rpx;
- margin-right: 16rpx;
+ margin-right: 14rpx;
}
}
.kehu{
@@ -66,15 +66,35 @@
}
}
.list{
- padding: 0 40rpx;
+ height: calc( 100vh - 188rpx );
+ padding: 0 40rpx 160rpx;
background-color: #fff;
- .line{
- display: flex;
- align-items: center;
- height: 148rpx;
+ .item{
border-bottom: 1rpx solid #e5e5e5;
+ padding: 30rpx 0 20rpx;
+ .item_content{
+ display: flex;
+ }
+ .checked_wrap{
+ display: flex;
+ align-items: center;
+ }
&:nth-last-child(1){
border: none;
+ }
+ .line{
+ display: flex;
+ font-size: 26rpx;
+ .label{
+ color: #999999;
+ margin-right: 20rpx;
+ }
+ .val{
+ color: #333333;
+ }
+ }
+ .source{
+ margin-top: 12rpx;
}
.icon{
width: 40rpx;
@@ -84,7 +104,6 @@
width: 88rpx;
height: 88rpx;
border-radius: 50%;
- border: 1px solid;
margin-right: 20rpx;
}
.content{
@@ -111,13 +130,14 @@
color: #666666;
}
}
- .desc{
- display: flex;
- justify-content: space-between;
- font-size: 24rpx;
- color: #999999;
- margin-top: 14rpx;
- }
+ }
+ .desc{
+ display: flex;
+ justify-content: space-between;
+ font-size: 24rpx;
+ color: #999999;
+ margin-top: 24rpx;
+ padding-left: 70rpx;
}
}
}
diff --git a/wechat_staff/pages/kefu/select.wxml b/wechat_staff/pages/kefu/select.wxml
index 9cb387f..917065d 100644
--- a/wechat_staff/pages/kefu/select.wxml
+++ b/wechat_staff/pages/kefu/select.wxml
@@ -1,10 +1,10 @@
<view class="container" id="myCanvas">
<view class="main_tab">
- <view class="item {{ activeTabs == '0' ? 'active' : '' }}" data-tab="0" bindtap="tabsClick">
+ <view class="item {{ flag == '0' ? 'active' : '' }}" data-tab="{{0}}" bindtap="tabsClick">
<view class="name">瀹㈡埛鍒楄〃</view>
<view class="border"></view>
</view>
- <view class="item {{ activeTabs == '1' ? 'active' : '' }}" data-tab="1" bindtap="tabsClick">
+ <view class="item {{ flag == '1' ? 'active' : '' }}" data-tab="{{1}}" bindtap="tabsClick">
<view class="name">娼滃鍒楄〃</view>
<view class="border"></view>
</view>
@@ -13,49 +13,65 @@
<view class="search_wrap">
<view class="input_wrap">
<image class="icon" src="../../static/icon/ic_search@2x.png" mode="widthFix"></image>
- <input type="text" placeholder="鎼滅储瀹㈡埛鏄电О銆佸璐�佸娉ㄥ悕" />
+ <input model:value="{{keyWords}}" bindblur="reloadList" type="text" placeholder="鎼滅储瀹㈡埛鏄电О銆佸璐�佸娉ㄥ悕" />
</view>
- <image class="kehu" src="../../static/icon/kehu_ic_new@2x.png" mode="widthFix"></image>
+ <image bindtap="jumpClient" class="kehu" src="../../static/icon/kehu_ic_new@2x.png" mode="widthFix"></image>
</view>
<!-- -->
- <view class="list">
- <view class="line">
- <image class="icon" src="../../static/icon/ic_video@2x.png" mode="widthFix"></image>
- <image class="icon" src="../../static/icon/ic_select@2x.png" mode="widthFix"></image>
- <image class="avatar" src=""></image>
- <view class="content">
- <view class="header">
- <view class="left">
- <view class="name">鐜嬪痉鍙�</view>
- <view class="tag">@寰俊</view>
+ <scroll-view bindscrolltolower="scrolltolower" scroll-y enable-passive enable-flex class="list">
+ <block wx:for="{{ dataList }}">
+ <view wx:if="{{ flag == 0 }}" class="item">
+ <view class="item_content">
+ <view class="checked_wrap">
+ <image wx:if="{{ item.checked }}" class="icon" src="../../static/icon/ic_video@2x.png" mode="widthFix"></image>
+ <image 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>
- <view class="remark">澶囨敞鍚嶏細鐜嬪摜</view>
+ <!-- -->
+ <view class="content">
+ <view class="name">{{ item.customerName }}</view>
+ <view class="line">
+ <view class="label">鎵嬫満</view>
+ <view class="val">{{ item.customerPhone }}</view>
+ </view>
+ <view class="line">
+ <view class="label">鍝佺被</view>
+ <view class="val">{{ item.productCodeName }}</view>
+ </view>
+ <view class="line">
+ <view class="label">鍦板潃</view>
+ <view class="val">{{ item.address }}</view>
+ </view>
+ </view>
</view>
<view class="desc">
- <view>瀵艰喘锛氱帇鏌愭煇</view>
- <view>鍒涘缓鏃堕棿锛�2002</view>
+ <view>鍒涘缓鏃堕棿锛歿{ item.creationDate }}</view>
+ <view>瀵艰喘锛歿{ item.dgName }}</view>
</view>
</view>
- </view>
- <view class="line">
- <image class="icon" src="../../static/icon/ic_video@2x.png" mode="widthFix"></image>
- <image class="icon" src="../../static/icon/ic_select@2x.png" mode="widthFix"></image>
- <image class="avatar" src=""></image>
- <view class="content">
- <view class="header">
- <view class="left">
- <view class="name">鐜嬪痉鍙�</view>
- <view class="tag">@寰俊</view>
+ <view wx:if="{{ flag == 1 }}" class="item">
+ <view class="item_content">
+ <view class="checked_wrap">
+ <image wx:if="{{ item.checked }}" class="icon" src="../../static/icon/ic_video@2x.png" mode="widthFix"></image>
+ <image wx:else class="icon" src="../../static/icon/ic_select@2x.png" mode="widthFix"></image>
+ <image class="avatar" src=""></image>
</view>
- <view class="remark">澶囨敞鍚嶏細鐜嬪摜</view>
+ <!-- -->
+ <view class="content">
+ <view class="name">{{ item.customerName }}</view>
+ <view class="line source">
+ <view class="label">鏉ユ簮</view>
+ <view class="val">{{ item.orgName }}</view>
+ </view>
+ </view>
</view>
<view class="desc">
- <view>瀵艰喘锛氱帇鏌愭煇</view>
- <view>鍒涘缓鏃堕棿锛�2002</view>
+ <view>鍒涘缓鏃堕棿锛歿{ item.creationDate }}</view>
+ <view>瀵艰喘锛歿{ item.dgName }}</view>
</view>
</view>
- </view>
- </view>
+ </block>
+ </scroll-view>
<!-- footer -->
<view class="footer" style="padding-bottom: {{bottomLift}}px;">
<view class="btns">
diff --git a/wechat_staff/pages/kefu/select.wxss b/wechat_staff/pages/kefu/select.wxss
index e8dadc0..f520b5e 100644
--- a/wechat_staff/pages/kefu/select.wxss
+++ b/wechat_staff/pages/kefu/select.wxss
@@ -56,69 +56,89 @@
width: 100%;
}
.search_wrap .input_wrap .icon {
- width: 26rpx;
+ width: 28rpx;
margin-top: 4rpx;
- margin-right: 16rpx;
+ margin-right: 14rpx;
}
.search_wrap .kehu {
width: 48rpx;
margin-left: 30rpx;
}
.list {
- padding: 0 40rpx;
+ height: calc(100vh - 188rpx);
+ padding: 0 40rpx 160rpx;
background-color: #fff;
}
-.list .line {
+.list .item {
+ border-bottom: 1rpx solid #e5e5e5;
+ padding: 30rpx 0 20rpx;
+}
+.list .item .item_content {
+ display: flex;
+}
+.list .item .checked_wrap {
display: flex;
align-items: center;
- height: 148rpx;
- border-bottom: 1rpx solid #e5e5e5;
}
-.list .line:nth-last-child(1) {
+.list .item:nth-last-child(1) {
border: none;
}
-.list .line .icon {
+.list .item .line {
+ display: flex;
+ font-size: 26rpx;
+}
+.list .item .line .label {
+ color: #999999;
+ margin-right: 20rpx;
+}
+.list .item .line .val {
+ color: #333333;
+}
+.list .item .source {
+ margin-top: 12rpx;
+}
+.list .item .icon {
width: 40rpx;
margin-right: 30rpx;
}
-.list .line .avatar {
+.list .item .avatar {
width: 88rpx;
height: 88rpx;
border-radius: 50%;
- border: 1px solid;
margin-right: 20rpx;
}
-.list .line .content {
+.list .item .content {
flex: 1;
}
-.list .line .content .header {
+.list .item .content .header {
display: flex;
justify-content: space-between;
}
-.list .line .content .header .left {
+.list .item .content .header .left {
display: flex;
align-items: center;
}
-.list .line .content .header .left .name {
+.list .item .content .header .left .name {
font-weight: 500;
font-size: 30rpx;
color: #111111;
margin-right: 10rpx;
}
-.list .line .content .header .left .tag {
+.list .item .content .header .left .tag {
font-size: 24rpx;
color: #57BE6A;
}
-.list .line .content .header .remark {
+.list .item .content .header .remark {
font-size: 26rpx;
color: #666666;
}
-.list .line .content .desc {
+.list .item .desc {
display: flex;
justify-content: space-between;
font-size: 24rpx;
color: #999999;
- margin-top: 14rpx;
+ margin-top: 24rpx;
+ padding-left: 70rpx;
}
.footer {
position: fixed;
diff --git a/wechat_staff/pages/store/staff.js b/wechat_staff/pages/store/staff.js
index 30c5c7f..fb154f9 100644
--- a/wechat_staff/pages/store/staff.js
+++ b/wechat_staff/pages/store/staff.js
@@ -20,8 +20,7 @@
*/
onLoad(options) {
var app = getApp().globalData
- var userType = options.userType
-
+ var userType = options.userType || 1
if (userType == 1) {
//濡傛灉鏌ヨ鑷繁鐨勪俊鎭�
this.setData({
diff --git a/wechat_staff/pages/webView/index.js b/wechat_staff/pages/webView/index.js
index 530c487..5f082d8 100644
--- a/wechat_staff/pages/webView/index.js
+++ b/wechat_staff/pages/webView/index.js
@@ -16,7 +16,7 @@
const eventChannel = this.getOpenerEventChannel()
if (options.link) {
- that.setData({ link: options.link, id: options.id })
+ that.setData({ link: options.link, id: options.id || '' })
} else {
// 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
eventChannel.on('acceptDataFromOpenerPage', function(data) {
diff --git a/wechat_staff/project.private.config.json b/wechat_staff/project.private.config.json
index 92b7877..719e31e 100644
--- a/wechat_staff/project.private.config.json
+++ b/wechat_staff/project.private.config.json
@@ -17,7 +17,7 @@
},
{
"name": "",
- "pathName": "pages/work/index",
+ "pathName": "pages/discover/discover",
"query": "",
"launchMode": "default",
"scene": null
@@ -38,7 +38,7 @@
},
{
"name": "",
- "pathName": "pages/download/index",
+ "pathName": "pages/kefu/select",
"query": "",
"launchMode": "default",
"scene": null
diff --git a/wechat_staff/static/icon/download.png b/wechat_staff/static/icon/download.png
new file mode 100644
index 0000000..03cef8c
--- /dev/null
+++ b/wechat_staff/static/icon/download.png
Binary files differ
diff --git a/wechat_staff/static/icon/ic_yixiang.png b/wechat_staff/static/icon/ic_yixiang.png
new file mode 100644
index 0000000..113a5cd
--- /dev/null
+++ b/wechat_staff/static/icon/ic_yixiang.png
Binary files differ
diff --git a/wechat_staff/static/icon/wechat.png b/wechat_staff/static/icon/wechat.png
new file mode 100644
index 0000000..574c715
--- /dev/null
+++ b/wechat_staff/static/icon/wechat.png
Binary files differ
diff --git a/wechat_staff/utils/config.js b/wechat_staff/utils/config.js
index edb7f8d..a488a8e 100644
--- a/wechat_staff/utils/config.js
+++ b/wechat_staff/utils/config.js
@@ -1,7 +1,7 @@
-export const baseUrl = 'http://192.168.0.135:10027'
-// export const baseUrl = 'https://dmtest.ahapp.net/web_interface/' // 鏈湴
+// export const baseUrl = 'http://192.168.0.135:10027'
+export const baseUrl = 'https://dmtest.ahapp.net/web_interface' // 鏈湴
// export const baseUrl = 'http://zbtest.ahapp.net/zbom_interface/jx/wechat/' //娴嬭瘯鏈嶅姟鍣�
// export const imageUrl = 'https://osswebcdn.zbom.com/jiaxuan/images/'
--
Gitblit v1.9.3