<wxs module="s_filter" src="s_filter.wxs"></wxs>
<!-- <scroll-view enable-flex scroll-x>
                <view style="padding: 0 50rpx 20rpx 20rpx">泪沟</view>
                <view style="padding: 0 50rpx 20rpx 20rpx">泪沟</view>
                <view style="padding: 0 50rpx 20rpx 20rpx">泪沟</view>
                <view style="padding: 0 50rpx 20rpx 20rpx">泪沟</view>
                <view style="padding: 0 50rpx 20rpx 20rpx">泪沟</view>
            </scroll-view> -->
<view style="height: 100rpx;">
    <scroll-view enable-flex scroll-into-view="{{tab_id}}" scroll-with-animation scroll-x>
        <view class="flex" style="height: 100%; background-color:#fff">
            <view wx:for="{{tab}}" wx:key="id" id="{{item.id}}" bindtap="clickTab" data-tab_id="{{item.id}}" data-index="{{index}}" class="tab_scroll_item {{currentIndex==index?'active':''}}">
                {{item.name}}
            </view>
        </view>
    </scroll-view>
</view>

<scroll-view enable-flex enhanced scroll-into-view="{{tab_id}}" scroll-with-animation bindscroll="scroll_view" scroll-y style="height: calc(100% - 100rpx)">
    <view class="analyse_by_people zong_he" id="zong_he">
        <view class="analyse">
            <view class="analyse_left">
                <view class="mark">毛孔 {{pore_num}}</view>
                <view class="mark" style="margin: 40rpx 0;">色斑 {{speckle_num}}</view>
                <view class="mark">黑眼圈 {{s_filter.get_dark_type(dark_type)}}</view>
            </view>
            <view class="analyse_center">
                <image wx:if="{{sex === 'female'}}" src="{{iurl}}/miniapp/images/skinimg/nv.png"></image>
                <image wx:if="{{sex === 'male'}}" src="{{iurl}}/miniapp/images/skinimg/nan.png"></image>
            </view>
            <view class="analyse_right">
                <view class="mark">黑头 {{blackhead_num}}</view>
                <view class="mark" style="margin: 40rpx 0;">皱纹 {{wrinkle_num}}</view>
                <view class="mark">痤疮 {{acne_num}}</view>
            </view>
        </view>
        <view class="score" style="display: none">
            <view>
                <view class="fs28">综合得分</view>
                <view class="t-c mt10">
                    <text style="font-weight: 600;">待确定</text>
                    <text class="iconfont icon-zuojiantou"></text>
                </view>
            </view>
            <view class="shuxian"></view>
            <view>
                <view class="t-c fs28">肤况</view>
                <view class="t-c mt10 bold">待确定</view>
            </view>
        </view>
        <view class="content" style="padding-bottom: 0;">
            <view class="mb_b5" style="display: none">
                <image src="{{iurl}}/miniapp/images/skinimg/_code.png" style="height: 200rpx;width: 100%;"></image>
            </view>
            <view class="analyse_result mt_b5">
                <view class="img" style="position: relative;">
                    <image wx:if="{{sex === 'female'}}" src="{{iurl}}/miniapp/images/skinimg/nv.png" style="width: 100%;height: 100%;"></image>
                    <image wx:if="{{sex === 'male'}}" src="{{iurl}}/miniapp/images/skinimg/nan.png" style="width: 100%;height: 100%;"></image>

                    <block wx:for="{{skin_dryoil_check}}">
                        <block wx:if="{{item=='0' || item=='2' }}">
                            <view wx:if="{{index==0}}" class="abs e_tou {{item=='0'?'g_x':'y_x'}}"></view>
                            <view wx:if="{{index==1}}" class="abs e_bz {{item=='0'?'g_x':'y_x'}}"></view>
                            <view wx:if="{{index==2}}" class="abs e_zlian {{item=='0'?'g_x':'y_x'}}"></view>
                            <view wx:if="{{index==3}}" class="abs e_ylian {{item=='0'?'g_x':'y_x'}}"></view>
                            <view wx:if="{{index==4}}" class="abs e_xb {{item=='0'?'g_x':'y_x'}}"></view>
                        </block>
                    </block>
                </view>
                <view class="f1 ml20">
                    <view class="bold">{{s_filter.get_dryoil_check(skin_dryoil_check_type)}}</view>
                    <view class="fs24 mt10" wx:if="{{skin_dryoil_check_type==0 || skin_dryoil_check_type==2 || skin_dryoil_check_type==3}}">
                        <text wx:if="{{skin_dryoil_check_type==0 || skin_dryoil_check_type==3}}" class="gan" style="margin-right: 30rpx;">干性区</text>
                        <text wx:if="{{skin_dryoil_check_type==2 || skin_dryoil_check_type==3}}" class="you">油性区</text>
                    </view>
                    <view class="mt20 fs26" wx:if="{{skin_dryoil_check_type==3 }}">
                        <text>你的皮肤油脂过剩，部分干燥，容易引发皮肤问题。日常可使用一些具有控油和补水功效产品，帮助调理肌肤</text>
                    </view>
                    <view class="mt20 fs26" wx:if="{{skin_dryoil_check_type==2 }}">
                        <text>你的皮肤油脂过剩，容易引发皮肤问题。日常可使用一些具有控油产品，帮助调理肌肤</text>
                    </view>
                    <view class="mt20 fs26" wx:if="{{skin_dryoil_check_type==0 }}">
                        <text>你的皮肤比较干燥，容易引发皮肤问题。日常可使用一些补水功效产品，帮助调理肌肤</text>
                    </view>

                </view>
            </view>
        </view>
    </view>

    <view class="content">
        <!-- 毛孔 -->
        <block wx:if="{{pore_num}}">
            <include src="pore/pore" />
        </block>
        <!-- 黑头 -->
        <block wx:if="{{blackhead_num}}">
            <include src="blackhead/blackhead.wxml" />
        </block>
        <!-- 色斑 -->
        <block wx:if="{{speckle_num}}">
            <include src="speckle/speckle.wxml" />
        </block>
        <!-- 皱纹 -->
        <block wx:if="{{wrinkle_num}}">
            <include src="wrinkle/wrinkle.wxml" />
        </block>
        <!-- 黑眼圈 -->
        <block wx:if="{{dark_type>-1}}">
            <include src="dark/dark.wxml" />
        </block>
        <!-- 痤疮 -->
        <block wx:if="{{acne_num}}">
            <include src="acne/acne.wxml" />
        </block>
        <!-- 敏感度 -->
        <include src="sensitive/sensitive.wxml" />
    </view>
