From caa0b30ee6828423a2868fd4d59dcf4e1c305907 Mon Sep 17 00:00:00 2001
From: sx <2427911852@qq.com>
Date: Sun, 16 Feb 2025 22:35:46 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jiuyi2/api/durian.js | 13 ++
jiuyi2/api/login.js | 23 ++++
jiuyi2/api/mine.js | 46 ++++++-
jiuyi2/common/js/config.js | 2 +-
jiuyi2/components/mine/payPwd.vue | 2 +-
jiuyi2/components/shop/detail/makeOrder.vue | 18 +--
jiuyi2/pages.json | 21 ++++
jiuyi2/pages/index/dataCenter/push.vue | 25 +++-
jiuyi2/pages/login/freezeAccount.vue | 127 ++++++++++++++++++++
jiuyi2/pages/login/lostAccount.vue | 116 ++++++++++++++++++
jiuyi2/pages/login/unfreezeAccount.vue | 112 +++++++++++++++++
jiuyi2/pages/mine/homepage.vue | 14 +++
jiuyi2/pages/mine/myComment.vue | 15 +--
jiuyi2/pages/mine/setting/safeCenter.vue | 56 ++++++++-
jiuyi2/pages/mine/setting/setting.vue | 63 +++++-----
jiuyi2/pages/shop/collect.vue | 2 +-
jiuyi2/pages/shop/commodity/index.vue | 4 +-
jiuyi2/vite.config.js | 2 +-
18 files changed, 601 insertions(+), 60 deletions(-)
create mode 100644 jiuyi2/pages/login/freezeAccount.vue
create mode 100644 jiuyi2/pages/login/lostAccount.vue
create mode 100644 jiuyi2/pages/login/unfreezeAccount.vue
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 @@
+
+
+
+
+
+
+
+
+
diff --git a/jiuyi2/pages/mine/myComment.vue b/jiuyi2/pages/mine/myComment.vue
index 02e635db..f68fd2b4 100644
--- a/jiuyi2/pages/mine/myComment.vue
+++ b/jiuyi2/pages/mine/myComment.vue
@@ -57,7 +57,6 @@
function getLst() {
api.mine.myComment({
query: {
- userId: userinfo.value.id,
pageNum: list.pageNum,
pageSize: list.pageSize,
}
@@ -87,19 +86,21 @@
-
+
评论了 视频
- 你的视频我很喜欢,关注你了,赶快出续集
- 2024.12.08 18:00
+ {{item.content}}
+ {{item.createTime}}
-
-
+
+
-
+
+
+ 暂无内容~
diff --git a/jiuyi2/pages/mine/setting/safeCenter.vue b/jiuyi2/pages/mine/setting/safeCenter.vue
index ccf620c6..220b6e48 100644
--- a/jiuyi2/pages/mine/setting/safeCenter.vue
+++ b/jiuyi2/pages/mine/setting/safeCenter.vue
@@ -1,27 +1,75 @@
-
+
账号挂失
申诉找回九亿账号
-
+
账号冻结
主动冻结账号保护账号资产
-
+
解冻账号
风险解除后,可选择解除冻结
-
+
账号注销
提交申请,清空当前账号
diff --git a/jiuyi2/pages/mine/setting/setting.vue b/jiuyi2/pages/mine/setting/setting.vue
index 90cd99ec..4afb4cf2 100644
--- a/jiuyi2/pages/mine/setting/setting.vue
+++ b/jiuyi2/pages/mine/setting/setting.vue
@@ -118,9 +118,14 @@
content: '确定退出登录?',
}).then(res => {
if (res.confirm) {
+ api.login.logout({
+ query: {
+ phoneNumber: userinfo.phoneNumber,
+ }
+ }).then(rs => {})
+
// 退出登录
util.logout(() => {
- // checkLink('pages/login/loginPhone', 'reLaunch')
// #ifdef APP
plus.runtime.restart()
// #endif
@@ -134,17 +139,17 @@
-
-
-
+
+
+
+
+
+
+ {{userinfo.userNickname}}
+
+
-
- {{userinfo.userNickname}}
-
-
-
-
修改账号
{{userinfo.account}}
@@ -166,7 +171,7 @@
-
+
先用后付
@@ -188,10 +193,10 @@
-
+
青少年模式
@@ -200,6 +205,17 @@
+
+
+ 我的绑定
+
+
+
+
+ 我的银行卡
+
+
+
@@ -220,17 +236,6 @@
-
-
- 我的绑定
-
-
-
-
- 我的银行卡
-
-
-
意见反馈
@@ -264,10 +269,12 @@
塔罗科技网络(山东)有限公司旗下品牌---九亿
-
-
- 退出登录
-
+
+
+
+ 退出登录
+
+
diff --git a/jiuyi2/pages/shop/collect.vue b/jiuyi2/pages/shop/collect.vue
index ca3e5523..e00a77d4 100644
--- a/jiuyi2/pages/shop/collect.vue
+++ b/jiuyi2/pages/shop/collect.vue
@@ -218,7 +218,7 @@
{{item.name}}
+ @click="handleSpec(index,secIndex)" v-if="0">
已选规格: {{secItem.spec.sku}}
x{{secItem.payNum}}
diff --git a/jiuyi2/pages/shop/commodity/index.vue b/jiuyi2/pages/shop/commodity/index.vue
index 358d1b40..240c9bbc 100644
--- a/jiuyi2/pages/shop/commodity/index.vue
+++ b/jiuyi2/pages/shop/commodity/index.vue
@@ -86,7 +86,7 @@
function getDetail() {
api.shop.productDetail({
query: {
- userId: userinfo.value.id,
+ userId: userinfo.value.id || '',
// 产品id
productionId: id.value
}
@@ -109,7 +109,7 @@
// 添加浏览记录
api.shop.addBrowsing({
data: {
- userId: userinfo.value.id,
+ userId: userinfo.value.id || '',
goodsId: id.value
},
}).then(rs => {
diff --git a/jiuyi2/vite.config.js b/jiuyi2/vite.config.js
index e01a9a9f..a3886d9b 100644
--- a/jiuyi2/vite.config.js
+++ b/jiuyi2/vite.config.js
@@ -4,7 +4,7 @@ import {
import uni from '@dcloudio/vite-plugin-uni';
let target = 'http://91f.xyz:8080'
-// let target = 'http://d5si5v.natappfree.cc'
+// let target = 'http://yg4ak8.natappfree.cc'
export default defineConfig({
plugins: [uni()],