李万涛 2 лет назад
Родитель
Сommit
5e110917e7

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

xqd
@@ -626,6 +626,7 @@ page {
 						flex-direction: column;
 						justify-content: center;
 						align-items: center;
+						
 						image{
 							width: 128rpx;
 							height: 128rpx;

+ 4 - 3
pages/painting/details.vue

xqd
@@ -381,16 +381,17 @@
 							type: 'view',
 							css: {
 								position: 'absolute',
-								left: '24rpx',
-								top: '24rpx',
+								left: '50%',
 							},
 							views: [{
 								src: mainUrl,
 								type: "image",
 								css: {
-									width: 705 + 'rpx',
 									height: 936 + 'rpx',
 									borderRadius: '28rpx',
+									transform: 'translateX(-50%)',
+									marginTop: "28rpx",
+									maxWidth: '705rpx'
 								}
 							}, ],
 						},

+ 1443 - 0
pages/painting/details1.vue

xqd
@@ -0,0 +1,1443 @@
+<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.url"
+						mode="widthFix">
+						<view slot="error" style="font-size: 32rpx;text-align: center;">
+							图片加载失败
+						</view>
+					</u--image>
+				</view>
+			</swiper-item>
+		</swiper>
+		<view class="indication">
+			<block v-for="(item,index) in swiperList" :key="index">
+				<view v-if="swiperList.length>1" class="spot" :class="cardCur==index?'active':''"></view>
+			</block>
+		</view>
+
+		<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>
+				</view>
+				<view class="">立即返回</view>
+			</view>
+
+			<view class="action" @click="getdownload(cardCur)">
+				<view class="bar-icon">
+					<view class="tn-icon-download">
+					</view>
+				</view>
+				<view class="">下载/分享</view>
+			</view>
+
+			<view class="action" @click="preViewImg_ys(1)" v-if="engin=='rh'">
+				<view class="bar-icon">
+					<view class="tn-icon-image">
+					</view>
+				</view>
+				<view class="">模板</view>
+			</view>
+
+			<view class="action" @click="preViewImg_ys(2)" v-if="engin=='rh'">
+				<view class="bar-icon">
+					<view class="tn-icon-image">
+					</view>
+				</view>
+				<view class="">照片</view>
+			</view>
+
+
+			<view class="action" @click="parameters" v-if="engin!='rh'">
+
+				<view class="bar-icon">
+					<view class="tn-icon-creative">
+					</view>
+				</view>
+				<view class="">绘画参数</view>
+			</view>
+
+
+			<view class="action" @click="preViewImg(1)" v-if="parameter.refImg&&$Route.query.urls">
+				<view class="bar-icon">
+					<view class="tn-icon-image">
+					</view>
+				</view>
+				<view class="">参考图</view>
+			</view>
+
+			<view class="action" @click="preViewImg(2)" v-if="form.init_image
+">
+				<view class="bar-icon">
+					<view class="tn-icon-image">
+					</view>
+				</view>
+				<view class="">参考图</view>
+			</view>
+
+			<view v-if="show2" class="action"
+				@click="tn(engin!='rh'?'/pages/painting/draw?prompt='+parameter.promptSame+'&engine='+engin+'&model_name='+parameter.model_name+'&refImg='
+	+parameter.refImg:'/pages/painting/draw?rh_modalId='+(parameter.templateId?parameter.templateId:-1)+'&rh_modalurl='+parameter.source_image_url)">
+				<view class="tn-flex-direction-column tn-flex-row-center tn-flex-col-center tn-button--clear-style">
+					<view class="bar-icon">
+						<view class="tn-icon-write">
+						</view>
+					</view>
+					<view class="">创作相似</view>
+				</view>
+			</view>
+			<view v-else class="action" @click="setOpen">
+				<view class="tn-flex-direction-column tn-flex-row-center tn-flex-col-center tn-button--clear-style">
+					<view class="bar-icon">
+						<view class="tn-icon-up-circle">
+						</view>
+					</view>
+					<view class="">{{showopen?'已公开':'公开作品'}}</view>
+				</view>
+			</view>
+		</view>
+
+
+		<tn-landscape :show="show1" @close="closeLandscape" closePosition="bottom" :closeSize="60">
+			<view class="tn-color-white" style="width: 100vw;">
+
+				<view class="" style="margin: 120rpx 60rpx;">
+					<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>
+					<view v-if="parameter.prompt&&$Route.query.urls"
+						class="tn-flex tn-flex-row-between tn-flex-col-between tn-margin-top-xl tn-text-justify">
+						<text class="">描述词:{{parameter.prompt}}</text>
+					</view>
+					<view v-if="form.keywords"
+						class="tn-flex tn-flex-row-between tn-flex-col-between tn-margin-top-xl tn-text-justify">
+						<text class="">描述词:{{form.keywords}}</text>
+					</view>
+					<view v-if="parameter.model_name"
+						class="tn-flex tn-flex-row-between tn-flex-col-between tn-margin-top-xl tn-text-justify">
+						<text class="">模型:{{form.name?form.name:parameter.model_name}}</text>
+					</view>
+					<view v-if="parameter.width"
+						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>
+			</view>
+		</tn-landscape>
+		<u-popup :show="show" @close="close" @open="open" mode="center">
+			<view
+				style="background: rgba(0, 0, 0, 0);width: 300rpx;height: 300rpx;display: flex;align-items: center;flex-direction: column;justify-content: center;color:#207CF7;">
+				<l-circularProgress :isBgShow="true" :lineWidth="10" boxWidth="100" boxHeight="100"
+					progressColor="#207CF7" fontColor="#207CF7" gradualColor="#207CF7"
+					:percent="progress"></l-circularProgress>
+				<view class="">
+					图片下载中...
+				</view>
+			</view>
+		</u-popup>
+
+		<wike-painter style="height:1px;margin-top: -9999999px;" :board="posterObj" @done="posterSuccess"
+			ref="painter"></wike-painter>
+	</view>
+</template>
+
+<script>
+	import {
+		mapMutations,
+		mapActions,
+		mapState,
+		mapGetters
+	} from 'vuex';
+	let timingr;
+	let asynchronous;
+	// 判断是否为微信环境
+	// const isWechat = () => {
+	// 	return String(navigator.userAgent.toLowerCase().match(/MicroMessenger/i)) === "micromessenger";
+	// }
+	export default {
+		data() {
+			return {
+				tobheight: 45,
+				showdrawing: true,
+				showprogress: true,
+				drawingtitle: '正在努力绘制中...',
+				percentage: 0,
+				show1: false,
+				show2: true,
+				cardCur: 0,
+				swiperList: [],
+				form: {},
+				parameter: {},
+				noticebar: ['精美图片需要时间打磨,预计20-30秒左右出图',
+					'图片生成中请不要退出此页面,否则可能会无法生成'
+					// '长时间未出图?可稍后在 我的-绘画记录 里查看'
+				],
+				parameterid: 0,
+				showopen: false,
+				failnum: 0,
+				windowHeight: 0,
+				engin: '',
+				progress: 0,
+				isDowload: false,
+				show: false,
+				sd_keywords: '',
+
+
+				// 生成海报data
+				platform: this.$platform.get(),
+
+				qrcode: '',
+				spmplatform: 0,
+				posterObj: {},
+				info: {
+					// poster_bg_img_path:"",
+
+					poster_bg_width: 347,
+					poster_bg_height: 574,
+
+					poster_qrcode_x: 278,
+					poster_qrcode_y: 495,
+					poster_qrcode_width: 52,
+					poster_qrcode_height: 52,
+				},
+			}
+		},
+
+		// 生成海报需要的数据由此开始
+		computed: {
+			...mapGetters(['appInfo', 'homeTemplate', 'isLogin', 'userInfo', 'userData'])
+		},
+		onShow() {
+			console.log('this.userInfo-----------------', this.option, this.userInfo);
+		},
+		onLoad(o) {
+			this.spmplatform = ['H5', 'wxOfficialAccount', 'wxMiniProgram', 'App'].indexOf(this.platform) + 1;
+			// this.commonqrcodePath()
+
+			var that = this;
+			this.windowHeight = uni.$u.sys().windowHeight - 60
+			this.engin = that.$Route.query.from
+			if (that.$Route.query.urls) {
+				this.showprogress = false
+				this.drawingtitle = '图片正在加载中...'
+				that.gallerydetail(that.$Route.query.urls)
+			}
+			if (that.$Route.query.form) {
+				this.form = that.$Route.query.form
+				console.log('生成绘画的参数:', this.form);
+				this.parameter.refImg = this.form.refer_img
+				this.parameter.prompt = this.form.init_image + this.form.prompt
+				this.parameter.model_name = this.form.model_id
+				this.parameter.width = this.form.width
+				this.parameter.height = this.form.height
+				this.parameter.engine = 'sd'
+				this.show2 = false
+				this.sd_keywords = this.form.keywords
+				this.aiPlay();
+			}
+		},
+		methods: {
+			preViewImg_ys(type) {
+				if (type == 1) {
+					uni.previewImage({
+						urls: [this.parameter.source_image_url],
+						longPressActions: {
+							itemList: ['发送给朋友', '保存图片', '收藏'],
+							success: function(data) {},
+							fail: function(err) {
+								console.log(err.errMsg);
+							}
+						}
+					});
+				} else {
+					uni.previewImage({
+						urls: [this.parameter.target_image_url],
+						longPressActions: {
+							itemList: ['发送给朋友', '保存图片', '收藏'],
+							success: function(data) {},
+							fail: function(err) {
+								console.log(err.errMsg);
+							}
+						}
+					});
+				}
+			},
+			downloadPic(e) {
+				return new Promise((resolve, reject) => {
+					uni.request({
+						url: e,
+						method: 'GET',
+						responseType: 'arraybuffer',
+						success: ress => {
+							let base64 = uni.arrayBufferToBase64(ress.data);
+							base64 = 'data:image/jpeg;base64,' + base64
+							resolve(base64);
+						},
+						fail: (e) => {
+							resolve('fail');
+						}
+					})
+				});
+			},
+			commonqrcodePath() {
+				let spm = this.userInfo.id + '.1.0.' + this.spmplatform + '.1';
+				// console.log(spm);
+				this.$http('common.qrcodePath', {
+					spm: spm
+				}).then(res => {
+					if (res.code == 0) {
+						this.qrcode = res.data;
+						this.createPoster()
+						console.log('二维码需要包含的url信息=============', this.qrcode);
+					}
+				});
+			},
+			async createPoster(e) {
+				let that = this;
+
+				let avatarUrl = '';
+				let mainUrl = '';
+				uni.showLoading({
+					title: '海报渲染中'
+				});
+
+				console.log("that.swiperList[0].url,that.userInfo.avatar", that.userInfo, that.swiperList[0].url, that
+					.userInfo.avatar);
+
+
+				if (that.swiperList[0].url.indexOf("https") < 0) {
+					mainUrl = await that.downloadPic(that.swiperList[0].url.replace("http:", "https:"));
+				} else {
+					mainUrl = await that.downloadPic(that.swiperList[0].url);
+				}
+				if (mainUrl == 'fail') {
+					uni.hideLoading();
+					uni.showToast({
+						title: '生成失败',
+						icon: 'none'
+					})
+					return;
+				}
+				that.userInfo.avatar =
+					"https://face.cdn.zhishuyun.com/attachments/1133012400174534792/1204009950465101866/0d47db66-1faf-42df-a732-22cf18697a65_ins.png?ex=65d32ca5&is=65c0b7a5&hm=7219a0f250453314cfbf9eefaf2e927ba8d6adea944774b3fe32e67c0787a877&"
+				if (that.userInfo.avatar) {
+					if (that.userInfo.avatar.indexOf("https") < 0) {
+						avatarUrl = await that.downloadPic(that.userInfo.avatar.replace("http:", "https:"));
+					} else {
+						avatarUrl = await that.downloadPic(that.userInfo.avatar);
+					}
+					if (avatarUrl == 'fail') {
+						uni.hideLoading();
+						uni.showToast({
+							title: '生成失败',
+							icon: 'none'
+						})
+						return;
+					}
+				}
+
+				let proportionally = this.info.poster_bg_width / uni.$u.sys().windowWidth;
+				(this.posterObj = {
+					width: (this.info.poster_bg_width / proportionally) + 'px',
+					height: (this.info.poster_bg_height / proportionally) + 'px',
+					background: 'rgba(0,0,0,0)',
+					borderRadius: '16rpx',
+					views: [
+						// 背景图
+						{
+							src: '/static/shareBg.png',
+							type: "image",
+							css: {
+								width: (this.info.poster_bg_width / proportionally) + 'px',
+								height: (this.info.poster_bg_height / proportionally) + 'px',
+							}
+						},
+						// 主图
+						{
+							type: 'view',
+							css: {
+								position: 'absolute',
+								left: '24rpx',
+								top: '24rpx',
+							},
+							views: [{
+								src: mainUrl,
+								type: "image",
+								css: {
+									width: 705 + 'rpx',
+									height: 936 + 'rpx',
+									borderRadius: '28rpx',
+								}
+							}, ],
+						},
+
+
+						// 头像
+						{
+							type: 'view',
+							css: {
+								display: 'flex',
+								position: 'absolute',
+								left: '24rpx',
+								top: '1060rpx',
+
+							},
+							views: [{
+								type: 'image',
+								src: that.userInfo.avatar ? avatarUrl : '/static/images/head.jpg',
+								css: {
+									marginTop: '-80rpx',
+									borderRadius: '50%',
+									width: '94rpx',
+									height: '94rpx',
+									objectFit: 'cover'
+								}
+							}, ],
+						},
+						// 昵称
+						{
+							type: 'view',
+							css: {
+								display: 'flex',
+								position: 'absolute',
+								left: '140rpx',
+								bottom: '196rpx',
+
+							},
+							views: [{
+								type: 'text',
+								text: that.userInfo.nickname ? that.userInfo.nickname : '默认用户',
+								css: {
+									fontSize: '28rpx',
+									color: '#333333',
+								}
+							}],
+						},
+
+						// 海报文案1
+						{
+							type: 'view',
+							css: {
+								display: 'flex',
+								position: 'absolute',
+								left: '24rpx',
+								bottom: '96rpx',
+
+							},
+							views: [{
+								type: 'text',
+								text: '免费体验Al生成个人质感艺术照',
+								css: {
+									fontSize: '32rpx',
+									color: '#333333',
+								}
+							}],
+						},
+						// 海报文案2
+						{
+							type: 'view',
+							css: {
+								display: 'flex',
+								position: 'absolute',
+								left: '24rpx',
+								bottom: '44rpx',
+
+							},
+							views: [{
+								type: 'text',
+								text: '设计微信/抖音/小红书专属头像',
+								css: {
+									fontSize: '32rpx',
+									color: '#333333',
+								}
+							}],
+						},
+
+						// 二维码上方文案
+						{
+							type: 'view',
+							css: {
+								position: 'absolute',
+								right: '40rpx',
+								bottom: '196rpx',
+							},
+							views: [{
+								type: 'text',
+								text: '微信扫码',
+								css: {
+									fontSize: '24rpx',
+									color: '#333333',
+								}
+							}],
+						},
+						{
+							type: 'view',
+							css: {
+								left: (this.info.poster_qrcode_x / proportionally) + 'px',
+								top: (this.info.poster_qrcode_y / proportionally) + 'px',
+								position: 'fixed',
+
+							},
+							views: [{
+									type: 'qrcode',
+									text: this.qrcode,
+									css: {
+										width: (this.info.poster_qrcode_width / proportionally) + 'px',
+										height: (this.info.poster_qrcode_width / proportionally) + 'px',
+										background: '#fff'
+									}
+								},
+								// {
+								// 	src: '/static/images/fanyunLogo.png',
+								// 	type: "image",
+								// 	css: {
+								// 		position: 'absolute',
+								// 		width: 30 + 'rpx',
+								// 		height: 30 + 'rpx',
+
+								// 		left: '44rpx',
+								// 		top: '44rpx',
+
+								// 	}
+								// }
+							],
+						},
+					]
+				}),
+				(
+					this.showPoster = true,
+					// this.revertUrl()
+
+					setTimeout(() => {
+						that.$refs.painter.canvasToTempFilePathSync({
+							// 在nvue里是jpeg
+							fileType: 'jpg',
+							quality: 1,
+							success: res => {
+								console.log('res.tempFilePath', res.tempFilePath);
+								// uni.showModal({
+								// 	title: '提示',
+								// 	content: '查看图片后长按图片即可保存或分享',
+								// 	confirmText: '查看',
+								// 	confirmColor: '#1F79F0',
+								// 	success: function(res2) {
+								// 		if (res2.confirm) {
+								uni.previewImage({
+									urls: [res.tempFilePath],
+									longPressActions: {
+										itemList: ['发送给朋友', '保存图片',
+											'收藏'
+										],
+										success: function(data) {},
+										fail: function(err) {
+											console.log(err
+												.errMsg);
+										}
+									}
+								});
+								// 		} else if (res2.cancel) {
+								// 			console.log('用户点击取消');
+								// 		}
+								// 	}
+								// });
+							}
+						})
+					}, 1000)
+				);
+			},
+			posterSuccess() {
+				uni.hideLoading();
+			},
+			// 生成海报需要的数据到此为止
+
+
+			preViewImg(type) {
+				if (type == 1) {
+					uni.previewImage({
+						urls: [this.parameter.refImg],
+						longPressActions: {
+							itemList: ['发送给朋友', '保存图片', '收藏'],
+							success: function(data) {},
+							fail: function(err) {
+								console.log(err.errMsg);
+							}
+						}
+					});
+				} else {
+					uni.previewImage({
+						urls: [this.form.init_image],
+						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,
+					type: this.engin
+				}).then(res => {
+					if (res.code == 0) {
+
+						if (this.engin == 'sd') {
+							for (var i = 0; i < res.data.imgs_file.length; i++) {
+								var url = {
+									id: res.data.id,
+									type: 'image',
+									url: res.data.imgs_file[i],
+									// url: res.data.origin_url,
+								}
+								that.swiperList.push(url)
+							}
+							this.done = true
+						} else if (this.engin == 'mj') {
+							var url = {
+								id: res.data.id,
+								type: 'image',
+								url: res.data.origin_url,
+							}
+							that.swiperList.push(url)
+							this.done = true
+						} else if (this.engin == 'rh') {
+							var url = {
+								id: res.data.id,
+								type: 'image',
+								url: res.data.imgs_file[0],
+							}
+							that.swiperList.push(url)
+
+							console.log("this.engin == 'rh'====", res.data.imgs_file, that.swiperList);
+							this.done = true
+
+							this.commonqrcodePath()
+						}
+
+						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('进入这里了没有', this.parameter.promptSame);
+					} 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;
+				}
+				// if (!this.is_weixin()) {
+				// 	return uni.showModal({
+				// 		showCancel: false,
+				// 		title: '提示',
+				// 		content: '请在微信内置浏览器打开,长按图片下载/分享',
+				// 		confirmColor: '#207CF7'
+				// 	})
+				// }
+				this.createPoster()
+				return
+
+				uni.showModal({
+					showCancel: false,
+					title: '提示',
+					content: '请在微信内置浏览器打开,长按图片下载/分享',
+					confirmColor: '#207CF7'
+				})
+				return
+
+				if (this.engin == 'mj') {
+					uni.showModal({
+						showCancel: false,
+						title: '提示',
+						content: '请在微信内置浏览器打开,长按图片下载/分享',
+						confirmColor: '#207CF7'
+					})
+					return
+				}
+
+				console.log('要下载的图片地址:', this.parameter.imgs_file[index]);
+
+				let url = this.parameter.imgs_file[index]
+				// 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() {
+				if (!this.done) {
+					uni.showModal({
+						confirmColor: '#207CF7',
+						confirmText: '立即退出',
+						title: '提示',
+						content: '图片生成中,退出此页面后可能无法生成',
+						success(src) {
+							if (src.confirm) {
+								uni.navigateBack()
+							}
+						}
+					})
+				} else {
+					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
+			},
+		},
+		onUnload() {
+			clearTimeout(timingr);
+			clearTimeout(asynchronous);
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	// .shareBox {
+	// 	position: fixed;
+	// 	top: 0;
+	// 	left: 0;
+	// 	height: 100vh;
+	// 	width: 100vw;
+	// 	background: red;
+	// 	z-index: 9999999;
+	// }
+
+	.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;
+		}
+	}
+</style>

+ 12 - 11
pages/painting/draw.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -167,7 +167,7 @@
 			</div>
 		</view>
 
-		<view class="directask" v-if="current!=0">
+		<view class="directask" v-if="current!=0" style="padding-top: 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">
@@ -199,14 +199,15 @@
 					</view>
 					<view class="bar">
-						{{item.title=='官方V5.1'?'二次元模型':'三次元写实'}}
+						{{item.title=='官方V5.1'?'卡通动漫':'真实风格'}}
 					</view>
 				</view>
 			</view>
 
 
 
-			<view class="cu-form-group" :style="engineid != 0 ? 'margin-top: 20rpx' : ''">
+			<view class="cu-form-group" :style="engineid != 0 ? 'margin-top: 20rpx' : ''"
+				style="padding-top: 0;padding-bottom: 0;">
 				<view class="cu-title flxe align-center justify-between">
 					<view class="title flxe align-center">画面描述</view>
 				</view>
@@ -241,8 +242,8 @@
 			</view>
 
 
-			<!-- sd展示 -->
-			<view v-if="showmj==2" class="cu-form-group">
+			<!-- mj和sd展示 -->
+			<view v-if="showmj!=0" class="cu-form-group" style="padding-top: 0;padding-bottom: 0;">
 				<view class="cu-title">
 					<view class="title flxe align-center">图片比例</view>
 				</view>
@@ -271,7 +272,7 @@
 				</view>
 			</view>
 			<!-- sd和mj都要展示 -->
-			<view class="cu-form-group">
+			<view class="cu-form-group" style="padding-top: 0;padding-bottom: 0;">
 				<view class="cu-title">
 					<view class="title flxe align-center">参考图(可选)</view>
 				</view>
@@ -288,7 +289,7 @@
 				</view>
 			</view>
 			<!-- sd和mj都要展示 -->
-			<view class="cu-form-group" v-if="current!=0">
+			<view class="cu-form-group" v-if="current!=0" style="padding-top: 0;padding-bottom: 0;">
 				<view class="cu-title">
 					<view class="title flxe align-center">生成数量</view>
 				</view>
@@ -430,7 +431,7 @@
 		data() {
 			return {
 				// 艺术照
-				tipList: ['五官清晰', '人像证明', '人脸无遮挡', '照片清晰'],
+				tipList: ['五官清晰', '人像正面', '人脸无遮挡', '照片清晰'],
 
 				showUpLoading1: false,
 				showUpLoading2: false,
@@ -467,7 +468,7 @@
 				],
 				seledStyle: '国风',
 
-				seledSex: '',
+				seledSex: '',
 
 				showRule: false,
 				showThem: false,
@@ -579,7 +580,7 @@
 
 			console.log('isLogin================', this.isLogin);
 			this.getTempLiast({
-				sex: 1,
+				// sex: 1,
 				init: true
 			})
 
@@ -738,7 +739,7 @@
 							id: -1,
 							title: '全部'
 						}
-						this.seledSex = ''
+						this.seledSex = '全部'
 					}
 					// 当没有点击创作相似,直接进入时
 					if (!this.$Route.query.rh_modalurl) {

+ 0 - 817
pages/painting/draw2.scss

xqd
@@ -1,817 +0,0 @@
-.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;
-			}
-		}
-	}

