黎海 2 年之前
父节点
当前提交
cf2504d057

+ 1 - 1
app_list.json

@@ -1,6 +1,6 @@
1
 {
1
 {
2
   "taroConfig": {
2
   "taroConfig": {
3
-    "version": "1.4.2",
3
+    "version": "1.4.3",
4
     "desc": "更改人物动漫化"
4
     "desc": "更改人物动漫化"
5
   },
5
   },
6
   "app_list": [
6
   "app_list": [

+ 1 - 1
package.json

@@ -81,7 +81,7 @@
81
         "webpack": "5.69.0"
81
         "webpack": "5.69.0"
82
     },
82
     },
83
     "taroConfig": {
83
     "taroConfig": {
84
-        "version": "1.4.2",
84
+        "version": "1.4.3",
85
         "desc": "更改人物动漫化"
85
         "desc": "更改人物动漫化"
86
     }
86
     }
87
 }
87
 }

+ 2 - 2
src/api/config.js

@@ -1,7 +1,7 @@
1
 // 配置请求对象
1
 // 配置请求对象
2
 // 本地调试 dev 开发阶段
2
 // 本地调试 dev 开发阶段
3
-export const baseUrl = "https://test-openai.fyshark.com";//测试
4
-// export const baseUrl = "https://openai.fyshark.com";//正式
3
+// export const baseUrl = "https://test-openai.fyshark.com";//测试
4
+export const baseUrl = "https://openai.fyshark.com";//正式
5
 // product 阶段
5
 // product 阶段
6
 // https://www.fastmock.site/mock/3f112f6cb2f621fc9c2dd6a14be19f38/beers/
6
 // https://www.fastmock.site/mock/3f112f6cb2f621fc9c2dd6a14be19f38/beers/
7
 // 设计模式
7
 // 设计模式

+ 1 - 0
src/moduleB/pages/comic/index.jsx

@@ -95,6 +95,7 @@ export default class collection extends Component {
95
       success: function (res) {
95
       success: function (res) {
96
         console.log(res, 'res');
96
         console.log(res, 'res');
97
         const file = res.tempFiles[0].tempFilePath
97
         const file = res.tempFiles[0].tempFilePath
98
+        console.log(res.tempFiles[0].size,'res.tempFiles[0].size');
98
         if (res.tempFiles[0].size > 2000000) {
99
         if (res.tempFiles[0].size > 2000000) {
99
           Taro.showToast({ title: '图片大小不能超过2M', icon: 'none' })
100
           Taro.showToast({ title: '图片大小不能超过2M', icon: 'none' })
100
           return
101
           return

+ 3 - 20
src/moduleB/pages/comicActivity/index.jsx

@@ -55,8 +55,8 @@ export default class collection extends Component {
55
       if (res.code == 200) {
55
       if (res.code == 200) {
56
         this.setState({
56
         this.setState({
57
           is_week: res.data.is_week,
57
           is_week: res.data.is_week,
58
-          models: res.data.models[0],
59
-          consultImg: res.data.models[0].img
58
+          models: res.data,
59
+          consultImg: res.data.img
60
         })
60
         })
61
       }
61
       }
62
     })
62
     })
@@ -110,23 +110,6 @@ export default class collection extends Component {
110
       }
110
       }
111
     })
111
     })
112
   }
112
   }
113
-  //画图
114
-  generatePictures () {
115
-    if (!this.state.isImage) {
116
-      Taro.showToast({ title: '请先上传图片', icon: 'none' })
117
-      return
118
-    }
119
-    api.drawGcImg({ img_url: this.state.consultImg, style_id: this.state.creatInfo.models[this.state.modelIndex].id }).then(res => {
120
-      if (res.code == 200) {
121
-        Taro.navigateTo({
122
-          url: `/moduleB/pages/comicDetail/index?task_id=${res.data.task_id}`
123
-        })
124
-      } else {
125
-        Taro.hideLoading()
126
-        Taro.showToast({ icon: 'none', title: res.msg })
127
-      }
128
-    })
129
-  }
130
   //看广告画图
113
   //看广告画图
131
   playVideoGeneratePictures () {
114
   playVideoGeneratePictures () {
132
 
115
 
@@ -262,7 +245,7 @@ export default class collection extends Component {
262
   }
245
   }
263
   deleteImg () {
246
   deleteImg () {
264
     this.setState({
247
     this.setState({
265
-      consultImg: 'http://video-img.fyshark.com/1681721632520%E4%B8%8A.png',
248
+      consultImg: this.state.models.img,
266
       isImage: false,
249
       isImage: false,
267
     })
250
     })
268
   }
251
   }

+ 3 - 0
src/moduleB/pages/comicActivityDetail/index.jsx

@@ -90,6 +90,9 @@ export default class collection extends Component {
90
           duration: 2000
90
           duration: 2000
91
         })
91
         })
92
         that.unlockGcImg(item, index)
92
         that.unlockGcImg(item, index)
93
+        if (item.status == 4) {
94
+          that.generatePictures(item, index)
95
+        }
93
       }
96
       }
94
     } else {
97
     } else {
95
       this.setState({
98
       this.setState({

+ 3 - 0
src/moduleB/pages/comicDetail/index.jsx

@@ -89,6 +89,9 @@ export default class collection extends Component {
89
           duration: 2000
89
           duration: 2000
90
         })
90
         })
91
         that.unlockGcImg(item, index)
91
         that.unlockGcImg(item, index)
92
+        if (item.status == 4) {
93
+          that.generatePictures(item, index)
94
+        }
92
       }
95
       }
93
     } else {
96
     } else {
94
       this.setState({
97
       this.setState({