<template>
	<view>
		<wike-skeleton :count="5" v-if="homeTemplate.length === 0"></wike-skeleton>
		<view class="form u-flex align-center justify-center" :style="{height: windowHeight+'px'}"
			v-if="appInfo.page_template == 1 || !appInfo.page_template">
			<view class="top-notice" v-if="appInfo && appInfo.notice"><u-notice-bar
					:text="appInfo.notice"></u-notice-bar></view>
			<view class="logo"><u--image :src="appInfo.site_logo_path?appInfo.site_logo_path:'/static/images/head.jpg'"
					shape="circle" width="200rpx" height="200rpx"></u--image></view>
			<u-transition :show="true" mode="slide-left">
				<view class="title">{{ appInfo.site_name?appInfo.site_name:'A问答机器人' }}</view>
			</u-transition>
			<u-transition :show="true" mode="slide-right">
				<view class="desc">{{ appInfo.sub_title }}</view>
			</u-transition>
			<view class="btn-group">
				<view class="btn" @click="onToForm"><u-button shape="circle" iconColor="#ffffff" color="#26B3A0"
						icon="chat" text="立即提问"></u-button></view>
				<view v-if="appInfo.is_aipainting&&appInfo.is_aipainting == 1" class="btn" @click="ondraw"><u-button
						shape="circle" iconColor="#ffffff" color="#ffc107" icon="edit-pen-fill" text="AI绘画"></u-button>
				</view>
				<!-- #ifdef MP-WEIXIN -->
				<view class="btn">
					<u-button shape="circle" open-type="share" color="#26B3A0" :plain="true" icon="share"
						text="分享好友"></u-button>

					<!-- #ifdef H5 -->
					<!-- <u-button shape="circle" @click="h5share = true" color="#26B3A0" :plain="true" icon="share"
						text="分享好友"></u-button> -->
					<!-- #endif -->
				</view>
				<!-- #endif -->
			</view>
		</view>
		<view v-if="appInfo.page_template == 2 || appInfo.page_template == 3">
			<u-notice-bar v-if="appInfo && appInfo.notice" :text="appInfo.notice"></u-notice-bar>
			<view class="directask">
				<!-- 📝 -->
				<view class="askaquestion u-flex align-center justify-between">
					<!-- 🔥 -->
					<view class="u-flex align-center">
						<!-- <image src="/static/images/heat.png"></image> -->
						📝直接提问
					</view>
					<block v-if="showchat4">
						<u-tag v-if="appInfo.page_template == 2" @click="showsheet = true"
							:text="currentmodel+(userData.vip_info&&userData.is_validity>0?(userData.vip_info.gpt4_type == 'time'?' - 今日':' - 会员')+'剩余提问:'+(userData.vip_info.gpt4_times == -1?'无限量':userData.vip_info.gpt4_times-userData.vip_info.gpt4_used+'次'):'')+' ▼'"
							plain shape="circle" plainFill color="#26b3a0" borderColor="#26b3a0"
							bgColor="#26b3a014"></u-tag>
					</block>
					<block v-else>
						<u-tag v-if="appInfo.page_template == 2" @click="showsheet = true"
							:text="currentmodel+(userData.vip_info&&userData.is_validity>0?(userData.vip_info.gpt35_type == 'time'?' - 今日':' - 会员')+'剩余提问:'+(userData.vip_info.gpt35_times == -1?'无限量':userData.vip_info.gpt35_times-userData.vip_info.gpt35_used+'次'):'')+' ▼'"
							plain shape="circle" plainFill color="#26b3a0" borderColor="#26b3a0"
							bgColor="#26b3a014"></u-tag>
					</block>

				</view>
				<view class="textarea">
					<u--textarea @focus="focustextarea" maxlength="-1" v-model="valuechat" height="100" border="none"
						:placeholder="placeholder"></u--textarea>
					<view class="operate u-flex align-center">
						<view v-if="appInfo.page_template == 3" style="margin-right: 32rpx;">
							<u--image :showLoading="true" :src="homeTemplate.mode[selectornot].img_file.path" width="30"
								height="30" @click="switchmodel = true" shape="circle"></u--image>
						</view>

						<view @click="valuechat = ''" class="empty">清空</view>
						<view @click="onSubmit(valuechat)" hover-class="hoversubmit" class="submit">{{tapsubmit}}</view>
					</view>
				</view>
				<view v-if="appInfo.page_template == 3" style="margin-bottom: 16px">
					<u-alert :title="appInfo.notice" type="warning" effect="dark"></u-alert>
				</view>


				<block v-if="appInfo.page_template == 2">
					<view class="askaquestion u-flex align-center justify-between">
						<!-- 🔥 -->
						<view class="u-flex align-center">
							<!-- <image src="/static/images/heat.png"></image> -->
							🔥热门提问
						</view>
						<view @click="updateTemplate" class="tn-flex align-center"
							style="justify-content: flex-end;margin-top: 15rpx;">
							<view style="color: #9e9e9e;margin-right: 10rpx;">换一换</view>
							<u-icon name="reload" color="#9e9e9e" size="18"></u-icon>
						</view>
					</view>
					<block v-for="(item, index) in homeTemplate.hot" :key="index">
						<view class="case" @click="onSubmit(item.text)">{{ item.text }}</view>
					</block>
				</block>

				<!-- #ifdef MP-WEIXIN -->
				<view class="wxad" v-if="appInfo.wxad_index && appInfo.wxad_index >= 1">
					<view style="width: 100%;">
						<wike-flow-main :flowtype="appInfo.wxad_index" :banner_id="appInfo.banner_id"
							:video_banner_id="appInfo.video_banner_id" :native_id="appInfo.native_id"></wike-flow-main>
					</view>
				</view>
				<!-- #endif -->
				<block v-if="appInfo.page_template == 2">
					<view class="askaquestion u-flex align-center justify-between">
						<!-- 🛠️ -->
						<view class="u-flex align-center">
							<!-- <image src="/static/images/formwork.png"></image> -->
							🛠️提问模板
						</view>
						<view @click="onhelper" class="tn-flex align-center"
							style="justify-content: flex-end;margin-top: 15rpx;">
							<view style="color: #9e9e9e;margin-right: 6rpx;">更多</view>
							<u-icon name="arrow-right" color="#9e9e9e" size="18"></u-icon>
						</view>
					</view>
					<view style="margin-bottom: 10rpx;" class="u-flex flex-wrap justify-between align-center">
						<navigator class="helpme" :url="'/pages/template/detail?id=' + item.id"
							v-for="(item, index) in homeTemplate.template" :key="index">
							<view class="title">{{ item.title }}</view>
							<view class="sub_title">{{ item.sub_title }}</view>
						</navigator>
					</view>
				</block>
				<wike-ad></wike-ad>
			</view>
		</view>

		<u-action-sheet @select="selectClick" :round="10" :actions="sheetlist" :title="titlesheet" :show="showsheet"
			safeAreaInsetBottom @close="showsheet = false" cancelText="关闭"></u-action-sheet>
		<!-- #ifdef H5 -->
		<u-popup :show="h5share" mode="center" @close="h5share = false">
			<view class="cu-dialog">
				<image class="guide-img" src="http://shopro.7wpp.com/imgs/modal/share_guide.png" mode=""></image>
			</view>
		</u-popup>
		<!-- #endif -->
		<u-popup :show="switchmodel" @close="switchmodel = false" :round="15" closeable>
			<view class="select u-flex justify-center"><text>选择角色</text></view>
			<scroll-view scroll-y="true"
				:style="{ height: homeTemplate.mode&&homeTemplate.mode.length > 6 ? 700 + 'rpx' : 'auto' }">
				<block v-for="(item, index) in homeTemplate.mode" :key="index">
					<view class="u-flex justify-between model_view">
						<u-avatar
							:src="item.img_file != null&&item.img_file.path?item.img_file.path:'/static/images/open.png'"
							shape="square" mode="aspectFill" size="60"></u-avatar>
						<view class="modelname">
							<view class="name">{{ item.name }}</view>
							<view class="modeldetails">{{ item.intro }}</view>
						</view>
						<view @click="onselect(index)" class="modelselect"
							:style="{ background: selectornot == index ? '#9e9e9e' : '' }">
							{{ selectornot == index ? '已选择' : '选择' }}
						</view>
					</view>
				</block>
				<view style="height: 30rpx;"></view>
			</scroll-view>
		</u-popup>
		<wike-model v-if="signShow" :authorize="false" :title="signTitle" btnText="立即获取" @save="signSign"
			@close="signShow = false"></wike-model>
		<block v-if="is_aipainting">
			<wike-tabbar2 v-if="appInfo.page_template == 3" :onTabbar="onTabbar" :is_aipainting="is_aipainting"
				:isShowAnimate="isShowAnimate" :appInfos="appInfo.page_template"></wike-tabbar2>
			<wike-tabbar v-else :onTabbar="onTabbar" :is_aipainting="is_aipainting" :isShowAnimate="isShowAnimate"
				:appInfos="appInfo.page_template"></wike-tabbar>
		</block>
		<wike-modal-qrcode :qrcode="gzhqrcode" :showconcern="showconcern"
			@concernclose="concernclose"></wike-modal-qrcode>
	</view>