</scroll-view>


<view class="mask" catchtap="close_mask" wx:if="{{showDialog || question_dialog}}"></view>
<view bindtap="saveImageToPhotosAlbum" class="share fs28">
    <view class="iconfont icon-zhuanfa1" style="padding: 0 10rpx;"></view>
    <view>分享</view>
</view>

<!-- 问题标注 -->
<view class="dialog {{img_scale?'scale':'fangda'}}" wx:if="{{showDialog}}">
    <!-- 局部放大的 -->
    <block wx:if="{{img_scale}}">
        <!-- 图片显示区 -->
        <view class="dialog_img" style="{{show_type == 5?'height:60%':'height:85%'}}">
            <view class="img_content rel">
                <!-- 如果是黑眼圈的左眼右眼的时候 -->
                <view wx:if="{{is_esys_show}}" class="face_show_view rel" style="width:{{eye_w}}px;height:{{eye_h}}px;margin-top: -{{eye_top}}px;margin-left: -{{is_esys_show==1?eye_left1:eye_left2}}px">

                    <image src="{{iurl}}{{face_img}}" bindload="face_img_load" style="width: 100%;height: 100%;"></image>
                    <block wx:if="{{yanjing}}">
                        <!-- 显示黑眼圈 -->
                        <block wx:if="{{show_type==5}}">
                            <block wx:for="{{dark_list}}">
                                <view class="abs p_point" style="left:{{item.x*(is_esys_show?bili_eye:bili)}}px; top:{{item.y*(is_esys_show?bili_eye:bili)}}px; "></view>
                            </block>
                        </block>
                    </block>
                </view>
                <!-- 其他显示 -->
                <view wx:else class="face_show_view rel" style="width:{{iwidth}}px;height:{{iheight}}px;margin-top: -{{m_top}}px;margin-left: -{{m_left}}px">

                    <image src="{{iurl}}{{face_img}}" bindload="face_img_load" style="width: 100%;height: 100%;"></image>
                    <block wx:if="{{yanjing}}">
                        <!-- 显示毛孔 -->
                        <block wx:if="{{show_type==1}}">
                            <block wx:for="{{pore_list}}">
                                <view class="abs p_circle" style="left:{{(item.x-item.r)*bili}}px; top:{{(item.y-item.r)*bili}}px; height:{{2*item.r*bili}}px;width: {{2*item.r*bili}}px"></view>
                            </block>
                        </block>
                        <!-- 显示色斑 -->
                        <block wx:if="{{show_type==2}}">
                            <block wx:for="{{speckle_list}}">
                                <block wx:for="{{item.position}}" wx:for-item="bitem">
                                    <view class="abs p_point" style="left:{{(bitem.x)*bili}}px; top:{{(bitem.y)*bili}}px;"></view>
                                </block>
                            </block>
                        </block>
                        <!-- 显示皱纹 -->
                        <block wx:if="{{show_type==3}}">
                            <block wx:for="{{wrinkle_list}}">
                                <!-- 当点击了tabs -->
                                <block wx:if="{{scroll_id>1}}">
                                    <block wx:for="{{item}}" wx:for-item="bitem">
                                        <view wx:if="{{bitem.w_type==(scroll_id-1)}}" class="abs p_point" style="left:{{(bitem.x)*bili}}px; top:{{(bitem.y)*bili}}px;"></view>
                                    </block>
                                </block>
                                <block wx:else>
                                    <view wx:for="{{item}}" wx:for-item="bitem" class="abs p_point" style="left:{{(bitem.x)*bili}}px; top:{{(bitem.y)*bili}}px;"></view>
                                </block>
                            </block>
                        </block>
                        <!-- 显示黑头 -->
                        <block wx:if="{{show_type==4}}">
                            <block wx:for="{{blackhead_list}}">
                                <block wx:for="{{item}}" wx:for-item="bitem">
                                    <view class="abs p_circle" style="left:{{(item.x-item.r)*bili}}px; top:{{(item.y-item.r)*bili}}px; height:{{2*item.r*bili}}px;width: {{2*item.r*bili}}px"></view>
                                </block>
                            </block>
                        </block>
                        <!-- 显示黑眼圈 -->
                        <block wx:if="{{show_type==5}}">
                            <block wx:for="{{dark_list}}">
                                <view class="abs p_point" style="left:{{item.x*bili}}px; top:{{item.y*bili}}px; "></view>
                            </block>
                        </block>
                        <!-- 显示痤疮 -->
                        <block wx:if="{{show_type==6}}">
                            <block wx:for="{{acne_list}}">
                                <!-- 当点击了tabs -->
                                <block wx:if="{{scroll_id>1}}">
                                    <view wx:if="{{item.type==(scroll_id-2)}}" class="abs p_circle colore{{item.type}}" style="left:{{(item.center_x-item.radius)*bili}}px; top:{{(item.center_y-item.radius)*bili}}px;height:{{2*item.radius*bili}}px;width: {{2*item.radius*bili}}px"></view>
                                </block>
                                <block wx:else>
                                    <view class="abs p_circle colore{{item.type}}" style="left:{{(item.center_x-item.radius)*bili}}px; top:{{(item.center_y-item.radius)*bili}}px;height:{{2*item.radius*bili}}px;width: {{2*item.radius*bili}}px"></view>
                                </block>
                            </block>
                        </block>

                    </block>
                </view>

                <!-- 痤疮的展示 -->
                <view wx:if="{{show_type==6}}" class="acne_show_li">
                    <view><text class="acne_show_li_item p_circle colore0"></text>粉刺</view>
                    <view><text class="acne_show_li_item p_circle colore1"></text>痘印</view>
                    <view><text class="acne_show_li_item p_circle colore2"></text>脓包</view>
                    <view><text class="acne_show_li_item p_circle colore3"></text>结节</view>
                </view>

            </view>

            <!-- 按钮使用 -->
            <view class="dialog_icon" catchtap="close_dialog" style="justify-content: flex-start;">
                <text class="iconfont icon-guan mt20" style="z-index: 999;font-size: 20rpx;"></text>
            </view>
            <view class="dialog_icon">
                <text catchtap="click_yanjing" class="iconfont {{yanjing?'icon-yanjing-kai':'icon-yanjing-guan'}} mgb20"></text>
                <!-- <text class="iconfont icon-yanjing-guan mgb20"></text> -->
                <text catchtap="click_fangda" class="iconfont icon-fangda mgb20"></text>
            </view>
            <!-- <block wx:if="{{show_type == 6}}">
                <view class="cuochuang">
                    <view class="cuochuang_icon">囊肿</view>
                    <view class="cuochuang_icon">丘疹</view>
                    <view class="cuochuang_icon">粉刺</view>
                    <view class="cuochuang_icon">痘印</view>
                </view>
            </block> -->
        </view>
        <!-- 文字显示区 -->
        <view class="dialog_txt" style="{{show_type == 5?'height:40%':'height:15%'}}">
            <block wx:if="{{show_type == 5}}">
                <view class="heiyanquan_img flex">
                    <view class="img1 t-c">
                        <image wx:if="{{sex === 'female' }}" style="width: 100%;height: 100rpx;" src="{{iurl}}/miniapp/images/skinimg/nv4.jpeg"></image>
                        <image wx:else style="width: 100%;height: 100rpx;" src="{{iurl}}/miniapp/images/skinimg/nan4.jpeg"></image>
                        <view class="fs24">血管型</view>
                    </view>
                    <view class="img1 t-c">
                        <image wx:if="{{sex === 'female' }}" style="width: 100%;height: 100rpx;" src="{{iurl}}/miniapp/images/skinimg/nv5.jpeg"></image>
                        <image wx:else style="width: 100%;height: 100rpx;" src="{{iurl}}/miniapp/images/skinimg/nan5.jpeg"></image>
                        <view class="fs24">色素型</view>
                    </view>
                    <view class="img1 t-c">
                        <image wx:if="{{sex === 'female' }}" style="width: 100%;height: 100rpx;" src="{{iurl}}/miniapp/images/skinimg/nv6.jpeg"></image>
                        <image wx:else style="width: 100%;height: 100rpx;" src="{{iurl}}/miniapp/images/skinimg/nan6.jpeg"></image>
                        <view class="fs24">阴影型</view>
                    </view>
                </view>
            </block>
            <view class="dialog_progress">
                <view style="margin-right:7px;font-size:32rpx;">
                    <text wx:if="{{show_type==1}}">毛孔粗大：{{pore_num}}</text>
                    <text wx:if="{{show_type==2}}">色斑：{{speckle_num}}</text>
                    <block wx:if="{{show_type==3}}">
                        <text wx:if="{{scroll_id==1}}" style="position: relative;top: 25rpx;">全部皱纹：{{wrinkle_num}}</text>
                        <text wx:if="{{scroll_id==2}}" style="position: relative;top: 25rpx;">抬头纹：{{wrinkle_num1}}</text>
                        <text wx:if="{{scroll_id==3}}" style="position: relative;top: 25rpx;">川字纹：{{wrinkle_num2}}</text>
                        <text wx:if="{{scroll_id==4}}" style="position: relative;top: 25rpx;">眼周细纹：{{wrinkle_num3}}</text>
                        <text wx:if="{{scroll_id==5}}" style="position: relative;top: 25rpx;">鱼尾纹：{{wrinkle_num4}}</text>
                        <text wx:if="{{scroll_id==6}}" style="position: relative;top: 25rpx;">法令纹：{{wrinkle_num5}}</text>
                        <text wx:if="{{scroll_id==7}}" style="position: relative;top: 25rpx;">口周纹：{{wrinkle_num6}}</text>
                    </block>
                    <text wx:if="{{show_type==4}}">黑头：{{blackhead_num}}</text>
                    <block wx:if="{{show_type==5}}">
                        <text wx:if="{{!s_dark_type}}">黑眼圈：{{s_filter.get_dark_type(dark_type)}}</text>
                        <text wx:if="{{s_dark_type==1}}">左眼黑眼圈：{{s_filter.get_dark_type(dark_type1)}}</text>
                        <text wx:if="{{s_dark_type==2}}">右眼黑眼圈：{{s_filter.get_dark_type(dark_type2)}}</text>
                    </block>
                    <block wx:if="{{show_type==6}}">
                        <text wx:if="{{scroll_id==1}}">全部痤疮：{{acne_num}}</text>
                        <text wx:if="{{scroll_id==2}}">粉刺：{{acne_num1}}</text>
                        <text wx:if="{{scroll_id==3}}">痘印：{{acne_num2}}</text>
                        <text wx:if="{{scroll_id==4}}">脓包：{{acne_num3}}</text>
                        <text wx:if="{{scroll_id==5}}">结节：{{acne_num4}}</text>
                    </block>
                    <text wx:if="{{show_type==7}}">敏感度：{{s_filter.get_nai_shou(skin_sensitive_check)}}</text>
                </view>
                <view style="margin-top:10rpx;display: flex;display: none">
                    <view class="pp"></view>
                    <view class="pp"></view>
                    <view class="pp"></view>
                    <view class="pp"></view>
                    <view class="pp"></view>
                    <view class="pp"></view>
                    <view class="pp"></view>
                    <view class="pp"></view>
                    <view class="pp"></view>
                </view>
            </view>
            <scroll-view wx:if="{{show_type == 3|| show_type == 5|| show_type == 6}}" style="margin-top: 20rpx;" enable-flex scroll-into-view="scroll{{scroll_id}}" scroll-with-animation scroll-x>
                <view class="flex fs28" style="height: 100%;">
                    <view wx:for="{{show_type == 3?zhouwen_arr:(show_type == 5?heitanquan_arr:cuochuang_arr)}}" bindtap="click_scroll" data-scroll_id="{{item.id}}" data-index="{{index}}" wx:key="id" id="scroll{{item.id}}" class="dialog_item {{scroll_index==index?'active1':''}}">
                        {{item.name}}
                    </view>
                </view>
            </scroll-view>
        </view>
    </block>
    <!-- 全图的，能够自由拖拽和放大 -->
    <block wx:else>
        <view bindtouchstart='touchstartCallback' bindtouchmove='touchmoveCallback' bindtouchEnd='touchendCallback' style="position: relative;transform: scale({{ig_scale}});top: {{img_top}}px; left: {{img_left}}px;">
            <image style="width: 100%;" src="{{iurl}}{{face_img}}" mode="widthFix"></image>

            <block wx:if="{{yanjing}}">
                <!-- 显示毛孔 -->
                <block wx:if="{{show_type==1}}">
                    <block wx:for="{{pore_list}}">
                        <view class="abs p_circle" style="left:{{(item.x-item.r)*bili1}}px; top:{{(item.y-item.r)*bili1}}px;height:{{2*item.r*bili1}}px;width: {{2*item.r*bili1}}px"></view>
                    </block>
                </block>
                <!-- 显示色斑 -->
                <block wx:if="{{show_type==2}}">
                    <block wx:for="{{speckle_list}}">
                        <block wx:for="{{item.position}}" wx:for-item="bitem">
                            <view class="abs p_point" style="left:{{(bitem.x)*bili1}}px; top:{{(bitem.y)*bili1}}px;"></view>
                        </block>
                    </block>
                </block>
                <!-- 显示皱纹 -->
                <block wx:if="{{show_type==3}}">
                    <block wx:for="{{wrinkle_list}}">
                        <!-- 当点击了tabs -->
                        <block wx:if="{{scroll_id>1}}">
                            <block wx:for="{{item}}" wx:for-item="bitem">
                                <view wx:if="{{bitem.w_type==(scroll_id-1)}}" class="abs p_point" style="left:{{(bitem.x)*bili1}}px; top:{{(bitem.y)*bili1}}px;"></view>
                            </block>
                        </block>
                        <block wx:else>
                            <view wx:for="{{item}}" wx:for-item="bitem" class="abs p_point" style="left:{{(bitem.x)*bili1}}px; top:{{(bitem.y)*bili1}}px;"></view>
                        </block>
                    </block>
                </block>
                <!-- 显示黑头 -->
                <block wx:if="{{show_type==4}}">
                    <block wx:for="{{blackhead_list}}">
                        <block wx:for="{{item}}" wx:for-item="bitem">
                            <view class="abs p_circle" style="left:{{(item.x-item.r)*bili1}}px; top:{{(item.y-item.r)*bili1}}px; height:{{2*item.r*bili1}}px;width: {{2*item.r*bili1}}px"></view>
                        </block>
                    </block>
                </block>
                <!-- 显示黑眼圈 -->
                <block wx:if="{{show_type==5}}">
                    <block wx:for="{{dark_list}}">
                        <view class="abs p_point" style="left:{{item.x*bili1}}px; top:{{item.y*bili1}}px; "></view>
                    </block>
                </block>
                <!-- 显示痤疮 -->
                <block wx:if="{{show_type==6}}">
                    <block wx:for="{{acne_list}}">
                        <!-- 当点击了tabs -->
                        <block wx:if="{{scroll_id>1}}">
                            <view wx:if="{{item.type==(scroll_id-2)}}" class="abs p_circle colore{{item.type}}" style="left:{{(item.center_x-item.radius)*bili1}}px; top:{{(item.center_y-item.radius)*bili1}}px;height:{{2*item.radius*bili1}}px;width: {{2*item.radius*bili1}}px"></view>
                        </block>
                        <block wx:else>
                            <view class="abs p_circle colore{{item.type}}" style="left:{{(item.center_x-item.radius)*bili1}}px; top:{{(item.center_y-item.radius)*bili1}}px;height:{{2*item.radius*bili1}}px;width: {{2*item.radius*bili1}}px"></view>
                        </block>
                    </block>
                </block>

            </block>
        </view>

        <view class="dialog_icon">
            <text catchtap="click_fangda" class="iconfont icon-suoxiao mgb20"></text>
        </view>
    </block>
