Browse Source

hotfix:fixbug

feature-1.1-dev
‘‘ 3 years ago
parent
commit
f45f5ddb06
  1. 6
      pages/ai/paint/loverPaint.vue
  2. 6
      pages/ai/paint/paint.vue
  3. 4
      pages/ai/paint/paintDetail.vue
  4. 4
      pages/atlas/atlas.vue
  5. 6
      pages/atlas/atlasList.vue
  6. 8
      pages/atlas/hotSearch.vue
  7. 4
      pages/creator/creator.vue
  8. 2
      pages/creator/creatorDetail.vue
  9. 39
      pages/creator/imgDetail.vue
  10. 4
      pages/index/choiceness.vue
  11. 6
      pages/index/index.vue
  12. 8
      pages/index/indexProto.vue
  13. 2
      pages/userInfo/aiPaint/aiPaint.vue
  14. 15
      pages/userInfo/goldNum/goldNum.vue
  15. 2
      pages/userInfo/goldNum/goldNumLog.vue
  16. 2
      pages/userInfo/myCollection/myCollection.vue
  17. 2
      pages/userInfo/setting/setting.vue
  18. 6
      pages/userInfo/userInfo.vue
  19. 17
      pages/userInfo/vip/vip.vue
  20. 2
      utils/request.js

6
pages/ai/paint/loverPaint.vue

