我的订单+我的
This commit is contained in:
118
App.vue
118
App.vue
@@ -2,54 +2,55 @@
|
||||
import {
|
||||
music,
|
||||
bgm
|
||||
} from '@/utils/music.js'
|
||||
import store from '@/store/index.js';
|
||||
import socket from '@/config/socket';
|
||||
} from "@/utils/music.js";
|
||||
import store from "@/store/index.js";
|
||||
import socket from "@/config/socket";
|
||||
// #ifdef H5
|
||||
import {
|
||||
h5Login
|
||||
} from '@/config/html5Utils';
|
||||
} from "@/config/html5Utils";
|
||||
// #endif
|
||||
// // #ifdef APP-PLUS
|
||||
// import APPUpdate from '@/uni_modules/zhouWei-APPUpdate/js_sdk/appUpdate';
|
||||
// // #endif
|
||||
// #ifdef APP-PLUS
|
||||
import updata from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
|
||||
import updata from "@/uni_modules/uni-upgrade-center-app/utils/check-update";
|
||||
// #endif
|
||||
import Vue from 'vue'
|
||||
|
||||
import Vue from "vue";
|
||||
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
platform:null, // 系统
|
||||
}
|
||||
data() {
|
||||
return {
|
||||
platform: null, // 系统
|
||||
};
|
||||
},
|
||||
onLaunch: function(e) {
|
||||
// 检测自动更新
|
||||
// #ifdef APP-PLUS
|
||||
updata()
|
||||
updata();
|
||||
// #endif
|
||||
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
Vue.prototype.winWidth = res.screenWidth
|
||||
Vue.prototype.winHeight = res.screenHeight
|
||||
}
|
||||
})
|
||||
Vue.prototype.winWidth = res.screenWidth;
|
||||
Vue.prototype.winHeight = res.screenHeight;
|
||||
Vue.prototype.statusBarHeight = res.statusBarHeight;
|
||||
},
|
||||
});
|
||||
|
||||
//取出缓存数据
|
||||
store.commit('setCacheData');
|
||||
store.commit("setCacheData");
|
||||
// #ifdef MP-WEIXIN
|
||||
if (store.state.userInfo.token) {
|
||||
socket.init();
|
||||
}
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
console.log(store.state)
|
||||
console.log(store.state);
|
||||
if (store.state.userInfo.token) {
|
||||
socket.init();
|
||||
} else {
|
||||
h5Login('force', () => {
|
||||
h5Login("force", () => {
|
||||
socket.init();
|
||||
});
|
||||
}
|
||||
@@ -59,26 +60,24 @@
|
||||
socket.init();
|
||||
}
|
||||
// APPUpdate();
|
||||
// #endif
|
||||
|
||||
// #endif
|
||||
},
|
||||
onShow: function(e) {
|
||||
|
||||
onShow: function(e) {
|
||||
// #ifdef MP-WEIXIN
|
||||
//获取二维码携带的参数
|
||||
let scene = decodeURIComponent(e.query.scene);
|
||||
scene = scene.split('&');
|
||||
scene = scene.split("&");
|
||||
let data = {
|
||||
//场景值
|
||||
scene: e.scene
|
||||
scene: e.scene,
|
||||
};
|
||||
scene.forEach(item => {
|
||||
let arr = item.split('=');
|
||||
scene.forEach((item) => {
|
||||
let arr = item.split("=");
|
||||
if (arr.length == 2) {
|
||||
data[arr[0]] = arr[1];
|
||||
}
|
||||
});
|
||||
store.commit('setChatScenesInfo', Object.assign(e.query, data));
|
||||
store.commit("setChatScenesInfo", Object.assign(e.query, data));
|
||||
//小程序更新
|
||||
if (uni.getUpdateManager) {
|
||||
const updateManager = uni.getUpdateManager();
|
||||
@@ -88,22 +87,22 @@
|
||||
});
|
||||
updateManager.onUpdateReady(function(res) {
|
||||
uni.showModal({
|
||||
title: '更新提示',
|
||||
content: '新版本已经准备好,是否重启应用?',
|
||||
title: "更新提示",
|
||||
content: "新版本已经准备好,是否重启应用?",
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
updateManager.applyUpdate();
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
updateManager.onUpdateFailed(function(res) {
|
||||
// 新的版本下载失败
|
||||
uni.showModal({
|
||||
title: '已经有新版本了哟~',
|
||||
content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~',
|
||||
showCancel: false
|
||||
title: "已经有新版本了哟~",
|
||||
content: "新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~",
|
||||
showCancel: false,
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -111,29 +110,37 @@
|
||||
},
|
||||
onHide: function() {},
|
||||
destroyed() {
|
||||
store.commit('setUserInfo', {
|
||||
'playFlag': true
|
||||
})
|
||||
console.log('页面销毁')
|
||||
store.commit("setUserInfo", {
|
||||
playFlag: true,
|
||||
});
|
||||
console.log("页面销毁");
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "@/uni_modules/uview-ui/index.scss";
|
||||
@import "@/uni_modules/uni-scss/index.scss";
|
||||
|
||||
/* uni.css - 通用组件、模板样式库,可以当作一套ui库应用 */
|
||||
@import "./common/uni.css";
|
||||
@import "@/static/customicons.css";
|
||||
@import "@/style/common.scss";
|
||||
|
||||
@import "uview-ui/index.scss";
|
||||
/* #ifndef APP-NVUE */
|
||||
@import './style/common.scss';
|
||||
@import './style/input.scss';
|
||||
@import './style/table.scss';
|
||||
|
||||
|
||||
|
||||
@import "./style/input.scss";
|
||||
@import "./style/table.scss";
|
||||
|
||||
page {
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
|
||||
/* #ifdef H5 */
|
||||
//修复H5底部导航挡住内容bug
|
||||
@@ -141,16 +148,22 @@
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.commonPage,
|
||||
.commonPageBox {
|
||||
height: 100vh;
|
||||
|
||||
}
|
||||
|
||||
/*每个页面公共css */
|
||||
@font-face {
|
||||
font-family: 'iconfont';
|
||||
font-family: "iconfont";
|
||||
/* project id 1997429 */
|
||||
src: url('https://at.alicdn.com/t/font_1997429_8xzvctxta3u.eot');
|
||||
src: url('https://at.alicdn.com/t/font_1997429_8xzvctxta3u.eot?#iefix') format('embedded-opentype'),
|
||||
url('https://at.alicdn.com/t/font_1997429_8xzvctxta3u.woff2') format('woff2'),
|
||||
url('https://at.alicdn.com/t/font_1997429_8xzvctxta3u.woff') format('woff'),
|
||||
url('https://at.alicdn.com/t/font_1997429_8xzvctxta3u.ttf') format('truetype'),
|
||||
url('https://at.alicdn.com/t/font_1997429_8xzvctxta3u.svg#iconfont') format('svg');
|
||||
src: url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.eot");
|
||||
src: url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.eot?#iefix") format("embedded-opentype"),
|
||||
url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.woff2") format("woff2"),
|
||||
url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.woff") format("woff"),
|
||||
url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.ttf") format("truetype"),
|
||||
url("https://at.alicdn.com/t/font_1997429_8xzvctxta3u.svg#iconfont") format("svg");
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
@@ -195,7 +208,6 @@
|
||||
border-radius: 100upx;
|
||||
}
|
||||
|
||||
|
||||
//设置背景色
|
||||
checkbox.checkedItem[checked] .wx-checkbox-input,
|
||||
checkbox.checkedItem .uni-checkbox-input-checked {
|
||||
|
||||
Reference in New Issue
Block a user