|
|
@@ -1,8 +1,14 @@
|
|
|
<style lang="less">
|
|
|
@import './index';
|
|
|
+.container {
|
|
|
+ padding: 0 !important;
|
|
|
+}
|
|
|
.userinfo {
|
|
|
+ min-height: 100%;
|
|
|
position: relative;
|
|
|
- margin-bottom: 50rpx;
|
|
|
+ // padding-bottom: 50rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 0 66rpx;
|
|
|
// padding:0 1em;
|
|
|
// padding:0 1em;
|
|
|
.avatar {
|
|
|
@@ -67,6 +73,106 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+.login-content {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ height: 100%;
|
|
|
+ position: fixed;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ width: 100%;
|
|
|
+ padding: 0 66rpx;
|
|
|
+ .logo {
|
|
|
+ width: 638rpx;
|
|
|
+ height: 288rpx;
|
|
|
+ margin-bottom: 186rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .login-input {
|
|
|
+ width: 620rpx;
|
|
|
+ height: 80rpx;
|
|
|
+ background: rgba(255, 255, 255, 1);
|
|
|
+ box-shadow: 4rpx 4rpx 28rpx 0px rgba(0, 0, 0, 0.1);
|
|
|
+ border-radius: 40rpx;
|
|
|
+ padding: 0 48rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ font-size: 28rpx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ input {
|
|
|
+ flex-grow: 1;
|
|
|
+ position: relative;
|
|
|
+ z-index: 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ico-cancel {
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ right: 48rpx;
|
|
|
+ width: 45rpx;
|
|
|
+ height: 45rpx;
|
|
|
+ border-radius: 100%;
|
|
|
+ background: #aaa;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ color: transparent;
|
|
|
+ z-index: 2;
|
|
|
+
|
|
|
+ &:after,
|
|
|
+ &:before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ width: 60%;
|
|
|
+ height: 1px;
|
|
|
+ background: #fff;
|
|
|
+ transform: translate(-50%, -50%) rotate(45deg) scaleY(0.5);
|
|
|
+ }
|
|
|
+ &:before {
|
|
|
+ transform: translate(-50%, -50%) rotate(-45deg) scaleY(0.5);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ button {
|
|
|
+ width: 620rpx;
|
|
|
+ height: 80rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
+ margin-top: 30rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .rule {
|
|
|
+ margin-top: 78rpx;
|
|
|
+ .icon {
|
|
|
+ display: inline-flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ width: 32rpx;
|
|
|
+ height: 32rpx;
|
|
|
+ border: 1px solid #cacaca;
|
|
|
+ border-radius: 50%;
|
|
|
+ color: #cacaca;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 1;
|
|
|
+ font-size: 16px;
|
|
|
+ font-family: Arial, Roboto, system-ui, PingFang SC, STHeiti, sans-serif;
|
|
|
+
|
|
|
+ &:after {
|
|
|
+ // content: attr(data-text);
|
|
|
+ content: 'i';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ text {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: rgba(153, 153, 153, 1);
|
|
|
+ line-height: 34rpx;
|
|
|
+ margin-left: 10rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
.weui-cell_input {
|
|
|
// margin: 50rpx -30rpx;
|
|
|
margin: 50rpx 0;
|
|
|
@@ -135,6 +241,7 @@
|
|
|
|
|
|
.weui-cells_after-title {
|
|
|
margin: 40rpx 0 0;
|
|
|
+ padding: 0 66rpx;
|
|
|
&::before,
|
|
|
&::after {
|
|
|
display: none;
|
|
|
@@ -179,18 +286,33 @@
|
|
|
@tap="goto" data-url="../help/help" data-alway />
|
|
|
</block>
|
|
|
<!-- 未登录时 -->
|
|
|
- <view wx:if="{{!hasLogin && hasLogin!=null}}" class="login">
|
|
|
- <view class="login_decorate">
|
|
|
+ <view wx:if="{{!hasLogin && hasLogin!=null}}" class="login login-content">
|
|
|
+ <!-- <view class="login_decorate">
|
|
|
<i class="planet" />
|
|
|
<i class="planet" />
|
|
|
<i class="planet" />
|
|
|
<i class="planet" />
|
|
|
<image src="{{loginImag_film}}" mode="aspectFit"
|
|
|
lazy-load="false" />
|
|
|
- </view>
|
|
|
- <button size="defult" type="defult" form-type="submit"
|
|
|
- open-type="getUserInfo" bindgetuserinfo="bindLogin"
|
|
|
- @getuserinfo="getUserInfo">微信登录</button>
|
|
|
+ </view> -->
|
|
|
+ <image src="/images/img_0000.png" alt="" class="logo">
|
|
|
+ <!-- <input class="login-input" placeholder="输入您的兑换码" placeholder-style="color:#C9CCCF" /> -->
|
|
|
+ <view class="login-input">
|
|
|
+ <input placeholder="输入您的兑换码"
|
|
|
+ bindinput="onChangeCode"
|
|
|
+ value="{{coupon_code}}" />
|
|
|
+ <view wx:if="{{!!coupon_code}}" class="ico-cancel"
|
|
|
+ @tap.stop="cancelInput">X</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <button size="defult" type="defult" form-type="submit"
|
|
|
+ open-type="getUserInfo" bindgetuserinfo="bindLogin"
|
|
|
+ @getuserinfo="getUserInfo">添加</button>
|
|
|
+
|
|
|
+ <div wx:if="{{!!DataList.total}}" class="rule" data-url="../help/help" data-alway @tap="goto">
|
|
|
+ <i class="icon" />
|
|
|
+ <text>换票规则</text>
|
|
|
+ </div>
|
|
|
</view>
|
|
|
<!-- 已登录没券没订单 -->
|
|
|
<view
|
|
|
@@ -217,6 +339,25 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <!-- <view wx:if="{{!!hasLogin && hasLogin!=null}}" class="login login-content">
|
|
|
+ <image src="/images/img_0000.png" alt="" class="logo">
|
|
|
+ <view class="login-input">
|
|
|
+ <input placeholder="输入您的兑换码"
|
|
|
+ bindinput="onChangeCode"
|
|
|
+ value="{{!coupon_code ? '' : coupon_code}}" />
|
|
|
+ <view wx:if="{{!!coupon_code}}" class="ico-cancel"
|
|
|
+ @tap.stop="cancelInput">X</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <button size="defult" @tap='submitCouponCode'>添加</button>
|
|
|
+
|
|
|
+ <div class="rule" @tap="goto">
|
|
|
+ <i wx:if="{{!!DataList.total}}" class="icon"
|
|
|
+ data-url="../help/help" data-alway />
|
|
|
+ <text>换票规则</text>
|
|
|
+ </div>
|
|
|
+ </view> -->
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
<!-- 主要信息区 -->
|
|
|
@@ -292,14 +433,7 @@ import wepy from 'wepy';
|
|
|
import Overlay from '../../components/Overlay';
|
|
|
import Toast from 'wepy-com-toast';
|
|
|
import { iconWarning, icondSuccess } from '../../utils/icon.js';
|
|
|
-import {
|
|
|
- fecthVerifyDiscountCode,
|
|
|
- fecthVerifyDiscountList,
|
|
|
- fecthVerifyDiscount,
|
|
|
- fetchOrder,
|
|
|
- fetchOrderTotal,
|
|
|
- fecthUserUpdate
|
|
|
-} from '../../utils/api.js';
|
|
|
+import { fecthVerifyDiscountCode, fecthVerifyDiscountList, fecthVerifyDiscount, fetchOrder, fetchOrderTotal, fecthUserUpdate } from '../../utils/api.js';
|
|
|
import http from '../../utils/http.js';
|
|
|
|
|
|
let loginImag = '../../images/img_tickes.png';
|
|
|
@@ -330,11 +464,13 @@ export default class GroupBuying extends wepy.page {
|
|
|
normalEnter: null, // 首次进入走 onlond
|
|
|
|
|
|
whereFrom: null,
|
|
|
- retryTimes: 1
|
|
|
+ retryTimes: 1,
|
|
|
+ showLogin: false
|
|
|
};
|
|
|
computed = {};
|
|
|
methods = {
|
|
|
goto(e) {
|
|
|
+ console.log(e.currentTarget.dataset.total);
|
|
|
let total = e.currentTarget.dataset.total,
|
|
|
url = e.currentTarget.dataset.url,
|
|
|
// 一直显示
|
|
|
@@ -367,6 +503,7 @@ export default class GroupBuying extends wepy.page {
|
|
|
console.log(e)
|
|
|
}, */
|
|
|
cancelInput() {
|
|
|
+ console.log('aaaaaaa');
|
|
|
this.coupon_code = null;
|
|
|
// this.$apply()
|
|
|
},
|
|
|
@@ -518,16 +655,8 @@ export default class GroupBuying extends wepy.page {
|
|
|
}
|
|
|
|
|
|
async synchrodata() {
|
|
|
- console.log(
|
|
|
- 'synchrodata:::',
|
|
|
- this.hasLogin,
|
|
|
- this.$parent.globalData.hasLogin
|
|
|
- );
|
|
|
- console.log(
|
|
|
- 'synchrodata-user:::',
|
|
|
- this.$parent.globalData.user,
|
|
|
- this.$parent.globalData.userInfo
|
|
|
- );
|
|
|
+ console.log('synchrodata:::', this.hasLogin, this.$parent.globalData.hasLogin);
|
|
|
+ console.log('synchrodata-user:::', this.$parent.globalData.user, this.$parent.globalData.userInfo);
|
|
|
|
|
|
if (this.hasLogin != null && this.hasLogin == false) {
|
|
|
this.$apply();
|
|
|
@@ -562,21 +691,13 @@ export default class GroupBuying extends wepy.page {
|
|
|
}
|
|
|
async onShow() {
|
|
|
if (!!this.$parent.globalData.hasLogin) {
|
|
|
- console.log(
|
|
|
- 'onShow',
|
|
|
- this.hasLogin,
|
|
|
- this.$parent.globalData.hasLogin
|
|
|
- );
|
|
|
+ console.log('onShow', this.hasLogin, this.$parent.globalData.hasLogin);
|
|
|
this.hasLogin = this.$parent.globalData.hasLogin;
|
|
|
await this.synchrodata();
|
|
|
return;
|
|
|
}
|
|
|
this.$parent.observable.on('login', () => {
|
|
|
- console.log(
|
|
|
- 'onShow-1',
|
|
|
- this.hasLogin,
|
|
|
- this.$parent.globalData.hasLogin
|
|
|
- );
|
|
|
+ console.log('onShow-1', this.hasLogin, this.$parent.globalData.hasLogin);
|
|
|
this.hasLogin = this.$parent.globalData.hasLogin;
|
|
|
!!this.$parent.globalData.hasLogin && this.synchrodata();
|
|
|
});
|