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

6
pages/ai/paint/paint.vue

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

4
pages/ai/paint/paintDetail.vue

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

4
pages/atlas/atlas.vue

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

6
pages/atlas/atlasList.vue

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

8
pages/atlas/hotSearch.vue

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

4
pages/creator/creator.vue

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

2
pages/creator/creatorDetail.vue

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

39
pages/creator/imgDetail.vue

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

4
pages/index/choiceness.vue

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

6
pages/index/index.vue

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

8
pages/index/indexProto.vue

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

2
pages/userInfo/aiPaint/aiPaint.vue

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

15
pages/userInfo/goldNum/goldNum.vue

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

2
pages/userInfo/myCollection/myCollection.vue

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

2
pages/userInfo/setting/setting.vue

@ -79,7 +79,7 @@
success: function(ress){ success: function(ress){
if(ress.confirm){ if(ress.confirm){
logout().then(res => { logout().then(res => {
if (res.data.code === 200) { if (res && res.data.code === 200) {
uni.reLaunch({ uni.reLaunch({
url: '/pages/index/indexProto', url: '/pages/index/indexProto',
success() { 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); const res = await checkVip(data);
console.log('res===', res); console.log('res===', res);
if (res.data.code === 200) { if (res && res.data.code === 200) {
if(res.data.data.isVip == '1') { if(res.data.data.isVip == '1') {
that.isVip = true; that.isVip = true;
}else{ }else{
@ -165,7 +165,7 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons
async queryGoldNum(){ async queryGoldNum(){
let that = this; let that = this;
const res = await queryGoldNum(that.userInfo.id); const res = await queryGoldNum(that.userInfo.id);
if (res.data.code === 200) { if (res && res.data.code === 200) {
that.goldNum = res.data.data; that.goldNum = res.data.data;
console.log(that.goldNum); console.log(that.goldNum);
} }
@ -185,7 +185,7 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons
} }
// //
loginTiktok(params).then(res => { loginTiktok(params).then(res => {
if (res.data.code === 200) { if (res && res.data.code === 200) {
uni.setStorage({ uni.setStorage({
key: 'userInfo', key: 'userInfo',
data: res.data.data.userInfo, data: res.data.data.userInfo,

17
pages/userInfo/vip/vip.vue

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

2
utils/request.js

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

Loading…
Cancel
Save