<template>
	<view class="main">
		<view class="text1">第一步：关注普强信息公众号</view>
		<view style="width: 96%;margin: 0 auto;">
			<view class="text2" style="margin-top: 30rpx;">1.长按识别二维码或保存至相册进行关注</view>
			<view style="text-align: center;" >
				<image @click="baocun()" style="width: 300rpx;height: 300rpx;" src="../../static/images/supimg.jpg" mode=""></image>
			</view>
			<view style="margin-top: 30rpx;" class="text2">2.微信搜索公众号【普强信息】进行关注</view>
		</view>
		<view style="margin-top: 30rpx;" class="text1">第二步：点击【用户绑定】，完成绑定即可</view>
		<view style="width: 100%;margin-top: 30rpx;">
			<image style="width: 100%;height: 362rpx;" src="../../static/images/supsrc.png" mode=""></image>
		</view>
		<view style="font-size: 30rpx;color: red;margin-top: 30rpx;">
			注意：微信绑定手机号与AI营销辅助平台登录的手机号不一致时无法接受消息。
		</view>
	</view>
</template>

<script>
	var app = getApp();
	var util = require("../../utils/util.js");
	var config = require("../../config");

	export default {
		data() {
			return {
			
			};
		},
		onShow: function() {
			var userInfos = uni.getStorageSync('weapp_session_userInfo_data');
		},
		methods: {
			 baocun () {
			        const _this = this;
			        wx.getImageInfo({
			            src: '/static/images/supimg.png',
			            success: function (res) {
			                wx.saveImageToPhotosAlbum({
			                    filePath: res.path,
			                    success (result) {
			                        _this.setData({ show: false });
			                        wx.showToast({
			                            title: '保存成功',
			                            icon: 'success',
			                            duration: 2000
			                        })
			                    },
			                    fail (err) {
			                        if (err.errMsg === "saveImageToPhotosAlbum:fail auth deny") {
			                            wx.openSetting({
			                                success (settingdata) {
			                                    if (settingdata.authSetting['scope.writePhotosAlbum']) {
			                                        _this.savePhoto()
			                                    } else {
			                                        wx.showToast({
			                                            title: '获取权限失败,无法保存图片',
			                                            icon: 'success',
			                                            duration: 2000
			                                        })
			                                    }
			                                }
			                            })
			                        }
			                    }
			                })
			            }
			        })
			    }
		}
	};
</script>
<style lang="scss" scoped>
	.main {
		padding:30rpx;
		background: #F8F8F8;
		display: flex;
		flex-direction: column;
		min-height: 100vh;
		padding-bottom: 40rpx;
		background: #FFFFFF;
		.text1{
			color: #303030;
			font-size: 30rpx;
		}
		.text2{
			font-size: 30rpx;
			color: #666666;
		}
	}
</style>
