Explorar el Código

更新 'pages/painting/generate.vue'

wenxin hace 2 años
padre
commit
f2fbcb17a7
Se han modificado 1 ficheros con 832 adiciones y 1242 borrados
  1. 832 1242
      pages/painting/generate.vue

+ 832 - 1242
pages/painting/generate.vue

xqd xqd
@@ -1,155 +1,253 @@
 <template>
 	<view>
-		<view style="color: #fff;">
-			<tn-nav-bar :isBack="isBack" backgroundColor="#207cf7" :bottomShadow="false">MidJourney绘图</tn-nav-bar>
-			<view :style="{ height: tobheight + 'px' }"></view>
-		</view>
-		<view v-if="showdrawing" class="template-details">
-			<u-notice-bar :text="noticebar" step></u-notice-bar>
-			<view class="lazy-loading tn-flex justify-center align-center flex-wrap">
-				<view class="preloader_1">
-					<view></view>
-					<view></view>
-					<view></view>
-					<view></view>
-					<view></view>
-				</view>
-				<view class="drawing">
-					{{drawingtitle}}
+		<!-- <wike-skeleton :count="5" v-if="!applayList.length"></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="form u-flex align-center justify-center" :style="{height: windowHeight+'px'}"
+			v-if="appInfo.page_template == 1">
+			<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:'AI问答机器人' }}</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="#207CF7"
+						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 v-if="showprogress" class="progress">
-					<u-line-progress :percentage="percentage" activeColor="#9b59b6" height="18"></u-line-progress>
-				</view>
-				<!-- #endif -->
-
 			</view>
 		</view>
-
-		<view v-if="mjurl" class="displaypage">
-
-			<view class="generategraph">
-				<!-- <u--image @load="previewload" @error="previewerror" @click="preview(mjurl)"  width="100%" height="100%" :src="mjurl" mode="widthFix" radius="8" >
-						<template v-slot:loading>
-						    <u-loading-icon color="#3c9cff" size="36" text="图片渲染中" textSize="18" :vertical="true"></u-loading-icon>
-							
-						  </template>
-						<view slot="error" style="font-size: 32rpx;text-align: center;">
-							图片加载失败
-						</view>
-					</u--image> -->
-				<image @click="preview(mjurl)" show-menu-by-longpress webp :src="mjurl" @load="previewload"
-					@error="previewerror" mode="widthFix"></image>
-			</view>
-
-			<block v-if="done">
-				<u-subsection v-if="radiolist7.length == 2" :list="subsectionlist" mode="subsection" fontSize="15"
-					:current="current" @change="tapsubsection"></u-subsection>
-				<view class="u-demo-block">
-					<view style="margin-top: 30rpx;">
-						<view class="u-page__radio-item">
-							<u-radio-group v-model="radiovalue7" :borderBottom="true" placement="column"
-								iconPlacement="right" @change="groupChange">
-								<u-radio labelSize="18" size="22" iconSize="16" :customStyle="{marginBottom: '16px'}"
-									v-for="(item, index) in radiolist7" :key="index" :label="item.name"
-									:name="item.name">
-								</u-radio>
-							</u-radio-group>
-						</view>
+		<view v-if="appInfo.page_template == 2 || appInfo.page_template == 3" style="background:#F4F7FC;">
+			<view class="newTop">
+				<view class="topTitle" :style="{paddingTop:isWx?'0':'53rpx',marginBottom:isWx?'0':'32rpx'}">
+					<view class="" v-if="!isWx">
+						AI人工智能助手
 					</view>
 				</view>
-			</block>
-			<block v-else>
-				<view class="drawingdone">
-					{{drawingtitle}}
-				</view>
-				<!-- <u-line-progress :percentage="percentage" activeColor="#3c9cff" height="18"></u-line-progress> -->
-				<view class="u-flex align-center justify-center">
-					<tn-circle-progress :percent="percentage" :borderWidth="18" activeColor="#3c9cff"
-						:showPercent="true"></tn-circle-progress>
-				</view>
-
-			</block>
-
-			<view style="height: 100px;"></view>
-		</view>
-
-		<!-- 底部tabbar start-->
-		<view class="tabbar footerfixed dd-glass tn-color-white" style="border-radius: 16rpx;">
-			<view class="action" @click="getisback">
-				<view class="bar-icon">
-					<view class="tn-icon-left-circle">
-					</view>
-
+				<view class="overBox" style="">
+					<u-notice-bar style="" bgColor='#C6D6E4' color='#3F5465' v-if="appInfo && appInfo.notice"
+						:text="appInfo.notice" :playState="playState" @over="handleOver"
+						@out="handleOut"></u-notice-bar>
 				</view>
-				<view class="">立即退出</view>
 			</view>
-			<view class="action" @click="downLoad">
-				<view class="bar-icon">
-					<view class="tn-icon-download">
+			<view class="directask">
+				<view class="addBg" style="padding-left: 0;padding-right: 0;">
+					<!-- 📝 -->
+					<view class="askaquestion u-flex align-center justify-between quesTop" style="">
+						<!-- 🔥 -->
+						<view class="u-flex align-center" style="align-items:center;">
+							<image src="/static/newIndex/quesIcon.png" mode="" style="width: 60rpx;height: 68rpx;">
+							</image>
+							<view class="quesRight" style="display: flex;align-items: center;">
+								<view class="quesTxt">直接提问</view>
+								<image src="/static/newIndex/dian.png" mode=""
+									style="height: 30rpx; height: 12rpx;margin-left: 10rpx;">
+								</image>
+							</view>
+						</view>
+						<block v-if="showchat4">
+							<view class="modalTag" @click="showsheet = true">
+								<view class="tagTxt" :class="[!isPc?'mw':'']">
+									{{currentmodel}}
+								</view>
+								<image style="width: 22rpx;height: 12rpx;margin-left: 14rpx;"
+									src="/static/newIndex/arrDown.png" mode=""></image>
+							</view>
+						</block>
+						<block v-else-if="showchat35">
+							<view class="modalTag" @click="showsheet = true">
+								<view class="tagTxt" :class="[!isPc?'mw':'']">
+									{{currentmodel}}
+								</view>
+								<image style="width: 22rpx;height: 12rpx;margin-left: 14rpx;"
+									src="/static/newIndex/arrDown.png" mode=""></image>
+							</view>
+						</block>
+
+						<!-- 文心一言 -->
+						<block v-else>
+							<view class="modalTag" @click="showsheet = true">
+								<view class="tagTxt" :class="[!isPc?'mw':'']">
+									{{currentmodel}}
+								</view>
+								<image style="width: 22rpx;height: 12rpx;margin-left: 14rpx;"
+									src="/static/newIndex/arrDown.png" mode="">
+								</image>
+							</view>
+						</block>
 					</view>
-
-				</view>
-				<view class="">下载</view>
-			</view>
-			<view class="action" @click="getdownload">
-				<view class="bar-icon">
-					<view class="tn-icon-share-circle">
+					<view class="textarea">
+						<view class="inputTxtBox">
+							<u--textarea @focus="focustextarea" maxlength="-1" v-model="valuechat" height="100"
+								border="none" :placeholder="placeholder"></u--textarea>
+							<image v-if="valuechat" @click="valuechat = ''" class="clearImg" src="/static/clear.png"
+								mode=""></image>
+						</view>
+						<!-- 	<view class="operate u-flex align-center">
+							<view v-if="appInfo.page_template == 3" style="margin-right: 32rpx;">
+								<u--image :showLoading="true" :src="homeTemplate1.mode[selectornot].img_file.path"
+									width="30" height="30" @click="switchmodel = true" shape="circle"></u--image>
+							</view>
+						</view> -->
+						<view class="clearAndSumBtn">
+							<view @click="onSubmit(valuechat)" hover-class="hoversubmit" class="submit">
+								{{tapsubmit}}
+							</view>
+							<view class="rClear">
+								<image @click.stop="goLead" src="/static/wenhao.png" mode=""
+									style="width: 52rpx;height: 52rpx;"></image>
+							</view>
+						</view>
 					</view>
