12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832 |
- <template>
- <view>
- <view style="color: #fff;">
- <tn-nav-bar backgroundColor="#26b3a0" :bottomShadow="false">AI绘图</tn-nav-bar>
- <view :style="{ height: tobheight + 'px' }"></view>
- </view>
- <u-notice-bar :text="noticebar" step speed="800"></u-notice-bar>
- <view style="margin: 30rpx 30rpx 0;">
- <tn-subsection :list="tabslist" :current="current" mode="button" :borderRadius="50"
- backgroundColor="tn-cool-bg-color-9" @change="getsubsection" buttonColor="tn-cool-bg-color-7"
- inactiveColor="#FFFFFF" activeColor="#27A1BA"></tn-subsection>
- </view>
- <view class="directask">
- <view v-if="modelslist.length>0" class="cu-form-group">
- <view class="cu-title flxe align-center justify-between">
- <view class="title flxe align-center">模型选择</view>
- <block v-if="showmj">
- <u-tag v-if="userData.vip_info&&userData.is_validity>0"
- :text="(userData.vip_info.mj_type == 'time'?'今日':'会员')+'剩余mj绘画:'+(userData.vip_info.mj_times==-1?'无限量':userData.vip_info.mj_times-userData.vip_info.mj_used+'次')"
- plain shape="circle" plainFill color="#26b3a0" borderColor="#26b3a0"
- bgColor="#26b3a014"></u-tag>
- </block>
- <block v-else>
- <u-tag v-if="userData.vip_info&&userData.is_validity>0"
- :text="(userData.vip_info.sd_type == 'time'?'今日':'会员')+'剩余sd绘画:'+(userData.vip_info.sd_times == -1?'无限量':userData.vip_info.sd_times-userData.vip_info.sd_used+'次')"
- plain shape="circle" plainFill color="#26b3a0" borderColor="#26b3a0"
- bgColor="#26b3a014"></u-tag>
- </block>
- </view>
- <view class="engine-container" @click="showmode = true">
- <view class="model_view">模型:{{xzmodels}}</view>
- <u-icon name="arrow-down-fill" color="#9e9e9e"></u-icon>
- </view>
- </view>
- <view class="cu-form-group" :style="engineid != 0 ? 'margin-top: 20rpx' : ''">
- <view class="cu-title flxe align-center justify-between">
- <view class="title flxe align-center">画面描述</view>
- <!-- <u-icon @click="keywords = '',galleryid =''" name="trash-fill" color="#9e9e9e" size="24"></u-icon> -->
- </view>
- <view class="textarea-container">
- <textarea class="textarea" v-model="keywords" cursor-spacing="30rpx" :maxlength="500"
- placeholder-style="color: #9e9e9e;font-size:28rpx"
- placeholder="输入你的创意,支持中英文,用逗号分隔,关键词越多越精确,关键词越少AI自由发挥越多,如:最好的质量,城市,大雨,远景,赛博朋克" value="keywords"
- @input="textareainput" />
- <view class="textareaoperate tn-flex align-center justify-between">
- <!-- <view @click="getincrease" class="increase">描述增幅</view> -->
- <view @click="show_gpt = true" class="increase tn-main-gradient-orangeyellow">咒语助手</view>
- <view class="tn-flex align-center" style="color: #9e9e9e;">
- <view class="">{{cursor}}/500</view>
- <view style="margin: 0 20rpx;">||</view>
- <u-icon @click="keywords = '',galleryid ='',cursor = 0" name="trash-fill" color="#9e9e9e"
- size="24"></u-icon>
- </view>
- </view>
- </view>
- <!-- <view class="tn-flex align-center justify-between polish">
- <view class="tn-flex">
- <view style="margin-right: 10rpx;">描述增幅</view>
- <u-icon @click="getincrease" name="question-circle" color="#909399" size="20"></u-icon>
- </view>
-
- <u-switch size="26" space="2" activeColor="#f9ae3d" inactiveColor="#f1f1f1" v-model="increaseswitch" @change="changepolish"></u-switch>
- </view> -->
- <view v-if="gallerylist.length>0&&!showmj" class="try-tips">
- <scroll-view class="scroll-view" scroll-x="true">
- <block v-for="(item,index) in gallerylist" :key="index">
- <view @click="tapgallery(index)" class="scroll-item"
- :style="{background: galleryid == item.id?'#26b3a0':'',color: galleryid == item.id?'#fff':''}">
- {{item.name}}
- </view>
- </block>
- </scroll-view>
- <view class="change" @click="initWords"><text class="tn-icon-circle-arrow tn-color-cat"
- style="font-size: 34rpx;"></text></view>
- </view>
- </view>
- <!-- <view class="words-ocntainer">
- <view class="sentences">
- <view class="item" v-for="(item, index) in sentence" :key="index" @click="onWords(item)">{{ item }}</view>
- </view>
- <view class="tags">
- <view class="item" v-for="(item, index) in word" :key="index" @click="onWords(item)">{{ item }}</view>
- </view>
- </view> -->
- <!-- <view class="cu-form-group" style="margin-bottom: 0;">
- <view class="cu-title"><view class="title flxe align-center">风格选择</view></view>
- </view> -->
- <!-- <view class="cu-form-group">
- <view class="cu-title flxe align-center justify-between">
- <view class="title flxe align-center">风格选择</view>
-
- </view>
-
-
- <scroll-view class="scrollview" scroll-x="true" style="height: 140rpx;">
-
- <block v-for="(item, index) in custyle" :key="index">
- <view class="scrollstyle">
- <image :src="item.img" mode="aspectFill"></image>
- <view>{{ item.title }}</view>
- </view>
- </block>
- </scroll-view>
-
- </view> -->
- <!-- <view class="cu-form-group" v-if="engineid == 1 || engineid == 2">
- <view class="cu-title"><view class="title flxe align-center">智能拓展</view></view>
- <scroll-view class="scrollview" scroll-x="true">
- <view class="scrollitems" :class="form.enable_face_enhance ? 'active' : ''" @click="onExtend(0)">面部强化</view>
- <view class="scrollitems" :class="form.is_last_layer_skip ? 'active' : ''" @click="onExtend(1)">色彩狂化</view>
- </scroll-view>
- </view> -->
- <view v-if="!showmj" class="cu-form-group">
- <view class="cu-title">
- <view class="title flxe align-center">图片比例</view>
- </view>
- <view class="flxe proportion">
- <view class="radio flxe align-center justify-center flxe-column"
- :class="ratioIndex == 0 ? 'active' : ''" @click="ratio(0)">
- <view class="cu-proportion flxe align-center justify-center">
- <view class="proportion1"></view>
- </view>
- <view class="describe">1:1</view>
- </view>
- <view class="radio flxe align-center justify-center flxe-column"
- :class="ratioIndex == 1 ? 'active' : ''" @click="ratio(1)">
- <view class="cu-proportion flxe align-center justify-center">
- <view class="proportion2"></view>
- </view>
- <view class="describe">3:4</view>
- </view>
- <view class="radio flxe align-center justify-center flxe-column"
- :class="ratioIndex == 2 ? 'active' : ''" @click="ratio(2)">
- <view class="cu-proportion flxe align-center justify-center">
- <view class="proportion3"></view>
- </view>
- <view class="describe">4:3</view>
- </view>
- <!-- <view class="radio flxe align-center justify-center flxe-column" :class="ratioIndex == 3 ? 'active' : ''" @click="ratio(3)">
- <view class="cu-proportion flxe align-center justify-center"><view class="proportion2"></view></view>
- <view class="describe">9:16</view>
- </view>
- <view class="radio flxe align-center justify-center flxe-column" :class="ratioIndex == 4 ? 'active' : ''" @click="ratio(4)">
- <view class="cu-proportion flxe align-center justify-center"><view class="proportion3"></view></view>
- <view class="describe">16:9</view>
- </view> -->
- </view>
- </view>
- <view class="cu-form-group">
- <view class="cu-title">
- <view class="title flxe align-center">参考图(可选)</view>
- </view>
- <view class="desc-tips">AI绘画时会参考您所上传的参考图的风格进行构图</view>
- <view class="cu-upload flxe align-center justify-center">
- <image class="upload-img" :src="refer_img" v-if="refer_img" mode="aspectFill"
- @click="preViewImg(refer_img)"></image>
- <view class="upload-delete tn-icon-delete tn-color-cat" style="font-size: 40rpx;" v-if="refer_img"
- @click="deleteImg()"></view>
- <view class="flxe flxe-column align-center" v-else @click="uploadImg(engineid)">
- <u-icon name="plus-circle-fill" color="#26b3a0" size="28"></u-icon>
- <view class="upload">上传图片</view>
- </view>
- </view>
- </view>
- <!-- <view class="cu-form-group">
- <view class="cu-title"><view class="title flxe align-center">参考图相似度</view></view>
- <view class="desc-tips">相似度越高越遵照原图风格,越低越有创意</view>
- <u-slider v-if="engineid == 0" v-model="form.fidelity" showValue activeColor="#26b3a0" blockColor="#26b3a0" min="0" max="100"></u-slider>
- <u-slider v-else v-model="form.init_strength" showValue activeColor="#26b3a0" blockColor="#26b3a0" min="0" max="70"></u-slider>
- </view> -->
- <view class="cu-form-group">
- <view class="cu-title">
- <view class="title flxe align-center">生成数量</view>
- </view>
- <view class="flxe generate">
- <block v-if="!showmj">
- <view class="xz_generate flxe align-center justify-center"
- :class="form.samples == 1 ? 'xz_gactive' : ''" @click="form.samples = 1">
- <view :style="{color: form.samples == 1 ? '#26b3a0':''}">1张</view>
- </view>
- <!-- <view class="xz_generate flxe align-center justify-center" :class="form.samples == 2 ? 'xz_gactive' : ''" @click="form.samples = 2">
- <view :style="{color: form.samples == 2 ? '#26b3a0':''}">2张</view>
-
- </view>
- <view class="xz_generate flxe align-center justify-center" :class="form.samples == 3 ? 'xz_gactive' : ''" @click="form.samples = 3">
- <view :style="{color: form.samples == 3 ? '#26b3a0':''}">3张</view>
-
- </view> -->
- </block>
- <block v-else>
- <view class="xz_generate flxe align-center justify-center"
- :class="form.samples == 4 ? 'xz_gactive' : ''" @click="form.samples = 4">
- <view :style="{color: form.samples == 4 ? '#26b3a0':''}">4张</view>
- </view>
- </block>
- </view>
- </view>
- <!-- <view class="footer">
- <view @click="createClick" class="Btn1" :data-styleid="1" hoverClass="active">
- <view class="create">
- <view>生成 | 需要消耗{{ needCoin }}积分</view>
- </view>
- </view>
- </view> -->
- </view>
- <!-- 生成按钮 -->
- <view class="dygbhg">
- <navigator class="whole" open-type="navigateBack">退出</navigator>
- <block v-if="showmj">
- <view
- v-if="userData.vip_info&&userData.is_validity>0&&userData.vip_info.mj_times-userData.vip_info.mj_used>0 ||userData.vip_info&&userData.is_validity>0&&userData.vip_info.mj_times == -1"
- @click="createClick" class="distinguish">立即生成</view>
- <view v-else @click="createClick" class="distinguish">生成 |
- 需要消耗{{ plan.unlock_mj_aipainting}}{{appInfo.number_alias ? appInfo.number_alias : '点数'}}</view>
- </block>
- <!-- Ai币按钮 -->
- <block v-else>
- <view
- v-if="userData.vip_info&&userData.is_validity>0&&userData.vip_info.sd_times-userData.vip_info.sd_used>0 ||userData.vip_info&&userData.is_validity>0&&userData.vip_info.sd_times == -1"
- @click="createClick" class="distinguish">立即生成</view>
- <view v-else @click="createClick" class="distinguish">生成 |
- 需要消耗{{ plan.unlock_aipainting*form.samples}}{{appInfo.number_alias ? appInfo.number_alias : '点数'}}
- </view>
- </block>
- </view>
- <u-loading-page :loading="loading" loading-text="正在加载" icon-size="35" bgColor="#1a1a1a" color="#fff"
- loadingColor="#fff"></u-loading-page>
- <u-popup :show="showmode" @close="showmode = false" safeAreaInsetTop :round="15" closeable>
- <view class="select u-flex justify-center"><text>选择模型</text></view>
- <scroll-view scroll-y="true" class="scroll_mode">
- <view class="tn-flex justify-between flex-wrap">
- <block v-for="(item,index) in modelslist" :key="index">
- <view v-if="item.title" class="card" :style="{borderColor: modelsid == index?'#91F7C1':''}"
- @click="modelsid = index,showmode = false,form.model_id = item.model_id.toString(),xzmodels = item.name,form.name = item.name">
- <u-swiper :list="item.imgs" radius="0" height="110" indicator indicatorMode="line"
- circular></u-swiper>
- <view class="card-info">
- <view class="card-info-title">{{item.title}}</view>
- <view class="card-info-desc">{{item.name}}</view>
- </view>
- </view>
- </block>
- </view>
- </scroll-view>
- </u-popup>
- <u-popup :show="show_gpt" @close="show_gpt = false" mode="center" :round="10" closeable safeAreaInsetTop>
- <view class="gpt-select">
- <view class="gpt-title"><u--text text="咒语助手" iconStyle="font-size: 20px" color="#1a1a1a" bold size="18"
- lineHeight="30"></u--text></view>
- <u--text text="针对AI绘画场景下的gpt模型,能够生成高质量的描述词" color="#9e9e9e" size="14" lineHeight="30"></u--text>
- <!-- <u--text text="输入你的创意 想象" iconStyle="font-size: 20px" bold size="16" lineHeight="30"></u--text> -->
- <view class="gpt-textarea-container"><u--textarea v-model="gpt_keywords" placeholder="输入你的创意 想象"
- count></u--textarea></view>
- <view class="use-gpt">
- <u-button :text="appInfo.number_alias ? '灵感一现(消耗1'+appInfo.number_alias+')':'灵感一现(消耗1点数)'"
- shape="circle" color="linear-gradient(to right, rgb(255, 202, 40), rgb(255, 167, 38))"
- @click="getGpt"></u-button>
- </view>
- <view class="gpt-textarea-container" style="margin-bottom: 20rpx;"><u--textarea height="200"
- v-model="gpt_text" v-if="gpt_text"></u--textarea></view>
- <u-button type="success" @click="setGpt" plain text="使用" shape="circle" v-if="gpt_text"></u-button>
- </view>
- </u-popup>
- <!-- midJourneyAi币不足弹窗 -->
- <wike-model v-if="signShow" :authorize="false" :title="signTitle" btnText="立即获取" @save="signSign"
- @close="signShow = false"></wike-model>
-
- <wike-modal-qrcode :qrcode="gzhqrcode" :showconcern="showconcern"
- @concernclose="concernclose"></wike-modal-qrcode>
- <!-- <wike-tabbar :onTabbar="true" :isShowAnimate="true"></wike-tabbar> -->
- <!-- <u-picker :show="showmode" :columns="modelslist" keyName="name" @cancel="showmode = false"></u-picker> -->
- </view>
- </template>
- <script>
- import {
- mapMutations,
- mapActions,
- mapState,
- mapGetters
- } from 'vuex';
- import {
- apiurl
- } from '@/common/request/request';
- let rewardedVideoAd = null;
- export default {
- mixins: [],
- components: {},
- data() {
- return {
- signShow: false,
- signTitle: '',
- tobheight: 45,
- platform: this.$platform.get(),
- indexList: [],
- show_gpt: false,
- gpt_keywords: '',
- gpt_text: '',
- cursor: 0,
- form: {
- // is_anime: true,
- // style: '',
- // task: 'txt2img',
- // act: '',
- // fidelity: 50,
- // text: '',
- // prompt: '',
- // init_image: '',
- // init_strength: 50,
- // guidence_scale: 15,
- // ratio: 2,
- // enable_face_enhance: false,
- // is_last_layer_skip: false,
- // engine: 'stable_diffusion'
- name: '',
- init_image: '',
- prompt: '',
- width: '',
- height: '',
- guidance_scale: '7',
- samples: '1',
- model_id: '',
- scheduler: 'DDPMScheduler',
- type: 'text2img',
- num_inference_steps: '30',
- // lora_model:'guofeng3-lora'
- },
- word: [],
- sentence: [],
- enable_face_enhance: false,
- is_last_layer_skip: false,
- ratioIndex: 0,
- isConnected: true, //是否有网
- page: 1,
- loadmore: 'loading',
- loading: true,
- slider: 50,
- value2: '',
- keywords: '',
- increase: '',
- noincrease: '',
- increaseswitch: false,
- keyword: ['莫斯科', '日落', '橄榄树', '椰子树', '小兔子梵高', '海底世界', '星球'],
- custyle: [{
- img: 'https://pub-8b49af329fae499aa563997f5d4068a4.r2.dev/generations/18134196791680595205.png',
- title: '真人模型'
- }, {
- img: 'https://pub-8b49af329fae499aa563997f5d4068a4.r2.dev/generations/17763741241683163592.png',
- title: '宠物模型'
- }, {
- img: 'https://pub-8b49af329fae499aa563997f5d4068a4.r2.dev/generations/4740030011682234157.png',
- title: '漫画模型'
- }, {
- img: 'https://pub-8b49af329fae499aa563997f5d4068a4.r2.dev/generations/20527297251680823430.png',
- title: '海底模型'
- }],
- showcoin: false,
- addSuc: false,
- plan: {},
- // needCoin: 0,
- cos_img: '',
- cos_id: 0,
- refer_img: '',
- refer_id: 0,
- engine: 'sd',
- engineid: 0,
- needCoin: 0,
- gallerylist: [],
- galleryid: '',
- modelslist: [],
- modelsid: 0,
- xzmodels: '',
- showmode: false,
- noticebar: ['精美图片需要时间打磨,预计20秒-120秒出图',
- // '图片生成中请不要退出,否则可能会生成失败'
- ],
- tabslist: ['StableDiffusion绘图', 'MidJourney绘图'],
- curNow: 0,
- cardswiper: [
- 'https://cos.iseeds.xyz/cover/3.0-1.jpg',
- 'https://cos.iseeds.xyz/cover/hhjmix-3.png',
- 'https://cos.iseeds.xyz/style/gufeng1.png',
- ],
- showmj: false,
- current: 0,
- showconcern: false,
- gzhqrcode: '',
- proportion: ''
- };
- },
- computed: {
- ...mapGetters(['appInfo', 'homeTemplate', 'userInfo', 'isLogin', 'userData'])
- },
- onLoad() {
- if (this.platform == 'wxMiniProgram') {
- var menumtop = uni.getMenuButtonBoundingClientRect().top - uni.getSystemInfoSync().statusBarHeight;
- var paddingtop = uni.getSystemInfoSync().statusBarHeight + menumtop;
- this.tobheight = menumtop + paddingtop + uni.getMenuButtonBoundingClientRect().height;
- }
- if (this.$Route.query.prompt) {
- this.keywords = this.$Route.query.prompt
- this.cursor = this.$Route.query.prompt.length
- this.current = this.$Route.query.engine == 'sd' ? 0 : 1
- this.showmj = this.$Route.query.engine == 'sd' ? false : true
- if (this.$Route.query.engine == 'sd') {
- this.form.samples = 1
- this.engine = 'sd'
- this.modelslist = []
- this.getModels();
- } else {
- this.form.samples = 4
- this.engine = 'mj'
- this.modelslist = []
- this.getModels();
- }
- }
- this.gallery();
- this.getModels();
- this.getPlan()
- },
- onShow() {
- // 网络变化检测
- uni.onNetworkStatusChange(res => {
- this.isConnected = res.isConnected;
- });
- if (this.isLogin) {
- this.getUserData();
- }
- this.systemwechat()
- },
- onReady() {
- // #ifdef MP-WEIXIN
- if (wx.createRewardedVideoAd && this.appInfo.video_status == 1) {
- rewardedVideoAd = wx.createRewardedVideoAd({
- adUnitId: this.appInfo.video_id
- });
- rewardedVideoAd.onLoad(() => {
- console.log('onLoad event emit');
- });
- rewardedVideoAd.onError(err => {
- console.log('onError event emit', err);
- });
- rewardedVideoAd.onClose(res => {
- if (res && res.isEnded) {
- // 正常播放结束,可以下发游戏奖励
- this.memberAddCoin();
- this.showcoin = false;
- } else {
- // 播放中途退出,不下发游戏奖励
- uni.showToast({
- title: '看完广告后才可获得积分哦',
- icon: 'none'
- });
- }
- });
- }
- // #endif
- this.loading = false;
- },
- methods: {
- ...mapActions(['appInit', 'logout', 'getUserInfo', 'getUserData']),
- signSign() {
- uni.navigateTo({
- url: '/pages/user/member/member'
- });
- this.signShow = false
- },
- 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.isLogin && this.appInfo.is_show_logged_qrcode == 1) {
- this.showconcern = true
- }
- }
- }
- }
- })
- },
- concernclose() {
- this.showconcern = false
- },
- getsubsection(e) {
- this.showmj = e.index == 1 ? true : false
- this.current = e.index
- this.modelsid = 0
- if (e.index == 1) {
- this.form.samples = 4
- this.engine = 'mj'
- this.modelslist = []
- this.getModels();
- } else {
- this.form.samples = 1
- this.engine = 'sd'
- this.modelslist = []
- this.getModels();
- }
- this.initWords()
- },
- async getGpt() {
- if (!this.isLogin) {
- uni.navigateTo({
- url: '/pages/user/signin'
- });
- uni.setStorageSync('route', '/pages/painting/draw');
- return;
- }
- if (!this.gpt_keywords) {
- uni.showToast({
- title: '请填写描述词',
- icon: 'none'
- });
- return;
- }
- if (this.userData.coin == 0) {
- var alias = this.appInfo.number_alias ? this.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;'>" +
- this.userData.coin + "</span><span>" + alias + "</span>,不支持会员时长,无法生成,快去获取<span>" + alias +
- "</span>吧</p>"
- this.signShow = true
- return;
- }
- uni.showLoading({
- title: '内容审核中...'
- })
- // #ifdef H5
- let check = this.appInfo.is_h5_filter && this.appInfo.is_h5_filter == 1 ? await this.getcheckText(this
- .gpt_keywords) :
- 1;
- // #endif
- // #ifdef MP-WEIXIN
- let check = await this.getcheckText(this.gpt_keywords);
- // #endif
- if (check == 1) {
- uni.showLoading({
- title: '咒语生成中...'
- })
- this.$http('gallery.chat', {
- prompt: this.gpt_keywords
- }).then(res => {
- if (res.code == 0) {
- this.gpt_text = res.data;
- uni.hideLoading();
- } else {
- uni.hideLoading();
- uni.showToast({
- title: '使用咒语失败,请尝试重试',
- icon: 'none'
- });
- }
- });
- }
- },
- setGpt() {
- // console.log(this.gpt_text.indexOf("英文:"));
- if (this.gpt_text.indexOf("英文:") != -1) {
- let index = this.gpt_text.indexOf("英文:");
- let text = this.gpt_text.substring(index + 3);
- // console.log(text);
- this.keywords = text
- this.cursor = this.keywords.length
- // console.log(this.keywords.length);
- } else {
- let text = this.gpt_text;
- this.keywords = text
- this.cursor = this.keywords.length
- }
- this.show_gpt = false
- },
- textareainput(e) {
- // console.log(e.detail.cursor);
- this.cursor = e.detail.cursor
- },
- sectionChange(index) {
- this.curNow = index;
- },
- gallery() {
- let that = this;
- this.$http('gallery.getWords').then(res => {
- if (res.code == 0) {
- this.gallerylist = res.data
- }
- });
- },
- getModels() {
- let that = this;
- this.$http('gallery.getModels', {
- engine: that.engine
- }).then(res => {
- if (res.code == 0) {
- uni.setNavigationBarTitle({
- title: this.appInfo.site_name
- });
- this.modelslist = res.data
- this.form.model_id = this.modelslist[this.modelsid].model_id.toString()
- this.form.name = this.modelslist[this.modelsid].name
- // this.needCoin = this.modelslist[this.modelsid].coin
- this.xzmodels = this.modelslist[this.modelsid].name
- // console.log(this.modelslist);
- if (this.$Route.query.model_name) {
- for (var ty = 0; ty < this.modelslist.length; ty++) {
- if (this.$Route.query.model_name == this.modelslist[ty].name) {
- // console.log(ty);
- this.modelsid = ty
- this.form.model_id = this.modelslist[ty].model_id.toString()
- // this.needCoin = this.modelslist[ty].coin
- this.xzmodels = this.modelslist[ty].name
- this.form.name = this.modelslist[ty].name
- }
- }
- }
- }
- });
- },
- tapgallery(e) {
- // console.log(this.gallerylist[e].guide.slice(0,500));
- this.keywords = this.gallerylist[e].guide.slice(0, 500)
- this.galleryid = this.gallerylist[e].id
- this.cursor = this.keywords.length
- },
- changepolish() {
- // console.log(e);
- uni.showLoading({
- title: '描述增幅中...'
- })
- this.$http('gallery.chat', {
- prompt: this.keywords
- }).then(res => {
- if (res.code == 0) {
- // this.increaseswitch = e
- // this.increase = res.data
- this.keywords = res.data
- }
- });
- // if(e){
- // if(this.increase){
- // this.keywords = this.increase
- // return;
- // }
- // this.increaseswitch = false
- // uni.showLoading({
- // title:'描述增幅中...'
- // })
- // this.noincrease = this.keywords
- // this.$http('gallery.chat', {prompt:this.keywords}).then(res => {
- // if (res.code == 0) {
- // this.increaseswitch = e
- // this.increase = res.data
- // this.keywords = res.data
- // }
- // });
- // return;
- // }
- // this.keywords = this.noincrease
- },
- getincrease() {
- var that = this;
- if (!this.keywords) {
- uni.showToast({
- title: '请输入描述',
- icon: 'none'
- })
- return;
- }
- uni.showModal({
- confirmText: '立即增幅',
- // showCancel:false,
- confirmColor: '#26B3A0',
- content: '如果你正在寻找灵感,或懒得输入描述词,开启描述增幅GTP模型将自动根据你的输入的描述词为你补充描述词',
- title: '提示',
- success(res) {
- if (res.confirm) {
- that.changepolish()
- }
- }
- });
- },
- // loadmores() {
- // for (let i = 0; i < 30; i++) {
- // this.indexList.push({
- // url: this.urls[uni.$u.random(0, this.urls.length - 1)]
- // });
- // }
- // },
- getPlan() {
- this.$http('conf.getGroupConf', {
- group: 'system.plan'
- }).then(res => {
- if (res.code == 0) {
- this.plan = res.data;
- uni.setNavigationBarTitle({
- title: this.appInfo.site_name
- });
- // console.log(this.plan);
- }
- });
- },
- initWords() {
- this.gallerylist = uni.$u.randomArray(this.gallerylist)
- },
- ratio(e) {
- this.ratioIndex = e;
- },
- onExtend(e) {
- if (e == 0) {
- this.form.enable_face_enhance = !this.enable_face_enhance;
- } else {
- this.form.is_last_layer_skip = !this.is_last_layer_skip;
- }
- },
- onWords(e) {
- this.keywords = this.keywords ? this.keywords + ',' + e : e;
- },
- // 点击生成按钮
- async createClick() {
- var that = this;
- // 判断用户是否登录
- if (!this.isLogin) {
- uni.navigateTo({
- url: '/pages/user/signin'
- });
- uni.setStorageSync('route', '/pages/painting/draw');
- return;
- }
- if (that.appInfo.time_member && that.appInfo.time_member == 1) {
- if (that.showmj) {
- 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 < this.plan.unlock_mj_aipainting) {
- 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.unlock_mj_aipainting + "</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 < this.plan.unlock_mj_aipainting) {
- // 用户绘制没Mjai币不足
- console.log('999999999999999999999999999-2');
- 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.unlock_mj_aipainting + "</span><span>" + alias +
- "</span></p><p style='padding-top: 10px;'>您的绘画<span>" + alias +
- "</span>不足或会员套餐内剩余次数不足,无法生成绘画</p>"
- this.signShow = true
- return;
-
- }
- } else {
- // 消耗Ai币
- // 验证是否符合生成条件
- if (that.userData.vip_info && that.userData.is_validity > 0 && that.userData.vip_info
- .sd_used == that.userData.vip_info
- .sd_times && this.userData.coin < (this.plan.unlock_aipainting * this.form.samples)) {
- 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;'>" +
- (this.plan.unlock_aipainting * this.form.samples) + "</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 < (this.plan.unlock_aipainting * this
- .form.samples)) {
- 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;'>" +
- (this.plan.unlock_aipainting * this.form.samples) + "</span><span>" + alias +
- "</span></p><p style='padding-top: 10px;'>您的绘画<span>" + alias +
- "</span>不足或会员套餐内剩余次数不足,无法生成绘画</p>"
- this.signShow = true
- return;
- }
- }
- } else {
- if (that.showmj && this.userData.coin < this.plan.unlock_mj_aipainting) {
- var alias = that.appInfo.number_alias ? that.appInfo.number_alias : '点数';
- this.signTitle =
- "<p style='font-weight: 550;font-size: 16px;'>mj绘画需要<span style='color: #26b3a0;padding: 0 4px;'>" +
- this.plan.unlock_mj_aipainting + "</span><span>" + alias +
- "</span></p><p style='padding-top: 10px;'>您当前有<span style='color: #26b3a0;padding: 0 4px;'>" +
- this.userData.coin + "</span><span>" + alias + "</span>,无法生成绘画,快去获取<span>" + alias +
- "</span>吧</p>"
- this.signShow = true
- return;
- }
- if (!that.showmj && this.userData.coin < (this.plan.unlock_aipainting * this.form.samples)) {
- var alias = that.appInfo.number_alias ? that.appInfo.number_alias : '点数';
- this.signTitle =
- "<p style='font-weight: 550;font-size: 16px;'>sd绘画需要<span style='color: #26b3a0;padding: 0 4px;'>" +
- this.plan.unlock_aipainting * this.form.samples + "</span><span>" + alias +
- "</span></p><p style='padding-top: 10px;'>您当前有<span style='color: #26b3a0;padding: 0 4px;'>" +
- this.userData.coin + "</span><span>" + alias + "</span>,无法生成绘画,快去获取<span>" + alias +
- "</span>吧</p>"
- this.signShow = true
- return;
- }
- }
- // if(that.showmj){
- // if(this.userData.coin < this.plan.unlock_mj_aipainting){
- // var alias = this.appInfo.number_alias ? this.appInfo.number_alias : '点数';
- // this.signTitle = "<p style='font-weight: 550;font-size: 16px;'>绘画需要<span style='color: #26b3a0;padding: 0 4px;'>"+this.plan.unlock_mj_aipainting+"</span><span>"+alias+"</span></p><p style='padding-top: 10px;'>您当前有<span style='color: #26b3a0;padding: 0 4px;'>"+this.userData.coin+"</span><span>"+alias+"</span>,不支持会员时长,无法生成绘画,快去获取<span>"+alias+"</span>吧</p>"
- // this.signShow = true
- // return;
- // }
- // }else{
- // if(this.userData.coin < (this.plan.unlock_aipainting*this.form.samples)){
- // var alias = this.appInfo.number_alias ? this.appInfo.number_alias : '点数';
- // this.signTitle = "<p style='font-weight: 550;font-size: 16px;'>绘画需要<span style='color: #26b3a0;padding: 0 4px;'>"+this.plan.unlock_aipainting*this.form.samples+"</span><span>"+alias+"</span></p><p style='padding-top: 10px;'>您当前有<span style='color: #26b3a0;padding: 0 4px;'>"+this.userData.coin+"</span><span>"+alias+"</span>,不支持会员时长,无法生成绘画,快去获取<span>"+alias+"</span>吧</p>"
- // this.signShow = true
- // return;
- // }
- // }
- if (!this.keywords) {
- uni.showToast({
- title: '请输入画面描述词',
- icon: 'none'
- });
- return;
- }
- // console.log(this.form);
- if (!this.form.model_id) {
- uni.showToast({
- title: '请选择绘图模型',
- icon: 'none'
- });
- return;
- }
- // else if (this.userInfo.coin < 100) {
- // var alias = that.appInfo.number_alias ? that.appInfo.number_alias : '点数';
- // uni.showModal({
- // confirmText: '立即获取',
- // confirmColor: '#26B3A0',
- // content: '您的' + alias + '不足,当前绘画需要'+ that.plan.lock_aipainting+alias+',暂不支持会员时长。',
- // title: '提示',
- // success(res) {
- // if (res.confirm) {
- // uni.navigateTo({
- // url: '/pages/user/member/member'
- // });
- // }
- // }
- // });
- // return;
- // this.showcoin = true;
- // return;
- // }
- else {
- // this.gallerychat()
- uni.showLoading({
- title: '内容审核中...'
- })
- // #ifdef H5
- let check = this.appInfo.is_h5_filter && this.appInfo.is_h5_filter == 1 ? await this.getcheckText(
- this.keywords) :
- 1;
- // #endif
- // #ifdef MP-WEIXIN
- let check = await this.getcheckText(this.keywords);
- // #endif
- if (check == 1) {
- this.aiPlay(this.keywords);
- }
- }
- // uni.navigateTo({
- // url:'/pages/painting/generate'
- // })
- },
- getcheckText(e) {
- var that = this;
- return new Promise((resolve, reject) => {
- that.$http('ai.checkText', {
- prompt: e
- }).then(res => {
- if (res.code == 0) {
- resolve(1);
- }
- })
- });
- },
- gallerychat() {
- uni.showLoading({
- title: '润色中...'
- })
- this.$http('gallery.chat', {
- prompt: this.keywords
- }).then(res => {
- if (res.code == 0) {
- this.aiPlay(res.data);
- }
- });
- },
- aiPlay(e) {
- let that = this;
- that.form.prompt = e;
- switch (this.ratioIndex) {
- case 0:
- that.form.width = '512';
- that.form.height = '512';
- that.proportion = '';
- break;
- case 1:
- that.form.width = '512';
- that.form.height = '768';
- that.proportion = ' --ar 3:4';
- break;
- case 2:
- that.form.width = '768';
- that.form.height = '512';
- that.proportion = ' --ar 4:3';
- break;
- case 3:
- that.form.width = '512';
- that.form.height = '1024';
- that.proportion = ' --ar 9:16';
- break;
- case 4:
- that.form.width = '1024';
- that.form.height = '512';
- that.proportion = ' --ar 16:9';
- break;
- }
- if (that.refer_img) {
- that.form.init_image = that.refer_img;
- that.form.type = 'img2img';
- } else {
- that.form.type = 'text2img';
- }
- // console.log(that.form);
- uni.navigateTo({
- url: that.showmj ? '/pages/painting/generate?prompt=' + ((that.refer_img ? that.refer_img +
- ' ' : '') + that.form.prompt + (that.proportion ? that.proportion : '')) +
- '&model_id=' + (that.modelslist.length > 0 ? this.form.model_id : '') + '&version=' + (that
- .modelslist.length > 0 ? that.modelslist[this.modelsid].version : '-- v5') +
- '&needCoin=' + that.plan.unlock_mj_aipainting : '/pages/painting/details?form=' + JSON
- .stringify(this.form)
- });
- // this.$http('gallery.create', this.form).then(res => {
- // if (res.code == 0) {
- // if(res.data.output.length > 0){
- // uni.navigateTo({
- // url: '/pages/painting/details?url=' + res.data.output
- // });
- // }else{
- // uni.showToast({
- // title:'生成失败',
- // icon:'error'
- // })
- // }
- // uni.hideLoading();
- // }
- // });
- },
- close_blur_view() {
- this.showcoin = false;
- },
- toMember() {
- uni.navigateTo({
- url: '/pages/member/member'
- });
- },
- toWelfare() {
- uni.switchTab({
- url: '/pages/welfare/welfare'
- });
- },
- showVideoAd() {
- if (rewardedVideoAd) {
- uni.showToast({
- title: '广告拉取中',
- icon: 'none'
- });
- rewardedVideoAd.show().catch(() => {
- // 失败重试
- rewardedVideoAd
- .load()
- .then(() => rewardedVideoAd.show())
- .catch(err => {
- console.log('激励视频 广告显示失败');
- uni.showToast({
- title: '广告显示失败',
- icon: 'none'
- });
- });
- });
- }
- },
- memberAddCoin() {
- this.$http('member.addCoin', {
- type: 'video'
- }).then(res => {
- if (res.code == 0) {
- uni.showToast({
- title: '获得积分+' + res.data
- });
- // let coin = {coin: this.userData.coin+1}
- // that.$store.commit('userData',coin)
- this.getUserInfo();
- } else {
- uni.showToast({
- title: '获得积分失败',
- icon: 'none'
- });
- }
- });
- },
- uploadImg(engineid) {
- let that = this;
- uni.chooseImage({
- count: 1, //count: 6, //默认9
- sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
- sourceType: ['album'], //从相册选择
- success: function(res) {
- const path = res.tempFilePaths[0];
- uni.uploadFile({
- url: apiurl('common/upload'),
- filePath: path,
- // name: 'img',
- // formData: {
- // platform: $platform.get(),
- // accept: 'image'
- // },
- name: 'file',
- formData: {
- accept: 'image'
- },
- success: res2 => {
- let a = JSON.parse(res2.data);
- if (a.code == 0) {
- // if (engineid == 0) {
- // that.cos_img = a.data.path;
- // that.cos_id = a.data.id;
- // } else {
- that.refer_img = a.data.path;
- that.refer_id = a.data.id;
- // }
- } else {
- uni.showToast({
- title: '上传图片失败',
- icon: 'none'
- });
- }
- }
- });
- }
- });
- },
- preViewImg(img) {
- uni.previewImage({
- urls: [img],
- longPressActions: {
- itemList: ['发送给朋友', '保存图片', '收藏'],
- success: function(data) {},
- fail: function(err) {
- console.log(err.errMsg);
- }
- }
- });
- },
- deleteImg() {
- // if (engineid == 0) {
- // this.cos_img = '';
- // this.cos_id = 0;
- // } else {
- this.refer_img = '';
- // this.refer_id = 0;
- // }
- },
- open() {
- // console.log('open');
- },
- }
- };
- </script>
- <style lang="scss">
- .bg {
- position: fixed;
- top: 0;
- width: 100%;
- height: 100%;
- // background: linear-gradient(-45deg, #1a1a1a, #262626, #0d0d0d);
- z-index: -1;
- }
- @-webkit-keyframes Btn1 {
- 0% {
- background-position: 0 50%;
- }
- 50% {
- background-position: 100% 50%;
- }
- 100% {
- background-position: 0 50%;
- }
- }
- @keyframes Btn1 {
- 0% {
- background-position: 0 50%;
- }
- 50% {
- background-position: 100% 50%;
- }
- 100% {
- background-position: 0 50%;
- }
- }
- @-webkit-keyframes Btn1_ {
- 0% {
- transform: translateX(-100%);
- }
- 100% {
- transform: translateX(0);
- }
- }
- @keyframes Btn1_ {
- 0% {
- transform: translateX(-100%);
- }
- 100% {
- transform: translateX(0);
- }
- }
- .Btn1::before {
- // animation: Btn1__1 0.4s linear 0.4s infinite;
- background: #fff;
- border-radius: 100rpx;
- content: '';
- height: 100rpx;
- left: calc(50% - 50rpx);
- opacity: 0;
- position: absolute;
- top: calc(50% - 50rpx);
- width: 100rpx;
- }
- @-webkit-keyframes Btn1__1 {
- 0% {
- opacity: 0.7;
- transform: scale(0);
- }
- 100% {
- opacity: 0;
- transform: scale(2);
- }
- }
- @keyframes Btn1__1 {
- 0% {
- opacity: 0.7;
- transform: scale(0);
- }
- 100% {
- opacity: 0;
- transform: scale(2);
- }
- }
- .Btn1::after {
- // animation: Btn1__2 0.8s linear 0.4s infinite;
- background: #fff;
- border-radius: 100rpx;
- content: '';
- height: 100rpx;
- left: calc(50% - 50rpx);
- opacity: 0;
- position: absolute;
- top: calc(50% - 50rpx);
- width: 100rpx;
- }
- @-webkit-keyframes Btn1__2 {
- 0% {
- opacity: 0.7;
- transform: scale(0);
- }
- 100% {
- opacity: 0;
- transform: scale(2.5);
- }
- }
- @keyframes Btn1__2 {
- 0% {
- opacity: 0.7;
- transform: scale(0);
- }
- 100% {
- opacity: 0;
- transform: scale(2.5);
- }
- }
- .Btn1 text {
- line-height: 38rpx;
- text-align: center;
- }
- .Btn1 image {
- animation: Btn1_image 0.8s linear infinite alternate;
- left: 30rpx;
- position: absolute;
- top: -30rpx;
- }
- @-webkit-keyframes Btn1_image {
- 0% {
- transform: rotate(0);
- }
- 100% {
- transform: rotate(18deg);
- }
- }
- @keyframes Btn1_image {
- 0% {
- transform: rotate(0);
- }
- 100% {
- transform: rotate(18deg);
- }
- }
- .cu-form-group {
- padding: 16rpx 0;
- .cu-title {
- margin-bottom: 4rpx;
- .title {
- text-align: justify;
- padding-right: 30rpx;
- font-size: 30rpx;
- position: relative;
- height: 60rpx;
- line-height: 60rpx;
- min-width: calc(5em + 15px);
- font-weight: bold;
- color: #000;
- // view {
- // color: red;
- // }
- // .shu {
- // background: #fff;
- // width: 5px;
- // height: 38rpx;
- // margin-right: 20rpx;
- // }
- }
- .cu-empty {
- .empty {
- margin-right: 8rpx;
- font-size: 26rpx;
- color: #fff;
- z-index: 9;
- }
- }
- }
- .engine-container {
- background-color: #f1f1f1;
- padding: 20rpx;
- border-radius: 22rpx;
- display: flex;
- justify-content: space-between;
- margin-top: 16rpx;
- .model_view {
- color: #9e9e9e;
- }
- }
- .textarea-container {
- // padding: 30rpx;
- background: #f1f1f1;
- border-radius: 18rpx;
- // textarea {
- // width: 100%;
- // height: 100rpx;
- // font-size: 28rpx;
- // color: #303133db;
- // }
- .textarea {
- background-color: #f1f1f1;
- width: 100%;
- height: 260rpx;
- padding: 20rpx;
- border-radius: 18rpx;
- margin-top: 16rpx;
- color: #9e9e9e;
- }
- .textareaoperate {
- padding: 0 30rpx 22rpx;
- .increase {
- // background: #ffa726;
- color: #fff;
- padding: 6px 16px;
- font-size: 14px;
- border-radius: 20px;
- }
- view {
- font-size: 32rpx;
- // margin-right: 30rpx;
- }
- }
- .trash {
- width: 100%;
- justify-content: flex-end;
- }
- }
- .scrollview {
- white-space: nowrap;
- margin-top: 16rpx;
- .scrollitems {
- display: inline-block;
- background: #f3f3f3;
- text-align: center;
- padding: 12rpx 32rpx;
- margin-right: 30rpx;
- border-radius: 6rpx;
- font-size: 26rpx;
- }
- .scrollitems.active {
- background: #6f2fdb;
- color: #fff;
- }
- }
- .scrollstyle {
- display: inline-block;
- position: relative;
- width: 200rpx;
- height: 140rpx;
- margin-right: 30rpx;
- image {
- width: 200rpx;
- height: 140rpx;
- border-style: solid;
- border-color: #ffca28;
- border-width: 8rpx;
- }
- view {
- position: absolute;
- bottom: 8rpx;
- width: 184rpx;
- text-align: center;
- color: #fff;
- background: #000000a8;
- font-size: 24rpx;
- margin-left: 8rpx;
- }
- }
- .proportion {
- // margin-left: 30rpx;
- display: flex;
- margin-top: 16rpx;
- .radio {
- margin-right: 48rpx;
- border-radius: 8rpx;
- }
- .describe {
- font-size: 28rpx;
- margin-top: 12rpx;
- color: #9e9e9e;
- }
- }
- .cu-proportion {
- width: 100rpx;
- height: 100rpx;
- border-style: solid;
- border-width: 4rpx;
- border-radius: 10rpx;
- border-color: #d9d9d9;
- .proportion1 {
- width: 72rpx;
- height: 72rpx;
- background: #d9d9d9;
- border-radius: 10rpx;
- }
- .proportion2 {
- width: 45rpx;
- height: 72rpx;
- border-radius: 4rpx;
- background: #d9d9d9;
- border-radius: 10rpx;
- }
- .proportion3 {
- width: 72rpx;
- height: 45rpx;
- border-radius: 4rpx;
- background: #d9d9d9;
- border-radius: 10rpx;
- }
- }
- .radio.active {
- color: #26b3a0;
- .cu-proportion {
- border-color: #26b3a0;
- }
- .cu-proportion view {
- background: #26b3a0;
- }
- }
- .cu-upload {
- width: 100%;
- height: 260rpx;
- background: #f1f1f1;
- border-radius: 20rpx;
- // border-style: double;
- border-color: #d3d4d6;
- position: relative;
- .upload-img {
- width: 100%;
- height: 100%;
- border-radius: 20rpx;
- }
- .upload-delete {
- position: absolute;
- right: 8rpx;
- top: 8rpx;
- color: #26b3a0;
- }
- .upload {
- margin-top: 12rpx;
- color: #9e9e9e;
- }
- }
- .tn-slider__custom-block {
- background-color: #fff;
- width: auto;
- height: 40rpx;
- line-height: 40rpx;
- padding: 0 5rpx;
- border-radius: 50%;
- text-align: center;
- color: #ffffff;
- }
- }
- .bnt {
- font-size: 32rpx;
- font-weight: bold;
- color: #fff;
- width: 690rpx;
- height: 100rpx;
- text-align: center;
- border-radius: 100rpx;
- line-height: 100rpx;
- margin: 64rpx auto 15rpx;
- background: #fff;
- }
- .buttonhover {
- background: #fff;
- opacity: 0.7;
- }
- /* 底部安全边距 start*/
- .tn-tabbar-height {
- min-height: 120rpx;
- height: calc(140rpx + env(safe-area-inset-bottom) / 2);
- height: calc(140rpx + constant(safe-area-inset-bottom));
- }
- .try-tips {
- // padding: 0 16rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-top: 20rpx;
- // color: #d9d9d9;
- .change {
- display: flex;
- align-items: center;
- &-text {
- margin-left: 6rpx;
- }
- }
- }
- .polish {
- margin-top: 20rpx;
- view {
- font-size: 30rpx;
- font-weight: bold;
- color: #000;
- // margin-right: 30rpx;
- }
- }
- .words-ocntainer {
- padding: 0 16rpx;
- .sentences {
- display: flex;
- flex-wrap: wrap;
- .item {
- padding: 8rpx 16rpx;
- margin-bottom: 10rpx;
- background: #333333;
- color: #8f8f8f;
- font-size: 14px;
- border-radius: 10rpx;
- font-size: 13px;
- }
- }
- .tags {
- display: flex;
- flex-wrap: wrap;
- .item {
- padding: 8rpx 16rpx;
- margin-bottom: 10rpx;
- margin-right: 10rpx;
- background: #333333;
- color: #8f8f8f;
- font-size: 14px;
- border-radius: 10rpx;
- font-size: 13px;
- }
- }
- }
- .desc-tips {
- margin-bottom: 20rpx;
- color: #d9d9d9;
- font-size: 13px;
- }
- .footer {
- margin-top: 80rpx;
- // padding-bottom: 100rpx;
- position: fixed;
- bottom: 60rpx;
- width: 92%;
- z-index: 999;
- border-radius: 20rpx;
- .Btn1 {
- // animation: Btn1 3s ease infinite alternate, Btn1_ 0.4s linear alternate;
- // background: linear-gradient(60deg, #f79533, #f37055, #6f2fdb, #a166ab, #5073b8, #1098ad, #07b39b, #6fba82);
- // background-size: 300% 300%;
- // border: solid #fff;
- // border-radius: 20rpx;
- // border-width: 2rpx 2rpx 6rpx;
- // box-shadow: 0rpx 20rpx 20rpx 0rpx rgba(162, 253, 197, 0.4);
- border-radius: 20rpx;
- background: linear-gradient(to right, #00ca88, #00BCD4);
- color: #fff;
- display: flex;
- font-size: 30rpx;
- font-weight: 600;
- height: 80rpx;
- justify-content: center;
- align-items: center;
- // width: 650rpx;
- .create {
- width: 100%;
- display: flex;
- align-items: center;
- flex-direction: column;
- }
- }
- }
- .userAvatarUrl_view {
- border-radius: 100rpx;
- height: 80rpx;
- margin-bottom: 15rpx;
- overflow: hidden;
- width: 80rpx;
- }
- .scroll-view {
- white-space: nowrap;
- width: 94%;
- .scroll-item {
- display: inline-block;
- text-align: center;
- margin-right: 10rpx;
- padding: 10rpx 20rpx;
- background-color: #f1f1f1;
- height: 60rpx;
- border-radius: 30rpx;
- color: #26b3a0;
- }
- }
- .directask {
- padding: 14rpx 30rpx 250rpx;
- }
- .dygbhg {
- background: #ffffff;
- border-radius: 20rpx 20rpx 0 0;
- position: fixed;
- bottom: 0;
- width: 100%;
- box-shadow: 0px 0px 10px #00000024;
- display: flex;
- align-items: center;
- justify-content: space-evenly;
- z-index: 999;
- }
- .whole {
- width: 30%;
- height: 80rpx;
- display: flex;
- color: #ffffff;
- align-items: center;
- justify-content: center;
- background: #d9d9d9;
- // font-weight: bold;
- border-radius: 60rpx;
- }
- .distinguish {
- width: 56%;
- height: 80rpx;
- display: flex;
- color: #ffffff;
- align-items: center;
- justify-content: center;
- background: linear-gradient(to right, #00ca88, #00BCD4);
- font-weight: bold;
- border-radius: 60rpx;
- margin: 38rpx 0;
- margin-left: 4%;
- }
- .select {
- font-weight: bold;
- font-size: 32rpx;
- margin: 30rpx;
- }
- .scroll_mode {
- height: 1100rpx;
- padding: 0rpx 30rpx 30rpx;
- .card {
- // border-radius: 8px;
- width: 32%;
- height: 12.5rem;
- background: #f1f1f180;
- margin-bottom: 20rpx;
- border-style: solid;
- border-color: #fff;
- border-width: 3px;
- // border: 3px solid transparent;
- .card-info {
- padding: .4375rem .375rem;
- .card-info-title {
- // color: #fff;
- line-height: 1.5rem;
- }
- .card-info-desc {
- font-size: 24rpx;
- line-height: 1.25rem;
- height: 40px;
- color: #999;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- overflow: hidden;
- }
- }
- }
- }
- .generate {
- margin-top: 8px;
- .xz_generate {
- width: 150rpx;
- height: 90rpx;
- background: #f1f1f1;
- margin-right: 30rpx;
- border-style: solid;
- border-color: #f1f1f1;
- border-width: 3px;
- border-radius: 6px;
- }
- .xz_gactive {
- width: 150rpx;
- height: 90rpx;
- background: #f1f1f1;
- border-style: solid;
- border-color: #26b3a0;
- border-width: 3px;
- border-radius: 6px;
- }
- }
- .gpt-select {
- padding: 30rpx;
- .gpt-textarea-container {
- margin-top: 20rpx;
- }
- .use-gpt {
- margin-top: 30rpx;
- }
- }
- </style>
|