|
|
@@ -1,51 +1,51 @@
|
|
|
<script>
|
|
|
- export default {
|
|
|
- globalData:{
|
|
|
- userInfo: {},
|
|
|
- shopInfo: {
|
|
|
- shop_name: "数字茶城",
|
|
|
- desc: "数字茶城"
|
|
|
- },
|
|
|
- openId: '',
|
|
|
- authorizeWindow: true, //是否可以打开用户信息授权页面,避免重复打开
|
|
|
- bindPhoneWindow: true, //是否可以打开绑定手机号码页面,避免重复打开
|
|
|
- hasUpdate: false, // 小程序是否有更新版本 默认为没有
|
|
|
- newVersionInfo: {
|
|
|
- num: "1.0.0",
|
|
|
- desc: "数字茶城上线啦!",
|
|
|
- updateInfo: [] // 数组形式描述一下具体更新了什么内容
|
|
|
- }, // 当前小程序最新版本信息
|
|
|
- msgTmp: null ,//订阅消息模板id信息
|
|
|
- systemUserInfo:''
|
|
|
- },
|
|
|
- errTips(msg, duration, open){
|
|
|
- uni.showToast({
|
|
|
- title: msg,
|
|
|
- icon:'none',
|
|
|
- duration: duration ? duration : 1200,
|
|
|
- mask: true
|
|
|
- })
|
|
|
- },
|
|
|
- // 接口未传递有效参数值的错误提示
|
|
|
- parameter(authName) {
|
|
|
- throw new Error("'" + authName + "' cat\'t be empty!");
|
|
|
- },
|
|
|
- onLaunch() {
|
|
|
- var logs = uni.getStorageSync('logs') || []
|
|
|
- logs.unshift(Date.now())
|
|
|
- uni.setStorageSync('logs', logs);
|
|
|
- uni.setStorageSync('mallName', "数字茶城");
|
|
|
- },
|
|
|
- onShow() {
|
|
|
- console.log('App Show')
|
|
|
- },
|
|
|
- onHide() {
|
|
|
- console.log('App Hide')
|
|
|
- }
|
|
|
- }
|
|
|
+export default {
|
|
|
+ globalData: {
|
|
|
+ userInfo: {},
|
|
|
+ shopInfo: {
|
|
|
+ shop_name: "数字茶城",
|
|
|
+ desc: "数字茶城",
|
|
|
+ },
|
|
|
+ openId: "",
|
|
|
+ authorizeWindow: true, //是否可以打开用户信息授权页面,避免重复打开
|
|
|
+ bindPhoneWindow: true, //是否可以打开绑定手机号码页面,避免重复打开
|
|
|
+ hasUpdate: false, // 小程序是否有更新版本 默认为没有
|
|
|
+ newVersionInfo: {
|
|
|
+ num: "1.0.0",
|
|
|
+ desc: "数字茶城上线啦!",
|
|
|
+ updateInfo: [], // 数组形式描述一下具体更新了什么内容
|
|
|
+ }, // 当前小程序最新版本信息
|
|
|
+ msgTmp: null, //订阅消息模板id信息
|
|
|
+ systemUserInfo: "",
|
|
|
+ },
|
|
|
+ errTips(msg, duration, open) {
|
|
|
+ uni.showToast({
|
|
|
+ title: msg,
|
|
|
+ icon: "none",
|
|
|
+ duration: duration ? duration : 1200,
|
|
|
+ mask: true,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 接口未传递有效参数值的错误提示
|
|
|
+ parameter(authName) {
|
|
|
+ throw new Error("'" + authName + "' cat't be empty!");
|
|
|
+ },
|
|
|
+ onLaunch() {
|
|
|
+ var logs = uni.getStorageSync("logs") || [];
|
|
|
+ logs.unshift(Date.now());
|
|
|
+ uni.setStorageSync("logs", logs);
|
|
|
+ uni.setStorageSync("mallName", "数字茶城");
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ console.log("App Show");
|
|
|
+ },
|
|
|
+ onHide() {
|
|
|
+ console.log("App Hide");
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style>
|
|
|
- /*每个页面公共css */
|
|
|
- @import "./app.scss";
|
|
|
+/*每个页面公共css */
|
|
|
+@import "./app.scss";
|
|
|
</style>
|