</template>

<script>
	import {
		mapMutations,
		mapActions,
		mapState,
		mapGetters
	} from 'vuex';
	let interstitialAd = null,
		timer,
		time2;
	export default {
		components: {},
		data() {
			return {
				signTitle: '',
				signShow: false,
				selectornot: 0,
				onTabbar: false,
				isShowAnimate: false,
				valuechat: '',
				platform: this.$platform.get(),
				h5share: false,
				windowHeight: 0,
				placeholder: '您可以向AI提出任何问题...',
				tapsubmit: ' 提交问题',
				//模型
				// paintingmode:false,
				showsheet: false,
				titlesheet: '切换模型',
				//是否为gpt4模型
				showchat4: false,
				//模型数据
				// #ifdef MP-WEIXIN
				sheetlist: [{
					index: 1,
					name: 'ChatGPT 3.5',
					subname: "高效沟通·简单提问",
					color: '#26b3a0d6',
					disabled: false
				}, ],
				// #endif
				// #ifdef H5
				sheetlist: [{
						index: 0,
						name: 'ChatGPT 4.0',
						subname: "超级高效沟通·简单提问",
						disabled: false
					},
					{
						index: 1,
						name: 'ChatGPT 3.5',
						subname: "高效沟通·简单提问",
						color: '#26b3a0d6',
						disabled: false
					},
				],
				// #endif
				// 消耗
				plan: {},
				currentmodel: '',
				switchmodel: false,
				is_aipainting: '',
				showconcern: false,
				gzhqrcode: ''
			};
		},
		computed: {
			...mapGetters(['appInfo', 'isLogin', 'userInfo', 'homeTemplate', 'userData'])
		},

		onLoad() {
			var that = this;
			uni.getSystemInfo({
				success: function(res) {}
			});
			setTimeout(() => {
				that.onTabbar = true;
				that.isShowAnimate = true;
			}, 500);
		},
		onReady() {
			let that = this;
			// #ifdef MP-WEIXIN
			clearTimeout(timer);
			// 在适合的场景显示插屏广告
			timer = setTimeout(function() {
				// 在页面onLoad回调事件中创建插屏广告实例
				if (wx.createInterstitialAd && that.appInfo.interstitial_status == 1) {
					interstitialAd = wx.createInterstitialAd({
						adUnitId: that.appInfo.interstitial_id
					});
					interstitialAd.onLoad(() => {});
					interstitialAd.onError(err => {});
					interstitialAd.onClose(() => {
						if (that.appInfo.interstitial_infinite_status && that.appInfo
							.interstitial_infinite_status == 1) {
							that.showInterstitial();
						} else {
							interstitialAd.show().catch(err => {
								console.error(err);
							});
						}
					});
					interstitialAd.show().catch(err => {
						console.error(err);
					});
				}
			}, 4000);
			// #endif
		},
		onShow() {
			if (this.isLogin) {
				this.getUserData();

				this.currentmodel = uni.getStorageSync("prestore") || "";
			}
			this.init()
			this.windowHeight = uni.$u.sys().windowHeight
			this.systemwechat()
		},
		onUnload() {
			clearInterval(time2);
		},
		methods: {
			...mapActions(['appInit', 'logout', 'getUserInfo', 'getUserData']),
			init() {
				var that = this;
				return Promise.all([this.appInit()]).then(res => {
					that.is_aipainting = that.appInfo.is_aipainting
					uni.setNavigationBarTitle({
						title: that.appInfo.site_name
					});
					that.getPlan();
				});
			},
			systemwechat() {
				this.$http('conf.getGroupConf', {
					group: 'system.wechat'
				}).then(res => {
					if (res.code == 0) {
						this.gzhqrcode = res.data.qrcode_path
						const focuson = uni.getStorageSync('focuson');
						// console.log(focuson);
						if (!focuson) {
							if (this.gzhqrcode) {
								if (this.appInfo.is_show_index_qrcode == 1) {
									this.showconcern = true
								}
								if (this.isLogin && this.appInfo.is_show_logged_qrcode == 1) {
									this.showconcern = true
								}
							}
						}
					}
				})
			},
			concernclose() {
				this.showconcern = false
			},
			onselect(e) {
				this.showcontext = false
				this.switchmodel = this.selectornot == e ? true : false
				this.selectornot = e;
			},
			showInterstitial() {
				time2 = setInterval(
					function() {
						interstitialAd.show().catch(err => {
							console.error(err);
						});
					},
					this.appInfo.gap ? this.appInfo.gap * 1000 : 12000
				);
			},

			//选择模型
			selectClick(index) {
				for (var a = 0; a < this.sheetlist.length; a++) {
					this.sheetlist[a].color = '#000'
				}
				// #ifdef MP-WEIXIN
				this.sheetlist[index.index - 1].color = '#26b3a0d6'
				// #endif
				// #ifdef H5
				this.sheetlist[index.index].color = '#26b3a0d6'
				// #endif
				this.showchat4 = index.index == 0 ? true : false
				// this.showchat4 = false
				this.getcurrentmodel()
			},
			getPlan() {
				let that = this;
				this.$http('conf.getGroupConf', {
					group: 'system.plan'
				}).then(res => {
					if (res.code == 0) {
						this.plan = res.data

						let gpt = this.appInfo;
						// #ifdef H5
						if (gpt.is_gpt4 == 2) {
							this.sheetlist.shift()

							this.sheetlist[0].name = gpt.gpt35_alias ? gpt.gpt35_alias : 'ChatGPT 3.5'
							this.sheetlist[0].subname = gpt.gpt35_intro ? gpt.gpt35_intro : '高效沟通·简单提问'
						} else {
							this.sheetlist[0].name = gpt.gpt4_alias ? gpt.gpt4_alias : 'ChatGPT 4.0'
							this.sheetlist[0].subname = gpt.gpt4_intro ? gpt.gpt4_intro : '高效沟通·简单提问'

							this.sheetlist[1].name = gpt.gpt35_alias ? gpt.gpt35_alias : 'ChatGPT 3.5'
							this.sheetlist[1].subname = gpt.gpt35_intro ? gpt.gpt35_intro : '高效沟通·简单提问'
						}
						// #endif
						// #ifdef MP-WEIXIN
						this.sheetlist[0].name = gpt.gpt35_alias ? gpt.gpt35_alias : 'ChatGPT 3.5'
						this.sheetlist[0].subname = gpt.gpt35_intro ? gpt.gpt35_intro : '高效沟通·简单提问'
						// #endif
						this.getcurrentmodel()

					}
				})

			},
			getcurrentmodel() {
				let gpt = this.appInfo;
				if (this.showchat4) {
					this.currentmodel = gpt.gpt4_alias ? gpt.gpt4_alias : 'ChatGPT 4.0'
				} else {
					this.currentmodel = gpt.gpt35_alias ? gpt.gpt35_alias : 'ChatGPT 3.5'
				}

				uni.setStorageSync('prestore', this.currentmodel);
			},
			updateTemplate() {
				this.$store.dispatch('getTemplate');
			},
			onToForm() {
				uni.navigateTo({
					url: '/pages/chat/chat'
				});
			},
			onhelper() {
				uni.switchTab({
					url: '/pages/template/template'
				});
			},
			focustextarea() {
				if (!this.isLogin) {
					uni.navigateTo({
						url: '/pages/user/signin'
					});
					uni.setStorageSync('route', '/pages/index/index');
					return;
				}
			},
			ondraw() {
				// uni.navigateTo({
				// 	url: '/pages/chat/chat?draw=1'
				// });
				uni.switchTab({
					url: '/pages/painting/painting'
				})
			},
			signSign() {
				uni.navigateTo({
					url: '/pages/user/member/member'
				});
				this.signShow = false
			},
			onSubmit(e) {
				var that = this;
				if (!that.isLogin) {
					uni.navigateTo({
						url: '/pages/user/signin'
					});
					uni.setStorageSync('route', '/pages/index/index');
					return;
				}
				if (!e) {
					uni.showToast({
						title: '请输入关键词或问题',
						icon: 'none'
					});

					return;
				}
				if (that.appInfo.time_member && that.appInfo.time_member == 1) {
					if (that.showchat4) {
						if (that.userData.vip_info && that.userData.is_validity > 0 && that.userData.vip_info.gpt4_used ==
							that.userData.vip_info.gpt4_times && that.userData.coin < that.plan.lock_gpt4) {
							var alias = that.appInfo.number_alias ? that.appInfo.number_alias : '点数';
							// this.signTitle = "<p style='font-weight: 550;font-size: 16px;'>您的提问<span>" + alias +
							// 	"</span>不足或会员套餐内剩余次数不足，无法发起提问</p>"
							this.signTitle =
								"<p style='font-weight: 550;font-size: 16px;'>提问需要<span style='color: #26b3a0;padding: 0 4px;'>" +
								that.plan.lock_gpt4 + "</span><span>" + alias +
								"</span></p><p style='padding-top: 10px;'>您的提问<span>" + alias +"</span>不足或会员套餐内剩余次数不足，无法发起提问</p>"
							this.signShow = true
							return;
						}
						if (that.userData.is_validity == 0&&that.userData.coin < that.plan.lock_gpt4) {
							var alias = that.appInfo.number_alias ? that.appInfo.number_alias : '点数';
							this.signTitle =
								"<p style='font-weight: 550;font-size: 16px;'>提问需要<span style='color: #26b3a0;padding: 0 4px;'>" +
								that.plan.lock_gpt4 + "</span><span>" + alias +
								"</span></p><p style='padding-top: 10px;'>您的提问<span>" + alias +"</span>不足或会员套餐内剩余次数不足，无法发起提问</p>"
							this.signShow = true
							return;
						}
					} else {
						if (that.userData.is_validity > 0 && that.userData.vip_info.gpt35_used == that.userData.vip_info
							.gpt35_times && that.userData.coin <= 0) {
							var alias = that.appInfo.number_alias ? that.appInfo.number_alias : '点数';
							// this.signTitle = "<p style='font-weight: 550;font-size: 16px;'>您的提问<span>" + alias +
							// 	"</span>不足或会员套餐内剩余次数不足，无法发起提问</p>"
							this.signTitle =
								"<p style='font-weight: 550;font-size: 16px;'>提问需要<span style='color: #26b3a0;padding: 0 4px;'>" +
								1 + "</span><span>" + alias +
								"</span></p><p style='padding-top: 10px;'>您的提问<span>" + alias +"</span>不足或会员套餐内剩余次数不足，无法发起提问</p>"
							this.signShow = true
							return;
						}
						if (that.userData.is_validity == 0&&that.userData.coin <= 0) {
							var alias = that.appInfo.number_alias ? that.appInfo.number_alias : '点数';
							this.signTitle =
								"<p style='font-weight: 550;font-size: 16px;'>提问需要<span style='color: #26b3a0;padding: 0 4px;'>" +
								1 + "</span><span>" + alias +
								"</span></p><p style='padding-top: 10px;'>您的提问<span>" + alias +"</span>不足或会员套餐内剩余次数不足，无法发起提问</p>"
							this.signShow = true
							return;
						}
					}
				} else {
					if (that.showchat4 && that.userData.coin < that.plan.lock_gpt4) {
						var alias = that.appInfo.number_alias ? that.appInfo.number_alias : '点数';
						this.signTitle =
							"<p style='font-weight: 550;font-size: 16px;'>提问需要<span style='color: #26b3a0;padding: 0 4px;'>" +
							that.plan.lock_gpt4 + "</span><span>" + alias +
							"</span></p><p style='padding-top: 10px;'>您当前有<span style='color: #26b3a0;padding: 0 4px;'>" +
							that.userData.coin + "</span><span>" + alias + "</span>，无法发起提问，快去获取<span>" + alias +
							"</span>吧</p>"
						this.signShow = true
						return;
					}
					if (!that.showchat4 && that.userData.coin <= 0) {
						var alias = that.appInfo.number_alias ? that.appInfo.number_alias : '点数';
						this.signTitle =
							"<p style='font-weight: 550;font-size: 16px;'>提问需要<span style='color: #26b3a0;padding: 0 4px;'>" +
							1 + "</span><span>" + alias +
							"</span></p><p style='padding-top: 10px;'>您当前有<span style='color: #26b3a0;padding: 0 4px;'>" +
							that.userData.coin + "</span><span>" + alias + "</span>，无法发起提问，快去获取<span>" + alias +
							"</span>吧</p>"
						this.signShow = true
						return;
					}
				}
				// if(that.showchat4){
				// 	if(that.userData.coin < that.plan.lock_gpt4){
				// 		var alias = that.appInfo.number_alias ? that.appInfo.number_alias : '点数';
				// 		this.signTitle = "<p style='font-weight: 550;font-size: 16px;'>提问需要<span style='color: #26b3a0;padding: 0 4px;'>"+that.plan.lock_gpt4+"</span><span>"+alias+"</span></p><p style='padding-top: 10px;'>您当前有<span style='color: #26b3a0;padding: 0 4px;'>"+that.userData.coin+"</span><span>"+alias+"</span>，此模型不支持会员套餐，无法发起提问，快去获取<span>"+alias+"</span>吧</p>"
				// 		this.signShow = true
				// 		return;
				// 	}
				// }
				// if (that.appInfo.time_member && that.appInfo.time_member == 1) {
				// 	if (that.userData.is_validity > 0 && that.userData.vip_info.gpt35_used == that.userData.vip_info.gpt35_times && that.userData.coin <= 0) {
				// 		var alias = that.appInfo.number_alias ? that.appInfo.number_alias : '点数';
				// 		this.signTitle = "<p style='font-weight: 550;font-size: 16px;'>您的提问<span>"+alias+"</span>/会员套餐内剩余次数不足</p>"
				// 		this.signShow = true

				// 		return;
				// 	}
				// 	if (that.userData.is_validity == 0) {
				// 		if (that.userData.coin <= 0) {
				// 			var alias = that.appInfo.number_alias ? that.appInfo.number_alias : '点数';
				// 			this.signTitle = "<p style='font-weight: 550;font-size: 16px;'>您的提问<span>" + alias +
				// 				"</span>/会员套餐已到期</p>"
				// 			this.signShow = true
				// 			return;
				// 		}
				// 	}
				// } else {
				// 	if (that.userData.coin <= 0) {
				// 		var alias = that.appInfo.number_alias ? that.appInfo.number_alias : '点数';
				// 		this.signTitle = "<p style='font-weight: 550;font-size: 16px;'>您的提问<span>" + alias +
				// 			"</span>不足</p>"
				// 		this.signShow = true
				// 		return;
				// 	}
				// }

				if (that.showchat4) {
					uni.navigateTo({
						url: '/pages/chat/chat?showchat4=' + e + '&chat4=1'
					});
					that.valuechat = ''
					return;
				}
				uni.navigateTo({
					url: '/pages/chat/chat?question=' + e + '&selectornot=' + that.selectornot
				});

			}
		}
	};
