2023-02-27
功能完善
This commit is contained in:
@@ -268,7 +268,7 @@
|
||||
mapState
|
||||
} from 'vuex';
|
||||
import navBar from '@/components/zhouWei-navBar';
|
||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
||||
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||
export default {
|
||||
components: {
|
||||
coupon,
|
||||
@@ -377,8 +377,8 @@
|
||||
// console.log('val: ' + val)
|
||||
// return item.id == val.id;
|
||||
item => {
|
||||
console.log('item_id: ' +JSON.parse(JSON.stringify(item)).id)
|
||||
console.log('val_id: ' +JSON.parse(val).id)
|
||||
console.log('item_id: ' + JSON.parse(JSON.stringify(item)).id)
|
||||
console.log('val_id: ' + JSON.parse(val).id)
|
||||
if (JSON.parse(JSON.stringify(item)).id == JSON.parse(val).id) {
|
||||
return true
|
||||
}
|
||||
@@ -390,11 +390,14 @@
|
||||
|
||||
async sysInfoMethod() {
|
||||
let params = {};
|
||||
let list = this.$db.get('sysInfo')
|
||||
if (!list) {
|
||||
list = await Api.apiCall('get', Api.index.sysInfo, params);
|
||||
this.$db.set('sysInfo', list)
|
||||
}
|
||||
// let list = this.$db.get('sysInfo')
|
||||
console.log('sysInfo>>>>>1111111111111', 1111111111111111)
|
||||
// if (!list) {
|
||||
|
||||
list = await Api.apiCall('get', Api.index.sysInfo, params);
|
||||
console.log('sysInfo>>>>>2222222222', sysInfo)
|
||||
this.$db.set('sysInfo', list)
|
||||
// }
|
||||
|
||||
},
|
||||
getCode() {
|
||||
@@ -549,7 +552,7 @@
|
||||
if (data) {
|
||||
console.log("优惠券")
|
||||
console.log("优惠券", data)
|
||||
console.log("优惠券id",data[0].id)
|
||||
console.log("优惠券id", data[0].id)
|
||||
this.couponList = []
|
||||
this.couponList = this.couponList.concat(data) || [];
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
||||
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||
import uniIcon from '@/components/uni-icon/uni-icon.vue';
|
||||
import eonfox from '@/components/eonfox/eonfox.js';
|
||||
import fns from '@/components/eonfox/fns.js';
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="vip-card-box" @click="toNav('../../pagesU/user/applyMember')"> -->
|
||||
<view class="vip-card-box" @click="upData()">
|
||||
<!-- <view class="vip-card-box" @click="upData()">
|
||||
<image class="card-bg" src="/static/vip-card-bg.png" mode=""></image>
|
||||
<view class="b-btn">立即升级</view>
|
||||
<view class="tit" v-if="userDetailInfo">
|
||||
@@ -44,7 +44,7 @@
|
||||
</view>
|
||||
<text class="e-m">汇融云链</text>
|
||||
<text class="e-b">升级会员享受更多折扣 一测就上线</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<view class="cover-container" :style="[
|
||||
@@ -64,10 +64,10 @@
|
||||
<text class="num">{{ couponList.length || 0 }}</text>
|
||||
<text>优惠券</text>
|
||||
</view>
|
||||
<view class="tj-item" @click="toNav('/pages/integral/home/home')">
|
||||
<!-- <view class="tj-item" @click="toNav('/pages/integral/home/home')">
|
||||
<text class="num">{{ userDetailInfo.integration || 0 }}</text>
|
||||
<text>积分</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 订单 -->
|
||||
<view class="order-section">
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<script>
|
||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||
import Api from '@/common/api';
|
||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
||||
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||
export default {
|
||||
components: {
|
||||
mallplusCopyright,
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
import { mapState } from 'vuex';
|
||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||
import Api from '@/common/api';
|
||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
||||
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||
import empty from '@/components/empty';
|
||||
import { formatDate } from '@/common/date';
|
||||
export default {
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
import { mapState } from 'vuex';
|
||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||
import Api from '@/common/api';
|
||||
import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
|
||||
import uniLoadMore from '@/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue';
|
||||
import empty from '@/components/empty';
|
||||
import Json from '@/Json';
|
||||
import { formatDate } from '@/common/date';
|
||||
|
||||
@@ -1,33 +1,35 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="list-cell b-b m-t" @click="navTo('../../pagesU/user/profile')" hover-class="cell-hover" :hover-stay-time="50">
|
||||
<view class="list-cell b-b m-t" @click="navTo('../../pagesU/user/profile')" hover-class="cell-hover"
|
||||
:hover-stay-time="50">
|
||||
<text class="cell-tit">个人资料</text>
|
||||
<text class="cell-more yticon icon-you"></text>
|
||||
</view>
|
||||
<view class="list-cell b-b" @click="navTo('../../pagesU/address/address')" hover-class="cell-hover" :hover-stay-time="50">
|
||||
<view class="list-cell b-b" @click="navTo('../../pagesU/address/address')" hover-class="cell-hover"
|
||||
:hover-stay-time="50">
|
||||
<text class="cell-tit">收货地址</text>
|
||||
<text class="cell-more yticon icon-you"></text>
|
||||
</view>
|
||||
<view class="list-cell" @click="navTo('/pages/set/certification')" hover-class="cell-hover" :hover-stay-time="50">
|
||||
<!-- <view class="list-cell" @click="navTo('/pages/set/certification')" hover-class="cell-hover" :hover-stay-time="50">
|
||||
<text class="cell-tit">实名认证</text>
|
||||
<text class="cell-more yticon icon-you"></text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="list-cell m-t">
|
||||
<!-- <view class="list-cell m-t">
|
||||
<text class="cell-tit">消息推送</text>
|
||||
<switch checked color="#fa436a" @change="switchChange" />
|
||||
</view>
|
||||
<view class="list-cell m-t b-b" @click="navTo('清除缓存')" hover-class="cell-hover" :hover-stay-time="50">
|
||||
<text class="cell-tit">清除缓存</text>
|
||||
<text class="cell-more yticon icon-you"></text>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="list-cell b-b" @click="navTo('关于Dcloud')" hover-class="cell-hover" :hover-stay-time="50">
|
||||
<text class="cell-tit">关于{{ sysInfo.name }}</text>
|
||||
<text class="cell-more yticon icon-you"></text>
|
||||
</view> -->
|
||||
<view class="list-cell" @click="updateApp()">
|
||||
<text class="cell-tit">检查更新</text>
|
||||
<!-- <text class="cell-tip">当前版本 {{sysInfo.version}}</text> -->
|
||||
<text class="cell-tip">v {{version}}</text>
|
||||
<text class="cell-more yticon icon-you"></text>
|
||||
</view>
|
||||
<view class="list-cell log-out-btn" @click="toLogout"><text class="cell-tit">退出登录</text></view>
|
||||
@@ -36,114 +38,133 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||
import Api from '@/common/api';
|
||||
import { mapMutations } from 'vuex';
|
||||
import APPUpdate from '../../plugins/APPUpdate/index.js'
|
||||
import mallplusCopyright from '@/components/mall-copyright/mallplusCopyright.vue';
|
||||
import Api from '@/common/api';
|
||||
import {
|
||||
mapMutations
|
||||
} from 'vuex';
|
||||
import APPUpdate, {
|
||||
getCurrentNo
|
||||
} from '../../plugins/APPUpdate/index.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
mallplusCopyright
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sysInfo: '',
|
||||
userInfo:{}
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.sysInfo = this.$db.get('sysInfo');
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['logout']),
|
||||
|
||||
navTo(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
});
|
||||
this.$api.msg(`跳转到${url}`);
|
||||
export default {
|
||||
components: {
|
||||
mallplusCopyright
|
||||
},
|
||||
//退出登录
|
||||
toLogout() {
|
||||
uni.showModal({
|
||||
content: '确定要退出登录么',
|
||||
success: e => {
|
||||
if (e.confirm) {
|
||||
this.logout();
|
||||
this.$db.del('userInfos');
|
||||
this.$db.del('token');
|
||||
Api.apiCall('post', Api.index.logout, {});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 200);
|
||||
data() {
|
||||
return {
|
||||
versionCode: "",
|
||||
version: "",
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
let that = this;
|
||||
getCurrentNo(version => {
|
||||
that.version = version.version
|
||||
console.log("qqqq", that.version)
|
||||
})
|
||||
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['logout']),
|
||||
|
||||
navTo(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
});
|
||||
// this.$api.msg(`跳转到${url}`);
|
||||
},
|
||||
//退出登录
|
||||
toLogout() {
|
||||
uni.showModal({
|
||||
content: '确定要退出登录么',
|
||||
success: e => {
|
||||
if (e.confirm) {
|
||||
this.logout();
|
||||
this.$db.del('token');
|
||||
Api.apiCall('post', Api.index.logout, {});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//switch
|
||||
switchChange(e) {
|
||||
let statusTip = e.detail.value ? '打开' : '关闭';
|
||||
this.$api.msg(`${statusTip}消息推送`);
|
||||
},
|
||||
updateApp() {
|
||||
// true 没有新版本的时候有提示,默认:false
|
||||
APPUpdate(true);
|
||||
});
|
||||
},
|
||||
//switch
|
||||
switchChange(e) {
|
||||
let statusTip = e.detail.value ? '打开' : '关闭';
|
||||
this.$api.msg(`${statusTip}消息推送`);
|
||||
},
|
||||
updateApp() {
|
||||
console.log("qqqq", 11111111111111111);
|
||||
// true 没有新版本的时候有提示,默认:false
|
||||
APPUpdate(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: $page-color-base;
|
||||
}
|
||||
.list-cell {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
padding: 20upx;
|
||||
line-height: 60upx;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
justify-content: center;
|
||||
&.log-out-btn {
|
||||
margin-top: 40upx;
|
||||
border-radius: 50upx;
|
||||
width: 95%;
|
||||
margin-left: 2.5%;
|
||||
background: $uni-color-primary;
|
||||
page {
|
||||
background: $page-color-base;
|
||||
}
|
||||
|
||||
.list-cell {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
padding: 20upx;
|
||||
line-height: 60upx;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
justify-content: center;
|
||||
|
||||
&.log-out-btn {
|
||||
margin-top: 40upx;
|
||||
border-radius: 50upx;
|
||||
width: 95%;
|
||||
margin-left: 2.5%;
|
||||
background: $uni-color-primary;
|
||||
|
||||
.cell-tit {
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.cell-hover {
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
&.b-b:after {
|
||||
left: 30upx;
|
||||
}
|
||||
|
||||
&.m-t {
|
||||
margin-top: 16upx;
|
||||
}
|
||||
|
||||
.cell-more {
|
||||
align-self: baseline;
|
||||
font-size: $font-lg;
|
||||
color: $font-color-light;
|
||||
margin-left: 10upx;
|
||||
}
|
||||
|
||||
.cell-tit {
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
margin-right: 0;
|
||||
flex: 1;
|
||||
font-size: $font-base + 2upx;
|
||||
color: $font-color-dark;
|
||||
margin-right: 10upx;
|
||||
}
|
||||
|
||||
.cell-tip {
|
||||
font-size: $font-base;
|
||||
color: $font-color-light;
|
||||
}
|
||||
|
||||
switch {
|
||||
transform: translateX(16upx) scale(0.84);
|
||||
}
|
||||
}
|
||||
&.cell-hover {
|
||||
background: #fafafa;
|
||||
}
|
||||
&.b-b:after {
|
||||
left: 30upx;
|
||||
}
|
||||
&.m-t {
|
||||
margin-top: 16upx;
|
||||
}
|
||||
.cell-more {
|
||||
align-self: baseline;
|
||||
font-size: $font-lg;
|
||||
color: $font-color-light;
|
||||
margin-left: 10upx;
|
||||
}
|
||||
.cell-tit {
|
||||
flex: 1;
|
||||
font-size: $font-base + 2upx;
|
||||
color: $font-color-dark;
|
||||
margin-right: 10upx;
|
||||
}
|
||||
.cell-tip {
|
||||
font-size: $font-base;
|
||||
color: $font-color-light;
|
||||
}
|
||||
switch {
|
||||
transform: translateX(16upx) scale(0.84);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user