取消用户信息授权

This commit is contained in:
qiaocl 2023-11-02 15:23:07 +08:00
parent d49728a139
commit ddca27c8ed
49 changed files with 550 additions and 466 deletions

View File

@ -1,105 +1,111 @@
<template>
<view>
<view class="header-con">
<view class="header" v-if="token">
<view class="left">
<image :src="user.headimg" class="headimage mr-10" @click="handleDrawer"></image>
<view>
<view class="name" @click="handleDrawer">
<text class="overflow">{{user.name}}</text>
<icon class="iconfont icon-yqfqiehuan"></icon>
</view>
<view class="age">
<view>
性别:{{!user.sex?"未知":user.sex==1?'男':'女'}}
</view>
<view>
年龄:{{user.mage?user.mage:"0岁"}}
</view>
</view>
</view>
</view>
<view class="celiang_r" @click="handleBluetoothClick">
<icon class="t-icon t-icon-tizhongcheng"></icon>
<text>上秤测量</text>
</view>
</view>
<view class="header2" v-else @click="handleLogin">
<view class="text"><text>登录</text>查看更多信息</view>
</view>
</view>
<!-- denglu -->
<userLogin></userLogin>
<!-- 左侧 -->
<leftdrawer></leftdrawer>
</view>
<view>
<view class="header-con">
<view class="header" v-if="token">
<view class="left">
<image :src="user.headimg" class="headimage mr-10" @click="handleDrawer"></image>
<view>
<view class="name" @click="handleDrawer">
<text class="overflow">{{user.name}}</text>
<icon class="iconfont icon-yqfqiehuan"></icon>
</view>
<view class="age">
<view>
性别:{{!user.sex?"未知":user.sex==1?'男':'女'}}
</view>
<view>
年龄:{{user.mage?user.mage:"0岁"}}
</view>
</view>
</view>
</view>
<view class="celiang_r" @click="handleBluetoothClick">
<icon class="t-icon t-icon-tizhongcheng"></icon>
<text>上秤测量</text>
</view>
</view>
<view class="header2" v-else @click="handleLogin">
<view class="text"><text>登录</text>查看更多信息</view>
</view>
</view>
<!-- denglu -->
<userLogin></userLogin>
<!-- 左侧 -->
<leftdrawer></leftdrawer>
</view>
</template>
<script>
import {
mapState
} from "vuex";
import userLogin from '@/components/userLogin.vue'
import leftdrawer from "@/components/drawer/drawer.vue"
export default {
components: {
userLogin,
leftdrawer
},
data() {
return {
devType: "",
deviceId: ""
}
},
props: {
token: {
type: String,
default: null
},
},
computed: {
...mapState(["user"]),
},
mounted() {
// this.token = uni.getStorageSync('token')
},
methods: {
//
handleBluetoothClick() {
let that = this
if (!that.token) {
that.$store.commit("changeUserLogin", true)
return
}
uni.openBluetoothAdapter({
success: e => {
that.$store.commit("changeBluetooth", true);
if (that.devType && that.deviceId) {
that.$tools.handlePages(that.devType, that.deviceId)
return
}
uni.navigateTo({
url: "/pages/search/devType"
})
console.log('初始化蓝牙成功:' + e.errMsg);
},
fail: err => {
console.log('初始化蓝牙失败:' + err.errMsg);
return this.$tools.getBluetoothAdapter(err)
}
});
},
//
handleLogin() {
this.$store.commit("changeUserLogin", true);
},
handleDrawer() {
this.$store.commit("changeDrawe", true);
},
}
}
import {
mapState
} from "vuex";
import userLogin from '@/components/userLogin.vue'
import leftdrawer from "@/components/drawer/drawer.vue"
export default {
components: {
userLogin,
leftdrawer
},
data() {
return {
devType: "",
deviceId: ""
}
},
props: {
token: {
type: String,
default: null
},
},
computed: {
...mapState(["user"]),
},
mounted() {
// this.token = uni.getStorageSync('token')
},
methods: {
//
handleBluetoothClick() {
let that = this
if (!that.token) {
uni.redirectTo({
url: '/pageTwo/login/login'
})
// that.$store.commit("changeUserLogin", true)
return
}
uni.openBluetoothAdapter({
success: e => {
that.$store.commit("changeBluetooth", true);
if (that.devType && that.deviceId) {
that.$tools.handlePages(that.devType, that.deviceId)
return
}
uni.navigateTo({
url: "/pages/search/devType"
})
console.log('初始化蓝牙成功:' + e.errMsg);
},
fail: err => {
console.log('初始化蓝牙失败:' + err.errMsg);
return this.$tools.getBluetoothAdapter(err)
}
});
},
//
handleLogin() {
uni.redirectTo({
url: '/pageTwo/login/login'
})
// that.$store.commit("changeUserLogin", true)
},
handleDrawer() {
this.$store.commit("changeDrawe", true);
},
}
}
</script>
<style scoped lang="scss">
</style>
</style>

