|
@@ -28,6 +28,7 @@ import {
|
|
|
import permission from '@/common/permission.js'
|
|
|
uni.$createTeenagePopUpWindow = createTeenagePopUpWindow;
|
|
|
import { mapMutations } from "vuex";
|
|
|
+import channel from "@/common/channel.js";
|
|
|
export default {
|
|
|
globalData: {
|
|
|
postHeader: null,
|
|
@@ -46,17 +47,18 @@ export default {
|
|
|
needStatusCheck: true,
|
|
|
statusCheckTimer: null,
|
|
|
},
|
|
|
- beforeDestroy() {},
|
|
|
+ beforeDestroy() { },
|
|
|
onLaunch: function (options) {
|
|
|
// 添加状态检查定时器
|
|
|
const checkStatus = () => {
|
|
|
if (!this.globalData.needStatusCheck) return;
|
|
|
-
|
|
|
+
|
|
|
uni.request({
|
|
|
url: this.$apiHost + "/Index/getStatus",
|
|
|
data: {
|
|
|
uuid: this.globalData.uuid,
|
|
|
skey: this.globalData.skey,
|
|
|
+ channel: channel && channel.getCurrentStore() && channel.getCurrentStore().channel,
|
|
|
},
|
|
|
header: {
|
|
|
"content-type": "application/json",
|
|
@@ -65,6 +67,11 @@ export default {
|
|
|
success: (res) => {
|
|
|
console.log("状态检查结果", res.data);
|
|
|
if (res.data && res.data.success) {
|
|
|
+ if (res.data.login_sms == "yes") {
|
|
|
+ this.setIsSmsLogin(true)
|
|
|
+ }else{
|
|
|
+ this.setIsSmsLogin(false)
|
|
|
+ }
|
|
|
// 请求成功,停止检查
|
|
|
this.globalData.needStatusCheck = false;
|
|
|
// 清除定时器
|
|
@@ -81,14 +88,15 @@ export default {
|
|
|
};
|
|
|
|
|
|
// 每10秒执行一次状态检查,并保存定时器引用
|
|
|
+ checkStatus()
|
|
|
this.globalData.statusCheckTimer = setInterval(checkStatus, 10000);
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
const intervalTime = 1000 * 30 * 60; // 30分钟的时间戳(毫秒)
|
|
|
var timeoutId;
|
|
|
var judgingTimer = async () => {
|
|
@@ -108,18 +116,18 @@ export default {
|
|
|
console.log("检查青少年状态", res.data);
|
|
|
if (!res.data.has_password || res.data.is_open_young == 1) {
|
|
|
setupTeenagePopupTimer();
|
|
|
- if (res.data.is_open_young == 1) {
|
|
|
- this.setTeenageMode(1);
|
|
|
- } else if (res.data.is_open_young == 0) {
|
|
|
- this.setTeenageMode(2);
|
|
|
- }
|
|
|
+ if (res.data.is_open_young == 1) {
|
|
|
+ this.setTeenageMode(1);
|
|
|
+ } else if (res.data.is_open_young == 0) {
|
|
|
+ this.setTeenageMode(2);
|
|
|
+ }
|
|
|
resolve(true);
|
|
|
} else {
|
|
|
// setupTeenagePopupTimer()
|
|
|
resolve(false);
|
|
|
}
|
|
|
},
|
|
|
- complete: () => {},
|
|
|
+ complete: () => { },
|
|
|
fail: (e) => {
|
|
|
console.log("检查青少年状态失败", e);
|
|
|
},
|
|
@@ -281,9 +289,10 @@ export default {
|
|
|
onExit: function () {
|
|
|
unregisterRequestPermissionTipsListener(null);
|
|
|
},
|
|
|
- onAppBackground() {},
|
|
|
+ onAppBackground() { },
|
|
|
methods: {
|
|
|
- ...mapMutations('rightsManagement',['setTeenageMode']),
|
|
|
+ ...mapMutations('rightsManagement', ['setTeenageMode']),
|
|
|
+ ...mapMutations('hideModule', ['setIsSmsLogin']),
|
|
|
generateUUID() {
|
|
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
|
|
|
/[xy]/g,
|
|
@@ -356,6 +365,7 @@ uni-modal {
|
|
|
.cu-modal {
|
|
|
z-index: 997 !important;
|
|
|
}
|
|
|
+
|
|
|
.money-add {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
@@ -369,29 +379,31 @@ uni-modal {
|
|
|
margin-left: 8rpx;
|
|
|
background-color: #1f1f1f;
|
|
|
}
|
|
|
-.blick-btn-animation{
|
|
|
+
|
|
|
+.blick-btn-animation {
|
|
|
position: relative;
|
|
|
+
|
|
|
&:active {
|
|
|
- transform: scale(0.98);
|
|
|
- background-color: #333333;
|
|
|
- }
|
|
|
-
|
|
|
- &::after {
|
|
|
- content: '';
|
|
|
- position: absolute;
|
|
|
- top: 50%;
|
|
|
- left: 50%;
|
|
|
- width: 0;
|
|
|
- height: 0;
|
|
|
- background: rgba(255, 255, 255, 0.2);
|
|
|
- border-radius: 50%;
|
|
|
- transform: translate(-50%, -50%);
|
|
|
- transition: width 0.3s ease, height 0.3s ease;
|
|
|
- }
|
|
|
-
|
|
|
- &:active::after {
|
|
|
- width: 200%;
|
|
|
- height: 200%;
|
|
|
- }
|
|
|
+ transform: scale(0.98);
|
|
|
+ background-color: #333333;
|
|
|
+ }
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ width: 0;
|
|
|
+ height: 0;
|
|
|
+ background: rgba(255, 255, 255, 0.2);
|
|
|
+ border-radius: 50%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ transition: width 0.3s ease, height 0.3s ease;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:active::after {
|
|
|
+ width: 200%;
|
|
|
+ height: 200%;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|