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 \ No newline at end of file
/* pages/tab/output/components/BusiCard/BusiCard.wxss */
\ No newline at end of file \ 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({ ...@@ -19,10 +19,12 @@ Component({
tabActive: 'store', tabActive: 'store',
// tabActive: 'business', // tabActive: 'business',
formData: { formData: {
// 0:全部-1;1:精品升级SC002;2:售后众筹SC004;3:会员权益/升级SC001
busiIdx: 0, busiIdx: 0,
// 全部,精品升级,会员权益 sceneCode: '-1',
// 时间筛选Idx(全部,精品升级,会员权益)
timeIdx: 0, timeIdx: 0,
// 售后众筹 // 产品/状态筛选Idx(售后众筹)
proIdx: 0, proIdx: 0,
statusIdx: 0 statusIdx: 0
}, },
...@@ -52,19 +54,6 @@ Component({ ...@@ -52,19 +54,6 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
// resetAllSearch() {
// this.setData({
// formData: {
// busiIdx: 0,
// // 全部,精品升级,会员权益
// timeIdx: 0,
// // 售后众筹
// proIdx: 0,
// statusIdx: 0
// }
// })
// },
resetBusiSearch() { resetBusiSearch() {
this.setData({ this.setData({
['formData.timeIdx']: 0, ['formData.timeIdx']: 0,
...@@ -94,11 +83,12 @@ Component({ ...@@ -94,11 +83,12 @@ Component({
name: '全部', name: '全部',
sceneCode: '-1' sceneCode: '-1'
}] }]
scenceList.forEach(item => { busiOptSceneCode.forEach(item => {
if (busiOptSceneCode.includes(item.sceneCode)) { let _target = scenceList.find(k => k.sceneCode == item)
if (_target) {
list.push({ list.push({
name: item.name, name: _target.name,
sceneCode: item.sceneCode sceneCode: _target.sceneCode
}) })
} }
}) })
...@@ -129,7 +119,8 @@ Component({ ...@@ -129,7 +119,8 @@ Component({
success: res => { success: res => {
this.resetBusiSearch() this.resetBusiSearch()
this.setData({ this.setData({
['formData.busiIdx']: res.tapIndex ['formData.busiIdx']: res.tapIndex,
['formData.sceneCode']: busiOptSceneCode[res.tapIndex]
}) })
this.handleBusiSearch() this.handleBusiSearch()
} }
......
...@@ -30,10 +30,12 @@ Component({ ...@@ -30,10 +30,12 @@ Component({
tabActive: 'store', tabActive: 'store',
merchantList: [], merchantList: [],
formData: { formData: {
// 0:全部-1;1:精品升级SC002;2:售后众筹SC004;3:会员权益/升级SC001
busiIdx: 0, busiIdx: 0,
// 全部,精品升级,会员权益 sceneCode: '-1',
// 时间筛选Idx(全部,精品升级,会员权益)
timeIdx: 0, timeIdx: 0,
// 售后众筹 // 产品/状态筛选Idx(售后众筹)
proIdx: 0, proIdx: 0,
statusIdx: 0 statusIdx: 0
}, },
...@@ -42,6 +44,7 @@ Component({ ...@@ -42,6 +44,7 @@ Component({
attached() { attached() {
wx.$eventbus.on('clientRefresh', res => { wx.$eventbus.on('clientRefresh', res => {
this.clientRefresh() this.clientRefresh()
this.getBusinessData()
}) })
this.getPMerchantInfo() this.getPMerchantInfo()
this.getBusinessData() this.getBusinessData()
...@@ -88,7 +91,7 @@ Component({ ...@@ -88,7 +91,7 @@ Component({
let params = { let params = {
...busiSearchData, ...busiSearchData,
merchantIds: merchantList.map(item => item.merchantId) merchantIds: merchantList.map(item => item.merchantId)
// merchantIds: ['44211227', '44211547', '10011000'] // merchantIds: ['44211227', '44211547', '10011000', '44184606', '44209535']
} }
this.setData({ this.setData({
formData: JSON.parse(JSON.stringify(totalTabModule.data.formData)) formData: JSON.parse(JSON.stringify(totalTabModule.data.formData))
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"scene-box": "../../../../../components/SceneBox/SceneBox", "scene-box": "../../../../../components/SceneBox/SceneBox",
"total-tab": "../TotalTab/TotalTab" "total-tab": "../TotalTab/TotalTab",
"busi-card": "../BusiCard/BusiCard"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -54,15 +54,11 @@ ...@@ -54,15 +54,11 @@
</view> </view>
</scroll-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}}"> <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.sceneCode == 'SC004'}}">售后众筹</view>
<!-- 会员权益/升级 --> <!-- 0:全部;1:精品升级;3:会员权益/升级 -->
<view wx:if="{{formData.busiIdx == 3}}">会员权益/升级</view> <view wx:else>
<busi-card></busi-card>
</view>
</scroll-view> </scroll-view>
<crowdfund-poster item="{{posterItem}}" id="poster" scrollImg="{{false}}" bindlongtouch="longtouch" /> <crowdfund-poster item="{{posterItem}}" id="poster" scrollImg="{{false}}" bindlongtouch="longtouch" />
\ No newline at end of file \ 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!