Browse Source

hotfix:暂时添加画意值消耗内容、添加测试环境域名地址

feature-1.1-dev
Penny 3 years ago
parent
commit
beb279589c
  1. 4
      main.js
  2. 7
      pages/ai/paint/loverPaint.vue
  3. 10
      pages/ai/paint/paint.vue
  4. 2
      pages/ai/paint/paintDetail.vue

4
main.js

@ -6,8 +6,8 @@ import common from './utils/common.js'
// const baseURL = 'http://localhost:7010' // const baseURL = 'http://localhost:7010'
// const baseURL = 'http://81.69.47.31:7010' // const baseURL = 'http://81.69.47.31:7010'
// const baseURL = 'https://service.bnyer.cn' //正式 // const baseURL = 'https://service.bnyer.cn' //正式
const baseURL = 'http://47.108.66.163:7010' //测试 const baseURL = 'https://test.bnyer.cn' //测试
// const baseURL = 'http://jbsu95.natappfree.cc' //本地 //const baseURL = 'http://vzym6v.natappfree.cc' //本地
Vue.prototype.baseURL = baseURL; Vue.prototype.baseURL = baseURL;

7
pages/ai/paint/loverPaint.vue

@ -33,7 +33,7 @@
</view> </view>
<view class="draw-button" @click="getDraw()"> <view class="draw-button" @click="getDraw()">
生成图片 生成图片(消耗{{goldNum}}点画意值)
</view> </view>
@ -49,6 +49,7 @@
contentDesc: '', contentDesc: '',
paintStyle:[], paintStyle:[],
curType: 0, curType: 0,
goldNum: 5, //
userInfo: {}, userInfo: {},
checkData:{ checkData:{
checkCanPaint: false, //true;false checkCanPaint: false, //true;false
@ -62,6 +63,9 @@
onShow() { onShow() {
this.checkLogin(); this.checkLogin();
this.checkUserCanAiPaint(); this.checkUserCanAiPaint();
this.sceneDesc = '',
this.contentDesc = '',
this.curType = 0
}, },
methods: { methods: {
selectType(index) { selectType(index) {
@ -162,6 +166,7 @@
painterName: that.userInfo.username, painterName: that.userInfo.username,
appType: 0, appType: 0,
platform: 1, platform: 1,
goldNum: that.goldNum,
} }
uni.navigateTo({ uni.navigateTo({
url: './loverPainResult?data='+JSON.stringify(data) url: './loverPainResult?data='+JSON.stringify(data)

10
pages/ai/paint/paint.vue

@ -131,7 +131,7 @@
<view class="bottom"> <view class="bottom">
<view> <view>
<button type="default" @click="$noMultipleClicks(startPaint)" class="startPaint">开始创作</button> <button type="default" @click="$noMultipleClicks(startPaint)" class="startPaint">开始创作(消耗{{formData.goldNum}}点画意值)</button>
</view> </view>
</view> </view>
</uni-forms> </uni-forms>
@ -158,7 +158,8 @@
sfgScale: 7, // sfgScale: 7, //
steps: 20, // steps: 20, //
eta: 0, // eta: 0, //
samplerIndex: "Euler a", // samplerIndex: "DPM++ SDE Karras", //
goldNum: 2, //
}, },
checkData:{ checkData:{
checkPrompt: undefined, //true;false checkPrompt: undefined, //true;false
@ -311,7 +312,7 @@
//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'
}) })
} }
@ -363,7 +364,8 @@
painterId: that.userInfo.id, painterId: that.userInfo.id,
painterName: that.userInfo.username, painterName: that.userInfo.username,
appType: 0, appType: 0,
platform: 1 platform: 1,
goldNum: that.formData.goldNum
} }
uni.navigateTo({ uni.navigateTo({
url: './paintDetail?data='+JSON.stringify(data) url: './paintDetail?data='+JSON.stringify(data)

2
pages/ai/paint/paintDetail.vue

@ -157,7 +157,7 @@
} }
}, },
onShareAppMessage() { onShareAppMessage() {
console.log('惦记了分享') console.log('点击了分享')
// let _this = this // let _this = this
// let referee_id = '' // let referee_id = ''
// if (_this.userInfo.user_id) { // if (_this.userInfo.user_id) {

Loading…
Cancel
Save