·修改部分页面数据冗余

This commit is contained in:
lemon橪
2021-05-14 17:31:40 +08:00
parent 23804939eb
commit 7f4212755d
42 changed files with 1415 additions and 2987 deletions

View File

@@ -1,125 +1,122 @@
// TODO 第一版本暂无此功能 后续优化以及更新
<template>
<view class="edition-intro">
<view class="logo c-content">
<view>
<image src="/static/img/edition.png" mode=""></image>
</view>
<view>版本不息&nbsp;优化不止</view>
</view>
<view class="edition c-content" v-for="(item,index) in editionHistory" :key="index">
<view class="level">
<text style="color: #1ABC9C;">{{item.version}}</text>
<text>{{$u.timeFormat(item.update_time, 'yyyy-mm-dd')}}</text>
</view>
<view class="detail" v-html="item.content"></view>
</view>
</view>
<view class="edition-intro">
<view class="logo c-content">
<view>
<image src="/static/img/edition.png" mode=""></image>
</view>
<view>版本不息&nbsp;优化不止</view>
</view>
<view class="edition c-content" v-for="(item,index) in editionHistory" :key="index">
<view class="level">
<text style="color: #1ABC9C;">{{item.version}}</text>
<text>{{$u.timeFormat(item.update_time, 'yyyy-mm-dd')}}</text>
</view>
<view class="detail" v-html="item.content"></view>
</view>
</view>
</template>
<script>
import * as API_Message from "@/api/message.js";
export default {
data() {
return {
editionHistory:[],
params: {
pageNumber: 1,
pageSize: 5
},
loadStatus:'more'
};
},
onLoad(){
if (uni.getSystemInfoSync().platform === 'android') {
this.params.type = 0;
} else {
this.params.type = 1;
}
this.GET_AppVersionList(true);
},
onReachBottom() {
if(this.loadStatus!='noMore'){
this.params.pageNumber++
this.GET_AppVersionList(false)
}
},
methods: {
GET_AppVersionList(reset){
if (reset) {
this.params.pageNumber = 1
}
uni.showLoading({
title:"加载中"
})
API_Message.getAppVersionList(this.params).then(response => {
uni.hideLoading()
if(response.statusCode==200){
const { data } = response
if(data.data.length<10){
this.loadStatus = 'noMore';
}
this.editionHistory.push(...data.data)
}
})
}
}
}
import * as API_Message from "@/api/message.js";
export default {
data() {
return {
editionHistory: [], //版本历史
params: {
pageNumber: 1,
pageSize: 5,
},
loadStatus: "more",
};
},
onLoad() {
if (uni.getSystemInfoSync().platform === "android") {
this.params.type = 0;
} else {
this.params.type = 1;
}
this.GET_AppVersionList(true);
},
onReachBottom() {
if (this.loadStatus != "noMore") {
this.params.pageNumber++;
this.GET_AppVersionList(false);
}
},
methods: {
GET_AppVersionList(reset) {
if (reset) {
this.params.pageNumber = 1;
}
uni.showLoading({
title: "加载中",
});
API_Message.getAppVersionList(this.params).then((response) => {
uni.hideLoading();
if (response.statusCode == 200) {
const { data } = response;
if (data.data.length < 10) {
this.loadStatus = "noMore";
}
this.editionHistory.push(...data.data);
}
});
},
},
};
</script>
<style lang="scss">
.edition-intro{
.logo{
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
font-size: $font-lg;
color: $font-color-light;
height: 330rpx;
margin-bottom: 20rpx;
>view:nth-child(1){
width: 144rpx;
height: 144rpx;
border: 1px solid #FFC71C;
border-radius: 50%;
position: relative;
margin-bottom: 30rpx;
image{
width: 80rpx;
height: 113rpx;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin:auto;
}
}
}
.edition{
margin-bottom: 20rpx;
color: $font-color-light;
font-size: $font-sm;
.level{
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 30rpx ;
border-bottom: 1px solid $border-color-light;
text:nth-child(1){
font-size: $font-base;
font-weight: 700;
}
}
.detail{
margin-left: 20rpx;
line-height: 2em;
padding: 20rpx 0;
}
}
<style lang="scss" scoped>
.edition-intro {
.logo {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
font-size: $font-lg;
color: $font-color-light;
height: 330rpx;
margin-bottom: 20rpx;
> view:nth-child(1) {
width: 144rpx;
height: 144rpx;
border: 1px solid #ffc71c;
border-radius: 50%;
position: relative;
margin-bottom: 30rpx;
image {
width: 80rpx;
height: 113rpx;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
}
}
}
.edition {
margin-bottom: 20rpx;
color: $font-color-light;
font-size: $font-sm;
.level {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx 30rpx;
border-bottom: 2rpx solid $border-color-light;
text:nth-child(1) {
font-size: $font-base;
font-weight: 700;
}
}
.detail {
margin-left: 20rpx;
line-height: 2em;
padding: 20rpx 0;
}
}
}
</style>

View File

@@ -45,9 +45,9 @@ export default {
storage,
config,
feedBack: {
type:"FUNCTION"
type: "FUNCTION", //默认反馈问题为 '功能相关'
},
action: upload,
action: upload, //图片上传地址
list: [
{ text: "功能相关", value: "FUNCTION" },
{ text: "优化反馈", value: "OPTIMIZE" },
@@ -55,8 +55,8 @@ export default {
],
};
},
onReady() {},
methods: {
// 点击反馈内容
handleClick(index) {
this.$set(this.feedBack, "type", this.list[index].value);
},
@@ -64,14 +64,15 @@ export default {
//图片上传
onUploaded(lists) {
let images = [];
lists.forEach((item) => {
images.push(item.response.result);
});
console.log(images);
this.feedBack.images = images.join(",");
},
/**
* 提交意见反馈
*/
submit() {
if (!this.feedBack.type) {
uni.showToast({
@@ -97,7 +98,7 @@ export default {
});
return false;
}
/** 提交 */
feedBack(this.feedBack).then((res) => {
if (res.data.success) {
uni.showToast({

View File

@@ -1,40 +0,0 @@
<template>
<view class="device-manage">
<u-cell-group>
<u-cell-item class="border-top" :arrow="false" title="常用设备保护">
<u-switch slot="right-icon" active-color="#1abc9c" size="40" v-model="checked"></u-switch>
</u-cell-item>
</u-cell-group>
<view class="describe">开启常用设备保护后在不常用的手机上登录时需要进行账号及密码验证通过后继续登录</view>
<view class="title">常用设备</view>
<u-cell-group class="">
<u-cell-item
title="HUAWEI Mate30"
:center="true"
label="最近使用2020-06-28北京市"
value="正在使用"
:value-style="{color:'#1abc9c','font-size':'14px'}"
:title-style="{'color':'#333'}"
>
</u-cell-item>
</u-cell-group>
</view>
</template>
<script>
export default {
data() {
return {
checked:true
};
}
}
</script>
<style lang="scss">
.device-manage{
.title{
padding:0 30rpx 20rpx;
}
}
</style>

View File

@@ -40,10 +40,9 @@
<script>
import { sendMobile, resetByMobile, modifyPass } from "@/api/login";
import storage from "@/utils/storage.js";
import { md5 } from "@/utils/md5.js";
import myVerification from "@/components/verification/verification.vue";
import { md5 } from "@/utils/md5.js"; // md5
import myVerification from "@/components/verification/verification.vue"; //验证
import uuid from "@/utils/uuid.modified.js";
export default {
components: {
@@ -65,15 +64,15 @@ export default {
],
step: 0, //当前验证步骤
flage: false, //是否验证码验证
// 验证码登录form
codeForm: {
mobile: "", //手机号
code: "", //验证码
},
newPassword: "",//新密码
newPassword: "", //新密码
password: "", //密码
tips: "", //提示
seconds: 60,
tips: "", //提示
seconds: 60, // 60s等待时间
// 验证码登录校验
codeRules: {
@@ -174,7 +173,7 @@ export default {
}
});
},
codeChange(text) {
this.tips = text;
},

View File

@@ -1,80 +1,82 @@
// TODO 第一版本暂无此功能 后续优化以及更新
<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-group>
<view class="describe">开启后可使用面容认证完成快捷登录设置仅对本机生效</view>
</view>
<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-group>
<view class="describe">开启后可使用面容认证完成快捷登录设置仅对本机生效</view>
</view>
</template>
<script>
import storage from '@/utils/storage.js';
import { setBiolofy } from '@/api/passport.js';
import storage from "@/utils/storage.js";
import { setBiolofy } from "@/api/passport.js";
export default {
data() {
return {
checked: true
};
},
methods: {
faceSwitchChange(value) {
if (value === true) {
const res = uni.getSystemInfoSync();
plus.device.getInfo({
success: function(e) {
let params = {
mobile_type: res.model,
secret_key: e.uuid
};
setBiolofy(params).then(res => {
if (res.statusCode === 200) {
storage.setFaceLogin(true);
}
});
},
fail: function(e) {
//plus.nativeUI.toast('获取设备信息错误:' + JSON.stringify(e));
console.error('getDeviceInfo failed: ' + JSON.stringify(e));
}
});
} else {
storage.setFaceLogin(false);
}
}
},
onLoad() {
// #ifdef APP-PLUS
uni.checkIsSupportSoterAuthentication({
success(res) {
if (!res.supportMode.find(e => e === 'facial')) {
plus.nativeUI.toast('此设备不支持面部识别');
uni.navigateBack();
}
uni.checkIsSoterEnrolledInDevice({
checkAuthMode: 'facial',
success(_res) {
if (!_res.isEnrolled) {
plus.nativeUI.toast('此设备未录入面部信息');
uni.navigateBack();
}
},
fail(_err) {
// plus.nativeUI.toast(JSON.stringify(_err));
uni.navigateBack();
}
});
},
fail(err) {
// plus.nativeUI.toast(JSON.stringify(err));
uni.navigateBack();
}
});
this.checked = storage.getFaceLogin() || false;
// #endif
}
data() {
return {
lightColor: this.$lightColor,
checked: true,
};
},
methods: {
faceSwitchChange(value) {
if (value === true) {
const res = uni.getSystemInfoSync();
plus.device.getInfo({
success: function (e) {
let params = {
mobile_type: res.model,
secret_key: e.uuid,
};
setBiolofy(params).then((res) => {
if (res.statusCode === 200) {
storage.setFaceLogin(true);
}
});
},
fail: function (e) {
//plus.nativeUI.toast('获取设备信息错误:' + JSON.stringify(e));
console.error("getDeviceInfo failed: " + JSON.stringify(e));
},
});
} else {
storage.setFaceLogin(false);
}
},
},
onLoad() {
// #ifdef APP-PLUS
uni.checkIsSupportSoterAuthentication({
success(res) {
if (!res.supportMode.find((e) => e === "facial")) {
plus.nativeUI.toast("此设备不支持面部识别");
uni.navigateBack();
}
uni.checkIsSoterEnrolledInDevice({
checkAuthMode: "facial",
success(_res) {
if (!_res.isEnrolled) {
plus.nativeUI.toast("此设备未录入面部信息");
uni.navigateBack();
}
},
fail(_err) {
// plus.nativeUI.toast(JSON.stringify(_err));
uni.navigateBack();
},
});
},
fail(err) {
// plus.nativeUI.toast(JSON.stringify(err));
uni.navigateBack();
},
});
this.checked = storage.getFaceLogin() || false;
// #endif
},
};
</script>

View File

@@ -1,70 +1,70 @@
// TODO 第一版本暂无此功能 后续优化以及更新
<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="#1abc9c" size="40" v-model="checked"></u-switch>
</u-cell-item>
</u-cell-group>
<view class="describe">开启后可使用指纹认证完成快捷登录设置仅对本机生效如需修改指纹请在系统设置中操作</view>
</view>
<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-group>
<view class="describe">开启后可使用指纹认证完成快捷登录设置仅对本机生效如需修改指纹请在系统设置中操作</view>
</view>
</template>
<script>
import storage from '@/utils/storage.js';
import { setBiolofy } from '@/api/passport.js';
import storage from "@/utils/storage.js";
import { setBiolofy } from "@/api/passport.js";
export default {
data() {
return {
checked: false
};
},
methods: {
fingerSwitchChange(value) {
if (value === true) {
const res = uni.getSystemInfoSync();
plus.device.getInfo({
success: function(e) {
let params = {
mobile_type: res.model,
secret_key: e.uuid
};
setBiolofy(params).then(res => {
if (res.statusCode === 200) {
storage.setFingerLogin(true);
}
});
},
fail: function(e) {
console.error('getDeviceInfo failed: ' + JSON.stringify(e));
}
});
} else {
storage.setFingerLogin(false);
}
}
},
onLoad() {
// #ifdef APP-PLUS
if (!plus.fingerprint.isSupport()) {
plus.nativeUI.toast('此设备不支持指纹识别');
uni.navigateBack();
}
if (!plus.fingerprint.isKeyguardSecure()) {
plus.nativeUI.toast('此设备未设置密码锁屏');
uni.navigateBack();
}
if (!plus.fingerprint.isEnrolledFingerprints()) {
plus.nativeUI.toast('此设备未录入指纹');
uni.navigateBack();
}
this.checked = storage.getFingerLogin() || false;
// #endif
}
data() {
return {
lightColor: this.$lightColor,
checked: false,
};
},
methods: {
fingerSwitchChange(value) {
if (value === true) {
const res = uni.getSystemInfoSync();
plus.device.getInfo({
success: function (e) {
let params = {
mobile_type: res.model,
secret_key: e.uuid,
};
setBiolofy(params).then((res) => {
if (res.statusCode === 200) {
storage.setFingerLogin(true);
}
});
},
fail: function (e) {
console.error("getDeviceInfo failed: " + JSON.stringify(e));
},
});
} else {
storage.setFingerLogin(false);
}
},
},
onLoad() {
// #ifdef APP-PLUS
if (!plus.fingerprint.isSupport()) {
plus.nativeUI.toast("此设备不支持指纹识别");
uni.navigateBack();
}
if (!plus.fingerprint.isKeyguardSecure()) {
plus.nativeUI.toast("此设备未设置密码锁屏");
uni.navigateBack();
}
if (!plus.fingerprint.isEnrolledFingerprints()) {
plus.nativeUI.toast("此设备未录入指纹");
uni.navigateBack();
}
this.checked = storage.getFingerLogin() || false;
// #endif
},
};
</script>
<style lang="scss">
.finger {
}
<style scoped lang="scss">
</style>