Browse Source

feature-tiktok-1.0:新增兑换AI绘画次数

feature-1.0
‘‘ 3 years ago
parent
commit
b2c030c4b3
  1. 62
      pages/ai/paint/paint.vue

62
pages/ai/paint/paint.vue

@ -101,7 +101,7 @@
checkPrompt: undefined, //true;false checkPrompt: undefined, //true;false
checkStyleBox: undefined, //true;false checkStyleBox: undefined, //true;false
checkSize: undefined, //true;false checkSize: undefined, //true;false
//checkCanPaint: false, //true;false checkCanPaint: false, //true;false
}, },
userInfo: {}, userInfo: {},
noClick:true, // noClick:true, //
@ -151,7 +151,7 @@
this.style_active = 0; this.style_active = 0;
this.prompt_active = 0; this.prompt_active = 0;
this.checkLogin(); this.checkLogin();
//this.checkUserCanAiPaint(); this.checkUserCanAiPaint();
}, },
methods: { methods: {
@ -189,12 +189,12 @@
const that = this; const that = this;
//console.log('that.checkData.checkCanPaint',that.checkData.checkCanPaint) //console.log('that.checkData.checkCanPaint',that.checkData.checkCanPaint)
//ai TODO //ai TODO
// if(that.checkData.checkCanPaint === true){ if(that.checkData.checkCanPaint === true){
// return uni.showToast({ return uni.showToast({
// title: ',!', title: '当日绘画次数已用完,请明日再来!',
// icon: 'none' icon: 'none'
// }) })
// } }
// //
//console.log('prompt',that.formData.promptText) //console.log('prompt',that.formData.promptText)
@ -236,7 +236,7 @@
painterId: that.userInfo.id, painterId: that.userInfo.id,
painterName: that.userInfo.username, painterName: that.userInfo.username,
appType: 0, appType: 0,
platform: 0 platform: 1
} }
uni.navigateTo({ uni.navigateTo({
url: './paintDetail?data='+JSON.stringify(data) url: './paintDetail?data='+JSON.stringify(data)
@ -326,28 +326,28 @@
}, },
//AI //AI
// async checkUserCanAiPaint(){ async checkUserCanAiPaint(){
// let that = this; let that = this;
// const data = { const data = {
// userId: that.userInfo.id, userId: that.userInfo.id,
// platform: 0, platform: 0,
// appType: 0 appType: 0
// } }
// const res = await checkUserCanAiPaint(data); const res = await checkUserCanAiPaint(data);
// //console.log('res',res) //console.log('res',res)
// if(res.data.code === 200){ if(res.data.code === 200){
// if(res.data.data === true){ if(res.data.data === true){
// that.checkData.checkCanPaint = true; that.checkData.checkCanPaint = true;
// }else{ }else{
// that.checkData.checkCanPaint = false; that.checkData.checkCanPaint = false;
// } }
// }else{ }else{
// return uni.showModal({ return uni.showModal({
// content: '', content: '检查绘画上限失败!',
// showCancel: false showCancel: false
// }); });
// } }
// }, },
// //
async getPaintStyleList() { async getPaintStyleList() {

Loading…
Cancel
Save