Browse Source

feature-tiktok-1.0:添加页面

feature-1.0
‘‘ 3 years ago
parent
commit
4ddfab099a
  1. 10
      api/paint.js
  2. 10
      pages.json
  3. 22
      pages/creator/imgDetail.vue
  4. BIN
      static/paint-default.png
  5. BIN
      static/paint-selecte.png

10
api/paint.js

@ -38,4 +38,14 @@ export function getAiPaintPage(data) {
})
}
// 检查某平台用户当日ai绘画次数是否超标
export function checkUserCanAiPaint(data, headers) {
return request({
url: `${serviceTitle}${prefix}/checkUserCanAiPaint`,
method: 'post',
data,
headers: headers
})
}

10
pages.json

@ -52,14 +52,14 @@
{
"path": "pages/ai/paint/paint",
"style": {
"navigationBarTitleText": "意境画",
"navigationBarTitleText": "意境画",
"enablePullDownRefresh": false
}
},
{
"path": "pages/ai/paint/paintDetail",
"style": {
"navigationBarTitleText": "意境画",
"navigationBarTitleText": "意境画",
"enablePullDownRefresh": false
}
},
@ -161,6 +161,12 @@
"selectedIconPath": "static/art-select.png",
"text": "画廊"
},
{
"pagePath": "pages/ai/paint/paint",
"iconPath": "static/paint-default.png",
"selectedIconPath": "static/paint-selecte.png",
"text": "意境画世"
},
{
"pagePath": "pages/atlas/atlas",
"iconPath": "static/classify-default.png",

22
pages/creator/imgDetail.vue

@ -83,9 +83,12 @@
this.loadAdvertise(this.adList[num]);
},
onShow() {
this.achieveSaveImg();
console.log('进入onshow')
//tiktokAd.rewarded.load(this.adList[num])
//this.achieveSaveImg();
},
onHide() {
console.log('进入onHide')
//广
this.isplayOver = false;
},
@ -137,7 +140,8 @@
if (res && res.isEnded || res === undefined) {
//
that.isplayOver = true;
console.log('激励视频广告观看完毕',isplayOver)
console.log('激励视频广告观看完毕',that.isplayOver)
that.achieveSaveImg();
} else {
that.isplayOver = false;
console.log('激励视频广告尚未看完',that.isplayOver)
@ -154,8 +158,8 @@
showAdvertise(url){
let videoAd = this.videoAd
this.downloadUrl = url;
//console.log('广url',url);
//console.log('this.downloadUrl广',this.downloadUrl);
console.log('看广告时传入进来的url',url);
console.log('this.downloadUrl看广告时',this.downloadUrl);
videoAd.show().catch(() => {
//
videoAd.load()
@ -483,15 +487,15 @@
if(that.isplayOver){
//广
let url = that.downloadUrl;
//console.log('that.downloadUrl广',that.downloadUrl);
//console.log('url广',url);
console.log('that.downloadUrl观看完广告',that.downloadUrl);
console.log('url观看完广告',url);
uni.showLoading({
title: '正在保存图片...',
success() {
//
uni.getSetting({
success(res){
//console.log('res',res)
console.log('授权res',res)
//
if (!res.authSetting["scope.album"]) {
//
@ -571,7 +575,7 @@
});
} else {
//
//console.log(',',url);
console.log('已有相册权限,开始保存图片',url);
//
uni.downloadFile({
url,
@ -627,7 +631,7 @@
});
}else{
//广
//console.log('广')
console.log('未观看完广告,不可下载图片')
}
},
//

BIN
static/paint-default.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
static/paint-selecte.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Loading…
Cancel
Save