panhui 6 лет назад
Родитель
Сommit
51b2c3c2f1

+ 3 - 3
common/style/widget/weui-button/weui-button.less

@@ -11,7 +11,7 @@
 }
 
 button {
-    @colorButton: #F16E24;
+    @colorButton: #FE6A0F;
 
     display: flex;
     justify-content:center;
@@ -24,8 +24,8 @@ button {
         linear,
         5% 0%,
         80% 100%,
-        from(#F9C04A),
-        to(#F16E24)
+        from(#FE6A0F),
+        to(#FE6A0F)
         // from(#4AF3F9),
         // to(#2475F1)
         );

BIN
src/images/img_0000.png


BIN
src/images/img_moren@3x.png


+ 6 - 6
src/pages/index/index.less

@@ -4,7 +4,7 @@
 @main-color: #F16F24;
 @borderColor: #eee;
 
-@cardMinHeight: 250rpx;
+@cardMinHeight: 230rpx;
 .GroupBuying{
     padding-bottom: @gap!important;
 /*     .banner{
@@ -46,6 +46,7 @@
         > view{
             position: relative;
             overflow: hidden;
+            padding: 0 66rpx;
             height: @cardMinHeight;
         }
 
@@ -58,7 +59,7 @@
             right: -10px;
             height: 1rpx;
             // background: pink;
-            box-shadow: 0 -10px 14px rgba(0, 0, 0, 0.9);
+            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
         }
     }
     .weui-media-box{
@@ -79,7 +80,7 @@
     padding: 0;
     background: linear-gradient(135deg, #ffd284, #FFA44E);
     border-radius: 40rpx;
-    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
+    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
     color: #fff;
 
     &[data-hasUsed='true']{
@@ -126,8 +127,7 @@
         // background-color: rgba(0, 0, 0, 0.17);
         background-image:
             radial-gradient(circle at center 0%,#fff 20rpx, transparent 0),
-            radial-gradient(circle at center 100%,#fff 20rpx, transparent 0),
-            linear-gradient(#fff 20px, transparent 10px);
+            radial-gradient(circle at center 100%,#fff 20rpx, transparent 0);
         background-size: auto, auto, 4rpx 80rpx;
         background-repeat: no-repeat, no-repeat, repeat-y;
         background-position: 50% 0, 50% 0, 50% 300rpx;
@@ -165,7 +165,7 @@
         }
     }
     &[data-kind='4']{
-        background: linear-gradient(135deg, #F9C04A, #F0422D);
+        background: linear-gradient(135deg, #FE6A0F, #FE6A0F);
     }
 
     &__thumb{

+ 157 - 36
src/pages/index/index.wpy

@@ -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();
         });

+ 2 - 3
src/pages/index/voucher.wpy

@@ -24,8 +24,7 @@
                         circle at center 100%,
                         #ececec 20rpx,
                         transparent 0
-                    ),
-                    linear-gradient(#f6f7f7 20px, transparent 10px);
+                    );
             }
         }
     }
@@ -116,7 +115,7 @@
         <view class="cp-body-"
             style="display:flex; flex: 1; flex-direction:column; width:inherit;">
             <view class="Voucher_top">
-                <view class="weui-media-box weui-media-box_appmsg">
+                <view class="weui-media-box weui-media-box_appmsg" style="box-shadow:none">
                     <view
                         class="weui-media-box__hd weui-media-box__hd_in-appmsg">
                         <image class="weui-media-box__thumb" mode="widthFix"

+ 3 - 1
src/utils/config.js

@@ -1,5 +1,5 @@
 const HOST = 'https://movieplusplus.com'
-const BASE_URL = 'http://192.168.50.132:8080'
+const BASE_URL = 'http://192.168.50.15:8080'
 const API = HOST + '/api/v3'
 const APIv2 = HOST + '/api/v2'
 
@@ -97,6 +97,8 @@ const DATETIMEVALUE = [
     ['2018', '2019', '2020'],
     ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'],
     [
+
+        
         '01',
         '02',
         '03',