修复bug
parent
c2e2863bd2
commit
5e5d8ce41c
265
pages.json
265
pages.json
|
|
@ -16,155 +16,176 @@
|
||||||
"navigationBarTitleText": "若依移动端框架",
|
"navigationBarTitleText": "若依移动端框架",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
}, {
|
}, {"path": "pages/work/index",
|
||||||
"path": "pages/work/index",
|
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "工作台"
|
"navigationBarTitleText": "工作台"
|
||||||
}
|
}
|
||||||
}, {
|
}, {"path": "pages/mine/index",
|
||||||
"path": "pages/mine/index",
|
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "我的"
|
"navigationBarTitleText": "我的"
|
||||||
}
|
}
|
||||||
}, {
|
}, {"path": "pages/product/product",
|
||||||
"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",
|
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": ""
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
{
|
],
|
||||||
"path": "pages/settings/settings",
|
"subPackages": [
|
||||||
"style": {
|
{
|
||||||
"navigationBarTitleText": ""
|
"root": "pages/mine",
|
||||||
}
|
"pages": [
|
||||||
},
|
{"path": "avatar/index",
|
||||||
{
|
"style": {
|
||||||
"path": "pages/product/product",
|
"navigationBarTitleText": "修改头像"
|
||||||
"style": {
|
}
|
||||||
"navigationBarTitleText": ""
|
},
|
||||||
}
|
{"path": "info/index",
|
||||||
},
|
"style": {
|
||||||
{
|
"navigationBarTitleText": "个人信息"
|
||||||
"path": "pages/asset/asset",
|
}
|
||||||
"style": {
|
},
|
||||||
"navigationBarTitleText": ""
|
{"path": "info/edit",
|
||||||
}
|
"style": {
|
||||||
},
|
"navigationBarTitleText": "编辑资料"
|
||||||
{
|
}
|
||||||
"path": "pages/enter/enter",
|
},
|
||||||
"style": {
|
{"path": "pwd/index",
|
||||||
"navigationBarTitleText": ""
|
"style": {
|
||||||
}
|
"navigationBarTitleText": "修改密码"
|
||||||
},
|
}
|
||||||
{
|
},
|
||||||
"path": "pages/addProduct/addProduct",
|
{"path": "setting/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": "应用设置"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{"path": "help/index",
|
||||||
"path": "pages/storeSelect/storeSelect",
|
"style": {
|
||||||
"style": {
|
"navigationBarTitleText": "常见问题"
|
||||||
"navigationBarTitleText": "选择门店"
|
}
|
||||||
}
|
},
|
||||||
},
|
{"path": "about/index",
|
||||||
{
|
"style": {
|
||||||
"path": "pages/edit/edit",
|
"navigationBarTitleText": "关于我们"
|
||||||
"style": {
|
}
|
||||||
"navigationBarTitleText": ""
|
}
|
||||||
}
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/import/import",
|
"root": "pages/common",
|
||||||
"style": {
|
"pages": [
|
||||||
"navigationBarTitleText": ""
|
{"path": "webview/index",
|
||||||
}
|
"style": {
|
||||||
},
|
"navigationBarTitleText": "浏览网页"
|
||||||
{
|
}
|
||||||
"path": "pages/userStores/userStores",
|
},
|
||||||
|
{
|
||||||
|
"path": "textview/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "浏览文本"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"root": "pages/product",
|
||||||
|
"pages": [
|
||||||
|
{"path": "../addProduct/addProduct",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
{
|
"path": "../batchDeleteProduct/batchDeleteProduct",
|
||||||
"path": "pages/batchDeleteProduct/batchDeleteProduct",
|
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/addBrand/addBrand",
|
"path": "../edit/edit",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": ""
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
{
|
]
|
||||||
"path": "pages/BrandSelector/BrandSelector",
|
},
|
||||||
|
{
|
||||||
|
"root": "pages/brand",
|
||||||
|
"pages": [
|
||||||
|
{
|
||||||
|
"path": "../addBrand/addBrand",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "../BrandSelector/BrandSelector",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "选择品牌"
|
"navigationBarTitleText": "选择品牌"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
{
|
]
|
||||||
"path": "pages/category/category",
|
},
|
||||||
|
{
|
||||||
|
"root": "pages/other",
|
||||||
|
"pages": [
|
||||||
|
{
|
||||||
|
"path": "../menu",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{"path": "../user/user",
|
||||||
"path": "pages/back/back",
|
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": ""
|
"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": {
|
"tabBar": {
|
||||||
"color": "#000000",
|
"color": "#000000",
|
||||||
"selectedColor": "#000000",
|
"selectedColor": "#000000",
|
||||||
|
|
|
||||||
|
|
@ -404,6 +404,7 @@
|
||||||
addNewGoods() {
|
addNewGoods() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/addProduct/addProduct'
|
url: '/pages/addProduct/addProduct'
|
||||||
|
// url: '/pages/enter/enter'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,160 @@
|
||||||
|
<template>
|
||||||
|
<view class="nickname-page">
|
||||||
|
<!-- 顶部导航栏 -->
|
||||||
|
<view class="navbar">
|
||||||
|
<view class="nav-left" @click="goBack">
|
||||||
|
<!-- <text class="nav-icon"><</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>
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
<!-- 账户信息模块 -->
|
<!-- 账户信息模块 -->
|
||||||
<view class="info-module">
|
<view class="info-module">
|
||||||
<view class="module-item">
|
<view class="module-item" @click="goUpdateUserName">
|
||||||
<text class="item-label">昵称</text>
|
<text class="item-label">昵称</text>
|
||||||
<text class="item-value">名称</text>
|
<text class="item-value">名称</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -103,6 +103,11 @@
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
goUpdateUserName(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/updateUserName/updateUserName'
|
||||||
|
});
|
||||||
|
},
|
||||||
// 注销账号
|
// 注销账号
|
||||||
handleCancelAccount() {
|
handleCancelAccount() {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
|
|
@ -202,7 +207,7 @@
|
||||||
|
|
||||||
/* ========== 标题模块 ========== */
|
/* ========== 标题模块 ========== */
|
||||||
.header-module {
|
.header-module {
|
||||||
background-color: cornflowerblue;
|
background-color: firebrick;
|
||||||
padding: 40rpx 40rpx 60rpx;
|
padding: 40rpx 40rpx 60rpx;
|
||||||
border-bottom: 2rpx solid #f5f5f5;
|
border-bottom: 2rpx solid #f5f5f5;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue