| | |
| | | |
| | | methods: { |
| | | onChange(event) { |
| | | |
| | | this.setData({ active: event.detail.value }); |
| | | wx.switchTab({ |
| | | url: this.data.list[event.detail.value].url.startsWith('/') |
| | |
| | | moreMenu, |
| | | moreMenu1, |
| | | visible: false, |
| | | |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | |
| | | }, |
| | | //修改用户类型 |
| | | editUserType() { |
| | | this.setData({ |
| | | visible: true, |
| | | }); |
| | | console.log(44) |
| | | if (!this.data.visible) { |
| | | this.setData({ |
| | | visible: true, |
| | | }); |
| | | } |
| | | }, |
| | | onVisibleChange(e) { |
| | | this.setData({ |
| | |
| | | "navigationStyle": "custom", |
| | | "usingComponents": { |
| | | "t-user-center-card": "./components/user-center-card/index", |
| | | "t-image": "tdesign-miniprogram/image/image" |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | | "t-popup": "tdesign-miniprogram/popup/popup" |
| | | }, |
| | | "enablePullDownRefresh": true |
| | | } |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <t-popup visible="{{visible}}" bind:visible-change="onVisibleChange" placement="bottom"> |
| | | <view class="block"> |
| | | <view class="header"> |
| | | <view class="btn btn--cancel" aria-role="button">取消</view> |
| | | <view class="title">标题文字</view> |
| | | <view class="btn btn--confirm" aria-role="button">确定</view> |
| | | <t-popup visible="{{visible}}" bind:visible-change="onVisibleChange" placement="bottom"> |
| | | <view class="block"> |
| | | <view class="header"> |
| | | <view class="title">请选择您的用户类型</view> |
| | | </view> |
| | | <view class="body"> |
| | | <view wx:for="{{userTypeList}}" wx:for-item="item" wx:for-index="index" wx:key="index" data-info="{{item}}" bindtap="tabUserTypeClick" :class="item.value == userTypeActive ? 'activeItem item hover' : 'item hover'"> |
| | | {{ item.lable }} |
| | | </view> |
| | | </view> |
| | | <view class="footer"> |
| | | <button class="submit" bindtap="submit">提交</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </t-popup> |
| | | </t-popup> |
| | | </view> |
| | |
| | | line-height: 40rpx; |
| | | text-align: center; |
| | | margin-top: 20rpx; |
| | | } |
| | | |
| | | .block { |
| | | width: 100vw; |
| | | height: 240px; |
| | | background: #fff; |
| | | border-top-left-radius: 16rpx; |
| | | border-top-right-radius: 16rpx; |
| | | } |
| | | |
| | | .header { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 116rpx; |
| | | } |
| | | |
| | | .title { |
| | | flex: 1; |
| | | text-align: center; |
| | | font-weight: 600; |
| | | font-size: 36rpx; |
| | | } |