mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-06-23 18:30:13 +08:00
refactor:项目升级Vue3+uView Plus
- 改造入口文件、全量替换组件引入 - 过滤器迁移混入,更新忽略配置,新增迁移文档
This commit is contained in:
@@ -15,15 +15,15 @@
|
||||
<!-- {{localVersion}} -->
|
||||
<u-cell-group class="cell" :border="false">
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<u-cell-item v-if="IosWhether" @click="checkStar" title="去评分"></u-cell-item>
|
||||
<u-cell-item title="功能介绍" @click="navigateTo('/pages/mine/set/versionFunctionList')"></u-cell-item>
|
||||
<u-cell-item title="检查更新" @click="checkUpdate"></u-cell-item>
|
||||
<u-cell v-if="IosWhether" @click="checkStar" title="去评分"></u-cell>
|
||||
<u-cell title="功能介绍" @click="navigateTo('/pages/mine/set/versionFunctionList')"></u-cell>
|
||||
<u-cell title="检查更新" @click="checkUpdate"></u-cell>
|
||||
<!-- #endif -->
|
||||
|
||||
<u-cell-item title="证照信息" @click="navigateTo('/pages/mine/help/tips?type=LICENSE_INFORMATION')"></u-cell-item>
|
||||
<u-cell-item title="服务协议" @click="navigateTo('/pages/mine/help/tips?type=USER_AGREEMENT')"></u-cell-item>
|
||||
<u-cell-item title="隐私协议" @click="navigateTo('/pages/mine/help/tips?type=PRIVACY_POLICY')"></u-cell-item>
|
||||
<u-cell-item title="关于我们" :border-bottom="false" @click="navigateTo('/pages/mine/help/tips?type=ABOUT')"></u-cell-item>
|
||||
<u-cell title="证照信息" @click="navigateTo('/pages/mine/help/tips?type=LICENSE_INFORMATION')"></u-cell>
|
||||
<u-cell title="服务协议" @click="navigateTo('/pages/mine/help/tips?type=USER_AGREEMENT')"></u-cell>
|
||||
<u-cell title="隐私协议" @click="navigateTo('/pages/mine/help/tips?type=PRIVACY_POLICY')"></u-cell>
|
||||
<u-cell title="关于我们" :border="false" @click="navigateTo('/pages/mine/help/tips?type=ABOUT')"></u-cell>
|
||||
|
||||
</u-cell-group>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<div class="feedBack-box">
|
||||
<h4>问题反馈 <span style="margin-left:10rpx;" v-if="feedBack.type">@{{ list.find(item=>{return item.value == feedBack.type }).text }}</span></h4>
|
||||
<u-input class="field-input" height="500" :border-bottom="false" v-model="feedBack.context" type="textarea" placeholder="请输入反馈信息">
|
||||
<u-input class="field-input" height="500" border="none" v-model="feedBack.context" type="textarea" placeholder="请输入反馈信息">
|
||||
</u-input>
|
||||
</div>
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
<view class="opt-view">
|
||||
<view class="img-title">上传凭证(最多2张)</view>
|
||||
<view class="images-view">
|
||||
<u-upload :header=" { accessToken: storage.getAccessToken() }" :action="action" width="150" @on-uploaded="onUploaded" :max-count="2" :show-progress="false"></u-upload>
|
||||
<u-upload :file-list="uploadFileList" :auto-upload="false" width="150" @afterRead="onUploadAfterRead" :max-count="2"></u-upload>
|
||||
</view>
|
||||
</view>
|
||||
</div>
|
||||
|
||||
<div class="feedBack-box">
|
||||
<h4>手机号</h4>
|
||||
<u-input :border-bottom="false" v-model="feedBack.mobile" placeholder="请输入您的手机号">
|
||||
<u-input border="none" v-model="feedBack.mobile" placeholder="请输入您的手机号">
|
||||
</u-input>
|
||||
</div>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
import storage from "@/utils/storage.js";
|
||||
import config from "@/config/config";
|
||||
import { feedBack } from "@/api/members.js";
|
||||
import { upload } from "@/api/common.js";
|
||||
import { handleUploadAfterRead } from "@/utils/uploadHelper.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -47,7 +47,7 @@ export default {
|
||||
feedBack: {
|
||||
type: "FUNCTION", //默认反馈问题为 '功能相关'
|
||||
},
|
||||
action: upload, //图片上传地址
|
||||
uploadFileList: [],
|
||||
list: [
|
||||
{ text: "功能相关", value: "FUNCTION" },
|
||||
{ text: "优化反馈", value: "OPTIMIZE" },
|
||||
@@ -58,16 +58,13 @@ export default {
|
||||
methods: {
|
||||
// 点击反馈内容
|
||||
handleClick(index) {
|
||||
this.$set(this.feedBack, "type", this.list[index].value);
|
||||
this.feedBack["type"] = this.list[index].value;
|
||||
},
|
||||
|
||||
//图片上传
|
||||
onUploaded(lists) {
|
||||
let images = [];
|
||||
lists.forEach((item) => {
|
||||
images.push(item.response.result);
|
||||
onUploadAfterRead(event) {
|
||||
handleUploadAfterRead(event, this.uploadFileList, (urls) => {
|
||||
this.feedBack.images = urls.join(",");
|
||||
});
|
||||
this.feedBack.images = images.join(",");
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<u-form-item label="生日" label-width="150" right-icon="arrow-right">
|
||||
<div style="width: 100%;" @click="showBirthday = true">{{ birthday || '请选择出生日期' }}</div>
|
||||
<u-picker v-model="showBirthday" mode="time" :confirm-color="lightColor" @confirm="selectTime"></u-picker>
|
||||
<u-picker v-model:show="showBirthday" mode="time" :confirm-color="lightColor" @confirm="selectTime"></u-picker>
|
||||
</u-form-item>
|
||||
<u-form-item label="城市" label-width="150" placeholder="请选择城市" right-icon="arrow-right">
|
||||
<div style="width: 100%;" @click="clickRegion">{{ form.___path || '请选择城市' }}</div>
|
||||
@@ -44,10 +44,9 @@
|
||||
import { saveUserInfo, getUserInfo } from "@/api/members.js";
|
||||
import { upload } from "@/api/common.js";
|
||||
import storage from "@/utils/storage.js";
|
||||
import uFormItem from "@/uview-ui/components/u-form-item/u-form-item.vue";
|
||||
import city from "@/components/m-city/m-city.vue";
|
||||
export default {
|
||||
components: { uFormItem, "m-city": city },
|
||||
components: { "m-city": city },
|
||||
data() {
|
||||
return {
|
||||
lightColor: this.$lightColor, //高亮颜色
|
||||
@@ -83,7 +82,7 @@ export default {
|
||||
* 退出登录
|
||||
*/
|
||||
quiteLoginOut() {
|
||||
this.$options.filters.quiteLoginOut();
|
||||
this.quiteLoginOut();
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -157,11 +156,9 @@ export default {
|
||||
* 选择地址
|
||||
*/
|
||||
selectRegion(region) {
|
||||
this.$set(
|
||||
this.form,
|
||||
"address",
|
||||
`${region.province.label} ${region.city.label} ${region.area.label}`
|
||||
);
|
||||
|
||||
this.form["address"] = `${region.province.label} ${region.city.label} ${region.area.label}`
|
||||
;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
<u-form-item class="sendCode" label-width="120" prop="code" label="验证码">
|
||||
<u-input v-model="codeForm.code" placeholder="请输入验证码" />
|
||||
<u-verification-code unique-key="page-edit" :seconds="seconds" @end="end" @start="start"
|
||||
ref="uCode" @change="codeChange"></u-verification-code>
|
||||
<u-code unique-key="page-edit" :seconds="seconds" @end="end" @start="start"
|
||||
ref="uCode" @change="codeChange"></u-code>
|
||||
<view @tap="getCode" class="text-tips">{{ tips }}</view>
|
||||
</u-form-item>
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
<u-form-item class="sendCode" label-width="120" prop="code" label="验证码">
|
||||
<u-input v-model="codeForm.code" placeholder="请输入验证码" />
|
||||
<u-verification-code unique-key="page-edit" :seconds="seconds" @end="end" @start="start"
|
||||
ref="uCode" @change="codeChange"></u-verification-code>
|
||||
<u-code unique-key="page-edit" :seconds="seconds" @end="end" @start="start"
|
||||
ref="uCode" @change="codeChange"></u-code>
|
||||
<view @tap="getCode" class="text-tips">{{ tips }}</view>
|
||||
</u-form-item>
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
/**判断是否是当前用户的手机号 */
|
||||
isUserPhone() {
|
||||
let flage = false;
|
||||
let user = this.$options.filters.isLogin();
|
||||
let user = this.isLogin();
|
||||
if (user.mobile != this.codeForm.mobile) {
|
||||
uni.showToast({
|
||||
title: "请输入当前绑定手机号",
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
<template>
|
||||
<view class="face-login">
|
||||
<u-cell-group>
|
||||
<u-cell-item class="border-top" :arrow="false" title="面容登录">
|
||||
<u-switch slot="right-icon" @change="faceSwitchChange" active-color="#1abc9c" size="40" v-model="checked"></u-switch>
|
||||
</u-cell-item>
|
||||
<u-cell class="border-top" :isLink="false" title="面容登录">
|
||||
<template #right-icon>
|
||||
<u-switch @change="faceSwitchChange" active-color="#1abc9c" size="40" v-model="checked"></u-switch>
|
||||
</template>
|
||||
</u-cell>
|
||||
</u-cell-group>
|
||||
<view class="describe">开启后可使用面容认证完成快捷登录,设置仅对本机生效。</view>
|
||||
</view>
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
<template>
|
||||
<view class="finger">
|
||||
<u-cell-group>
|
||||
<u-cell-item class="border-top" :arrow="false" title="指纹登录">
|
||||
<u-switch slot="right-icon" @change="fingerSwitchChange" :active-color="lightColor" size="40" v-model="checked"></u-switch>
|
||||
</u-cell-item>
|
||||
<u-cell class="border-top" :isLink="false" title="指纹登录">
|
||||
<template #right-icon>
|
||||
<u-switch @change="fingerSwitchChange" :active-color="lightColor" size="40" v-model="checked"></u-switch>
|
||||
</template>
|
||||
</u-cell>
|
||||
</u-cell-group>
|
||||
<view class="describe">开启后可使用指纹认证完成快捷登录,设置仅对本机生效。如需修改指纹,请在系统设置中操作。</view>
|
||||
</view>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view class="securityCenter">
|
||||
<u-cell-group>
|
||||
<u-cell-item title="修改密码" @click="navigateTo('/pages/mine/set/securityCenter/updatePwdTab')"></u-cell-item>
|
||||
<u-cell-item title="注销账户" @click="zhuxiao"></u-cell-item>
|
||||
<u-cell title="修改密码" @click="navigateTo('/pages/mine/set/securityCenter/updatePwdTab')"></u-cell>
|
||||
<u-cell title="注销账户" @click="zhuxiao"></u-cell>
|
||||
</u-cell-group>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view class="securityCenter">
|
||||
<u-cell-group>
|
||||
<u-cell-item title="验证密码" @click="navigateTo('/pages/mine/set/securityCenter/editLoginPassword')"></u-cell-item>
|
||||
<u-cell-item title="验证手机号" @click="navigateTo('/pages/mine/set/securityCenter/editPassword')"></u-cell-item>
|
||||
<u-cell title="验证密码" @click="navigateTo('/pages/mine/set/securityCenter/editLoginPassword')"></u-cell>
|
||||
<u-cell title="验证手机号" @click="navigateTo('/pages/mine/set/securityCenter/editPassword')"></u-cell>
|
||||
</u-cell-group>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -13,16 +13,16 @@
|
||||
<!-- #endif -->
|
||||
<u-cell-group :border="false">
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<u-cell-item title="清除缓存" :value="fileSizeString" @click="clearCache"></u-cell-item>
|
||||
<u-cell title="清除缓存" :value="fileSizeString" @click="clearCache"></u-cell>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<u-cell-item title="安全中心" @click="navigateTo('/pages/mine/set/securityCenter/securityCenter')"></u-cell-item>
|
||||
<u-cell title="安全中心" @click="navigateTo('/pages/mine/set/securityCenter/securityCenter')"></u-cell>
|
||||
<!-- #endif -->
|
||||
<u-cell-item title="用户注销" v-if="userInfo.id" @click="logoff"></u-cell-item>
|
||||
<u-cell-item title="意见反馈" @click="navigateTo('/pages/mine/set/feedBack')"></u-cell-item>
|
||||
<u-cell title="用户注销" v-if="userInfo.id" @click="logoff"></u-cell>
|
||||
<u-cell title="意见反馈" @click="navigateTo('/pages/mine/set/feedBack')"></u-cell>
|
||||
<!-- #ifndef H5 -->
|
||||
<!-- #endif -->
|
||||
<u-cell-item :title="`关于${config.name}`" @click="navigateTo('/pages/mine/set/editionIntro')"></u-cell-item>
|
||||
<u-cell :title="`关于${config.name}`" @click="navigateTo('/pages/mine/set/editionIntro')"></u-cell>
|
||||
</u-cell-group>
|
||||
<view class="submit" v-if="userInfo.id" @click="quiteLoginOut">退出登录</view>
|
||||
</view>
|
||||
@@ -54,14 +54,14 @@ export default {
|
||||
* 退出登录
|
||||
*/
|
||||
quiteLoginOut() {
|
||||
this.$options.filters.quiteLoginOut();
|
||||
this.quiteLoginOut();
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户注销
|
||||
*/
|
||||
logoff(){
|
||||
this.$options.filters.logoff();
|
||||
this.logoff();
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -91,10 +91,10 @@ export default {
|
||||
* 判断当前是否进入用户中心
|
||||
*/
|
||||
checkUserInfo() {
|
||||
if (this.$options.filters.isLogin("auth")) {
|
||||
if (this.isLogin("auth")) {
|
||||
this.navigateTo("/pages/mine/set/personMsg");
|
||||
} else {
|
||||
this.$options.filters.tipsToLogin();
|
||||
this.tipsToLogin();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -155,7 +155,7 @@ export default {
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
this.userInfo = this.$options.filters.isLogin();
|
||||
this.userInfo = this.isLogin();
|
||||
// #ifdef APP-PLUS
|
||||
this.getCacheSize();
|
||||
// #endif
|
||||
|
||||
Reference in New Issue
Block a user