diff --git a/App.vue b/App.vue
index 1bdb42d..f66b000 100644
--- a/App.vue
+++ b/App.vue
@@ -65,10 +65,8 @@
console.log(rs);
_this.$user.session('userInfo',rs);
_this.$user.session('user_id',rs.id);
- if(!_this.$com.isNull(rs.token))
- {
- _this.$user.session('token',rs.token);
- }
+ _this.$user.session('token',rs.token);
+
});
},
fail:function(rs){
diff --git a/pages.json b/pages.json
index d25e3a2..485261c 100644
--- a/pages.json
+++ b/pages.json
@@ -37,20 +37,13 @@
}
},
{
- "path": "pages/web/video",
- "style": {
- "navigationBarTitleText": "视频",
- "enablePullDownRefresh": false
- }
- },
- {
- "path": "pages/user/archives/detail",
+ "path": "pages/user/portrait/detail",
"style": {
"navigationBarTitleText": "面部档案"
}
},
{
- "path": "pages/user/photo/detail",
+ "path": "pages/user/photo/merge",
"style": {
"navigationBarTitleText": "照片详情"
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 40d7a11..c642f0a 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -115,6 +115,9 @@
// }
],
+ //场景
+ sceneList:[],
+
specs_list:[],//证件
album_list:[],//写真
cartoon_list:[],//卡通
@@ -134,7 +137,8 @@
var _this = this;
//banner信息
_this.getBannerList();
-
+ //场景
+ _this.getSceneMenu();
//热门
_this.getHotList();
//延时1秒请求,保证成功
@@ -144,16 +148,26 @@
},
onShareAppMessage() {
- return {
- title: '智能拍照合成-首页',
- path: uni.$u.page(),
- }
+ var _this = this;
+ var userInfo = _this.$user.session('userInfo');
+ var str = !_this.$com.isNull(userInfo.invite_code) ? '?invite_code='+userInfo.invite_code :'';
+ return {
+ title: '智能拍照合成',
+ content:'证件照合成,换色,AI写真,卡通画风',
+ imageUrl:'',
+ path: '/pages/index/index'+str,
+ }
},
onShareTimeline() {
- return {
- title: '智能拍照合成-首页',
- path: uni.$u.page(),
- }
+ var _this = this;
+ var userInfo = _this.$user.session('userInfo');
+ var str = !_this.$com.isNull(userInfo.invite_code) ? '?invite_code='+userInfo.invite_code :'';
+ return {
+ title: '智能拍照合成',
+ content:'证件照合成,换色,AI写真,卡通画风',
+ imageUrl:'',
+ path: '/pages/index/index'+str,
+ }
},
methods: {
getNavHeight(e) {
@@ -266,6 +280,16 @@
url:'/pagesA/merge/index?id='+item.id+'&type='+item.type+'&ilk='+item.ilk,
})
},
+ //合照场景
+ getSceneMenu(){
+ var _this =this;
+ _this.$api.get('api/photo/scene_list', {},function(res){
+ console.log('场景',res);
+ var sceneList = res;
+ _this.sceneList = sceneList;
+ _this.$user.session('sceneList',sceneList);
+ });
+ },
}
}
diff --git a/pages/user/index.vue b/pages/user/index.vue
index d71ab02..467878c 100644
--- a/pages/user/index.vue
+++ b/pages/user/index.vue
@@ -28,7 +28,7 @@
分享给好友,好友注册登录成功即可解
+锁新的面部档案,可生成他人的写真集
`, + style: { + // 字符串的形式 + + p: 'font-weight: 400;font-size: 28rpx;color: #555555;line-height: 60rpx;', + + }, }; }, onPageScroll(e) { @@ -223,13 +252,14 @@ 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')); }, onShow() { var _this =this; _this.getUserInfo(); //场景信息 - //_this.getSceneMenu(); + _this.getSceneMenu(); //面部档案 _this.getPortraitList(); _this.tabChange({index:0}); @@ -242,16 +272,26 @@ export default { }, onShareAppMessage() { - return { - title: '智能拍照合成-我的', - path: uni.$u.page(), - } + var _this = this; + var userInfo = _this.$user.session('userInfo'); + var str = !_this.$com.isNull(userInfo.invite_code) ? '?invite_code='+userInfo.invite_code :''; + return { + title: '智能拍照合成', + content:'证件照合成,换色,AI写真,卡通画风', + imageUrl:'', + path: '/pages/index/index'+str, + } }, onShareTimeline() { - return { - title: '智能拍照合成-我的', - path: uni.$u.page(), - } + var _this = this; + var userInfo = _this.$user.session('userInfo'); + var str = !_this.$com.isNull(userInfo.invite_code) ? '?invite_code='+userInfo.invite_code :''; + return { + title: '智能拍照合成', + content:'证件照合成,换色,AI写真,卡通画风', + imageUrl:'', + path: '/pages/index/index'+str, + } }, methods:{ getNavHeight(e) { @@ -385,6 +425,11 @@ export default { { rs.forEach((item, index) => { baseList[index].id = item.id; + if(!_this.$com.isNull(item.model_image_thumbnail)) + { + baseList[index].image = _this.$api.ossurl(item.model_image_thumbnail); + } + }) } _this.portraitList = baseList; @@ -393,8 +438,6 @@ export default { }, createNew(){ var _this =this; - console.log(e); - _this.current = e.index; var type = _this.tabList[_this.current].type; switch(type) { @@ -421,7 +464,55 @@ export default { } }, - + viewDetail(item){ + var _this =this; + var type = _this.tabList[_this.current].type; + if(item.status != 3) + { + _this.$com.showError('照片生成中,请等待'); + return; + } + switch(type) + { + case 1: + uni.navigateTo({ + url:'/pages/user/photo/merge?url='+encodeURIComponent(_this.$api.ossurl(item.merge_image)), + }) + break; + case 2: + uni.navigateTo({ + url:'/pagesA/color/index', + }) + break; + case 3: + uni.navigateTo({ + url:'/pagesA/photo/photo_1', + }) + break; + case 4: + uni.navigateTo({ + url:'/pagesA/photo/cartoon_1', + }) + break; + } + }, + //显示分享弹窗1 + showShare(){ + this.tips_show = true; + }, + open(key) { + console.log('open',key); + }, + close(key) { + var _this = this; + _this[key] = false; + + }, + submit(key){ + var _this =this; + _this.close(key); + + }, }, }; @@ -485,7 +576,7 @@ height: 50rpx; padding-left: 20rpx; } .mright{width: 50%; height: 160rpx; display: flex;} - .mbItem{ width: 80rpx; height: 80rpx; margin: 40rpx auto;} + .mbItem{ width: 80rpx; height: 80rpx; margin: 40rpx auto; overflow: hidden; border-radius: 50%;} .mbItem image{width: 80rpx; height: 80rpx; } .nowENV{ width: 200rpx; height: 60rpx; margin: 10rpx auto; text-align: center;} @@ -597,4 +688,77 @@ height: 50rpx; line-height: 34rpx; margin: 65rpx 24rpx auto auto; } + + + + .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; /* 如果需要垂直居中子元素 */ + } + + .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; + + } + + .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; + } + + + .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; + } + + diff --git a/pages/user/photo/detail.vue b/pages/user/photo/detail.vue deleted file mode 100644 index 04aaf2e..0000000 --- a/pages/user/photo/detail.vue +++ /dev/null @@ -1,106 +0,0 @@ - -