Compare commits

...

13 Commits

Author SHA1 Message Date
JING 3b9dcf3ad8 更新图片 8 months ago
JING a9ab5bcbc0 修正 8 months ago
JING f614457df1 更新 8 months ago
JING 7f9adbb7a0 优化页面 8 months ago
JING 63cbe2c2bb 更新 8 months ago
JING b623d3e088 详情 8 months ago
JING 8db2589a58 修剪体积 8 months ago
JING 25b5ffd7b0 剔除没有的 8 months ago
JING 126fb61bee 更新 8 months ago
JING 28a07a8660 更新 8 months ago
JING 0df518c15c 写真页面整合 8 months ago
JING 2110a7edcc 卡通生成流程 8 months ago
JING e85cfff697 更新 9 months ago
  1. 16
      config/env.js
  2. 6
      manifest.json
  3. 44
      pages.json
  4. 205
      pages/index/index.vue
  5. 79
      pages/user/account/index.vue
  6. 17
      pages/user/account/logout.vue
  7. 176
      pages/user/auth/login.vue
  8. 205
      pages/user/auth/regist.vue
  9. 219
      pages/user/index.vue
  10. 275
      pages/user/photo/ai.vue
  11. 279
      pages/user/photo/cartoon.vue
  12. 249
      pages/user/photo/color.vue
  13. 53
      pages/user/photo/merge.vue
  14. 61
      pages/user/portrait/detail.vue
  15. 27
      pagesA/color/index.vue
  16. 4
      pagesA/merge/face_1.vue
  17. 8
      pagesA/merge/index.vue
  18. 66
      pagesA/photo/cartoon_1.vue
  19. 141
      pagesA/photo/cartoon_2.vue
  20. 60
      pagesA/photo/cartoon_3.vue
  21. 77
      pagesA/photo/cartoon_4.vue
  22. 4
      pagesA/photo/face.vue
  23. 2
      pagesA/photo/photo_1.vue
  24. 376
      pagesA/photo/photo_2.vue
  25. BIN
      static/img/common/common_21.png
  26. BIN
      static/img/common/common_22.png
  27. BIN
      static/img/common/home.png
  28. BIN
      static/img/common/home_HL.png
  29. BIN
      static/img/common/photo_c1.png
  30. BIN
      static/img/common/photo_c2.png
  31. BIN
      static/img/common/photo_common_21.png
  32. BIN
      static/img/common/user.png
  33. BIN
      static/img/common/user_HL.png
  34. BIN
      static/img/index/aixz.png
  35. BIN
      static/img/index/duigou.png
  36. BIN
      static/img/index/kthf.png
  37. BIN
      static/img/index/liucheng.png
  38. BIN
      static/img/index/notice.png
  39. BIN
      static/img/index/pic.png
  40. BIN
      static/img/index/right.png
  41. BIN
      static/img/index/scan.png
  42. BIN
      static/img/index/select.png
  43. BIN
      static/img/index/tips.png
  44. BIN
      static/img/index/title_kt.png
  45. BIN
      static/img/index/title_xz.png
  46. BIN
      static/img/index/title_zj.png
  47. BIN
      static/img/index/waiting.png
  48. BIN
      static/img/index/zjgs.png
  49. BIN
      static/img/index/zjhc.png
  50. BIN
      static/img/photo/cartoon_2.png
  51. BIN
      static/img/photo/组 67101@2x(1).png
  52. BIN
      static/img/user/account.png
  53. BIN
      static/img/user/avatar.png
  54. BIN
      static/img/user/banner.jpg
  55. BIN
      static/img/user/chat.png
  56. BIN
      static/img/user/code.png
  57. BIN
      static/img/user/have.png
  58. BIN
      static/img/user/have_no.png
  59. BIN
      static/img/user/img.png
  60. BIN
      static/img/user/link.png
  61. BIN
      static/img/user/money_log.png
  62. BIN
      static/img/user/nodata.png
  63. BIN
      static/img/user/noshop.png
  64. BIN
      static/img/user/order_all.png
  65. BIN
      static/img/user/order_finish.png
  66. BIN
      static/img/user/order_ing.png
  67. BIN
      static/img/user/pic_bg.png
  68. BIN
      static/img/user/popup_bg.png
  69. BIN
      static/img/user/setting.png
  70. BIN
      static/img/user/topbg.png
  71. BIN
      static/img/user/user.png
  72. 7904
      static/json/city.json
  73. BIN
      static/logo.png
  74. 2
      uni.scss

@ -1,17 +1,17 @@
//api接口环境配置
// production正式/development线上测试/local本地开发
var NowENV = 'development';
var NowENV = 'production';
var ENV_API_URL = {
production:'https://netcharge.spacechong.com/', //正式环境
production:'https://takephoto.tsl3060.com/', //正式环境
development:'http://photo.internal.com/', //开发测试环境
local:'http://192.168.10.123:8901/',//本地调试环境
local:'https://photo.internal.com/',//本地调试环境
}
//CdnUrl 环境配置[都默认为线上都行]
var ENV_BASE_URL = {
production:'https://netcharge.spacechong.com', //正式环境
development:'https://photo.internal.com', //开发测试环境
local:'https://netcharge.spacechong.com',//本地调试环境
production:'https://takephoto.tsl3060.com', //正式环境
development:'http://photo.internal.com', //开发测试环境
local:'https://photo.internal.com',//本地调试环境
}
@ -23,10 +23,10 @@ var ENV = {
appData:function() {
var data = {}; //版本号
data.i_app_version = '2.1.2';
data.i_app_version = '1.0.0';
return data;
},
QQmapkey:'2EBBZ-RAL33-TLM3A-3KVVR-V2LMO-3TFQ4',
QQmapkey:'',
}

@ -58,11 +58,7 @@
"minified" : true
},
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "你的位置信息将用于小程序位置接口的效果展示"
}
},
"permission" : {},
"requiredPrivateInfos" : [ "getLocation", "chooseLocation" ],
"libVersion" : "latest"
},

@ -26,7 +26,8 @@
"path": "pages/user/account/index",
"style": {
"navigationBarTitleText": "账户设置",
"enablePullDownRefresh": false
"navigationStyle": "custom"
}
},
{
@ -39,13 +40,15 @@
{
"path": "pages/user/portrait/detail",
"style": {
"navigationBarTitleText": "面部档案"
"navigationBarTitleText": "面部档案",
"navigationStyle": "custom"
}
},
{
"path": "pages/user/photo/merge",
"style": {
"navigationBarTitleText": "照片详情"
"navigationBarTitleText": "合照详情",
"navigationStyle": "custom"
}
},
{
@ -54,6 +57,30 @@
"navigationBarTitleText": "注销账号",
"navigationStyle": "custom"
}
},
{
"path" : "pages/user/photo/color",
"style" :
{
"navigationBarTitleText" : "照片换底色详情",
"navigationStyle": "custom"
}
},
{
"path" : "pages/user/photo/ai",
"style" :
{
"navigationBarTitleText" : "AI写真",
"navigationStyle": "custom"
}
},
{
"path" : "pages/user/photo/cartoon",
"style" :
{
"navigationBarTitleText" : "卡通画风",
"navigationStyle": "custom"
}
}
],
@ -102,13 +129,6 @@
"navigationStyle": "custom"
}
},
{
"path": "photo/cartoon_4",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path" : "color/index",
"style" :
@ -137,7 +157,7 @@
"path" : "merge/idcard",
"style" :
{
"navigationBarTitleText" : "二寸证件照",
"navigationBarTitleText" : "证件照",
"navigationStyle": "custom"
}
},
@ -176,6 +196,8 @@
"selectedIconPath": "static/img/common/user_HL.png",
"text": "%tabbar.user%"
}
]
},
"uniIdRouter": {}

