This commit is contained in:
2025-03-20 19:32:25 +08:00
parent ebc8c7bb26
commit 8e35b74d86
17 changed files with 3170 additions and 1840 deletions
+114 -35
View File
@@ -25,7 +25,7 @@
@click="toSetting()">
</image></view>
</view>
<view class="user" @click="toUserInfoPage()">
<view class="user" @click="toPersonalpage()">
<!-- <svg t="1739689350355" class="avatar" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4351" width="16" height="16"><path d="M499.952941 0c-144.564706 0-265.035294 123.482353-265.035294 268.047059 0 147.576471 120.470588 268.047059 265.035294 268.047059s268.047059-120.470588 268.047059-268.047059C764.988235 120.470588 644.517647 0 499.952941 0m189.741177 566.211765H334.305882C150.588235 566.211765 0 716.8 0 903.529412v21.082353C0 1024 147.576471 1024 334.305882 1024h352.376471c177.694118 0 334.305882 0 334.305882-96.376471v-21.082353c6.023529-189.741176-144.564706-340.329412-331.294117-340.329411" fill="#1296db" p-id="4352"></path></svg> -->
<!-- <image class="avatar"
:src="this.avatar_url"
@@ -42,7 +42,7 @@
mode=""
v-else></image>
<view class="name">
<text>{{userInfo?userInfo.nickname:"未登录"}}</text>
<text>{{userInfo.nickname?userInfo.nickname:"未登录"}}</text>
<text>个人签名</text>
</view>
<image class="right" src="/static/center/right.png"></image>
@@ -91,11 +91,17 @@
type: 'my_article'
},
{
name: '我的账户',
name: '我的主页',
icon: '/static/center/self.png',
arrow: true,
type: 'my_account'
},
{
name: '提现',
icon: '/static/center/withdraw.png',
arrow: true,
type: 'withdraw'
},
{
name: '发布文章',
icon: '/static/center/release.png',
@@ -132,12 +138,6 @@
arrow: false,
type: 'recharge'
},
{
name: '打赏记录',
icon: '/static/center/reward.png',
arrow: false,
type: 'reward'
},
],
[
{
@@ -200,33 +200,89 @@
},
menuClick(e){
if (e.type === "my_article") {
uni.navigateTo({
// url: "/pages/editor/editor"
url:'/uni_modules/uni-cms/pages/article/list/list'
})
let token = uni.getStorageSync("uni_id_token");
console.log(token);
if (!token) {
this.toLogin();
}
else {
uni.navigateTo({
// url: "/pages/editor/editor"
url:'/uni_modules/uni-cms/pages/article/list/list'
})
}
}
else if (e.type === "my_account") {
this.inputDialogToggle();
}
this.toPersonalpage();
} else if (e.type === "withdraw") {
let token = uni.getStorageSync("uni_id_token");
console.log(token);
if (!token) {
this.toLogin();
}
else {
uni.navigateTo({
url:"/pages2/balance/balance"
})
}
}
else if (e.type === "publish_article") {
uni.navigateTo({
url:'/uni_modules/uni-cms/pages/article/add/add'
})
let token = uni.getStorageSync("uni_id_token");
console.log(token);
if (!token) {
this.toLogin();
}
else {
uni.navigateTo({
url:'/uni_modules/uni-cms/pages/article/add/add'
})
}
}
else if (e.type === "my_reply") {
uni.navigateTo({
url:"/pages2/replyCommentList/replyCommentList"
})
let token = uni.getStorageSync("uni_id_token");
console.log(token);
if (!token) {
this.toLogin();
} else {
uni.navigateTo({
url:"/pages2/replyCommentList/replyCommentList"
})
}
}
else if (e.type === "my_collect") {
uni.navigateTo({
url:"/pages2/arctcleCollectList/arctcleCollectList"
})
let token = uni.getStorageSync("uni_id_token");
console.log(token);
if (!token) {
this.toLogin();
}
else {
uni.navigateTo({
url:"/pages2/arctcleCollectList/arctcleCollectList"
})
}
}
else if (e.type === "my_like") {
uni.navigateTo({
url:"/pages2/arctcleLikeList/arctcleLikeList"
})
let token = uni.getStorageSync("uni_id_token");
console.log(token);
if (!token) {
this.toLogin();
}
else {
uni.navigateTo({
url:"/pages2/arctcleLikeList/arctcleLikeList"
})
}
}
else if (e.type === "customer_service") {
this.inputDialogToggle();
@@ -237,15 +293,25 @@
else if (e.type === "logout") {
mutations.logout()
} else if (e.type === "history" ) {
uni.navigateTo({
url: "/pages2/historyList/historyList"
})
let token = uni.getStorageSync("uni_id_token");
console.log(token);
if (!token) {
this.toLogin();
}
else {
uni.navigateTo({
url: "/pages2/historyList/historyList"
})
}
}
console.log(e);
},
toLogin() {
uni.navigateTo({
url:"/pages/login/login"
url:"/uni_modules/uni-id-pages/pages/login/login-withoutpwd?type=weixin"
})
},
toUserInfoPage() {
@@ -253,9 +319,7 @@
console.log(token);
if (!token) {
uni.navigateTo({
url:"/uni_modules/uni-id-pages/pages/login/login-withoutpwd?type=weixin"
})
this.toLogin();
}
else {
uni.navigateTo({
@@ -264,11 +328,26 @@
}
},
toPersonalpage() {
let token = uni.getStorageSync("uni_id_token");
console.log(token);
if (!token) {
uni.navigateTo({
url:"/uni_modules/uni-id-pages/pages/login/login-withoutpwd?type=weixin"
})
} else {
uni.navigateTo({
url: "/uni_modules/zetank-personalpage/pages/personalpage/personalpage?uid=" + this.userInfo._id
})
}
},
toScan() {
this.inputDialogToggle();
},
toSetting() {
this.inputDialogToggle();
uni.navigateTo({
url:"/pages2/setting/setting"
})
},
},