|
@@ -117,18 +117,9 @@ export async function getCheckLogin() {
|
|
|
// #ifdef H5
|
|
// #ifdef H5
|
|
|
if (isWxBrowser()) {
|
|
if (isWxBrowser()) {
|
|
|
let option = JSON.parse(uni.getStorageSync("currentQuery")) || {};
|
|
let option = JSON.parse(uni.getStorageSync("currentQuery")) || {};
|
|
|
- console.log("option", option);
|
|
|
|
|
- // console.log('option', getMiniAppUrl(option, true))
|
|
|
|
|
- // return false
|
|
|
|
|
location.href = `${CONSTANT.hostUrl}/auth/prepare?url=${encodeURIComponent(
|
|
location.href = `${CONSTANT.hostUrl}/auth/prepare?url=${encodeURIComponent(
|
|
|
getMiniAppUrl(option, true)
|
|
getMiniAppUrl(option, true)
|
|
|
)}`;
|
|
)}`;
|
|
|
- } else {
|
|
|
|
|
- // uni.showToast({
|
|
|
|
|
- // title: '请用微信浏览器打开!',
|
|
|
|
|
- // icon: 'none',
|
|
|
|
|
- // mask: true
|
|
|
|
|
- // })
|
|
|
|
|
}
|
|
}
|
|
|
// #endif
|
|
// #endif
|
|
|
// #ifndef H5
|
|
// #ifndef H5
|
|
@@ -235,7 +226,6 @@ export const $formatDate = (num, fmt = "YYYY-MM-DD HH:mm", all) => {
|
|
|
* @parmas item.type 为跳转调用的函数 1为navigateTo, 2为redirectTo 关闭当前页面,跳转到应用内的某个页面 3为reLaunch 关闭所有页面,打开到应用内的某个页面 4为switchTab
|
|
* @parmas item.type 为跳转调用的函数 1为navigateTo, 2为redirectTo 关闭当前页面,跳转到应用内的某个页面 3为reLaunch 关闭所有页面,打开到应用内的某个页面 4为switchTab
|
|
|
*/
|
|
*/
|
|
|
export const pageTo = item => {
|
|
export const pageTo = item => {
|
|
|
- console.log(item,'itemitem')
|
|
|
|
|
if (isNumber(item)) {
|
|
if (isNumber(item)) {
|
|
|
uni.navigateBack({
|
|
uni.navigateBack({
|
|
|
delta: item
|
|
delta: item
|
|
@@ -262,7 +252,6 @@ export const pageTo = item => {
|
|
|
url: allUrl
|
|
url: allUrl
|
|
|
});
|
|
});
|
|
|
} else if (item.type == 4) {
|
|
} else if (item.type == 4) {
|
|
|
- console.log("switchTab", item.query);
|
|
|
|
|
uni.setStorageSync("switchTabQuery", item.query);
|
|
uni.setStorageSync("switchTabQuery", item.query);
|
|
|
uni.switchTab({
|
|
uni.switchTab({
|
|
|
url: item.url
|
|
url: item.url
|
|
@@ -301,6 +290,7 @@ export const noStockRemind = () =>{
|
|
|
const innerAudioContext = uni.createInnerAudioContext()
|
|
const innerAudioContext = uni.createInnerAudioContext()
|
|
|
innerAudioContext.autoplay = false
|
|
innerAudioContext.autoplay = false
|
|
|
innerAudioContext.src = "/static/noStock.mp3"
|
|
innerAudioContext.src = "/static/noStock.mp3"
|
|
|
|
|
+ innerAudioContext.volume = 1
|
|
|
innerAudioContext.onPlay()
|
|
innerAudioContext.onPlay()
|
|
|
innerAudioContext.onError()
|
|
innerAudioContext.onError()
|
|
|
innerAudioContext.onPause(function() {
|
|
innerAudioContext.onPause(function() {
|