</script>

<style lang="scss">
	.top-notice {
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
	}

	.form {
		flex-direction: column;

		.title {
			font-size: 38rpx;
			font-weight: bolder;
			margin: 15rpx 35rpx 0;
		}

		.desc {
			font-size: 28rpx;
			color: #666;
			margin: 15rpx 35rpx;
		}

		.btn-group {
			width: 80%;
			margin-top: 10%;

			.btn {
				margin: 30rpx 0rpx;

				.u-button {
					height: 100rpx;
				}
			}
		}
	}

	.directask {
		padding: 30rpx 30rpx 200rpx;
		border-top: 1px solid #ededed;

		.askaquestion {
			font-size: 32rpx;
			margin-bottom: 25rpx;

			image {
				width: 32rpx;
				height: 32rpx;
				margin-right: 12rpx;
			}
		}

		.textarea {
			box-shadow: 0px 0px 10px 5px #9e9e9e36;
			margin-top: 30rpx;
			margin-bottom: 30rpx;
			border-radius: 20rpx;
			padding: 20rpx 30rpx 30rpx 12rpx;

			.u-textarea {
				border-radius: 20rpx;
			}

			.operate {
				justify-content: flex-end;

				.empty {
					margin-right: 30rpx;
					border: 1px solid #9e9e9e;
					color: #9e9e9e;
					padding: 12rpx 42rpx;
					border-radius: 10rpx;
				}

				.submit {
					padding: 12rpx 42rpx;
					border-radius: 10rpx;
					border: 1px solid #26b3a0;
					background: linear-gradient(to right, #00ca88, #00BCD4);
					color: #fff;
				}

				.hoversubmit {
					background: #f7f7f7;
					color: #acacb3;
				}
			}
		}

		.case {
			color: #26b3a0;
			background: #f5f8f7;
			width: 100%;
			height: 80rpx;
			line-height: 80rpx;
			font-size: 30rpx;
			padding-left: 30rpx;
			border-radius: 10rpx;
			margin: 25rpx 0;
			border-radius: 10rpx;
			overflow: hidden;
			display: -webkit-box !important;
			text-overflow: ellipsis;
			word-break: break-all;
			-webkit-line-clamp: 1;
			-webkit-box-orient: vertical !important;
		}

		.helpme {
			background: #f5f8f7;
			border-radius: 20rpx;
			padding: 30rpx;
			width: 48%;
			margin-bottom: 25rpx;

			// height: 92px;
			.title {
				font-size: 30rpx;
				font-weight: bold;
				margin-bottom: 18rpx;
				color: #000;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap
			}

			.sub_title {
				color: #8f9ca2;
				font-size: 24rpx;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 2;
			}
		}
	}

	.wxad {
		border-radius: 20rpx;
		overflow: hidden;
		margin-bottom: 24rpx;
	}

	.cu-dialog {
		position: fixed;
		top: 60rpx;
		left: 100rpx;
	}

	.guide-img {
		width: 580rpx;
		height: 430rpx;
	}

	.select {
		font-weight: bold;
		font-size: 32rpx;
		margin: 30rpx;
	}

	.model_view {
		margin: 30rpx;

		.modelname {
			font-size: 32rpx;
			font-weight: bold;
			width: 56%;

			.name {
				overflow: hidden;
				white-space: nowrap;
				text-overflow: ellipsis;
			}

			.modeldetails {
				font-size: 26rpx;
				font-weight: 500;
				margin-top: 12rpx;
				color: #9e9e9e;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-line-clamp: 2;
				-webkit-box-orient: vertical;
			}
		}

		.modelselect {
			background: #03a9f4;
			border-radius: 14rpx;
			color: #fff;
			width: 58px;
			height: 30px;
			line-height: 30px;
			text-align: center;
		}
	}
</style>