diff --git a/jiuyi2/api/durian.js b/jiuyi2/api/durian.js index 7b6cc3ea..ff42ab2f 100644 --- a/jiuyi2/api/durian.js +++ b/jiuyi2/api/durian.js @@ -60,6 +60,7 @@ export const durian = { load: true, }) }, + /** * 交易榴莲果 * @param {Object} param @@ -72,5 +73,17 @@ export const durian = { load: true, }) }, + + /** + * 获取榴莲果兑换播放量比例 + * @param {Object} param + */ + getDurainViews(param) { + return util.request({ + url: `/coreplay/durianFruitTransactionType/5`, + method: 'GET', + data: param.data, + }) + }, } export default durian \ No newline at end of file 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 52b44074..bab51afa 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://d5si5v.natappfree.cc', + // host: 'http://yg4ak8.natappfree.cc', // #endif // 支付方式配置 payType: { diff --git a/jiuyi2/components/mine/payPwd.vue b/jiuyi2/components/mine/payPwd.vue index b2a58e50..4d21f3e9 100644 --- a/jiuyi2/components/mine/payPwd.vue +++ b/jiuyi2/components/mine/payPwd.vue @@ -160,7 +160,7 @@ - + ¥{{price}} {{unit.name}} diff --git a/jiuyi2/components/shop/detail/makeOrder.vue b/jiuyi2/components/shop/detail/makeOrder.vue index 8e6fa99c..28a042c8 100644 --- a/jiuyi2/components/shop/detail/makeOrder.vue +++ b/jiuyi2/components/shop/detail/makeOrder.vue @@ -66,14 +66,16 @@ // 获取默认收货地址 function getDefaultAddress() { - api.shop.getDefaultAddress({}).then(res => { - if (res.code === 200) { - if (res.data) Object.assign(address, {}, res.data) - return - } - util.alert({ - content: res.msg, - showCancel: false, + util.isLogin().then(res => { + api.shop.getDefaultAddress({}).then(res => { + if (res.code === 200) { + if (res.data) Object.assign(address, {}, res.data) + return + } + util.alert({ + content: res.msg, + showCancel: false, + }) }) }) } diff --git a/jiuyi2/pages.json b/jiuyi2/pages.json index d3958805..d01267e5 100644 --- a/jiuyi2/pages.json +++ b/jiuyi2/pages.json @@ -722,6 +722,27 @@ "navigationBarTitleText": "邀请", "navigationStyle": "custom" } + }, + { + "path" : "pages/login/lostAccount", + "style" : + { + "navigationBarTitleText" : "账号挂失" + } + }, + { + "path" : "pages/login/freezeAccount", + "style" : + { + "navigationBarTitleText" : "账号挂失" + } + }, + { + "path" : "pages/login/unfreezeAccount", + "style" : + { + "navigationBarTitleText" : "账号解冻" + } } ], diff --git a/jiuyi2/pages/index/dataCenter/push.vue b/jiuyi2/pages/index/dataCenter/push.vue index a0ca0507..ee2994e7 100644 --- a/jiuyi2/pages/index/dataCenter/push.vue +++ b/jiuyi2/pages/index/dataCenter/push.vue @@ -35,6 +35,8 @@ const store = useStore() const userinfo = computed(() => store.state.userinfo) + // 榴莲果兑换播放量数量 + const durainView = ref(0) // 列表数据 const list = reactive({ @@ -51,7 +53,6 @@ context: '', pic: [], }) - // 表单 const apply = reactive({ author: '', @@ -82,8 +83,12 @@ }) onLoad(() => { + // 获取列表 getList() + // 开启监听 addListener() + // 获取果子兑换播放量的比例 + getDurainViews() }) onUnload(() => { @@ -108,6 +113,21 @@ uni.$off('selectPushCollectVideo') } + // 获取果子兑换播放量的比例 + function getDurainViews() { + api.durian.getDurainViews({}).then(rs => { + if (rs.code == 200) { + // 榴莲果兑换 + durainView.value = rs.data.proportion + return + } + util.alert({ + content: rs.msg, + showCancel: false, + }) + }) + } + // 刷新列表 function refreshList() { list.pageNum = 1 @@ -342,7 +362,8 @@ - 消耗{{videoIds.length}}*10 榴莲果可提升 {{videoIds.length}}*10+ 展示量 + 消耗{{videoIds.length}}*1 榴莲果可提升 {{videoIds.length}}*{{durainView}}+ 展示量 + 当前拥有{{userinfo.fruit}}榴莲果 diff --git a/jiuyi2/pages/login/freezeAccount.vue b/jiuyi2/pages/login/freezeAccount.vue new file mode 100644 index 00000000..57ae4670 --- /dev/null +++ b/jiuyi2/pages/login/freezeAccount.vue @@ -0,0 +1,127 @@ + + + + + \ No newline at end of file diff --git a/jiuyi2/pages/login/lostAccount.vue b/jiuyi2/pages/login/lostAccount.vue new file mode 100644 index 00000000..f771bb6f --- /dev/null +++ b/jiuyi2/pages/login/lostAccount.vue @@ -0,0 +1,116 @@ + + + + + \ No newline at end of file diff --git a/jiuyi2/pages/login/unfreezeAccount.vue b/jiuyi2/pages/login/unfreezeAccount.vue new file mode 100644 index 00000000..d7950707 --- /dev/null +++ b/jiuyi2/pages/login/unfreezeAccount.vue @@ -0,0 +1,112 @@ + + + + + \ No newline at end of file diff --git a/jiuyi2/pages/mine/homepage.vue b/jiuyi2/pages/mine/homepage.vue index da2a42cb..5310217a 100644 --- a/jiuyi2/pages/mine/homepage.vue +++ b/jiuyi2/pages/mine/homepage.vue @@ -187,6 +187,11 @@ proxy.$refs.menuRef.close() // util.logout(() => { + api.login.logout({ + query: { + phoneNumber: userinfo.phoneNumber, + } + }).then(rs => {}) // #ifdef APP plus.runtime.restart() // #endif @@ -216,6 +221,15 @@