View File

@ -265,7 +265,10 @@
changeMonth(type) {
let that = this
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
})
// that.$store.commit("changeUserLogin", true)
return
}
if (type == 'pre') {

View File

@ -41,7 +41,10 @@
},
methods: {
onTap() {
this.$store.commit("changeUserLogin", false);
uni.redirectTo({
url: '/pageTwo/login/login'
})
// that.$store.commit("changeUserLogin", true)
},
getUserInfo() {
let that = this

View File

@ -110,8 +110,8 @@
phone: that.phone,
tenantId: uni.getStorageSync('tenantid'),
sessionId: uni.getStorageSync('sessionid'),
name: that.infoRes.name,
headImg: that.infoRes.headimg,
name: "",
headImg: "",
code: that.code,
isvrcode: true,
}).then(res => {

View File

@ -142,7 +142,10 @@
handlePK() {
let that = this
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
})
// that.$store.commit("changeUserLogin", true)
return
}
if (that.isActive.length != 2) {

View File

@ -110,7 +110,10 @@
let that = this
that.devices = []
if (!that.token) {
that.$store.commit("changeUserLogin", true)
uni.redirectTo({
url: '/pageTwo/login/login?url=active' + '&code=' + that.code
})
// that.$store.commit("changeUserLogin", true)
return
}
uni.openBluetoothAdapter({

View File

@ -373,7 +373,10 @@
handleBluetoothClick() {
let that = this
if (!that.token) {
that.$store.commit("changeUserLogin", true)
uni.redirectTo({
url: '/pageTwo/login/login'
})
// that.$store.commit("changeUserLogin", true)
return
}
uni.openBluetoothAdapter({
@ -416,7 +419,10 @@
clickTool(ind) {
let that = this
if (!that.token) {
that.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
})
// that.$store.commit("changeUserLogin", true)
return
}
if (ind == 0) {
@ -472,7 +478,10 @@
},
//
handleLogin() {
this.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
})
// that.$store.commit("changeUserLogin", true)
},
handleDrawer() {
this.$store.commit("changeDrawe", true);

View File

@ -137,7 +137,10 @@
methods: {
handleLogin() {
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
})
// that.$store.commit("changeUserLogin", true)
return
}
},
@ -170,7 +173,10 @@
handleClick(ind) {
let that = this
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
})
// that.$store.commit("changeUserLogin", true)
return
}
if (ind == 'adult' && that.configBox.referappid) {
@ -193,7 +199,10 @@
},
navTo(url) {
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
})
// that.$store.commit("changeUserLogin", true)
return
}
uni.navigateTo({
@ -202,7 +211,10 @@
},
handleEditClick() {
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
})
// that.$store.commit("changeUserLogin", true)
return
}
this.$store.commit("changeEdit", true);

View File