@ -64,9 +64,9 @@
<view class="picList">
<scroll-view class="scrollBox" scroll-x="true" @scroll="scroll1" scroll-left="0">
<view class="picBox" v-for="(item,index) in album_list" :key="index">
<view class="picBox" v-for="(item,index) in album_list" :key="index" @click="viewAlbum(item.id)">
<view class="pic">
<image :src="item.face" mode="widthFix"></image>
<image :src="item.face" mode="scaleToFill"></image>
</view>
<view class="pic_title">{{item.title}}</view>
</view>
@ -78,11 +78,11 @@
<image src="/static/img/index/title_kt.png" mode="widthFix"></image>
</view>
<view class="picList">
<view class="picList" style="margin-bottom: 80rpx;">
<scroll-view class="scrollBox" scroll-x="true" @scroll="scroll2" scroll-left="0">
<view class="picBox" v-for="(item,index) in cartoon_list" :key="index">
<view class="picBox" v-for="(item,index) in cartoon_list" :key="index" @click="viewCartoon(item.id)">
<view class="pic">
<image :src="item.face" mode="widthFix"></image>
<image :src="item.face" mode="scaleToFill"></image>
</view>
<view class="pic_title">{{item.title}}</view>
</view>
@ -92,7 +92,25 @@
</view>
<view class="spaceBox"></view>
<u-popup :show="tips_show" :round="10" mode="center" bgColor="transparent" @close="close('tips_show')" @open="open('tips_show')">
<view class="popupBox">
<view class="popupTop">
{{tips_title}}
</view>
<view class="popupDesc1">
<u-parse :content="content" :tagStyle="style"></u-parse>
</view>
<view class="popupBtn">
<view class="sbtnBox1 a1" @click="close('tips_show')">取消</view>
<view class="sbtnBox1 a2" @click="submit('tips_show')">确认</view>
</view>
</view>
</u-popup>
</view>
</template>
@ -121,6 +139,19 @@
specs_list:[],//
album_list:[],//
cartoon_list:[],//
//
tips_title:'隐私协议',
tips_show: false,
content: `<p>在使用【合成照相馆】小程序服务之前,</p>
<p>请仔细阅读合成照相馆隐私协议</p>
<p>如你同意该协议,请点击同意开始使用合成照相馆</p>`,
style: {
//
p: 'font-weight: 400;font-size: 28rpx;color: #555555;line-height: 60rpx;',
},
}
},
onPageScroll(e) {
@ -135,16 +166,27 @@
},
onLoad() {
var _this = this;
//banner
_this.getBannerList();
//
_this.getSceneMenu();
//
_this.getHotList();
var show_agreement = _this.$user.session('show_agreement');
console.log('show_agreement',show_agreement);
if(_this.$com.isNull(show_agreement))
{
_this.agreement();
_this.tips_show = true;
}
//1
setTimeout(function(res){
_this.getUploadConfig();
//banner
_this.getBannerList();
//
_this.getSceneMenu();
//
_this.getHotList();
},1000);
},
onShareAppMessage() {
@ -290,7 +332,48 @@
_this.$user.session('sceneList',sceneList);
});
},
//
viewAlbum(id){
uni.navigateTo({
url:'/pagesA/photo/photo_2?id='+id,
})
},
//
viewCartoon(id)
{
uni.navigateTo({
url:'/pagesA/photo/cartoon_2?id='+id,
})
},
open(key) {
console.log('open',key);
},
close(key) {
var _this = this;
_this[key] = false;
},
//
agreement(){
var _this = this;
var post = {
type:'user_protocol',
};
_this.$api.get('api/treatyInfo',post,function(rs){
console.log('协议',rs);
_this.content = rs.content;
_this.tips_show = true;
},function(err){
console.log(err);
});
},
submit(key)
{
var _this = this;
_this.$user.session('show_agreement',1);
_this.close(key);
},
}
}
</script>
@ -382,12 +465,12 @@
.topRight .distance image{ width: 32rpx; height: 32rpx; margin-right: 24rpx;}
.picList{ width: 100%; height: 360rpx; }
.picList{ width: 100%; height: auto; }
.scrollBox {
margin-top: 20rpx;
width: 100%;
height: 360rpx;
height: 390rpx;
white-space: nowrap;
}
@ -395,7 +478,7 @@
.picBox {
display: inline-block;
width:260rpx;
height: 360rpx;
height: 390rpx;
text-align: center;
position: relative;
margin-left: 20rpx;
@ -404,13 +487,13 @@
.picBox .pic{
position: absolute;
width:100%;
height: 360rpx;
height: 390rpx;
}
.picBox .pic image{
width:260rpx;
height: 360rpx;
width:100%;
height: 390rpx;
border-radius:24rpx;
}
.picBox .pic_title{
@ -428,4 +511,88 @@
text-overflow: ellipsis; //
}
.popupBox{
width: 600rpx;
height: auto;
border-radius: 24rpx;
background-color: #FFFFFF;
}
.popupTop{
width: 600rpx;
height: 140rpx;
background: linear-gradient(to bottom, #D3D5FF 20%, #FFFFFF 50%);
border-radius: 24rpx 24rpx 0rpx 0rpx;
line-height: 140rpx;
text-align: center;
font-weight: 700;
font-size: 30rpx;
color: #333333;
}
.popupBtn{ width: 100%; height: auto;
display: flex; flex-wrap: wrap;
justify-content: space-around; /* 使子元素在容器中均匀分布 */
align-items: center; /* 如果需要垂直居中子元素 */
}
.sbtnBox{
margin: 30rpx auto;
width: 478rpx;
height: 80rpx;
font-weight: 700;
font-size: 30rpx;
line-height: 80rpx;
border: 2rpx solid #4D94FF;
text-align: center;
border-radius: 44rpx;
}
.popupDesc{
width:560rpx;
font-weight: 400;
font-size: 28rpx;
color: #555555;
height: auto;
padding: 0rpx 20rpx;
}
.popupDesc1{
width:480rpx;
font-weight: 400;
font-size: 28rpx;
color: #555555;
height: 700rpx;
overflow-x: hidden;
overflow-y: scroll;
padding: 0rpx 60rpx;
}
.sbtnBox1{
margin: 30rpx auto;
width: 226rpx;
height: 80rpx;
font-weight: 700;
font-size: 30rpx;
line-height: 80rpx;
border: 2rpx solid #4D94FF;
text-align: center;
border-radius: 44rpx;
}
.a1{
background: linear-gradient( 270deg, rgba(46,87,241,0.15) 0%, rgba(131,88,246,0.15) 100%);
color:#7A74F0;
}
.a2{
background: linear-gradient( 270deg, #2E57F1 0%, #8358F6 100%);
color:#FFFFFF;
}
.a3{
background: linear-gradient( 270deg, #2E57F1 0%, #8358F6 100%);
color:#FFFFFF;
}
</style>

@ -1,8 +1,8 @@
<template>
<view class="container">
<custom_navbar :title="navbar_title" @getNavHeight="getNavHeight" :theme="theme" left="true" />
<view class="form">
<view class="form" :style="'margin-top:'+margin_top+'px'">
<!--input box start-->
<view class='input_box'>
<view class='i_box_1'>头像</view>
@ -66,8 +66,27 @@
<!--input box end-->
<!--input box start-->
<view class='input_box' @click="agreement">
<view class='i_box_1'>协议与说明</view>
<view class='input_box' @click="agreement('user_protocol')">
<view class='i_box_1'>隐私协议</view>
<view class='i_box_2'></view>
<view class='i_box_3x'>
</view>
<view class='i_box_5'>
<view class="up">
<view class="img">
</view>
<view class="icon" >
<u-icon name="arrow-right" top="5"></u-icon>
</view>
</view>
</view>
</view>
<!--input box end-->
<!--input box start-->
<view class='input_box' @click="agreement('privacy_policy')">
<view class='i_box_1'>用户协议</view>
<view class='i_box_2'></view>
<view class='i_box_3x'>
@ -112,7 +131,7 @@
<u-popup :show="show" :round="10" mode="center" bgColor="transparent" @close="close" @open="open">
<view class="popupBox">
<view class="popupTop">
协议与说明
{{tips_title}}
</view>
<view class="popupDesc">
<u-parse :content="content" :tagStyle="style"></u-parse>
@ -150,10 +169,20 @@
</template>
<script>
import custom_navbar from "../../index/components/header.vue";
export default {
components: {
custom_navbar
},
data() {
return {
navbar_title: '账户设置',
theme: "blue",
margin_top: 0,
//form
info: {
nick_name:'',
@ -162,6 +191,7 @@
},
uploadImg: [],
//
tips_title:'',
show: false,
content:'',
style: {
@ -179,8 +209,20 @@
_this.getUserInfo();
},
onPageScroll(e) {
if (e.scrollTop > 50) {
this.theme = 'white';
} else {
this.theme = 'blue';
}
},
methods: {
getNavHeight(e) {
this.margin_top += e;
},
//
getUserInfo()
{
@ -267,10 +309,18 @@
});
},
//
agreement(){
agreement(type){
var _this = this;
if(type == 'privacy_policy')
{
_this.tips_title = '用户协议';
}
else
{
_this.tips_title = '隐私协议';
}
var post = {
type:'user_protocol',
type:type,
};
_this.$api.get('api/treatyInfo',post,function(rs){
console.log('协议',rs);
@ -314,10 +364,13 @@
</script>
<style lang="scss">
.container{padding:10rpx 20rpx;}
.form{ padding:0rpx 20rpx;
background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx;
.container{width: 100%; padding-top: 20rpx;}
.form{
width: 670rpx;
margin: 0rpx auto;
padding:0rpx 20rpx;
background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx;
}
/*form基本元素*/
/*input_box*/

@ -87,6 +87,23 @@
},
yes(){
this.close();
//api/photo_album/del
_this.$com.confirm('确认注销账户,清空所有信息吗?',function(res){
var post = {
id:id,
};
_this.$api.post('api/user/logOut', post,function(rs){
console.log(rs);
uni.reLaunch({
url: '/pages/index/index'
});
});
},'警告');
},
}
}

@ -1,176 +0,0 @@
<template>
<view class="container">
<view class="input_box">
<text class="input_title">{{$t('pages.user.auth.login.mobile')}}</text>
<view class="input_content">
<u--input
:placeholder="$t('pages.user.auth.login.input_mobile')"
prefixIcon="phone"
prefixIconStyle="font-size: 24rpx;color: #909399"
v-model="form.mobile"
@change="mobileChange"
></u--input>
</view>
</view>
<view class="input_box">
<text class="input_title">{{$t('pages.user.auth.login.password')}}</text>
<view class="input_content">
<u--input
:placeholder="$t('pages.user.auth.login.input_password')"
prefixIcon="lock"
prefixIconStyle="font-size: 24rpx;color: #909399"
border="surround"
password
clearable
v-model="form.password"
@change="pwdChange"
></u--input>
</view>
</view>
<view class="button_box">
<view class="submit">
<u-button type="primary" :plain="true" :hairline="true" :text="$t('locale.login')" size="normal" @click="login"></u-button>
</view>
</view>
<view class="footer">
<!-- <text class="footer-text">找回密码</text> -->
<text class="footer-text" @click="regist">{{$t('locale.regist')}}</text>
<!-- <text class="footer-text">投诉建议</text> -->
</view>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
form:{
mobile:'',
password:'',
},
};
},
onShow() {
var _this =this;
},
methods:{
//
regist(){
uni.$u.route({
type:'redirectTo',
url: 'pages/user/auth/regist',
params: {}
});
},
//
mobileChange(e)
{
var _this = this;
_this.form['mobile'] = e;
},
//
pwdChange(e)
{
var _this = this;
_this.form['password'] = e;
},
login(){
var _this =this;
var form = _this.form;
if(!_this.$com.check(form.mobile,'mobile'))
{
uni.$u.toast(_this.$t('pages.user.auth.login.mobile_must'));
return false;
}
if(form.password.length < 6)
{
uni.$u.toast(_this.$t('pages.user.auth.login.password_must'));
return false;
}
var post = form;
_this.$api.post('user/log',post,function(rs){
console.log(rs);
_this.$user.session('userInfo',rs.userinfo);
_this.$user.session('token',rs.token);
uni.$u.route({
type:'navigateBack',
delta:2,
params: {}
});
},function(err){
console.log(err);
});
},
},
};
</script>
<style scoped lang="scss">
/*输入框*/
.input_box{
width: 90%;
margin: 40rpx auto 40rpx auto;
height: auto;
}
.input_title{
font-size: 30rpx;
color: #ABABAB;
height: 50rpx;
line-height: 50rpx;
margin: 10rpx auto;
display: block;
}
.button_box {
width: 90%;
margin: 40rpx auto 20rpx auto;
}
.submit {
width: 100%;
background-color: #4CAF50;
justify-content: center;
align-items: center;
border-radius: 10rpx;
}
.submit-text {
color: white;
padding: 30rpx;
}
.submit:active {
background-color: green;
opacity: 0.5;
}
.footer {
flex-direction: row;
justify-content: center;
text-align: center;
align-items: center;
margin-top: 100rpx;
}
.footer-text {
font-size: 28rpx;
color: #296db5;
padding: 30rpx;
}
</style>

@ -1,205 +0,0 @@
<template>
<view class="container">
<view class="input_box">
<text class="input_title">{{$t('pages.user.auth.login.mobile')}}</text>
<view class="input_content">
<u--input
:placeholder="$t('pages.user.auth.login.input_mobile')"
prefixIcon="phone"
prefixIconStyle="font-size: 24rpx;color: #909399"
type="number"
v-model="form.mobile"
@change="mobileChange"
></u--input>
</view>
</view>
<view class="input_box">
<text class="input_title">{{$t('pages.user.auth.login.password')}}</text>
<view class="input_content">
<u--input
:placeholder="$t('pages.user.auth.login.input_password')"
prefixIcon="lock"
prefixIconStyle="font-size: 24rpx;color: #909399"
border="surround"
password
clearable
v-model="form.password"
@change="pwdChange"
></u--input>
</view>
</view>
<view class="input_box">
<text class="input_title">{{$t('pages.user.auth.login.email')}}</text>
<view class="input_content">
<u--input
:placeholder="$t('pages.user.auth.login.input_email')"
prefixIcon="email"
prefixIconStyle="font-size: 24rpx;color: #909399"
v-model="form.email"
@change="emailChange"
></u--input>
</view>
</view>
<view class="button_box">
<view class="submit">
<u-button type="primary" :plain="true" :hairline="true" :text="$t('locale.regist')" size="normal" @click="regist"></u-button>
</view>
</view>
<view class="footer">
<!-- <text class="footer-text">找回密码</text> -->
<text class="footer-text" @click="login">{{$t('locale.login')}}</text>
<!-- <text class="footer-text">投诉建议</text> -->
</view>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
form:{
mobile:'',
password:'',
email:'',
},
};
},
onShow() {
var _this =this;
},
methods:{
//
login(){
uni.$u.route({
type:'redirectTo',
url: 'pages/user/auth/login',
params: {}
});
},
//
mobileChange(e)
{
var _this = this;
_this.form['mobile'] = e;
},
//
pwdChange(e)
{
var _this = this;
_this.form['password'] = e;
},
//email
emailChange(e)
{
var _this = this;
_this.form['email'] = e;
},
regist()
{
var _this =this;
var form = _this.form;
if(!_this.$com.check(form.mobile,'mobile'))
{
uni.$u.toast(_this.$t('pages.user.auth.login.mobile_must'));
return false;
}
if(form.password.length < 6)
{
uni.$u.toast(_this.$t('pages.user.auth.login.password_must'));
return false;
}
if(!_this.$com.check(form.email,'email'))
{
uni.$u.toast(_this.$t('pages.user.auth.login.email_must'));
return false;
}
var post = form;
_this.$api.post('user/reg',post,function(rs){
console.log(rs);
uni.showModal({
title: _this.$t('locale.tips'),
content: _this.$t('pages.user.auth.regist.regist_success'),
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
_this.login();
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},function(err){
console.log(err);
});
},
},
};
</script>
<style scoped lang="scss">
/*输入框*/
.input_box{
width: 90%;
margin: 40rpx auto 40rpx auto;
height: auto;
}
.input_title{
font-size: 30rpx;
color: #ABABAB;
height: 50rpx;
line-height: 50rpx;
margin: 10rpx auto;
display: block;
}
.button_box {
width: 90%;
margin: 40rpx auto 20rpx auto;
}
.submit {
width: 100%;
background-color: #4CAF50;
justify-content: center;
align-items: center;
border-radius: 10rpx;
}
.submit-text {
color: white;
padding: 30rpx;
}
.submit:active {
background-color: green;
opacity: 0.5;
}
.footer {
flex-direction: row;
justify-content: center;
text-align: center;
align-items: center;
margin-top: 100rpx;
}
.footer-text {
font-size: 28rpx;
color: #296db5;
padding: 30rpx;
}
</style>

@ -27,7 +27,7 @@
</view>
<view class="mright">
<view class="mbItem" v-for="(item,index) in portraitList" :key="index">
<image v-if="item.can == true" :src="item.image" mode="widthFix" @click="goTo('/pages/user/archives/detail?id='+item.id)"></image>
<image v-if="item.can == true" :src="item.image" mode="widthFix" @click="goTo('/pages/user/portrait/detail?id='+item.id)"></image>
<image v-if="item.can == false" :src="item.image" mode="widthFix" @click="showShare"></image>
</view>
<!-- <view class="mbItem">
@ -55,13 +55,15 @@
:activeStyle="{
color: '#000000',
fontWeight: 'bold',
transform: 'scale(1.05)'
transform: 'scale(1.05)',
fontSize:'28rpx',
}"
:inactiveStyle="{
color: '#000000',
transform: 'scale(1)'
transform: 'scale(1)',
fontSize:'28rpx',
}"
itemStyle="padding-left: 15rpx; padding-right: 15rpx; width:157rpx; height: 68rpx;"
itemStyle="padding: 20rpx 15rpx 0rpx 15rpx; width:157rpx; height: 88rpx;"
@click="tabChange"></u-tabs>
<view class="datalist">
@ -129,24 +131,84 @@
</view>
</view> -->
<view class="imgBox" v-for="(item,index) in dataList" :key="index" @click="viewDetail(item)">
<view class="imgBox" v-if="tabList[current].type == 1" v-for="(item,index) in dataList" :key="index" @click="viewDetail(item)">
<view class="p_left">
<image class="p_bg" src="/static/img/index/zj_icon.png" mode="aspectFill"></image>
<image class="p_bg" :src="item.merge_thumbnail" mode="aspectFill"></image>
<image v-if="item.status != 3" class="p_pic" src="/static/img/user/ing.png" mode="widthFix"></image>
</view>
<view class="p_center">
<view class="p_title">{{item.specs.title}}</view>
<view class="p_desc">25×35mm | 295×413px</view>
<view class="p_desc" v-if="item.specs.w_h_mm.w == 0 && item.specs.w_h_px.w == 0">{{item.custom_kb.min}}-{{item.custom_kb.max}}kb | {{item.custom_w_h_px.w}}×{{item.custom_w_h_px.h}}px</view>
<view class="p_desc" v-else>{{item.specs.w_h_mm.w}}×{{item.specs.w_h_mm.h}}mm | {{item.specs.w_h_px.w}}×{{item.specs.w_h_px.h}}px</view>
</view>
<view class="p_right">
<view class="distance">
<image src="/static/img/index/right.png" mode="widthFix" v-if="item.status == 3"></image>
<view class="ing" v-if="item.status == 1">排队中...</view>
<view class="ing" v-if="item.status == 2">生成中...</view>
<view class="ing" v-if="item.status == 2">生成失败</view>
<view class="ing" v-if="item.status == 4">生成失败</view>
</view>
</view>
</view>
<view class="picBox" v-if="tabList[current].type == 2" v-for="(item,index) in dataList" :key="index" @click="viewDetail(item)">
<view class="p_left">
<image class="p_bg" :src="item.merge_thumbnail" mode="aspectFill"></image>
<image v-if="item.status != 3" class="p_pic" src="/static/img/user/ing.png" mode="widthFix"></image>
</view>
<view class="p_center">
<view class="p_title">{{item.create_time}}</view>
</view>
<view class="p_right">
<view class="distance">
<image src="/static/img/index/right.png" mode="widthFix" v-if="item.status == 3"></image>
<view class="ing" v-if="item.status == 1">排队中...</view>
<view class="ing" v-if="item.status == 2">生成中...</view>
<view class="ing" v-if="item.status == 4">生成失败</view>
</view>
</view>
</view>
<view class="picBox" v-if="tabList[current].type == 3" v-for="(item,index) in dataList" :key="index" @click="viewDetail(item)">
<view class="p_left">
<image class="p_bg" :src="item.album.face" mode="aspectFill"></image>
<image v-if="item.status != 2" class="p_pic" src="/static/img/user/ing.png" mode="widthFix"></image>
</view>
<view class="p_center">
<view class="p_title">{{item.album.title}}</view>
</view>
<view class="p_right">
<view class="distance">
<image src="/static/img/index/right.png" mode="widthFix" v-if="item.status == 2"></image>
<view class="ing" v-if="item.status == 1">排队中...</view>
</view>
</view>
</view>
<view class="picBox" v-if="tabList[current].type == 4" v-for="(item,index) in dataList" :key="index" @click="viewDetail(item)">
<view class="p_left">
<image class="p_bg" :src="item.cartoon.face" mode="aspectFill"></image>
<image v-if="item.status != 3" class="p_pic" src="/static/img/user/ing.png" mode="widthFix"></image>
</view>
<view class="p_center">
<view class="p_title">{{item.cartoon.title}}</view>
</view>
<view class="p_right">
<view class="distance">
<image src="/static/img/index/right.png" mode="widthFix" v-if="item.status == 3"></image>
<view class="ing" v-if="item.status == 1">排队中...</view>
<view class="ing" v-if="item.status == 2">生成中...</view>
<view class="ing" v-if="item.status == 4">生成失败</view>
</view>
</view>
</view>
</view>
@ -207,7 +269,7 @@ export default {
},
sceneList:[], //
tabList: [
{
/* {
type:1,
name: '证件照合成',
}, {
@ -219,7 +281,7 @@ export default {
}, {
type:4,
name: '卡通风格'
}
} */
],
current:0,
//
@ -253,7 +315,7 @@ export default {
},
onReady: function (res) {
var _this = this;
console.log('/pages/user/photo/merge?url='+encodeURIComponent('https://resourcedev.aicverse.com/ai_tour/spot_template/2.jpg'));
//console.log('/pages/user/photo/merge?url='+encodeURIComponent('https://resourcedev.aicverse.com/ai_tour/spot_template/2.jpg'));
},
onShow() {
var _this =this;
@ -262,8 +324,15 @@ export default {
_this.getSceneMenu();
//
_this.getPortraitList();
_this.tabChange({index:0});
var _this =this;
setTimeout(function(res){
_this.tabChange({index:_this.current});
},1000);
},
onLoad() {
},
onReachBottom () {
@ -363,24 +432,60 @@ export default {
_this.loadDataList('api/photo_synthesis/list');
break;
case 2:
_this.loadDataList('/api/photo_back_color/list');
_this.loadDataList('api/photo_back_color/list');
break;
case 3:
_this.loadDataList('api/photo_album/list');
break;
case 4:
_this.loadDataList('api/photo_cartoon/list');
break;
}
},
loadDataList(url)
{
var _this = this;
var type = _this.tabList[_this.current].type;
var post = {page:_this.page,limit:10};
_this.$api.get(url, post, function(res) {
//console.log(res);
var d = res;
_this.dataList = _this.dataList.concat(d.data);
var Data = d.data;
Data.forEach((item, index) => {
switch(type)
{
case 1:
if(!_this.$com.isNull(item.merge_thumbnail))
{
Data[index].merge_thumbnail = _this.$api.ossurl(item.merge_thumbnail);
}
else
{
Data[index].merge_thumbnail = '/static/img/index/zj_icon.png';
}
break;
case 2:
if(!_this.$com.isNull(item.merge_thumbnail))
{
Data[index].merge_thumbnail = _this.$api.ossurl(item.merge_thumbnail);
}
else
{
Data[index].merge_thumbnail = _this.$api.ossurl(item.users_image);
}
break;
case 3:
Data[index].album.face = _this.$api.ossurl(item.album.face);
break;
case 4:
Data[index].cartoon.face = _this.$api.ossurl(item.cartoon.face);
break;
}
});
_this.dataList = _this.dataList.concat(Data);
});
},
@ -467,32 +572,79 @@ export default {
viewDetail(item){
var _this =this;
var type = _this.tabList[_this.current].type;
if(item.status != 3)
{
_this.$com.showError('照片生成中,请等待');
return;
}
var status = item.status;
switch(type)
{
case 1:
uni.navigateTo({
url:'/pages/user/photo/merge?url='+encodeURIComponent(_this.$api.ossurl(item.merge_image)),
})
//1234
switch(item.status)
{
case 1:
_this.$com.showError('照片排队中,请等待');
return;
break;
case 2:
_this.$com.showError('照片生成中,请等待');
return;
break;
}
uni.navigateTo({
url:'/pages/user/photo/merge?id='+item.id+'&url='+encodeURIComponent(_this.$api.ossurl(item.download_image)),
})
break;
case 2:
uni.navigateTo({
url:'/pagesA/color/index',
})
//1234
switch(item.status)
{
case 1:
_this.$com.showError('照片排队中,请等待');
return;
break;
case 2:
_this.$com.showError('照片生成中,请等待');
return;
break;
}
uni.navigateTo({
url:'/pages/user/photo/color?id='+item.id+'&url='+encodeURIComponent(_this.$api.ossurl(item.merge_image)),
})
break;
case 3:
//12
switch(item.status)
{
case 1:
_this.$com.showError('照片排队中,请等待');
return;
break;
}
uni.navigateTo({
url:'/pagesA/photo/photo_1',
url:'/pages/user/photo/ai?id='+item.id,
})
break;
case 4:
uni.navigateTo({
url:'/pagesA/photo/cartoon_1',
})
//1234
switch(item.status)
{
case 1:
_this.$com.showError('照片排队中,请等待');
return;
break;
case 2:
_this.$com.showError('照片生成中,请等待');
return;
break;
}
uni.navigateTo({
url:'/pages/user/photo/cartoon?id='+item.id,
})
break;
}
},
@ -594,7 +746,10 @@ height: 50rpx;
font-size: 30rpx;
font-weight: bold;
}
.tabList{
width: 100%; height: auto;
}
.datalist{ width: 100%; height: auto;}
.picBox{
width: 702rpx;

@ -0,0 +1,275 @@
<template>
<view class="container">
<custom_navbar :title="navbar_title" @getNavHeight="getNavHeight" :theme="theme" left="true" />
<view class="xcontent" :style="'margin-top:'+margin_top+'px'">
<view class="imgList">
<!--如果是多个就用imgBox-->
<view class="imgBox" v-for="(item,index) in info.album_series" :key="index">
<image :src="item.merge_image" mode="aspectFill"></image>
</view>
</view>
<view class="btnList">
<view class="btnBox a1">
<view class="btnImg">
<image src="/static/img/user/delete.png" mode="widthFix"></image>
</view>
<view class="btnTxt" @click="deletePic">删除照片</view>
</view>
<view class="btnBox a2">
<view class="btnImg">
<image src="/static/img/user/download.png" mode="widthFix"></image>
</view>
<view class="btnTxt" @click="savePic">保存到相册</view>
</view>
</view>
</view>
</view>
</template>
<script>
import custom_navbar from "../../index/components/header.vue";
export default {
components: {
custom_navbar
},
data() {
return {
id:0,
info:'', //
navbar_title: 'AI合影',
theme: "blue",
margin_top: 0,
}
},
onLoad(option) {
//
var _this =this;
var id = option.id;
if(_this.$com.isNull(id))
{
uni.navigateBack({
delta:1,
})
}
_this.id = id;
_this.getDetail();
},
onShow() {
var _this = this;
_this.checkAuth();
},
onPageScroll(e) {
if (e.scrollTop > 50) {
this.theme = 'white';
} else {
this.theme = 'blue';
}
},
methods: {
getNavHeight(e) {
this.margin_top += e;
},
//
checkAuth() {
var _this = this;
console.log('已授权---');
uni.authorize({
scope: 'scope.writePhotosAlbum',
success(res) {
console.log('已授权', res);
},
fail(err) {
uni.showModal({
title: '授权失败',
content: '请在设置界面打开存储相关权限',
success: (res) => {
if (res.confirm) {
uni.openSetting()
}
}
})
},
})
},
deletePic()
{
var _this = this;
var id = _this.id;
_this.$com.confirm('确认删除此次写真集吗?',function(res){
var post = {
id:id,
};
_this.$api.post('api/photo_album/del', post,function(rs){
console.log(rs);
uni.navigateBack({
delta:1,
})
});
},'提示');
},
//
savePic(){
var _this =this;
var ai_list = _this.info.album_series;
ai_list.forEach((item, index) => {
var url = item.merge_image;
uni.getSetting({
success(res) {
console.log(res.authSetting);
if(!res.authSetting['scope.writePhotosAlbum'])
{
uni.openSetting();
}
else
{
//
uni.downloadFile({
url: url,
success: downloadResult => {
if (downloadResult.statusCode === 200) {
//
uni.saveImageToPhotosAlbum({
filePath: downloadResult.tempFilePath,
success: () => {
uni.showToast({
title: '保存成功'
});
},
fail: () => {
uni.showToast({
title: '保存失败',
icon: 'none'
});
}
});
}
},
fail: () => {
uni.showToast({
title: '下载失败',
icon: 'none'
});
}
});
}
}
})
});
},
getDetail()
{
var _this = this;
var id = _this.id;
if(id == 0)
{
uni.navigateBack({
delta:1,
});
return;
}
var post = {
id:id,
};
_this.$api.get('api/photo_album/details', post,function(rs){
console.log(rs);
var Data = rs;
Data.album_series.forEach((item, index) => {
if(item.status == 3)
{
Data.album_series[index].merge_image = _this.$api.ossurl(item.merge_image);
}
else
{
Data.album_series[index].merge_image = _this.$api.ossurl(item.back_image);
}
});
_this.info = Data;
});
},
}
}
</script>
<style lang="scss">
.container{width: 100%; padding-top: 20rpx;}
.xcontent{ width: 710rpx; height: auto; margin: 0rpx auto;}
.imgList{width: 100%; height: auto;
display: flex; flex-wrap: wrap;
justify-content: space-between;
align-items: center; /* 如果需要垂直居中子元素 */
}
.imgBox{width: 340rpx; height: 440rpx; margin-bottom: 20rpx; }
.imgBox image{width: 340rpx; height: 440rpx; border-radius: 24rpx;}
.picBox{width: 660rpx; height: 770rpx; margin-top: 20rpx;margin-bottom: 20rpx; }
.picBox image{width: 660rpx; height: 770rpx; border-radius: 24rpx;}
.btnList{
width: 100%; height: 88rpx;
display: flex; flex-wrap: wrap;
justify-content: space-around; /* 使子元素在容器中均匀分布 */
align-items: center; /* 如果需要垂直居中子元素 */
}
.btnBox{
width: 340rpx; height: 88rpx;
border-radius: 44rpx;
display: flex;
}
.btnBox .btnImg{
width:126rpx ;
height: 88rpx;
}
.btnBox .btnImg image{
width:30rpx ;
height: 30rpx;
margin-top: 29rpx;
margin-left: 80rpx;
}
.btnBox .btnTxt{
width:214rpx ;
height: 88rpx;
font-weight: 700;
font-size: 30rpx;
line-height: 88rpx;
}
.a1{
background: linear-gradient( 270deg, rgba(46,87,241,0.15) 0%, rgba(131,88,246,0.15) 100%);
color:#7A74F0;
}
.a2{
background: linear-gradient( 270deg, #2E57F1 0%, #8358F6 100%);
color:#FFFFFF;
}
</style>

@ -0,0 +1,279 @@
<template>
<view class="container">
<custom_navbar :title="navbar_title" @getNavHeight="getNavHeight" :theme="theme" left="true" />
<view class="xcontent" :style="'margin-top:'+margin_top+'px'">
<view class="imgList">
<!--如果是多个就用imgBox-->
<!-- <view class="imgBox">
<image src="/static/img/index/pic.png" mode="aspectFill"></image>
</view>
<view class="imgBox">
<image src="/static/img/index/pic.png" mode="aspectFill"></image>
</view>
<view class="imgBox">
<image src="/static/img/index/pic.png" mode="aspectFill"></image>
</view>
<view class="imgBox">
<image src="/static/img/index/pic.png" mode="aspectFill"></image>
</view> -->
<!--如果是一个就用picBox-->
<view class="picBox">
<image :src="xurl" mode="aspectFill"></image>
</view>
</view>
<view class="btnList">
<view class="btnBox a1">
<view class="btnImg">
<image src="/static/img/user/delete.png" mode="widthFix"></image>
</view>
<view class="btnTxt" @click="deletePic">删除照片</view>
</view>
<view class="btnBox a2">
<view class="btnImg">
<image src="/static/img/user/download.png" mode="widthFix"></image>
</view>
<view class="btnTxt" @click="savePic">保存到相册</view>
</view>
</view>
</view>
</view>
</template>
<script>
import custom_navbar from "../../index/components/header.vue";
export default {
components: {
custom_navbar
},
data() {
return {
id:0,
info:'', //
xurl:'',
navbar_title: '卡通画风',
theme: "blue",
margin_top: 0,
}
},
onLoad(option) {
//
var _this =this;
var id = option.id;
if(_this.$com.isNull(id))
{
uni.navigateBack({
delta:1,
})
}
_this.id = id;
_this.getDetail();
},
onShow() {
var _this = this;
_this.checkAuth();
},
onPageScroll(e) {
if (e.scrollTop > 50) {
this.theme = 'white';
} else {
this.theme = 'blue';
}
},
methods: {
getNavHeight(e) {
this.margin_top += e;
},
//
checkAuth() {
var _this = this;
console.log('已授权---');
uni.authorize({
scope: 'scope.writePhotosAlbum',
success(res) {
console.log('已授权', res);
},
fail(err) {
uni.showModal({
title: '授权失败',
content: '请在设置界面打开存储相关权限',
success: (res) => {
if (res.confirm) {
uni.openSetting()
}
}
})
},
})
},
deletePic()
{
var _this = this;
var id = _this.id;
_this.$com.confirm('确认删除此张卡通风吗?',function(res){
var post = {
id:id,
};
_this.$api.post('api/photo_cartoon/del', post,function(rs){
console.log(rs);
uni.navigateBack({
delta:1,
})
});
},'提示');
},
//
savePic(){
var _this =this;
var url = _this.xurl;
uni.getSetting({
success(res) {
console.log(res.authSetting);
if(!res.authSetting['scope.writePhotosAlbum'])
{
uni.openSetting();
}
else
{
//
uni.downloadFile({
url: url,
success: downloadResult => {
if (downloadResult.statusCode === 200) {
//
uni.saveImageToPhotosAlbum({
filePath: downloadResult.tempFilePath,
success: () => {
uni.showToast({
title: '保存成功'
});
},
fail: () => {
uni.showToast({
title: '保存失败',
icon: 'none'
});
}
});
}
},
fail: () => {
uni.showToast({
title: '下载失败',
icon: 'none'
});
}
});
}
}
})
},
getDetail()
{
var _this = this;
var id = _this.id;
if(id == 0)
{
uni.navigateBack({
delta:1,
});
return;
}
var post = {
id:id,
};
_this.$api.get('api/photo_cartoon/details', post,function(rs){
console.log(rs);
var Data = rs;
if(Data.status == 3)
{
_this.xurl = _this.$api.ossurl(Data.merge_image);
}
else
{
_this.xurl = _this.$api.ossurl(Data.users_image);
}
Data.merge_image = _this.$api.ossurl(Data.merge_image);
Data.users_image = _this.$api.ossurl(Data.users_image);
_this.info = Data;
});
},
}
}
</script>
<style lang="scss">
.container{width: 100%; padding-top: 20rpx;}
.xcontent{ width: 710rpx; height: auto; margin: 0rpx auto;}
.imgList{width: 100%; height: auto;
display: flex; flex-wrap: wrap;
justify-content: space-around;
align-items: center; /* 如果需要垂直居中子元素 */
}
.imgBox{width: 340rpx; height: 440rpx; margin-bottom: 20rpx; }
.imgBox image{width: 340rpx; height: 440rpx; border-radius: 24rpx;}
.picBox{width: 660rpx; height: 770rpx; margin-top: 20rpx;margin-bottom: 20rpx; }
.picBox image{width: 660rpx; height: 770rpx; border-radius: 24rpx;}
.btnList{
width: 100%; height: 88rpx;
display: flex; flex-wrap: wrap;
justify-content: space-around; /* 使子元素在容器中均匀分布 */
align-items: center; /* 如果需要垂直居中子元素 */
}
.btnBox{
width: 340rpx; height: 88rpx;
border-radius: 44rpx;
display: flex;
}
.btnBox .btnImg{
width:126rpx ;
height: 88rpx;
}
.btnBox .btnImg image{
width:30rpx ;
height: 30rpx;
margin-top: 29rpx;
margin-left: 80rpx;
}
.btnBox .btnTxt{
width:214rpx ;
height: 88rpx;
font-weight: 700;
font-size: 30rpx;
line-height: 88rpx;
}
.a1{
background: linear-gradient( 270deg, rgba(46,87,241,0.15) 0%, rgba(131,88,246,0.15) 100%);
color:#7A74F0;
}
.a2{
background: linear-gradient( 270deg, #2E57F1 0%, #8358F6 100%);
color:#FFFFFF;
}
</style>

@ -0,0 +1,249 @@
<template>
<view class="container">
<custom_navbar :title="navbar_title" @getNavHeight="getNavHeight" :theme="theme" left="true" />
<view class="xcontent" :style="'margin-top:'+margin_top+'px'">
<view class="imgList">
<!--如果是多个就用imgBox-->
<!-- <view class="imgBox">
<image src="/static/img/index/pic.png" mode="aspectFill"></image>
</view>
<view class="imgBox">
<image src="/static/img/index/pic.png" mode="aspectFill"></image>
</view>
<view class="imgBox">
<image src="/static/img/index/pic.png" mode="aspectFill"></image>
</view>
<view class="imgBox">
<image src="/static/img/index/pic.png" mode="aspectFill"></image>
</view> -->
<!--如果是一个就用picBox-->
<!-- <view class="picBox">
<image src="/static/img/index/pic.png" mode="aspectFill"></image>
</view> -->
<view class="picBox">
<image :src="xurl" mode="aspectFill"></image>
</view>
</view>
<view class="btnList">
<view class="btnBox a1">
<view class="btnImg">
<image src="/static/img/user/delete.png" mode="widthFix"></image>
</view>
<view class="btnTxt" @click="deletePic">删除照片</view>
</view>
<view class="btnBox a2">
<view class="btnImg">
<image src="/static/img/user/download.png" mode="widthFix"></image>
</view>
<view class="btnTxt" @click="savePic">保存到相册</view>
</view>
</view>
</view>
</view>
</template>
<script>
import custom_navbar from "../../index/components/header.vue";
export default {
components: {
custom_navbar
},
data() {
return {
id:0,
old_url:'',
xurl:'',
navbar_title: '换底色',
theme: "blue",
margin_top: 0,
}
},
onLoad(option) {
//
var _this =this;
var id = option.id;
var url = option.url;
if(_this.$com.isNull(url) || _this.$com.isNull(id))
{
uni.navigateBack({
delta:1,
})
}
_this.id = id;
_this.old_url = url;
_this.xurl = decodeURIComponent(url);
},
onShow() {
var _this = this;
_this.checkAuth();
},
onPageScroll(e) {
if (e.scrollTop > 50) {
this.theme = 'white';
} else {
this.theme = 'blue';
}
},
methods: {
getNavHeight(e) {
this.margin_top += e;
},
//
checkAuth() {
var _this = this;
console.log('已授权---');
uni.authorize({
scope: 'scope.writePhotosAlbum',
success(res) {
console.log('已授权', res);
},
fail(err) {
uni.showModal({
title: '授权失败',
content: '请在设置界面打开存储相关权限',
success: (res) => {
if (res.confirm) {
uni.openSetting()
}
}
})
},
})
},
deletePic()
{
var _this = this;
var id = _this.id;
_this.$com.confirm('确认删除此张换底色照吗?',function(res){
var post = {
id:id,
};
_this.$api.post('api/photo_back_color/del', post,function(rs){
console.log(rs);
uni.navigateBack({
delta:1,
})
});
},'提示');
},
//
savePic(){
var _this =this;
var url = _this.xurl;
uni.getSetting({
success(res) {
console.log(res.authSetting);
if(!res.authSetting['scope.writePhotosAlbum'])
{
uni.openSetting();
}
else
{
//
uni.downloadFile({
url: url,
success: downloadResult => {
if (downloadResult.statusCode === 200) {
//
uni.saveImageToPhotosAlbum({
filePath: downloadResult.tempFilePath,
success: () => {
uni.showToast({
title: '保存成功'
});
},
fail: () => {
uni.showToast({
title: '保存失败',
icon: 'none'
});
}
});
}
},
fail: () => {
uni.showToast({
title: '下载失败',
icon: 'none'
});
}
});
}
}
})
},
}
}
</script>
<style lang="scss">
.container{width: 100%; padding-top: 20rpx;}
.xcontent{ width: 710rpx; height: auto; margin: 0rpx auto;}
.imgList{width: 100%; height: auto;
display: flex; flex-wrap: wrap;
justify-content: space-around; /* 使子元素在容器中均匀分布 */
align-items: center; /* 如果需要垂直居中子元素 */
}
.imgBox{width: 340rpx; height: 440rpx; margin-bottom: 20rpx; }
.imgBox image{width: 340rpx; height: 440rpx; border-radius: 24rpx;}
.picBox{width: 660rpx; height: 770rpx; margin-top: 20rpx;margin-bottom: 20rpx; }
.picBox image{width: 660rpx; height: 770rpx; border-radius: 24rpx;}
.btnList{
width: 100%; height: 88rpx;
display: flex; flex-wrap: wrap;
justify-content: space-around; /* 使子元素在容器中均匀分布 */
align-items: center; /* 如果需要垂直居中子元素 */
}
.btnBox{
width: 340rpx; height: 88rpx;
border-radius: 44rpx;
display: flex;
}
.btnBox .btnImg{
width:126rpx ;
height: 88rpx;
}
.btnBox .btnImg image{
width:30rpx ;
height: 30rpx;
margin-top: 29rpx;
margin-left: 80rpx;
}
.btnBox .btnTxt{
width:214rpx ;
height: 88rpx;
font-weight: 700;
font-size: 30rpx;
line-height: 88rpx;
}
.a1{
background: linear-gradient( 270deg, rgba(46,87,241,0.15) 0%, rgba(131,88,246,0.15) 100%);
color:#7A74F0;
}
.a2{
background: linear-gradient( 270deg, #2E57F1 0%, #8358F6 100%);
color:#FFFFFF;
}
</style>

@ -1,5 +1,7 @@
<template>
<view class="container">
<custom_navbar :title="navbar_title" @getNavHeight="getNavHeight" :theme="theme" left="true" />
<view class="xcontent" :style="'margin-top:'+margin_top+'px'">
<view class="imgList">
<!--如果是多个就用imgBox-->
<!-- <view class="imgBox">
@ -38,28 +40,40 @@
<view class="btnTxt" @click="savePic">保存到相册</view>
</view>
</view>
</view>
</view>
</template>
<script>
import custom_navbar from "../../index/components/header.vue";
export default {
components: {
custom_navbar
},
data() {
return {
id:0,
old_url:'',
xurl:'',
navbar_title: '证件照合成',
theme: "blue",
margin_top: 0,
}
},
onLoad(option) {
//
var _this =this;
var id = option.id;
var url = option.url;
if(_this.$com.isNull(url))
if(_this.$com.isNull(url) || _this.$com.isNull(id))
{
uni.navigateBack({
delta:1,
})
}
_this.id = id;
_this.old_url = url;
_this.xurl = decodeURIComponent(url);
},
@ -67,7 +81,20 @@
var _this = this;
_this.checkAuth();
},
onPageScroll(e) {
if (e.scrollTop > 50) {
this.theme = 'white';
} else {
this.theme = 'blue';
}
},
methods: {
getNavHeight(e) {
this.margin_top += e;
},
//
checkAuth() {
var _this = this;
@ -95,7 +122,24 @@
deletePic()
{
var _this = this;
_this.$com.showError('暂不支持删除');
var id = _this.id;
_this.$com.confirm('确认删除此张合成照吗?',function(res){
var post = {
id:id,
};
_this.$api.post('api/photo_synthesis/del', post,function(rs){
console.log(rs);
uni.navigateBack({
delta:1,
})
});
},'提示');
},
//
savePic(){
@ -150,7 +194,8 @@
</script>
<style lang="scss">
.container{padding: 20rpx 26rpx;}
.container{width: 100%; padding-top: 20rpx;}
.xcontent{ width: 710rpx; height: auto; margin: 0rpx auto;}
.imgList{width: 100%; height: auto;
display: flex; flex-wrap: wrap;
justify-content: space-around; /* 使子元素在容器中均匀分布 */

@ -1,24 +1,39 @@
<template>
<view class="container">
<view class="imgList" v-if="imgList.length > 0">
<view class="imgBox" v-for="(item,index) in imgList" :key="index">
<image :src="item" mode="aspectFill"></image>
<custom_navbar :title="navbar_title" @getNavHeight="getNavHeight" :theme="theme" left="true" />
<view class="xcontent" :style="'margin-top:'+margin_top+'px'">
<view class="imgList" v-if="imgList.length > 0">
<view class="imgBox" v-for="(item,index) in imgList" :key="index">
<image :src="item" mode="aspectFill"></image>
</view>
</view>
</view>
<u-empty icon="/static/img/user/nodata.png" mode="list" text="你还没有面部档案" width="180rpx" marginTop="120px" v-if="imgList.length == 0"></u-empty>
<view class="newBtn" v-if="imgList.length == 0" @click="newInfo">去创建</view>
<u-empty icon="/static/img/user/nodata.png" mode="list" text="你还没有面部档案" width="180rpx" marginTop="120px" v-if="imgList.length == 0"></u-empty>
<view class="newBtn" v-if="imgList.length == 0" @click="newInfo">去创建</view>
</view>
</view>
</template>
<script>
import custom_navbar from "../../index/components/header.vue";
export default {
components: {
custom_navbar
},
data() {
return {
id:0,
imgList:[],
navbar_title: '面部档案',
theme: "blue",
margin_top: 0,
}
},
onLoad(options){
@ -27,7 +42,20 @@
_this.id = options.id;
_this.getDetail();
},
onPageScroll(e) {
if (e.scrollTop > 50) {
this.theme = 'white';
} else {
this.theme = 'blue';
}
},
methods: {
getNavHeight(e) {
this.margin_top += e;
},
getDetail()
{
var _this =this;
@ -48,6 +76,11 @@
}
},
newInfo(){
var _this =this;
if(_this.id == 0)
{
_this.$user.session('ai_face_success','');
}
uni.navigateTo({
url:'/pagesA/merge/face_1'
})
@ -57,10 +90,14 @@
</script>
<style lang="scss">
.container{padding: 20rpx 26rpx;}
.imgList{width: 100%; height: auto; display: flex; flex-wrap: wrap; gap:12rpx;}
.container{width: 100%; padding-top: 20rpx;}
.xcontent{ width: 710rpx; height: auto; margin: 0rpx auto;}
.imgList{width: 100%; height: auto; display: flex; flex-wrap: wrap;
justify-content: space-between;
align-items: center; /* 如果需要垂直居中子元素 */
}
.imgBox{width: 130rpx; height: 130rpx; margin-top: 10rpx;}
.imgBox image{width: 140rpx; height: 140rpx;}
.imgBox image{width: 130rpx; height: 130rpx;}
.newBtn{
width: 400rpx;

@ -106,6 +106,7 @@
onLoad() {
var _this = this;
_this.getColorList();
_this.getUserInfo();
},
onPageScroll(e) {
if (e.scrollTop > 50) {
@ -151,6 +152,7 @@
deletePic(event) {
var _this = this;
_this.uploadImg = [];
_this.users_image = '';
},
//
afterRead(event) {
@ -209,13 +211,30 @@
submit(){
var _this = this;
var color_id = _this.colorList[_this.selectIndex].id ?? 0;
if(color_id == 0)
{
_this.$com.showError('请选择背景颜色!');
return false;
}
var users_image = _this.users_image;
if(_this.$com.isNull(users_image))
{
_this.$com.showError('请上传需要换色的照片!');
return false;
}
var post = {
back_color_id:_this.colorList[_this.selectIndex].id,
users_image:_this.users_image,
back_color_id:color_id,
users_image:users_image,
};
_this.$com.showLoading('保存图片中');
_this.$api.post('api/color/append', post,function(rs){
console.log(rs);
console.log(rs);
_this.$com.hideLoading();
uni.navigateTo({
url:"/pagesA/merge/success"
});
});
},

@ -11,7 +11,7 @@
<view class="photo_main_face_2">
<view class="photo_main_face_2_1">上传5-10有效照片越多生成效果越好</view>
<view class="photo_main_face_2_2">
<image src="/static/img/common/common_21.png" />
<image src="/static/img/index/tips.png" />
</view>
</view>
@ -291,7 +291,7 @@
var upData = {
filePath: compress_path,
fileType: 'image',
scene: 'user_max'
scene: 'user_portrait'
};
_this.$api.ossUpload(upData, function(res) {

@ -156,7 +156,7 @@
<text v-if="item.status == 2">训练中</text>
<text v-if="item.status == 4">失败</text>
</view>
<image class="imgSelect" v-if="index == selectIndex" src="/static/img/index/select.png" mode="widthFix"></image>
<image class="imgSelect" v-if="index == selectIndex && item.status == 3" src="/static/img/index/select.png" mode="widthFix"></image>
</view>
<!-- <view class="imgBox">
@ -457,7 +457,13 @@
break;
//
case 'select_show':
_this.FormData.portrait_id = _this.selectList[_this.selectIndex].id;
if(_this.selectList[_this.selectIndex].status != 3)
{
_this.$com.showError('面部档案还在生成中,请稍后选择生成');
return;
}
_this.close(key);
var FormData = _this.FormData;
console.log(FormData);

File diff suppressed because one or more lines are too long

@ -5,7 +5,7 @@
<view class="photo_main" :style="'margin-top:'+margin_top+'px'" style="width:100%;margin-left: 0;">
<view class="photo_cartoon_2" v-if="loaded && cameraEnable">
<camera flash="auto" :device-position="devicePosition" @error="errorCamera"
<camera flash="auto" :device-position="devicePosition" @error="errorCamera"
style="width: 100%; height: 100%;">
</camera>
@ -17,13 +17,13 @@
</view>
<view class="photo_cartoon_2_2">
<view class="photo_cartoon_2_2_1">
<view class="photo_cartoon_2_2_1" @click="viewAlbum">
<image src="/static/img/photo/cartoon_4.png" />
</view>
<view class="photo_cartoon_2_2_2">
<view class="photo_cartoon_2_2_2" @click="takePhoto">
<image src="/static/img/photo/cartoon_3.png" />
</view>
<view class="photo_cartoon_2_2_1">
<view class="photo_cartoon_2_2_1" @click="back2front">
<image src="/static/img/photo/cartoon_5.png" />
</view>
</view>
@ -49,26 +49,23 @@
margin_top: 0,
loaded: false,
cameraEnable: true,
loop: false,
devicePosition: "back",
use_camera: 1,
cameraContext: {},
users_image:'', //
cartoon_id:0,
}
},
mounted() {
setTimeout(() => {
this.loaded = true;
this.loopGetCameraInfo();
}, 500);
},
onShow() {
if (this.loaded && !this.loop) {
// cameraEnabletrue
this.loopGetCameraInfo();
}
var _this =this;
_this.checkAuth();
},
onLoad() {
onLoad(options) {
var _this =this;
console.log('options',options);
_this.cartoon_id = options.id;
if (uni.createCameraContext) {
this.cameraContext = uni.createCameraContext()
} else {
@ -80,10 +77,120 @@
}
},
methods: {
//
checkAuth() {
var _this = this;
console.log('已授权---');
uni.authorize({
scope: 'scope.camera',
success(res) {
console.log('已授权', res);
_this.loaded=true;
_this.cameraEnable=true;
},
fail(err) {
uni.showModal({
title: '授权失败',
content: '请在设置界面打开摄像头相关权限',
success: (res) => {
if (res.confirm) {
uni.openSetting()
}
}
})
},
})
},
getNavHeight(e) {
this.margin_top += e;
},
goTo(url)
{
uni.navigateTo({
url:url,
})
},
errorCamera(e)
{
var _this =this;
_this.$com.alertDo('请打开摄像头权限',function(res){
_this.checkAuth();
});
},
//
viewAlbum(){
var _this =this;
uni.chooseMedia({
count: 1,
mediaType: ['image'],
sourceType: ['album'],
camera: 'back',
success(res) {
console.log('相册',res);
//console.log(res.tempFiles)
var edetail= res.tempFiles[0].tempFilePath;
//
var upData = {filePath:edetail,fileType:'image',scene:'user_centre'};
_this.$api.ossUpload(upData,function(res){
console.log('ossUpload success',res);
var d = res.data;
_this.users_image = d.file_url;
uni.navigateTo({
url:'/pagesA/photo/cartoon_3?cartoon_id='+_this.cartoon_id+'&users_image='+encodeURIComponent(_this.users_image),
})
},function(err){
console.log('ossUpload fail',err);
});
}
})
},
//
takePhoto(){
var _this =this;
const ctx = uni.createCameraContext();
ctx.takePhoto({
quality: 'high',
success: (res) => {
console.log('拍照',res);
var edetail= res.tempImagePath;
//
var upData = {filePath:edetail,fileType:'image',scene:'user_centre'};
_this.$api.ossUpload(upData,function(res){
console.log('ossUpload success',res);
var d = res.data;
_this.users_image = d.file_url;
uni.navigateTo({
url:'/pagesA/photo/cartoon_3?cartoon_id='+_this.cartoon_id+'&users_image='+encodeURIComponent(_this.users_image),
})
},function(err){
console.log('ossUpload fail',err);
});
}
});
},
back2front()
{
var _this =this;
if(_this.devicePosition == 'back')
{
_this.devicePosition = 'front';
console.log('切换----前');
}
else
{
_this.devicePosition = 'back';
console.log('切换----后')
}
},
}
}
</script>

@ -5,13 +5,13 @@
<view class="photo_main" :style="'margin-top:'+margin_top+'px'" style="width:100%;margin-left: 0;">
<view class="photo_cartoon_2">
<image
src="https://img30.360buyimg.com/sku/jfs/t1/221254/4/39390/74349/661e039aF46114279/48532008a0001dd0.jpg"
:src="root+users_image"
mode="aspectFill" />
</view>
<view class="photo_cartoon_3_2">
<view class="photo_cartoon_3_2_1 photo_full_blue_btn">提交生成</view>
<view class="photo_cartoon_3_2_2">剩余生成次数 <text style="color: #7A74F0;">1</text>/30</view>
<view class="photo_cartoon_3_2_1 photo_full_blue_btn" @click="submit">提交生成</view>
<view class="photo_cartoon_3_2_2">剩余生成次数 <text style="color: #7A74F0;">{{cartoon_has}}</text>/{{all}}</view>
</view>
</view>
@ -33,24 +33,64 @@
return {
navbar_title: '卡通画风',
margin_top: 0,
root:this.$api.getOssurl(),
//
cartoon_id:0,
users_image:'',
//
cartoon_has:0, //
all:0,//
}
},
mounted() {
},
onShow() {
var _this = this;
var sceneList = _this.$user.session('sceneList');
var all = sceneList[3].number;
console.log(all);
_this.all = all;
},
onLoad() {
onLoad(options) {
var _this =this;
console.log('options',options);
_this.cartoon_id = options.cartoon_id;
_this.users_image = decodeURIComponent(options.users_image);
_this.getUserInfo();
},
methods: {
getNavHeight(e) {
this.margin_top += e;
},
///api/userInfo
getUserInfo(){
var _this = this;
_this.$api.get('/api/userInfo',{},function(res){
_this.cartoon_has = res.attach.photo.cartoon_number;
});
},
submit(){
var _this = this;
var cartoon_id = _this.cartoon_id;
var users_image = _this.users_image;
var post = {
cartoon_id:cartoon_id,
users_image:users_image,
};
_this.$com.showLoading('保存图片中');
_this.$api.post('api/cartoon/append', post,function(rs){
console.log(rs);
_this.$com.hideLoading();
uni.navigateTo({
url:"/pagesA/merge/success"
});
});
},
}
}
</script>

@ -1,77 +0,0 @@
<template>
<view>
<view class="content ">
<custom_navbar :title="navbar_title" @getNavHeight="getNavHeight" :theme="theme" />
<view class="photo_main_face" :style="'margin-top:-'+margin_top+'px'">
<view class="photo_main_face_head"></view>
<view class="photo_success_1">
<image src="/static/img/common/photo_c1.png"/>
</view>
<view class="photo_success_2">生成已提交</view>
<view class="photo_success_3">
<view>目前排队人数较多请耐心等待</view>
<view>可去<text>我的</text>页面查看生成结果</view>
</view>
<view class="photo_success_4" @click="backIndex">
<image src="/static/img/common/photo_c2.png"/>
</view>
</view>
</view>
</view>
</template>
<script>
import custom_navbar from "./components/photo_header.vue";
export default {
components: {
custom_navbar
},
data() {
return {
navbar_title: '',
theme: "blue",
margin_top: 0,
}
},
mounted() {
},
onPageScroll(e) {
if (e.scrollTop > 50) {
this.theme = 'white';
} else {
this.theme = 'blue';
}
},
methods: {
getNavHeight(e) {
this.margin_top += e;
},
backIndex()
{
uni.switchTab({
url:'/pages/index/index',
})
},
}
}
</script>
<style lang="scss" scoped>
@import './this.scss';
</style>

@ -11,7 +11,7 @@
<view class="photo_main_face_2">
<view class="photo_main_face_2_1">上传5-10有效照片越多生成效果越好</view>
<view class="photo_main_face_2_2">
<image src="/static/img/common/common_21.png" />
<image src="/static/img/index/tips.png" />
</view>
</view>
@ -275,7 +275,7 @@
var upData = {
filePath: compress_path,
fileType: 'image',
scene: 'user_max'
scene: 'user_portrait'
};
_this.$api.ossUpload(upData, function(res) {

@ -41,7 +41,7 @@
<view class="photo_list_div_one_img" >
<image
:src="root+item.back_image"
:src="root+item.face"
mode="aspectFill" />
</view>
<view class="photo_list_div_one_text">

@ -6,12 +6,11 @@
<view class="photo_tem_1">
<view class="photo_tem_1_head">
<view class="photo_tem_1_head_1">
<image mode="aspectFill"
src="https://img30.360buyimg.com/sku/jfs/t1/221254/4/39390/74349/661e039aF46114279/48532008a0001dd0.jpg" />
<image mode="aspectFill" :src="album.face"></image>
</view>
<view class="photo_tem_1_head_2">
<view class="photo_tem_1_head_2_1">复古港风</view>
<view class="photo_tem_1_head_2_2">走进中国香港90年代的繁华</view>
<view class="photo_tem_1_head_2_1">{{album.title}}</view>
<view class="photo_tem_1_head_2_2">{{album.describe}}</view>
</view>
<view class="photo_tem_1_head_3">
<view class="y_btn">
@ -21,7 +20,7 @@
</view>
<view class="photo_tem_1_2">
<u-swiper :list="photo_list"
<u-swiper :list="album.back_image"
indicator indicatorMode="line"
circular
radius="24rpx"
@ -32,65 +31,59 @@
</view>
<view class="photo_tem_2" v-if="show_btn">
<view class="photo_tem_2" v-if="show_btn" @click="checkHave">
使用模板生成
</view>
</view>
</view>
<u-popup :show="show_2" mode="center" bgColor="transparent" :round="12">
<view class="show_readme_div" style="height: 380rpx;">
<view class="show_readme_div_1">
提醒
</view>
<view class="show_readme_div_2">
<view>目前系统还未存入您的面部档案信息请先前往创建需要生成写真的面部档案</view>
</view>
<view class="show_readme_div_line">
<view class="show_readme_div_4" style="width: 220rpx;">
暂不生成
</view>
<view class="show_readme_div_3" style="width: 220rpx;">
前往创建
</view>
</view>
</view>
</u-popup>
<u-popup :show="show_3" mode="center" bgColor="transparent" :round="12">
<view class="show_readme_div" style="height: 440rpx;">
<view class="show_readme_div_1">
请选择需要生成写真的面部档案
</view>
<view class="show_readme_div_2" style="width: 520rpx;margin-left: 40rpx;">
<view class="show_readme_div_2_1">
<view class="show_readme_div_2_1_one" v-for="(item,index) in face_list" :key="index" @tap="selectThis(index,id)">
<view class="show_readme_div_2_1_one_1">
<image :src="item.url" />
</view>
<view class="show_readme_div_2_1_one_2" v-if="index == select_index">
<image src="/static/img/common/photo_common_21.png" />
</view>
<u-popup :show="select_show" :round="10" mode="center" bgColor="transparent" @close="close('select_show')" @open="open('select_show')">
<view class="popupBox">
<view class="popupTop">
请选择需要生成写真的面部档案
</view>
<view class="popupDesc">
<scroll-view class="scrollBox" scroll-x="true" @scroll="scroll" scroll-left="0">
<view class="imgBox" v-for="(item,index) in selectList" :key="index" @click="selectPortrait(index,item)">
<image class="imgBg" :src="item.model_image_thumbnail" mode="widthFix"></image>
<image class="imgLoadingImg" src="/static/img/index/loading.gif" mode="widthFix" v-if="item.status != 3"></image>
<view class="imgLoadingTxt" v-if="item.status != 3">
<text v-if="item.status == 1">排队中</text>
<text v-if="item.status == 2">训练中</text>
<text v-if="item.status == 4">失败</text>
</view>
<image class="imgSelect" v-if="index == selectIndex && item.status == 3" src="/static/img/index/select.png" mode="widthFix"></image>
</view>
</scroll-view>
</view>
<view class="popupBtn">
<view class="sbtnBox1 a1" @click="close('select_show')">取消</view>
<view class="sbtnBox1 a2" @click="submit('select_show')">确认</view>
</view>
</view>
</u-popup>
</view>
</view>
<view class="show_readme_div_line">
<view class="show_readme_div_4" style="width: 220rpx;">
暂不生成
</view>
<view class="show_readme_div_3" style="width: 220rpx;" @tap="goUrl('/pagesA/pohto/face')">
确定
</view>
</view>
<u-popup :show="tips_show" :round="10" mode="center" bgColor="transparent" @close="close('tips_show')" @open="open('tips_show')">
<view class="popupBox">
<view class="popupTop">
提醒
</view>
<view class="popupDesc1">
<u-parse :content="content" :tagStyle="style"></u-parse>
</view>
<view class="popupBtn">
<view class="sbtnBox1 a1" @click="close('tips_show')">暂不生成</view>
<view class="sbtnBox1 a2" @click="submit('tips_show')">前往创建</view>
</view>
</view>
</u-popup>
</view>
</u-popup>
</view>
</template>
@ -107,28 +100,48 @@
navbar_title: 'AI写真',
theme: "white",
margin_top: 10,
photo_list: [
'https://img30.360buyimg.com/sku/jfs/t1/221254/4/39390/74349/661e039aF46114279/48532008a0001dd0.jpg',
'https://img30.360buyimg.com/sku/jfs/t1/221254/4/39390/74349/661e039aF46114279/48532008a0001dd0.jpg',
'https://img30.360buyimg.com/sku/jfs/t1/221254/4/39390/74349/661e039aF46114279/48532008a0001dd0.jpg',
],
has_face : 1 ,//
show_3:false,
show_2:false,
album_id:0, //id
album:'',
portrait_id:0,
//
select_show:false,
//
tips_show: false,
content: `<p>目前系统还未存入您的面部档案信息,</p>
<p>请先前往创建需要生成写真的面部档案</p>
<p>创建成功后再次生成</p>`,
style: {
//
p: 'font-weight: 400;font-size: 28rpx;color: #555555;line-height: 60rpx;',
},
//
selectList:[],
selectIndex:0,//
show_btn:false,
face_list :[],
select_index:0,
select_id:''
}
},
mounted() {
},
onLoad() {
this.getFace()
onLoad(option) {
//
var _this =this;
var id = option.id;
if(_this.$com.isNull(id))
{
uni.navigateBack({
delta:1,
})
}
_this.album_id = id;
_this.geAlbumtDetail();
//_this.getFace()
},
onShow() {
@ -141,25 +154,122 @@
this.margin_top += e;
}
,
getFace(){
if(this.has_face == 0){
this.show_2 = true
}else{
for(let n=0;n<3;n++){
let t = {};
t.url = '/static/img/index/banner.png';
this.face_list.push(t);
}
this.show_3 = true
}
},
selectThis(index,id){
this.select_id = id;
this.select_index = index;
}
},
geAlbumtDetail()
{
var _this =this;
var post = {
id:_this.album_id,
};
_this.$api.get('api/album/details',post,function(rs){
console.log(rs);
var Data = rs;
Data.face = _this.$api.ossurl(Data.face);
var back_image = Data.back_image;
back_image.forEach((item, index) => {
back_image[index] = _this.$api.ossurl(item);
});
Data.back_image = back_image;
_this.album = Data;
_this.show_btn = true;
});
},
checkHave()
{
var _this =this;
_this.getPortraitList();
},
//
getPortraitList(){
var _this =this;
var post = {};
_this.$api.get('api/portrait/list', post, function(res) {
var d = res;
console.log(d);
if(d.length == 0)
{
_this.tips_show = true;
}
else
{
var selectList = d;
selectList.forEach((item, index) => {
selectList[index].model_image = item.model_image ? _this.$api.ossurl(item.model_image): '/static/img/index/p_bg.png';
selectList[index].model_image_thumbnail = item.model_image_thumbnail ? _this.$api.ossurl(item.model_image_thumbnail) : '/static/img/index/p_bg.png';
});
_this.selectList = selectList;
_this.selectIndex = 0;
_this.select_show = true;
}
});
},
//
selectPortrait(index,item)
{
var _this =this;
if(item.status == 3)
{
_this.selectIndex = index;
}
},
open(key) {
console.log('open',key);
},
close(key) {
var _this = this;
_this[key] = false;
},
//
submit(key){
var _this =this;
switch(key)
{
//
case 'tips_show':
_this.close(key);
uni.navigateTo({
url:'/pagesA/merge/face_1'
});
break;
//
case 'select_show':
_this.portrait_id = _this.selectList[_this.selectIndex].id;
if(_this.selectList[_this.selectIndex].status != 3)
{
_this.$com.showError('面部档案还在生成中,请稍后选择生成');
return;
}
_this.close(key);
var album_id = _this.album_id;
var portrait_id = _this.portrait_id;
var post = {
album_id:album_id,
portrait_id:portrait_id,
};
_this.$com.showLoading('保存图片中');
_this.$api.post('api/album/append', post,function(rs){
console.log(rs);
_this.$com.hideLoading();
uni.navigateTo({
url:"/pagesA/merge/success"
});
});
break;
}
},
}
}
@ -167,4 +277,96 @@
<style lang="scss" scoped>
@import './this.scss';
.popupBox{
width: 600rpx;
height: auto;
border-radius: 24rpx;
background-color: #FFFFFF;
}
.popupTop{
width: 600rpx;
height: 140rpx;
background: linear-gradient(to bottom, #D3D5FF 20%, #FFFFFF 50%);
border-radius: 24rpx 24rpx 0rpx 0rpx;
line-height: 140rpx;
text-align: center;
font-weight: 700;
font-size: 30rpx;
color: #333333;
}
.popupBtn{ width: 100%; height: auto;
display: flex; flex-wrap: wrap;
justify-content: space-around; /* 使子元素在容器中均匀分布 */
align-items: center; /* 如果需要垂直居中子元素 */
}
.sbtnBox{
margin: 30rpx auto;
width: 478rpx;
height: 80rpx;
font-weight: 700;
font-size: 30rpx;
line-height: 80rpx;
border: 2rpx solid #4D94FF;
text-align: center;
border-radius: 44rpx;
}
.popupDesc{
width:560rpx;
font-weight: 400;
font-size: 28rpx;
color: #555555;
height: auto;
padding: 0rpx 20rpx;
}
.popupDesc1{
width:480rpx;
font-weight: 400;
font-size: 28rpx;
color: #555555;
height: auto;
padding: 0rpx 60rpx;
}
.sbtnBox1{
margin: 30rpx auto;
width: 226rpx;
height: 80rpx;
font-weight: 700;
font-size: 30rpx;
line-height: 80rpx;
border: 2rpx solid #4D94FF;
text-align: center;
border-radius: 44rpx;
}
.scrollBox {
width: 100%;
height: 160rpx;
white-space: nowrap;
}
.imgBox{width: 160rpx; height: 160rpx; position: relative; margin: 0rpx 0rpx 0rpx 20rpx; display: inline-block; overflow: hidden;}
.imgBox .imgBg{width: 160rpx; height: 160rpx; border-radius: 20rpx; position: absolute; left: 0; top: 0;}
.imgBox .imgLoadingImg{ width: 60rpx; height: 60rpx;position: absolute; left: 50rpx; top: 40rpx;}
.imgBox .imgLoadingTxt{ width: 100%; height: 40rpx; text-align: center; color:#FFFFFF; font-size: 24rpx;position: absolute; top: 100rpx;}
.imgBox .imgSelect{width: 40rpx; height: 34rpx;position: absolute; bottom: 0; right: 0; z-index: 5;}
.a1{
background: linear-gradient( 270deg, rgba(46,87,241,0.15) 0%, rgba(131,88,246,0.15) 100%);
color:#7A74F0;
}
.a2{
background: linear-gradient( 270deg, #2E57F1 0%, #8358F6 100%);
color:#FFFFFF;
}
.a3{
background: linear-gradient( 270deg, #2E57F1 0%, #8358F6 100%);
color:#FFFFFF;
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 491 B

After

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 865 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 866 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 B

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 805 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 902 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 401 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

@ -87,4 +87,4 @@ page{background-color: #F5F6FB;}
background-color: #FFFFFF;
}
//占位
.spaceBox{ width: 100%; height: 120rpx; text-align: center;}
.spaceBox{ width: 100%; height: 120rpx; margin: 10rpx auto; text-align: center;}

Loading…
Cancel
Save