Commit e058e95f883604610eff88e6f7472ad10e0d8a9d
1 parent
35d801ce
拍摄注意 弹出优化
Showing
3 changed files
with
97 additions
and
28 deletions
packageD/pages/AI-test-skin/shoot_notice/shoot_notice.js
| 1 | 1 | /* |
| 2 | 2 | * @Author: abson |
| 3 | 3 | * @Date: 2022-02-15 10:01:57 |
| 4 | - * @LastEditTime: 2022-02-17 09:40:38 | |
| 4 | + * @LastEditTime: 2022-02-28 15:37:20 | |
| 5 | 5 | * @LastEditors: Please set LastEditors |
| 6 | 6 | * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AEet urkl |
| 7 | 7 | * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\shoot_notice\shoot_notice.js |
| ... | ... | @@ -19,6 +19,7 @@ Page({ |
| 19 | 19 | */ |
| 20 | 20 | data: { |
| 21 | 21 | iurl: setting.imghost, |
| 22 | + notice_show:"", | |
| 22 | 23 | }, |
| 23 | 24 | |
| 24 | 25 | /** |
| ... | ... | @@ -32,7 +33,11 @@ Page({ |
| 32 | 33 | * 生命周期函数--监听页面显示 |
| 33 | 34 | */ |
| 34 | 35 | onShow: function () { |
| 35 | - | |
| 36 | + setTimeout(()=>{ | |
| 37 | + this.setData({ | |
| 38 | + notice_show:'none', | |
| 39 | + }) | |
| 40 | + },3000).bind(this) | |
| 36 | 41 | }, |
| 37 | 42 | |
| 38 | 43 | /** |
| ... | ... | @@ -64,15 +69,15 @@ Page({ |
| 64 | 69 | }, |
| 65 | 70 | |
| 66 | 71 | //从相册中选择图片 |
| 67 | - show_pai_pop:function () { | |
| 72 | + show_pai_pop: function () { | |
| 68 | 73 | //选择和拍照一张图片 |
| 69 | 74 | wx.chooseImage({ |
| 70 | 75 | count: 1, |
| 71 | 76 | sizeType: ['original', 'compressed'], |
| 72 | 77 | sourceType: ['album', 'camera'], |
| 73 | - success (res) { | |
| 74 | - let imgArr = res.tempFilePaths; | |
| 75 | - getApp().globalData.skin_img=imgArr[0]; | |
| 78 | + success(res) { | |
| 79 | + let imgArr = res.tempFiles; | |
| 80 | + getApp().globalData.skin_img_info = imgArr[0]; | |
| 76 | 81 | let url = "/packageD/pages/AI-test-skin/select_photo/select_photo"; |
| 77 | 82 | app.goto(url); |
| 78 | 83 | } | ... | ... |
packageD/pages/AI-test-skin/shoot_notice/shoot_notice.wxml
packageD/pages/AI-test-skin/shoot_notice/shoot_notice.wxss
| ... | ... | @@ -6,7 +6,31 @@ page { |
| 6 | 6 | box-sizing: border-box; |
| 7 | 7 | background-color: #e7f5fb; |
| 8 | 8 | } |
| 9 | + | |
| 10 | +@keyframes notice_show { | |
| 11 | + 0% { | |
| 12 | + top: -999rpx; | |
| 13 | + } | |
| 14 | + | |
| 15 | + 100% { | |
| 16 | + top: 10rpx; | |
| 17 | + } | |
| 18 | +} | |
| 19 | + | |
| 20 | +.notice_show { | |
| 21 | + text-align: center; | |
| 22 | + padding: 30rpx; | |
| 23 | + color: skyblue; | |
| 24 | + position: absolute; | |
| 25 | + right: 10%; | |
| 26 | + box-shadow: #f0f0f0 0px 0px 5px; | |
| 27 | + z-index: 999; | |
| 28 | + background: #fff; | |
| 29 | + animation: 2s notice_show linear; | |
| 30 | +} | |
| 31 | + | |
| 9 | 32 | .content { |
| 33 | + position: relative; | |
| 10 | 34 | width: 100%; |
| 11 | 35 | /* height: 100%; */ |
| 12 | 36 | border-radius: 25rpx; |
| ... | ... | @@ -26,11 +50,12 @@ page { |
| 26 | 50 | align-items: center; |
| 27 | 51 | margin-bottom: 40rpx |
| 28 | 52 | } |
| 53 | + | |
| 29 | 54 | .content .ready1 { |
| 30 | 55 | display: flex; |
| 31 | 56 | flex-direction: column; |
| 32 | 57 | align-items: center; |
| 33 | - padding-bottom: 50rpx ; | |
| 58 | + padding-bottom: 50rpx; | |
| 34 | 59 | /* margin-bottom: 40rpx */ |
| 35 | 60 | } |
| 36 | 61 | |
| ... | ... | @@ -65,8 +90,9 @@ page { |
| 65 | 90 | .content image { |
| 66 | 91 | height: 100%; |
| 67 | 92 | } |
| 93 | + | |
| 68 | 94 | .btn { |
| 69 | - | |
| 95 | + | |
| 70 | 96 | /* height: 150rpx; */ |
| 71 | 97 | /* margin-left: 50%; */ |
| 72 | 98 | margin: 70rpx 0 30rpx 50%; |
| ... | ... | @@ -78,6 +104,7 @@ page { |
| 78 | 104 | border-radius: 50rpx; |
| 79 | 105 | color: #fff; |
| 80 | 106 | } |
| 107 | + | |
| 81 | 108 | .btn_fixed { |
| 82 | 109 | position: fixed; |
| 83 | 110 | width: 100%; |
| ... | ... | @@ -85,6 +112,7 @@ page { |
| 85 | 112 | height: 300rpx; |
| 86 | 113 | background: #e7f5fb; |
| 87 | 114 | } |
| 115 | + | |
| 88 | 116 | .notice { |
| 89 | 117 | text-align: center; |
| 90 | 118 | color: red; |
| ... | ... | @@ -98,36 +126,71 @@ page { |
| 98 | 126 | right: 0; |
| 99 | 127 | bottom: 0; |
| 100 | 128 | z-index: 11; |
| 101 | - background: rgba(0,0,0,0.4); | |
| 129 | + background: rgba(0, 0, 0, 0.4); | |
| 102 | 130 | width: 100%; |
| 103 | 131 | height: 100%; |
| 104 | 132 | } |
| 105 | 133 | |
| 106 | -.flex{display: flex} | |
| 107 | -.jc-center{ | |
| 134 | +.flex { | |
| 135 | + display: flex | |
| 136 | +} | |
| 137 | + | |
| 138 | +.jc-center { | |
| 108 | 139 | justify-content: center; |
| 109 | 140 | } |
| 110 | -.ac{align-items: center} | |
| 111 | -.pai_content{ | |
| 112 | - position: fixed;z-index: 100;bottom: 0;background: #FFFFFF;width: 100%; | |
| 113 | - border-top-left-radius:30rpx; | |
| 114 | - border-top-right-radius:30rpx; | |
| 141 | + | |
| 142 | +.ac { | |
| 143 | + align-items: center | |
| 115 | 144 | } |
| 116 | -.p_item{ height: 100rpx; line-height: 100rpx;text-align: center; border-bottom: 1rpx solid #eee} | |
| 117 | -.p_cancle{height: 100rpx; line-height: 100rpx;text-align: center; border-top:20rpx solid #f8f8f8;} | |
| 118 | 145 | |
| 119 | -@keyframes p_up | |
| 120 | -{ | |
| 121 | - from {transform:translateY(100%);} | |
| 122 | - to {transform:translateY(0);} | |
| 146 | +.pai_content { | |
| 147 | + position: fixed; | |
| 148 | + z-index: 100; | |
| 149 | + bottom: 0; | |
| 150 | + background: #FFFFFF; | |
| 151 | + width: 100%; | |
| 152 | + border-top-left-radius: 30rpx; | |
| 153 | + border-top-right-radius: 30rpx; | |
| 154 | +} | |
| 155 | + | |
| 156 | +.p_item { | |
| 157 | + height: 100rpx; | |
| 158 | + line-height: 100rpx; | |
| 159 | + text-align: center; | |
| 160 | + border-bottom: 1rpx solid #eee | |
| 161 | +} | |
| 162 | + | |
| 163 | +.p_cancle { | |
| 164 | + height: 100rpx; | |
| 165 | + line-height: 100rpx; | |
| 166 | + text-align: center; | |
| 167 | + border-top: 20rpx solid #f8f8f8; | |
| 123 | 168 | } |
| 124 | 169 | |
| 125 | -@keyframes p_down | |
| 126 | -{ | |
| 127 | - from {transform:translateY(0);} | |
| 128 | - to {transform:translateY(100%);} | |
| 170 | +@keyframes p_up { | |
| 171 | + from { | |
| 172 | + transform: translateY(100%); | |
| 173 | + } | |
| 174 | + | |
| 175 | + to { | |
| 176 | + transform: translateY(0); | |
| 177 | + } | |
| 129 | 178 | } |
| 130 | -.p_to_up{animation:p_up 1s;} | |
| 131 | -.p_to_down{animation:p_down 0.5s;} | |
| 132 | 179 | |
| 180 | +@keyframes p_down { | |
| 181 | + from { | |
| 182 | + transform: translateY(0); | |
| 183 | + } | |
| 184 | + | |
| 185 | + to { | |
| 186 | + transform: translateY(100%); | |
| 187 | + } | |
| 188 | +} | |
| 189 | + | |
| 190 | +.p_to_up { | |
| 191 | + animation: p_up 1s; | |
| 192 | +} | |
| 133 | 193 | |
| 194 | +.p_to_down { | |
| 195 | + animation: p_down 0.5s; | |
| 196 | +} | |
| 134 | 197 | \ No newline at end of file | ... | ... |