1. 修复webview显示bug

2. 修改昵称限制长度为50并完整显示
3. 修改管理员删除锁失败的提示
This commit is contained in:
范鹏 2024-09-03 10:45:20 +08:00
parent 9bb0ee8e88
commit 89812184e3
5 changed files with 20 additions and 9 deletions

View File

@ -20,7 +20,7 @@ const DEV = {
const PRE = { const PRE = {
name: 'pre', name: 'pre',
baseUrl: 'https://pre.lock.star-lock.cn/api', baseUrl: 'https://pre.lock.star-lock.cn/api',
webviewBaseUrl: 'https://pre.lock.star-lock.cn', webviewBaseUrl: 'https://lock.xhjcn.ltd',
version, version,
buildNumber buildNumber
} }

View File

@ -136,7 +136,7 @@ export default {
} else { } else {
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
title: '删除失败', title: '删除失败,请保持在锁附近',
icon: 'none' icon: 'none'
}) })
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<input class="input" :value="nickname" maxlength="20" placeholder="请输入昵称" <input class="input" :value="nickname" maxlength="50" placeholder="请输入昵称"
placeholder-class="input-placeholder" :focus="true" @input="updateInput"></input> placeholder-class="input-placeholder" :focus="true" @input="updateInput"></input>
<view class="button" @click="updateName">保存</view> <view class="button" @click="updateName">保存</view>
</view> </view>

View File

@ -13,8 +13,8 @@
<view class="view-line"></view> <view class="view-line"></view>
<view class="view-button" @click="toUpdateName"> <view class="view-button" @click="toUpdateName">
<view>昵称</view> <view>昵称</view>
<view class="view-button" style="padding: 0"> <view class="view-button" style="padding: 20rpx 0">
<view class="info">{{userInfo.nickname}}</view> <view class="name-info">{{userInfo.nickname}}</view>
<image class="icon-arrow" src="/static/images/icon_arrow.png" mode="aspectFill"></image> <image class="icon-arrow" src="/static/images/icon_arrow.png" mode="aspectFill"></image>
</view> </view>
</view> </view>
@ -257,6 +257,16 @@ page {
margin-right: 20rpx; margin-right: 20rpx;
} }
.name-info {
line-height: 40rpx;
font-size: 30rpx;
text-align: right;
width: 500rpx;
overflow: hidden;
word-break: break-all;
margin-right: 20rpx;
}
.red-dot { .red-dot {
margin-right: 20rpx; margin-right: 20rpx;
background: #ec433c; background: #ec433c;

View File

@ -5,16 +5,17 @@
</template> </template>
<script> <script>
import baseConfig from '@/config/env' import env from '@/config/env'
export default { export default {
data() { data() {
return { return {
url: '' url: '',
env: null
} }
}, },
onLoad: function (options) { onLoad: function (options) {
console.log(baseConfig.webviewBaseUrl) this.env = env[getApp().globalData.getEnvConfig()]
const officialAccounts = { const officialAccounts = {
default: { default: {
url: '/app/introduce', url: '/app/introduce',
@ -30,7 +31,7 @@ export default {
} }
} }
const item = officialAccounts[options?.type] || officialAccounts['default'] const item = officialAccounts[options?.type] || officialAccounts['default']
this.url = baseConfig.webviewBaseUrl + item['url'] this.url = this.env.webviewBaseUrl + item['url']
console.log(this.url) console.log(this.url)
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: item['name'] title: item['name']