@ -1,319 +1,325 @@
<template>
<view class="content">
<!-- 时间选择 -->
<view class="TrendPage">
<view class="TrendTime">
<view class="boxTime">
<view class="one">
<picker mode="date" class="f-l" :value="startTime?startTime:startDate" @change="handStartTimeH">
<view class="uni-input">{{startTime?startTime:startDate}}
<icon class="iconfont iconDown"></icon>
</view>
</picker>
<view class="content">
<!-- 时间选择 -->
<view class="TrendPage">
<view class="TrendTime">
<view class="boxTime">
<view class="one">
<picker mode="date" class="f-l" :value="startTime?startTime:startDate" @change="handStartTimeH">
<view class="uni-input">{{startTime?startTime:startDate}}
<icon class="iconfont iconDown"></icon>
</view>
</picker>
<picker mode="date" :end="endDate" class="f-r" :value="endDate" @change="handEndTimeH">
<view class="uni-input">~ {{endTime?endTime:endDate}}
<icon class="iconfont iconDown"></icon>
</view>
</picker>
</view>
<view class="tow" @click="handAllTime(0)" :class="{style:active==0}">
近3月
</view>
<view class="tow" @click="handAllTime(1)" :class="{style:active==1}">
近半年
</view>
</view>
</view>
<!-- 曲线图 -->
<view class="box boxList">
<view class="listC">
<view :class="{active:index==active1}" class="name" v-for="(item,index) in weightList" :key="index"
@click="showbox(index)">
{{item.title}}
</view>
</view>
<view class="blockC">
<view v-if="lineData&&lineData.categories.length&&handTrue">
<qiun-data-charts type="area" :chartData="lineData" :canvas2d="true" canvasId="charts09" :cHeight="480"
:cWidth="680" :animation="false" :opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}"
:ontouch="true" />
</view>
<view class="nolist" v-else>
<icon class="iconfont icon-zanwu"></icon>
</view>
</view>
</view>
<picker mode="date" :end="endDate" class="f-r" :value="endDate" @change="handEndTimeH">
<view class="uni-input">~ {{endTime?endTime:endDate}}
<icon class="iconfont iconDown"></icon>
</view>
</picker>
</view>
<view class="tow" @click="handAllTime(0)" :class="{style:active==0}">
近3月
</view>
<view class="tow" @click="handAllTime(1)" :class="{style:active==1}">
近半年
</view>
</view>
</view>
<!-- 曲线图 -->
<view class="box boxList">
<view class="listC">
<view :class="{active:index==active1}" class="name" v-for="(item,index) in weightList" :key="index"
@click="showbox(index)">
{{item.title}}
</view>
</view>
<view class="blockC">
<view v-if="lineData&&lineData.categories.length&&handTrue">
<qiun-data-charts type="area" :chartData="lineData" :canvas2d="true" canvasId="charts09"
:cHeight="480" :cWidth="680" :animation="false"
:opts="{enableScroll:true,xAxis:{scrollShow:false,itemCount:3}}" :ontouch="true" />
</view>
<view class="nolist" v-else>
<icon class="iconfont icon-zanwu"></icon>
</view>
</view>
</view>
<!-- 目标-->
<view class="box">
<view class="data">
<view class="item" @click="handleClick(0)">
<view class="val">{{userInfo.targetweight?userInfo.targetweight:0}}<text>kg</text>
</view>
<view class="name">目标体重<icon class="t-icon t-icon-bianji3"></icon>
</view>
</view>
<view class="item">
<view class="val">{{userInfo.totalweight?Math.abs(userInfo.totalweight):0}}<text>kg</text>
</view>
<view class="name" v-if="Number(userInfo.totalweight)<0">累计增重</view>
<view class="name" v-else>累计减重</view>
</view>
<view class="item" @click="handleClick(1)">
<view class="val">{{userInfo.firstweight?userInfo.firstweight:0}}<text>kg</text>
</view>
<view class="name">初始体重<icon class="t-icon t-icon-bianji3"></icon>
</view>
</view>
<view class="item">
<view class="val">{{userInfo.day?userInfo.day:0}}<text></text></view>
<view class="name">减重天数</view>
</view>
<view class="item" @click="handleClick(2)">
<view class="val"></view>
<view class="name">
<icon class="iconfont icon-tianjia">手动记录</icon>
</view>
</view>
</view>
</view>
<!-- 手动 -->
<manuaRecord @getList="getList"></manuaRecord>
<!-- 初始 -->
<firstweight></firstweight>
<!-- 目标 -->
<targetWeight></targetWeight>
<!-- 登录 -->
<userPopup></userPopup>
</view>
</view>
<!-- 目标-->
<view class="box">
<view class="data">
<view class="item" @click="handleClick(0)">
<view class="val">{{userInfo.targetweight?userInfo.targetweight:0}}<text>kg</text>
</view>
<view class="name">目标体重<icon class="t-icon t-icon-bianji3"></icon>
</view>
</view>
<view class="item">
<view class="val">{{userInfo.totalweight?Math.abs(userInfo.totalweight):0}}<text>kg</text>
</view>
<view class="name" v-if="Number(userInfo.totalweight)<0">累计增重</view>
<view class="name" v-else>累计减重</view>
</view>
<view class="item" @click="handleClick(1)">
<view class="val">{{userInfo.firstweight?userInfo.firstweight:0}}<text>kg</text>
</view>
<view class="name">初始体重<icon class="t-icon t-icon-bianji3"></icon>
</view>
</view>
<view class="item">
<view class="val">{{userInfo.day?userInfo.day:0}}<text></text></view>
<view class="name">减重天数</view>
</view>
<view class="item" @click="handleClick(2)">
<view class="val"></view>
<view class="name">
<icon class="iconfont icon-tianjia">手动记录</icon>
</view>
</view>
</view>
</view>
<!-- 手动 -->
<manuaRecord @getList="getList"></manuaRecord>
<!-- 初始 -->
<firstweight></firstweight>
<!-- 目标 -->
<targetWeight></targetWeight>
<!-- 登录 -->
<userPopup></userPopup>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
import userPopup from '@/components/userLogin.vue'
import targetWeight from '@/components/target/targetWeight.vue';
import firstweight from '@/components/target/firstweight.vue';
import manuaRecord from '@/components/target/manuaRecord.vue';
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
export default {
components: {
targetWeight,
firstweight,
manuaRecord,
userPopup,
qiunDataCharts,
},
computed: {
...mapState(["user", "Trend", "appTheme"]),
userInfo: function() {
return this.user
},
endDate() {
return this.$tools.getDate("start")
},
startDate() {
return this.$tools.GetDateStr(-90);
},
},
onLoad() {
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
},
onShow() {
let that = this
this.token = uni.getStorageSync('token')
this.active = 0
this.startTime = ""
this.endTime = ""
that.getList(this.startDate, this.endDate)
},
methods: {
getList(start, end) {
console.log("fanhui", start, end)
let that = this
that.$model.getTrendList({
familyid: uni.getStorageSync('familyid'),
starttime: start,
endtime: end,
}).then(res => {
if (res) {
for (var i = 0; i < that.weightList.length; i++) {
that.weightList[i].Line = res[that.weightList[i].key];
}
that.showbox(0)
}
})
},
showbox(index) {
let that = this
that.handTrue = false
this.$nextTick(function() {
that.handTrue = true
that.lineData = that.weightList[index].Line
})
that.active1 = index
},
//
handStartTimeH(e) {
let that = this
if (this.endTime) {
if (Date.parse(e.target.value) > Date.parse(this.endTime)) {
this.$tools.msg("请选择正确的时间")
return
}
} else {
if (Date.parse(e.target.value) > Date.parse(this.endDate)) {
this.$tools.msg("请选择正确的时间")
return
}
}
this.startTime = e.target.value
let endtime = that.endTime ? that.endTime : that.endDate
this.getList(that.startTime, endtime)
},
//
handEndTimeH(e) {
let that = this
if (this.startTime) {
if (Date.parse(e.target.value) < Date.parse(this.startTime)) {
this.$tools.msg("请选择正确的时间")
return
}
} else {
if (Date.parse(e.target.value) < Date.parse(this.startDate)) {
this.$tools.msg("请选择正确的时间")
return
}
}
this.endTime = e.target.value
let startTime = that.startTime ? that.startTime : that.startDate
this.getList(startTime, this.endTime)
},
//
handAllTime(ind) {
let that = this
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
return
}
this.active = ind
if (ind == 0) {
this.startTime = that.$tools.GetDateStr(-90)
} else {
this.startTime = that.$tools.GetDateStr(-180)
}
this.getList(this.startTime, this.endDate)
},
handleClick(ind) {
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
return
}
if (ind == 0) {
this.$store.commit("changeTarget", true);
return
}
if (ind == 1) {
this.$store.commit("changeFirst", true);
return
}
if (ind == 2) {
this.$store.commit("changeRecord", true);
return
}
},
},
data() {
return {
lineData: null,
type: null,
active1: 0,
weight: "",
startTime: "",
endTime: "",
active: 0,
token: null,
handTrue: true,
weightList: [{
title: '体重',
key: 'weight',
showCon: false,
Line: {
"categories": [],
"series": [{
"color": "#fb7b92",
"name": "体重",
"data": []
}]
},
},
{
title: 'BMI',
key: 'bmi',
Line: {
"categories": [],
"series": [{
"color": "#6bb0fe",
"name": "bmi",
"data": []
}]
},
}, {
title: '肌肉',
key: 'muscle',
showCon: false,
Line: {
"categories": [],
"series": [{
"color": "#ff9f40",
"name": "肌肉率",
"data": []
}]
},
},
{
title: '脂肪',
key: 'fat_r',
showCon: false,
Line: {
"categories": [],
"series": [{
"color": "#3fcba7",
"name": "脂肪率",
"data": []
}]
},
}
],
};
}
}
import {
mapState
} from "vuex";
import userPopup from '@/components/userLogin.vue'
import targetWeight from '@/components/target/targetWeight.vue';
import firstweight from '@/components/target/firstweight.vue';
import manuaRecord from '@/components/target/manuaRecord.vue';
import qiunDataCharts from '@/uni_modules/qiun-data-charts/components/qiun-data-charts.vue';
export default {
components: {
targetWeight,
firstweight,
manuaRecord,
userPopup,
qiunDataCharts,
},
computed: {
...mapState(["user", "Trend", "appTheme"]),
userInfo: function() {
return this.user
},
endDate() {
return this.$tools.getDate("start")
},
startDate() {
return this.$tools.GetDateStr(-90);
},
},
onLoad() {
//
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: this.appTheme,
})
},
onShow() {
let that = this
this.token = uni.getStorageSync('token')
this.active = 0
this.startTime = ""
this.endTime = ""
that.getList(this.startDate, this.endDate)
},
methods: {
getList(start, end) {
console.log("fanhui", start, end)
let that = this
that.$model.getTrendList({
familyid: uni.getStorageSync('familyid'),
starttime: start,
endtime: end,
}).then(res => {
if (res) {
for (var i = 0; i < that.weightList.length; i++) {
that.weightList[i].Line = res[that.weightList[i].key];
}
that.showbox(0)
}
})
},
showbox(index) {
let that = this
that.handTrue = false
this.$nextTick(function() {
that.handTrue = true
that.lineData = that.weightList[index].Line
})
that.active1 = index
},
//
handStartTimeH(e) {
let that = this
if (this.endTime) {
if (Date.parse(e.target.value) > Date.parse(this.endTime)) {
this.$tools.msg("请选择正确的时间")
return
}
} else {
if (Date.parse(e.target.value) > Date.parse(this.endDate)) {
this.$tools.msg("请选择正确的时间")
return
}
}
this.startTime = e.target.value
let endtime = that.endTime ? that.endTime : that.endDate
this.getList(that.startTime, endtime)
},
//
handEndTimeH(e) {
let that = this
if (this.startTime) {
if (Date.parse(e.target.value) < Date.parse(this.startTime)) {
this.$tools.msg("请选择正确的时间")
return
}
} else {
if (Date.parse(e.target.value) < Date.parse(this.startDate)) {
this.$tools.msg("请选择正确的时间")
return
}
}
this.endTime = e.target.value
let startTime = that.startTime ? that.startTime : that.startDate
this.getList(startTime, this.endTime)
},
//
handAllTime(ind) {
let that = this
if (!uni.getStorageSync('token')) {
uni.redirectTo({
url: '/pageTwo/login/login'
})
// that.$store.commit("changeUserLogin", true)
return
}
this.active = ind
if (ind == 0) {
this.startTime = that.$tools.GetDateStr(-90)
} else {
this.startTime = that.$tools.GetDateStr(-180)
}
this.getList(this.startTime, this.endDate)
},
handleClick(ind) {
if (!uni.getStorageSync('token')) {
uni.redirectTo({
url: '/pageTwo/login/login'
})
// that.$store.commit("changeUserLogin", true)
return
}
if (ind == 0) {
this.$store.commit("changeTarget", true);
return
}
if (ind == 1) {
this.$store.commit("changeFirst", true);
return
}
if (ind == 2) {
this.$store.commit("changeRecord", true);
return
}
},
},
data() {
return {
lineData: null,
type: null,
active1: 0,
weight: "",
startTime: "",
endTime: "",
active: 0,
token: null,
handTrue: true,
weightList: [{
title: '体重',
key: 'weight',
showCon: false,
Line: {
"categories": [],
"series": [{
"color": "#fb7b92",
"name": "体重",
"data": []
}]
},
},
{
title: 'BMI',
key: 'bmi',
Line: {
"categories": [],
"series": [{
"color": "#6bb0fe",
"name": "bmi",
"data": []
}]
},
}, {
title: '肌肉',
key: 'muscle',
showCon: false,
Line: {
"categories": [],
"series": [{
"color": "#ff9f40",
"name": "肌肉率",
"data": []
}]
},
},
{
title: '脂肪',
key: 'fat_r',
showCon: false,
Line: {
"categories": [],
"series": [{
"color": "#3fcba7",
"name": "脂肪率",
"data": []
}]
},
}
],
};
}
}
</script>
<style lang="scss" scoped>
.TrendTime {
background: #fff;
padding: 10px;
margin-bottom: 15px;
border-radius: 10px;
}
.TrendTime {
background: #fff;
padding: 10px;
margin-bottom: 15px;
border-radius: 10px;
}
.listC {
margin: 10px;
}
.listC {
margin: 10px;
}
.boxList {
background-color: #fff;
border-radius: 10px;
.boxList {
background-color: #fff;
border-radius: 10px;
.list {
margin: 10px;
}
}
</style>
.list {
margin: 10px;
}
}
</style>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -415,7 +415,10 @@ var _default2 = {
changeMonth: function changeMonth(type) {
var that = this;
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
});
// that.$store.commit("changeUserLogin", true)
return;
}
if (type == 'pre') {

View File

@ -143,7 +143,10 @@ var _default = {
computed: _objectSpread({}, (0, _vuex.mapState)(["user", "isLogin"])),
methods: {
onTap: function onTap() {
this.$store.commit("changeUserLogin", false);
uni.redirectTo({
url: '/pageTwo/login/login'
});
// that.$store.commit("changeUserLogin", true)
},
getUserInfo: function getUserInfo() {
var that = this;

View File

@ -199,8 +199,8 @@ var _default = {
phone: that.phone,
tenantId: uni.getStorageSync('tenantid'),
sessionId: uni.getStorageSync('sessionid'),
name: that.infoRes.name,
headImg: that.infoRes.headimg,
name: "",
headImg: "",
code: that.code,
isvrcode: true
}).then(function (res) {

View File

@ -291,7 +291,10 @@ var _default = {
handlePK: function handlePK() {
var that = this;
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
});
// that.$store.commit("changeUserLogin", true)
return;
}
if (that.isActive.length != 2) {

View File

@ -282,7 +282,10 @@ var _default = {
var that = this;
that.devices = [];
if (!that.token) {
that.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login?url=active' + '&code=' + that.code
});
// that.$store.commit("changeUserLogin", true)
return;
}
uni.openBluetoothAdapter({

View File

@ -423,7 +423,10 @@ var _default = {
var _this3 = this;
var that = this;
if (!that.token) {
that.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
});
// that.$store.commit("changeUserLogin", true)
return;
}
uni.openBluetoothAdapter({
@ -466,7 +469,10 @@ var _default = {
clickTool: function clickTool(ind) {
var that = this;
if (!that.token) {
that.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
});
// that.$store.commit("changeUserLogin", true)
return;
}
if (ind == 0) {
@ -520,7 +526,10 @@ var _default = {
},
// 登录
handleLogin: function handleLogin() {
this.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
});
// that.$store.commit("changeUserLogin", true)
},
handleDrawer: function handleDrawer() {
this.$store.commit("changeDrawe", true);

View File

@ -182,7 +182,10 @@ var _default = {
methods: {
handleLogin: function handleLogin() {
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
});
// that.$store.commit("changeUserLogin", true)
return;
}
},
@ -215,7 +218,10 @@ var _default = {
handleClick: function handleClick(ind) {
var that = this;
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
});
// that.$store.commit("changeUserLogin", true)
return;
}
if (ind == 'adult' && that.configBox.referappid) {
@ -238,7 +244,10 @@ var _default = {
},
navTo: function navTo(url) {
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
});
// that.$store.commit("changeUserLogin", true)
return;
}
uni.navigateTo({
@ -247,7 +256,10 @@ var _default = {
},
handleEditClick: function handleEditClick() {
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
});
// that.$store.commit("changeUserLogin", true)
return;
}
this.$store.commit("changeEdit", true);

View File

@ -294,7 +294,10 @@ var _default = {
handAllTime: function handAllTime(ind) {
var that = this;
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
});
// that.$store.commit("changeUserLogin", true)
return;
}
this.active = ind;
@ -307,7 +310,10 @@ var _default = {
},
handleClick: function handleClick(ind) {
if (!uni.getStorageSync('token')) {
this.$store.commit("changeUserLogin", true);
uni.redirectTo({
url: '/pageTwo/login/login'
});
// that.$store.commit("changeUserLogin", true)
return;
}
if (ind == 0) {