diff --git a/jiuyi2/api/durian.js b/jiuyi2/api/durian.js index 36bf2d11..247cd4fc 100644 --- a/jiuyi2/api/durian.js +++ b/jiuyi2/api/durian.js @@ -60,6 +60,7 @@ export const durian = { load: true, }) }, + /** * 交易榴莲果 * @param {Object} param @@ -72,6 +73,7 @@ export const durian = { load: true, }) }, +<<<<<<< HEAD /** * 榴莲果配置 * @param {Object} param @@ -80,6 +82,18 @@ export const durian = { return util.request({ url: `/coreplay/durianFruitTransactionType/10`, method: 'GET', +======= + + /** + * 获取榴莲果兑换播放量比例 + * @param {Object} param + */ + getDurainViews(param) { + return util.request({ + url: `/coreplay/durianFruitTransactionType/5`, + method: 'GET', + data: param.data, +>>>>>>> e13df4169078e5739567f80dd1d8caae214e4c7f }) }, } diff --git a/jiuyi2/api/login.js b/jiuyi2/api/login.js index 3588a223..74084586 100644 --- a/jiuyi2/api/login.js +++ b/jiuyi2/api/login.js @@ -63,6 +63,29 @@ const login = { }) }, + /** + * 登出 清空token 改变用户在线状态 + * @param {Object} param + */ + logout(param) { + return util.request({ + url: '/user/logout', + query: param.query, + method: 'PUT', + }) + }, + + /** + * 注销账号 + * @param {Object} param + */ + cancelAccount(param) { + return util.request({ + url: '/user/user/cancelAccount', + query: param.query, + method: 'DELETE', + }) + }, } export default login \ No newline at end of file diff --git a/jiuyi2/api/mine.js b/jiuyi2/api/mine.js index e03e481c..38c664c7 100644 --- a/jiuyi2/api/mine.js +++ b/jiuyi2/api/mine.js @@ -59,9 +59,9 @@ const mine = { */ myComment(param) { return util.request({ - url: `/user/home/myComment`, + url: `/video/comment/getMyComment`, query: param.query, - method: 'POST', + method: 'GET', }) }, @@ -256,9 +256,45 @@ const mine = { data: param.data, method: 'POST', load: true, - header: { - // 'Content-Type': 'multipart/form-data', - } + }) + }, + + /** + * 账号挂失 + * @param {Object} param + */ + lostAccount(param) { + return util.request({ + url: '/user/user/lostAccount', + data: param.data, + query: param.query, + method: 'POST', + }) + }, + + /** + * 账号冻结 + * @param {Object} param + */ + freezeAccount(param) { + return util.request({ + url: '/user/user/freezeAccount', + data: param.data, + query: param.query, + method: 'POST', + }) + }, + + /** + * 账号解冻 + * @param {Object} param + */ + unfreezeAccount(param) { + return util.request({ + url: '/user/user/unfreezeAccount', + data: param.data, + query: param.query, + method: 'POST', }) }, } diff --git a/jiuyi2/common/js/config.js b/jiuyi2/common/js/config.js index c6bbe709..74f63225 100644 --- a/jiuyi2/common/js/config.js +++ b/jiuyi2/common/js/config.js @@ -6,9 +6,14 @@ const config = { // host: 'h5api', // #endif // #ifndef H5 +<<<<<<< HEAD // host: 'http://91f.xyz:8080', host: 'https://b433d23.r24.cpolar.top/', // host: 'http://hvw2rn.natappfree.cc', +======= + host: 'http://91f.xyz:8080', + // host: 'http://b2xbj5.natappfree.cc', +>>>>>>> e13df4169078e5739567f80dd1d8caae214e4c7f // #endif // 支付方式配置 payType: { diff --git a/jiuyi2/common/js/util.js b/jiuyi2/common/js/util.js index 7be2bd8a..62c310c5 100644 --- a/jiuyi2/common/js/util.js +++ b/jiuyi2/common/js/util.js @@ -213,7 +213,7 @@ const util = { responseType: params.responseType || 'text', // 请求成功返回 success: res => { - // console.log('request success', url, res, params.data ? params.data : '') + console.log('request success', url, res, params.data ? params.data : '') // 关闭加载效果 if (params.load) { uni.hideLoading() @@ -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 @@ -