修复bug

master
fy 2026-02-09 18:07:40 +08:00
parent c2e2863bd2
commit 5e5d8ce41c
4 changed files with 311 additions and 124 deletions

View File

@ -16,155 +16,176 @@
"navigationBarTitleText": "若依移动端框架",
"navigationStyle": "custom"
}
}, {
"path": "pages/work/index",
}, {"path": "pages/work/index",
"style": {
"navigationBarTitleText": "工作台"
}
}, {
"path": "pages/mine/index",
}, {"path": "pages/mine/index",
"style": {
"navigationBarTitleText": "我的"
}
}, {
"path": "pages/mine/avatar/index",
"style": {
"navigationBarTitleText": "修改头像"
}
}, {
"path": "pages/mine/info/index",
"style": {
"navigationBarTitleText": "个人信息"
}
}, {
"path": "pages/mine/info/edit",
"style": {
"navigationBarTitleText": "编辑资料"
}
}, {
"path": "pages/mine/pwd/index",
"style": {
"navigationBarTitleText": "修改密码"
}
}, {
"path": "pages/mine/setting/index",
"style": {
"navigationBarTitleText": "应用设置"
}
}, {
"path": "pages/mine/help/index",
"style": {
"navigationBarTitleText": "常见问题"
}
}, {
"path": "pages/mine/about/index",
"style": {
"navigationBarTitleText": "关于我们"
}
}, {
"path": "pages/common/webview/index",
"style": {
"navigationBarTitleText": "浏览网页"
}
}, {
"path": "pages/common/textview/index",
"style": {
"navigationBarTitleText": "浏览文本"
}
},
{
"path": "pages/user/user",
}, {"path": "pages/product/product",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/settings/settings",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/product/product",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/asset/asset",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/enter/enter",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/addProduct/addProduct",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/storeSelect/storeSelect",
"style": {
"navigationBarTitleText": "选择门店"
}
},
{
"path": "pages/edit/edit",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/import/import",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/userStores/userStores",
}
],
"subPackages": [
{
"root": "pages/mine",
"pages": [
{"path": "avatar/index",
"style": {
"navigationBarTitleText": "修改头像"
}
},
{"path": "info/index",
"style": {
"navigationBarTitleText": "个人信息"
}
},
{"path": "info/edit",
"style": {
"navigationBarTitleText": "编辑资料"
}
},
{"path": "pwd/index",
"style": {
"navigationBarTitleText": "修改密码"
}
},
{"path": "setting/index",
"style": {
"navigationBarTitleText": "应用设置"
}
},
{"path": "help/index",
"style": {
"navigationBarTitleText": "常见问题"
}
},
{"path": "about/index",
"style": {
"navigationBarTitleText": "关于我们"
}
}
]
},
{
"root": "pages/common",
"pages": [
{"path": "webview/index",
"style": {
"navigationBarTitleText": "浏览网页"
}
},
{
"path": "textview/index",
"style": {
"navigationBarTitleText": "浏览文本"
}
}
]
},
{
"root": "pages/product",
"pages": [
{"path": "../addProduct/addProduct",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/batchDeleteProduct/batchDeleteProduct",
},
{
"path": "../batchDeleteProduct/batchDeleteProduct",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/addBrand/addBrand",
},
{
"path": "../edit/edit",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/BrandSelector/BrandSelector",
}
]
},
{
"root": "pages/brand",
"pages": [
{
"path": "../addBrand/addBrand",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "../BrandSelector/BrandSelector",
"style": {
"navigationBarTitleText": "选择品牌"
}
},
{
"path": "pages/category/category",
}
]
},
{
"root": "pages/other",
"pages": [
{
"path": "../menu",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/back/back",
},
{"path": "../user/user",
"style": {
"navigationBarTitleText": ""
}
}
],
},
{"path": "../settings/settings",
"style": {
"navigationBarTitleText": ""
}
},
{"path": "../asset/asset",
"style": {
"navigationBarTitleText": ""
}
},
{"path": "../enter/enter",
"style": {
"navigationBarTitleText": ""
}
},
{"path": "../storeSelect/storeSelect",
"style": {
"navigationBarTitleText": "选择门店"
}
},
{"path": "../import/import",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "../userStores/userStores",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "../category/category",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "../back/back",
"style": {
"navigationBarTitleText": ""
}
}
]
}
],
"tabBar": {
"color": "#000000",
"selectedColor": "#000000",

View File

@ -404,6 +404,7 @@
addNewGoods() {
uni.navigateTo({
url: '/pages/addProduct/addProduct'
// url: '/pages/enter/enter'
});
},

View File

@ -0,0 +1,160 @@
<template>
<view class="nickname-page">
<!-- 顶部导航栏 -->
<view class="navbar">
<view class="nav-left" @click="goBack">
<!-- <text class="nav-icon">&lt;</text> -->
</view>
<view class="nav-title">昵称</view>
<view class="nav-right" @click="saveNickname">
<text class="nav-text">完成</text>
</view>
</view>
<!-- 内容区 -->
<view class="content">
<view class="input-item">
<text class="label">名称</text>
<input
class="input"
v-model="nickname"
placeholder="请输入昵称"
maxlength="20"
/>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
nickname: '' //
}
},
onLoad(options) {
//
if (options.oldNickname) {
this.nickname = options.oldNickname
}
},
methods: {
//
goBack() {
uni.navigateBack()
},
//
saveNickname() {
if (!this.nickname.trim()) {
uni.showToast({
title: '昵称不能为空',
icon: 'none'
})
return
}
//
uni.showLoading({
title: '保存中...'
})
//
setTimeout(() => {
uni.hideLoading()
uni.showToast({
title: '保存成功',
icon: 'success'
})
//
uni.navigateBack({
success() {
const pages = getCurrentPages()
const prevPage = pages[pages.length - 1]
if (prevPage) {
//
prevPage.$vm.$emit('updateNickname', this.nickname)
}
}
})
}, 1000)
}
}
}
</script>
<style lang="scss" scoped>
.nickname-page {
min-height: 100vh;
background-color: #f5f5f5;
}
/* 顶部导航栏 */
.navbar {
display: flex;
align-items: center;
justify-content: space-between;
height: 44px;
background-color: #409eff;
color: #fff;
padding: 0 15px;
}
.nav-left {
width: 40px;
height: 44px;
display: flex;
align-items: center;
justify-content: flex-start;
}
.nav-icon {
font-size: 18px;
font-weight: bold;
}
.nav-title {
font-size: 17px;
font-weight: 500;
}
.nav-right {
width: 40px;
height: 44px;
display: flex;
align-items: center;
justify-content: flex-end;
}
.nav-text {
font-size: 16px;
}
/* 内容区 */
.content {
margin-top: 10px;
background-color: #fff;
}
.input-item {
display: flex;
align-items: center;
padding: 12px 15px;
border-bottom: 1px solid #eee;
}
.label {
font-size: 16px;
color: #333;
width: 60px;
flex-shrink: 0;
}
.input {
flex: 1;
font-size: 16px;
color: #333;
text-align: right;
}
</style>

View File

@ -13,7 +13,7 @@
<!-- 账户信息模块 -->
<view class="info-module">
<view class="module-item">
<view class="module-item" @click="goUpdateUserName">
<text class="item-label">昵称</text>
<text class="item-value">名称</text>
</view>
@ -103,6 +103,11 @@
icon: 'none'
})
},
goUpdateUserName(){
uni.navigateTo({
url: '/pages/updateUserName/updateUserName'
});
},
//
handleCancelAccount() {
uni.showModal({
@ -202,7 +207,7 @@
/* ========== 标题模块 ========== */
.header-module {
background-color: cornflowerblue;
background-color: firebrick;
padding: 40rpx 40rpx 60rpx;
border-bottom: 2rpx solid #f5f5f5;
text-align: center;