李万涛 1 年之前
父節點
當前提交
69939271f5

+ 4 - 2
common/config.js

xqd
@@ -1,7 +1,9 @@
 if (process.env.NODE_ENV === 'development') {
-	var baseImgUrl = 'https://t3.scxxq.cn/index.php/api.common/upload?uniacid=' + uni.getStorageSync('uniacid') || 5059
+	var baseImgUrl = 'https://t.scxxq.cn/index.php/api.common/upload?uniacid=' + uni.getStorageSync('uniacid') || 5059
 } else {
-	var baseImgUrl = 'https://t3.scxxq.cn/index.php/api.common/upload?uniacid=' + uni.getStorageSync('uniacid') || 5059
+	var baseImgUrl = 'https://t.scxxq.cn/index.php/api.common/upload?uniacid=' + uni.getStorageSync('uniacid') || 5059
+
+
 	// var baseImgUrl = 'https://nywhcm.com/addons/wike_aging/public/index.php/api.common/upload?uniacid=' + uni
 	// 	.getStorageSync('uniacid') || 5059
 }

+ 18 - 0
common/request/apis.js

xqd xqd xqd
@@ -36,6 +36,18 @@ export default {
 			method: "POST",
 		},
 	},
+	ys: {
+		templateList: {
+			url: "describe/getTemplateList",
+			auth: false,
+			method: "POST",
+		},
+		addFaceTask: {
+			url: "describe/addFaceTask",
+			auth: true,
+			method: "POST",
+		},
+	},
 	ai: {
 		digitCheckText: {
 			url: "digit/checkText",
@@ -111,6 +123,11 @@ export default {
 	},
 
 	robot: {
+		robotApplay: {
+			url: "user/robotApply",
+			auth: true,
+			method: "POST",
+		},
 		createRobot: {
 			url: "robot/createRobot",
 			auth: true,
@@ -130,6 +147,7 @@ export default {
 	},
 
 	digitalMen: {
+
 		workList: {
 			url: "Digit/list",
 			auth: false,

+ 4 - 4
common/request/request.js

xqd
@@ -26,15 +26,15 @@ if (process.env.NODE_ENV === 'development') {
 	var siteInfo = {
 		uniacid: uni.getStorageSync('uniacid') || 5059,
 		// siteroot: "https://meta.swdz.com/index.php/",
-		siteroot: "https://t3.scxxq.cn/index.php/",
-		root: "https://t3.scxxq.cn/",
+		siteroot: "https://t.scxxq.cn/index.php/",
+		root: "https://t.scxxq.cn/",
 	};
 } else {
 	var siteInfo = {
 		uniacid: uni.getStorageSync('uniacid') || 5059,
 		// siteroot: "https://meta.swdz.com/index.php/",
-		siteroot: "https://t3.scxxq.cn/index.php/",
-		root: "https://t3.scxxq.cn/",
+		siteroot: "https://t.scxxq.cn/index.php/",
+		root: "https://t.scxxq.cn/",
 	};
 	// var siteInfo = {
 	// 	uniacid: uni.getStorageSync('uniacid') || 5059,

+ 12 - 9
common/store/modules/user.js

xqd xqd xqd xqd xqd xqd xqd
@@ -8,11 +8,12 @@ import share from '@/common/share'
 const state = {
 	token: uni.getStorageSync("token") || "",
 	isLogin: uni.getStorageSync("isLogin") || false, // 是否登陆
+	// isLogin: uni.getStorageSync("token") ? true : false, // 是否登陆
 	userInfo: uni.getStorageSync("userInfo") || {}, // 用户信息
 	userData: {}, //用户其他相关数据
 	subscribeMessageIdsMap: [], //小程序订阅消息模板ids
-	authType: '' ,// smsLogin:手机号登录注册, accountLogin:密码登录, forgotPwd:忘记密码, changePwd:修改密码, bindMobile:绑定手机号
-	tabbarList:[]
+	authType: '', // smsLogin:手机号登录注册, accountLogin:密码登录, forgotPwd:忘记密码, changePwd:修改密码, bindMobile:绑定手机号
+	tabbarList: []
 }
 
 const getters = {
@@ -36,8 +37,8 @@ const actions = {
 		return new Promise((resolve, reject) => {
 			console.log(token);
 			token && uni.setStorageSync('token', token);
-			http('user.info').then(res => {		
-				// console.log(res);
+			http('user.info').then(res => {
+					// console.log(res);
 					if (res.code === 0) {
 						let lastLoginStatus = getters.isLogin;
 						commit('userInfo', res.data);
@@ -52,7 +53,7 @@ const actions = {
 							uni.removeStorageSync('spm');
 						}
 						resolve(res.data)
-					} 
+					}
 				}).then(() => {
 					// uni.showModal({
 					// 	title:'提示',
@@ -78,7 +79,7 @@ const actions = {
 		commit
 	}) {
 		return new Promise((resolve, reject) => {
-			http('user.userData').then(res => {				
+			http('user.userData').then(res => {
 				commit('USER_DATA', res.data);
 				resolve(res)
 			}).catch(e => {
@@ -134,7 +135,9 @@ const actions = {
 		commit,
 		state
 	}) {
-		http('conf.getGroupConf',{group:'system.notification'}).then(res => {
+		http('conf.getGroupConf', {
+			group: 'system.notification'
+		}).then(res => {
 			commit('formatMessage', res.data)
 			Promise.resolve(res.data)
 		}).catch(e => {
@@ -190,7 +193,7 @@ const mutations = {
 	formatMessage(state, messageIdsObj) {
 		// 各场景下用到的订阅模板
 		let typeMap = {
-			'unread_msg': ['pay_suc','examine_result','company_examine'],
+			'unread_msg': ['pay_suc', 'examine_result', 'company_examine'],
 			// 'order':['pay_suc','recommend','new_video']
 		}
 		let idsMap = {}
@@ -211,4 +214,4 @@ export default {
 	mutations,
 	actions,
 	getters
-}
+}

+ 20 - 0
pages.json

xqd
@@ -435,6 +435,26 @@
 				"disableSwipeBack": true
 			}
 
+		}, {
+			"path": "pages/painting/ys",
+			"style": {
+				"navigationBarTitleText": "",
+				"navigationStyle": "custom",
+				"enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#ffffff",
+				"disableSwipeBack": true
+			}
+
+		}, {
+			"path": "pages/haibao",
+			"style": {
+				"navigationBarTitleText": "",
+				"navigationStyle": "custom",
+				"enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#ffffff",
+				"disableSwipeBack": true
+			}
+
 		}
 	],
 	"globalStyle": {

+ 68 - 0
pages/digitalMen/generate/index.scss

xqd
@@ -1,6 +1,74 @@
 page {
 		// background: #f2f2f2;
 	}
+	
+	.addFix{
+		position: fixed;
+		// background: red;
+		height: 45px;
+		width: 100%;
+		
+		z-index: 9;
+	}
+	
+.leadBg{
+		position: absolute;
+		width: 100vw;
+		height: 100vh;
+		left: 0;
+		top: 0;
+		z-index: 9999;
+		background: rgba(0, 0, 0, .69);
+		// padding-left: 38rpx;
+		// padding-right: 38rpx;
+		
+		display: flex;
+		justify-content: center;
+		.leadBox1{
+			// margin-bottom: 138rpx;
+			width: 642rpx;
+			height: 748rpx;
+			background-image: url(@/static/szr_lead1.png);
+			background-size: cover;
+			margin-top: 280rpx;
+			position: relative;
+			
+			.nextBtn{
+				width: 350rpx;
+				height: 140rpx;
+				// background: red;
+				
+				position: absolute;
+				right: 0;
+				bottom:280rpx;
+			}
+		}
+		.leadBox2{
+			width: 674rpx;
+			// width: 100%;
+			height: 902rpx;
+			background-image: url(@/static/szr_lead2.png);
+			background-size: cover;
+			// margin-top: 400rpx;
+			// position: relative;
+			
+			margin-left: -60rpx;
+			position: absolute;
+			
+			bottom: 228rpx;
+			
+			.nextBtn{
+				width: 350rpx;
+				height: 140rpx;
+				// background: green;
+				position: absolute;
+				right: 0;
+				bottom:530rpx;
+			}
+		}
+	}		
+	
+	
 	.pos{
 		height: 45px;
 	}

+ 33 - 1
pages/digitalMen/generate/index.vue

xqd xqd xqd xqd xqd
@@ -1,6 +1,18 @@
 <template>
 	<view class="container">
 		<tn-nav-bar :isBack="true" backgroundColor="#fff" :bottomShadow="false">数字人创建</tn-nav-bar>
+		<div class="addFix" v-if="showInitLead">
+			<div class="leadBg">
+				<div class="leadBox1" v-if="showLead1">
+					<div class="nextBtn" @click="nextLead">
+					</div>
+				</div>
+				<div class="leadBox2" v-if="showLead2">
+					<div class="nextBtn" @click="finishLead">
+					</div>
+				</div>
+			</div>
+		</div>
 		<view class="pos">
 		</view>
 		<view class="context">
@@ -376,8 +388,9 @@
 
 		<!-- <view class="" style="height: 500rpx;width:300rpx !important;" :style='genResBgImg'>
 		</view> -->
-	</view>
 
+
+	</view>
 	</view>
 </template>
 
@@ -398,6 +411,10 @@
 	export default {
 		data() {
 			return {
+				showInitLead: false,
+				showLead2: false,
+				showLead1: true,
+
 				bobaoMenuList: ['输入播报文本', '上传播报录音文件'],
 				curBobaoIndex: 0,
 
@@ -553,6 +570,9 @@
 
 		},
 		onLoad(o) {
+			this.showInitLead = !uni.getStorageSync('showInitLead_szr2')
+			console.log("uni.getStorageSync('showInitLead')", uni.getStorageSync('showInitLead_szr2'));
+
 			if (o.type == 'create') {
 				this.isCreate = true
 				this.selRoleId = 5
@@ -695,6 +715,18 @@
 		},
 
 		methods: {
+			nextLead() {
+				this.showLead1 = false
+				this.showLead2 = true
+			},
+			finishLead() {
+				this.showInitLead = false
+				this.showLead2 = false
+				uni.setStorageSync('showInitLead_szr2', true)
+			},
+
+
+
 			handleChangeBobao(index) {
 				this.curBobaoIndex = index
 				// if (index == 0) {

+ 61 - 0
pages/digitalMen/index.scss

xqd
@@ -1,6 +1,67 @@
 page {
 		// background: #f2f2f2;
 	}
+	
+.leadBg{
+		position: absolute;
+		width: 100vw;
+		height: 100vh;
+		left: 0;
+		top: 0;
+		z-index: 9999;
+		background: rgba(0, 0, 0, .69);
+		// padding-left: 38rpx;
+		// padding-right: 38rpx;
+		
+		display: flex;
+		justify-content: center;
+		.leadBox1{
+			// margin-bottom: 138rpx;
+			width: 646rpx;
+			height: 842rpx;
+			background-image: url(@/static/szr_lead.png);
+			background-size: cover;
+			margin-top: 280rpx;
+			position: relative;
+			
+			.nextBtn{
+				width: 350rpx;
+				height: 140rpx;
+				// background: red;
+				
+				position: absolute;
+				right: 0;
+				bottom: 0rpx;
+			}
+		}
+		.leadBox2{
+			width: 634rpx;
+			// width: 100%;
+			height: 1226rpx;
+			background-image: url(@/static/index_lead2.png);
+			background-size: cover;
+			// margin-top: 400rpx;
+			// position: relative;
+			
+			margin-left: -60rpx;
+			position: absolute;
+			
+			bottom: 0;
+			
+			.nextBtn{
+				width: 350rpx;
+				height: 140rpx;
+				// background: green;
+				position: absolute;
+				right: 0;
+				bottom:330rpx;
+			}
+		}
+	}	
+	
+	
+	
+	
 
 	.pos{
 		height: 45px;

+ 31 - 6
pages/digitalMen/index.vue

xqd xqd xqd xqd
@@ -127,6 +127,18 @@
 				@close="handleClosePicker"></u-picker>
 			<!-- <wike-tabbar :onTabbar="true" :isShowAnimate="true"></wike-tabbar> -->
 
+			<!-- 数字人初始引导界面 -->
+			<div class="leadBg" v-if="showInitLead">
+				<div class="leadBox1" v-if="showLead1">
+					<div class="nextBtn" @click="nextLead">
+					</div>
+				</div>
+				<div class="leadBox2" v-if="showLead2">
+					<div class="nextBtn" @click="finishLead">
+					</div>
+				</div>
+			</div>
+
 
 			<view class="pos2">
 			</view>
@@ -154,6 +166,10 @@
 	export default {
 		data() {
 			return {
+				showInitLead: false,
+				showLead2: false,
+				showLead1: true,
+
 				demoList: [],
 
 				show: false,
@@ -198,12 +214,8 @@
 
 		},
 		onLoad(o) {
-			// console.log('digitalMen.workList----onLoad(o)------------');
-			// this.$http('digitalMen.workList', {}).then(res => {
-			// 	if (res.code == 0) {
-			// 		console.log('测试数字人接口是否通畅------------------2');
-			// 	}
-			// });
+			this.showInitLead = !uni.getStorageSync('showInitLead_szr')
+			console.log("uni.getStorageSync('showInitLead')", uni.getStorageSync('showInitLead_szr'));
 		},
 		beforeDestroy() {
 			console.log('beforeDestroy()---------------------');
@@ -246,6 +258,19 @@
 		// 	this.getIndexData()
 		// },
 		methods: {
+			nextLead() {
+				// this.showLead1 = false
+				// this.showLead2 = true
+
+				this.showInitLead = false
+				this.showLead1 = false
+				uni.setStorageSync('showInitLead_szr', true)
+			},
+			finishLead() {
+				this.showInitLead = false
+				this.showLead2 = false
+				uni.setStorageSync('showInitLead_szr', true)
+			},
 			open() {
 				// console.log('open');
 			},

+ 45 - 2
pages/employee/index.scss

xqd xqd
@@ -131,7 +131,7 @@ iframe{
 		margin-left: 50%;
 		transform: translateX(-50%);
 		// margin-top: 136rpx;
-		margin-top: 100rpx;
+		margin-top: 80rpx;
 		display: flex;
 		align-items: center;
 		justify-content: center;
@@ -140,4 +140,47 @@ iframe{
 		font-weight: 500;
 		color: #207CF7;
 	}
-}
+}
+
+.name,.phone{
+	margin-top: 80rpx;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	.left{
+		width: 15%;
+		text-align: right;
+		
+		padding-right: 20rpx;
+		font-weight: 600;
+	}
+	.right{
+		width: 60%;
+	}
+	
+}
+.name{
+	// margin-right: 10rpx;
+}
+.phone{
+	margin-top: 50rpx;
+	}
+	
+	.part{
+		
+		margin-top:50rpx;
+		.txt{
+			font-size: 30rpx;
+			font-weight: bold;
+			text-align: center;
+		}
+		.becuase{
+			font-size: 30rpx;
+			font-weight: bold;
+			margin-top: 30rpx;
+			// text-align: center;
+		}
+		.des{
+			
+		}
+	}

+ 145 - 35
pages/employee/index.vue

xqd xqd xqd xqd xqd xqd
@@ -1,54 +1,102 @@
 <template>
 	<!-- <iframe src="https://chat.mddai.cn/" frameborder="0"></iframe> -->
 	<view class="">
-		<!-- 	<view style="color: #fff;z-index: 99999999;position: relative;">
+		<view style="color: #fff;z-index: 99999999;position: relative;">
 			<tn-nav-bar :bottomShadow="false" backgroundColor="#207CF7">数智员工</tn-nav-bar>
 			<view :style="{height: tobheight+'px'}"></view>
-		</view> -->
+		</view>
 
 		<div class="employBox">
-			<div class="stateBox">
-				<div class="left">
-					当前状态:{{loginTxt}}
+
+			<div class="applyBox" v-if='isApply'>
+				<div class="t1">
+					您尚未申请微信机器人
+				</div>
+				<div class="t2" v-if="status==null||status==2" :style="{color:!userInfo.robot_is_login?'':'#237FED'}">
+					填写下方资料申请
+				</div>
+				<div v-if="status==null||status==2">
+					<div class="name">
+						<div class="left">
+							姓名:
+						</div>
+						<div class="right">
+							<u--input placeholder="请输入姓名" border="surround" v-model="rName"></u--input>
+						</div>
+					</div>
+					<div class="phone">
+						<div class="left">
+							手机号:
+						</div>
+						<div class="right">
+							<u--input placeholder="请输入手机号" border="surround" v-model="rPhone"></u--input>
+						</div>
+					</div>
+					<u-button @click="applyR" color="linear-gradient(90deg, #549DFF 0%, #207CF7 100%)" text="提交申请"
+						style="width: 85%;margin-top: 120rpx;"></u-button>
+				</div>
+				<div v-if="status==0" class="part">
+					<!-- <div class="part"> -->
+					<div class="txt" style="color: orange;">
+						微信机器人申请审核中
+					</div>
+				</div>
+				<div v-if="status==2" class="part">
+					<!-- <div class="part"> -->
+					<div class="txt" style="color: red;">
+						微信机器人申请审核失败,您可以重新申请
+					</div>
+					<div class="becuase">失败原因:</div>
+					<div class="des">
+						{{robotInfo}}
+					</div>
 				</div>
-				<!-- 	<div class="btn">
-					登录
-				</div> -->
 			</div>
 
-			<div class="t1">
-				{{!userInfo.robot_is_login?'使用微信扫码登录机器人':userInfo.nickname}}
+			<div v-else>
+				<div class="stateBox">
+					<div class="left">
+						当前状态:{{loginTxt}}
+					</div>
+					<!-- 	<div class="btn">
+						登录
+					</div> -->
+				</div>
+				<div class="t1">
+					{{!userInfo.robot_is_login?'使用微信扫码登录机器人':userInfo.nickname}}
 
-			</div>
-			<div class="t2" :style="{color:!userInfo.robot_is_login?'':'#237FED'}">
-				{{!userInfo.robot_is_login?'微信扫码快速登录':'您已登录'}}
+				</div>
+				<div class="t2" :style="{color:!userInfo.robot_is_login?'':'#237FED'}">
+					{{!userInfo.robot_is_login?'微信扫码快速登录':'您已登录'}}
 
-			</div>
-			<!-- <image src="/static/loading_pic.gif" alt="" /> -->
-			<div class="codeBox" v-if="!userInfo.robot_is_login">
-				<div class="lt"></div>
-				<div class="rt"></div>
-				<div class="lb"></div>
-				<div class="rb"></div>
+				</div>
+				<!-- <image src="/static/loading_pic.gif" alt="" /> -->
+				<div class="codeBox" v-if="!userInfo.robot_is_login">
+					<div class="lt"></div>
+					<div class="rt"></div>
+					<div class="lb"></div>
+					<div class="rb"></div>
 
-				<img :src="codeInfo" alt="" v-if="codeInfo" />
-				<image src="/static/loading_pic.gif" alt="" v-else />
+					<img :src="codeInfo" alt="" v-if="codeInfo" />
+					<image src="/static/loading_pic.gif" alt="" v-else />
 
-			</div>
+				</div>
 
-			<img v-else
-				style="margin-top: 100rpx;margin-left: 50%;transform: translateX(-50%);width: 250rpx;height: 250rpx;"
-				src="@/static/success.png" alt="" />
+				<img v-else
+					style="margin-top: 100rpx;margin-left: 50%;transform: translateX(-50%);width: 250rpx;height: 250rpx;"
+					src="@/static/success.png" alt="" />
 
-			<div class="fresh" v-if="!userInfo.robot_is_login">
-				<span>刷新</span>
-				<image @click="fresh" ref="hyh" id="img01" class="shuaxin" :class="{'go':addRotate}"
-					src="/static/newIndex/change.png" style="width: 32rpx;height:28rpx;">
-				</image>
-			</div>
-			<div class="btn2" v-if="is_wx" @click="handleDw(codeInfo)">
-				保存二维码图片
+				<div class="fresh" v-if="!userInfo.robot_is_login">
+					<span>刷新</span>
+					<image @click="fresh" ref="hyh" id="img01" class="shuaxin" :class="{'go':addRotate}"
+						src="/static/newIndex/change.png" style="width: 32rpx;height:28rpx;">
+					</image>
+				</div>
+				<div class="btn2" v-if="is_wx" @click="handleDw(codeInfo)">
+					保存二维码图片
+				</div>
 			</div>
+
 		</div>
 	</view>
 </template>
@@ -77,10 +125,22 @@
 				isDowload: false,
 				userInfo: {
 					robot_is_login: 0
-				}
+				},
+
+				isApply: true,
+
+				rName: '',
+				rPhone: '',
+
+				status: -1,
+
+				robotInfo: ''
+
 			}
 		},
 		async onLoad(e) {
+
+
 			if (e && e.type) {
 				if (this.platform == 'wxMiniProgram') {
 					var menumtop = uni.getMenuButtonBoundingClientRect().top - uni.getSystemInfoSync().statusBarHeight
@@ -118,6 +178,43 @@
 			clearInterval(this.timer)
 		},
 		methods: {
+
+			async applyR() {
+				let phoneReg = /^[1][3,4,5,7,8,9][0-9]{9}$/
+				if (!this.rName) {
+					return uni.showToast({
+						title: '请输入姓名',
+						icon: 'none'
+					})
+				}
+				if (!this.rPhone) {
+					return uni.showToast({
+						title: '请输入手机号',
+						icon: 'none'
+					})
+				}
+				if (!phoneReg.test(this.rPhone)) {
+					return uni.showToast({
+						title: '手机号不合法',
+						icon: 'none'
+					})
+				}
+				let p = {
+					name: this.rName,
+					mobile: this.rPhone,
+				}
+				let res1 = await this.$http('robot.robotApplay', p)
+				if (res1.code == 0) {
+					uni.showToast({
+						title: '申请提交成功,请等待审核通过',
+						icon: 'success'
+					})
+					setTimeout(() => {
+						uni.navigateBack()
+					}, 1500)
+				}
+				console.log('申请机器人返回值', res1);
+			},
 			fresh() {
 				clearInterval(this.timer)
 				this.getCodeData()
@@ -175,6 +272,7 @@
 					this.getUserInfo()
 					clearInterval(this.timer)
 				} else {
+					clearInterval(this.timer)
 					// uni.showToast({
 					// 	title: res1.msg,
 					// 	icon: 'none'
@@ -189,6 +287,17 @@
 				let res1 = await this.$http('robot.info', {})
 				console.log('机器人用户状态返回值:', res1, res1.data);
 				if (res1.code == 0) {
+					this.isApply = !res1.data.is_config_fastgpt
+					this.status = res1.data.robotInfo ? res1.data.robotInfo.state : null
+
+					this.robotInfo = res1.data.robotInfo.no_msg
+
+					// this.isApply = !0
+					// this.status = 2
+					if (!res1.data.is_config_fastgpt) {
+						return
+					}
+
 					this.userInfo = res1.data
 					if (res1.data.robot_is_login == 1) {
 						this.loginTxt = '已登录'
@@ -197,6 +306,7 @@
 						this.getCodeData()
 					}
 				} else {
+					clearInterval(this.timer)
 					uni.showToast({
 						title: res1.msg,
 						icon: 'none'

+ 0 - 0
pages/haibao.scss


+ 21 - 0
pages/haibao.vue

xqd
@@ -0,0 +1,21 @@
+<template>
+	<view class="haobao">
+
+	</view>
+</template>
+
+<script>
+	export default {
+		components: {},
+		data() {
+			return {}
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import url('./haibao.scss');
+</style>

+ 173 - 0
pages/index/index2.scss

xqd
@@ -0,0 +1,173 @@
+.outer{
+	position: relative;
+	.leadBg{
+		position: absolute;
+		width: 100vw;
+		height: 100vh;
+		left: 0;
+		top: 0;
+		z-index: 9999;
+		background: rgba(0, 0, 0, .69);
+		// padding-left: 38rpx;
+		// padding-right: 38rpx;
+		
+		display: flex;
+		justify-content: center;
+		.leadBox1{
+			// margin-bottom: 138rpx;
+			width: 646rpx;
+			height: 842rpx;
+			background-image: url(@/static/index_lead1.png);
+			background-size: cover;
+			margin-top: 280rpx;
+			position: relative;
+			
+			.nextBtn{
+				width: 350rpx;
+				height: 140rpx;
+				// background: red;
+				
+				position: absolute;
+				right: 0;
+				bottom: 0rpx;
+			}
+		}
+		.leadBox2{
+			width: 634rpx;
+			// width: 100%;
+			height: 1226rpx;
+			background-image: url(@/static/index_lead2.png);
+			background-size: cover;
+			// margin-top: 400rpx;
+			// position: relative;
+			
+			margin-left: -60rpx;
+			position: absolute;
+			
+			bottom: 0;
+			
+			.nextBtn{
+				width: 350rpx;
+				height: 140rpx;
+				// background: green;
+				position: absolute;
+				right: 0;
+				bottom:330rpx;
+			}
+		}
+	}
+}
+
+
+.subsection {
+		margin: 0rpx 25rpx 0;
+		position: fixed;
+		width: 93.8%;
+		top: 30rpx;
+		// top: 30rpx;
+		z-index: 9999;
+	}
+
+	/* 瀑布流*/
+	.product__item {
+		background-color: #FFFFFF;
+		overflow: hidden;
+		margin: 0 10rpx;
+		margin-bottom: 20rpx;
+		// box-shadow: 0rpx 0rpx 30rpx 0rpx rgba(0, 0, 0, 0.07);
+
+		.item {
+
+			/* 图片 start */
+			&__image {
+				width: 100%;
+				height: auto;
+				background-color: #FFFFFF;
+				border: 1rpx solid #F8F7F8;
+				// border-radius: 20rpx;
+				overflow: hidden;
+			}
+
+			/* 图片 end */
+
+			/* 内容 start */
+			&__data {
+				padding: 14rpx 0rpx;
+			}
+
+			/* 标题 start */
+			&__title-container {
+				text-align: justify;
+				line-height: 38rpx;
+				vertical-align: middle;
+			}
+
+			&__store-type {
+				height: 28rpx;
+				font-size: 20rpx;
+				position: relative;
+				display: inline-flex;
+				align-items: center;
+				justify-content: center;
+				padding: 4rpx;
+				border-radius: 6rpx;
+				white-space: nowrap;
+				text-align: center;
+				top: -2rpx;
+				margin-right: 6rpx;
+			}
+
+			&__title {
+				font-size: 30rpx;
+			}
+
+			/* 标题 end */
+
+			/* 标签 start */
+			&__tags-container {
+				display: flex;
+				flex-direction: row;
+				flex-wrap: nowrap;
+				align-items: center;
+				justify-content: flex-start;
+			}
+
+			&__tag {
+				margin: 10rpx;
+				color: #7C8191;
+				background-color: #F3F2F7;
+				padding: 4rpx 14rpx 6rpx;
+				border-radius: 10rpx;
+				font-size: 20rpx;
+
+				&:first-child {
+					margin-left: 0rpx !important;
+				}
+			}
+
+			/* 标签 end */
+			/* 内容 end */
+		}
+	}
+
+	.suspension {
+		background: linear-gradient(to right, #549DFF,#207CF7,);
+		color: #fff;
+		position: fixed;
+		left: 50%;;
+		bottom: 180rpx;
+		width: 648rpx;
+		height: 96rpx;
+		border-radius: 48rpx 12rpx 48rpx 12rpx;
+		transform: translateX(-50%);
+		
+		box-shadow: 0 3px 14px -2px  rgba(4, 89, 202,.6);
+	}
+
+	.wike_ad {
+		margin: 0 6px 11px;
+	}
+
+	.db {
+		height: 83px;
+	}

+ 247 - 0
pages/index/index2.vue

xqd
@@ -0,0 +1,247 @@
+<template>
+	<view class="outer">
+		<wike-skeleton :count="4" v-if="showskeleton"></wike-skeleton>
+		<view style="height: 66px;"></view>
+		<z-paging ref="paging" refresher-complete-delay="200" v-model="drawList" @query="queryList">
+			<view class="subsection">
+				<tn-subsection :list="subsectionlist" mode="button" :borderRadius="50" animationType="cubic-bezier" bold
+					:height="90" @change="getsubsection"></tn-subsection>
+			</view>
+
+			<view style="padding: 150rpx 15rpx 30rpx 15rpx;">
+				<view v-if="homeTemplate&&homeTemplate.banner&&homeTemplate.banner.length>0" class="wike_ad">
+					<wike-ad></wike-ad>
+				</view>
+
+				<tn-waterfall v-if="drawList.length>0" ref="waterfall" v-model="drawList"
+					@finish="handleWaterFallFinish">
+					<template v-slot:left="{ leftList }">
+						<view v-for="(item, index) in leftList" :key="item.id" class="product__item"
+							@click="tnproduct(item.id)">
+							<view class="item__image">
+								<tn-lazy-load :threshold="6000" height="100%"
+									:image="item.imgs_file[0]?item.imgs_file[0]:item.origin_url" :index="item.id"
+									imgMode="widthFix"></tn-lazy-load>
+							</view>
+						</view>
+					</template>
+					<template v-slot:right="{ rightList }">
+						<view v-for="(item, index) in rightList" :key="item.id" class="product__item"
+							@click="tnproduct(item.id)">
+							<view class="item__image">
+								<tn-lazy-load :threshold="6000" height="100%"
+									:image="item.imgs_file[0]?item.imgs_file[0]:item.origin_url" :index="item.id"
+									imgMode="widthFix"></tn-lazy-load>
+							</view>
+						</view>
+					</template>
+				</tn-waterfall>
+				<!-- <wike-waterfall :dataList="data" :column="columns" @click="click" :radius="20" :margin="10"></wike-waterfall> -->
+			</view>
+			<view slot="bottom" class="z_tabs" :style="{ marginBottom: 72 + 'px' }"></view>
+		</z-paging>
+
+		<view @click="getcreate" class="suspension u-flex align-center justify-center">
+			AI创作
+		</view>
+
+
+		<wike-tabbar2 :currTabIndex='0' v-if="appInfo.page_template == 3" :is_aipainting="appInfo.is_aipainting"
+			:onTabbar="true" :isShowAnimate="true" :appInfos="appInfo.page_template"></wike-tabbar2>
+		<wike-tabbar :currTabIndex='0' v-else :onTabbar="true" :is_aipainting="appInfo.is_aipainting"
+			:isShowAnimate="true" :appInfos="appInfo.page_template"></wike-tabbar>
+
+		<u-modal @cancel="handleCancel" @confirm="handleConfirm" cancelText='退出登录' showCancelButton :show="showFixInfo"
+			confirmColor="#26b3a0" confirmText="完善信息" title="请完善个人手机号信息后使用本应用"
+			content='您已充值,但未绑定手机号,请完善信息以方便为您提供进一步的服务'></u-modal>
+
+
+
+		<!-- 初始引导界面 -->
+		<div class="leadBg" v-if="showInitLead">
+			<div class="leadBox1" v-if="showLead1">
+				<div class="nextBtn" @click="nextLead">
+				</div>
+			</div>
+			<div class="leadBox2" v-if="showLead2">
+				<div class="nextBtn" @click="finishLead">
+				</div>
+			</div>
+		</div>
+	</view>
+</template>
+
+<script>
+	import {
+		mapMutations,
+		mapActions,
+		mapState,
+		mapGetters
+	} from 'vuex';
+	import {
+		apiurl
+	} from '@/common/request/request';
+	import $platform from '@/common/platform';
+	let rewardedVideoAd = null;
+	export default {
+		mixins: [],
+		components: {},
+		data() {
+			return {
+				showInitLead: false,
+				showLead2: false,
+				showLead1: true,
+
+				list: [],
+				drawList: [],
+				subsectionlist: ['艺术照', 'MJ绘图', 'SD绘图'],
+				engine: 'mj',
+				showskeleton: true,
+
+				showFixInfo: false,
+			};
+		},
+		computed: {
+			...mapGetters(['appInfo', 'userInfo', 'homeTemplate'])
+		},
+
+		onLoad(o) {
+			this.showInitLead = !uni.getStorageSync('showInitLead')
+
+			if (o.uniacid) {
+				uni.setStorageSync('uniacid', o.uniacid)
+				console.log('onload获取的应用ID----paiting', uni.getStorageSync('uniacid'));
+			}
+		},
+		onShow() {
+			this.$http('user.info').then(res => {
+				if (res.code == 0) {
+					this.showFixInfo = res.data.is_new;
+				}
+			})
+
+			// 网络变化检测
+			uni.onNetworkStatusChange(res => {
+				this.isConnected = res.isConnected;
+			});
+		},
+		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(['getUserInfo', 'showAuthModal', 'getUserData', 'logout']),
+			nextLead() {
+				this.showLead1 = false
+				this.showLead2 = true
+			},
+			finishLead() {
+				this.showInitLead = false
+				this.showLead2 = false
+				uni.setStorageSync('showInitLead', true)
+			},
+			handleCancel() {
+				this.showFixInfo = false
+				this.logout()
+				// uni.clearStorage()
+
+				uni.reLaunch({
+					url: '/pages/user/signin'
+				})
+			},
+			handleConfirm() {
+				uni.navigateTo({
+					url: '/pages/user/userinfo?isNewUser=true'
+				})
+			},
+			queryList(pageNo, pageSize) {
+				//这里的pageNo和pageSize会自动计算好,直接传给服务器即可
+				const params = {
+					page: pageNo,
+					limit: pageSize,
+					engine: this.engine
+				};
+				this.$http('gallery.all', params).then(res => {
+					if (res.code == 0) {
+						uni.setNavigationBarTitle({
+							title: this.appInfo.site_name
+						});
+						this.showskeleton = false
+						if (pageNo == 1) {
+							this.drawList = []
+						}
+						this.$refs.paging.complete(res.data.data);
+						this.isLoading = false;
+					}
+				});
+			},
+			getsubsection(e) {
+				console.log(e.index);
+				this.engine = e.index == 0 ? 'ys' : e.index == 1 ? 'mj' : 'sd'
+				this.drawList = []
+				this.$refs.paging.reload(true);
+			},
+			getcreate() {
+				uni.navigateTo({
+					url: '/pages/painting/draw'
+				})
+			},
+			/* 瀑布流*/
+			// 获取随机数据
+			getRandomData() {
+				// console.log(13);
+				// this.loadStatus = 'loading'
+				for (let i = 0; i < 10; i++) {
+					let index = this.$t.number.randomInt(0, this.data.length - 1)
+
+					let item = JSON.parse(JSON.stringify(this.data[index]))
+					item.id = this.$t.uuid()
+					this.list.push(item)
+					// console.log(this.list);
+				}
+			},
+			// 瀑布流加载完毕事件
+			handleWaterFallFinish() {
+				// this.loadStatus = 'loadmore'
+			},
+			tnproduct(id) {
+
+				uni.navigateTo({
+					url: '/pages/painting/details?urls=' + id + '&from=' + this.engine
+
+					// + '&form=' + JSON.stringify(
+					// this.form)
+				})
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	@import './index.scss';
+</style>

+ 0 - 61
pages/painting/details.vue

xqd xqd xqd xqd
@@ -1,23 +1,5 @@
 <template>
 	<view class="template-details">
-		<!-- 顶部自定义导航 -->
-		<!-- <view style="color: #fff;">
-			<tn-nav-bar backgroundColor="#000" :bottomShadow="false">AI绘画
-			</tn-nav-bar>
-			<view :style="{height: tobheight+'px',borderBottom: 1+'px'+' '+'solid'}"></view>
-		</view> -->
-
-		<!-- <view class="">
-      <view class="icon15__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur button-3" @tap="showLandscape">
-        <view class="tn-icon-level"></view>
-      </view>
-      <view class="icon15__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur button-2" @click="tn('/pageA/author/author')">
-        <view class="tn-icon-my"></view>
-      </view>
-      <view class="icon15__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur button-1" @click="tn('/pageB/chat/chat')">
-        <view class="tn-icon-comment"></view>
-      </view>
-    </view> -->
 		<block v-if="showdrawing">
 			<u-notice-bar v-if="drawingtitle=='正在努力绘制中...'||drawingtitle=='图片正在渲染中...'" :text="noticebar" step
 				bgColor="#000"></u-notice-bar>
@@ -149,39 +131,6 @@
 			<view class="tn-color-white" style="width: 100vw;">
 
 				<view class="" style="margin: 120rpx 60rpx;">
-					<!-- <view class="tn-flex tn-flex-col-top">
-
-						<view class="">
-							<view class="logo-pic tn-shadow">
-								<view class="logo-image">
-									<view class="tn-shadow-blur"
-										:style="{backgroundImage:'url('+parameter.avatar+')',width: 100+'rpx',height: 100+'rpx'}">
-									</view>
-								</view>
-							</view>
-							<view class="tn-icon-sex-male"
-								style="position: absolute;margin: -105rpx 0 0 72rpx;border-radius: 100rpx;background-color: #FFFFFF;color: #FF71D2;padding: 5rpx;">
-							</view>
-						</view>
-						<view class="tn-padding-left-sm tn-padding-top-xs" style="width: 100%;">
-							<view class="tn-flex tn-flex-row-between tn-flex-col-between">
-								<view class="justify-content-item">
-									<text class="tn-text-lg tn-text-bold">{{parameter.nickname}}</text>
-									<text class="tn-padding-left-sm tn-padding-right-xs">水瓶座</text>
-									<text class="tn-icon-con-virgo"></text>
-								</view>
-								<view class="justify-content-item tn-round tn-text-xs tn-bg-orangered--light tn-color-orangered" style="padding: 5rpx 15rpx;">
-                  <text class="tn-icon-warning-fill tn-padding-right-xs"></text> 举报
-                </view>
-							</view>
-							<view class="tn-padding-top-xs">
-								<view class="">
-									<text class="tn-text-df tn-color-gray--light">{{parameter.create_time}}</text>
-								</view>
-							</view>
-						</view>
-					</view> -->
-
 					<view class="tn-flex tn-flex-row-between tn-flex-col-between tn-margin-top-xl tn-text-justify">
 						<text class="">AI绘画:{{parameter.engine == 'sd'?'StableDiffusion绘图':'MidJourney绘图'}}</text>
 					</view>
@@ -202,16 +151,7 @@
 						class="tn-flex tn-flex-row-between tn-flex-col-between tn-margin-top-xl tn-text-justify">
 						<text class="">分辨率:{{parameter.width}}x{{parameter.height}}</text>
 					</view>
-					<!-- <view class="tn-flex tn-flex-row-between tn-flex-col-between tn-margin-top-xl tn-text-justify">
-						<text class="">尺寸:16:9</text>
-					</view>
-					
-					<view class="tn-flex tn-flex-row-between tn-flex-col-between tn-margin-top-xl tn-text-justify">
-						<text class="">画面风格:吉卜力</text>
-					</view> -->
 				</view>
-
-
 			</view>
 		</tn-landscape>
 		<u-popup :show="show" @close="close" @open="open" mode="center">
@@ -225,7 +165,6 @@
 				</view>
 			</view>
 		</u-popup>
-
 	</view>
 </template>
 

+ 398 - 0
pages/painting/draw.scss

xqd
@@ -1,3 +1,401 @@
+// 艺术照部分样式
+
+.conList{
+			display: flex;
+			flex-wrap: wrap;
+			// justify-content: space-between;
+			
+			width: 100%;
+			.item:nth-of-type(4n){
+				// margin-right: 0rpx;
+			}
+			
+			.item_a{
+				border: 4rpx solid #1F79F0;
+			}
+			.item{
+				margin-right: 18rpx;
+				// width: 20.8vw;
+				
+				width: 22.3%;
+				// min-height: 212rpx;
+				
+				margin-bottom: 20rpx;
+				display: flex;
+				flex-direction: column;
+				
+				justify-content: center;
+				align-items: center;
+				.top{
+					width: 100%;
+					height: 100%;
+					border-radius: 20rpx;
+					
+					height: 212rpx;
+					
+					position:relative;
+					
+					// background: url(https://img0.baidu.com/it/u=1641416437,1150295750&fm=253&fmt=auto&app=120&f=JPEG?w=1280&h=800);
+					
+					background-size: 100% 100%;
+					.tag{
+						width: 62rpx;
+						height: 42rpx;
+						position: absolute;
+						bottom: 0rpx;
+						right: 0rpx;
+						border-radius: 0 0 20rpx 0;
+					}
+				}
+				.name{
+					font-size: 30rpx;
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: 500;
+					color: #333333;
+					margin-top: 24rpx;
+				}
+			}
+		}
+
+.ysBox{
+	padding-top: 24rpx;
+	padding-left: 28rpx;
+	padding-right: 28rpx;
+	
+
+	.selBox{
+		// background: red;
+		position: relative;
+		.optDetailBox{
+			position: absolute;
+			
+			top: 126rpx;
+			left: -28rpx;
+			
+			height: calc(100vh - 290rpx);
+			width: 100vw;
+			background: rgba(0, 0, 0, .35);
+			z-index: 1;
+			.con{
+				position: absolute;
+				box-sizing: border-box;
+				z-index: 2;
+				width:100%;
+				min-height: 112rpx;
+				background: #FFFFFF;
+				border-radius:  0rpx 0rpx 32rpx 32rpx;
+				padding: 32rpx 30rpx;
+				
+				// margin-top: 48rpx;
+				
+				
+				.optList{
+					display: flex;
+					flex-wrap: wrap;
+					
+					.item{
+						width: 144rpx;
+						height: 48rpx;
+						background: #F4F4F4;
+						border-radius: 31rpx;
+						
+						margin-right: 24rpx;
+						
+						display: flex;
+						justify-content: center;
+						align-items: center;
+						
+						font-size: 24rpx;
+						font-family: PingFang-SC, PingFang-SC;
+						font-weight: 500;
+						color: #333333;
+						
+						margin-bottom: 24rpx;
+					}
+					.item_a{
+						border: 2rpx solid #333333;
+					}
+				}
+			}
+		}
+		.title{
+			font-size: 30rpx;
+			font-family: PingFang-SC, PingFang-SC;
+			font-weight: 800;
+			color: #333333;
+			margin-bottom: 24rpx;
+		}
+		.selList{
+			margin-bottom: 24rpx;
+			display: flex;
+			flex-wrap: nowrap;
+			white-space: nowrap;
+			
+			// background: red;
+			width: 100%;
+			overflow-y: hidden;
+			overflow-x: scroll;
+			
+			// z-index: 3;
+			
+			.item{
+				// width: 200rpx;
+				height: 62rpx;
+				background: #F4F4F4;
+				border-radius: 31rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				margin-right: 16rpx;
+				padding-left: 24rpx;
+				padding-right: 26rpx;
+				
+				
+				.arrD{
+					width: 23rpx;
+					height: 14rpx;
+					margin-left: 14rpx;
+				}
+			}
+		}
+		
+		.moreBtn{
+			height: 76rpx;
+			background: #D6E7FE;
+			border-radius: 38rpx;
+			
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			
+			font-size: 28rpx;
+			font-family: PingFang-SC, PingFang-SC;
+			font-weight: bold;
+			color: #1F79F0;
+		}
+	
+	}
+	.upTitle{
+			font-size: 30rpx;
+			font-family: PingFang-SC, PingFang-SC;
+			font-weight: 800;
+			color: #333333;
+			
+			margin-top: 64rpx;
+		}
+		.upList{
+			display: flex;
+			align-items: center;
+			margin-top: 24rpx;
+			
+			.upBox{
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				justify-content: center;
+				margin-right: 18rpx;
+				.up{
+					width: 160rpx;
+					height: 212rpx;
+					background: #F4F4F4;
+					border-radius: 20rpx;
+					
+					position: relative;
+					
+					display: flex;
+					justify-content: center;
+					align-items: center;
+					font-size: 28rpx;
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: 500;
+					color: #999999;
+					
+					.loading{
+						position: absolute;
+						z-index: 9;
+					}
+					
+					
+					
+					.del{
+						position: absolute;
+						top: 0rpx;
+						right: 0rpx;
+						
+						// background: red;
+						padding-top: 5rpx;
+						padding-right: 5rpx;
+						// width: 30%;
+						// height: 25%;
+						display: flex;
+						justify-content: flex-end;
+						
+						align-items: start;
+					}
+					.camera{
+						position: absolute;
+						bottom: 0rpx;
+						right: 0;
+						width: 62rpx;
+						height: 42rpx;
+						border-radius:0 0 20rpx 0;
+						
+					}
+				}
+				.up_a{
+					border: 4rpx solid #1F79F0;
+				}
+				.up1{
+					background: url(@/static/modal.png);
+					background-size: cover;
+					background: #F4F4F4;
+					background-size: 100% 100%;
+				}
+				.up2{
+					background-size: 100% 100%;
+				}
+				
+				.des{
+					margin-top: 18rpx;
+					font-size: 28rpx;
+					font-family: PingFang-SC, PingFang-SC;
+					font-weight: 500;
+					color: #333333;
+				}
+			}
+		}
+		.tipBox{
+			display: flex;
+			align-items: center;
+			
+			font-size: 24rpx;
+			font-family: PingFang-SC, PingFang-SC;
+			font-weight: 500;
+			color: #999999;
+			
+			margin-top: 32rpx;
+			img{
+				width: 28rpx;
+				height: 28rpx;
+				margin-right: 8rpx;
+			}
+		}
+		.ysBtn{
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 76rpx;
+			background: linear-gradient(90deg, #549DFF 0%, #207CF7 100%);
+			border-radius: 38rpx;
+			
+			font-size: 28rpx;
+			font-family: PingFang-SC, PingFang-SC;
+			font-weight: bold;
+			color: #FFFFFF;
+			
+			margin-top: 48rpx;
+			margin-bottom: 72rpx;
+		}
+}
+
+.cankaoImgBox{
+	
+	position: relative;
+	padding: 40rpx 30rpx;
+	
+	padding-bottom: 154rpx;
+	.top{
+		display: flex;
+		align-items: center;
+		margin-bottom: 32rpx;
+		.title{
+			font-size: 30rpx;
+			font-family: PingFang-SC, PingFang-SC;
+			font-weight: 800;
+			color: #333333;
+			
+			margin-right: 16rpx;
+		}
+		img{
+			width: 28rpx;
+			height: 28rpx;
+		}
+		span{
+			margin-left: 8rpx;
+			font-size: 24rpx;
+			font-family: PingFang-SC, PingFang-SC;
+			font-weight: 500;
+			color: #999999;
+		}
+	}
+	.conList{
+		// background: red;
+		max-height: 1000rpx;
+		overflow-x: hidden;
+		overflow-y: scroll;
+		padding-left: 4rpx;
+		
+		.item{
+			// width: 100rpx;
+			.name{
+				margin-top: 0;
+			}
+			
+		}
+		
+	}
+	
+	.btnBox{
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		
+		height: 154rpx;
+		background: #FFFFFF;
+		box-shadow: 0rpx -2rpx 20rpx 0rpx rgba(0,0,0,0.05);
+		
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		width: 100%;
+		
+		padding-left: 30rpx;
+		padding-right: 30rpx;
+		
+		box-sizing: border-box;
+		.left{
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			width: 242rpx;
+			height: 76rpx;
+			background: #FFFFFF;
+			border-radius: 38rpx;
+			border: 2rpx solid #207CF7;
+			font-size: 30rpx;
+			font-family: PingFang-SC, PingFang-SC;
+			font-weight: 500;
+			color: #207CF7;
+		}
+		.right{
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			width: 432rpx;
+			height: 76rpx;
+			background: linear-gradient(270deg, #207CF7 0%, #549DFF 100%);
+			border-radius: 38rpx;
+			font-size: 30rpx;
+			font-family: PingFang-SC, PingFang-SC;
+			font-weight: 500;
+			color: #FFFFFF;
+		}
+	}
+}
+
+
+
+
 .outer{
 	position: relative;
 	

+ 514 - 289
pages/painting/draw.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -25,34 +25,141 @@
 				inactiveColor="#FFFFFF" activeColor="#357aba"></tn-subsection>
 		</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="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"
 							: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"
 							bgColor="#207CF714"></u-tag>
 					</block>
-					<block v-else>
+					<block v-else-if="showmj==2">
 						<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="#207CF7" borderColor="#207CF7"
 							bgColor="#207CF714"></u-tag>
 					</block>
 				</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>
 					<u-icon name="arrow-down-fill" color="#9e9e9e"></u-icon>
 				</view>
 			</view>
 			<!-- mj模型选择新调整 -->
 			<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"
 					@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'})`}">
@@ -70,7 +177,6 @@
 			<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"
@@ -86,18 +192,8 @@
 							<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"> -->
 				<view v-if="gallerylist.length>0" class="try-tips">
 					<scroll-view class="scroll-view" scroll-x="true">
 						<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"
 							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">
+			<!-- sd展示 -->
+			<view v-if="showmj==2" class="cu-form-group">
 				<view class="cu-title">
 					<view class="title flxe align-center">图片比例</view>
 				</view>
@@ -176,16 +236,9 @@
 						</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>
+			<!-- sd和mj都要展示 -->
 			<view class="cu-form-group">
 				<view class="cu-title">
 					<view class="title flxe align-center">参考图(可选)</view>
@@ -202,62 +255,40 @@
 					</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="title flxe align-center">生成数量</view>
 				</view>
 				<view class="flxe generate">
-					<block v-if="!showmj">
+					<block v-if="showmj==2">
 						<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 ? '#207CF7':''}">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 ? '#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 v-else>
+					<block v-else-if="showmj==1">
 						<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 ? '#207CF7':''}">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 class="dygbhg" v-if="current!=0">
+			<navigator class="whole" open-type="navigateBack">退出</navigator>
+			<block v-if="showmj==1">
 				<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>
-			<block v-else>
+			<block v-else-if="showmj==2">
 				<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>
@@ -265,9 +296,6 @@
 					需要消耗{{ 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"
@@ -311,6 +339,38 @@
 				<u-button type="success" @click="setGpt" plain text="使用" shape="circle" v-if="gpt_text"></u-button>
 			</view>
 		</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"
 			@close="signShow = false"></wike-model>
 		<wike-modal-qrcode :qrcode="gzhqrcode" :showconcern="showconcern"
@@ -337,6 +397,50 @@
 		components: {},
 		data() {
 			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,
 				showLead2: false,
 				showLead1: true,
@@ -353,20 +457,6 @@
 				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: '',
@@ -417,7 +507,11 @@
 				cos_id: 0,
 				refer_img: '',
 				refer_id: 0,
-				engine: 'sd',
+				// engine: 'sd',
+				engine: 'ys',
+				showmj: 0,
+				current: 0,
+
 				engineid: 0,
 				needCoin: 0,
 				gallerylist: [],
@@ -429,15 +523,14 @@
 				noticebar: ['精美图片需要时间打磨,预计20秒-120秒出图',
 					// '图片生成中请不要退出,否则可能会生成失败'
 				],
-				tabslist: ['StableDiffusion绘图', 'MidJourney绘图'],
+				tabslist: ['艺术照', 'MJ绘图', 'SD绘图'],
 				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: 1,
+
 				showconcern: false,
 				gzhqrcode: '',
 				proportion: ''
@@ -446,13 +539,19 @@
 		computed: {
 			...mapGetters(['appInfo', 'homeTemplate', 'userInfo', 'isLogin', 'userData'])
 		},
-		onLoad() {
+		async onLoad() {
+
+			console.log('isLogin================', this.isLogin);
+			this.getTempLiast({
+				init: true
+			})
+
 			this.showHuiHuaLead = !uni.getStorageSync('showHuiHuaLead')
 			console.log("uni.getStorageSync('showHuiHuaLead')", uni.getStorageSync('showHuiHuaLead'));
 
 			// mj优先展示
 			this.getsubsection({
-				index: 1
+				index: 0
 			})
 
 			if (this.platform == 'wxMiniProgram') {
@@ -533,6 +632,179 @@
 		},
 		methods: {
 			...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() {
 				this.showLead1 = false
 				this.showLead2 = true
@@ -570,19 +842,23 @@
 				this.showconcern = false
 			},
 			getsubsection(e) {
-				// if (this.keywords) {
-				// 	this.keywords = ''
-				// }
-
-				this.showmj = e.index == 1 ? true : false
+				this.showmj = e.index
 				this.current = e.index
+
+				console.log('this.current---------------', this.current);
 				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.engine = 'mj'
 					this.modelslist = []
 					this.getModels();
-				} else {
+				} else if (e.index == 2) {
 					this.form.samples = 1
 					this.engine = 'sd'
 					this.modelslist = []
@@ -690,21 +966,20 @@
 						});
 						if (that.engine == "mj") {
 							this.modelslist = res.data.reverse()
+						} else if (that.engine == "sd") {
+							this.modelslist = res.data
 						} else {
 							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
 								}
@@ -819,163 +1094,127 @@
 				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: #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 {
-						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 : '点数';
-							// 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>"
+								"<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
 							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 : '点数';
 							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
 							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;
 					}
-					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;
+					} 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) {
 				var that = this;
@@ -1043,32 +1282,18 @@
 				console.log(that.form);
 
 				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 : '')) +
 						'&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 +
-						`&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
-						.stringify(this.form)
+						.stringify(this.form) : '/pages/ys/ys'
 				});
 				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() {
 				this.showcoin = false;

+ 817 - 0
pages/painting/draw2.scss

xqd
@@ -0,0 +1,817 @@
+.outer{
+	position: relative;
+	
+	.addmask{
+		height: 45px;
+		width: 100%;
+		// background: red;
+		position: fixed;
+		z-index: 9999;
+		top: 0;
+		left: 0;
+		
+		.leadBg{
+			position: absolute;
+			
+			width: 100vw;
+			height: 100vh;
+			// width: 100%;
+			// height: 100%;
+			left: 0;
+			top: 0;
+			z-index: 9999;
+			background: rgba(0, 0, 0, .69);
+			// padding-left: 38rpx;
+			// padding-right: 38rpx;
+			
+			display: flex;
+			justify-content: center;
+			.leadBox1{
+				// margin-bottom: 138rpx;
+				width: 674rpx;
+				height: 1134rpx;
+				background-image: url(@/static/hh_lead1.png);
+				background-size: cover;
+				margin-top: 100rpx;
+				position: relative;
+				
+				.nextBtn{
+					width: 350rpx;
+					height: 140rpx;
+					// background: red;
+					
+					position: absolute;
+					right: 0;
+					bottom: 0rpx;
+				}
+			}
+			.leadBox2{
+				width: 674rpx;
+				// width: 100%;
+				height: 902rpx;
+				background-image: url(@/static/hh_lead_2.png);
+				background-size: cover;
+				margin-top: 200rpx;
+				position: relative;
+				
+				.nextBtn{
+					width: 350rpx;
+					height: 140rpx;
+					// background: green;
+					position: absolute;
+					right: 0;
+					top:250rpx;
+				}
+			}
+		}
+	}
+}
+
+
+
+.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: #207CF7;
+
+			.cu-proportion {
+				border-color: #207CF7;
+			}
+
+			.cu-proportion view {
+				background: #207CF7;
+			}
+		}
+
+		.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: #207CF7;
+			}
+
+			.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: #207CF7;
+		}
+	}
+
+	.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, $tc, $tc2);
+		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: #207CF7;
+			border-width: 3px;
+			border-radius: 6px;
+		}
+	}
+
+	.gpt-select {
+		padding: 30rpx;
+
+		.gpt-textarea-container {
+			margin-top: 20rpx;
+		}
+
+		.use-gpt {
+			margin-top: 30rpx;
+		}
+	}
+	
+	
+	.mjSelBox{
+		display: flex;
+		justify-content: space-between;
+		.mjitem{
+			height: 120px;
+			width: 48%;
+			border-radius: 12px;
+			border: 2px solid;
+			border-color: white;
+			position: relative;
+			
+			background-size: 100% 100%;
+			// background-size: cover;
+			.topRight{
+				width: 82rpx;
+				height: 82rpx;
+				// background: red;
+				position: absolute;
+				right: 0rpx;
+				top: -4rpx;
+				display: flex;
+				justify-content: flex-end;
+				padding-top: 5rpx;
+				padding-right: 10rpx;
+				ont-size: 24rpx;
+				font-family: PingFang-SC, PingFang-SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				border-radius:0 12px 0 0;
+			}
+			.bar{
+				
+				font-size: 12px;
+				font-family: PingFang-SC, PingFang-SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				width: 100%;
+				height: 28px;
+				background: rgba(0, 0, 0, .35);
+				border-radius: 0px 0px 12px 12px;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				position: absolute;
+				bottom: 0;
+			}
+		}
+	}

+ 1219 - 0
pages/painting/draw2.vue

xqd
@@ -0,0 +1,1219 @@
+<template>
+	<view class="outer">
+		<view style="color: #fff;">
+			<tn-nav-bar backgroundColor="#207CF7" :bottomShadow="false">AI绘图</tn-nav-bar>
+			<view :style="{ height: tobheight + 'px' }"></view>
+		</view>
+		<!-- 绘画引导界面 -->
+		<view class="addmask" v-if="showHuiHuaLead">
+			<view class="leadBg">
+				<view class="leadBox1" v-if="showLead1">
+					<view class="nextBtn" @click="nextLead">
+					</view>
+				</view>
+				<view class="leadBox2" v-if="showLead2">
+					<view class="nextBtn" @click="finishLead">
+					</view>
+				</view>
+			</view>
+		</view>
+		<u-notice-bar bgColor='#C6D6E4' color='#3F5465' :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="#207CF7" @change="getsubsection" buttonColor="tn-cool-bg-color-7"
+				inactiveColor="#FFFFFF" activeColor="#357aba"></tn-subsection>
+		</view>
+
+		<view class="directask">
+			<!-- <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="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="#207CF7" borderColor="#207CF7"
+							bgColor="#207CF714"></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="#207CF7" borderColor="#207CF7"
+							bgColor="#207CF714"></u-tag>
+					</block>
+				</view>
+				<view class="engine-container" @click="showmode = true" v-if="current==0">
+					<view class="model_view">模型:{{xzmodels}}</view>
+					<u-icon name="arrow-down-fill" color="#9e9e9e"></u-icon>
+				</view>
+			</view>
+			<!-- mj模型选择新调整 -->
+			<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"
+					@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'})`}">
+					<view class="topRight" style="background-image: url('../../static/sjx.png')">
+						热
+					</view>
+					<view class="bar">
+						{{item.title=='官方V5.1'?'二次元模型':'三次元写实'}}
+					</view>
+				</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"> -->
+				<view v-if="gallerylist.length>0" 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?'#207CF7':'',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="#207CF7" 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="#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">
+				<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 ? '#207CF7':''}">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 ? '#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 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 ? '#207CF7':''}">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>
+			<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?'#207CF7':''}"
+							@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="item.imgs.length>1?true:false" indicatorMode="line" circular></u-swiper>
+							<view class="card-info">
+								<view class="card-info-title">{{item.title=='官方V5.1'?'Niji 5':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>
+		<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 {
+				showHuiHuaLead: false,
+				showLead2: false,
+				showLead1: true,
+
+				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: 1,
+				showconcern: false,
+				gzhqrcode: '',
+				proportion: ''
+			};
+		},
+		computed: {
+			...mapGetters(['appInfo', 'homeTemplate', 'userInfo', 'isLogin', 'userData'])
+		},
+		onLoad() {
+			this.showHuiHuaLead = !uni.getStorageSync('showHuiHuaLead')
+			console.log("uni.getStorageSync('showHuiHuaLead')", uni.getStorageSync('showHuiHuaLead'));
+
+			// mj优先展示
+			this.getsubsection({
+				index: 1
+			})
+
+			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) {
+
+				console.log('this.$Route.query.prompt======================+++++++++++++');
+				this.keywords = this.$Route.query.prompt
+				if (this.$Route.query.refImg == "undefined") {
+					// this.refer_img = ''
+				} else {
+					this.refer_img = this.$Route.query.refImg
+				}
+
+				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']),
+			nextLead() {
+				this.showLead1 = false
+				this.showLead2 = true
+			},
+			finishLead() {
+				this.showHuiHuaLead = false
+				this.showLead2 = false
+				uni.setStorageSync('showHuiHuaLead', true)
+			},
+			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) {
+				// if (this.keywords) {
+				// 	this.keywords = ''
+				// }
+
+				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: #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;
+				}
+				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
+						});
+						if (that.engine == "mj") {
+							this.modelslist = res.data.reverse()
+						} else {
+							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
+								}
+							}
+						}
+
+						console.log('模型列表---============================++++++++++++++++++++', this.modelslist);
+					}
+				});
+			},
+			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: '#207CF7',
+					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: #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.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 {
+					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
+						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
+						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: #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) {
+				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';
+				}
+
+				that.form.keywords = that.keywords
+				console.log(that.form);
+
+				uni.navigateTo({
+					url: that.showmj ? '/pages/painting/generate?prompt=' + (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 +
+						`&refImg=${that.refer_img?that.refer_img:''}&keywords=${that.keywords}` :
+						'/pages/painting/details?form=' + JSON
+						.stringify(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() {
+				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) {
+
+						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];
+						uni.uploadFile({
+							url: apiurl('common/upload'),
+							filePath: path,
+							// name: 'img',
+							// formData: {
+							// 	platform: $platform.get(),
+							// 	accept: 'image'
+							// },
+							name: 'file',
+							formData: {
+								accept: 'image',
+								upload_type: 'ali-oss'
+							},
+							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;
+
+									that.form.refer_img = a.data.path
+									// }
+								} 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.form.refer_img = ''
+				this.form.init_image = ''
+				// this.refer_id = 0;
+				// }
+			},
+			open() {
+				// console.log('open');
+			},
+
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	@import './draw.scss';
+</style>

+ 377 - 0
pages/painting/ys.scss

xqd
@@ -0,0 +1,377 @@
+.template-details {
+		margin: 0;
+		width: 100%;
+		height: 100vh;
+		color: #fff;
+		overflow: hidden;
+	}
+
+	/* 胶囊*/
+	.tn-custom-nav-bar__back {
+		width: 100%;
+		height: 100%;
+		position: relative;
+		display: flex;
+		justify-content: space-evenly;
+		align-items: center;
+		box-sizing: border-box;
+		background-color: rgba(0, 0, 0, 0.15);
+		border-radius: 1000rpx;
+		border: 1rpx solid rgba(255, 255, 255, 0.5);
+		color: #FFFFFF;
+		font-size: 18px;
+
+		.icon {
+			display: block;
+			flex: 1;
+			margin: auto;
+			text-align: center;
+		}
+
+		&:before {
+			content: " ";
+			width: 1rpx;
+			height: 110%;
+			position: absolute;
+			top: 22.5%;
+			left: 0;
+			right: 0;
+			margin: auto;
+			transform: scale(0.5);
+			transform-origin: 0 0;
+			pointer-events: none;
+			box-sizing: border-box;
+			opacity: 0.7;
+			background-color: #FFFFFF;
+		}
+	}
+
+
+
+	/* 图标容器15 start */
+	.icon15 {
+		&__item {
+			width: 30%;
+
+			border-radius: 10rpx;
+			padding: 30rpx;
+			margin: 20rpx 10rpx;
+			transform: scale(1);
+			transition: transform 0.3s linear;
+			transform-origin: center center;
+
+			&--icon {
+				width: 100rpx;
+				height: 100rpx;
+				font-size: 50rpx;
+				border-radius: 50%;
+				margin-bottom: 18rpx;
+				position: relative;
+				z-index: 1;
+
+				&::after {
+					content: " ";
+					position: absolute;
+					z-index: -1;
+					width: 100%;
+					height: 100%;
+					left: 0;
+					bottom: 0;
+					border-radius: inherit;
+					opacity: 1;
+					transform: scale(1, 1);
+					background-size: 100% 100%;
+
+
+				}
+			}
+		}
+	}
+
+	/* 按钮 */
+	.button-1 {
+		background-color: rgba(0, 0, 0, 0.15);
+		position: fixed;
+		/* bottom:200rpx;
+      right: 20rpx; */
+		top: 25%;
+		right: 30rpx;
+		z-index: 1001;
+		border-radius: 100px;
+	}
+
+	.button-2 {
+		background-color: rgba(0, 0, 0, 0.15);
+		position: fixed;
+		/* bottom:200rpx;
+      right: 20rpx; */
+		top: 35%;
+		right: 30rpx;
+		z-index: 1001;
+		border-radius: 100px;
+	}
+
+	.button-3 {
+		background-color: rgba(0, 0, 0, 0.15);
+		position: fixed;
+		/* bottom:200rpx;
+      right: 20rpx; */
+		top: 45%;
+		right: 30rpx;
+		z-index: 1001;
+		border-radius: 100px;
+	}
+
+
+	/* 用户头像 start */
+	.logo-image {
+		width: 100rpx;
+		height: 100rpx;
+		position: relative;
+	}
+
+	.logo-pic {
+		background-size: cover;
+		background-repeat: no-repeat;
+		// background-attachment:fixed;
+		background-position: top;
+		border: 6rpx solid rgba(255, 255, 255, 0.25);
+		box-shadow: 0rpx 0rpx 80rpx 0rpx rgba(0, 0, 0, 0.15);
+		border-radius: 50%;
+		overflow: hidden;
+		// background-color: #FFFFFF;
+	}
+
+	/* 底部tabbar start*/
+	/* 毛玻璃*/
+	.dd-glass {
+		width: 100%;
+		backdrop-filter: blur(20rpx);
+		-webkit-backdrop-filter: blur(20rpx);
+	}
+
+	.footerfixed {
+		position: fixed;
+		// margin: 20rpx;
+		margin: 40rpx 5%;
+		width: 90%;
+		bottom: calc(env(safe-area-inset-bottom) / 2);
+		;
+		z-index: 999;
+		background-color: rgba(0, 0, 0, 0.15);
+		box-shadow: 0rpx 0rpx 30rpx 0rpx rgba(0, 0, 0, 0.07);
+	}
+
+	.tabbar {
+		display: flex;
+		align-items: center;
+		min-height: 110rpx;
+		justify-content: space-between;
+		padding: 0;
+		height: calc(110rpx + env(safe-area-inset-bottom) / 2);
+		// padding-bottom: calc(env(safe-area-inset-bottom) / 2);
+	}
+
+	.tabbar .action {
+		font-size: 22rpx;
+		position: relative;
+		flex: 1;
+		text-align: center;
+		padding: 0;
+		display: block;
+		height: auto;
+		line-height: 1;
+		margin: 0;
+		overflow: initial;
+	}
+
+	.tabbar .action .bar-icon {
+		width: 100rpx;
+		position: relative;
+		display: block;
+		height: auto;
+		margin: 0 auto 10rpx;
+		text-align: center;
+		font-size: 42rpx;
+	}
+
+	.tabbar .action .bar-icon image {
+		width: 50rpx;
+		height: 50rpx;
+		display: inline-block;
+	}
+
+
+	/* 全屏轮播  start*/
+	.card-swiper {
+		height: 100vh !important;
+	}
+
+	.card-swiper swiper-item {
+		width: 750rpx !important;
+		left: 0rpx;
+		box-sizing: border-box;
+		overflow: initial;
+		background: #000;
+	}
+
+	.card-swiper swiper-item .swiper-item {
+		// width: 100%;
+		// display: block;
+		// height: 100vh;
+		// border-radius: 0rpx;
+		// transform: scale(0.9);
+		// transition: all 0.2s ease-in 0s;
+		// will-change: transform;
+		// overflow: hidden;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		height: 100%;
+		background: #000;
+	}
+
+	.card-swiper swiper-item.cur .swiper-item {
+		transform: scale(1);
+		transition: all 0.2s ease-in 0s;
+		will-change: transform;
+	}
+
+	.image-banner {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.image-banner image {
+		width: 100%;
+		// height: 100%;
+	}
+
+	/* 轮播指示点 start*/
+	.indication {
+		z-index: 9999;
+		width: 100%;
+		height: 36rpx;
+		position: fixed;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.spot {
+		background-color: #FFFFFF;
+		opacity: 0.6;
+		width: 10rpx;
+		height: 10rpx;
+		border-radius: 20rpx;
+		top: calc(-280rpx - env(safe-area-inset-bottom) / 2);
+		top: calc(-280rpx - constant(safe-area-inset-bottom));
+		margin: 0 8rpx !important;
+		position: relative;
+	}
+
+	.spot.active {
+		opacity: 1;
+		width: 30rpx;
+		background-color: #FFFFFF;
+	}
+
+	.lazy-load {
+		background: #000;
+		display: grid;
+		align-items: center;
+		padding-bottom: env(safe-area-inset-bottom);
+		// height: 100%;
+	}
+
+	.lazy-load view {
+		width: 100%;
+
+	}
+
+	.lazy-loading {
+		background: #000;
+		height: 100%;
+
+	}
+
+	.drawing {
+		position: absolute;
+		top: 46%;
+		// color: #606266;
+		font-size: 18px;
+	}
+
+	.progress {
+		position: absolute;
+		top: 52%;
+		width: 60%;
+	}
+
+	.preloader_1 {
+		position: absolute;
+		// right: 8%;
+		// bottom: 12%;
+		// position: fixed;
+		// right: 58%;
+		margin-right: 65px;
+		top: 42%;
+	}
+
+	.preloader_1 view {
+		display: block;
+		bottom: 0px;
+		width: 9px;
+		height: 5px;
+		background: #9b59b6;
+		position: absolute;
+		animation: preloader_1 1.5s infinite ease-in-out;
+	}
+
+	.preloader_1 view:nth-child(2) {
+		left: 11px;
+		animation-delay: .2s;
+	}
+
+	.preloader_1 view:nth-child(3) {
+		left: 22px;
+		animation-delay: .4s;
+	}
+
+	.preloader_1 view:nth-child(4) {
+		left: 33px;
+		animation-delay: .6s;
+	}
+
+	.preloader_1 view:nth-child(5) {
+		left: 44px;
+		animation-delay: .8s;
+	}
+
+	@keyframes preloader_1 {
+		0% {
+			height: 5px;
+			transform: translateY(0px);
+			background: #9b59b6;
+		}
+
+		25% {
+			height: 30px;
+			transform: translateY(15px);
+			background: #3498db;
+		}
+
+		50% {
+			height: 5px;
+			transform: translateY(0px);
+			background: #9b59b6;
+		}
+
+		100% {
+			height: 5px;
+			transform: translateY(0px);
+			background: #9b59b6;
+		}
+	}

+ 596 - 0
pages/painting/ys.vue

xqd
@@ -0,0 +1,596 @@
+<template>
+	<view class="template-details">
+		<block v-if="showdrawing">
+			<u-notice-bar v-if="drawingtitle=='正在努力绘制中...'||drawingtitle=='图片正在渲染中...'" :text="noticebar" step
+				bgColor="#000"></u-notice-bar>
+			<view class="lazy-loading tn-flex justify-center align-center flex-wrap">
+				<view class="preloader_1">
+					<view></view>
+					<view></view>
+					<view></view>
+					<view></view>
+					<view></view>
+				</view>
+				<view class="drawing">
+					{{drawingtitle}}
+				</view>
+				<view v-if="showprogress" class="progress">
+					<u-line-progress :percentage="percentage" activeColor="#9b59b6" height="18"></u-line-progress>
+				</view>
+			</view>
+		</block>
+
+		<swiper class="card-swiper" :circular="false" :autoplay="true" duration="500" interval="12000"
+			@change="cardSwiper">
+			<swiper-item v-for="(item,index) in swiperList" :key="index" :class="cardCur==index?'cur':''">
+				<view class="lazy-load" :style="{height: windowHeight+'px'}">
+					<u--image @load="previewload" @error="previewerror" width="100%" height="100%" :src="item"
+						mode="widthFix">
+						<view slot="error" style="font-size: 32rpx;text-align: center;">
+							图片加载失败
+						</view>
+					</u--image>
+				</view>
+			</swiper-item>
+		</swiper>
+
+		<view class="tabbar footerfixed dd-glass tn-color-white" style="border-radius: 100rpx;">
+			<view class="action" @click="getisback">
+				<view class="bar-icon">
+					<view class="tn-icon-left-circle">
+					</view>
+					<!-- <image class="" src='https://tnuiimage.tnkjapp.com/tabbar/a1.png'></image> -->
+				</view>
+				<view class="">立即返回</view>
+			</view>
+			<view class="action" @click="getdownload(cardCur)">
+				<view class="bar-icon">
+					<view class="tn-icon-download">
+					</view>
+					<!-- <image class="" src='https://tnuiimage.tnkjapp.com/tabbar/k2.png'></image> -->
+				</view>
+				<view class="">下载/分享</view>
+			</view>
+
+			<!-- 	<view class="action" @click="parameters">
+				<view class="bar-icon">
+					<view class="tn-icon-creative">
+					</view>
+				</view>
+				<view class="">绘画参数</view>
+			</view> -->
+
+
+			<view class="action" @click="preViewImg(1)" v-if="true">
+				<view class="bar-icon">
+					<view class="tn-icon-image">
+					</view>
+				</view>
+				<view class="">上传模板图</view>
+			</view>
+
+			<view class="action" @click="preViewImg(2)" v-if="true
+		">
+				<view class="bar-icon">
+					<view class="tn-icon-image">
+					</view>
+				</view>
+				<view class="">上传照片</view>
+			</view>
+		</view>
+
+	</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 {
+				showdrawing: true,
+				drawingtitle: '正在努力绘制中...',
+				showprogress: false,
+				percentage: 0,
+				noticebar: ['精美图片需要时间打磨,预计20-30秒左右出图',
+					'图片生成中请不要退出此页面,否则可能会无法生成'
+					// '长时间未出图?可稍后在 我的-绘画记录 里查看'
+				],
+				tobheight: 45,
+				parmas: null,
+
+
+				show1: false,
+				show2: true,
+				cardCur: 0,
+				swiperList: [],
+				form: {},
+				parameter: {},
+
+				parameterid: 0,
+				showopen: false,
+				failnum: 0,
+				windowHeight: 0,
+
+				engin: '',
+
+				progress: 0,
+				isDowload: false,
+				show: false,
+
+				sd_keywords: '',
+			}
+		},
+		async onLoad(o) {
+			// this.parmas = JSON.parse(o.ysParmas)
+			this.parmas = getApp().ysParmas
+			var that = this;
+			this.windowHeight = uni.$u.sys().windowHeight - 60
+			// this.parmas = {
+			// 	templateUrl: "https://zhengda.oss-accelerate.aliyuncs.com/new_fanyun/0d47db66-1faf-42df-a732-22cf18697a65.jpg",
+			// 	userUrl: "https://oaigc.oss-cn-chengdu.aliyuncs.com/20240205/d4f3699caf01faecdf37fc8d3573975b.jpg"
+			// }
+			console.log('接收的生成参数', this.parmas);
+
+			// return
+			let res = await this.$http('ys.addFaceTask', this.parmas)
+
+			console.log('提交艺术照任务返回值---', res);
+			if (res.code == 0) {
+				// this.showdrawing = false
+
+				this.swiperList = [res.msg.image_url]
+
+				console.log('this.swiperList--------------', this.swiperList);
+			}
+
+		},
+		onUnload() {
+			clearTimeout(timingr);
+			clearTimeout(asynchronous);
+		},
+
+		methods: {
+			preViewImg(type) {
+				if (type == 1) {
+					uni.previewImage({
+						urls: [this.parmas.templateUrl],
+						longPressActions: {
+							itemList: ['发送给朋友', '保存图片', '收藏'],
+							success: function(data) {},
+							fail: function(err) {
+								console.log(err.errMsg);
+							}
+						}
+					});
+				} else {
+					uni.previewImage({
+						urls: [this.parmas.userUrl],
+						longPressActions: {
+							itemList: ['发送给朋友', '保存图片', '收藏'],
+							success: function(data) {},
+							fail: function(err) {
+								console.log(err.errMsg);
+							}
+						}
+					});
+				}
+			},
+			parameters() {
+				var that = this;
+				// if(that.showdrawing){
+				// 	uni.showToast({
+				// 		title:'图片生成中',
+				// 		icon:'none'
+				// 	})
+				// 	return;
+				// }
+				that.show1 = true
+
+			},
+			setOpen() {
+				var that = this;
+				if (that.showdrawing) {
+					uni.showToast({
+						title: '图片生成中',
+						icon: 'none'
+					})
+					return;
+				}
+				if (that.showopen) {
+					uni.showToast({
+						title: '图片已公开',
+						icon: 'none'
+					})
+					return;
+				}
+				uni.showModal({
+					confirmColor: '#207CF7',
+					confirmText: '确认公开',
+					title: '提示',
+					content: '是否确认公开此绘画作品',
+					success(src) {
+						if (src.confirm) {
+							that.$http('gallery.setOpen', {
+								id: that.parameterid
+							}).then(res => {
+								if (res.code == 0) {
+									uni.showToast({
+										title: '提交成功,等待审核'
+									})
+									that.showopen = true
+								}
+							});
+						}
+					}
+				});
+			},
+			gallerydetail(id) {
+				let that = this;
+				this.$http('gallery.detail', {
+					id: id
+				}).then(res => {
+					if (res.code == 0) {
+
+						console.log('获取到的图片详情返回值:', res);
+						// this.showdrawing = false
+
+						this.parameter = res.data
+
+						//this.parameter.prompt =
+						//'https://mjcdn.iduomi.cc/attachments/1124768570157564029/1129053571321712670/erinramirez_In_a_Chinese_ancient_garden_a_lady_is_playing_the_t_cff28ad6-6f7e-44f0-a7bb-2a8724e573f2.png 关键词测试测'
+						// this.parameter.prompt = '123'
+
+
+						if (this.parameter.prompt.includes('http') && this.parameter.prompt.includes('.png')) {
+							this.parameter.refImg = this.parameter.prompt.split('.png')[0] + '.png'
+
+							// 创作相似去参考图提示词
+							let tempKeyWord = ''
+							this.parameter.prompt.split('.png').forEach((item, index) => {
+								if (!item.includes('http')) {
+									tempKeyWord += item
+								}
+							})
+							this.parameter.promptSame = tempKeyWord
+							this.parameter.prompt = tempKeyWord
+						} else if (this.parameter.prompt.includes('http') && this.parameter.prompt.includes(
+								'.jpeg')) {
+							this.parameter.refImg = this.parameter.prompt.split('.jpeg')[0] + '.jpeg'
+
+							// 创作相似去参考图提示词
+							let tempKeyWord = ''
+							this.parameter.prompt.split('.jpeg').forEach((item, index) => {
+								if (!item.includes('http')) {
+									tempKeyWord += item
+								}
+							})
+							this.parameter.promptSame = tempKeyWord
+							this.parameter.prompt = tempKeyWord
+						} else if (this.parameter.prompt.includes('http') && this.parameter.prompt.includes(
+								'.jpg')) {
+							this.parameter.refImg = this.parameter.prompt.split('.jpg')[0] + '.jpg'
+
+							// 创作相似去参考图提示词
+							let tempKeyWord = ''
+							this.parameter.prompt.split('.jpg').forEach((item, index) => {
+								if (!item.includes('http')) {
+									tempKeyWord += item
+								}
+							})
+							this.parameter.promptSame = tempKeyWord
+							this.parameter.prompt = tempKeyWord
+						} else {
+							this.parameter.promptSame = this.parameter.prompt
+						}
+
+
+
+						console.log('创作相似prompt', this.parameter.promptSame);
+
+
+						if (this.engin == 'sd') {
+							for (var i = 0; i < res.data.imgs_file.length; i++) {
+								var url = {
+									id: i,
+									type: 'image',
+									url: res.data.imgs_file[i],
+								}
+								that.swiperList.push(url)
+
+							}
+							this.done = true
+						} else {
+							var url = {
+								id: 0,
+								type: 'image',
+								url: res.data.origin_url,
+							}
+							that.swiperList.push(url)
+							this.done = true
+						}
+					} else {
+
+					}
+				});
+			},
+			aiPlay() {
+				let that = this;
+				this.showdrawing = true
+				if (that.failnum == 0) {
+					this.progressbar()
+				}
+
+				this.$http('gallery.create', this.form).then(res => {
+					if (res.code == 0) {
+						this.showTask(res.data.id)
+					} else {
+						uni.hideToast()
+						uni.showModal({
+							confirmText: '退出',
+							showCancel: false,
+							confirmColor: '#207CF7',
+							title: '提示',
+							content: res.msg,
+							success(tit) {
+								if (tit.confirm) {
+									uni.navigateBack()
+								}
+							}
+						})
+					}
+
+				});
+			},
+			progressbar() {
+				var that = this;
+				if (that.percentage < 99) {
+					timingr = setTimeout(() => {
+						that.percentage = uni.$u.range(0, 99, that.percentage + 1)
+						that.progressbar()
+					}, 300);
+				} else {
+					clearTimeout(timingr);
+				}
+			},
+			showTask(id) {
+				let that = this;
+				this.$http('gallery.getOpensdDetail', {
+					id: id,
+				}).then(res => {
+					if (res.code == 0) {
+						if (res.data.state == "success") {
+							this.percentage = 99
+							this.drawingtitle = '图片正在渲染中,请不要退出此页面'
+							this.parameterid = res.data.id
+							this.done = true
+							clearTimeout(asynchronous);
+							var url = {
+								id: 0,
+								type: 'image',
+								url: res.data.gen_img,
+							}
+							that.swiperList.push(url)
+						} else if (res.data.state == "in_create") {
+							asynchronous = setTimeout(() => {
+								that.showTask(id)
+							}, 1000);
+							return;
+						} else if (res.data.state == "in_wait") {
+							asynchronous = setTimeout(() => {
+								that.showTask(id)
+							}, 1000);
+							return;
+						} else {
+							uni.showModal({
+								confirmText: '退出',
+								showCancel: false,
+								confirmColor: '#207CF7',
+								title: '提示',
+								content: res.msg,
+								success(tit) {
+									if (tit.confirm) {
+										uni.navigateBack()
+									}
+								}
+							})
+						}
+					} else {
+						uni.showModal({
+							confirmText: '退出',
+							showCancel: false,
+							confirmColor: '#207CF7',
+							title: '提示',
+							content: res.msg,
+							success(tit) {
+								if (tit.confirm) {
+									uni.navigateBack()
+								}
+							}
+						})
+					}
+				})
+			},
+			previewload() {
+				// console.log('ch');
+				this.showdrawing = false
+				this.percentage = 0
+			},
+			previewerror() {
+				this.showdrawing = false
+				this.percentage = 0
+			},
+			preview(e) {
+				uni.previewImage({
+					urls: [e]
+				})
+			},
+			is_weixin() {
+				var ua = window.navigator.userAgent.toLowerCase();
+				if (ua.match(/MicroMessenger/i) == 'micromessenger') {
+					console.log('微信浏览器');
+					return true;
+				} else {
+					console.log("不是微信浏览器");
+					return false;
+				}
+			},
+			//下载分享
+			getdownload(index) {
+				if (this.showdrawing) {
+					uni.showToast({
+						title: '图片生成中',
+						icon: 'none'
+					})
+					return;
+				}
+
+				uni.showModal({
+					showCancel: false,
+					title: '提示',
+					content: '请在微信内置浏览器打开,长按图片下载/分享',
+					confirmColor: '#207CF7'
+				})
+				return
+				console.log('要下载的图片地址:', this.swiperList[0]);
+
+				let url = this.swiperList[0]
+				// return
+				const detectDeviceType = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i
+					.test(
+						navigator.userAgent) ? false : true;
+				if (this.is_weixin()) {
+					uni.showModal({
+						showCancel: false,
+						title: '提示',
+						content: '请在微信内置浏览器打开,长按图片下载/分享',
+						confirmColor: '#207CF7'
+					})
+				} else {
+					if (detectDeviceType()) {
+						let _this = this
+
+						// if (_this.isDowload) {
+						// 	uni.showToast({
+						// 		icon: 'none',
+						// 		title: '请等待上一个视频下载完成后,再下载',
+						// 	});
+						// }
+						// PC端
+						// this.delItem.url = 'http://www.liwantao.top/test.mp4'
+
+						const downloadTask = uni.downloadFile({
+							url, //文件链接
+							timeout: 99999999,
+							success: (res) => {
+								if (res.statusCode === 200) {
+									var oA = document.createElement("a");
+									// oA.download = _this.delItem.name; // 设置下载的文件名,默认是'下载'	
+									oA.href = res.tempFilePath; //临时路径再保存到本地
+									document.body.appendChild(oA);
+									oA.click();
+									oA.remove(); // 下载之后把创建的元素删除
+								}
+							},
+							fail: (err) => {
+								_this.show = false;
+								_this.isDowload = false
+								_this.progress = 0
+
+								// console.log(_this.show, _this.isDowload, _this.progress, err);
+								uni.showToast({
+									icon: 'none',
+									mask: true,
+									title: '失败请重新下载',
+								});
+							},
+						})
+
+						downloadTask.onProgressUpdate((res) => {
+							if (res.progress > 0) {
+								_this.show = true;
+								_this.isDowload = true
+							}
+							_this.progress = res.progress;
+							if (res.progress == 100) {
+								_this.show = false;
+								_this.isDowload = false
+								_this.progress = 0
+
+								uni.showToast({
+									icon: 'success',
+									title: '图片下载成功!',
+								});
+							}
+						})
+					} else {
+						uni.showModal({
+							showCancel: false,
+							title: '提示',
+							content: '请在微信内置浏览器打开,长按图片下载/分享',
+							confirmColor: '#207CF7'
+						})
+						return
+						// 其他移动端浏览器
+						// window.open(this.delItem.url)
+
+						let _this = this
+						// this.delItem.url = 'http://www.liwantao.top/test.mp4'
+
+						var oA = document.createElement("a");
+						// oA.download = _this.delItem.name;
+						oA.href = url;
+						document.body.appendChild(oA);
+						oA.click();
+						oA.remove();
+					}
+				}
+			},
+			getisback() {
+
+				uni.navigateBack()
+
+			},
+			// 跳转
+			tn(e) {
+				// console.log(e);
+				uni.navigateTo({
+					url: e,
+				});
+			},
+
+			// cardSwiper
+			cardSwiper(e) {
+				// console.log(e.detail);
+				this.cardCur = e.detail.current
+			},
+
+			// 弹出压屏窗
+			showLandscape() {
+				this.openLandscape()
+			},
+			// 打开压屏窗
+			openLandscape() {
+				this.show1 = true
+			},
+			// 关闭压屏窗
+			closeLandscape() {
+				this.show1 = false
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import './ys.scss';
+</style>

+ 4 - 1
pages/signin/signin.vue

xqd
@@ -1,6 +1,9 @@
 <template>
 	<view>
-
+		<view style="color: #000000;">
+			<tn-nav-bar backgroundColor="#ffffff" :bottomShadow="false">每日任务</tn-nav-bar>
+			<view :style="{height: tobheight+'px'}"></view>
+		</view>
 		<!-- <view style="color: #fff;z-index: 99999999;position: relative;">
 			<tn-nav-bar :bottomShadow="false" backgroundColor="#207CF7">数智员工</tn-nav-bar>
 			<view :style="{height: tobheight+'px'}"></view>

+ 67 - 0
pages/template/detail.scss

xqd
@@ -1,3 +1,70 @@
+.addFix{
+	position: fixed;
+	top: 0;
+	left: 0;
+	z-index: 9999999999;
+}
+
+.leadBg{
+		position: absolute;
+		width: 100vw;
+		height: 100vh;
+		left: 0;
+		top: 0;
+		z-index: 9999;
+		background: rgba(0, 0, 0, .69);
+		// padding-left: 38rpx;
+		// padding-right: 38rpx;
+		
+		display: flex;
+		justify-content: center;
+		.leadBox1{
+			// margin-bottom: 138rpx;
+			width: 674rpx;
+			height: 980rpx;
+			background-image: url(@/static/yy_lead2.png);
+			background-size: cover;
+			margin-top: 280rpx;
+			position: relative;
+			
+			.nextBtn{
+				width: 350rpx;
+				height: 140rpx;
+				// background: red;
+				
+				position: absolute;
+				right: 0;
+				bottom: 0rpx;
+			}
+		}
+		.leadBox2{
+			width: 634rpx;
+			// width: 100%;
+			height: 1226rpx;
+			background-image: url(@/static/yy_lead.png);
+			background-size: cover;
+			// margin-top: 400rpx;
+			// position: relative;
+			
+			margin-left: -60rpx;
+			position: absolute;
+			
+			bottom: 0;
+			
+			.nextBtn{
+				width: 350rpx;
+				height: 140rpx;
+				// background: green;
+				position: absolute;
+				right: 0;
+				bottom:330rpx;
+			}
+		}
+	}	
+
+
+
+
 .quesTemBox{
 	display: flex;
 	// justify-content: center;

+ 35 - 0
pages/template/detail.vue

xqd xqd xqd xqd xqd
@@ -4,6 +4,18 @@
 			<tn-nav-bar @back="handleBack" backgroundColor="#F5FFFD" :bottomShadow="false">应用</tn-nav-bar>
 			<view :style="{ height: tobheight + 'px' }"></view>
 		</view>
+		<div class="addFix" v-if="showInitLead">
+			<div class="leadBg">
+				<div class="leadBox1" v-if="showLead1">
+					<div class="nextBtn" @click="nextLead">
+					</div>
+				</div>
+				<div class="leadBox2" v-if="showLead2">
+					<div class="nextBtn" @click="finishLead">
+					</div>
+				</div>
+			</div>
+		</div>
 
 		<wike-skeleton :count="5" v-if="!info.title"></wike-skeleton>
 		<!-- 提问模版新布局 -->
@@ -94,6 +106,8 @@
 		<!-- 暂时注释 -->
 		<wike-modal-qrcode :qrcode="gzhqrcode" :showconcern="showconcern"
 			@concernclose="concernclose"></wike-modal-qrcode>
+
+
 	</view>
 </template>
 
@@ -120,6 +134,10 @@
 	export default {
 		data() {
 			return {
+				showInitLead: false,
+				showLead2: false,
+				showLead1: true,
+
 				placeholder: '请输入关键词或问题...',
 				preQues: '',
 
@@ -329,6 +347,9 @@
 			this.systemwechat()
 		},
 		onLoad(o) {
+			this.showInitLead = !uni.getStorageSync('showInitLead_yy2')
+			console.log("uni.getStorageSync('showInitLead')", uni.getStorageSync('showInitLead_yy2'));
+
 			if (this.platform == 'wxMiniProgram') {
 				var menumtop = uni.getMenuButtonBoundingClientRect().top - uni.getSystemInfoSync().statusBarHeight;
 				var paddingtop = uni.getSystemInfoSync().statusBarHeight + menumtop;
@@ -476,6 +497,20 @@
 			}
 		},
 		methods: {
+			nextLead() {
+				// this.showLead1 = false
+				// this.showLead2 = true
+
+				this.showInitLead = false
+				this.showLead1 = false
+				uni.setStorageSync('showInitLead_yy2', true)
+			},
+			finishLead() {
+				this.showInitLead = false
+				this.showLead2 = false
+				uni.setStorageSync('showInitLead_yy2', true)
+			},
+
 			handleBack() {
 				getApp().lastPage = 'templateDes'
 			},

+ 66 - 0
pages/template/template.scss

xqd
@@ -1,3 +1,69 @@
+.addFix{
+	position: fixed;
+	top: 0;
+	left: 0;
+	z-index: 9999999999;
+}
+
+.leadBg{
+		position: absolute;
+		width: 100vw;
+		height: 100vh;
+		left: 0;
+		top: 0;
+		z-index: 9999;
+		background: rgba(0, 0, 0, .69);
+		// padding-left: 38rpx;
+		// padding-right: 38rpx;
+		
+		display: flex;
+		justify-content: center;
+		.leadBox1{
+			// margin-bottom: 138rpx;
+			width: 674rpx;
+			height: 1054rpx;
+			background-image: url(@/static/yy_lead.png);
+			background-size: cover;
+			margin-top: 280rpx;
+			position: relative;
+			
+			.nextBtn{
+				width: 350rpx;
+				height: 140rpx;
+				// background: red;
+				
+				position: absolute;
+				right: 0;
+				bottom: 0rpx;
+			}
+		}
+		.leadBox2{
+			width: 634rpx;
+			// width: 100%;
+			height: 1226rpx;
+			background-image: url(@/static/yy_lead.png);
+			background-size: cover;
+			// margin-top: 400rpx;
+			// position: relative;
+			
+			margin-left: -60rpx;
+			position: absolute;
+			
+			bottom: 0;
+			
+			.nextBtn{
+				width: 350rpx;
+				height: 140rpx;
+				// background: green;
+				position: absolute;
+				right: 0;
+				bottom:330rpx;
+			}
+		}
+	}	
+
+
+
 .searchBox{
 	padding: 32rpx;
 	

+ 35 - 1
pages/template/template.vue

xqd xqd xqd xqd xqd
@@ -1,5 +1,19 @@
 <template>
 	<view>
+		<div class="addFix" v-if="showInitLead">
+			<div class="leadBg">
+				<div class="leadBox1" v-if="showLead1">
+					<div class="nextBtn" @click="nextLead">
+					</div>
+				</div>
+				<div class="leadBox2" v-if="showLead2">
+					<div class="nextBtn" @click="finishLead">
+					</div>
+				</div>
+			</div>
+		</div>
+
+
 		<wike-skeleton :count="4" v-if="list.length === 0"></wike-skeleton>
 		<!-- 新增顶部搜索框 -->
 		<view class="searchBox">
@@ -85,7 +99,6 @@
 		<u-modal @cancel="handleCancel" @confirm="handleConfirm" cancelText='退出登录' showCancelButton :show="showFixInfo"
 			confirmColor="#26b3a0" confirmText="完善信息" title="请完善个人手机号信息后使用本应用"
 			content='您已充值,但未绑定手机号,请完善信息以方便为您提供进一步的服务'></u-modal>
-
 	</view>
 </template>
 
@@ -102,6 +115,10 @@
 	export default {
 		data() {
 			return {
+				showInitLead: false,
+				showLead2: false,
+				showLead1: true,
+
 				searchKey: '',
 				searchList: [],
 
@@ -131,6 +148,9 @@
 		},
 
 		onLoad() {
+			this.showInitLead = !uni.getStorageSync('showInitLead_yy')
+			console.log("uni.getStorageSync('showInitLead')", uni.getStorageSync('showInitLead_yy'));
+
 			var that = this;
 
 			this.getList();
@@ -192,6 +212,20 @@
 			clearInterval(time2);
 		},
 		methods: {
+			nextLead() {
+				// this.showLead1 = false
+				// this.showLead2 = true
+
+				this.showInitLead = false
+				this.showLead1 = false
+				uni.setStorageSync('showInitLead_yy', true)
+			},
+			finishLead() {
+				this.showInitLead = false
+				this.showLead2 = false
+				uni.setStorageSync('showInitLead_yy', true)
+			},
+
 			async getSearchList(search) {
 				this.$http('template.list', {
 					search

+ 8 - 16
pages/user/commission/team.vue

xqd xqd
@@ -61,6 +61,14 @@
 										绘图次数
 									</view>
 								</view>
+								<view class="item">
+									<view class="num">
+										{{item.digit_count}}
+									</view>
+									<view class="txt">
+										数字人次数
+									</view>
+								</view>
 								<view class="item">
 									<view class="num">
 										{{Number(item.payTotal).toFixed(2) }}
@@ -70,22 +78,6 @@
 									</view>
 								</view>
 							</view>
-							<!-- <view class="item-bottom u-flex u-row-between">
-								<view class="time">{{ item.create_time }}</view>
-								<view class="from-text">来自链接分享</view>
-							</view>
-							<view class="item-bottom u-flex u-row-between">
-								<view class="time">问答次数</view>
-								<view class="from-text">{{item.question_count}}</view>
-							</view>
-							<view class="item-bottom u-flex u-row-between">
-								<view class="time">绘图次数</view>
-								<view class="from-text">{{item.gallery_count}}</view>
-							</view>
-							<view class="item-bottom u-flex u-row-between">
-								<view class="time">充值金额</view>
-								<view class="from-text">{{item.payTotal}}</view>
-							</view> -->
 						</view>
 					</view>
 

+ 18 - 1
pages/user/user.vue

xqd xqd xqd xqd
@@ -116,6 +116,14 @@
 			<!-- 用户功能 -->
 			<view class="com-item">
 				<view class="com-wrap">
+
+					<view class="cell" @click="toFenxiao">
+						<view class="cell-left">
+							<u-icon :isJianBian="true" name="coupon-fill" color="#e83a30" size="22"></u-icon>
+							<view class="cell-text">{{fenxiaoInfo.title}}</view>
+						</view>
+						<u-icon name="arrow-right" color="#9e9e9e" size="18"></u-icon>
+					</view>
 					<view class="cell" @click="toEmployee">
 						<view class="cell-left">
 							<u-icon :isJianBian="true" name="coupon-fill" color="#e83a30" size="22"></u-icon>
@@ -642,6 +650,8 @@
 				plan: {},
 				show_ios_pay: false,
 				device: this.$platform.device(),
+
+				fenxiaoInfo: null
 				// commission_alias:'分销中心'
 			};
 		},
@@ -847,7 +857,9 @@
 								url: '/pages/user/commission/index',
 								color: '#ffca28'
 							};
-							this.userList.splice(0, 0, obj);
+							// this.userList.splice(0, 0, obj);
+
+							this.fenxiaoInfo = obj
 						}
 						if (this.appInfo.is_aipainting && this.appInfo.is_aipainting == 1) {
 							let draw = {
@@ -958,6 +970,11 @@
 					},
 					this.appInfo.gap ? this.appInfo.gap * 1000 : 12000
 				);
+			},
+			toFenxiao() {
+				uni.navigateTo({
+					url: this.fenxiaoInfo.url
+				})
 			}
 		}
 	};

二進制
static/arrD.png


二進制
static/b_camera.png


二進制
static/b_info.png


二進制
static/b_seled.png


二進制
static/modal.png


二進制
static/szr_lead.png


二進制
static/szr_lead1.png


二進制
static/szr_lead2.png


二進制
static/yy_lead.png


二進制
static/yy_lead2.png