Browse Source

Merge remote-tracking branch 'origin/feature-1.1-dev' into feature-1.1-dev

# Conflicts:
#	pages/userInfo/vip/vip.vue
feature-1.1-dev
Penny 3 years ago
parent
commit
d509a2ceb7
  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. 43
      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. 156
      pages/userInfo/userInfo.vue
  19. 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){ //

43
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,10 +286,9 @@ 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() {

156
pages/userInfo/userInfo.vue

@ -23,63 +23,93 @@
</view> </view>
<view class="menu-content"> <view class="menu-content">
<view class="prominent-menu"> <view class="prominent-menu">
<view class="prominent-menu-item collect-menu" @click="toLinkAuth('/pages/userInfo/myCollection/myCollection')"> <!-- <view class="prominent-menu-item collect-menu" @click="toLinkAuth('/pages/userInfo/myCollection/myCollection')">
<view class="prominent-menu-title">我的收藏</view> <view class="prominent-menu-title">我的收藏</view>
<view class="prominent-menu-icon"> <view class="prominent-menu-icon">
<uni-icons custom-prefix="iconfont" type="icon-wodeshoucang" size="40" :color="primaryColor" /> <uni-icons custom-prefix="iconfont" type="icon-wodeshoucang" size="40" :color="primaryColor" />
</view> </view>
</view> </view> -->
<view class="prominent-menu-item collect-menu" @click="toLinkAuth('/pages/userInfo/aiPaint/aiPaint')"> <!-- <view class="prominent-menu-item collect-menu" @click="toLinkAuth('/pages/userInfo/aiPaint/aiPaint')">
<view class="prominent-menu-title">我的创作</view> <view class="prominent-menu-title">我的创作</view>
<view class="prominent-menu-icon"> <view class="prominent-menu-icon">
<uni-icons custom-prefix="iconfont" type="icon-chuangzuozhongxin" size="40" :color="primaryColor" /> <uni-icons custom-prefix="iconfont" type="icon-chuangzuozhongxin" size="40" :color="primaryColor" />
</view> </view>
</view> -->
<view class="prominent-menu-item collect-menu" @click="toLink('/pages/userInfo/vip/vip')">
<view class="prominent-menu-icon">
<uni-icons class="list-menu-icon" type="vip" size="50" :color="primaryColor" />
</view>
<view class="prominent-menu-title">会员中心</view>
<view class="vip-center-button">
查看
</view>
</view> </view>
</view> </view>
<view class="list-menu"> <view class="list-menu">
<view class="list-menu-item" @click="toLink('/pages/userInfo/vip/vip')"> <view class="list-menu-title">
<uni-icons class="list-menu-icon" type="vip" size="20" :color="primaryColor" /> 常用功能
</view>
<!-- <view class="list-menu-item" @click="toLink('/pages/userInfo/vip/vip')">
<uni-icons class="list-menu-icon" type="vip" size="40" :color="primaryColor" />
<view class="text">会员中心</view> <view class="text">会员中心</view>
<uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> <uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons>
</view> -->
<view class="list-menu-item" @click="toLinkAuth('/pages/userInfo/myCollection/myCollection')">
<uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-wodeshoucang" size="35" :color="primaryColor" />
<view class="text">我的收藏</view>
<!-- <uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> -->
</view>
<view class="list-menu-item" @click="toLinkAuth('/pages/userInfo/aiPaint/aiPaint')">
<uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-chuangzuozhongxin" size="35" :color="primaryColor" />
<view class="text">我的创作</view>
<!-- <uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> -->
</view> </view>
<view class="list-menu-item" @click="toLink('/pages/userInfo/goldNum/goldNum')"> <view class="list-menu-item" @click="toLink('/pages/userInfo/goldNum/goldNum')">
<uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-biaoqing" size="20" :color="primaryColor" /> <uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-biaoqing" size="35" :color="primaryColor" />
<view class="text">领取画意值</view> <view class="text">领取画意值</view>
<uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> <!-- <uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> -->
</view> </view>
<view class="list-menu-item" @click="$noMultipleClicks(useCdk)"> <view class="list-menu-item" @click="$noMultipleClicks(useCdk)">
<uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-xunhuanjiagongcishu" size="20" :color="primaryColor" /> <uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-xunhuanjiagongcishu" size="35" :color="primaryColor" />
<view class="text">兑换画意值</view> <view class="text">兑换画意值</view>
<uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> <!-- <uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> -->
</view> </view>
<view class="list-menu-item" @click="toLink('/pages/userInfo/goldNum/goldNumLog')"> <!-- <view class="list-menu-item" @click="toLink('/pages/userInfo/goldNum/goldNumLog')">
<uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-huabi1" size="20" :color="primaryColor" /> <uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-huabi1" size="40" :color="primaryColor" />
<view class="text">画意值记录</view> <view class="text">画意值记录</view>
<uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> <uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons>
</view> </view> -->
</view> </view>
<view class="list-menu"> <view class="list-menu">
<view class="list-menu-title">
其他功能
</view>
<view class="list-menu-item" @click="toLink('/pages/userInfo/goldNum/goldNumLog')">
<uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-huabi1" size="35" :color="primaryColor" />
<view class="text">画意值记录</view>
<!-- <uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> -->
</view>
<view class="list-menu-item" @click="toLink(`/pages/userInfo/question/question`)"> <view class="list-menu-item" @click="toLink(`/pages/userInfo/question/question`)">
<uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-wenti-" size="20" :color="primaryColor"></uni-icons> <uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-wenti-" size="35" :color="primaryColor"></uni-icons>
<view class="text">常见问题</view> <view class="text">常见问题</view>
<uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> <!-- <uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> -->
</view> </view>
<view class="list-menu-item" @click="$noMultipleClicks(linkToUs)"> <view class="list-menu-item" @click="$noMultipleClicks(linkToUs)">
<uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-zhifeiji" size="20" :color="primaryColor" /> <uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-zhifeiji" size="35" :color="primaryColor" />
<view class="text">联系我们</view> <view class="text">联系我们</view>
<uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> <!-- <uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> -->
</view> </view>
<view class="list-menu-item" @click="toLink(`/pages/userInfo/setting/setting`)"> <view class="list-menu-item" @click="toLink(`/pages/userInfo/setting/setting`)">
<uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-chilun" size="20" :color="primaryColor"></uni-icons> <uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-chilun" size="35" :color="primaryColor"></uni-icons>
<view class="text">设置</view> <view class="text">设置</view>
<uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> <!-- <uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> -->
</view> </view>
</view> </view>
<view class="share-box"> <view class="share-box">
<button title="分享" open-type="share"> <button title="分享" open-type="share">
<view class="list-menu-item"> <view class="list-menu-item-share">
<uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-fenxiang1" size="20" :color="primaryColor" /> <uni-icons class="list-menu-icon" custom-prefix="iconfont" type="icon-fenxiang1" size="20" :color="primaryColor" />
<view class="text">分享</view> <view class="text">分享</view>
<uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons> <uni-icons class="list-menu-genduo" custom-prefix="iconfont" type="icon-gengduo"></uni-icons>
@ -146,7 +176,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 +195,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 +215,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,
@ -353,7 +383,9 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons
.my-message { .my-message {
width: 100vw; width: 100vw;
height: calc(20vh + 20rpx); height: calc(20vh + 20rpx);
background-image: linear-gradient(-225deg, #FFFEFF 0%, #D7FFFE 100%); // background-image: linear-gradient(-225deg, #FFFEFF 0%, #D7FFFE 100%);
background-image: linear-gradient(-225deg, #FFFEFF 0%, #ffe6ff 100%);
// background-color: #fff2fd;
position: relative; position: relative;
.dim-div { .dim-div {
@ -437,7 +469,7 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2); box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2);
.prominent-menu { .prominent-menu {
height: 120rpx; height: 140rpx;
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -445,21 +477,33 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons
.prominent-menu-item { .prominent-menu-item {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; // justify-content: space-between;
//width //width
width: calc(50% - 10rpx); // width: calc(50% - 10rpx);
//width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 10rpx; border-radius: 10rpx;
background-image: linear-gradient(-225deg, #E3FDF5 0%, #FFE6FA 100%); // background-image: linear-gradient(-225deg, #aaffff 0%, #c58bff 100%);
background-image: linear-gradient(-225deg, #c58bff 0%, #aaffff 100%);
padding: 20rpx 10rpx 20rpx 30rpx; padding: 20rpx 10rpx 20rpx 30rpx;
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2); box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2);
.prominent-menu-title { .prominent-menu-title {
font-size: 26rpx; margin-left: 20rpx;
font-size: 30rpx;
font-weight: 600; font-weight: 600;
text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.25); text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.25);
} }
.vip-center-button {
position: absolute;
right: 40rpx;
box-sizing: border-box;
padding: 5px 10px;
background-color: #FFFEFF;
border-radius: 40rpx;
font-size: 22rpx;
color: #3a3a3a;
}
.prominent-menu-icon { .prominent-menu-icon {
@ -470,12 +514,22 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons
} }
.list-menu { .list-menu {
position: relative;
display: flex;
flex-wrap: wrap;
// height: 160rpx;
margin-top: 20rpx; margin-top: 20rpx;
padding: 0 20rpx; padding: 90rpx 20rpx 20rpx 20rpx;
background-color: $uni-white; background-color: $uni-white;
border-radius: 10rpx; border-radius: 10rpx;
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2); box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2);
.list-menu-title {
position: absolute;
font-size: 32rpx;
font-weight: bold;
left: 40rpx;
top: 20rpx;
}
} }
@ -483,11 +537,13 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons
.list-menu-item { .list-menu-item {
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
height: 80rpx; width: 25%;
line-height: 80rpx; height: 120rpx;
border-bottom: 2rpx solid $uni-border-2; // line-height: 80rpx;
// border-bottom: 2rpx solid $uni-border-2;
.list-menu-icon{ .list-menu-icon{
color: $uni-primary; color: $uni-primary;
@ -495,14 +551,42 @@ import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons
.text { .text {
font-size: 26rpx; font-size: 26rpx;
line-height: 80rpx; // line-height: 80rpx;
width: calc(100% - 100rpx); // width: calc(100% - 100rpx);
} }
.list-menu-genduo{ .list-menu-genduo{
} }
}
.list-menu-item-share {
display: flex;
// flex-direction: column;
align-items: center;
// justify-content: space-between;
// width: 80%;
height: 90rpx;
line-height: 80rpx;
// border-bottom: 2rpx solid $uni-border-2;
.list-menu-icon{
color: $uni-primary;
margin-right: 10px;
margin-left: 10px;
}
.text {
font-size: 26rpx;
// line-height: 80rpx;
// width: calc(100% - 100rpx);
}
.list-menu-genduo{
position: absolute;
right: 30rpx;
}
} }
.list-menu-item:first-child { .list-menu-item:first-child {

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