main
JING 10 months ago
parent e8edd9c9db
commit 929a600e13
  1. 6
      config/request.js
  2. 5
      pages/index/index.vue
  3. 36
      pages/user/index.vue
  4. 84
      pagesA/merge/index.vue
  5. 10
      pagesA/photo/cartoon_4.vue

@ -81,7 +81,7 @@ module.exports = (vm) => {
if (custom.toast !== false) { if (custom.toast !== false) {
uni.$u.toast(data.msg) uni.$u.toast(data.msg)
} }
// 如果需要catch返回,则进行reject // 如果需要catch返回,则进行reject
if (custom?.catch) { if (custom?.catch) {
return Promise.reject(data) return Promise.reject(data)
@ -100,7 +100,9 @@ module.exports = (vm) => {
uni.$u.toast('用户信息验证失败,请重新登录'); uni.$u.toast('用户信息验证失败,请重新登录');
setTimeout(() => { setTimeout(() => {
// 此为uView的方法,详见路由相关文档 // 此为uView的方法,详见路由相关文档
//uni.$u.route('/pages/user/auth/login') uni.reLaunch({
url:'/pages/index/index',
})
}, 1500) }, 1500)
} }

@ -104,7 +104,7 @@
}, },
data() { data() {
return { return {
navbar_title: '智能拍照合成', navbar_title: '',
theme: "blue", theme: "blue",
margin_top: 0, margin_top: 0,
@ -122,10 +122,11 @@
onPageScroll(e) { onPageScroll(e) {
if (e.scrollTop > 50) { if (e.scrollTop > 50) {
this.theme = 'white'; this.theme = 'white';
this.navbar_title='智能拍照合成';
} else { } else {
this.theme = 'blue'; this.theme = 'blue';
this.navbar_title='';
} }
}, },
onLoad() { onLoad() {

@ -1,15 +1,7 @@
<template> <template>
<view> <view>
<!-- <u-navbar <custom_navbar :title="navbar_title" @getNavHeight="getNavHeight" :theme="theme" left="false" />
leftText="返回" <view class="header" :style="'margin-top:-'+margin_top+'px'">
title="个人中心"
:placeholder="true"
:autoBack="true"
bgColor="transparent"
>
<view slot="left"> </view>
</u-navbar> -->
<view class="header">
<image class='background' src="/static/img/user/topbg.png" mode="aspectFill"></image> <image class='background' src="/static/img/user/topbg.png" mode="aspectFill"></image>
<view class="userInfo"> <view class="userInfo">
<view class="uleft"> <view class="uleft">
@ -160,11 +152,20 @@
</template> </template>
<script> <script>
import user from '../../config/user'; import custom_navbar from "../index/components/header.vue";
export default { export default {
components: {
custom_navbar
},
data() { data() {
return { return {
navbar_title: '',
theme: "blue",
margin_top: 0,
isLogin:false, // isLogin:false, //
info:{ info:{
avatar:'/static/img/user/avatar.png', avatar:'/static/img/user/avatar.png',
@ -185,6 +186,16 @@ export default {
}; };
}, },
onPageScroll(e) {
if (e.scrollTop > 50) {
this.theme = 'white';
this.navbar_title='个人中心';
} else {
this.theme = 'blue';
this.navbar_title='';
}
},
onReady: function (res) { onReady: function (res) {
}, },
@ -207,6 +218,9 @@ export default {
} }
}, },
methods:{ methods:{
getNavHeight(e) {
this.margin_top += e;
},
// //
imgErr(){ imgErr(){
this.info.avatar = '/static/img/user/avatar.png'; this.info.avatar = '/static/img/user/avatar.png';

@ -16,7 +16,7 @@
<view class="tabs_div1"> <view class="tabs_div1">
<u-tabs @click="changeTab()" :current="this_tab" :list="list1" lineWidth="25" lineHeight="10" <u-tabs @click="changeTab()" :current="this_tab" :list="tabList" lineWidth="25" lineHeight="10"
:lineColor="`url(${lineBg}) 100% 100%`" :activeStyle="{ :lineColor="`url(${lineBg}) 100% 100%`" :activeStyle="{
color: '#333333', color: '#333333',
fontWeight: 'bold', fontWeight: 'bold',
@ -45,8 +45,8 @@
</view> </view>
<view class="topCenter"> <view class="topCenter">
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="desc">{{item.w_h_mm.w}}×{{item.w_h_mm.h}}mm | {{item.w_h_px.w}}×{{item.w_h_px.h}}px</view> <view class="desc" v-if="!(item.w_h_mm.w == 0 && item.w_h_mm.h == 0 && item.w_h_px.w == 0 && item.w_h_px.h == 0)">{{item.w_h_mm.w}}×{{item.w_h_mm.h}}mm | {{item.w_h_px.w}}×{{item.w_h_px.h}}px</view>
<view class="desc" v-else>自己设置照片的宽和高</view>
</view> </view>
<view class="topRight"> <view class="topRight">
<view class="distance"> <view class="distance">
@ -56,7 +56,7 @@
</view> </view>
</view> </view>
<view class="photoBox" @click="showEdit"> <!-- <view class="photoBox" @click="showEdit">
<view class="photoTop"> <view class="photoTop">
<view class="topLeft"> <view class="topLeft">
<image src="/static/img/index/zj_icon.png" mode="widthFix"></image> <image src="/static/img/index/zj_icon.png" mode="widthFix"></image>
@ -72,7 +72,7 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view> -->
@ -202,17 +202,20 @@
return { return {
navbar_title: '证件照合成', navbar_title: '证件照合成',
theme: "white", theme: "white",
search_text: '', search_text: '', //
margin_top: 0, margin_top: 0,
lineBg: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAOCAYAAABDwm71AAAAAXNSR0IArs4c6QAAAm5JREFUSEu1lD1oFEEUx39vZhOCpghikUIwkMKAjYWFEEELQdQTRfwqLGyMgsFcNDEWEbYQNB+Sw7ugdilSBDQ2tikSsFCwsBFiIVikSBEwQoRLuMzT3ds9z8vtXcjHwOzCzs57v/ef/xshGmdeaLsVUgZQYeZ9t3yN13bz/bpf2wVSYQ7DTNdQMa8Ej1RO76JkRPBQ8JS8OAbfpeX5bkLlHumAcTyxihcIAuSBvlsjMi7nc3pY4TPQFJIq2GiKY3TpF49nfQk27NjwffX25RkzSreJckVggS4FhQ5JZbVHhEwpaxlYsMk4PjYYbk6m5dtOkGUG9ZBzTFjHsUCASrAgh0I6BKMMrFyxeJN15A28susMTTyUxa0A+v3auqeRHqP0GcWLTyURLDL9fOivCHfDpljFAFCZ8oS3P38z98aXlVqQvq/N4jjhKddNcYZApYKrK5ZXw9HQ/OfG9YEoo5UeK1VTcbwhuKPwN9m8VeYNLHqO5cAnxtFs4YBxdFilw4BnXdG3teLFHgO6Q/PHFZ/N6QUDU6I0JSpWL3iVAsrsUA8sr3Cja0SmS9dF6S7LameDMmmgrW6FtSCKTVNUiVDdeootoFy+PSqfYpaSYvGHi2PaIoaXhtAT/wXcFqyrfpQCE2ur9PZmZLncrxvA4sVLWe206+SscqSqWberGHwRSN97KnPVGigRLP75ak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iZrgwPNrpsAAAAASUVORK5CYII=',
// 123
list1: [{ tabList: [{
type:1,
name: '普通寸照' name: '普通寸照'
}, { }, {
type:2,
name: '考试寸照', name: '考试寸照',
}, },
{ {
type:3,
name: '社会寸照', name: '社会寸照',
}], }],
this_tab:0, this_tab:0,
@ -348,29 +351,28 @@
return {total:32,list:list}; return {total:32,list:list};
}, },
getList(){ getList(){
var _this =this;
let params = {
page: this.curPage + 1,
var post = {
title:_this.search_text,
type:_this.tabList[_this.this_tab].type,
page:_this.curPage + 1,
limit: 10, limit: 10,
sex: this.this_tab,
text:this.search_text
}; };
_this.$api.get('api/specs/list', post, function(res) {
let res = this.getListData();
var d = res;
console.log(d);
this.curPage = params.page; _this.curPage = post.page;
this.total = res.total; _this.total = d.total;
_this.temList = _this.temList.concat(d.data);
let datas = [...this.temList];
});
if (params.page > 1) {
datas.push(...res.list)
} else {
datas = res.list;
}
this.temList = datas;
}, },
goThis(id){ goThis(id){
@ -384,7 +386,7 @@
this.temList[index].icon = '/static/img/index/zj_icon.png'; this.temList[index].icon = '/static/img/index/zj_icon.png';
}, },
// //
showEdit(){ showEdit(item){
var _this = this; var _this = this;
_this.custom_show = true; _this.custom_show = true;
}, },
@ -403,24 +405,40 @@
if(key == 'tips_show') if(key == 'tips_show')
{ {
uni.navigateTo({ uni.navigateTo({
url:'/pagesA/photo/face' url:'/pagesA/merge/face_1'
}) })
} }
}, },
// //
checkHave(item){ checkHave(item){
var _this = this; var _this = this;
// 09 if(!(item.w_h_mm.w == 0 && item.w_h_mm.h == 0 && item.w_h_px.w == 0 && item.w_h_px.h == 0))
var randomNumber = Math.floor(Math.random() * 10);
if(randomNumber > 5)
{ {
_this.select_show = true; 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
{
_this.select_show = true;
}
});
} }
else else
{ {
_this.tips_show = true; _this.showEdit(item);
} }
}, },

@ -12,7 +12,7 @@
<view>目前排队人数较多请耐心等待</view> <view>目前排队人数较多请耐心等待</view>
<view>可去<text>我的</text>页面查看生成结果</view> <view>可去<text>我的</text>页面查看生成结果</view>
</view> </view>
<view class="photo_success_4"> <view class="photo_success_4" @click="backIndex">
<image src="/static/img/common/photo_c2.png"/> <image src="/static/img/common/photo_c2.png"/>
</view> </view>
</view> </view>
@ -56,7 +56,13 @@
getNavHeight(e) { getNavHeight(e) {
this.margin_top += e; this.margin_top += e;
} },
backIndex()
{
uni.switchTab({
url:'/pages/index/index',
})
},

Loading…
Cancel
Save