@ -99,7 +99,7 @@
//
async getPrompt() {
const res = await getPrompt("2");
if (res.data.code === 200) {
if (res && res.data.code === 200) {
this.promptList = res.data.data
//console.log('this.promptList',this.promptList)
}else {
@ -140,7 +140,7 @@
}
const res = await checkVip(data);
console.log('res===', res);
if (res.data.code === 200) {
if (res && res.data.code === 200) {
if(res.data.data.isVip == 1) {
that.getDraw()
} else {
@ -171,7 +171,7 @@
//
async getPaintStyleList() {
const res = await getPaintStyle();
if (res.data.code === 200) {
if (res && res.data.code === 200) {
this.paintStyle = res.data.data
//console.log('this.paintStyle',this.paintStyle)
}else {

6
pages/ai/paint/paint.vue

@ -260,7 +260,7 @@
let that = this;
if (e.detail.value) {
checkVip({userId: that.userInfo.id, userClientType: 10}).then(res => {
if (res.data.code === 200) {
if (res && res.data.code === 200) {
if (res.data.data.isVip === "1") {
that.advancedSetting = e.detail.value;
} else {
@ -516,7 +516,7 @@
//
async getPaintStyleList() {
const res = await getPaintStyle();
if (res.data.code === 200) {
if (res && res.data.code === 200) {
this.paintStyle = res.data.data
//console.log('this.paintStyle',this.paintStyle)
}else {
@ -530,7 +530,7 @@
//
async getPrompt() {
const res = await getPrompt("0");
if (res.data.code === 200) {
if (res && res.data.code === 200) {
this.promptList = res.data.data
//console.log('this.promptList',this.promptList)
}else {

4
pages/ai/paint/paintDetail.vue

@ -117,7 +117,7 @@
this.styleName = paintData.styleName;
this.batchSize = paintData.batchSize;
textToImg(paintData).then(res =>{
if(res.data.code === 200){
if(res && res.data.code === 200){
uni.hideLoading();
console.log('res',res);
this.base64ToPath(res.data.data.images[0]);
@ -191,7 +191,7 @@
}
//
await loginTiktok(params).then(res => {
if (res.data.code === 200) {
if (res && res.data.code === 200) {
uni.setStorage({
key: 'userInfo',
data: res.data.data.userInfo,

4
pages/atlas/atlas.vue

@ -84,7 +84,7 @@
this.arrList = []
this.arrListId = []
const res = await listType()
if (res.data.code === 200) {
if (res && res.data.code === 200) {
res.data.data.forEach(item => {
this.arrList.push(item.typeName)
this.arrListId.push(item.id)
@ -107,7 +107,7 @@
typeId: this.arrListId[val]
}
const res = await signImgList(params)
if (res.data.code === 200) {
if (res && res.data.code === 200) {
this.$nextTick(() => {
this.imgList.push(...res.data.rows)
})

6
pages/atlas/atlasList.vue

@ -84,7 +84,7 @@
scanCode
})
console.log('creatorDetails', res)
if (res.data.code === 200) {
if (res && res.data.code === 200) {
uni.setStorage({
key: 'creatorDetail',
data: res.data.data,
@ -120,7 +120,7 @@
signId: that.checkId.signId,
typeId: that.checkId.typeId
})
if (res.data.code === 200) {
if (res && res.data.code === 200) {
that.$refs.waterfallRef.addData(res.data.rows);
if(res.data.rows.length < that.pageSize){ //
that.isLoadMore = true
@ -146,7 +146,7 @@
signName: that.checkId.signName
}
const res = await querySignImgBySignName(params)
if (res.data.code === 200) {
if (res && res.data.code === 200) {
that.$refs.waterfallRef.addData(res.data.rows);
if(res.data.rows.length < that.pageSize){ //
that.isLoadMore = true

8
pages/atlas/hotSearch.vue

@ -92,7 +92,7 @@
//
async insertHotKeyword(keyword){
const res = await insertHotKeyword(keyword);
if (res.data.code !== 200) {
if (res && res.data.code !== 200) {
uni.showModal({
content: res.data.msg,
showCancel: false
@ -103,7 +103,7 @@
//
async incrementHotKeywordScore(keyword){
const res = await incrementHotKeywordScore(keyword);
if (res.data.code !== 200) {
if (res && res.data.code !== 200) {
uni.showModal({
content: res.data.msg,
showCancel: false
@ -114,7 +114,7 @@
//
async getHotKeywordList() {
const res = await getHotKeywordList()
if (res.data.code === 200) {
if (res && res.data.code === 200) {
for (let i = 0; i < res.data.data.length; i++) {
let data = {
value: i,
@ -141,7 +141,7 @@
signName: res.value
}
const response = await querySignImgBySignName(params)
if (response.data.code != 200) {
if (response && response.data.code != 200) {
uni.showToast({
title: response.data.msg,
icon: 'none',

4
pages/creator/creator.vue

@ -144,7 +144,7 @@
async getBanner() {
const res = await getBannerList()
if (res.data.code === 200) {
if (res && res.data.code === 200) {
this.banner = res.data.data
} else {
uni.showModal({
@ -161,7 +161,7 @@
pageNum: that.pageNum,
pageSize: that.pageSize
})
if (res.data.code === 200) {
if (res && res.data.code === 200) {
this.creatorImgList.push(...res.data.rows)
if(res.data.rows.length < that.pageSize){ //
that.isLoadMore = true

2
pages/creator/creatorDetail.vue

@ -161,7 +161,7 @@
pageSize: that.pageSize,
}
const res = await getTypeImgsPage(params)
if (res.data.code === 200) {
if (res && res.data.code === 200) {
that.$refs.waterfallRef.addData(res.data.rows);
if(res.data.rows.length < that.pageSize){ //

39
pages/creator/imgDetail.vue

@ -76,7 +76,6 @@ var videoAd = null;
likeColor: '#ef223c',
collectColor: '#dcaa04',
urlParamId: undefined,
//isplayOver: false,
downloadUrl: undefined,
isVip: false,
canDownloadNum: 0, //
@ -93,7 +92,6 @@ var videoAd = null;
}
//
if(this.isVip === false){
//this.isplayOver = false;
//广
//let num = Math.floor(Math.random() * this.adList.length + 1)-1;
//console.log('id',this.adList[num])
@ -107,7 +105,6 @@ var videoAd = null;
onHide() {
console.log('进入onHide')
//广
//this.isplayOver = false;
},
created() {
const detailId = uni.getStorageSync('detailId')
@ -157,7 +154,7 @@ var videoAd = null;
}
const res = await checkVip(data);
console.log('res===', res);
if (res.data.code === 200) {
if (res && res.data.code === 200) {
if(res.data.data.isVip == '1') {
that.isVip = true;
}else{
@ -180,7 +177,7 @@ var videoAd = null;
platform: '0' ,//0
}
const res = await getRestDownloadNum(params);
if (res.data.code === 200) {
if (res && res.data.code === 200) {
console.log("当日非会员用户可下载结果为", res.data.data)
//
this.canDownloadNum = res.data.data
@ -260,11 +257,8 @@ var videoAd = null;
console.log('激励视频下图管理res',res)
if (res && res.isEnded || res === undefined) {
//
//that.isplayOver = true;
//console.log('广',that.isplayOver)
that.achieveSaveImg();
}else{
//that.isplayOver = false;
uni.showToast({
title: '您还没有看完视频,无法下载图片',
icon: 'none'
@ -292,9 +286,8 @@ var videoAd = null;
uni.showModal({
title: '图片下载失败',
content: '请稍后重试',
showCancel: false,
showCancel: false
// complete: function() {
// this.isplayOver = false;
// }
})
})
@ -304,7 +297,7 @@ var videoAd = null;
//
async getImgDetail(id) {
const res = await detailsTiktokImg(id)
if (res.data.code === 200) {
if (res && res.data.code === 200) {
if (!res.data?.data){
uni.showToast({
title: '获取图片信息失败',
@ -345,7 +338,7 @@ var videoAd = null;
userId: this.userInfo.id
}
const res = await judgeTiktokLike(params,token)
if (res.data.code === 200) {
if (res && res.data.code === 200) {
this.isLike = res.data.data
} else {
uni.showToast({
@ -361,7 +354,7 @@ var videoAd = null;
userId: this.userInfo.id
}
const res = await judgeTiktokCollect(params,token)
if (res.data.code === 200) {
if (res && res.data.code === 200) {
this.isCollect = res.data.data
} else {
uni.showToast({
@ -380,7 +373,7 @@ var videoAd = null;
if (!isLike) {
//
const res = await tiktokLike(params)
if (res.data.code === 200) {
if (res && res.data.code === 200) {
this.isLike = !isLike
} else {
uni.showToast({
@ -391,7 +384,7 @@ var videoAd = null;
} else {
//
const res = await tiktokUnLike(params)
if (res.data.code === 200) {
if (res && res.data.code === 200) {
this.isLike = !isLike
} else {
uni.showToast({
@ -410,7 +403,7 @@ var videoAd = null;
if (!isCollect) {
//
const res = await tiktokCollect(params)
if (res.data.code === 200) {
if (res && res.data.code === 200) {
this.isCollect = !isCollect
} else {
uni.showToast({
@ -421,7 +414,7 @@ var videoAd = null;
} else {
//
const res = await tiktokUnCollect(params)
if (res.data.code === 200) {
if (res && res.data.code === 200) {
this.isCollect = !isCollect
} else {
uni.showToast({
@ -458,7 +451,7 @@ var videoAd = null;
}
//
await loginTiktok(params).then(res => {
if (res.data.code === 200) {
if (res && res.data.code === 200) {
uni.setStorage({
key: 'userInfo',
data: res.data.data.userInfo,
@ -549,7 +542,7 @@ var videoAd = null;
platform: '0' //0
}
const res = await insertOrUpdatePreAdProfit(params);
if (res.data.code === 200) {
if (res && res.data.code === 200) {
console.log("写入广告收益成功!")
} else {
uni.showToast({
@ -570,7 +563,7 @@ var videoAd = null;
platform: '0' //0
}
const res = await insertOrUpdatePreInviteProfit(params)
if (res.data.code === 200) {
if (res && res.data.code === 200) {
// console.log("");
that.inviteResult = res.data.code;
} else {
@ -590,7 +583,7 @@ var videoAd = null;
adType: adType
}
const res = await checkUserCanDownload(params);
if (res.data.code === 200) {
if (res && res.data.code === 200) {
console.log("当日非会员用户是否可下载/奖励结果为", res.data.data)
this.canDownload = res.data.data;
} else {
@ -761,8 +754,6 @@ var videoAd = null;
//广
achieveSaveImg(){
let that = this;
//console.log('广',that.isplayOver)
// if(that.isplayOver){
//广
let url = that.downloadUrl;
//console.log('that.downloadUrl广',that.downloadUrl);
@ -813,7 +804,6 @@ var videoAd = null;
//
that.insertPreAdProfit();
that.insertPreInviteProfit();
//that.isplayOver = false;
//
that.isDownload = false;
}
@ -890,7 +880,6 @@ var videoAd = null;
//
that.insertPreAdProfit();
that.insertPreInviteProfit();
//that.isplayOver = false;
//
that.isDownload = false;
}

4
pages/index/choiceness.vue

@ -77,7 +77,7 @@
scanCode
})
console.log('creatorDetails', res)
if (res.data.code === 200) {
if (res && res.data.code === 200) {
uni.setStorage({
key: 'creatorDetail',
data: res.data.data,
@ -108,7 +108,7 @@
pageNum: this.pageNum,
pageSize: this.pageSize
})
if (res.data.code === 200) {
if (res && res.data.code === 200) {
for (let i = 0; i < res.data.rows.length; i++) {
this.imgList.push(res.data.rows[i])
}

6
pages/index/index.vue

@ -259,7 +259,7 @@
}
//
loginTiktok(params).then(res => {
if (res.data.code === 200) {
if (res && res.data.code === 200) {
uni.setStorage({
key: 'userInfo',
data: res.data.data.userInfo,
@ -295,7 +295,7 @@
//
async getHotCreatorList() {
const res = await listHotCreator()
if (res.data.code === 200) {
if (res && res.data.code === 200) {
this.hotCreatorList = res.data.data
} else {
uni.showToast({
@ -312,7 +312,7 @@
scanCode
})
console.log('creatorDetails', res)
if (res.data.code === 200) {
if (res && res.data.code === 200) {
uni.setStorage({
key: 'creatorDetail',
data: res.data.data,

8
pages/index/indexProto.vue

@ -150,7 +150,7 @@
async getBanner() {
let that = this;
const res = await getListBanner()
if (res.data.code === 200) {
if (res && res.data.code === 200) {
that.banner = res.data.data
} else {
uni.showModal({
@ -163,7 +163,7 @@
async getHotCreatorList() {
this.creatorLoading = true;
const res = await listHotCreator()
if (res.data.code === 200) {
if (res && res.data.code === 200) {
this.creatorLoading = false;
this.hotCreatorList = res.data.data
} else {
@ -182,7 +182,7 @@
pageNum: that.pageNum,
pageSize: that.pageSize
})
if (res.data.code === 200) {
if (res && res.data.code === 200) {
that.$refs.waterfallRef.addData(res.data.rows);
if(res.data.rows.length < that.pageSize){ //
that.isLoadMore = true
@ -209,7 +209,7 @@
scanCode
})
console.log('creatorDetails', res)
if (res.data.code === 200) {
if (res && res.data.code === 200) {
uni.setStorage({
key: 'creatorDetail',
data: res.data.data,

2
pages/userInfo/aiPaint/aiPaint.vue

@ -81,7 +81,7 @@
pageSize: that.pageSize
})
console.log('res',res)
if (res.data.code === 200) {
if (res && res.data.code === 200) {
let imgData = res.data.rows?.map?.(item => {
if (item.width == '1024' && item.height == '512') {
item.typeId = 4;

15
pages/userInfo/goldNum/goldNum.vue

@ -25,7 +25,6 @@ export default {
return {
userInfo: {},
noClick:true, //
//isplayOver: false,
isWatch: false,
canWatch: false, //false
canRewardNum: 0,
@ -39,10 +38,8 @@ export default {
onHide() {
console.log('进入onHide')
//广
//this.isplayOver = false;
},
onLoad() {
//this.isplayOver = false;
//广
// let num = Math.floor(Math.random() * this.adList.length + 1)-1;
// console.log('id',this.adList[num])
@ -59,7 +56,7 @@ export default {
platform: '1' ,//1
}
const res = await checkUserCanGetGold(params);
if (res.data.code === 200) {
if (res && res.data.code === 200) {
console.log("当日非会员用户是否可获取奖励结果为", res.data.data)
this.canWatch = res.data.data;
} else {
@ -142,11 +139,8 @@ export default {
console.log('激励视频领取画意值管理res',res)
if (res && res.isEnded || res === undefined) {
//
//that.isplayOver = true;
//console.log('广',that.isplayOver)
that.watchAdGetGold();
}else{
//that.isplayOver = false;
uni.showToast({
title: '您还没有看完视频,无法下载图片',
icon: 'none'
@ -174,7 +168,6 @@ export default {
content: '请稍后重试',
showCancel: false,
// complete: function() {
// this.isplayOver = false;
// }
})
})
@ -191,7 +184,7 @@ export default {
}
const res = await signGetGold(data);
console.log('签到结果===', res);
if (res.data.code === 200) {
if (res && res.data.code === 200) {
return uni.showToast({
title: "签到成功!",
icon: 'none'
@ -214,7 +207,7 @@ export default {
}
const res = await watchAdGetGold(data);
//console.log('广===', res);
if (res.data.code === 200) {
if (res && res.data.code === 200) {
return uni.showToast({
title: "画意值领取成功!",
icon: 'none'
@ -235,7 +228,7 @@ export default {
platform: '1' ,//1
}
const res = await getRestRewardNum(params);
if (res.data.code === 200) {
if (res && res.data.code === 200) {
console.log("当日非会员用户可获得奖励结果为", res.data.data)
//
this.canRewardNum = res.data.data

2
pages/userInfo/goldNum/goldNumLog.vue

@ -68,7 +68,7 @@ export default {
}
const res = await queryGoldLogPage(data);
console.log('画意值记录===', res);
if (res.data.code === 200) {
if (res && res.data.code === 200) {
that.goldNumLog.push(...res.data.rows)
if(res.data.rows.length < that.pageSize){ //
that.isLoadMore = true

2
pages/userInfo/myCollection/myCollection.vue

@ -67,7 +67,7 @@
pageNum: that.pageNum,
pageSize: that.pageSize
})
if (res.data.code === 200) {
if (res && res.data.code === 200) {
that.$refs.waterfallRef.addData(res.data.rows);
if(res.data.rows.length < that.pageSize){ //
that.isLoadMore = true

2
pages/userInfo/setting/setting.vue

@ -79,7 +79,7 @@
success: function(ress){
if(ress.confirm){
logout().then(res => {
if (res.data.code === 200) {
if (res && res.data.code === 200) {
uni.reLaunch({
url: '/pages/index/indexProto',
success() {

6
pages/userInfo/userInfo.vue

@ -146,7 +146,7 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons
}
const res = await checkVip(data);
console.log('res===', res);
if (res.data.code === 200) {
if (res && res.data.code === 200) {
if(res.data.data.isVip == '1') {
that.isVip = true;
}else{
@ -165,7 +165,7 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons
async queryGoldNum(){
let that = this;
const res = await queryGoldNum(that.userInfo.id);
if (res.data.code === 200) {
if (res && res.data.code === 200) {
that.goldNum = res.data.data;
console.log(that.goldNum);
}
@ -185,7 +185,7 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons
}
//
loginTiktok(params).then(res => {
if (res.data.code === 200) {
if (res && res.data.code === 200) {
uni.setStorage({
key: 'userInfo',
data: res.data.data.userInfo,

17
pages/userInfo/vip/vip.vue

@ -158,7 +158,7 @@
}
const res = await checkVip(data);
console.log('res===', res);
if (res.data.code === 200) {
if (res && res.data.code === 200) {
that.vipInfo = res.data.data
}
// else {
@ -170,10 +170,12 @@
},
async getVipList() {
const {
data
} = await queryUserVipList();
this.vipList = data.data
const res = await queryUserVipList();
//console.log('vipRes',res);
if(res && res.data.code === 200){
this.vipList = res.data.data
}
},
change(index) {
this.active = index
@ -215,6 +217,7 @@
}
},
tikPay(order_id, order_token) {
let that = this;
tt.pay({
orderInfo: {
order_id,
@ -226,11 +229,11 @@
}
uni.hideLoading();
this.disabled = false
that.disabled = false
},
fail(res) {
uni.hideLoading();
this.disabled = false
that.disabled = false
},
})
},

2
utils/request.js

@ -17,7 +17,7 @@ const loginFunc = (res, userInfo) => {
}
// 用户授权登录
loginTiktok(params).then(res => {
if (res.data.code === 200) {
if (res && res.data.code === 200) {
uni.setStorageSync({
key: 'token',
data: res.data.data.access_token,

Loading…
Cancel
Save