-
 				</view>
-				<view class="">分享</view>
-			</view>
-			<view class="action" @click="parameters">
-
-				<view class="bar-icon">
-					<view class="tn-icon-creative">
+				<!-- 	<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" style="margin-bottom: 4rpx;">
+						<!-- 🔥 -->
+						<view class="u-flex align-center">
+							<image src="/static/newIndex/fire.png"
+								style="width: 40rpx;height: 42rpx;margin-left: 10rpx;"></image>
+							<text class="hotTxt">热门提问</text>
+						</view>
+						<view @click="updateTemplate" class="tn-flex align-center"
+							style="justify-content: flex-end;margin-top: 15rpx;">
+							<view style="" class="change">换一换</view>
+							<image ref="hyh" id="img01" class="shuaxin" :class="{'go':addRotate}"
+								src="/static/newIndex/change.png" style="width: 32rpx;height:28rpx;">
+							</image>
+						</view>
 					</view>
-
-				</view>
-				<view class="">绘画口令</view>
-			</view>
-			<view class="action" @click="setOpen">
-				<view class="tn-flex-direction-column tn-flex-row-center tn-flex-col-center tn-button--clear-style">
-					<view class="bar-icon">
-						<view class="tn-icon-up-circle">
+					<view class="" style="padding-left: 10rpx;padding-right: 10rpx;">
+						<vastwu-barrage @teplateItemClicked="onSubmit" :textList1='templateData' :minTime="70"
+							:maxTime="100" :trackList='[14,86,158]' width="100%" height="230rpx"
+							ref="vBarrage"></vastwu-barrage>
+					</view>
+				</block>
+				<view class="" v-if="appInfo.page_template == 2" style="padding-left: 10rpx;padding-right: 10rpx;">
+					<view class="addbox">
+						<view class="askaquestion u-flex align-center justify-between ">
+							<!-- 🛠️ -->
+							<view class="u-flex align-center" style="align-items: flex-end;">
+								<image style="width: 60rpx;height: 64rpx;margin-left: 10rpx;"
+									src="/static/newIndex/quesTemp.png"></image>
+								<text class="hotTxt" style="margin-bottom: -6rpx;">应用</text>
+							</view>
+							<view @click="onhelper" class="tn-flex align-center"
+								style="justify-content: flex-end;margin-top: 15rpx;">
+								<view class="moreBox">
+									<view class="moretxt" style="padding-left: 20rpx;">
+										更多</view>
+									<image src="/static/newIndex/yjt.png"
+										style="width: 8rpx;height: 16rpx;margin-left: 8rpx;" mode="">
+									</image>
+								</view>
+							</view>
+						</view>
+						<view style="margin-bottom: 10rpx;" class="mubanBox">
+							<navigator class="helpme"
+								:url="'/pages/template/detail?id=' + item.id+'&currentmodel='+currentmodel"
+								v-for="(item, index) in applayList" :key="index">
+
+								<view class="bottomBox">
+									<view class="left">
+										<view class="title">{{ item.title }}</view>
+										<view class="sub_title">{{ item.sub_title }}</view>
+									</view>
+									<view class="right">
+										<image v-if="index==0" src="/static/newIndex/mt.png"
+											style="width: 48rpx;height: 48rpx;" mode="">
+										</image>
+										<image v-if="index==1" src="/static/newIndex/wa.png"
+											style="width: 48rpx;height: 48rpx;" mode="">
+										</image>
+										<image v-if="index==2" src="/static/newIndex/qg.png"
+											style="width: 48rpx;height: 48rpx;" mode="">
+										</image>
+										<image v-if="index==3" src="/static/newIndex/kd.png"
+											style="width: 48rpx;height: 48rpx;" mode="">
+										</image>
+									</view>
+								</view>
+							</navigator>
 						</view>
-
 					</view>
-					<view class="">{{showopen?'已公开':'公开作品'}}</view>
 				</view>
+				<wike-ad></wike-ad>
 			</view>
+		</view>
 
-			<view class="action" @click="createnow" style="color: #fff420;">
-				<view class="bar-icon">
-					<view class="tn-icon-write">
-					</view>
-				</view>
-				<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>
-		</view>
+		</u-popup> -->
+		<!-- #endif -->
 		<wike-model v-if="signShow" :authorize="false" :title="signTitle" btnText="立即获取" @save="signSign"
 			@close="signShow = false"></wike-model>
-
-		<u-modal :show="showparameters" title="绘画描述" :content='content' confirmColor="#207cf7" confirmText="关闭"
-			@confirm="showparameters=false">
-			<view class="" slot='default' style="font-size: 30rpx;font-family:Helvetica Neue, Helvetica, sans-serif">
-				<!-- <view @click="preViewImg" class="" v-if="mj_refImg"
-					style="word-wrap: break-word;word-break: break-all;">
-					参考图:<text style="text-decoration: underline;">{{mj_refImg}}</text>
-				</view> -->
-				<view @click="preViewImg" class="" v-if="mj_refImg" style="display: flex;align-items: center;">
-					参考图:<image :src="mj_refImg" mode="widthFix" style="width: 100rpx;"></image>
+		<!-- <block v-if="is_aipainting"> -->
+		<block>
+			<wike-tabbar2 :currTabIndex='2' v-if="appInfo.page_template == 3" :onTabbar="onTabbar"
+				:is_aipainting="is_aipainting" :isShowAnimate="isShowAnimate"
+				:appInfos="appInfo.page_template"></wike-tabbar2>
+			<wike-tabbar :currTabIndex='2' 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>
+
+
+		<u-modal @cancel="handleCancel" @confirm="handleConfirm" cancelText='退出登录' showCancelButton :show="showFixInfo"
+			confirmColor="#26b3a0" confirmText="完善信息" title="请完善个人手机号信息后使用本应用"
+			content='您已充值,但未绑定手机号,请完善信息以方便为您提供进一步的服务'></u-modal>
+		<!-- <view class="leadPic" v-if="showlead">
+			<view class="lead1Box" v-show="showlead1">
+				<view class="lead1">
+					<image src="/static/images/lead1.png" mode=""></image>
+					<view class="btn" @click="showlead1=false">
+					</view>
 				</view>
-				<view class="" style="margin-top: 15rpx;">
-					描述词:{{keywords}}
+			</view>
+			<view class="lead2Box" v-show="!showlead1">
+				<view class="lead2">
+					<image src="/static/images/lead2.png" mode=""></image>
+					<view class="btn" @click="closeLead2">
+					</view>
 				</view>
 			</view>
-		</u-modal>
-
-		<wike-painter style="height:1px;margin-top: -9999999px;" :board="posterObj" @done="posterSuccess"
-			ref="painter"></wike-painter>
+		</view> -->
+			<!-- <video v-show="true"></video> -->
+			
+			
+			
+					<view class="video_show" v-if="show">
+					 	<view class="content">
+									 <uni-icons type="close" size="30" @click="show= false"></uni-icons> 
+											 	<!-- <video-show ></video-show> -->
+												<view class="video-box">
+												<video-show></video-show>
+												</view>
+											<!-- <view class="video-content" ></view> -->
+						</view> 
+					</view> 
 	</view>
+
 </template>
 
 <script>
@@ -159,1220 +257,712 @@
 		mapState,
 		mapGetters
 	} from 'vuex';
