From 865b229e81373facf6d6e5d050f4f45532b80621 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 26 七月 2024 16:01:27 +0800
Subject: [PATCH] ''
---
wechat_jiaxuan/pages/auth/auth.js | 10 ++
wechat_staff/components/disRealpic/index.js | 4
wechat_jiaxuan/components/disCase/index.js | 64 ++++++++--------
wechat_jiaxuan/components/disProduct/index.js | 60 +++++++-------
wechat_staff/components/disRealpic/index.less | 2
wechat_staff/components/disProduct/index.js | 5
wechat_staff/components/disCase/index.js | 5
wechat_staff/components/disCase/index.less | 1
/dev/null | 0
wechat_jiaxuan/pages/auth/auth.less | 34 ++++++++
wechat_staff/components/disCase/index.wxss | 1
wechat_jiaxuan/components/disRealpic/index.js | 4
wechat_jiaxuan/pages/auth/auth.wxml | 8 +
wechat_jiaxuan/pages/auth/auth.wxss | 34 ++++++++
wechat_staff/components/disProduct/index.less | 1
wechat_staff/components/disProduct/index.wxss | 2
wechat_staff/components/disRealpic/index.wxss | 2
17 files changed, 162 insertions(+), 75 deletions(-)
diff --git a/wechat_jiaxuan/components/disCase/index.js b/wechat_jiaxuan/components/disCase/index.js
index 3e13e89..0c52299 100644
--- a/wechat_jiaxuan/components/disCase/index.js
+++ b/wechat_jiaxuan/components/disCase/index.js
@@ -26,12 +26,12 @@
this.getCatelist()
},
methods: {
- getCatelist(){
+ getCatelist() {
const { catalogCode } = this.data
getCataLogTagList({
catalogCode
}).then(res => {
- if(res.data && res.data.length > 0){
+ if (res.data && res.data.length > 0) {
this.setData({
cateList: res.data
})
@@ -42,25 +42,25 @@
})
},
getList() {
- const { sortType, query, tagCodes, pageNum, pageSize,catalogCode } = this.data
+ const { sortType, query, tagCodes, pageNum, pageSize, catalogCode } = this.data
getZhongTaiWholecasePage({
- catalogCode,pageNum,pageSize,tagCodes, sortType,query
+ catalogCode, pageNum, pageSize, tagCodes, sortType, query
}).then(res => {
- if(res.data){
- this.setData({
+ if (res.data) {
+ this.setData({
total: res.data.total,
dataList: [...this.data.dataList, ...res.data.records],
})
- }
+ }
})
},
scrolltolower() {
- console.log('瑙﹀簳浜嬩欢');
+ console.log('瑙﹀簳浜嬩欢')
const { total, dataList, pageNum } = this.data
- if(total > dataList.length){
+ if (total > dataList.length) {
this.setData({ pageNum: pageNum + 1 })
this.getList()
- }else{
+ } else {
wx.showToast({
title: '鏆傛棤鏇村鏁版嵁',
icon: 'none'
@@ -69,11 +69,11 @@
},
statusChange(e) {
const sortType = e.currentTarget.dataset.status
- this.setData({sortType})
- this.setData({ pageNum: 1,dataList: [],total: 0})
+ this.setData({ sortType })
+ this.setData({ pageNum: 1, dataList: [], total: 0 })
this.getList()
},
- handleAction(e){
+ handleAction(e) {
const actionType = e.currentTarget.dataset.code
const id = e.currentTarget.dataset.id
actionDo({
@@ -94,13 +94,13 @@
const paramIndex = e.currentTarget.dataset.index
const { cateList, tagCodes, activeParam, activeIndex } = this.data
const index = tagCodes.indexOf(code)
-
- if(index === -1){
+
+ if (index === -1) {
// 鍚宲aram閲宑ode閲嶅
- if(activeParam && activeParam.length > 0){
+ if (activeParam && activeParam.length > 0) {
activeParam.forEach(item => {
const indexTemp = tagCodes.indexOf(item.labelValueCode)
- if(indexTemp > -1){
+ if (indexTemp > -1) {
tagCodes.splice(indexTemp, 1)
}
})
@@ -108,50 +108,50 @@
tagCodes.push(code)
cateList[activeIndex].paramIndex = paramIndex
cateList[activeIndex].paramName = activeParam[paramIndex].labelValueName
- }else{
+ } else {
tagCodes.splice(index, 1)
cateList[activeIndex].paramIndex = -1
cateList[activeIndex].paramName = ''
}
- this.setData({ pageNum: 1,dataList: [],total: 0})
+ this.setData({ pageNum: 1, dataList: [], total: 0 })
this.setData({ tagCodes, cateList })
- console.log('tagCodes', tagCodes);
+ console.log('tagCodes', tagCodes)
},
cancelParam() {
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: [], activeParam: [], cateList, activeIndex: -1 })
},
bindblur() {
- this.setData({ pageNum: 1,dataList: [],total: 0})
+ this.setData({ pageNum: 1, dataList: [], total: 0 })
this.getList()
},
subParam() {
this.setData({ activeParam: [] })
- this.setData({ pageNum: 1,dataList: [],total: 0})
+ this.setData({ pageNum: 1, activeIndex: -1, dataList: [], total: 0 })
this.getList()
},
- changeShowParams(e){
+ changeShowParams(e) {
const { cateList } = this.data
const activeIndex = e.currentTarget.dataset.index
- if(activeIndex === this.data.activeIndex){
+ if (activeIndex === this.data.activeIndex) {
this.setData({ activeIndex: -1, activeParam: [], selParam: '' })
- }else{
- this.setData({
+ } else {
+ this.setData({
activeIndex,
activeParam: cateList[activeIndex].valueVos
})
}
-
+
// this.setData({showTwo: false})
},
- changeTwo(){
+ changeTwo() {
const showTwo = !this.data.showTwo
- this.setData({showTwo})
- this.setData({showOne: false})
+ this.setData({ showTwo })
+ this.setData({ showOne: false })
},
}
})
diff --git a/wechat_jiaxuan/components/disProduct/index.js b/wechat_jiaxuan/components/disProduct/index.js
index 31babd3..ae5777e 100644
--- a/wechat_jiaxuan/components/disProduct/index.js
+++ b/wechat_jiaxuan/components/disProduct/index.js
@@ -1,4 +1,4 @@
-import { getCatalogList,getCataLogTagList, getZhongTaiProductPage } from '../../api/index'
+import { getCatalogList, getCataLogTagList, getZhongTaiProductPage } from '../../api/index'
Component({
/**
* 缁勪欢鐨勫睘鎬у垪琛�
@@ -28,20 +28,20 @@
attached() {
this.getCatelist()
var app = getApp()
- if(app.globalData.catalogCode){
+ if (app.globalData.catalogCode) {
this.setData({ catalogCode: app.globalData.catalogCode })
setTimeout(() => {
- console.log('catalogCode', this.data.catalogCode);
+ console.log('catalogCode', this.data.catalogCode)
getApp().globalData.catalogCode = ''
}, 2000)
}
},
methods: {
- getCatelist(){
+ getCatelist() {
getCatalogList({
catalogCode: 'product_intro'
}).then(res => {
- if(res.data && res.data.length > 0){
+ if (res.data && res.data.length > 0) {
this.setData({
catalogCode: this.data.catalogCode || res.data[0].code,
cateList: res.data
@@ -65,13 +65,13 @@
})
},
bindblur() {
- this.setData({ pageNum: 1,datalist: [],total: 0})
+ this.setData({ pageNum: 1, datalist: [], total: 0 })
this.getList()
},
getList() {
- const { catalogCode,tagCodes, pageNum, pageSize, sortType, query } = this.data
+ const { catalogCode, tagCodes, pageNum, pageSize, sortType, query } = this.data
getZhongTaiProductPage({
- catalogCode,pageNum,pageSize,sortType,query,tagCodes
+ catalogCode, pageNum, pageSize, sortType, query, tagCodes
}).then(res => {
this.setData({
datalist: [...this.data.datalist, ...res.data.records],
@@ -80,12 +80,12 @@
})
},
scrolltolower() {
- console.log('瑙﹀簳浜嬩欢');
+ console.log('瑙﹀簳浜嬩欢')
const { total, datalist, pageNum } = this.data
- if(total > datalist.length){
+ if (total > datalist.length) {
this.setData({ pageNum: pageNum + 1 })
this.getList()
- }else{
+ } else {
wx.showToast({
title: '鏆傛棤鏇村鏁版嵁',
icon: 'none'
@@ -93,20 +93,20 @@
}
},
scrolltoupper() {
- this.setData({ pageNum: 1,datalist: [],total: 0})
+ this.setData({ pageNum: 1, datalist: [], total: 0 })
this.getList()
},
cateClick(e) {
const catalogCode = e.currentTarget.dataset.code
this.setData({ catalogCode, tagCodes: [] })
- this.setData({ pageNum: 1,datalist: [],total: 0})
+ this.setData({ pageNum: 1, datalist: [], total: 0 })
this.getTag()
this.getList()
},
statusChange(e) {
const sortType = e.currentTarget.dataset.status
- this.setData({sortType})
- this.setData({ pageNum: 1,datalist: [],total: 0})
+ this.setData({ sortType })
+ this.setData({ pageNum: 1, datalist: [], total: 0 })
this.getList()
},
handleDetail(e) {
@@ -120,14 +120,14 @@
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){
+ console.log('code', code)
+ console.log('tagCodes', tagCodes)
+ if (index === -1) {
// 鍚宲aram閲宑ode閲嶅
- if(activeParam && activeParam.length > 0){
+ if (activeParam && activeParam.length > 0) {
activeParam.forEach(item => {
const indexTemp = tagCodes.indexOf(item.labelValueCode)
- if(indexTemp > -1){
+ if (indexTemp > -1) {
tagCodes.splice(indexTemp, 1)
}
})
@@ -135,22 +135,22 @@
tagCodes.push(code)
secondCateList[activeIndex].paramIndex = paramIndex
secondCateList[activeIndex].paramName = activeParam[paramIndex].labelValueName
- }else{
+ } else {
tagCodes.splice(index, 1)
secondCateList[activeIndex].paramIndex = -1
secondCateList[activeIndex].paramName = ''
}
this.setData({ tagCodes, secondCateList })
},
- changeShowParams(e){
+ 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){
+ console.log('activeIndex', activeIndex)
+ console.log('secondCateList', secondCateList)
+ if (activeIndex === this.data.activeIndex) {
this.setData({ activeIndex: -1, activeParam: [] })
- }else{
- this.setData({
+ } else {
+ this.setData({
activeIndex,
activeParam: secondCateList[activeIndex].valueVos
})
@@ -161,13 +161,13 @@
const { secondCateList } = this.data
secondCateList.forEach(item => {
item.paramIndex = -1
- item.paramName = ''
+ item.paramName = item.paramName || ''
})
- this.setData({ tagCodes: [],activeParam: [],secondCateList,activeIndex: -1 })
+ this.setData({ tagCodes: [], activeParam: [], secondCateList, activeIndex: -1 })
},
subParam() {
this.setData({ activeParam: [] })
- this.setData({ pageNum: 1,datalist: [],total: 0})
+ this.setData({ pageNum: 1, activeIndex: -1, datalist: [], total: 0 })
this.getList()
},
}
diff --git a/wechat_jiaxuan/components/disRealpic/index.js b/wechat_jiaxuan/components/disRealpic/index.js
index 0aea630..95e7e49 100644
--- a/wechat_jiaxuan/components/disRealpic/index.js
+++ b/wechat_jiaxuan/components/disRealpic/index.js
@@ -151,7 +151,7 @@
const { cateList } = this.data
cateList.forEach(item => {
item.paramIndex = -1
- item.paramName = ''
+ item.paramName = item.paramName || ''
})
this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 })
},
@@ -161,7 +161,7 @@
},
subParam() {
this.setData({ activeParam: [] })
- this.setData({ pageNum: 1,dataList: [],total: 0})
+ this.setData({ pageNum: 1,activeIndex: -1,dataList: [],total: 0})
this.getList()
},
changeShowParams(e){
diff --git a/wechat_jiaxuan/pages/auth/auth.js b/wechat_jiaxuan/pages/auth/auth.js
index 7c47de8..e15e1e1 100644
--- a/wechat_jiaxuan/pages/auth/auth.js
+++ b/wechat_jiaxuan/pages/auth/auth.js
@@ -10,6 +10,7 @@
data: {
agreementFalg: false,
primary: '',
+ bottomLift: 0,
showModal: false,
serviceHtml: '',
@@ -18,6 +19,10 @@
activeHtml: ''
},
initData(){
+ var app = getApp().globalData
+ this.setData({
+ bottomLift: app.bottomLift
+ })
getDictData({
code: 'ZBOM_CUSTOMIZED',
label: 'SERVER_AGREEMENT'
@@ -35,6 +40,11 @@
})
})
},
+ handleJudge(e) {
+ const flag = e.currentTarget.dataset.flag
+ console.log(e);
+ this.setData({ agreementFalg: flag, showModal: false })
+ },
loginIn() {
const { agreementFalg } = this.data
if(!agreementFalg) return wx.showToast({
diff --git a/wechat_jiaxuan/pages/auth/auth.less b/wechat_jiaxuan/pages/auth/auth.less
index b2da8d2..d7e8f3e 100644
--- a/wechat_jiaxuan/pages/auth/auth.less
+++ b/wechat_jiaxuan/pages/auth/auth.less
@@ -38,9 +38,39 @@
}
.modal{
width: 100%;
- max-height: 1120rpx;
- min-height: 600rpx;
+ height: calc( 100vh - 200rpx );
padding: 40rpx;
+ position: relative;
+ .content{
+ height: calc( 100vh - 460rpx );
+ overflow: auto;
+ margin-bottom: 20rpx;
+ }
+ .btns{
+ position: fixed;
+ padding: 20rpx 0rpx;
+ width: 100%;
+ z-index: 999;
+ border-top: 1px solid #e5e5e5;
+ .btn{
+ width: 670rpx;
+ font-weight: 500;
+ font-size: 32rpx;
+ color: #999999;
+ text-align: center;
+ margin-top: 30rpx;
+ }
+ .agree{
+ width: 670rpx;
+ height: 88rpx;
+ background: #B08771;
+ border-radius: 8rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: #fff;
+ }
+ }
}
.title{
font-weight: 600;
diff --git a/wechat_jiaxuan/pages/auth/auth.wxml b/wechat_jiaxuan/pages/auth/auth.wxml
index 5d23db3..433c859 100644
--- a/wechat_jiaxuan/pages/auth/auth.wxml
+++ b/wechat_jiaxuan/pages/auth/auth.wxml
@@ -23,7 +23,13 @@
<!-- -->
<van-popup position="bottom" show="{{ showModal }}" round bind:close="onClose">
<view class="modal">
- <mp-html content="{{activeHtml}}"></mp-html>
+ <view class="content">
+ <mp-html content="{{activeHtml}}"></mp-html>
+ </view>
+ <view style="bottom: {{ bottomLift }}px" class="btns">
+ <view data-flag="{{true}}" bindtap="handleJudge" class="agree">鍚屾剰</view>
+ <view data-flag="{{false}}" bindtap="handleJudge" class="btn">涓嶅悓鎰忓苟閫�鍑�</view>
+ </view>
</view>
</van-popup>
</view>
\ No newline at end of file
diff --git a/wechat_jiaxuan/pages/auth/auth.wxss b/wechat_jiaxuan/pages/auth/auth.wxss
index fb2824a..5b3e3d2 100644
--- a/wechat_jiaxuan/pages/auth/auth.wxss
+++ b/wechat_jiaxuan/pages/auth/auth.wxss
@@ -38,9 +38,39 @@
}
.modal {
width: 100%;
- max-height: 1120rpx;
- min-height: 600rpx;
+ height: calc(100vh - 200rpx);
padding: 40rpx;
+ position: relative;
+}
+.modal .content {
+ height: calc(100vh - 460rpx);
+ overflow: auto;
+ margin-bottom: 20rpx;
+}
+.modal .btns {
+ position: fixed;
+ padding: 20rpx 0rpx;
+ width: 100%;
+ z-index: 999;
+ border-top: 1px solid #e5e5e5;
+}
+.modal .btns .btn {
+ width: 670rpx;
+ font-weight: 500;
+ font-size: 32rpx;
+ color: #999999;
+ text-align: center;
+ margin-top: 30rpx;
+}
+.modal .btns .agree {
+ width: 670rpx;
+ height: 88rpx;
+ background: #B08771;
+ border-radius: 8rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: #fff;
}
.title {
font-weight: 600;
diff --git a/wechat_staff/components/disCase/index.js b/wechat_staff/components/disCase/index.js
index 60e2683..441e32a 100644
--- a/wechat_staff/components/disCase/index.js
+++ b/wechat_staff/components/disCase/index.js
@@ -118,9 +118,10 @@
},
cancelParam() {
const { cateList } = this.data
+ console.log('cateList', cateList);
cateList.forEach(item => {
item.paramIndex = -1
- item.paramName = ''
+ item.paramName = item.paramName || ''
})
this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 })
},
@@ -130,7 +131,7 @@
},
subParam() {
this.setData({ activeParam: [] })
- this.setData({ pageNum: 1,dataList: [],total: 0})
+ this.setData({ pageNum: 1,activeIndex: -1,dataList: [],total: 0})
this.getList()
},
changeShowParams(e){
diff --git a/wechat_staff/components/disCase/index.less b/wechat_staff/components/disCase/index.less
index f168ad9..5351968 100644
--- a/wechat_staff/components/disCase/index.less
+++ b/wechat_staff/components/disCase/index.less
@@ -171,6 +171,7 @@
margin-left: 12rpx;
.icon{
width: 28rpx;
+ height: 28rpx;
margin-right: 8rpx;
}
.num{
diff --git a/wechat_staff/components/disCase/index.wxss b/wechat_staff/components/disCase/index.wxss
index 57546c4..a00dc11 100644
--- a/wechat_staff/components/disCase/index.wxss
+++ b/wechat_staff/components/disCase/index.wxss
@@ -171,6 +171,7 @@
}
.main_content .goods_list .item .info .icon {
width: 28rpx;
+ height: 28rpx;
margin-right: 8rpx;
}
.main_content .goods_list .item .info .num {
diff --git a/wechat_staff/components/disProduct/index.js b/wechat_staff/components/disProduct/index.js
index 98967cf..3849c24 100644
--- a/wechat_staff/components/disProduct/index.js
+++ b/wechat_staff/components/disProduct/index.js
@@ -138,6 +138,7 @@
const { secondCateList } = this.data
const activeIndex = e.currentTarget.dataset.index
console.log('activeIndex', activeIndex);
+ console.log('activeIndex', this.data.activeIndex);
console.log('secondCateList', secondCateList);
if(activeIndex === this.data.activeIndex){
this.setData({ activeIndex: -1, activeParam: [] })
@@ -154,13 +155,13 @@
const { secondCateList } = this.data
secondCateList.forEach(item => {
item.paramIndex = -1
- item.paramName = ''
+ item.paramName = item.paramName || ''
})
this.setData({ tagCodes: [],activeParam: [],secondCateList,activeIndex: -1 })
},
subParam() {
this.setData({ activeParam: [] })
- this.setData({ pageNum: 1,datalist: [],total: 0})
+ this.setData({ pageNum: 1,activeIndex: -1, datalist: [],total: 0})
this.getList()
},
}
diff --git a/wechat_staff/components/disProduct/index.less b/wechat_staff/components/disProduct/index.less
index b75e32a..2557685 100644
--- a/wechat_staff/components/disProduct/index.less
+++ b/wechat_staff/components/disProduct/index.less
@@ -212,6 +212,7 @@
.icon {
width: 28rpx;
+ height: 28rpx;
margin-right: 8rpx;
}
diff --git a/wechat_staff/components/disProduct/index.wxss b/wechat_staff/components/disProduct/index.wxss
index 90b50c0..7cac77e 100644
--- a/wechat_staff/components/disProduct/index.wxss
+++ b/wechat_staff/components/disProduct/index.wxss
@@ -17,6 +17,7 @@
.app {
height: 100%;
width: 100%;
+ overflow-y: hidden;
}
.app .home_content {
height: 100%;
@@ -192,6 +193,7 @@
}
.main_content .main_right .goods_list .item .info .icon {
width: 28rpx;
+ height: 28rpx;
margin-right: 8rpx;
}
.main_content .main_right .goods_list .item .info .num {
diff --git a/wechat_staff/components/disRealpic/index.js b/wechat_staff/components/disRealpic/index.js
index 52ce1e3..000c3d7 100644
--- a/wechat_staff/components/disRealpic/index.js
+++ b/wechat_staff/components/disRealpic/index.js
@@ -149,7 +149,7 @@
const { cateList } = this.data
cateList.forEach(item => {
item.paramIndex = -1
- item.paramName = ''
+ item.paramName = item.paramName || ''
})
this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 })
},
@@ -159,7 +159,7 @@
},
subParam() {
this.setData({ activeParam: [] })
- this.setData({ pageNum: 1,dataList: [],total: 0})
+ this.setData({ pageNum: 1,activeIndex: -1,dataList: [],total: 0})
this.getList()
},
changeShowParams(e){
diff --git a/wechat_staff/components/disRealpic/index.less b/wechat_staff/components/disRealpic/index.less
index 8064645..3bf0fcd 100644
--- a/wechat_staff/components/disRealpic/index.less
+++ b/wechat_staff/components/disRealpic/index.less
@@ -182,6 +182,7 @@
.icon {
width: 24rpx;
+ height: 24rpx;
margin-right: 4rpx;
}
}
@@ -222,6 +223,7 @@
.icon {
width: 28rpx;
+ height: 28rpx;
margin-right: 8rpx;
}
diff --git a/wechat_staff/components/disRealpic/index.wxss b/wechat_staff/components/disRealpic/index.wxss
index a0a1dd5..2f65c46 100644
--- a/wechat_staff/components/disRealpic/index.wxss
+++ b/wechat_staff/components/disRealpic/index.wxss
@@ -167,6 +167,7 @@
}
.main_content .goods_list .item .img_wrap .full .icon {
width: 24rpx;
+ height: 24rpx;
margin-right: 4rpx;
}
.main_content .goods_list .item .img_wrap .img {
@@ -200,6 +201,7 @@
}
.main_content .goods_list .item .info .icon {
width: 28rpx;
+ height: 28rpx;
margin-right: 8rpx;
}
.main_content .goods_list .item .info .num {
diff --git a/wechat_staff/static/images/home_img_weixiaoxd@2x.png b/wechat_staff/static/images/home_img_weixiaoxd@2x.png
deleted file mode 100644
index c6334b5..0000000
--- a/wechat_staff/static/images/home_img_weixiaoxd@2x.png
+++ /dev/null
Binary files differ
diff --git a/wechat_staff/static/test.png b/wechat_staff/static/test.png
deleted file mode 100644
index 4820384..0000000
--- a/wechat_staff/static/test.png
+++ /dev/null
Binary files differ
--
Gitblit v1.9.3