Commit c7d19ad2 by zhangxw

接口对接

1 parent 24ebd916
...@@ -205,7 +205,6 @@ Component({ ...@@ -205,7 +205,6 @@ Component({
let { userInfo, formData, staffList, sceneList } = this.data let { userInfo, formData, staffList, sceneList } = this.data
formData.sceneType = sceneList.filter(val => val.active)[0]?.id || '' formData.sceneType = sceneList.filter(val => val.active)[0]?.id || ''
formData.staffUUIDs = staffList.filter(val => val.active).map(subVal => {if (subVal.uuid) return subVal.uuid}) formData.staffUUIDs = staffList.filter(val => val.active).map(subVal => {if (subVal.uuid) return subVal.uuid})
formData.shopMerchantIds =
this.triggerEvent('screenFlag') this.triggerEvent('screenFlag')
const thisPage = wx.$router.getPageInstance() const thisPage = wx.$router.getPageInstance()
if (formData?.partnerMerchantIds[0] !== userInfo.subLoginUser.merchantId) { if (formData?.partnerMerchantIds[0] !== userInfo.subLoginUser.merchantId) {
......
...@@ -21,6 +21,7 @@ Component({ ...@@ -21,6 +21,7 @@ Component({
type: Boolean, type: Boolean,
value: false value: false
}, },
tabBoxStyle: String,
index: { index: {
type: Number, type: Number,
observer: function (n) { observer: function (n) {
......
<wxs src="./Tab.wxs" module="filterUtils" /> <wxs src="./Tab.wxs" module="filterUtils" />
<block> <block>
<scroll-view class="tab-box flex" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}" enhanced="{{true}}" show-scrollbar="{{false}}" style="{{tabHeight ? 'height: 88rpx;' : ''}}"> <scroll-view class="tab-box flex" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}" enhanced="{{true}}" show-scrollbar="{{false}}" style="{{tabBoxStyle}}">
<block wx:for="{{tab}}" wx:key="index"> <block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index==count?'active':''}}" style="width:{{itemWidth}}; margin-left: 32rpx" bindtap="click" data-count="{{index}}"> <view class="tab {{index==count?'active':''}}" style="width:{{itemWidth}}; margin-left: 32rpx" bindtap="click" data-count="{{index}}">
<view class="text text-center" style="{{tabHeight ? 'height: 88rpx;' : ''}}">{{item}}</view> <view class="text text-center" style="{{tabBoxStyle}}">{{item}}</view>
<view wx:if="{{!noLine}}" class="line" style="{{tabHeight ? 'margin-top: 6rpx;' : ''}}" /> <view wx:if="{{!noLine}}" class="line" style="{{tabHeight ? 'margin-top: 6rpx;' : ''}}" />
</view> </view>
</block> </block>
......
...@@ -14,6 +14,7 @@ Component({ ...@@ -14,6 +14,7 @@ Component({
observer: function (n) { observer: function (n) {
if (n) { if (n) {
let { merchantRange, selectInfo } = this.data let { merchantRange, selectInfo } = this.data
console.log(selectInfo)
let activeIndex = merchantRange.findIndex(v => v.merchantId == selectInfo.shopMerchantIds[0]) let activeIndex = merchantRange.findIndex(v => v.merchantId == selectInfo.shopMerchantIds[0])
if (merchantRange.length) merchantRange.unshift({merchantId: '', merchantName: '全部'}) if (merchantRange.length) merchantRange.unshift({merchantId: '', merchantName: '全部'})
merchantRange.forEach((item, ind) => { merchantRange.forEach((item, ind) => {
......
...@@ -31,7 +31,8 @@ Page({ ...@@ -31,7 +31,8 @@ Page({
sceneType: '', sceneType: '',
staffUUIDs: [] staffUUIDs: []
}, },
isShowFilterScreen: false isShowFilterScreen: false,
tabBoxStyle: ''
}, },
back() { back() {
this.setData({ this.setData({
...@@ -52,7 +53,8 @@ Page({ ...@@ -52,7 +53,8 @@ Page({
navbarReady(e) { navbarReady(e) {
let { height, statusBarHeight } = e.detail let { height, statusBarHeight } = e.detail
this.setData({ this.setData({
tabBarStyle: height / 2 + statusBarHeight tabBarStyle: height / 2 + statusBarHeight,
tabBoxStyle: `height: ${height}rpx`
}) })
}, },
changeTabIndx(e) { changeTabIndx(e) {
......
<!-- pages/tab/output/output.wxml --> <!-- pages/tab/output/output.wxml -->
<navigation-bar navStyle="{{isShowFilterScreen ? 'background: #fff;' : navStyle}}" bindnavbarReady="navbarReady" navBarBoxStyle="{{!isShowFilterScreen ? navBarBoxStyle : 'justify-content: center;align-items: center'}}" navTitleStyle="{{navTitleStyle}}"> <navigation-bar navStyle="{{isShowFilterScreen ? 'background: #fff;' : navStyle}}" bindnavbarReady="navbarReady" navBarBoxStyle="{{!isShowFilterScreen ? navBarBoxStyle : 'justify-content: center;align-items: center'}}" navTitleStyle="{{navTitleStyle}}">
<block> <block>
<tab wx:if="{{!isShowFilterScreen}}" noLine="{{true}}" tab="{{tabList}}" itemWidth="{{'136rpx'}}" index="{{tabIndx}}" tabHeight unreadClueCount="{{unreadClueCount}}" bindclick="changeTabIndx" class="tabContainer" /> <tab wx:if="{{!isShowFilterScreen}}" noLine="{{true}}" tab="{{tabList}}" itemWidth="{{'136rpx'}}" tabBoxStyle="{{tabBoxStyle}}" index="{{tabIndx}}" unreadClueCount="{{unreadClueCount}}" bindclick="changeTabIndx" class="tabContainer" />
<view class="screen_box"> <view class="screen_box">
<screen-box id="screenBox" formData="{{screenFormData}}" tabType="{{tabIndx}}" tabBarStyle="{{tabBarStyle}}" isShowFilterScreen="{{isShowFilterScreen}}" bindconfirm="screenConfirm"></screen-box> <screen-box id="screenBox" formData="{{screenFormData}}" tabType="{{tabIndx}}" tabBarStyle="{{tabBarStyle}}" isShowFilterScreen="{{isShowFilterScreen}}" bindconfirm="screenConfirm"></screen-box>
</view> </view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!