+ 0 - 1219
pages/painting/draw2.vue

xqd
@@ -1,1219 +0,0 @@
-<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>

+ 4 - 3
pages/painting/generate.vue

xqd
@@ -399,16 +399,17 @@
 							type: 'view',
 							css: {
 								position: 'absolute',
-								left: '24rpx',
-								top: '24rpx',
+								left: '50%',
 							},
 							views: [{
 								src: mainUrl,
 								type: "image",
 								css: {
-									width: 705 + 'rpx',
 									height: 936 + 'rpx',
 									borderRadius: '28rpx',
+									transform: 'translateX(-50%)',
+									marginTop: "28rpx",
+									maxWidth: '705rpx'
 								}
 							}, ],
 						},

+ 5 - 3
pages/painting/ys.vue

xqd
@@ -292,20 +292,22 @@
 							}
 						},
 						// 主图
+						// 主图
 						{
 							type: 'view',
 							css: {
 								position: 'absolute',
-								left: '24rpx',
-								top: '24rpx',
+								left: '50%',
 							},
 							views: [{
 								src: mainUrl,
 								type: "image",
 								css: {
-									width: 705 + 'rpx',
 									height: 936 + 'rpx',
 									borderRadius: '28rpx',
+									transform: 'translateX(-50%)',
+									marginTop: "28rpx",
+									maxWidth: '705rpx'
 								}
 							}, ],
 						},

