Commit e058e95f883604610eff88e6f7472ad10e0d8a9d

Authored by abson
1 parent 35d801ce

拍摄注意 弹出优化

packageD/pages/AI-test-skin/shoot_notice/shoot_notice.js
1 /* 1 /*
2 * @Author: abson 2 * @Author: abson
3 * @Date: 2022-02-15 10:01:57 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 * @LastEditors: Please set LastEditors 5 * @LastEditors: Please set LastEditors
6 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AEet urkl 6 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AEet urkl
7 * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\shoot_notice\shoot_notice.js 7 * @FilePath: \MShopWeApp\packageB\pages\AI-test-skin\shoot_notice\shoot_notice.js
@@ -19,6 +19,7 @@ Page({ @@ -19,6 +19,7 @@ Page({
19 */ 19 */
20 data: { 20 data: {
21 iurl: setting.imghost, 21 iurl: setting.imghost,
  22 + notice_show:"",
22 }, 23 },
23 24
24 /** 25 /**
@@ -32,7 +33,11 @@ Page({ @@ -32,7 +33,11 @@ Page({
32 * 生命周期函数--监听页面显示 33 * 生命周期函数--监听页面显示
33 */ 34 */
34 onShow: function () { 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,15 +69,15 @@ Page({
64 }, 69 },
65 70
66 //从相册中选择图片 71 //从相册中选择图片
67 - show_pai_pop:function () { 72 + show_pai_pop: function () {
68 //选择和拍照一张图片 73 //选择和拍照一张图片
69 wx.chooseImage({ 74 wx.chooseImage({
70 count: 1, 75 count: 1,
71 sizeType: ['original', 'compressed'], 76 sizeType: ['original', 'compressed'],
72 sourceType: ['album', 'camera'], 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 let url = "/packageD/pages/AI-test-skin/select_photo/select_photo"; 81 let url = "/packageD/pages/AI-test-skin/select_photo/select_photo";
77 app.goto(url); 82 app.goto(url);
78 } 83 }
packageD/pages/AI-test-skin/shoot_notice/shoot_notice.wxml
1 <!--packageB/pages/AI-test-skin/shoot_notice/shoot_notice.wxml--> 1 <!--packageB/pages/AI-test-skin/shoot_notice/shoot_notice.wxml-->
2 <view class="content"> 2 <view class="content">
  3 + <view class="notice_show" style="display: {{notice_show}};">根据要求拍摄,测肤结果更准确。</view>
3 <view> 4 <view>
4 <view class="work">准备工作</view> 5 <view class="work">准备工作</view>
5 <view class="hengxian"></view> 6 <view class="hengxian"></view>
packageD/pages/AI-test-skin/shoot_notice/shoot_notice.wxss
@@ -6,7 +6,31 @@ page { @@ -6,7 +6,31 @@ page {
6 box-sizing: border-box; 6 box-sizing: border-box;
7 background-color: #e7f5fb; 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 .content { 32 .content {
  33 + position: relative;
10 width: 100%; 34 width: 100%;
11 /* height: 100%; */ 35 /* height: 100%; */
12 border-radius: 25rpx; 36 border-radius: 25rpx;
@@ -26,11 +50,12 @@ page { @@ -26,11 +50,12 @@ page {
26 align-items: center; 50 align-items: center;
27 margin-bottom: 40rpx 51 margin-bottom: 40rpx
28 } 52 }
  53 +
29 .content .ready1 { 54 .content .ready1 {
30 display: flex; 55 display: flex;
31 flex-direction: column; 56 flex-direction: column;
32 align-items: center; 57 align-items: center;
33 - padding-bottom: 50rpx ; 58 + padding-bottom: 50rpx;
34 /* margin-bottom: 40rpx */ 59 /* margin-bottom: 40rpx */
35 } 60 }
36 61
@@ -65,8 +90,9 @@ page { @@ -65,8 +90,9 @@ page {
65 .content image { 90 .content image {
66 height: 100%; 91 height: 100%;
67 } 92 }
  93 +
68 .btn { 94 .btn {
69 - 95 +
70 /* height: 150rpx; */ 96 /* height: 150rpx; */
71 /* margin-left: 50%; */ 97 /* margin-left: 50%; */
72 margin: 70rpx 0 30rpx 50%; 98 margin: 70rpx 0 30rpx 50%;
@@ -78,6 +104,7 @@ page { @@ -78,6 +104,7 @@ page {
78 border-radius: 50rpx; 104 border-radius: 50rpx;
79 color: #fff; 105 color: #fff;
80 } 106 }
  107 +
81 .btn_fixed { 108 .btn_fixed {
82 position: fixed; 109 position: fixed;
83 width: 100%; 110 width: 100%;
@@ -85,6 +112,7 @@ page { @@ -85,6 +112,7 @@ page {
85 height: 300rpx; 112 height: 300rpx;
86 background: #e7f5fb; 113 background: #e7f5fb;
87 } 114 }
  115 +
88 .notice { 116 .notice {
89 text-align: center; 117 text-align: center;
90 color: red; 118 color: red;
@@ -98,36 +126,71 @@ page { @@ -98,36 +126,71 @@ page {
98 right: 0; 126 right: 0;
99 bottom: 0; 127 bottom: 0;
100 z-index: 11; 128 z-index: 11;
101 - background: rgba(0,0,0,0.4); 129 + background: rgba(0, 0, 0, 0.4);
102 width: 100%; 130 width: 100%;
103 height: 100%; 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 justify-content: center; 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 \ No newline at end of file 197 \ No newline at end of file