| | |
| | | }, 1000) |
| | | }) |
| | | }, |
| | | handleJudge(e) { |
| | | const flag = e.currentTarget.dataset.flag |
| | | console.log(e); |
| | | this.setData({ agreementFalg: flag, showModal: false }) |
| | | }, |
| | | loginPhone() { |
| | | const { |
| | | code, |
| | |
| | | onLoad(options) { |
| | | var app = getApp().globalData |
| | | this.setData({ |
| | | primary: app.primary |
| | | primary: app.primary, |
| | | bottomLift: app.bottomLift |
| | | }) |
| | | this.initData() |
| | | }, |
| | |
| | | } |
| | | .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; |
| | | .reject{ |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | |
| | | <!-- --> |
| | | <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="reject">不同意并退出</view> |
| | | </view> |
| | | </view> |
| | | </van-popup> |
| | | </view> |
| | |
| | | border-radius: 50%; |
| | | margin: 130rpx auto 30rpx; |
| | | } |
| | | |
| | | .home_title { |
| | | font-weight: 500; |
| | | font-size: 40rpx; |
| | |
| | | flex: 1; |
| | | } |
| | | .modal { |
| | | width: 600rpx; |
| | | min-height: 600rpx; |
| | | padding: 30rpx; |
| | | width: 100%; |
| | | 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 .reject { |
| | | 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; |
| | | } |
| | |
| | | // pages/sets/index.js |
| | | |
| | | import { logout } from '../../api/index' |
| | | import { |
| | | logout |
| | | } from '../../api/index' |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | |
| | | }, |
| | | showLogout() { |
| | | this.setData({show: true}) |
| | | wx.showModal({ |
| | | title: '提示', |
| | | content: '确认退出登录', |
| | | success(res) { |
| | | if (res.confirm) { |
| | | logout({}).then(res => { |
| | | wx.setStorageSync('member', null) |
| | | wx.setStorageSync('token', '') |
| | | wx.navigateTo({ |
| | | url: '/pages/login/index', |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | onClose() { |
| | | this.setData({show: false}) |
| | | }, |
| | | changeDeal(e){ |
| | | wx.navigateTo({ |
| | | url: '/pages/sets/protocol?type='+e.currentTarget.dataset.index, |
| | | this.setData({ |
| | | show: false |
| | | }) |
| | | }, |
| | | logout(){ |
| | | logout({ |
| | | }).then(res => { |
| | | wx.setStorageSync('member', null) |
| | | wx.setStorageSync('token', '') |
| | | wx.navigateTo({ |
| | | url: '/pages/login/index', |
| | | }) |
| | | }) |
| | | changeDeal(e) { |
| | | wx.navigateTo({ |
| | | url: '/pages/sets/protocol?type=' + e.currentTarget.dataset.index, |
| | | }) |
| | | }, |
| | | logout() { |
| | | |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | |
| | | } |
| | | .icon{ |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | } |
| | | } |
| | | } |
| | | .logout{ |
| | | width: 670rpx; |
| | | height: 88rpx; |
| | | line-height: 86rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-radius: 8rpx; |
| | | border: 1rpx solid #B08771; |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | | color: #B08771; |
| | | display: flex; |
| | | margin-top: 100rpx; |
| | | .icon{ |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | } |
| | | } |
| | | .modal{ |
| | | width: 610rpx; |
| | | height: 450rpx; |
| | |
| | | <view class="name">《ZBOM用户隐私协议》</view> |
| | | <image class="icon" src="../../static/icon/home_ar@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="line" bindtap="showLogout"> |
| | | <view class="name">注销账号</view> |
| | | <image class="icon" src="../../static/icon/home_ar@2x.png" mode="widthFix"></image> |
| | | <view class="logout" bindtap="showLogout"> |
| | | <view class="name">退出登录</view> |
| | | </view> |
| | | </view> |
| | | <!-- --> |
| | |
| | | } |
| | | .list .line .icon { |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | } |
| | | .logout { |
| | | width: 670rpx; |
| | | height: 88rpx; |
| | | line-height: 86rpx; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-radius: 8rpx; |
| | | border: 1rpx solid #B08771; |
| | | font-weight: 500; |
| | | font-size: 32rpx; |
| | | color: #B08771; |
| | | display: flex; |
| | | margin-top: 100rpx; |
| | | } |
| | | .logout .icon { |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | } |
| | | .modal { |
| | | width: 610rpx; |