diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js index bab51afa..5099ddb2 100644 --- a/jiuyi2/common/js/config.js +++ b/jiuyi2/common/js/config.js @@ -7,7 +7,7 @@ const config = { // #endif // #ifndef H5 host: 'http://91f.xyz:8080', - // host: 'http://yg4ak8.natappfree.cc', + // host: 'http://hvw2rn.natappfree.cc', // #endif // 支付方式配置 payType: { diff --git a/jiuyi2/common/js/util.js b/jiuyi2/common/js/util.js index 7be2bd8a..0a05460f 100644 --- a/jiuyi2/common/js/util.js +++ b/jiuyi2/common/js/util.js @@ -1410,29 +1410,33 @@ const util = { * @param {Function} cb 回调函数 */ finalLogin(param, cb) { - // 登录令牌 - const token = param.data - // 缓存token - uni.setStorageSync('token', token) + try { + // 登录令牌 + const token = param.data + // 缓存token + uni.setStorageSync('token', token) - // 开启加载 - uni.showLoading({ - mask: true - }) + // 开启加载 + uni.showLoading({ + mask: true + }) - // 获取用户信息 - util.getUserinfo((userinfo) => { - // 登录 - uni.$emit('login') + // 获取用户信息 + util.getUserinfo((userinfo) => { + // 登录 + uni.$emit('login') - setTimeout(() => { - uni.reLaunch({ - url: '/pages/index/index' - }) - }, 500) - // - cb ? cb() : '' - }) + setTimeout(() => { + uni.reLaunch({ + url: '/pages/index/index' + }) + }, 500) + // + cb ? cb() : '' + }) + } catch (ev) { + console.log('finalLogin catch', ev) + } }, // 登录腾讯聊天 diff --git a/jiuyi2/components/index/indexVideo.vue b/jiuyi2/components/index/indexVideo.vue index 51652a8d..b7760086 100644 --- a/jiuyi2/components/index/indexVideo.vue +++ b/jiuyi2/components/index/indexVideo.vue @@ -173,6 +173,11 @@ tapTimer.value = setTimeout(() => { let a = tapList.length tapList.length = 0 + // 目标点赞 + let targetLike = { + 0: 1, + 1: 0 + } [props.item.isLike] switch (a) { case 1: @@ -180,19 +185,35 @@ break; case 2: console.log('公开赞') - emit('like', { - likeType: 0, - index: props.index, - isLike: props.item.isLike - }) + if (props.item.likeType == 0) { + emit('like', { + likeType: 0, + index: props.index, + isLike: targetLike + }) + } else { + emit('like', { + likeType: 0, + index: props.index, + isLike: 0 + }) + } break; case 3: console.log('隐私赞') - emit('like', { - likeType: 1, - index: props.index, - isLike: props.item.isLike - }) + if (props.item.likeType == 1) { + emit('like', { + likeType: 1, + index: props.index, + isLike: targetLike + }) + } else { + emit('like', { + likeType: 1, + index: props.index, + isLike: 0 + }) + } break; } }, 200) @@ -543,7 +564,7 @@ - + @@ -553,7 +574,7 @@ -