</view>


<!-- 二维码显示页面 -->
<canvas canvas-id='share' style='width:750rpx;height:1093rpx;background-color:white;' wx:if='{{!canvasHidden}}'></canvas>
<!-- 展示分享图 -->
<view id="share_show" wx:if="{{share_show}}">
    <view class="cover-layer" bindtap="close_share" style="z-index: 77777"></view>
    <view class="share_content">
        <view class="sh_close" bindtap="close_share"><text class="iconfont icon-guan" style="font-size: 30rpx;"></text></view>
        <image src="{{shareImgPath}}" style="width: 100%" mode="widthFix"></image>
        <view class="share_save_btn" bindtap="savePic">保存到相册</view>
    </view>
</view>


<!-- 疑问弹框 -->
<view class="dialog" wx:if="{{question_dialog}}" style="padding:5% 3% 3% 3%;background: #fff;">
    <scroll-view enable-flex style="height: 80%;" scroll-into-view="yiwen{{yiwen_id}}" scroll-y scroll-with-animation enhanced show-scrollbar="false">
        <view class="mt20" id="yiwen{{item.id}}" wx:for="{{yiwen_type==1?zhouwen_arr1:(yiwen_type==2?heitanquan_arr1:cuochuang_arr1)}}" wx:key="id">
            <view>{{item.name}}</view>
            <view class="fs28 mt10" style="color: #666;">
                {{item.des}}
            </view>
            <image class="yiwen_img" mode="widthFix" src="{{iurl}}/miniapp/images/skinimg/{{item.sign}}.png"></image>
            <image class="yiwen_img" mode="widthFix" src="{{iurl}}/miniapp/images/skinimg/{{item.sign1}}.png"></image>
        </view>
    </scroll-view>
    <view style="position:fixed;bottom:0;width: 100%;">
        <scroll-view enable-flex scroll-into-view="yiwen{{yiwen_id}}" scroll-with-animation scroll-x>
            <view class="flex" style="padding: 30rpx 0;align-items: center;">
                <view wx:for="{{yiwen_type==1?zhouwen_arr1:(yiwen_type==2?heitanquan_arr1:cuochuang_arr1)}}" bindtap="click_yiwen_scroll" data-yiwen_id="{{item.id}}" data-index="{{index}}" wx:key="id" id="yiwen{{item.id}}" class="dialog_item {{yiwen_index==index?'active1':''}}">
                    {{item.name}}
                </view>
            </view>
        </scroll-view>
    </view>
    <view class="close_icon" bindtap="close_yiwen">
        <text class="iconfont icon-guan" ></text>
    </view>
</view>
<!-- 提示 -->
<warn id="warn"></warn>

<!-- 登陆框 -->
<login  wx:if="{{show_login}}" class="{{show_login?'up_login':''}}}" object="{{login_set}}"  id="login" bind:cancle_lg="clos_login"></login>