From 86fc8bbb09df7bbeb50fa714ff8bb4aea85ffef5 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 29 七月 2024 15:57:17 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia
---
wechat_jiaxuan/pages/discover/discover.js | 4
wechat_jiaxuan/package-lock.json | 5 +
wechat_jiaxuan/components/disProduct/index.js | 67 +++++++++----
wechat_jiaxuan/components/disRealpic/index.less | 4
wechat_staff/components/disProduct/index.js | 68 +++++++++----
wechat_staff/pages/detailDis/product.wxss | 5
/dev/null | 0
wechat_jiaxuan/pages/detailDis/product.wxss | 3
wechat_jiaxuan/pages/detailDis/product.less | 4
wechat_jiaxuan/components/disRealpic/index.js | 5
wechat_staff/components/disProduct/index.wxml | 4
wechat_staff/components/disProduct/index.wxss | 1
wechat_staff/utils/common.js | 65 +++++++++++++
wechat_staff/pages/detailDis/product.less | 5
wechat_jiaxuan/components/disRealpic/index.wxss | 1
wechat_jiaxuan/components/disProduct/index.wxml | 4
16 files changed, 184 insertions(+), 61 deletions(-)
diff --git a/admin/admin/avatar/man.png b/admin/admin/avatar/man.png
deleted file mode 100644
index a84beb9..0000000
--- a/admin/admin/avatar/man.png
+++ /dev/null
Binary files differ
diff --git a/admin/admin/avatar/woman.png b/admin/admin/avatar/woman.png
deleted file mode 100644
index eef8695..0000000
--- a/admin/admin/avatar/woman.png
+++ /dev/null
Binary files differ
diff --git a/admin/admin/favicon.ico b/admin/admin/favicon.ico
deleted file mode 100644
index c6ff5db..0000000
--- a/admin/admin/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/admin/admin/faviconzb.ico b/admin/admin/faviconzb.ico
deleted file mode 100644
index c91c24d..0000000
--- a/admin/admin/faviconzb.ico
+++ /dev/null
Binary files differ
diff --git a/admin/admin/template/fcode.xlsx b/admin/admin/template/fcode.xlsx
deleted file mode 100644
index 58d3e6f..0000000
--- a/admin/admin/template/fcode.xlsx
+++ /dev/null
Binary files differ
diff --git a/admin/admin/template/shop.xlsx b/admin/admin/template/shop.xlsx
deleted file mode 100644
index bc827ea..0000000
--- a/admin/admin/template/shop.xlsx
+++ /dev/null
Binary files differ
diff --git a/admin/admin/template/users.xlsx b/admin/admin/template/users.xlsx
deleted file mode 100644
index dab5df8..0000000
--- a/admin/admin/template/users.xlsx
+++ /dev/null
Binary files differ
diff --git a/wechat_jiaxuan/components/disProduct/index.js b/wechat_jiaxuan/components/disProduct/index.js
index ae5777e..a93ce61 100644
--- a/wechat_jiaxuan/components/disProduct/index.js
+++ b/wechat_jiaxuan/components/disProduct/index.js
@@ -14,7 +14,7 @@
activeIndex: -1,
activeParam: [],
tagCodes: [],
-
+ isLoading:false,
cateList: [],
secondCateList: [],
datalist: [],
@@ -69,6 +69,7 @@
this.getList()
},
getList() {
+ var that =this
const { catalogCode, tagCodes, pageNum, pageSize, sortType, query } = this.data
getZhongTaiProductPage({
catalogCode, pageNum, pageSize, sortType, query, tagCodes
@@ -77,6 +78,8 @@
datalist: [...this.data.datalist, ...res.data.records],
total: res.data.total
})
+ }).finally(()=>{
+ that.setData({isLoading:false})
})
},
scrolltolower() {
@@ -97,6 +100,11 @@
this.getList()
},
cateClick(e) {
+ var {isLoading} = this.data
+ if(isLoading){
+ return
+ }
+ this.setData({isLoading:true})
const catalogCode = e.currentTarget.dataset.code
this.setData({ catalogCode, tagCodes: [] })
this.setData({ pageNum: 1, datalist: [], total: 0 })
@@ -122,25 +130,28 @@
const index = tagCodes.indexOf(code)
console.log('code', code)
console.log('tagCodes', tagCodes)
+ console.log(secondCateList)
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
+ // 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].tempParamIndex = paramIndex
+ secondCateList[activeIndex].tempParamCode = code
+ secondCateList[activeIndex].tempParamName = activeParam[paramIndex].labelValueName
} else {
- tagCodes.splice(index, 1)
- secondCateList[activeIndex].paramIndex = -1
- secondCateList[activeIndex].paramName = ''
+ // tagCodes.splice(index, 1)
+ secondCateList[activeIndex].tempParamIndex = -1
+ secondCateList[activeIndex].tempParamCode = ''
+ secondCateList[activeIndex].tempParamName = ''
}
- this.setData({ tagCodes, secondCateList })
+ this.setData({secondCateList })
},
changeShowParams(e) {
const { secondCateList } = this.data
@@ -159,15 +170,27 @@
},
cancelParam() {
const { secondCateList } = this.data
- secondCateList.forEach(item => {
- item.paramIndex = -1
- item.paramName = item.paramName || ''
+ secondCateList.forEach(item => {
+ item.tempParamIndex = item.paramIndex
+ item.tempParamName = item.paramName
+ item.tempParamCode = item.paramCode
})
- this.setData({ tagCodes: [], activeParam: [], secondCateList, activeIndex: -1 })
+ // this.setData({ tagCodes: [], activeParam: [], secondCateList, activeIndex: -1 })
+ this.setData({ activeParam: [],activeIndex: -1 ,secondCateList})
},
subParam() {
- this.setData({ activeParam: [] })
- this.setData({ pageNum: 1, activeIndex: -1, datalist: [], total: 0 })
+ const { secondCateList } = this.data
+ var codes = []
+ secondCateList.forEach(item => {
+ item.paramIndex = item.tempParamIndex
+ item.paramName = item.tempParamName
+ item.paramCode = item.tempParamCode
+ if( item.paramIndex>-1 && item.tempParamCode){
+ codes.push( item.tempParamCode)
+ }
+ })
+ this.setData({tagCodes:codes})
+ this.setData({ pageNum: 1, activeParam: [] ,activeIndex: -1, datalist: [], total: 0 })
this.getList()
},
}
diff --git a/wechat_jiaxuan/components/disProduct/index.wxml b/wechat_jiaxuan/components/disProduct/index.wxml
index 09c2d56..9c34af4 100644
--- a/wechat_jiaxuan/components/disProduct/index.wxml
+++ b/wechat_jiaxuan/components/disProduct/index.wxml
@@ -15,13 +15,13 @@
<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>
+ <view class="name">{{ item.tempParamName || item.labelName }}</view>
<van-icon name="{{ index == activeIndex ? 'arrow-up' : 'arrow-down' }}" />
</view>
</view>
<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 data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ secondCateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
</view>
<view class="btns">
<view class="btn" bindtap="cancelParam">鍙栨秷</view>
diff --git a/wechat_jiaxuan/components/disRealpic/index.js b/wechat_jiaxuan/components/disRealpic/index.js
index 6cf6ce7..de55855 100644
--- a/wechat_jiaxuan/components/disRealpic/index.js
+++ b/wechat_jiaxuan/components/disRealpic/index.js
@@ -155,9 +155,10 @@
const { cateList } = this.data
cateList.forEach(item => {
item.paramIndex = -1
- item.paramName = item.paramName || ''
+ item.paramName = ''
})
- this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 })
+ this.setData({ tagCodes: [],datalist:[],pageNum:1, activeParam: [],cateList,activeIndex: -1 })
+ this.getList()
},
bindblur() {
this.setData({ pageNum: 1,dataList: [],total: 0})
diff --git a/wechat_jiaxuan/components/disRealpic/index.less b/wechat_jiaxuan/components/disRealpic/index.less
index c1c3d04..d73de13 100644
--- a/wechat_jiaxuan/components/disRealpic/index.less
+++ b/wechat_jiaxuan/components/disRealpic/index.less
@@ -146,10 +146,10 @@
display: flex;
flex-wrap: wrap;
justify-content: space-around;
+
.item {
width: 324rpx;
- margin-bottom: 32rpx;
-
+ margin-bottom: 32rpx;
.img_wrap {
width: 100%;
height: 182rpx;
diff --git a/wechat_jiaxuan/components/disRealpic/index.wxss b/wechat_jiaxuan/components/disRealpic/index.wxss
index c6fd469..911a199 100644
--- a/wechat_jiaxuan/components/disRealpic/index.wxss
+++ b/wechat_jiaxuan/components/disRealpic/index.wxss
@@ -132,6 +132,7 @@
flex-wrap: wrap;
justify-content: space-around;
}
+
.main_content .goods_list .item {
width: 324rpx;
margin-bottom: 32rpx;
diff --git a/wechat_jiaxuan/package-lock.json b/wechat_jiaxuan/package-lock.json
index f63da71..dfb5c0d 100644
--- a/wechat_jiaxuan/package-lock.json
+++ b/wechat_jiaxuan/package-lock.json
@@ -24,6 +24,11 @@
"resolved": "https://registry.npmmirror.com/mp-html/-/mp-html-2.5.0.tgz",
"integrity": "sha512-uvBH5tIaDIlj8qaxsvNXU3RKX0jvXOo3J6FAi/notUv/ds6j79UUTE82aDkxxUk0eLUU0CiCqMrR7WWnytk30Q=="
},
+ "spa-custom-hooks": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmmirror.com/spa-custom-hooks/-/spa-custom-hooks-1.4.2.tgz",
+ "integrity": "sha512-wxMcbcgkM6TWCtm86Njd9K06I/iPr9CVWKCPJq7Q51eeNKdeSMcU9jsTRI+SVIfgNikc6//JCS4pwoyHRAdbCw=="
+ },
"vant-weapp": {
"version": "0.5.29",
"resolved": "https://registry.npmmirror.com/vant-weapp/-/vant-weapp-0.5.29.tgz",
diff --git a/wechat_jiaxuan/pages/detailDis/product.less b/wechat_jiaxuan/pages/detailDis/product.less
index 7e33210..a0f2291 100644
--- a/wechat_jiaxuan/pages/detailDis/product.less
+++ b/wechat_jiaxuan/pages/detailDis/product.less
@@ -98,12 +98,14 @@
margin-bottom: 16rpx;
}
.desc {
+
font-size: 26rpx;
color: #555555;
margin-bottom: 26rpx;
}
- .text {
+ .text {
+ line-height: 48rpx;
font-size: 26rpx;
color: #555555;
margin-bottom: 40rpx;
diff --git a/wechat_jiaxuan/pages/detailDis/product.wxss b/wechat_jiaxuan/pages/detailDis/product.wxss
index 91008eb..b323e2b 100644
--- a/wechat_jiaxuan/pages/detailDis/product.wxss
+++ b/wechat_jiaxuan/pages/detailDis/product.wxss
@@ -97,6 +97,7 @@
margin-bottom: 26rpx;
}
.main_content .text {
+ line-height: 48rpx;
font-size: 26rpx;
color: #555555;
margin-bottom: 40rpx;
@@ -190,7 +191,7 @@
margin-bottom: 24rpx;
}
.detail .line .label {
- width: 120rpx;
+ width: auto;
font-size: 24rpx;
color: #666666;
}
diff --git a/wechat_jiaxuan/pages/discover/discover.js b/wechat_jiaxuan/pages/discover/discover.js
index 81d364b..4766b03 100644
--- a/wechat_jiaxuan/pages/discover/discover.js
+++ b/wechat_jiaxuan/pages/discover/discover.js
@@ -7,10 +7,10 @@
data: {
menuButtonInfo: {},
catalogCode: "product_intro",
- activeCate: '',
-
+ activeCate: '',
height: 0,
top: 0,
+ isLoading:false
},
onLoad(options) {
let menuButtonInfo = wx.getMenuButtonBoundingClientRect();
diff --git a/wechat_staff/components/disProduct/index.js b/wechat_staff/components/disProduct/index.js
index 3849c24..2e23c6d 100644
--- a/wechat_staff/components/disProduct/index.js
+++ b/wechat_staff/components/disProduct/index.js
@@ -14,6 +14,7 @@
cateList: [],
secondCateList: [],
datalist: [],
+ isLoading:false,
pageNum: 1,
pageSize: 10,
total: 0,
@@ -66,7 +67,7 @@
this.setData({ pageNum: 1,datalist: [],total: 0})
this.getList()
},
- getList() {
+ getList() {
const { catalogCode,tagCodes, pageNum, pageSize, sortType, query } = this.data
getZhongTaiProductPage({
catalogCode,pageNum,pageSize,sortType,query,tagCodes
@@ -75,6 +76,8 @@
datalist: [...this.data.datalist, ...res.data.records],
total: res.data.total
})
+ }).finally(()=>{
+ this.setData({isLoading:false})
})
},
scrolltolower() {
@@ -91,6 +94,11 @@
}
},
cateClick(e) {
+ var {isLoading} = this.data
+ if(isLoading){
+ return
+ }
+ this.setData({isLoading:true})
const catalogCode = e.currentTarget.dataset.code
this.setData({ catalogCode, tagCodes: [] })
this.setData({ pageNum: 1,datalist: [],total: 0})
@@ -115,22 +123,24 @@
const { secondCateList, 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)
- secondCateList[activeIndex].paramIndex = paramIndex
- secondCateList[activeIndex].paramName = activeParam[paramIndex].labelValueName
- }else{
- tagCodes.splice(index, 1)
- secondCateList[activeIndex].paramIndex = -1
- secondCateList[activeIndex].paramName = ''
+ // 鍚宲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].tempParamIndex = paramIndex
+ secondCateList[activeIndex].tempParamCode = code
+ secondCateList[activeIndex].tempParamName = activeParam[paramIndex].labelValueName
+ } else {
+ // tagCodes.splice(index, 1)
+ secondCateList[activeIndex].tempParamIndex = -1
+ secondCateList[activeIndex].tempParamCode = ''
+ secondCateList[activeIndex].tempParamName = ''
}
this.setData({ tagCodes, secondCateList })
},
@@ -153,15 +163,27 @@
},
cancelParam() {
const { secondCateList } = this.data
- secondCateList.forEach(item => {
- item.paramIndex = -1
- item.paramName = item.paramName || ''
+ secondCateList.forEach(item => {
+ item.tempParamIndex = item.paramIndex
+ item.tempParamName = item.paramName
+ item.tempParamCode = item.paramCode
})
- this.setData({ tagCodes: [],activeParam: [],secondCateList,activeIndex: -1 })
+ // this.setData({ tagCodes: [], activeParam: [], secondCateList, activeIndex: -1 })
+ this.setData({ activeParam: [],activeIndex: -1 ,secondCateList})
},
subParam() {
- this.setData({ activeParam: [] })
- this.setData({ pageNum: 1,activeIndex: -1, datalist: [],total: 0})
+ const { secondCateList } = this.data
+ var codes = []
+ secondCateList.forEach(item => {
+ item.paramIndex = item.tempParamIndex
+ item.paramName = item.tempParamName
+ item.paramCode = item.tempParamCode
+ if( item.paramIndex>-1 && item.tempParamCode){
+ codes.push( item.tempParamCode)
+ }
+ })
+ this.setData({tagCodes:codes})
+ this.setData({ pageNum: 1, activeParam: [] ,activeIndex: -1, datalist: [], total: 0 })
this.getList()
},
}
diff --git a/wechat_staff/components/disProduct/index.wxml b/wechat_staff/components/disProduct/index.wxml
index c62e00a..8c1084f 100644
--- a/wechat_staff/components/disProduct/index.wxml
+++ b/wechat_staff/components/disProduct/index.wxml
@@ -15,13 +15,13 @@
<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>
+ <view class="name">{{ item.tempParamName || item.labelName }}</view>
<van-icon name="{{ index == activeIndex ? 'arrow-up' : 'arrow-down' }}" />
</view>
</view>
<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 data-index="{{index}}" data-code="{{ item.labelValueCode }}" bindtap="tagClick" wx:for="{{ activeParam }}" class="item {{ secondCateList[activeIndex].tempParamIndex === index ? 'active' : '' }}">{{ item.labelValueName }}</view>
</view>
<view class="btns">
<view class="btn" bindtap="cancelParam">鍙栨秷</view>
diff --git a/wechat_staff/components/disProduct/index.wxss b/wechat_staff/components/disProduct/index.wxss
index 6ca7903..8b5593c 100644
--- a/wechat_staff/components/disProduct/index.wxss
+++ b/wechat_staff/components/disProduct/index.wxss
@@ -185,6 +185,7 @@
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
+
}
.main_content .main_right .goods_list .item .info {
display: flex;
diff --git a/wechat_staff/pages/detailDis/product.less b/wechat_staff/pages/detailDis/product.less
index 6ca0b3d..e9accae 100644
--- a/wechat_staff/pages/detailDis/product.less
+++ b/wechat_staff/pages/detailDis/product.less
@@ -86,7 +86,8 @@
margin-bottom: 26rpx;
}
- .text {
+ .text {
+ line-height: 48rpx;
font-size: 26rpx;
color: #555555;
margin-bottom: 40rpx;
@@ -203,7 +204,7 @@
display: flex;
margin-bottom: 20rpx;
.label {
- width: 120rpx;
+ width: auto;
font-size: 24rpx;
color: #666666;
flex-shrink: 0;
diff --git a/wechat_staff/pages/detailDis/product.wxss b/wechat_staff/pages/detailDis/product.wxss
index 0e620e8..43a9d47 100644
--- a/wechat_staff/pages/detailDis/product.wxss
+++ b/wechat_staff/pages/detailDis/product.wxss
@@ -78,7 +78,8 @@
color: #555555;
margin-bottom: 26rpx;
}
-.main_content .text {
+.main_content .text {
+ line-height: 48rpx;
font-size: 26rpx;
color: #555555;
margin-bottom: 40rpx;
@@ -180,7 +181,7 @@
margin-bottom: 20rpx;
}
.detail .line .label {
- width: 120rpx;
+ width: auto;
font-size: 24rpx;
color: #666666;
flex-shrink: 0;
diff --git a/wechat_staff/utils/common.js b/wechat_staff/utils/common.js
new file mode 100644
index 0000000..fb5e35d
--- /dev/null
+++ b/wechat_staff/utils/common.js
@@ -0,0 +1,65 @@
+export function downloadImg(url) {
+ let that = this
+ wx.showLoading({
+ title: '涓嬭浇涓�...'
+ });
+ wx.downloadFile({
+ url: url, //鍥剧墖鍦板潃
+ success: function(res) {
+ wx.saveImageToPhotosAlbum({
+ filePath: res.tempFilePath, //鍥剧墖鏂囦欢璺緞
+ success: function(data) {
+ wx.hideLoading(); //闅愯棌 loading 鎻愮ず妗�
+ },
+ // 鎺ュ彛璋冪敤澶辫触鐨勫洖璋冨嚱鏁�
+ fail: function(err) {
+ if (err.errMsg === "saveImageToPhotosAlbum:fail:auth denied" || err
+ .errMsg === "saveImageToPhotosAlbum:fail auth deny" || err
+ .errMsg === "saveImageToPhotosAlbum:fail authorize no response"
+ ) {
+ wx.showModal({
+ title: '鎻愮ず',
+ content: '闇�瑕佹偍鎺堟潈淇濆瓨鐩稿唽',
+ modalType: false,
+ success: modalSuccess => {
+ wx.openSetting({
+ success(settingdata) {
+ console.log("settingdata",
+ settingdata)
+ if (settingdata
+ .authSetting[
+ 'scope.writePhotosAlbum'
+ ]) {
+ wx.showModal({
+ title: '鎻愮ず',
+ content: '鑾峰彇鏉冮檺鎴愬姛,鍐嶆鐐瑰嚮鍥剧墖鍗冲彲淇濆瓨',
+ modalType: false,
+ })
+ } else {
+ wx.showModal({
+ title: '鎻愮ず',
+ content: '鑾峰彇鏉冮檺澶辫触锛屽皢鏃犳硶淇濆瓨鍒扮浉鍐屽摝~',
+ modalType: false,
+ })
+ }
+ },
+ fail(failData) {
+ console.log("failData",
+ failData)
+ },
+ complete(finishData) {
+ console.log("finishData",
+ finishData)
+ }
+ })
+ }
+ })
+ }
+ },
+ complete(res) {
+ wx.hideLoading(); //闅愯棌 loading 鎻愮ず妗�
+ }
+ })
+ }
+ })
+}
\ No newline at end of file
--
Gitblit v1.9.3