Commit d6a592a7 by chenwq

卡片样式

1 parent a7cb7ed6
// pages/tab/output/components/BusiCard/BusiCard.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* pages/tab/output/components/BusiCard/BusiCard.wxss */
\ No newline at end of file
<!--pages/tab/output/components/BusiCard/BusiCard.wxml-->
<text>pages/tab/output/components/BusiCard/BusiCard.wxml</text>
......@@ -19,10 +19,12 @@ Component({
tabActive: 'store',
// tabActive: 'business',
formData: {
// 0:全部-1;1:精品升级SC002;2:售后众筹SC004;3:会员权益/升级SC001
busiIdx: 0,
// 全部,精品升级,会员权益
sceneCode: '-1',
// 时间筛选Idx(全部,精品升级,会员权益)
timeIdx: 0,
// 售后众筹
// 产品/状态筛选Idx(售后众筹)
proIdx: 0,
statusIdx: 0
},
......@@ -52,19 +54,6 @@ Component({
* 组件的方法列表
*/
methods: {
// resetAllSearch() {
// this.setData({
// formData: {
// busiIdx: 0,
// // 全部,精品升级,会员权益
// timeIdx: 0,
// // 售后众筹
// proIdx: 0,
// statusIdx: 0
// }
// })
// },
resetBusiSearch() {
this.setData({
['formData.timeIdx']: 0,
......@@ -94,11 +83,12 @@ Component({
name: '全部',
sceneCode: '-1'
}]
scenceList.forEach(item => {
if (busiOptSceneCode.includes(item.sceneCode)) {
busiOptSceneCode.forEach(item => {
let _target = scenceList.find(k => k.sceneCode == item)
if (_target) {
list.push({
name: item.name,
sceneCode: item.sceneCode
name: _target.name,
sceneCode: _target.sceneCode
})
}
})
......@@ -129,7 +119,8 @@ Component({
success: res => {
this.resetBusiSearch()
this.setData({
['formData.busiIdx']: res.tapIndex
['formData.busiIdx']: res.tapIndex,
['formData.sceneCode']: busiOptSceneCode[res.tapIndex]
})
this.handleBusiSearch()
}
......
......@@ -30,10 +30,12 @@ Component({
tabActive: 'store',
merchantList: [],
formData: {
// 0:全部-1;1:精品升级SC002;2:售后众筹SC004;3:会员权益/升级SC001
busiIdx: 0,
// 全部,精品升级,会员权益
sceneCode: '-1',
// 时间筛选Idx(全部,精品升级,会员权益)
timeIdx: 0,
// 售后众筹
// 产品/状态筛选Idx(售后众筹)
proIdx: 0,
statusIdx: 0
},
......@@ -42,6 +44,7 @@ Component({
attached() {
wx.$eventbus.on('clientRefresh', res => {
this.clientRefresh()
this.getBusinessData()
})
this.getPMerchantInfo()
this.getBusinessData()
......@@ -88,7 +91,7 @@ Component({
let params = {
...busiSearchData,
merchantIds: merchantList.map(item => item.merchantId)
// merchantIds: ['44211227', '44211547', '10011000']
// merchantIds: ['44211227', '44211547', '10011000', '44184606', '44209535']
}
this.setData({
formData: JSON.parse(JSON.stringify(totalTabModule.data.formData))
......
......@@ -2,6 +2,7 @@
"component": true,
"usingComponents": {
"scene-box": "../../../../../components/SceneBox/SceneBox",
"total-tab": "../TotalTab/TotalTab"
"total-tab": "../TotalTab/TotalTab",
"busi-card": "../BusiCard/BusiCard"
}
}
\ No newline at end of file
......@@ -54,15 +54,11 @@
</view>
</scroll-view>
<scroll-view wx:if="{{tabActive == 'business'}}" class="client" scroll-y="{{true}}" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}" bindrefresherrefresh="onBindRefresh" lower-threshold='50' scroll-top="{{scrollTop}}">
<!-- 全部 -->
<view wx:if="{{formData.busiIdx == 0}}">
<view></view>
</view>
<!-- 精品升级 -->
<view wx:if="{{formData.busiIdx == 1}}">精品升级</view>
<!-- 售后众筹 -->
<view wx:if="{{formData.busiIdx == 2}}">售后众筹</view>
<!-- 会员权益/升级 -->
<view wx:if="{{formData.busiIdx == 3}}">会员权益/升级</view>
<view wx:if="{{formData.sceneCode == 'SC004'}}">售后众筹</view>
<!-- 0:全部;1:精品升级;3:会员权益/升级 -->
<view wx:else>
<busi-card></busi-card>
</view>
</scroll-view>
<crowdfund-poster item="{{posterItem}}" id="poster" scrollImg="{{false}}" bindlongtouch="longtouch" />
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!