+	// import videoShow from '@/pages/user/public/lead.vue'
+	let interstitialAd = null,
+		timer,
+		time2;
+
+
+	import noticeBar from '@/components/noticeBar/index.vue'
+	import vastwuBarrage from '@/components/vastwu-barrage/vastwu-barrage.vue'
+
+	const isWechat = () => {
+		return String(navigator.userAgent.toLowerCase().match(/MicroMessenger/i)) === "micromessenger";
+	}
+
 	import {
-		API_STEROOT,
-	} from '@/common/request/request';
-	let asynchronous;
+		init
+	} from "@/common";
+	import videoShow from '@/pages/user/public/lead.vue'
 	export default {
+		components: {
+			noticeBar,
+			vastwuBarrage,
+			videoShow
+		},
 		data() {
 			return {
-				signShow: false,
-				signTitle: '',
-				noticebar: [
-					'精美图片需要时间打磨,预计1-2分钟左右出图',
+				show:false,
+				showlead: false,
+				showlead1: true,
 
 
-				],
-				fronid: '',
-				mj_id: '',
-				mj_hash: '',
-				mjurl: '',
-				// https://img0.baidu.com/it/u=489552572,2707768722&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500
-				customButtonGroups: [{
-					text: '保存/分享',
-					backgroundColor: 'tn-cool-bg-color-8',
-					color: '#FFFFFF'
-				}, {
-					text: '立即创作',
-					backgroundColor: 'tn-cool-bg-color-8--reverse',
-					color: '#FFFFFF'
-				}],
-				tobheight: 45,
-				platform: this.$platform.get(),
-				subsectionlist: ['对第1张图片', '对第2张图片', '对第3张图片', '对第4张图片'],
-				// 或者如下,也可以配置keyName参数修改对象键名
-				// list: [{name: '未付款'}, {name: '待评价'}, {name: '已付款'}],
+				showFixInfo: false,
 				current: 0,
-				//横向两端排列形式数据
-				radiolist7: [
 
+				playState: 'play',
+				// current: 0,
+				addRotate: false,
+
+				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,
+				showchat35: false,
+
+				// #ifdef H5
+				sheetlist: [{
+						index: 0,
+						name: 'ChatGPT 4.0',
+						subname: "超级高效沟通·简单提问",
+						disabled: false
+					},
 					{
-						name: '进行放大使用',
+						index: 1,
+						name: 'ChatGPT 3.5',
+						subname: "高效沟通·简单提问",
+						// color: '#207CF7',
 						disabled: false
 					},
 					{
-						name: '变换生成四张类似的图片',
+						index: 2,
+						name: '文心一言',
+						subname: "便捷沟通·简单提问",
+						// color: '#207CF7',
+						disabled: false
+					},
+
+					{
+						index: 3,
+						name: '讯飞火星',
+						subname: "极速沟通·便捷提问",
+						// color: '#207CF7',
 						disabled: false
 					},
 				],
-				// u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
-				radiovalue7: '进行放大使用',
-				prompt: '',
-				showdrawing: true,
-				drawingtitle: '',
-				showprogress: true,
-				percentage: 0,
-				instruction: '进行放大使用',
-				model_id: 'mj',
-				version: '-- v5',
-				action: '',
-				showopen: false,
-				needCoin: 0,
-				done: false,
-				isBack: false,
+				// #endif
+				// 消耗
 				plan: {},
+				currentmodel: '',
+				switchmodel: false,
+				is_aipainting: '',
+				showconcern: false,
+				gzhqrcode: '',
 
-				mj_refImg: '',
-				showparameters: false,
-				keywords: '',
-
+				showchatBaidu: false,
 
-				qrcode: '',
-				spmplatform: 0,
-				posterObj: {},
-				info: {
-					// poster_bg_img_path:"",
+				templateData: [],
+				applayList: [],
+				homeTemplate1: null,
 
-					poster_bg_width: 347,
-					poster_bg_height: 574,
-
-					poster_qrcode_x: 278,
-					poster_qrcode_y: 495,
-					poster_qrcode_width: 52,
-					poster_qrcode_height: 52,
-				},
-			}
+				appInfo: {}
+			};
 		},
 		computed: {
-			...mapGetters(['appInfo', 'userInfo', 'isLogin', 'userData'])
-		},
-		onUnload() {
-			clearTimeout(asynchronous);
-		},
-		onLoad(o) {
-			this.spmplatform = ['H5', 'wxOfficialAccount', 'wxMiniProgram', 'App'].indexOf(this.platform) + 1;
-			this.commonqrcodePath()
-
-
-			if (o.refImg) {
-				this.mj_refImg = o.refImg
-				console.log('mj参考图:', this.mj_refImg);
+			...mapGetters(['isLogin', 'userInfo', 'homeTemplate', 'userData']),
+			isPc() {
+				return navigator.userAgent.indexOf('Mobile') > -1 ? false : true
+			},
+			isWx() {
+				return isWechat()
 			}
-			if (o.keywords) {
-				this.keywords = o.keywords
-				console.log('mj绘画描述:', this.keywords);
+		},
+		async onLoad(o) {
+			if (o.uniacid) {
+				uni.setStorageSync('uniacid', o.uniacid)
+				console.log('onload获取的应用ID----index', uni.getStorageSync('uniacid'));
 			}
 
 			var that = this;
-			if (that.platform == 'wxMiniProgram') {
-				var menumtop = uni.getMenuButtonBoundingClientRect().top - uni.getSystemInfoSync().statusBarHeight;
-				var paddingtop = uni.getSystemInfoSync().statusBarHeight + menumtop;
-				that.tobheight = menumtop + paddingtop + uni.getMenuButtonBoundingClientRect().height;
-			}
-			// #ifdef H5
-			that.noticebar.push('图片生成中请不要退出此页面,否则可能会无法生成')
-			that.drawingtitle = '正在提交任务,请不要退出'
-			// #endif
+			uni.getSystemInfo({
+				success: function(res) {}
+			});
+			setTimeout(() => {
+				that.onTabbar = true;
+				that.isShowAnimate = true;
+			}, 500);
+
+			// this.getTemplateData()
+		},
+		onReady() {
+			let that = this;
 			// #ifdef MP-WEIXIN
-			// that.noticebar.push('长时间未出图?可稍后在 我的-绘画记录 里查看')
-			that.drawingtitle = '正在努力绘制中...'
+			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
-			if (that.$Route.query.urls) {
-				this.showprogress = false
-				this.drawingtitle = '图片正在加载中...'
-				// that.getModels()
-				that.gallerydetail(that.$Route.query.urls)
+		},
+		async onShow() {
+			let params = 'system.config';
+			let Res = await this.$http('conf.getGroupConf', {
+				group: params
+			})
+
+			if (Res.code == 0) {
+				this.appInfo = Res.data
 			}
-			if (that.$Route.query.prompt) {
-				that.prompt = that.$Route.query.prompt
-				that.model_id = that.$Route.query.model_id
-				that.version = that.$Route.query.version
-				that.needCoin = that.$Route.query.needCoin
-
-				// 生成界面进入
-				that.action = 'imagine'
-				// console.log(that.prompt);
-				// #ifdef MP-WEIXIN
-				that.galleryimagine()
-				// #endif
-				// #ifdef H5
-				this.gettest()
-				// #endif
+			console.log('首页---appInfo', Res);
+
+			// 生成固定通过链接分享信息
+			if (uni.getStorageSync('token') && uni.getStorageSync('uniacid')) {
+				let shareInfo = `uniacid=${uni.getStorageSync('uniacid')}&spm=` + this.$store.getters.userInfo.id +
+					'.1.0.' + (['H5', 'wxOfficialAccount', 'wxMiniProgram', 'App'].indexOf(this.platform) + 1) +
+					'.1'
 
+				uni.setStorageSync('shareInfo', shareInfo)
+				console.log('首页分享链接信息----------------------2:', shareInfo);
 			}
-			that.getPlan()
 
-		},
-		onShow() {
+			this.getTemplateData()
+
+			this.$http('user.info').then(res => {
+				if (res.code == 0) {
+					console.log('用户是否是首次支付成功,但未填写手机号', res.data.is_new);
+					this.showFixInfo = res.data.is_new;
+					// this.showFixInfo = true;
+				}
+			})
+
+
 			if (this.isLogin) {
-				this.getUserData();
+				this.getUserData()
+			}
+			this.currentmodel = uni.getStorageSync("prestore") || "大学生"
+			if (uni.getStorageSync("prestore") == '文心一言') {
+				this.showchat4 = false
+				this.showchat35 = false
+				this.showchatBaidu = true
+
+				this.sheetlist[2].color = "#207CF7"
+				this.sheetlist[0].color = "black"
+				this.sheetlist[1].color = "black"
+				this.sheetlist[3].color = "black"
+			} else if (uni.getStorageSync("prestore") == '研究生') {
+				this.showchat4 = true
+				this.showchat35 = false
+				this.showchatBaidu = false
+
+				this.sheetlist[0].color = "#207CF7"
+				this.sheetlist[2].color = "black"
+				this.sheetlist[1].color = "black"
+				this.sheetlist[3].color = "black"
+			} else if (uni.getStorageSync("prestore") == '讯飞火星') {
+				this.sheetlist[3].color = "#207CF7"
+				this.sheetlist[0].color = "black"
+				this.sheetlist[2].color = "black"
+				this.sheetlist[1].color = "black"
+
+				this.showchat4 = false
+				this.showchat35 = false
+				this.showchatBaidu = false
+			} else {
+				this.sheetlist[1].color = "#207CF7"
+				this.sheetlist[0].color = "black"
+				this.sheetlist[2].color = "black"
+				this.sheetlist[3].color = "black"
+
+				this.showchat35 = true
+				this.showchatBaidu = false
+				this.showchat4 = false
 			}
+			this.init(this.currentmodel)
+			this.windowHeight = uni.$u.sys().windowHeight
+			this.systemwechat()
+
+
+			// let oldHerfUrl = JSON.stringify(location.herf ? location.herf : '')
+			// let oldHerfQuery = JSON.stringify(location.search)
+
+			// location.href = JSON.parse(oldHerfUrl + oldHerfQuery + '&a=123466')
+			// console.log('location.search', oldHerfQuery);
+
+			// window.onhashchange() {
+
+			// }
+			// return
+		},
+		onUnload() {
+			clearInterval(time2);
+			// clearInterval(this.timer);
+		},
+		beforeDestroy() {
+			// clearInterval(this.timer);
 		},
 		methods: {
-			...mapActions(['appInit', 'logout', 'getUserInfo', 'getUserData']),
-
-			downLoad() {
-				if (this.showdrawing) {
-					uni.showToast({
-						title: '图片生成中',
-						icon: 'none'
-					})
-					return;
-				}
-				if (!this.is_weixin()) {
-					return uni.showModal({
-						showCancel: false,
-						title: '提示',
-						content: '请在微信内置浏览器打开,长按图片下载',
-						confirmColor: '#207CF7'
-					})
-				}
+			...mapActions(['getUserInfo', 'showAuthModal', 'getUserData', 'logout']),
+			goLead() {
+				// uni.navigateTo({
+				// 	url: '/pages/user/public/lead'
+				// })
+				console.log(this.show)
+				 console.log(3333)
+				this.show = true
+				console.log(this.show)
+			},
+			closeLead2() {
+				this.showlead = false
+				uni.setStorageSync('isLead', 'yes')
+			},
+			handleCancel() {
+				this.showFixInfo = false
+				this.logout()
+				// uni.clearStorage()
 
-				uni.showModal({
-					showCancel: false,
-					title: '提示',
-					content: '长按图片即可下载',
-					confirmColor: '#207CF7',
-					confirmText: '知道了',
+				uni.reLaunch({
+					url: '/pages/user/signin'
 				})
 			},
-			downloadPic(e) {
-				return new Promise((resolve, reject) => {
-					uni.request({
-						url: e,
-						method: 'GET',
-						responseType: 'arraybuffer',
-						timeout: 999999,
-						success: ress => {
-							let base64 = uni.arrayBufferToBase64(ress.data);
-							base64 = 'data:image/jpeg;base64,' + base64
-							resolve(base64);
-						},
-						fail: (e) => {
-							resolve('fail');
-						}
-					})
-				});
+			handleConfirm() {
+				uni.navigateTo({
+					url: '/pages/user/userinfo?isNewUser=true'
+				})
 			},
-			commonqrcodePath() {
-				let spm = this.userInfo.id + '.1.0.' + this.spmplatform + '.1';
-				// console.log(spm);
-				this.$http('common.qrcodePath', {
-					spm: spm
-				}).then(res => {
-					if (res.code == 0) {
-						this.qrcode = res.data;
-						// this.createPoster()
-						console.log('二维码需要包含的url信息=============', this.qrcode);
-					}
-				});
+
+			handleOver() {
+				if (!this.isPc) return
+				this.playState = 'paused'
 			},
-			async createPoster(e) {
-				let that = this;
+			handleOut() {
+				if (!this.isPc) return
+				this.playState = 'play'
+			},
+			async getTemplateData() {
 
-				let avatarUrl = '';
-				let mainUrl = '';
-				uni.showLoading({
-					title: '海报渲染中'
-				});
+				let whereIn = [187, 171, 179, 181]
+				let res = await this.$http('common.template', {
+					whereIn: whereIn.join(',')
+				})
+				if (res.code == 0) {
+					this.templateData = res.data.hot
+					this.applayList = res.data.template
+					this.homeTemplate1 = res.data
+					// this.$store.commit('TEMPLATE', res.data);
 
-				console.log("that.swiperList[0].url,that.userInfo.avatar", that.userInfo, that.mjurl, that.userInfo
-					.avatar);
 
-				// that.mjurl="https://midjourney.cdn.zhishuyun.com/attachments/1124768570157564029/1204440835731751012/kylejohnsongfa8_Very_detailed_CGUnity8K_wallpaper_masterpiece_b_796b67e5-8890-434b-937d-2c36d1d0a371.png?ex=65d4bdf0&is=65c248f0&hm=81256bc90f3a9bc1a51538da2654bb885db81ea1d28fa136417c8a30d356584a&width=1024&height=1024"
-				// if (that.mjurl.indexOf("https") < 0) {
-				// 	mainUrl = await that.downloadPic(that.mjurl.replace("http:", "https:"));
-				// } else {
-				mainUrl = await that.downloadPic(that.mjurl);
-				// }
-				if (mainUrl == 'fail') {
-					uni.hideLoading();
-					uni.showToast({
-						title: '生成失败',
-						icon: 'none'
-					})
-					return;
-				}
-				// that.userInfo.avatar="https://face.cdn.zhishuyun.com/attachments/1133012400174534792/1204009950465101866/0d47db66-1faf-42df-a732-22cf18697a65_ins.png?ex=65d32ca5&is=65c0b7a5&hm=7219a0f250453314cfbf9eefaf2e927ba8d6adea944774b3fe32e67c0787a877&"
+					console.log('首页热门提问:', this.templateData);
+					console.log('首页应用列表:', this.applayList);
+					console.log('首页homeTemplate1:', this.homeTemplate1);
+					// uni.setStorageSync('homeTemplate1', res.data);
 
-				if (that.userInfo.avatar) {
-					if (that.userInfo.avatar.indexOf("https") < 0) {
-						avatarUrl = await that.downloadPic(that.userInfo.avatar.replace("http:", "https:"));
-					} else {
-						avatarUrl = await that.downloadPic(that.userInfo.avatar);
-					}
-					if (avatarUrl == 'fail') {
-						uni.hideLoading();
-						uni.showToast({
-							title: '生成失败',
-							icon: 'none'
-						})
-						return;
+
+					if (!uni.getStorageSync('isLead') && res.data.hot.length) {
+						this.showlead = true
 					}
 				}
+			},
 
-				let proportionally = this.info.poster_bg_width / uni.$u.sys().windowWidth;
-				(this.posterObj = {
-					width: (this.info.poster_bg_width / proportionally) + 'px',
-					height: (this.info.poster_bg_height / proportionally) + 'px',
-					background: 'rgba(0,0,0,0)',
-					borderRadius: '16rpx',
-					views: [
-						// 背景图
-						{
-							src: '/static/shareBg.png',
-							type: "image",
-							css: {
-								width: (this.info.poster_bg_width / proportionally) + 'px',
-								height: (this.info.poster_bg_height / proportionally) + 'px',
-							}
-						},
-						// 主图
-						{
-							type: 'view',
-							css: {
-								position: 'absolute',
-								left: '50%',
-							},
-							views: [{
-								src: mainUrl,
-								type: "image",
-								css: {
-									height: 936 + 'rpx',
-									borderRadius: '28rpx',
-									transform: 'translateX(-50%)',
-									marginTop: "28rpx",
-									maxWidth: '705rpx'
-								}
-							}, ],
-						},
-
-						// 头像
-						{
-							type: 'view',
-							css: {
-								display: 'flex',
-								position: 'absolute',
-								left: '24rpx',
-								top: '1060rpx',
-
-							},
-							views: [{
-								type: 'image',
-								src: that.userInfo.avatar ? avatarUrl : '/static/images/head.jpg',
-								css: {
-									marginTop: '-80rpx',
-									borderRadius: '50%',
-									width: '94rpx',
-									height: '94rpx',
-									objectFit: 'cover'
-								}
-							}, ],
-						},
-						// 昵称
-						{
-							type: 'view',
-							css: {
-								display: 'flex',
-								position: 'absolute',
-								left: '140rpx',
-								bottom: '196rpx',
-							},
-							views: [{
-								type: 'text',
-								text: that.userInfo.nickname ? that.userInfo.nickname : '默认用户',
-								css: {
-									fontSize: '28rpx',
-									color: '#333333',
-								}
-							}],
-						},
-
-						// 海报文案1
-						{
-							type: 'view',
-							css: {
-								display: 'flex',
-								position: 'absolute',
-								left: '24rpx',
-								bottom: '96rpx',
-
-							},
-							views: [{
-								type: 'text',
-								text: '免费体验Al生成个人质感艺术照',
-								css: {
-									fontSize: '32rpx',
-									color: '#333333',
-								}
-							}],
-						},
-						// 海报文案2
-						{
-							type: 'view',
-							css: {
-								display: 'flex',
-								position: 'absolute',
-								left: '24rpx',
-								bottom: '44rpx',
-
-							},
-							views: [{
-								type: 'text',
-								text: '设计微信/抖音/小红书专属头像',
-								css: {
-									fontSize: '32rpx',
-									color: '#333333',
+			handleTo(item) {
+				if (item.name == '绘画') {
+					uni.switchTab({
+						url: '/pages/painting/painting'
+					})
+				} else if (item.name == '我的') {
+					uni.switchTab({
+						url: '/pages/user/user'
+					})
+				} else if (item.name == '充值') {
+
+					uni.setStorageSync('chargeFromIndex', true)
+					uni.navigateTo({
+						url: '/pages/user/member/member'
+					})
+				} else if (item.name == '应用') {
+					uni.switchTab({
+						url: '/pages/template/template'
+					})
+				}
+			},
+			startScroll() {
+				this.timer = setInterval(() => {
+					this.offset += this.step
+					if (this.offset >= this.itemWidth) {
+						this.offset = 0
+						this.noticeList.push(this.noticeList.shift())
+					}
+					// document.querySelector('.notice-content').style.transform = `translateX(-${this.offset}px)`
+				}, this.speed)
+			},
+
+
+			...mapActions(['appInit', 'logout', 'getUserInfo', 'getUserData']),
+			init(preModal) {
+				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(preModal);
+				});
+			},
+			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
 								}
-							}],
-						},
-
-						// 二维码上方文案
-						{
-							type: 'view',
-							css: {
-								position: 'absolute',
-								right: '40rpx',
-								bottom: '196rpx',
-							},
-							views: [{
-								type: 'text',
-								text: '微信扫码',
-								css: {
-									fontSize: '24rpx',
-									color: '#333333',
+								if (this.isLogin && this.appInfo.is_show_logged_qrcode == 1) {
+									this.showconcern = true
 								}
-							}],
-						},
-						{
-							type: 'view',
-							css: {
-								left: (this.info.poster_qrcode_x / proportionally) + 'px',
-								top: (this.info.poster_qrcode_y / proportionally) + 'px',
-								position: 'fixed',
-
-							},
-							views: [{
-									type: 'qrcode',
-									text: this.qrcode,
-									css: {
-										width: (this.info.poster_qrcode_width / proportionally) + 'px',
-										height: (this.info.poster_qrcode_width / proportionally) + 'px',
-										background: '#fff'
-									}
-								},
-								// {
-								// 	src: '/static/images/fanyunLogo.png',
-								// 	type: "image",
-								// 	css: {
-								// 		position: 'absolute',
-								// 		width: 30 + 'rpx',
-								// 		height: 30 + 'rpx',
-
-								// 		left: '44rpx',
-								// 		top: '44rpx',
-
-								// 	}
-								// }
-							],
-						},
-					]
-				}),
-				(
-					this.showPoster = true,
-					// this.revertUrl()
-
-					setTimeout(() => {
-						that.$refs.painter.canvasToTempFilePathSync({
-							// 在nvue里是jpeg
-							fileType: 'jpg',
-							quality: 1,
-							success: res => {
-								console.log('res.tempFilePath', res.tempFilePath);
-								uni.showModal({
-									title: '提示',
-									content: '查看图片后长按图片即可保存或分享',
-									confirmText: '查看',
-									confirmColor: '#1F79F0',
-									success: function(res2) {
-										if (res2.confirm) {
-											uni.previewImage({
-												urls: [res.tempFilePath],
-												longPressActions: {
-													itemList: ['发送给朋友', '保存图片',
-														'收藏'
-													],
-													success: function(data) {},
-													fail: function(err) {
-														console.log(err
-															.errMsg);
-													}
-												}
-											});
-										} else if (res2.cancel) {
-											console.log('用户点击取消');
-										}
-									}
-								});
 							}
-						})
-					}, 1000)
-				);
-			},
-			posterSuccess() {
-				uni.hideLoading();
-			},
-			// 生成海报需要的数据到此为止
-			preViewImg() {
-				uni.previewImage({
-					urls: [this.mj_refImg],
-					longPressActions: {
-						itemList: ['发送给朋友', '保存图片', '收藏'],
-						success: function(data) {},
-						fail: function(err) {
-							console.log(err.errMsg);
 						}
 					}
-				});
+				})
+			},
+			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
+				);
 			},
 
-			getisback() {
-				if (!this.done) {
-					uni.showModal({
-						confirmColor: '#207cf7',
-						confirmText: '立即退出',
-						title: '提示',
-						content: '图片生成中,退出此页面后可能无法生成',
-						success(src) {
-							if (src.confirm) {
-								uni.navigateBack()
-							}
-						}
-					})
-				} else {
-					uni.navigateBack()
+			//选择模型
+			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 = '#207CF7'
+				// #endif
+				// #ifdef H5
+				this.sheetlist[index.index].color = '#207CF7'
+				// #endif
+				this.showchat4 = index.index == 0 ? true : false
+				this.showchat35 = index.index == 1 ? true : false
+
+
+				this.showchatBaidu = index.index == 2 ? true : false
+				// this.showchat4 = false
+				this.getcurrentmodel()
 			},
-			getModels() {
+			getPlan(preModal) {
 				let that = this;
-				this.$http('gallery.getModels', {
-					engine: 'mj'
+				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 : '高效沟通·简单提问'
+
+						// 	this.sheetlist[1].name = gpt.gpt3_alias ? gpt.gpt3_alias : '文心一言'
+						// 	this.sheetlist[1].subname = gpt.gpt3_intro ? gpt.gpt3_intro : '便捷沟通·简单提问'
+
+						// 	this.sheetlist[2].name = gpt.gpt2_alias ? gpt.gpt2_alias : '讯飞火星'
+						// 	this.sheetlist[2].subname = gpt.gpt2_intro ? gpt.gpt2_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 : '高效沟通·简单提问'
+
+						// 	this.sheetlist[2].name = gpt.gpt3_alias ? gpt.gpt3_alias : '文心一言'
+						// 	this.sheetlist[2].subname = gpt.gpt3_intro ? gpt.gpt3_intro : '便捷沟通·简单提问'
+
+						// 	this.sheetlist[3].name = gpt.gpt2_alias ? gpt.gpt2_alias : '讯飞火星'
+						// 	this.sheetlist[3].subname = gpt.gpt2_intro ? gpt.gpt2_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 : '高效沟通·简单提问'
+						// this.sheetlist[0].name = 'ChatGPT 4.0'
+						// this.sheetlist[0].subname = '高效沟通·简单提问'
+
+						// this.sheetlist[1].name = 'ChatGPT 3.5'
+						// this.sheetlist[1].subname = '高效沟通·简单提问'
+
+						// this.sheetlist[2].name =: '文心一言'
+						// this.sheetlist[2].subname = '便捷沟通·简单提问'
+						// #endif
+						// this.getcurrentmodel1(preModal)
 
-						console.log(res.data);
 					}
-				});
+				})
+
 			},
-			gallerydetail(id) {
-				let that = this;
-				this.$http('gallery.detail', {
-					id: id
-				}).then(res => {
-					if (res.code == 0) {
-						this.showdrawing = false
-						this.parameter = res.data
-						this.prompt = res.data.prompt
-						this.fronid = res.data.id
-						this.mjurl = res.data.imgs_file[0] ? res.data.imgs_file[0] : res.data.origin_url
-						this.mj_id = res.data.mj_id
-						this.mj_hash = res.data.mj_hash
-						this.done = true
-						this.isBack = true
-						if (res.data.mj_action == 'reroll') {
-							this.radiolist7.splice(0, 1)
-							this.radiovalue7 = '变换生成四张类似的图片'
-							this.instruction = '变换生成四张类似的图片'
-						}
-					} else {
+			// getcurrentmodel1(preModal) {
 
-					}
-				});
+			// },
+			getcurrentmodel() {
+				let gpt = this.appInfo;
+				if (this.showchat4) {
+					this.currentmodel = gpt.gpt4_alias ? gpt.gpt4_alias : 'ChatGPT 4.0'
+				} else if (this.showchat35) {
+					this.currentmodel = gpt.gpt35_alias ? gpt.gpt35_alias : 'ChatGPT 3.5'
+				} else if (this.showchatBaidu) {
+					this.currentmodel = gpt.gpt3_alias ? gpt.gpt3_alias : '文心一言'
+				} else {
+					this.currentmodel = gpt.gpt2_alias ? gpt.gpt2_alias : '讯飞火星'
+				}
+
+				uni.setStorageSync('prestore', this.currentmodel);
 			},
-			parameters() {
-				this.showparameters = true
-				// var that = this;
-				// uni.showModal({
-				// 	showCancel: false,
-				// 	title: '绘画描述',
-				// 	content: that.prompt,
-				// 	confirmColor: '#207cf7',
-				// 	confirmText: '关闭'
-				// })
+			updateTemplate() {
+				// this.$store.dispatch('getTemplate');
+				this.getTemplateData()
+
+				this.addRotate = true
+				setTimeout((item, index) => {
+					this.addRotate = false
+				}, 1000)
 			},
-			signSign() {
+			onToForm() {
 				uni.navigateTo({
-					url: '/pages/user/member/member'
-				})
-				this.signShow = false
+					url: '/pages/chat/chat'
+				});
 			},
-			setOpen() {
-				var that = this;
-				// #ifdef H5
-				if (!that.done) {
-					uni.showToast({
-						title: '图片生成中',
-						icon: 'none'
-					})
-					return;
-				}
-				// #endif
-				// #ifdef MP-WEIXIN
-				if (that.showdrawing) {
-					uni.showToast({
-						title: '图片生成中',
-						icon: 'none'
-					})
+			onhelper() {
+				uni.switchTab({
+					url: '/pages/template/template'
+				});
+			},
+			focustextarea() {
+				if (!this.isLogin) {
+					uni.navigateTo({
+						url: '/pages/user/signin'
+					});
+					uni.setStorageSync('route', '/pages/index/index');
 					return;
 				}
-				// #endif
-				if (that.showopen) {
-					uni.showToast({
-						title: '图片已公开',
-						icon: 'none'
-					})
-					return;
+				if (this.valuechat == "请写一篇西游记续集,里面包含一个角色马斯克") {
+					this.valuechat = ''
 				}
-				uni.showModal({
-					confirmColor: '#207cf7',
-					confirmText: '确认公开',
-					title: '提示',
-					content: '是否确认公开此绘画作品',
-					success(src) {
-						if (src.confirm) {
-							that.$http('gallery.setOpen', {
-								id: that.fronid
-							}).then(res => {
-								if (res.code == 0) {
-									uni.showToast({
-										title: '提交成功,等待审核'
-									})
-									that.showopen = true
-								}
-							});
-						}
-					}
-				});
 			},
-			groupChange(n) {
-				this.radiovalue7 = n
-				this.instruction = n
+			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
 			},
-			createnow() {
+			onSubmit(e) {
+
+				console.log('通过点击热门提问的问题:', e);
 				var that = this;
-				var alias = this.appInfo.number_alias ? this.appInfo.number_alias : '点数';
-				var tst = '再次创作需要消耗' + that.needCoin + alias + '或消耗一次会员套餐次数';
-				// #ifdef H5
-				if (!that.done) {
-					uni.showToast({
-						title: '图片生成中',
-						icon: 'none'
-					})
+				if (!that.isLogin) {
+					uni.navigateTo({
+						url: '/pages/user/signin'
+					});
+					uni.setStorageSync('route', '/pages/index/index');
 					return;
 				}
-				// #endif
-				// #ifdef MP-WEIXIN
-				if (that.showdrawing) {
+				if (!e) {
 					uni.showToast({
-						title: '图片生成中',
+						title: '请输入关键词或问题',
 						icon: 'none'
-					})
+					});
+
 					return;
 				}
-				// #endif
 				if (that.appInfo.time_member && that.appInfo.time_member == 1) {
-					if (that.userData.vip_info && that.userData.is_validity > 0 && that.userData.vip_info.mj_used ==
-						that.userData.vip_info.mj_times && this.userData.coin < that.needCoin) {
-						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: #207cf7;padding: 0 4px;'>" +
-							that.needCoin + "</span><span>" + alias +
-							"</span></p><p style='padding-top: 10px;'>您的绘画<span>" + alias +
-							"</span>不足或会员套餐内剩余次数不足,无法生成绘画</p>"
-						this.signShow = true
-						return;
+					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;
+						}
 					}
-					if (that.userData.is_validity == 0 && this.userData.coin < that.needCoin) {
+				} 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: #207cf7;padding: 0 4px;'>" +
-							that.needCoin + "</span><span>" + alias +
-							"</span></p><p style='padding-top: 10px;'>您的绘画<span>" + alias +
-							"</span>不足或会员套餐内剩余次数不足,无法生成绘画</p>"
+							"<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;
 					}
-				} else {
-					if (that.userData.coin < that.needCoin) {
+					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: #207cf7;padding: 0 4px;'>" +
-							that.needCoin + "</span><span>" + alias +
-							"</span></p><p style='padding-top: 10px;'>您当前有<span style='color: #207cf7;padding: 0 4px;'>" +
-							this.userData.coin + "</span><span>" + alias + "</span>,无法生成,快去获取<span>" + alias +
+							"<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;
+				// 	}
+				// }
 
-
-				uni.showModal({
-					confirmColor: '#207cf7',
-					confirmText: '确认创作',
-					title: '提示',
-					content: tst,
-					success(src) {
-						if (src.confirm) {
-							that.mjurl = ''
-							that.done = false
-							that.creation()
-						}
-					}
-				});
-
-			},
-			creation() {
-				this.percentage = 0
-				this.showdrawing = true
-				this.progressbar()
-				if (this.instruction == '进行放大使用') {
-					if (this.radiolist7.length == 2) {
-						this.radiolist7.splice(0, 1)
-					}
-					this.radiovalue7 = '变换生成四张类似的图片'
-					this.instruction = '变换生成四张类似的图片'
-
-					// 生成后选择其中一张进行放大
-					this.action = this.current == 0 ? "upsample1" : this.current == 1 ? "upsample2" : this.current == 2 ?
-						"upsample3" : "upsample4"
-					// this.current = 0
-					// #ifdef MP-WEIXIN
-					// this.upscale()
-					this.galleryimagine()
-					this.showprogress = true
-					// #endif
-					// #ifdef H5
-
-					this.gettest()
-					// #endif
-
-				} else {
-					let s = {
-						name: '进行放大使用',
-						disabled: false
-					}
-					if (this.radiolist7.length == 1) {
-						this.radiolist7.splice(0, 0, s)
-					}
-					// this.current = 0
-					this.radiovalue7 = '进行放大使用'
-					this.instruction = '进行放大使用'
-
-					// 二次生成结果再次选择进行放大使用
-					// this.action = 'variation'
-					this.action = this.current == 0 ? "variation1" : this.current == 1 ? 'variation2' : this.current == 2 ?
-						"variation3" : "variation4"
-					// #ifdef MP-WEIXIN
-					// this.variation()
-					this.galleryimagine()
-					this.showprogress = true
-					// #endif
-					// #ifdef H5
-
-					this.gettest()
-					// #endif
+				if (this.currentmodel == '研究生') {
+					that.showchat4 = true
+				} else if (this.currentmodel == '大学生') {
+					that.showchat35 = true
 				}
-				// console.log(this.current,this.mj_hash,this.mj_id,this.fronid);
-			},
-			// upscale(){
-			// 	this.$http('gallery.upscale', {index: this.current + 1,hash: this.mj_hash,id: this.mj_id,pid: this.fronid}).then(res => {
-			// 		if (res.code == 0) {
-			// 			this.getAsyncResult(res.data)
-			// 		}
-			// 	});
-			// },
-			// variation(){
-			// 	this.$http('gallery.variation', {index: this.current + 1,hash: this.mj_hash,id: this.mj_id,pid: this.fronid}).then(res => {
-			// 		if (res.code == 0) {
-			// 			this.getAsyncResult(res.data)
-			// 		}
-			// 	});
-			// },
-			gettest() {
-				var that = this;
-				// that.showdrawing = false
-				let uniacid = uni.getStorageSync("uniacid") || "";
-				var chatgpturl = API_STEROOT + 'api.gallery/imagine?uniacid=' + uniacid;
-				let param = {
-					prompt: that.prompt,
-					action: that.action,
-					model_id: that.model_id,
-					version: that.version,
-					id: that.mj_id,
-					index: this.current + 1,
-					// id:''
-				}
-				let headers = {
-					'token': uni.getStorageSync("token") || "",
-					'platform': this.platform,
-					'Content-Type': 'application/json',
-				}
-
-				fetch(chatgpturl, {
-						method: 'POST',
-						headers: headers,
-						body: JSON.stringify(param)
-					})
-					.then(x => {
-						if (x.status === 404) {
-							uni.showToast({
-								title: '绘制失败,请重试',
-								icon: 'none'
-							})
-							return;
-						}
-						if (x.status === 200) return x.body;
-						throw x;
-					})
-					.then(x => {
-						const k = x.getReader();
-						return new ReadableStream({
-							start(V) {
-								function F() {
-									k.read().then(({
-										done: E,
-										value: U
-									}) => {
-										if (E) {
-
-											return;
-										}
-										V.enqueue(U);
-										const L = new TextDecoder().decode(U);
-										// console.log(L);
-										// const N = JSON.parse(L)
-										try {
-											const N = JSON.parse(L)
-											if (N.code) {
-												if (N.msg) {
-													uni.showModal({
-														showCancel: false,
-														title: '提示',
-														confirmText: '退出',
-														// content: N.detail,
-														// content: N.msg,
-														content: '服务器繁忙,请稍后再试!',
-														confirmColor: '#207cf7',
-														success(tay) {
-															if (tay.confirm) {
-																uni.navigateBack()
-															}
-														}
-													})
-													return;
-												} else {
-													uni.showModal({
-														showCancel: false,
-														title: '提示',
-														confirmText: '退出',
-														// content: N.detail,
-														content: '服务器繁忙,请稍后再试!',
-														// content: N.msg,
-														confirmColor: '#207cf7',
-														success(tay) {
-															if (tay.confirm) {
-																uni.navigateBack()
-															}
-														}
-													})
-													return;
-												}
-											}
-											// #ifdef H5
-											if (N.progress > 0) {
-												that.showdrawing = false
-											}
-											// #endif 
-											that.mjurl = N.image_url
-
-											if (N.progress == 100) {
-												that.mj_id = N.image_id
-												that.fronid = N.image_id
-												that.done = true
-												that.percentage = 0
-												// that.drawingtitle = '正在提交任务,请不要退出'
-												that.isBack = true
-												that.current = 0
-
-											}
-											that.percentage = N.progress
-										} catch (err) {
-											console.log('JSON.parse 出错了:' + err);
-											// uni.showModal({
-											// 	confirmText:'退出',
-											// 	showCancel:false,
-											// 	confirmColor:'#207cf7',
-											// 	title:'提示',
-											// 	content:err,
-											// 	success(tit) {
-											// 		if(tit.confirm){
-											// 			uni.navigateBack()
-											// 		}
-											// 	}
-											// })
-										}
-										F();
-									})
-								}
-								F();
-							}
-						})
-					})
-					.then(x =>
-						new Response(x, {
-							headers: {
-								'Content-Type': 'application/json'
-							}
-						}).text()
-					);
-			},
-			getPlan() {
-				this.$http('conf.getGroupConf', {
-					group: 'system.plan'
-				}).then(res => {
-					if (res.code == 0) {
-						this.needCoin = res.data.unlock_mj_aipainting
-						this.plan = res.data;
-						uni.setNavigationBarTitle({
-							title: this.appInfo.site_name
-						});
-						// console.log(this.plan);
-					}
-				});
-			},
-			galleryimagine() {
-				let that = this;
-				this.progressbar()
-				this.$http('gallery.imagine', {
-					prompt: that.prompt,
-					model_id: that.model_id,
-					version: that.version,
-					id: that.mj_id,
-					index: this.current + 1,
-					action: that.action
-				}).then(res => {
-					if (res.code == 0) {
-						this.getAsyncResult(res.data)
 
-					} else {
-						uni.showToast({
-							icon: 'error',
-							title: res.msg
-						})
-						setTimeout(() => {
-							uni.navigateBack()
-						}, 1500);
-					}
-				});
-			},
-			getAsyncResult(id) {
-				let that = this;
-				this.$http('gallery.getAsyncResult', {
-					uuid: id
-				}).then(res => {
-					if (res.code == 0) {
-						if (res.data.done == 1) {
-
-							this.drawingtitle = '图片正在渲染中...'
-							this.fronid = res.data.id
-							this.mj_id = res.data.mj_id
-							this.mj_hash = res.data.mj_hash
-							this.mjurl = res.data.imgs_file[0]
-							this.current = 0
-							this.done = true
-							this.percentage = 0
-							this.isBack = true
-							clearTimeout(asynchronous);
-							this.getUserData();
-						} else {
-							asynchronous = setTimeout(() => {
-								that.getAsyncResult(id)
-							}, 5000);
-							return;
-						}
-					} else {
-						uni.showToast({
-							icon: 'error',
-							title: res.msg
-						})
-						setTimeout(() => {
-							uni.navigateBack()
-						}, 1500);
-					}
-				})
-			},
-			previewload() {
-				this.showdrawing = false
-				this.drawingtitle = '正在努力绘制中,请不要退出'
-				// this.percentage = 0
-			},
-			previewerror() {
-				this.showdrawing = false
-				this.drawingtitle = '正在提交任务,请不要退出'
-				// this.percentage = 0
-			},
-			preview(e) {
-				if (this.done) {
-					uni.previewImage({
-						urls: [e]
-					})
-				}
-			},
-			tapsubsection(index) {
-				this.current = index
-			},
-			progressbar() {
-				var that = this;
-				if (that.percentage < 99) {
-					setTimeout(() => {
-						that.percentage = uni.$u.range(0, 99, that.percentage + 1)
-						that.progressbar()
-					}, 800);
-				}
-			},
-			is_weixin() {
-				var ua = window.navigator.userAgent.toLowerCase();
-				if (ua.match(/MicroMessenger/i) == 'micromessenger') {
-					console.log('微信浏览器');
-					return true;
+				if (that.showchat4) {
+					uni.navigateTo({
+						url: '/pages/chat/chat?showchat4=' + e + '&chat4=1'
+					});
+					that.valuechat = ''
+					return;
+				} else if (that.showchat35) {
+					uni.navigateTo({
+						url: '/pages/chat/chat?question=' + e + '&selectornot=' + that.selectornot +
+							'&showchat35=true'
+					});
+				} else if (that.showchatBaidu) {
+					// 文心一言
+					uni.navigateTo({
+						url: '/pages/chat/chat?showchat3=' + e + '&chat3=1'
+					});
+					that.valuechat = ''
+					return;
 				} else {
-					console.log("不是微信浏览器");
-					return false;
-				}
-			},
-			//下载分享
-			getdownload() {
-				if (!this.done) {
-					uni.showToast({
-						title: '图片生成中',
-						icon: 'none'
-					})
+					// 讯飞火星
+					uni.navigateTo({
+						url: '/pages/chat/chat?showchat2=' + e + '&chat2=1'
+					});
+					that.valuechat = ''
 					return;
 				}
-
-				// if(!this.is_weixin()){
-				// 	return uni.showModal({
-				// 		showCancel: false,
-				// 		title: '提示',
-				// 		content: '请在微信内置浏览器打开,长按图片下载/分享',
-				// 		confirmColor: '#207CF7'
-				// 	})
-				// }
-				this.createPoster()
-				return
-
-				// uni.showModal({
-				// 	showCancel: false,
-				// 	title: '提示',
-				// 	content: '请在微信内置浏览器打开,长按图片下载/分享',
-				// 	confirmColor: '#207cf7'
-				// })
-
-			},
+			}
 		}
-	}
+	};
 </script>
 
-<style lang="scss" scoped>
-	::v-deep .u-modal__content {
-		justify-content: flex-start;
-	}
-
-	::v-deep .u-transition {
-		z-index: 5 !important;
-	}
-
-	.displaypage {
-		margin: 30rpx;
-	}
-
-	.generategraph {
-		// width: 100%;
-		// border-radius: 16rpx;
-		margin-bottom: 36rpx;
-
-		image {
-			width: 100%;
-			border-radius: 16rpx;
-			will-change: transform;
-		}
-	}
-
-	.u_radio {
-		flex-direction: column;
-	}
-
-	/* 底部tabbar start*/
-	/* 毛玻璃*/
-	.dd-glass {
-		width: 100%;
-		backdrop-filter: blur(20rpx);
-		-webkit-backdrop-filter: blur(20rpx);
-	}
-
-	.footerfixed {
-		position: fixed;
-		// margin: 20rpx;
-
-		margin: 40rpx 30rpx;
-		width: 92%;
-		bottom: calc(env(safe-area-inset-bottom) / 2);
-		;
-		z-index: 4;
-		// background-color: rgba(0, 0, 0, 0.15);
-		background: linear-gradient(to right, $tc, $tc2);
-		box-shadow: 0rpx 0rpx 30rpx 0rpx rgba(0, 0, 0, 0.07);
-	}
-
-	.tabbar {
-		display: flex;
-		align-items: center;
-		min-height: 110rpx;
-		justify-content: space-between;
-		padding: 0;
-		height: calc(110rpx + env(safe-area-inset-bottom) / 2);
-		// padding-bottom: calc(env(safe-area-inset-bottom) / 2);
-	}
-
-	.tabbar .action {
-		font-size: 22rpx;
-		position: relative;
-		flex: 1;
-		text-align: center;
-		padding: 0;
-		display: block;
-		height: auto;
-		line-height: 1;
-		margin: 0;
-		overflow: initial;
-	}
-
-	.tabbar .action .bar-icon {
-		width: 100rpx;
-		position: relative;
-		display: block;
-		height: auto;
-		margin: 0 auto 10rpx;
-		text-align: center;
-		font-size: 42rpx;
-	}
-
-	.tabbar .action .bar-icon image {
-		width: 50rpx;
-		height: 50rpx;
-		display: inline-block;
-	}
-
-	.template-details {
-		margin: 0;
-		width: 100%;
-		height: 100vh;
-		color: #fff;
-		overflow: hidden;
-	}
-
-	.lazy-loading {
-		// background: #000;
-		height: 100%;
-	}
-
-	.drawing {
-		position: absolute;
-		top: 46%;
-		color: #000;
-		// color: #606266;
-		font-size: 18px;
-	}
-
-	.drawingdone {
-		margin: 35rpx 0;
-		text-align: center;
-		color: #606266;
-		font-size: 18px;
-	}
-
-	.progress {
-		position: absolute;
-		top: 52%;
-		width: 60%;
-	}
-
-	.preloader_1 {
-		position: absolute;
-		margin-right: 65px;
-		top: 42%;
-		// right: 8%;
-		// bottom: 18%;
-		// position: fixed;
-		//     right: 58%;
-		//     top: 42%;
-	}
-
-	.preloader_1 view {
-		display: block;
-		bottom: 0px;
-		width: 9px;
-		height: 5px;
-		background: #9b59b6;
-		position: absolute;
-		animation: preloader_1 1.5s infinite ease-in-out;
-	}
-
-	.preloader_1 view:nth-child(2) {
-		left: 11px;
-		animation-delay: .2s;
-	}
-
-	.preloader_1 view:nth-child(3) {
-		left: 22px;
-		animation-delay: .4s;
-	}
-
-	.preloader_1 view:nth-child(4) {
-		left: 33px;
-		animation-delay: .6s;
-	}
-
-	.preloader_1 view:nth-child(5) {
-		left: 44px;
-		animation-delay: .8s;
-	}
-
-	@keyframes preloader_1 {
-		0% {
-			height: 5px;
-			transform: translateY(0px);
-			background: #9b59b6;
-		}
-
-		25% {
-			height: 30px;
-			transform: translateY(15px);
-			background: #3498db;
-		}
-
-		50% {
-			height: 5px;
-			transform: translateY(0px);
-			background: #9b59b6;
-		}
-
-		100% {
-			height: 5px;
-			transform: translateY(0px);
-			background: #9b59b6;
-		}
-	}
+<style lang="scss">
+	@import './painting.scss';
 </style>