|
@@ -25,34 +25,141 @@
|
|
inactiveColor="#FFFFFF" activeColor="#357aba"></tn-subsection>
|
|
inactiveColor="#FFFFFF" activeColor="#357aba"></tn-subsection>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view class="directask">
|
|
|
|
- <view v-if="modelslist.length>0" class="cu-form-group">
|
|
|
|
|
|
+ <view class="ysBox" v-if="current==0">
|
|
|
|
+ <div class="selBox">
|
|
|
|
+ <div class="title">
|
|
|
|
+ 模板选择
|
|
|
|
+ </div>
|
|
|
|
+ <div class="selList" @click.stop="">
|
|
|
|
+ <div class="item" v-for="(item,index) in selOptList" @click.stop="handleOpenOpt(index)">
|
|
|
|
+ {{item}}
|
|
|
|
+ <img src="@/static/arrD.png" alt="" class="arrD" />
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="optDetailBox" v-if="showRule" @click.stop="closeOver">
|
|
|
|
+ <div class="con" @click.stop="">
|
|
|
|
+ <div class="optList" @click.stop="">
|
|
|
|
+ <div class="item" @click.stop="handleOrder(item,index)" v-for="(item,index) in rules"
|
|
|
|
+ :class="[item==seledRule?'item_a':'']">
|
|
|
|
+ {{item}}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="optDetailBox" v-if="showThem" @click.stop="closeOver">
|
|
|
|
+ <div class="con" @click.stop="">
|
|
|
|
+ <div class="optList" @click.stop="">
|
|
|
|
+ <div class="item" @click.stop="handleSelStyle(item)" v-for="(item,index) in styles"
|
|
|
|
+ :class="[item.id==seledStyle.id?'item_a':'']">
|
|
|
|
+ {{item.title}}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="optDetailBox" v-if="showAvail" @click.stop="closeOver">
|
|
|
|
+ <div class="con" @click.stop="">
|
|
|
|
+ <div class="optList" @click.stop="">
|
|
|
|
+ <div class="item" @click.stop="seledAvail=item" v-for="(item,index) in availables"
|
|
|
|
+ :class="[item==seledAvail?'item_a':'']">
|
|
|
|
+ {{item}}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="conList">
|
|
|
|
+ <div class="item" v-for="(item,index) in cankaoImgList.slice(0,8)"
|
|
|
|
+ @click="seledCankaoImg=item;seledCankaoImg_temp=item;myModal=item.path;">
|
|
|
|
+ <div class="top" :class="[item.id==seledCankaoImg.id?'item_a':'']"
|
|
|
|
+ :style="{backgroundImage:`url(${item.path})`}">
|
|
|
|
+ <img v-if="item.id==seledCankaoImg.id" src="@/static/b_seled.png" alt="" class="tag" />
|
|
|
|
+ </div>
|
|
|
|
+ <div class="name">
|
|
|
|
+ {{item.title}}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="moreBtn" @click="handleMorePopup">
|
|
|
|
+ 更多
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <div class="upTitle">
|
|
|
|
+ 上传图片
|
|
|
|
+ </div>
|
|
|
|
+ <div class="upList">
|
|
|
|
+ <div class="upBox">
|
|
|
|
+ <div class="up1 up " @click.stop="upYsImg(0)" :class="[myModal?'up_a':'']"
|
|
|
|
+ :style="{'background-image':`url(${myModal})`}">
|
|
|
|
+ <span v-if="!myModal&&!showUpLoading1">上传模板图</span>
|
|
|
|
+ <img src="@/static/b_camera.png" alt="" class="camera" />
|
|
|
|
+
|
|
|
|
+ <div v-if="myModal" class="del" @click.stop="myModal='';">
|
|
|
|
+ <u-icon name="trash" @click.stop="myModal='';" color="#1F79F0" size="20"></u-icon>
|
|
|
|
+ </div>
|
|
|
|
+ <u-loading-icon v-if="showUpLoading1" class="loading" text='' textSize="18" mode="circle"
|
|
|
|
+ vertical duration="1000"></u-loading-icon>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="des">
|
|
|
|
+ 上传模板图
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="upBox">
|
|
|
|
+ <div class="up2 up" :class="[myPhoto?'up_a':'']" :style="{'background-image':`url(${myPhoto})`}"
|
|
|
|
+ @click.stop="upYsImg(1)">
|
|
|
|
+ <span v-if="!myPhoto&&!showUpLoading2">上传照片</span>
|
|
|
|
+ <img src="@/static/b_camera.png" alt="" class="camera" />
|
|
|
|
+
|
|
|
|
+ <div v-if="myPhoto" class="del" @click.stop="myPhoto=''">
|
|
|
|
+ <u-icon @click.stop="myPhoto=''" name="trash" color="#1F79F0" size="20"></u-icon>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <u-loading-icon v-if="showUpLoading2" class="loading" text='' textSize="18" mode="circle"
|
|
|
|
+ vertical duration="1000"></u-loading-icon>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="des">
|
|
|
|
+ 上传照片
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="tipBox">
|
|
|
|
+ <img src="@/static/b_info.png" alt="" />
|
|
|
|
+ 模板可直接选择上面的现成模板,可点击自己上传
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="ysBtn" @click="genYishuZhao">
|
|
|
|
+ 生成艺术照
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+ <view class="directask" v-if="current!=0">
|
|
|
|
+ <!-- <view v-if="modelslist.length>0" class="cu-form-group"> -->
|
|
|
|
+ <view class="cu-form-group">
|
|
<view class="cu-title flxe align-center justify-between">
|
|
<view class="cu-title flxe align-center justify-between">
|
|
<view class="title flxe align-center">模型选择</view>
|
|
<view class="title flxe align-center">模型选择</view>
|
|
- <block v-if="showmj">
|
|
|
|
|
|
+ <block v-if="showmj==1">
|
|
<u-tag v-if="userData.vip_info&&userData.is_validity>0"
|
|
<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+'次')"
|
|
: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="#207CF7" borderColor="#207CF7"
|
|
plain shape="circle" plainFill color="#207CF7" borderColor="#207CF7"
|
|
bgColor="#207CF714"></u-tag>
|
|
bgColor="#207CF714"></u-tag>
|
|
</block>
|
|
</block>
|
|
- <block v-else>
|
|
|
|
|
|
+ <block v-else-if="showmj==2">
|
|
<u-tag v-if="userData.vip_info&&userData.is_validity>0"
|
|
<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+'次')"
|
|
: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="#207CF7" borderColor="#207CF7"
|
|
plain shape="circle" plainFill color="#207CF7" borderColor="#207CF7"
|
|
bgColor="#207CF714"></u-tag>
|
|
bgColor="#207CF714"></u-tag>
|
|
</block>
|
|
</block>
|
|
</view>
|
|
</view>
|
|
- <view class="engine-container" @click="showmode = true" v-if="current==0">
|
|
|
|
|
|
+ <view class="engine-container" @click="showmode = true" v-if="current==2">
|
|
<view class="model_view">模型:{{xzmodels}}</view>
|
|
<view class="model_view">模型:{{xzmodels}}</view>
|
|
<u-icon name="arrow-down-fill" color="#9e9e9e"></u-icon>
|
|
<u-icon name="arrow-down-fill" color="#9e9e9e"></u-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- mj模型选择新调整 -->
|
|
<!-- mj模型选择新调整 -->
|
|
<view class="mjSelBox" v-if="current==1">
|
|
<view class="mjSelBox" v-if="current==1">
|
|
- <!-- <view class="mjitem" v-for="(item,index) in modelslist"
|
|
|
|
- @click="modelsid = index,showmode = false,form.model_id = item.model_id.toString(),xzmodels = item.name,form.name = item.name"
|
|
|
|
- :style="{'border-color':index==modelsid?'#1F79F0':'','background-image':`url(${item.imgs[0]})`}"> -->
|
|
|
|
-
|
|
|
|
<view class="mjitem" v-for="(item,index) in modelslist"
|
|
<view class="mjitem" v-for="(item,index) in modelslist"
|
|
@click="modelsid = index,showmode = false,form.model_id = item.model_id.toString(),xzmodels = item.name,form.name = item.name"
|
|
@click="modelsid = index,showmode = false,form.model_id = item.model_id.toString(),xzmodels = item.name,form.name = item.name"
|
|
:style="{'border-color':index==modelsid?'#1F79F0':'','background-image':`url(${item.title=='官方V5.1'?'../../static/scy.png':'../../static/ecy.png'})`}">
|
|
:style="{'border-color':index==modelsid?'#1F79F0':'','background-image':`url(${item.title=='官方V5.1'?'../../static/scy.png':'../../static/ecy.png'})`}">
|
|
@@ -70,7 +177,6 @@
|
|
<view class="cu-form-group" :style="engineid != 0 ? 'margin-top: 20rpx' : ''">
|
|
<view class="cu-form-group" :style="engineid != 0 ? 'margin-top: 20rpx' : ''">
|
|
<view class="cu-title flxe align-center justify-between">
|
|
<view class="cu-title flxe align-center justify-between">
|
|
<view class="title flxe align-center">画面描述</view>
|
|
<view class="title flxe align-center">画面描述</view>
|
|
- <!-- <u-icon @click="keywords = '',galleryid =''" name="trash-fill" color="#9e9e9e" size="24"></u-icon> -->
|
|
|
|
</view>
|
|
</view>
|
|
<view class="textarea-container">
|
|
<view class="textarea-container">
|
|
<textarea class="textarea" v-model="keywords" cursor-spacing="30rpx" :maxlength="500"
|
|
<textarea class="textarea" v-model="keywords" cursor-spacing="30rpx" :maxlength="500"
|
|
@@ -86,18 +192,8 @@
|
|
<u-icon @click="keywords = '',galleryid ='',cursor = 0" name="trash-fill" color="#9e9e9e"
|
|
<u-icon @click="keywords = '',galleryid ='',cursor = 0" name="trash-fill" color="#9e9e9e"
|
|
size="24"></u-icon>
|
|
size="24"></u-icon>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
</view>
|
|
</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"> -->
|
|
|
|
<view v-if="gallerylist.length>0" class="try-tips">
|
|
<view v-if="gallerylist.length>0" class="try-tips">
|
|
<scroll-view class="scroll-view" scroll-x="true">
|
|
<scroll-view class="scroll-view" scroll-x="true">
|
|
<block v-for="(item,index) in gallerylist" :key="index">
|
|
<block v-for="(item,index) in gallerylist" :key="index">
|
|
@@ -110,47 +206,11 @@
|
|
<view class="change" @click="initWords"><text class="tn-icon-circle-arrow tn-color-cat"
|
|
<view class="change" @click="initWords"><text class="tn-icon-circle-arrow tn-color-cat"
|
|
style="font-size: 34rpx;"></text></view>
|
|
style="font-size: 34rpx;"></text></view>
|
|
</view>
|
|
</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">
|
|
|
|
|
|
+ <!-- sd展示 -->
|
|
|
|
+ <view v-if="showmj==2" class="cu-form-group">
|
|
<view class="cu-title">
|
|
<view class="cu-title">
|
|
<view class="title flxe align-center">图片比例</view>
|
|
<view class="title flxe align-center">图片比例</view>
|
|
</view>
|
|
</view>
|
|
@@ -176,16 +236,9 @@
|
|
</view>
|
|
</view>
|
|
<view class="describe">4:3</view>
|
|
<view class="describe">4:3</view>
|
|
</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>
|
|
</view>
|
|
|
|
+ <!-- sd和mj都要展示 -->
|
|
<view class="cu-form-group">
|
|
<view class="cu-form-group">
|
|
<view class="cu-title">
|
|
<view class="cu-title">
|
|
<view class="title flxe align-center">参考图(可选)</view>
|
|
<view class="title flxe align-center">参考图(可选)</view>
|
|
@@ -202,62 +255,40 @@
|
|
</view>
|
|
</view>
|
|
</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="#207CF7" blockColor="#207CF7" min="0" max="100"></u-slider>
|
|
|
|
- <u-slider v-else v-model="form.init_strength" showValue activeColor="#207CF7" blockColor="#207CF7" min="0" max="70"></u-slider>
|
|
|
|
- </view> -->
|
|
|
|
- <view class="cu-form-group">
|
|
|
|
|
|
+ <!-- sd和mj都要展示 -->
|
|
|
|
+ <view class="cu-form-group" v-if="current!=0">
|
|
<view class="cu-title">
|
|
<view class="cu-title">
|
|
<view class="title flxe align-center">生成数量</view>
|
|
<view class="title flxe align-center">生成数量</view>
|
|
</view>
|
|
</view>
|
|
<view class="flxe generate">
|
|
<view class="flxe generate">
|
|
- <block v-if="!showmj">
|
|
|
|
|
|
+ <block v-if="showmj==2">
|
|
<view class="xz_generate flxe align-center justify-center"
|
|
<view class="xz_generate flxe align-center justify-center"
|
|
:class="form.samples == 1 ? 'xz_gactive' : ''" @click="form.samples = 1">
|
|
:class="form.samples == 1 ? 'xz_gactive' : ''" @click="form.samples = 1">
|
|
<view :style="{color: form.samples == 1 ? '#207CF7':''}">1张</view>
|
|
<view :style="{color: form.samples == 1 ? '#207CF7':''}">1张</view>
|
|
|
|
|
|
</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 ? '#207CF7':''}">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 ? '#207CF7':''}">3张</view>
|
|
|
|
-
|
|
|
|
- </view> -->
|
|
|
|
</block>
|
|
</block>
|
|
- <block v-else>
|
|
|
|
|
|
+ <block v-else-if="showmj==1">
|
|
<view class="xz_generate flxe align-center justify-center"
|
|
<view class="xz_generate flxe align-center justify-center"
|
|
:class="form.samples == 4 ? 'xz_gactive' : ''" @click="form.samples = 4">
|
|
:class="form.samples == 4 ? 'xz_gactive' : ''" @click="form.samples = 4">
|
|
<view :style="{color: form.samples == 4 ? '#207CF7':''}">4张</view>
|
|
<view :style="{color: form.samples == 4 ? '#207CF7':''}">4张</view>
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</block>
|
|
-
|
|
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
</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>
|
|
- <view class="dygbhg">
|
|
|
|
- <navigator class="whole" open-type="navigateBack">退出</navigator>
|
|
|
|
|
|
|
|
- <block v-if="showmj">
|
|
|
|
|
|
+ <!-- 底部按钮区域 -->
|
|
|
|
+ <view class="dygbhg" v-if="current!=0">
|
|
|
|
+ <navigator class="whole" open-type="navigateBack">退出</navigator>
|
|
|
|
+ <block v-if="showmj==1">
|
|
<view
|
|
<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"
|
|
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>
|
|
@click="createClick" class="distinguish">立即生成</view>
|
|
<view v-else @click="createClick" class="distinguish">生成 |
|
|
<view v-else @click="createClick" class="distinguish">生成 |
|
|
需要消耗{{ plan.unlock_mj_aipainting}}{{appInfo.number_alias ? appInfo.number_alias : '点数'}}</view>
|
|
需要消耗{{ plan.unlock_mj_aipainting}}{{appInfo.number_alias ? appInfo.number_alias : '点数'}}</view>
|
|
</block>
|
|
</block>
|
|
- <block v-else>
|
|
|
|
|
|
+ <block v-else-if="showmj==2">
|
|
<view
|
|
<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"
|
|
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>
|
|
@click="createClick" class="distinguish">立即生成</view>
|
|
@@ -265,9 +296,6 @@
|
|
需要消耗{{ plan.unlock_aipainting*form.samples}}{{appInfo.number_alias ? appInfo.number_alias : '点数'}}
|
|
需要消耗{{ plan.unlock_aipainting*form.samples}}{{appInfo.number_alias ? appInfo.number_alias : '点数'}}
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</block>
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<u-loading-page :loading="loading" loading-text="正在加载" icon-size="35" bgColor="#1a1a1a" color="#fff"
|
|
<u-loading-page :loading="loading" loading-text="正在加载" icon-size="35" bgColor="#1a1a1a" color="#fff"
|
|
@@ -311,6 +339,38 @@
|
|
<u-button type="success" @click="setGpt" plain text="使用" shape="circle" v-if="gpt_text"></u-button>
|
|
<u-button type="success" @click="setGpt" plain text="使用" shape="circle" v-if="gpt_text"></u-button>
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
</u-popup>
|
|
|
|
+
|
|
|
|
+ <u-popup :closeOnClickOverlay="true" :show="showMorePopup" @close="showMorePopup = false" mode="bottom"
|
|
|
|
+ :round="10" :closeable="false" safeAreaInsetTop>
|
|
|
|
+ <div class="cankaoImgBox">
|
|
|
|
+ <div class="top">
|
|
|
|
+ <div class="title">
|
|
|
|
+ 模板选择
|
|
|
|
+ </div>
|
|
|
|
+ <img src="@/static/b_info.png" alt="" />
|
|
|
|
+ <span>选择后直接作为生成照片参照</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="conList">
|
|
|
|
+ <div class="item" v-for="(item,index) in cankaoImgList" @click="seledCankaoImg_temp=item">
|
|
|
|
+ <div class="top" :class="[item.id==seledCankaoImg_temp.id?'item_a':'']"
|
|
|
|
+ :style="{backgroundImage:`url(${item.path})`}">
|
|
|
|
+ <img v-if="item.id==seledCankaoImg_temp.id" src="@/static/b_seled.png" alt="" class="tag" />
|
|
|
|
+ </div>
|
|
|
|
+ <div class="name">
|
|
|
|
+ {{item.title}}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="btnBox">
|
|
|
|
+ <div class="left" @click="showMorePopup=false">
|
|
|
|
+ 取消
|
|
|
|
+ </div>
|
|
|
|
+ <div class="right" @click="handleConfirmSel">
|
|
|
|
+ 确定
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </u-popup>
|
|
<wike-model v-if="signShow" :authorize="false" :title="signTitle" btnText="立即获取" @save="signSign"
|
|
<wike-model v-if="signShow" :authorize="false" :title="signTitle" btnText="立即获取" @save="signSign"
|
|
@close="signShow = false"></wike-model>
|
|
@close="signShow = false"></wike-model>
|
|
<wike-modal-qrcode :qrcode="gzhqrcode" :showconcern="showconcern"
|
|
<wike-modal-qrcode :qrcode="gzhqrcode" :showconcern="showconcern"
|
|
@@ -337,6 +397,50 @@
|
|
components: {},
|
|
components: {},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ // 艺术照
|
|
|
|
+ showUpLoading1: false,
|
|
|
|
+ showUpLoading2: false,
|
|
|
|
+ // modal: '',
|
|
|
|
+ myModal: '',
|
|
|
|
+ myPhoto: '',
|
|
|
|
+
|
|
|
|
+ selOptList: [
|
|
|
|
+ '排序规则',
|
|
|
|
+ '主题风格',
|
|
|
|
+ // '是否可用',
|
|
|
|
+ ],
|
|
|
|
+
|
|
|
|
+ cankaoImgList: [],
|
|
|
|
+ seledCankaoImg: null,
|
|
|
|
+ seledCankaoImg_temp: {
|
|
|
|
+ id: -1
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ rules: [
|
|
|
|
+ '降序',
|
|
|
|
+ '升序',
|
|
|
|
+ ],
|
|
|
|
+ seledRule: '降序',
|
|
|
|
+
|
|
|
|
+ styles: [
|
|
|
|
+
|
|
|
|
+ ],
|
|
|
|
+ seledStyle: '国风',
|
|
|
|
+
|
|
|
|
+ availables: [
|
|
|
|
+ '是',
|
|
|
|
+ '否',
|
|
|
|
+ ],
|
|
|
|
+ seledAvail: '是',
|
|
|
|
+
|
|
|
|
+ showRule: false,
|
|
|
|
+ showThem: false,
|
|
|
|
+ showAvail: false,
|
|
|
|
+
|
|
|
|
+ showMorePopup: false,
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
showHuiHuaLead: false,
|
|
showHuiHuaLead: false,
|
|
showLead2: false,
|
|
showLead2: false,
|
|
showLead1: true,
|
|
showLead1: true,
|
|
@@ -353,20 +457,6 @@
|
|
gpt_text: '',
|
|
gpt_text: '',
|
|
cursor: 0,
|
|
cursor: 0,
|
|
form: {
|
|
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: '',
|
|
name: '',
|
|
init_image: '',
|
|
init_image: '',
|
|
prompt: '',
|
|
prompt: '',
|
|
@@ -417,7 +507,11 @@
|
|
cos_id: 0,
|
|
cos_id: 0,
|
|
refer_img: '',
|
|
refer_img: '',
|
|
refer_id: 0,
|
|
refer_id: 0,
|
|
- engine: 'sd',
|
|
|
|
|
|
+ // engine: 'sd',
|
|
|
|
+ engine: 'ys',
|
|
|
|
+ showmj: 0,
|
|
|
|
+ current: 0,
|
|
|
|
+
|
|
engineid: 0,
|
|
engineid: 0,
|
|
needCoin: 0,
|
|
needCoin: 0,
|
|
gallerylist: [],
|
|
gallerylist: [],
|
|
@@ -429,15 +523,14 @@
|
|
noticebar: ['精美图片需要时间打磨,预计20秒-120秒出图',
|
|
noticebar: ['精美图片需要时间打磨,预计20秒-120秒出图',
|
|
// '图片生成中请不要退出,否则可能会生成失败'
|
|
// '图片生成中请不要退出,否则可能会生成失败'
|
|
],
|
|
],
|
|
- tabslist: ['StableDiffusion绘图', 'MidJourney绘图'],
|
|
|
|
|
|
+ tabslist: ['艺术照', 'MJ绘图', 'SD绘图'],
|
|
curNow: 0,
|
|
curNow: 0,
|
|
cardswiper: [
|
|
cardswiper: [
|
|
'https://cos.iseeds.xyz/cover/3.0-1.jpg',
|
|
'https://cos.iseeds.xyz/cover/3.0-1.jpg',
|
|
'https://cos.iseeds.xyz/cover/hhjmix-3.png',
|
|
'https://cos.iseeds.xyz/cover/hhjmix-3.png',
|
|
'https://cos.iseeds.xyz/style/gufeng1.png',
|
|
'https://cos.iseeds.xyz/style/gufeng1.png',
|
|
],
|
|
],
|
|
- showmj: false,
|
|
|
|
- current: 1,
|
|
|
|
|
|
+
|
|
showconcern: false,
|
|
showconcern: false,
|
|
gzhqrcode: '',
|
|
gzhqrcode: '',
|
|
proportion: ''
|
|
proportion: ''
|
|
@@ -446,13 +539,19 @@
|
|
computed: {
|
|
computed: {
|
|
...mapGetters(['appInfo', 'homeTemplate', 'userInfo', 'isLogin', 'userData'])
|
|
...mapGetters(['appInfo', 'homeTemplate', 'userInfo', 'isLogin', 'userData'])
|
|
},
|
|
},
|
|
- onLoad() {
|
|
|
|
|
|
+ async onLoad() {
|
|
|
|
+
|
|
|
|
+ console.log('isLogin================', this.isLogin);
|
|
|
|
+ this.getTempLiast({
|
|
|
|
+ init: true
|
|
|
|
+ })
|
|
|
|
+
|
|
this.showHuiHuaLead = !uni.getStorageSync('showHuiHuaLead')
|
|
this.showHuiHuaLead = !uni.getStorageSync('showHuiHuaLead')
|
|
console.log("uni.getStorageSync('showHuiHuaLead')", uni.getStorageSync('showHuiHuaLead'));
|
|
console.log("uni.getStorageSync('showHuiHuaLead')", uni.getStorageSync('showHuiHuaLead'));
|
|
|
|
|
|
// mj优先展示
|
|
// mj优先展示
|
|
this.getsubsection({
|
|
this.getsubsection({
|
|
- index: 1
|
|
|
|
|
|
+ index: 0
|
|
})
|
|
})
|
|
|
|
|
|
if (this.platform == 'wxMiniProgram') {
|
|
if (this.platform == 'wxMiniProgram') {
|
|
@@ -533,6 +632,179 @@
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...mapActions(['appInit', 'logout', 'getUserInfo', 'getUserData']),
|
|
...mapActions(['appInit', 'logout', 'getUserInfo', 'getUserData']),
|
|
|
|
+ handleOrder(item, index) {
|
|
|
|
+ this.seledRule = item
|
|
|
|
+ this.showRule = false
|
|
|
|
+ this.getTempLiast({
|
|
|
|
+ init: false,
|
|
|
|
+ order: index
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ async getTempLiast(p = {}) {
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '模板加载中...'
|
|
|
|
+ })
|
|
|
|
+ let res = await this.$http('ys.templateList', p)
|
|
|
|
+
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
+ this.cankaoImgList = res.msg.data
|
|
|
|
+ this.styles = res.msg.style
|
|
|
|
+ if (p.init) {
|
|
|
|
+ this.seledStyle = res.msg.style[0]
|
|
|
|
+ }
|
|
|
|
+ this.seledCankaoImg = this.cankaoImgList[0]
|
|
|
|
+ this.seledCankaoImg_temp = this.cankaoImgList[0]
|
|
|
|
+ this.myModal = this.cankaoImgList[0].path
|
|
|
|
+
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ console.log('艺术照模板列表返回值---', this.cankaoImgList, res);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ handleSelStyle(item) {
|
|
|
|
+ this.seledStyle = item
|
|
|
|
+ this.showThem = false
|
|
|
|
+ this.getTempLiast({
|
|
|
|
+ styleId: item.id,
|
|
|
|
+ init: false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ async genYishuZhao() {
|
|
|
|
+ if (!this.myModal) {
|
|
|
|
+ return uni.showToast({
|
|
|
|
+ title: '请上传模板图',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ if (!this.myPhoto) {
|
|
|
|
+ return uni.showToast({
|
|
|
|
+ title: '请上传照片',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!uni.getStorageSync('token')) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/user/signin'
|
|
|
|
+ });
|
|
|
|
+ uni.setStorageSync('route', '/pages/painting/draw');
|
|
|
|
+ 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: #207CF7;padding: 0 4px;'>" +
|
|
|
|
+ 1 + "</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 +
|
|
|
|
+ "</span>吧</p>"
|
|
|
|
+ this.signShow = true
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ let p = {
|
|
|
|
+ templateUrl: this.myModal,
|
|
|
|
+ userUrl: this.myPhoto,
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ getApp().ysParmas = p
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ // url: '/pages/painting/ys?ysParmas=' + JSON.stringify(p),
|
|
|
|
+ url: '/pages/painting/ys',
|
|
|
|
+ })
|
|
|
|
+ console.log('生成艺术照参数', p);
|
|
|
|
+ },
|
|
|
|
+ upYsImg(type) {
|
|
|
|
+ let that = this;
|
|
|
|
+ uni.chooseImage({
|
|
|
|
+ count: 1,
|
|
|
|
+ sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
|
|
+ sourceType: ['album'], //从相册选择
|
|
|
|
+ success: function(res) {
|
|
|
|
+ console.log('上传参考图返回值:', res.tempFiles[0].name, res.tempFiles[0].name.toLowerCase());
|
|
|
|
+ if (!(res.tempFiles[0].name.toLowerCase().endsWith('.png') || res.tempFiles[0].name
|
|
|
|
+ .toLowerCase().endsWith(
|
|
|
|
+ '.jpeg') || res.tempFiles[0].name.toLowerCase().endsWith('.jpg'))) {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '上传失败,请上传png、jpg和jpeg格式的图片',
|
|
|
|
+ icon: 'none',
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ const path = res.tempFilePaths[0];
|
|
|
|
+ if (type == 0) {
|
|
|
|
+ that.showUpLoading1 = true
|
|
|
|
+ } else {
|
|
|
|
+ that.showUpLoading2 = true
|
|
|
|
+ }
|
|
|
|
+ uni.uploadFile({
|
|
|
|
+ url: apiurl('common/upload'),
|
|
|
|
+ filePath: path,
|
|
|
|
+ name: 'file',
|
|
|
|
+ formData: {
|
|
|
|
+ accept: 'image',
|
|
|
|
+ upload_type: 'ali-oss'
|
|
|
|
+ },
|
|
|
|
+ success: res2 => {
|
|
|
|
+ let a = JSON.parse(res2.data);
|
|
|
|
+ if (a.code == 0) {
|
|
|
|
+ console.log('JSON.parse(res2.data)', a);
|
|
|
|
+ if (type == 0) {
|
|
|
|
+ that.seledCankaoImg = {
|
|
|
|
+ id: -1
|
|
|
|
+ }
|
|
|
|
+ that.myModal = a.data.path;
|
|
|
|
+ that.showUpLoading1 = false
|
|
|
|
+ } else {
|
|
|
|
+ that.myPhoto = a.data.path;
|
|
|
|
+ that.showUpLoading2 = false
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '上传图片失败',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ handleConfirmSel() {
|
|
|
|
+ this.showMorePopup = false
|
|
|
|
+ this.seledCankaoImg = this.seledCankaoImg_temp
|
|
|
|
+ // this.modal = ''
|
|
|
|
+ this.myModal = this.seledCankaoImg_temp.path
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ handleMorePopup() {
|
|
|
|
+ this.showMorePopup = true
|
|
|
|
+ },
|
|
|
|
+ closeOver() {
|
|
|
|
+ this.showRule = false
|
|
|
|
+ this.showThem = false
|
|
|
|
+ this.showAvail = false
|
|
|
|
+ },
|
|
|
|
+ handleOpenOpt(index) {
|
|
|
|
+ if (index == 0) {
|
|
|
|
+ this.showRule = !this.showRule
|
|
|
|
+ this.showThem = false
|
|
|
|
+ this.showAvail = false
|
|
|
|
+
|
|
|
|
+ } else if (index == 1) {
|
|
|
|
+ this.showRule = false
|
|
|
|
+ this.showThem = !this.showThem
|
|
|
|
+ this.showAvail = false
|
|
|
|
+ } else if (index == 2) {
|
|
|
|
+ this.showRule = false
|
|
|
|
+ this.showThem = false
|
|
|
|
+ this.showAvail = !this.showAvail
|
|
|
|
+ }
|
|
|
|
+ console.log('index============', index, this.showRule, this.showThem, this.showAvail);
|
|
|
|
+ },
|
|
nextLead() {
|
|
nextLead() {
|
|
this.showLead1 = false
|
|
this.showLead1 = false
|
|
this.showLead2 = true
|
|
this.showLead2 = true
|
|
@@ -570,19 +842,23 @@
|
|
this.showconcern = false
|
|
this.showconcern = false
|
|
},
|
|
},
|
|
getsubsection(e) {
|
|
getsubsection(e) {
|
|
- // if (this.keywords) {
|
|
|
|
- // this.keywords = ''
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
- this.showmj = e.index == 1 ? true : false
|
|
|
|
|
|
+ this.showmj = e.index
|
|
this.current = e.index
|
|
this.current = e.index
|
|
|
|
+
|
|
|
|
+ console.log('this.current---------------', this.current);
|
|
this.modelsid = 0
|
|
this.modelsid = 0
|
|
- if (e.index == 1) {
|
|
|
|
|
|
+ if (e.index == 0) {
|
|
|
|
+ // 新增艺术照类型
|
|
|
|
+ this.form.samples = 1
|
|
|
|
+ this.engine = 'ys'
|
|
|
|
+ this.modelslist = []
|
|
|
|
+ this.getModels();
|
|
|
|
+ } else if (e.index == 1) {
|
|
this.form.samples = 4
|
|
this.form.samples = 4
|
|
this.engine = 'mj'
|
|
this.engine = 'mj'
|
|
this.modelslist = []
|
|
this.modelslist = []
|
|
this.getModels();
|
|
this.getModels();
|
|
- } else {
|
|
|
|
|
|
+ } else if (e.index == 2) {
|
|
this.form.samples = 1
|
|
this.form.samples = 1
|
|
this.engine = 'sd'
|
|
this.engine = 'sd'
|
|
this.modelslist = []
|
|
this.modelslist = []
|
|
@@ -690,21 +966,20 @@
|
|
});
|
|
});
|
|
if (that.engine == "mj") {
|
|
if (that.engine == "mj") {
|
|
this.modelslist = res.data.reverse()
|
|
this.modelslist = res.data.reverse()
|
|
|
|
+ } else if (that.engine == "sd") {
|
|
|
|
+ this.modelslist = res.data
|
|
} else {
|
|
} else {
|
|
this.modelslist = res.data
|
|
this.modelslist = res.data
|
|
}
|
|
}
|
|
this.form.model_id = this.modelslist[this.modelsid].model_id.toString()
|
|
this.form.model_id = this.modelslist[this.modelsid].model_id.toString()
|
|
this.form.name = this.modelslist[this.modelsid].name
|
|
this.form.name = this.modelslist[this.modelsid].name
|
|
- // this.needCoin = this.modelslist[this.modelsid].coin
|
|
|
|
this.xzmodels = this.modelslist[this.modelsid].name
|
|
this.xzmodels = this.modelslist[this.modelsid].name
|
|
- // console.log(this.modelslist);
|
|
|
|
|
|
+
|
|
if (this.$Route.query.model_name) {
|
|
if (this.$Route.query.model_name) {
|
|
for (var ty = 0; ty < this.modelslist.length; ty++) {
|
|
for (var ty = 0; ty < this.modelslist.length; ty++) {
|
|
if (this.$Route.query.model_name == this.modelslist[ty].name) {
|
|
if (this.$Route.query.model_name == this.modelslist[ty].name) {
|
|
- // console.log(ty);
|
|
|
|
this.modelsid = ty
|
|
this.modelsid = ty
|
|
this.form.model_id = this.modelslist[ty].model_id.toString()
|
|
this.form.model_id = this.modelslist[ty].model_id.toString()
|
|
- // this.needCoin = this.modelslist[ty].coin
|
|
|
|
this.xzmodels = this.modelslist[ty].name
|
|
this.xzmodels = this.modelslist[ty].name
|
|
this.form.name = this.modelslist[ty].name
|
|
this.form.name = this.modelslist[ty].name
|
|
}
|
|
}
|
|
@@ -819,163 +1094,127 @@
|
|
this.keywords = this.keywords ? this.keywords + ',' + e : e;
|
|
this.keywords = this.keywords ? this.keywords + ',' + e : e;
|
|
},
|
|
},
|
|
async createClick() {
|
|
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: #207CF7;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) {
|
|
|
|
- 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.plan.unlock_mj_aipainting + "</span><span>" + alias +
|
|
|
|
- "</span></p><p style='padding-top: 10px;'>您的绘画<span>" + alias +
|
|
|
|
- "</span>不足或会员套餐内剩余次数不足,无法生成绘画</p>"
|
|
|
|
- this.signShow = true
|
|
|
|
- return;
|
|
|
|
|
|
+ if (this.current != 0) {
|
|
|
|
+ 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 == 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 < 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: #207CF7;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) {
|
|
|
|
+ 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.plan.unlock_mj_aipainting + "</span><span>" + alias +
|
|
|
|
+ "</span></p><p style='padding-top: 10px;'>您的绘画<span>" + alias +
|
|
|
|
+ "</span>不足或会员套餐内剩余次数不足,无法生成绘画</p>"
|
|
|
|
+ this.signShow = true
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ } else if (that.showmj == 2) {
|
|
|
|
+ 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: #207CF7;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: #207CF7;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 {
|
|
} else {
|
|
- 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)) {
|
|
|
|
|
|
+ if (that.showmj == 1 && this.userData.coin < this.plan.unlock_mj_aipainting) {
|
|
var alias = that.appInfo.number_alias ? that.appInfo.number_alias : '点数';
|
|
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 =
|
|
this.signTitle =
|
|
- "<p style='font-weight: 550;font-size: 16px;'>绘画需要<span style='color: #207CF7;padding: 0 4px;'>" +
|
|
|
|
- (this.plan.unlock_aipainting * this.form.samples) + "</span><span>" + alias +
|
|
|
|
- "</span></p><p style='padding-top: 10px;'>您的绘画<span>" + alias +
|
|
|
|
- "</span>不足或会员套餐内剩余次数不足,无法生成绘画</p>"
|
|
|
|
|
|
+ "<p style='font-weight: 550;font-size: 16px;'>mj绘画需要<span style='color: #207CF7;padding: 0 4px;'>" +
|
|
|
|
+ this.plan.unlock_mj_aipainting + "</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 +
|
|
|
|
+ "</span>吧</p>"
|
|
this.signShow = true
|
|
this.signShow = true
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (that.userData.is_validity == 0 && this.userData.coin < (this.plan.unlock_aipainting * this
|
|
|
|
- .form.samples)) {
|
|
|
|
|
|
+ if (that.showmj == 2 && this.userData.coin < (this.plan.unlock_aipainting * this.form
|
|
|
|
+ .samples)) {
|
|
var alias = that.appInfo.number_alias ? that.appInfo.number_alias : '点数';
|
|
var alias = that.appInfo.number_alias ? that.appInfo.number_alias : '点数';
|
|
this.signTitle =
|
|
this.signTitle =
|
|
- "<p style='font-weight: 550;font-size: 16px;'>绘画需要<span style='color: #207CF7;padding: 0 4px;'>" +
|
|
|
|
- (this.plan.unlock_aipainting * this.form.samples) + "</span><span>" + alias +
|
|
|
|
- "</span></p><p style='padding-top: 10px;'>您的绘画<span>" + alias +
|
|
|
|
- "</span>不足或会员套餐内剩余次数不足,无法生成绘画</p>"
|
|
|
|
|
|
+ "<p style='font-weight: 550;font-size: 16px;'>sd绘画需要<span style='color: #207CF7;padding: 0 4px;'>" +
|
|
|
|
+ this.plan.unlock_aipainting * this.form.samples + "</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 +
|
|
|
|
+ "</span>吧</p>"
|
|
this.signShow = true
|
|
this.signShow = true
|
|
return;
|
|
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: #207CF7;padding: 0 4px;'>" +
|
|
|
|
- this.plan.unlock_mj_aipainting + "</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 +
|
|
|
|
- "</span>吧</p>"
|
|
|
|
- this.signShow = true
|
|
|
|
|
|
+ if (!this.keywords) {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请输入画面描述词',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ });
|
|
return;
|
|
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: #207CF7;padding: 0 4px;'>" +
|
|
|
|
- this.plan.unlock_aipainting * this.form.samples + "</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 +
|
|
|
|
- "</span>吧</p>"
|
|
|
|
- this.signShow = true
|
|
|
|
|
|
+ if (!this.form.model_id) {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请选择绘图模型',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ });
|
|
return;
|
|
return;
|
|
|
|
+ } else {
|
|
|
|
+ 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.refer_img + ' ' + this.keywords);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // 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: #207CF7;padding: 0 4px;'>"+this.plan.unlock_mj_aipainting+"</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+"</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: #207CF7;padding: 0 4px;'>"+this.plan.unlock_aipainting*this.form.samples+"</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+"</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: '#207CF7',
|
|
|
|
- // 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) {
|
|
|
|
-
|
|
|
|
- // console.log('this.keywords', this.refer_img + ' ' + this.keywords);
|
|
|
|
- this.aiPlay(this.refer_img + ' ' + this.keywords);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- // uni.navigateTo({
|
|
|
|
- // url:'/pages/painting/generate'
|
|
|
|
- // })
|
|
|
|
},
|
|
},
|
|
getcheckText(e) {
|
|
getcheckText(e) {
|
|
var that = this;
|
|
var that = this;
|
|
@@ -1043,32 +1282,18 @@
|
|
console.log(that.form);
|
|
console.log(that.form);
|
|
|
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: that.showmj ? '/pages/painting/generate?prompt=' + (that.form.prompt + (that.proportion ?
|
|
|
|
|
|
+ url: that.showmj == 1 ? '/pages/painting/generate?prompt=' + (that.form.prompt + (that
|
|
|
|
+ .proportion ?
|
|
that.proportion : '')) +
|
|
that.proportion : '')) +
|
|
'&model_id=' + (that.modelslist.length > 0 ? this.form.model_id : '') + '&version=' + (that
|
|
'&model_id=' + (that.modelslist.length > 0 ? this.form.model_id : '') + '&version=' + (that
|
|
.modelslist.length > 0 ? that.modelslist[this.modelsid].version : '-- v5') +
|
|
.modelslist.length > 0 ? that.modelslist[this.modelsid].version : '-- v5') +
|
|
'&needCoin=' + that.plan.unlock_mj_aipainting +
|
|
'&needCoin=' + that.plan.unlock_mj_aipainting +
|
|
- `&refImg=${that.refer_img?that.refer_img:''}&keywords=${that.keywords}` :
|
|
|
|
|
|
+ `&refImg=${that.refer_img?that.refer_img:''}&keywords=${that.keywords}` : that.showmj ==
|
|
|
|
+ 2 ?
|
|
'/pages/painting/details?form=' + JSON
|
|
'/pages/painting/details?form=' + JSON
|
|
- .stringify(this.form)
|
|
|
|
|
|
+ .stringify(this.form) : '/pages/ys/ys'
|
|
});
|
|
});
|
|
console.log('创作相似url传递的参数:', this.form);
|
|
console.log('创作相似url传递的参数:', 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() {
|
|
close_blur_view() {
|
|
this.showcoin = false;
|
|
this.showcoin = false;
|