Commit 1c79e772c069b2a32c05f9495a2786e4c6f7f600

Authored by 前端开发-罗建龙
1 parent 61793b4a

美图秀秀页面优化

packageF/pages/free_delivery/free_delivery.js
... ... @@ -33,6 +33,7 @@ Page({
33 33 this.setData({
34 34 hd_id:options.id
35 35 })
  36 + this.getInfo()
36 37 }else{
37 38 wx.showToast({
38 39 title: '获取活动失败',
... ... @@ -48,7 +49,15 @@ Page({
48 49 }
49 50  
50 51 },
51   -
  52 + getInfo(){
  53 + app.promiseGet(`/api/weshop/meitu/storeMeituHdlist/get/${app.globalData.setting.stoid}/${this.data.hd_id}`, {}).then(res => {
  54 + if (res.data.code == 0 && res.data.data && res.data.data.hd_name) {
  55 + wx.setNavigationBarTitle({
  56 + title: res.data.data.hd_name
  57 + })
  58 + }
  59 + })
  60 + },
52 61 /**
53 62 * 生命周期函数--监听页面初次渲染完成
54 63 */
... ... @@ -70,9 +79,7 @@ Page({
70 79 login_name:'领取会员'
71 80 })
72 81 }
73   - wx.setNavigationBarTitle({
74   - title: '免费送'
75   - })
  82 +
76 83 },
77 84 //--跳到绑定页面--
78 85 gobindtel: function () {
... ... @@ -97,25 +104,28 @@ Page({
97 104 }).then((res)=>{
98 105 if(res.data.code == 0) {
99 106 wx.showToast({
100   - title: '领取成功',
101   - icon: 'success',
  107 + title: res.data.msg,
  108 + icon: 'none',
102 109 duration: 2000,
103 110 mask:true,
104 111 });
105   - setTimeout(()=>{
106   - wx.reLaunch({
107   - url: '/pages/index/index/index'
108   - })
109   - },2000)
  112 + this.setData({
  113 + login_name:'已领取'
  114 + })
  115 + // setTimeout(()=>{
  116 + // wx.reLaunch({
  117 + // url: '/pages/index/index/index'
  118 + // })
  119 + // },2000)
110 120 // self.getData(true, '/api/weshop/goods/page?isnewwhere=1&is_mainshow=1&isonsale=1&dis_type=1', self.data.currentQuery, false);
111 121 } else {
112 122 this.setData({
113 123 login_off:false
114 124 })
115 125 wx.showToast({
116   - title: '领取失败',
117   - icon: 'success',
118   - duration: 1000,
  126 + title: res.data.msg,
  127 + icon: 'none',
  128 + duration: 2000,
119 129 mask:true,
120 130 });
121 131 }
... ... @@ -150,7 +160,7 @@ Page({
150 160 * 页面相关事件处理函数--监听用户下拉动作
151 161 */
152 162 onPullDownRefresh() {
153   -
  163 + wx.stopPullDownRefresh()
154 164 },
155 165  
156 166 /**
... ...
packageF/pages/free_delivery/free_delivery.wxml
1 1 <!--packageF/pages/free_delivery/free_delivery.wxml-->
2   -<view class="free_delivery" style="background-image: url({{url}}miniapp/images/pink_diamond/bj.png);">
  2 +<view class="free_delivery" style="background-image: url({{url}}miniapp/images/pink_diamond/bg.jpg);">
3 3 <view class="top" >
4 4 <image src="{{url}}miniapp/images/pink_diamond/logo.png" style="width: 345.6rpx;height: 88rpx;"></image>
5 5 </view>
6   - <view class="main" style="top: {{delOff ? '26.5':'24.5'}}%;">
7   - <image src="{{url}}miniapp/images/pink_diamond/top.png" style="width: 618.8rpx;height: 235.9rpx;"></image>
  6 + <view class="main">
  7 + <view class="imageBox" >
  8 + <image src="{{url}}miniapp/images/pink_diamond/top1.png" style="width: 618.8rpx;height: 484.4rpx;"></image>
  9 + </view>
8 10 <view class="main_title" style="background-image: url({{url}}miniapp/images/pink_diamond/login.png);width: 618.8rpx;height: 80rpx;color: {{userInfo ? '#333' :'rgb(194, 194, 194)'}};font-weight: {{userInfo ? 'bold' :'400'}};" >{{login_title}}</view>
9 11 <view class="but" catchtap="gobindtel" style="background-image: url({{url}}miniapp/images/pink_diamond/login1.png);width: 618.8rpx;height: 80rpx;" >{{login_name}}</view>
10 12 <!-- <view wx:if="{{userInfo}}">领取会员</view>
11 13 <view wx:else catchtap="gobindtel">点击注册</view> -->
12 14 </view>
13   - <view class="bottom" style="bottom: {{delOff ? '7':'3.5'}}%;" >
14   - <image src="{{url}}miniapp/images/pink_diamond/bottom.png?v=5" style="width: 646.8rpx;height: 388.5rpx;"></image>
  15 + <view class="bottom" >
  16 + <image src="{{url}}miniapp/images/pink_diamond/bottom.png?v=5" style="width: 618.8rpx;height: 388.5rpx;"></image>
15 17 </view>
16 18 </view>
... ...
packageF/pages/free_delivery/free_delivery.wxss
... ... @@ -2,7 +2,9 @@
2 2  
3 3 .free_delivery{
4 4 width: 100%;
5   - height: 100vh;
  5 + min-height: 100vh;
  6 + padding-bottom:25.6rpx;
  7 + box-sizing: border-box;
6 8 /* display: flex;
7 9 flex-direction: column;
8 10 justify-content: space-between; */
... ... @@ -22,10 +24,11 @@
22 24 justify-content: center; */
23 25 }
24 26 .main{
25   - position: absolute;
  27 + /* position: absolute;
26 28 left: 0;
27   - top: 24.5%;
28   - width: 100%;
  29 + top: 24.5%; */
  30 + width: 670rpx;
  31 + margin: 100rpx auto 20rpx;
29 32 /* height: 200rpx;
30 33 background-color: red; */
31 34 /* opacity: .5; */
... ... @@ -33,6 +36,10 @@
33 36 flex-direction: column;
34 37 align-items: center;
35 38 justify-content: center;
  39 + background-color: rgba(255, 255, 255, .5);
  40 + padding-bottom: 25.6rpx;
  41 + border-radius: 30rpx;
  42 + /* opacity: .5; */
36 43 /* width: 100%;
37 44 flex: 1;
38 45 display: flex;
... ... @@ -41,11 +48,24 @@
41 48  
42 49 background-color: darkmagenta; */
43 50 }
  51 +.main .imageBox{
  52 + width: 100%;
  53 + height: 344.4rpx;
  54 + position: relative;
  55 + /* background-color: royalblue; */
  56 +}
  57 +.main .imageBox image{
  58 + position: absolute;
  59 + top: -140rpx;
  60 + left: 0;
  61 + right: 0;
  62 + margin: auto;
  63 +}
44 64 .main_title{
45 65 margin: 25rpx 0;
46 66  
47 67 }
48   -.main view{
  68 +.main .main_title , .main .but{
49 69 background-position: 50%;
50 70 background-repeat: no-repeat;
51 71 background-attachment: fixed;
... ... @@ -61,10 +81,14 @@
61 81 font-weight: bold;
62 82 }
63 83 .bottom{
64   - width: 100%;
65   - position: absolute;
  84 + width: 670rpx;
  85 + margin: 0 auto;
  86 + /* position: absolute;
66 87 left: 0;
67   - bottom: 5%;
  88 + bottom: 5%; */
  89 + background-color: rgba(255, 255, 255, .5);
  90 + padding: 50rpx 0;
  91 + border-radius: 30rpx;
68 92 display: flex;
69 93 align-items: center;
70 94 justify-content: center;
... ...