+ 4 - 4
pages/user/commission/index.scss

xqd xqd
@@ -9,9 +9,9 @@
 	
 	padding-top: 50rpx;
 	.haibao{
-		width: 50%;
-		height: 40vh;
-		margin-bottom: 30rpx;
+		width: 60%;
+		// height: 40vh;
+		margin-bottom: 130rpx;
 	}
 	.bgList{
 		padding-left: 30rpx;
@@ -22,7 +22,7 @@
 		width: 100%;
 		// background: red;
 		
-		margin-bottom: 100rpx;
+		margin-bottom: 30rpx;
 		.item{
 			width: 16vw;
 			height: 200rpx;

+ 3 - 0
pages/user/commission/index.vue

xqd
@@ -463,6 +463,9 @@
 				uni.showLoading({
 					title: '海报渲染中'
 				});
+
+				// that.poster_bg_img_path =
+				// 	"https://mjcdn.iduomi.cc/attachments/1124768570157564029/1132713072260292789/oreynolds_Portrait_retouching_DSLR_effect_green_small_and_fresh_98e8b936-ca9b-45e4-89cd-3d3cd7fd8a60.png"
 				console.log('that.poster_bg_img_path', that.poster_bg_img_path);
 				// if (that.poster_bg_img_path.indexOf("https") < 0) {
 				// 	httpsurl = await that.getdownload(that.poster_bg_img_path.replace("http:", "https:"));

+ 770 - 0
pages/user/commission/index1.vue

xqd
@@ -0,0 +1,770 @@
+<template>
+	<view>
+		<view style="color: #000000;">
+			<tn-nav-bar backgroundColor="#ffffff" :bottomShadow="false">{{commission_alias}}</tn-nav-bar>
+			<view :style="{height: tobheight+'px'}"></view>
+		</view>
+		<view style="width:100%;height: 100%;padding-right: 30rpx;">
+
+			<view class="commission-wrap" :class="{ blur: !hasAuth }">
+				<!-- 用户资料 -->
+				<view class="user-card">
+					<view class="card-top u-flex u-row-between">
+						<view class="u-flex">
+							<view class="head-img-box">
+								<image class="head-img" :src="userInfo.avatar?userInfo.avatar:'/static/images/head.jpg'"
+									mode=""></image>
+							</view>
+							<view class="u-flex-col">
+								<view class="user-name">{{ userInfo.nickname }}</view>
+								<view class="user-info-box u-flex">
+									<view class="tag-box u-flex">
+										<!-- <image v-if="commissionLv.image" class="tag-img" :src="commissionLv.image" mode=""></image> -->
+										<text class="tag-title">{{ commissionLv.name }}</text>
+										<!-- <view v-show="showLv" class="u-iconfont uicon-arrow-right" style="color: #fff;font-size: 28rpx;"></view> -->
+									</view>
+								</view>
+							</view>
+						</view>
+						<view class="u-flex-col">
+							<view class="u-flex-col u-col-center">
+								<button class="u-reset-button log-btn u-m-b-20" @tap="toTeam">明细</button>
+								<button class="u-reset-button look-btn" @tap="showMoney = !showMoney">
+									<!-- <view class="u-iconfont" :class="showMoney ? 'uicon-eye-fill' : 'uicon-eye-off'" style="color: #fff;font-size: 50rpx;"></view> -->
+									<u-icon :name="showMoney ? 'eye-fill':'eye-off'" color="#fff" size="22"></u-icon>
+								</button>
+							</view>
+						</view>
+					</view>
+					<!-- 收益 -->
+					<view class="card-bottom u-flex">
+						<view class="u-flex-1 ">
+							<view class="item-title">累计收入</view>
+							<view class="item-detail">{{showMoney? money_total || 0.00:'****'}}</view>
+						</view>
+						<view class="u-flex-1 u-col-center">
+							<view class="item-title">待入账佣金</view>
+							<view class="item-detail">{{showMoney? on_cashout_money || 0.00:'****'}}</view>
+						</view>
+					</view>
+				</view>
+
+				<!-- 滚动明细 -->
+				<view class="commission-log">
+					<scroll-view scroll-y="true" @scrolltolower="loadMore" class="scroll-box log-scroll">
+						<view class="log-item-box u-flex u-row-between" v-for="item in commissionLog" :key="item.id"
+							@tap="$u.toast(item.remark)">
+							<view class="log-item-wrap">
+								<view class="log-item u-flex u-ellipsis-1 u-col-center">
+									<view class="u-flex u-col-center ">
+										<!-- <image
+											class="log-img"
+											:src="item.oper_type !== 'user' ? logMap[item.oper_type] : item.oper ? item.oper.avatar : logMap['admin']"
+											mode=""
+										></image> -->
+										<!-- <image class="log-img" :src="appInfo.site_logo_path" mode=""></image> -->
+										<image class="log-img" :src="item.oper" mode=""></image>
+									</view>
+									<view class="log-text u-ellipsis-1">{{ item.remark }}</view>
+								</view>
+							</view>
+							<text class="log-time">{{ item.createtime }}</text>
+						</view>
+						<!-- 更多 -->
+						<!-- <view class="loadmore-wrap" v-if="commissionLog.length"><u-loadmore :status="loadStatus" icon-type="flower" color="#f6f6f6" /></view> -->
+					</scroll-view>
+				</view>
+
+				<!-- 功能菜单 -->
+				<view class="menu-box u-flex">
+					<view class="menu-item u-flex-col u-col-center" v-for="(menu, index) in menuList"
+						v-if="!menu.isAgentFrom" :key="index" @tap="jump(menu.path)">
+						<image class="item-img" :src="menu.img" mode=""></image>
+						<view class="item-title">{{ menu.title }}</view>
+					</view>
+					<!-- #ifdef H5 -->
+					<view @click="createPoster" class="menu-item u-flex-col u-col-center">
+						<image class="item-img" src="https://file.shopro.top/imgs/commission/commission_icon5.png"
+							mode=""></image>
+						<view class="item-title">分享海报</view>
+					</view>
+
+
+					<view @click="sharelink" class="menu-item u-flex-col u-col-center">
+						<image class="item-img" src="https://file.shopro.top/imgs/commission/commission_icon7.png"
+							mode=""></image>
+						<view class="item-title">分享链接</view>
+					</view>
+					<!-- #endif -->
+				</view>
+				<!-- #ifdef H5 -->
+				<!-- <view class="bill">
+					<u-button @click="createPoster" color="#ffc107" type="primary" shape="circle" text="推广海报"></u-button>
+				</view> -->
+				<!-- #endif -->
+
+
+			</view>
+
+			<!-- 佣金中心权限验证 -->
+			<u-popup class="auth-box" :mask="false" v-model="showAuthModal" mode="center" :mask-close-able="false"
+				close-icon-pos="top-left" border-radius="20">
+				<view class="notice-box">
+					<view class="img-wrap">
+						<image class="notice-img" :src="authNotice.img" mode=""></image>
+					</view>
+					<view class="notice-title">{{ authNotice.title }}</view>
+					<view class="notice-detail">{{ authNotice.detail }}</view>
+					<button class="u-reset-button notice-btn"
+						@tap="onAuthBtn(authNotice.btnPath)">{{ authNotice.btnText }}</button>
+					<button class="u-reset-button back-btn" @tap="$Router.back()" v-if="!authNotice.hideBtn">返回</button>
+					<button class="u-reset-button back-btn" @tap="hasAuth = true" v-else>取消</button>
+				</view>
+			</u-popup>
+
+			<!-- 成为分销商条件 -->
+			<u-popup v-if="showTerm" class="into-agent-modal" :bgStyle="{
+					background: 'none'
+				}" v-model="showTerm" mode="center" :mask="false" :mask-close-able="false">
+				<view class="condition-box u-flex u-row-center u-col-center">
+					<!-- 金额人数 -->
+					<view class="goods-condition u-flex u-row-between" v-if="showMoneyTerm">
+
+						<view class="btn-box u-flex-col u-p-20 u-col-center">
+							<button class="u-reset-button buy-btn u-m-b-10" @tap="$Router.back()">知道了</button>
+							<view class="tips">* 满足指定消费金额即可成为分销商</view>
+						</view>
+					</view>
+				</view>
+			</u-popup>
+		</view>
+		<u-popup :show="showPoster" mode="bottom" @close="showPoster = false">
+			<!-- <view :style="{height: tobheight+'px'}"></view> -->
+			<scroll-view scroll-y="true" :style="{maxHeight: posterheight +'px'}">
+
+
+
+				<view class="haibaoBox">
+					<image :src="genBgHaibaoUrl" mode="" class="haibao"></image>
+
+					<view class="bgList">
+						<image
+							@click="currBgIndex=index;poster_bg_img_path=info.poster_bg_img_path[index];createPoster();"
+							:src="item" mode="" class="item" :class="[currBgIndex==index?'item_a':'']" v-for="(item,index) in info.poster_bg_img_path.slice(0,5)
+"></image>
+					</view>
+					<view style="height: 78px;"></view>
+					<view class="dygbhg">
+						<view class="whole" @click="showPoster = false">取消</view>
+						<view class="distinguish" @click="toSave">保存/分享</view>
+					</view>
+				</view>
+			</scroll-view>
+		</u-popup>
+		<wike-painter :board="posterObj" style="height: 1px;margin-top: -99999999999999999999999px;"
+			@done="posterSuccess" ref="painter"></wike-painter>
+		<wike-loading-page :isLoading="isLoading"></wike-loading-page>
+	</view>
+</template>
+
+<script>
+	import {
+		mapMutations,
+		mapActions,
+		mapState,
+		mapGetters
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				currBgIndex: 0,
+
+				isLoading: true,
+				tobheight: 45,
+				platform: this.$platform.get(),
+				showAuthModal: true,
+				empty: false,
+				team: [{
+					headimg: 'https://dev.iduomi.cc/attachment/headimg_2.jpg?time=1673514485',
+					nickname: '多级火箭好',
+					times: '2020/12/24'
+				}, {
+					headimg: 'https://dev.iduomi.cc/attachment/headimg_2.jpg?time=1673514485',
+					nickname: '多级火箭好',
+					times: '2020/12/24'
+				}, {
+					headimg: 'https://dev.iduomi.cc/attachment/headimg_2.jpg?time=1673514485',
+					nickname: '多级火箭好',
+					times: '2020/12/24'
+				}],
+				pages: 1,
+				currentTab: 0,
+				navbar: [{
+						name: "下一级",
+						type: 'shareuid'
+					}, {
+						name: "下下级",
+						type: 'shareuid_grandpa'
+					},
+					// {
+					// 	name: "下三级",
+					// 	type:'shareuid_great_grandpa'
+					// },
+				],
+				showShare: false, //是否显示分享海报
+				showMoney: true, //是否显示金额
+				hasAuth: true, //是否有权限
+				commissionLv: {
+					name: '合伙人'
+				},
+				//合伙人等级
+				commissionWallet: null, //合伙人钱包
+				agentFrom: null, //是否显示我的资料
+				showLv: true,
+				commissionLog: [{
+					id: 1,
+					oper_type: 'gf',
+					// oper: 'https://file.shopro.top/imgs/commission/commission_icon1.png',
+					oper: require('@/static/images/fanyunLogo.png'),
+					remark: '恭喜您成为了合伙人',
+					createtime: 1676428876
+				}], //动态
+				loadStatus: 'loadmore', //loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
+				currentPage: 1,
+				lastPage: 1,
+				logMap: {
+					system: this.$IMG_URL + '/imgs/commission/commission_base_notice.png',
+					admin: this.$IMG_URL + '/imgs/commission/commission_base_avatar.png'
+				},
+				showTerm: true, //条件弹窗
+				showGoodsTerm: false, //商品条件
+				showMoneyTerm: false, //金额条件
+				goodsTermList: [],
+				moneyTermNum: 0,
+				authNotice: {},
+				menuList: [
+					//menu
+					{
+						img: 'https://file.shopro.top/imgs/commission/commission_icon1.png',
+						title: '我的团队',
+						path: '/pages/user/commission/team'
+					},
+					{
+						img: 'https://file.shopro.top/imgs/commission/commission_icon2.png',
+						title: '佣金明细',
+						path: '/pages/user/commission/commission-log'
+					},
+					{
+						img: 'https://file.shopro.top/imgs/commission/commission_icon4.png',
+						title: '推广套餐',
+						path: '/pages/user/commission/goods',
+
+					},
+					{
+						img: 'https://file.shopro.top/imgs/commission/commission_icon3.png',
+						title: '提现佣金',
+						path: '/pages/user/commission/withdraw',
+
+					},
+
+
+					// {
+					// 	img: 'https://file.shopro.top/imgs/commission/commission_icon6.png',
+					// 	title: '排行榜',
+					// 	path: '/pages/user/commission/rankings'
+					// },
+					{
+						img: 'https://file.shopro.top/imgs/commission/commission_icon8.png',
+						title: '提现记录',
+						path: '/pages/user/commission/withdraw-log',
+
+					},
+					// {
+					// 	img: 'https://file.shopro.top/imgs/commission/commission_icon5.png',
+					// 	title: '分享海报',
+					// 	path: '/pages/user/commission/withdraw',
+					// },
+					// {
+					// 	img: 'https://file.shopro.top/imgs/commission/commission_icon7.png',
+					// 	title: '分享记录',
+					// 	path: '/pages/app/commission/share-log',
+
+					// }
+				],
+				money_total: '0.00',
+				on_cashout_money: '0.00',
+				showPoster: false,
+				posterObj: {},
+				posterfff: '您好,我是AI语言模型,可以帮助你做很多事情。例如:\n- 回答你的问题\n- 给你提供某些信息\n- 帮你搜索网页\n- 聊天和闲聊\n- 玩一些小游戏\n- 计算数学题\n- 翻译语言\n- 生成文本\n等等.....\n如果你有任何问题或需要帮助,请随时告诉我。',
+				spmplatform: 0,
+				is_examine: 1,
+				commission_price: 0,
+				info: {},
+				posterheight: 0,
+				poster_bg_img_path: '',
+				commission_alias: '',
+
+
+
+				genBgHaibaoUrl: ''
+			}
+		},
+		computed: {
+			...mapGetters(['appInfo', 'isLogin', 'userInfo'])
+		},
+		onLoad() {
+			// this.getInviteList()
+
+			const that = this;
+
+			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)
+			}
+			this.posterheight = uni.$u.sys().windowHeight - this.tobheight
+			this.spmplatform = ['H5', 'wxOfficialAccount', 'wxMiniProgram', 'App'].indexOf(this.platform) + 1;
+
+			this.commonqrcodePath()
+			// console.log('http://vmoushivideomerge.oss-cn-shanghai.aliyuncs.com/20230422/96f1f662dcfc68cb3eff1dcbf660ed92.jpg');
+			// that.$base64.imageUrlToBase64('http://vmoushivideomerge.oss-cn-shanghai.aliyuncs.com/20230422/96f1f662dcfc68cb3eff1dcbf660ed92.jpg')
+
+		},
+		onShow() {
+
+			this.islogin();
+
+
+		},
+		methods: {
+			islogin() {
+				var that = this;
+				if (!this.isLogin) {
+					uni.navigateTo({
+						url: '../user/signin'
+					});
+				} else {
+					this.commission()
+					// this.getCheck()
+				}
+
+			},
+			commission() {
+				let that = this;
+				that.$http('conf.getGroupConf', {
+					group: 'system.commission'
+				}).then(res => {
+					if (res.code === 0) {
+						// res.data.poster_bg_img_path = [
+						// 	"https://face.cdn.zhishuyun.com/attachments/1133012400174534792/1204009950465101866/0d47db66-1faf-42df-a732-22cf18697a65_ins.png?ex=65d32ca5&is=65c0b7a5&hm=7219a0f250453314cfbf9eefaf2e927ba8d6adea944774b3fe32e67c0787a877&",
+						// 	"https://face.cdn.zhishuyun.com/attachments/1133012400174534792/1204010768786526248/a38d536d-7950-400c-bbc7-b37cd86c8de1_ins.png?ex=65d32d68&is=65c0b868&hm=fd5db147a0eb2e6b13719e1acc3f240a3a5ab8e81358df06c86808b68d0b0923"
+						// ]
+						that.info = res.data
+						that.poster_bg_img_path = res.data.poster_bg_img_path[0]
+						// uni.showToast({
+						// 	title: that.poster_bg_img_path
+						// })
+						console.log('生成海报需要的info信息=============', that.info);
+						that.commission_alias = res.data.commission_alias ? res.data.commission_alias : '分销中心'
+						if (res.data.is_examine) {
+							that.is_examine = res.data.is_examine
+							// console.log(that.is_examine);
+						}
+						if (res.data.commission_price) {
+							that.commission_price = res.data.commission_price
+						}
+						if (res.data.is_ranking == 1) {
+							if (that.menuList.length == 5) {
+								let obj = {
+									img: 'https://file.shopro.top/imgs/commission/commission_icon6.png',
+									title: '排行榜',
+									path: '/pages/user/commission/rankings'
+								};
+								that.menuList.splice(2, 0, obj);
+							}
+						}
+						that.getCheck()
+					}
+				});
+			},
+			commonqrcodePath() {
+				let spm = this.userInfo.id + '.1.0.' + this.spmplatform + '.1';
+				// console.log(spm);
+				this.$http('common.qrcodePath', {
+					spm: spm
+				}).then(res => {
+					if (res.code == 0) {
+						this.qrcode = res.data;
+						console.log('二维码需要包含的信息======', this.qrcode);
+
+						// setTimeout(() => {
+						// 	this.createPoster()
+						// }, 2000)
+					}
+				});
+			},
+			sharelink() {
+				let spm = this.userInfo.id + '.1.0.' + this.spmplatform + '.1';
+				// #ifdef MP-WEIXIN
+				let url = '/pages/index/index?' + 'spm=' + spm
+				uni.setClipboardData({
+					data: url,
+					success: function() {
+						uni.showToast({
+							title: '复制链接成功'
+						});
+					}
+				});
+				// #endif
+				// #ifdef H5
+				let uniacid = uni.getStorageSync('uniacid');
+				if (uniacid) {
+					let url = window.location.href.split('/h5')[0] + '/h5/?uniacid=' + uniacid + '&spm=' + spm;
+					uni.setClipboardData({
+						data: url,
+						success: function() {
+							uni.showToast({
+								title: '复制链接成功'
+							});
+						}
+					});
+				} else {
+					uni.showToast({
+						title: '复制链接失败',
+						icon: 'none'
+					})
+				}
+				// #endif
+
+			},
+			getdownload(e) {
+				return new Promise((resolve, reject) => {
+					uni.request({
+						url: e,
+						method: 'GET',
+						responseType: 'arraybuffer',
+						success: ress => {
+							let base64 = wx.arrayBufferToBase64(ress.data);
+							base64 = 'data:image/jpeg;base64,' + base64
+							resolve(base64);
+						},
+						fail: (e) => {
+							resolve('fail');
+						}
+					})
+				});
+			},
+			posterSuccess() {
+				uni.hideLoading();
+			},
+			async createPoster(e) {
+				let that = this;
+				let httpsurl = '';
+				uni.showLoading({
+					title: '海报渲染中'
+				});
+				console.log('that.poster_bg_img_path', that.poster_bg_img_path);
+				// if (that.poster_bg_img_path.indexOf("https") < 0) {
+				// 	httpsurl = await that.getdownload(that.poster_bg_img_path.replace("http:", "https:"));
+				// } else {
+				httpsurl = await that.getdownload(that.poster_bg_img_path);
+				// }
+
+
+				if (httpsurl == 'fail') {
+					uni.hideLoading();
+					uni.showToast({
+						title: '生成失败',
+						icon: 'none'
+					})
+					return;
+				}
+				let proportionally = this.info.poster_bg_width / uni.$u.sys().windowWidth;
+				(this.posterObj = {
+					width: (this.info.poster_bg_width / proportionally) + 'px',
+					height: (this.info.poster_bg_height / proportionally) + 'px',
+					background: '#fff',
+					borderRadius: '16rpx',
+
+					views: [{
+							src: httpsurl,
+							type: "image",
+							css: {
+								width: (this.info.poster_bg_width / proportionally) + 'px',
+								height: (this.info.poster_bg_height / proportionally) + 'px',
+							}
+						},
+						{
+							type: 'view',
+							css: {
+								left: ((this.info.poster_qrcode_x / proportionally) + 40) + 'px',
+								top: ((this.info.poster_qrcode_y / proportionally)) + 'px',
+								position: 'fixed',
+
+							},
+							views: [{
+									type: 'qrcode',
+									text: this.qrcode,
+									css: {
+										width: (this.info.poster_qrcode_width / proportionally) + 'px',
+										height: (this.info.poster_qrcode_width / proportionally) + 'px',
+										background: '#fff'
+									}
+								},
+								// {
+								// 	src: '/static/images/fanyunLogo.png',
+								// 	type: "image",
+								// 	css: {
+								// 		position: 'absolute',
+								// 		width: 30 + 'rpx',
+								// 		height: 30 + 'rpx',
+
+								// 		left: '60rpx',
+								// 		top: '50rpx',
+
+								// 	}
+								// }
+							],
+						},
+					]
+				}),
+				(
+					setTimeout(() => {
+						that.$refs.painter.canvasToTempFilePathSync({
+							// 在nvue里是jpeg
+							fileType: 'jpg',
+							quality: 1,
+							success: res => {
+								console.log('res.tempFilePath', res.tempFilePath);
+								this.genBgHaibaoUrl = res.tempFilePath
+								uni.hideLoading();
+							}
+						})
+						that.showPoster = true
+					}, 1000)
+				);
+			},
+
+			is_weixin() {
+				var ua = window.navigator.userAgent.toLowerCase();
+				if (ua.match(/MicroMessenger/i) == 'micromessenger') {
+					console.log('微信浏览器');
+					return true;
+				} else {
+					console.log("不是微信浏览器");
+					return false;
+				}
+			},
+
+			toSave() {
+				let _this = this
+				if (!this.is_weixin()) {
+					return uni.showModal({
+						showCancel: false,
+						title: '提示',
+						content: '请在微信内置浏览器打开,长按图片下载/分享',
+						confirmColor: '#207CF7'
+					})
+				}
+				uni.showModal({
+					confirmColor: '#207CF5',
+					confirmText: '查看图片',
+					title: '提示',
+					content: '查看图片后长按图片即可保存或分享',
+					success(src) {
+						if (src.confirm) {
+							_this.showPoster = false
+							uni.previewImage({
+								urls: [_this.genBgHaibaoUrl]
+							});
+						} else if (src.cancel) {
+							// this.showPoster = true;
+						}
+					}
+				});
+				return
+
+				uni.showLoading({
+					title: '海报生成中'
+				});
+				this.$refs.painter.canvasToTempFilePathSync({
+					// 在nvue里是jpeg
+					fileType: 'jpg',
+					quality: 1,
+					success: res => {
+						wx.showShareImageMenu({
+							path: res.tempFilePath
+						})
+						this.showPoster = false;
+						uni.hideLoading();
+						// #endif
+						// #ifdef H5
+						this.showPoster = false;
+						uni.hideLoading();
+						uni.showModal({
+							confirmColor: '#26B3A0',
+							confirmText: '查看图片',
+							title: '提示',
+							content: '查看图片后长按图片即可保存或分享',
+							success(src) {
+								if (src.confirm) {
+									uni.previewImage({
+										urls: [res.tempFilePath]
+									});
+								} else if (src.cancel) {
+									this.showPoster = true;
+								}
+							}
+						});
+						// #endif
+					}
+				});
+			},
+			getCheck() {
+				var that = this;
+				that.$http('commission.auth').then(res => {
+					if (res.code == 0) {
+						this.isLoading = false
+						uni.setNavigationBarTitle({
+							title: this.appInfo.site_name
+						});
+
+						that.money_total = res.data.money_total > 0 ? res.data.money_total : '0.00'
+						that.on_cashout_money = res.data.on_cashout_money > 0 ? res.data.on_cashout_money : '0.00'
+						that.commissionLog[0].createtime = res.data.create_time
+						if (res.data.status == 0 && that.is_examine == 1) {
+							uni.showModal({
+								confirmText: '确定',
+								showCancel: false,
+								confirmColor: '#5e49c3',
+								content: '分销商申请已提交,等待后台审核通过',
+								title: '提示',
+								success(res) {
+									if (res.confirm) {
+										uni.navigateBack()
+									}
+								}
+							})
+						}
+						if (res.data.status == 2) {
+							uni.showModal({
+								confirmText: '联系客服',
+								confirmColor: '#5e49c3',
+								content: '已被禁用,有疑问请咨询客服',
+								title: '提示',
+								success(res) {
+									if (res.confirm) {
+										uni.navigateTo({
+											url: '/pages/user/public/kefu'
+										})
+									} else if (res.cancel) {
+										uni.navigateBack()
+									}
+								}
+							})
+						}
+					} else {
+						// uni.showModal({
+						// 	confirmText:'申请',
+						// 	confirmColor:'#5e49c3',
+						// 	content:'立即申请成为合伙人',
+						// 	title:'提示',
+						// 	success(res) {
+						// 		if(res.confirm){
+						// 			that.commissionapply()
+						// 		}else if(res.cancel){
+						// 			uni.navigateBack()
+						// 		}
+						// 	}
+						// })
+						uni.redirectTo({
+							url: '/pages/user/commission/apply'
+						})
+					}
+				});
+			},
+			commissionapply() {
+				var that = this;
+				that.$http('commission.apply').then(res => {
+					if (res.code == 0) {
+						uni.showToast({
+							title: '申请成功'
+						})
+						that.getCheck()
+					} else {
+						uni.showModal({
+							confirmText: '重新申请',
+							confirmColor: '#5e49c3',
+							content: '合伙人申请失败',
+							title: '提示',
+							success(res) {
+								if (res.confirm) {
+									that.commissionapply()
+								} else if (res.cancel) {
+									uni.navigateBack()
+								}
+							}
+						})
+					}
+				});
+			},
+			// 我的团队
+			getInviteList() {
+				var that = this;
+				that.$api('distribution.ulist', {
+					uid: this.userInfo.id,
+					type: this.navbar[this.currentTab].type
+				}).then(res => {
+					// console.log(res)
+					if (res.data.length > 0) {
+						if (that.team.length > 0) {
+							var dd = this.team;
+							this.team = dd.concat(res.data);
+							this.pages++;
+						} else {
+							this.team = res.data;
+							this.pages++;
+						}
+					} else {
+						// this.empty = true
+					}
+				});
+			},
+			jump(e) {
+				uni.navigateTo({
+					url: e
+				})
+			},
+			change(index) {
+				this.currentTab = index;
+				this.team = [];
+				this.pages = 1;
+				this.getInviteList()
+			},
+			toTeam() {
+				// uni.navigateTo({
+				// 	url:'/pages/user/commission/team'
+				// })
+				uni.navigateTo({
+					url: '/pages/user/commission/commission-log'
+				})
+			}
+		},
+		onPullDownRefresh() {
+			var that = this;
+			// setTimeout(function() {
+			// 	this.pages = 1;
+			// 	this.team = [];
+			// 	that.getInviteList();
+			// 	uni.stopPullDownRefresh();
+			// }, 1000);
+		},
+		onReachBottom() {
+			// this.getInviteList();
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	@import './index.scss';
+</style>