瀏覽代碼

Merge remote-tracking branch 'origin/jeffrey/feat/coupon-center' into jeffrey/feat/coupon-center

xing.li 3 年之前
父節點
當前提交
b08d46d61e

+ 5 - 2
components/topbar.js

@@ -1,12 +1,15 @@
 // components/topbar.js
 Component({
+    externalClasses: ['topbar-class', 'topbar-title-class'],
     /**
      * 组件的属性列表
      */
     properties: {
-
+        title: {
+            type: String,
+            value: ''
+        }
     },
-
     /**
      * 组件的初始数据
      */

+ 4 - 1
components/topbar.wxml

@@ -1,6 +1,9 @@
 <!--components/topbar.wxml-->
-<view class="topbar" style="top:{{capsuleTop + 3}}px; left: 28rpx;">
+<view class="topbar topbar-class" style="top:{{capsuleTop + 3}}px; left: 28rpx;">
    <view class="back" catchtap="handleBack">
       <image src="/images/back.png" />
    </view>
+
+   <view class="title topbar-title-class">{{title}}</view>
+
 </view>

+ 9 - 0
components/topbar.wxss

@@ -10,8 +10,17 @@
 .topbar .back {
     width: 36rpx;
     height: 36rpx;
+    position: absolute;
+    left: 0;
+    top: 0;
 }
 .topbar .back image {
     width: 20rpx;
     height: 36rpx;
+}
+.topbar .title {
+    width: calc(100vw - 60rpx);
+    height: 100%;
+    text-align: center;
+    font-size: 32rpx;
 }

+ 1 - 2
pages/luckDraw/profile.wxml

@@ -1,8 +1,7 @@
 <!--pages/luckDraw/profile.wxml-->
 <!-- 首部信息 -->
 <view class="head flex-column">
-<topbar />
-  <view class="head_profile">个人中心</view> 
+<topbar title="个人中心" topbar-title-class="profile-topbar"/>
   <image wx:if="{{!isLogin}}" class="head_portrait" src="/images/welfareMall/head-portrait.png" />
   <!-- 获取用户头像 -->
   <open-data wx:if="{{isLogin}}" class="head_portrait" type="userAvatarUrl"></open-data>

+ 5 - 8
pages/luckDraw/profile.wxss

@@ -28,7 +28,7 @@
   height: 144rpx;
   border-radius: 50%;
   overflow :  hidden ;
-  margin-top: 80rpx;
+  margin-top: 170rpx;
 }
 
 .head_text{
@@ -36,7 +36,7 @@
   font-family: Source Han Sans CN;
   font-weight: 400;
   color: #FEFEFE;
-  margin-top: 40rpx;
+  margin-top: 30rpx;
 }
 
 .sigin-isLogin{
@@ -82,7 +82,7 @@
   width: 39px;
   height: 3px;
   border-radius: 2px;
-  margin-top: 10px;
+  margin-top: 8px;
 }
 
 .coupon{
@@ -287,12 +287,9 @@
   margin-top: 20rpx;
 }
 
-.head_profile{
-  width: 114rpx;
-  height: 28rpx;
-  font-size: 28rpx;
+.profile-topbar{
+  font-size: 56rpx;
   font-weight: 500;
   color: #000000;
-  margin-top: 60rpx;
 }
 

+ 1 - 4
pages/signIn/activity/activity.wxml

@@ -1,6 +1,6 @@
 <!--pages/signIn/index.wxml-->
 <view wx:if="{{showPage}}">
-<topbar />
+<topbar title="签到中心" topbar-title-class="title-color" />
 <!-- 页面主体 -->
 <view class="sign-scroll-body" style="margin-top:{{navHeight}}px; height: {{bodyHeight}}px;">
     <view class="sign-info-extra">
@@ -91,9 +91,6 @@
    <view class="head-bg">
     <image src="{{activity.themePic}}" />
    </view>
-   <view class="head-bar" style="height:{{navHeight}}px">
-      <view style="margin-top: {{capsuleTop}}px;line-height: {{capHeight}}px;">签到中心</view>
-   </view>
 </view>
 
 

+ 4 - 0
pages/signIn/activity/activity.wxss

@@ -3,6 +3,10 @@ page {
     background: #EDEDED;
 }
 
+.title-color {
+    color: #fff;
+}
+
 .sign-head {
     position: fixed;
     left: 0;

+ 3 - 1
pages/signIn/record/record.json

@@ -1,5 +1,7 @@
 {
-  "usingComponents": {},
+  "usingComponents": {
+    "topbar": "../../../components/topbar"
+  },
   "navigationStyle":"custom",
   "navigationBarTextStyle": "white"
 }

+ 4 - 0
pages/signIn/record/record.wxml

@@ -2,6 +2,10 @@
 <view class="record flex-column">
   <!-- 首部信息 -->
   <view class="head flex-column">
+    <topbar />
+    <topbar wx:if="{{noCoupon}}" title="签到优惠券" topbar-title-class="record-topbar"/>
+    <topbar wx:if="{{noDetail}}" title="获取明细" topbar-title-class="record-topbar"/>
+    <topbar wx:if="{{noUtility}}" title="使用/失效" topbar-title-class="record-topbar"/>
     <view class="head_num" wx:if="{{!isLogin}}">{{notUseNum}}</view>
     <view class="head_num" wx:if="{{isLogin}}">{{notUseNum?notUseNum:0}}</view>
     <view class="head_text" wx:if="{{isLogin}}">请在优惠券有效期内尽快使用</view>

+ 7 - 1
pages/signIn/record/record.wxss

@@ -33,7 +33,7 @@
   font-family: Source Han Sans CN;
   font-weight: 500;
   color: #FEFEFE;
-  margin-top: 120rpx;
+  margin-top: 170rpx;
 }
 
 .head_text{
@@ -313,3 +313,9 @@
 	text-overflow: ellipsis;
 }
 
+.record-topbar{
+  font-size: 56rpx;
+  font-weight: 500;
+  color: #000000;
+}
+