Commit de646276 by zhanghaozhe

prettier

parent a9a679cd
...@@ -129,14 +129,16 @@ ...@@ -129,14 +129,16 @@
} }
}, },
"lint-staged": { "lint-staged": {
"*.js": "prettier --write" "*.(js|css)": "prettier --write"
}, },
"eslintConfig": { "eslintConfig": {
"extends": "react-app", "extends": "react-app",
"globals": { "globals": {
"API": "readonly", "API": "readonly",
"NoCaptcha": "readonly", "NoCaptcha": "readonly",
"WeixinJSBridge": "readonly" "WeixinJSBridge": "readonly",
"_czc": "readonly",
"wx": "readonly"
} }
}, },
"browserslist": { "browserslist": {
......
/* global nvcReset, getNC, _nvc_nc */
import React, { Component } from "react" import React, { Component } from "react"
import Routes from "./router" import Routes from "./router"
import cookie from "js-cookie" import cookie from "js-cookie"
......
/* global initNECaptcha */
import React, { Component } from "react" import React, { Component } from "react"
import { initCaptcha } from "src/utils" import { initCaptcha } from "src/utils"
import { BarLoader } from "react-spinners" import { BarLoader } from "react-spinners"
......
...@@ -19,7 +19,7 @@ class HeaderBar extends Component { ...@@ -19,7 +19,7 @@ class HeaderBar extends Component {
if (state.records && state.records.length > 1) { if (state.records && state.records.length > 1) {
window.history.go(-1) window.history.go(-1)
} else if (state.from && state.from.pathname) { } else if (state.from && state.from.pathname) {
location.replace(`${state.from.pathname}${state.from.search}`) window.location.replace(`${state.from.pathname}${state.from.search}`)
} else { } else {
window.location.href = window.location.origin window.location.href = window.location.origin
} }
...@@ -28,7 +28,7 @@ class HeaderBar extends Component { ...@@ -28,7 +28,7 @@ class HeaderBar extends Component {
toLink = () => { toLink = () => {
const { toHref } = this.props const { toHref } = this.props
// console.log(toHref); // console.log(toHref);
location.replace(toHref) window.location.replace(toHref)
} }
goShop = () => { goShop = () => {
......
...@@ -10,20 +10,20 @@ class BindPhone extends Component { ...@@ -10,20 +10,20 @@ class BindPhone extends Component {
captchaInstance = null captchaInstance = null
constructor(props) { constructor(props) {
super(props), super(props)
(this.state = { this.state = {
validate: "", validate: "",
seconds: 60, seconds: 60,
isFirst: true, isFirst: true,
timer: null, timer: null,
isTimer: false, // 是否开始倒计时 isTimer: false, // 是否开始倒计时
accountInfo: {}, accountInfo: {},
bindInfo: {}, bindInfo: {},
country: { country: {
num: "86", num: "86",
}, },
validationData: null, validationData: null,
}) }
} }
componentDidMount() { componentDidMount() {
......
...@@ -161,7 +161,7 @@ class Invitation extends Component { ...@@ -161,7 +161,7 @@ class Invitation extends Component {
title: "答题抽华为P40 Pro+", title: "答题抽华为P40 Pro+",
desc: desc:
"这道题你会吗?答题抽奖,100%有奖的,能不能拿华为P40 Pro+,看你自己了--七月在线", "这道题你会吗?答题抽奖,100%有奖的,能不能拿华为P40 Pro+,看你自己了--七月在线",
link: `${API.m}${location.pathname}?team_code=${ link: `${API.m}${window.location.pathname}?team_code=${
this.state.invitationInfo.team_code || getParam("team_code") this.state.invitationInfo.team_code || getParam("team_code")
}`, }`,
imgUrl: imgUrl:
......
/* global _czc */
import React, { Component } from "react" import React, { Component } from "react"
import { browser, getParam, http } from "src/utils" import { browser, getParam, http } from "src/utils"
import { Toast } from "antd-mobile" import { Toast } from "antd-mobile"
......
/* global _czc */
import React, { Component } from "react" import React, { Component } from "react"
import "./give-courses.scss" import "./give-courses.scss"
import { getParam, http } from "src/utils" import { getParam, http } from "src/utils"
...@@ -96,7 +97,7 @@ class GiveCourses extends Component { ...@@ -96,7 +97,7 @@ class GiveCourses extends Component {
} }
isRouter = (param) => { isRouter = (param) => {
if (decodeURIComponent(getParam("activename")) != param) { if (decodeURIComponent(getParam("activename")) !== param) {
this.props.history.push("/") this.props.history.push("/")
} }
} }
......
...@@ -236,7 +236,7 @@ class YearCourse extends Component { ...@@ -236,7 +236,7 @@ class YearCourse extends Component {
toQQque = () => { toQQque = () => {
if (!getParam("version")) { if (!getParam("version")) {
location.href = "http://q.url.cn/s/Vbkup6m?_type=wpa" window.location.href = "http://q.url.cn/s/Vbkup6m?_type=wpa"
} else { } else {
SendMessageToApp("toQQ", "https://q.url.cn/AB8aue?_type=wpa&qidian=true") SendMessageToApp("toQQ", "https://q.url.cn/AB8aue?_type=wpa&qidian=true")
} }
......
...@@ -13,13 +13,14 @@ import { connect } from "react-redux" ...@@ -13,13 +13,14 @@ import { connect } from "react-redux"
import { Toast } from "antd-mobile" import { Toast } from "antd-mobile"
import { compose } from "redux" import { compose } from "redux"
/*eslint-disable*/
@connect( @connect(
(state) => ({ (state) => ({
user: state.user, user: state.user,
}), }),
{ setCurrentUser, startFetchUser } { setCurrentUser, startFetchUser }
) )
export default class index extends Component { class index extends Component {
state = { state = {
removable: 0, // 未拆宝箱的数量 removable: 0, // 未拆宝箱的数量
currentOpenId: 0, // 当前要拆的宝箱的队伍的ID currentOpenId: 0, // 当前要拆的宝箱的队伍的ID
...@@ -245,3 +246,5 @@ export default class index extends Component { ...@@ -245,3 +246,5 @@ export default class index extends Component {
) )
} }
} }
export default index
...@@ -5,6 +5,7 @@ import CommonContainer from "./../common/commonContainer/index" ...@@ -5,6 +5,7 @@ import CommonContainer from "./../common/commonContainer/index"
import CourseItem from "../../../blessingPreheat/courseItem/index" import CourseItem from "../../../blessingPreheat/courseItem/index"
import { withRouter } from "react-router-dom" import { withRouter } from "react-router-dom"
import { connect } from "react-redux" import { connect } from "react-redux"
import { Toast } from "antd-mobile"
@connect(({ user }) => ({ @connect(({ user }) => ({
user, user,
......
...@@ -236,7 +236,7 @@ class YearCourse extends Component { ...@@ -236,7 +236,7 @@ class YearCourse extends Component {
toQQque = () => { toQQque = () => {
if (!getParam("version")) { if (!getParam("version")) {
location.href = "http://q.url.cn/s/Vbkup6m?_type=wpa" window.location.href = "http://q.url.cn/s/Vbkup6m?_type=wpa"
} else { } else {
SendMessageToApp("toQQ", "https://q.url.cn/AB8aue?_type=wpa&qidian=true") SendMessageToApp("toQQ", "https://q.url.cn/AB8aue?_type=wpa&qidian=true")
} }
......
...@@ -19,7 +19,7 @@ import { compose } from "redux" ...@@ -19,7 +19,7 @@ import { compose } from "redux"
}), }),
{ setCurrentUser, startFetchUser } { setCurrentUser, startFetchUser }
) )
export default class index extends Component { class index extends Component {
state = { state = {
removable: 0, // 未拆宝箱的数量 removable: 0, // 未拆宝箱的数量
currentOpenId: 0, // 当前要拆的宝箱的队伍的ID currentOpenId: 0, // 当前要拆的宝箱的队伍的ID
...@@ -239,3 +239,5 @@ export default class index extends Component { ...@@ -239,3 +239,5 @@ export default class index extends Component {
) )
} }
} }
export default index
...@@ -59,7 +59,7 @@ class Assist extends Component { ...@@ -59,7 +59,7 @@ class Assist extends Component {
if (user.hasError) { if (user.hasError) {
if (browser.isWeixin) { if (browser.isWeixin) {
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=${encodeURIComponent( window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=${encodeURIComponent(
`${window.location.origin}${location.pathname}?aa=bb` `${window.location.origin}${window.location.pathname}?aa=bb`
)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect` )}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
} else { } else {
history.push("/passport") history.push("/passport")
......
...@@ -99,7 +99,7 @@ class Exam extends Component { ...@@ -99,7 +99,7 @@ class Exam extends Component {
if (state.records && state.records.length > 1) { if (state.records && state.records.length > 1) {
window.history.go(-1) window.history.go(-1)
} else if (state.from && state.from.pathname) { } else if (state.from && state.from.pathname) {
location.replace(`${state.from.pathname}${state.from.search}`) window.location.replace(`${state.from.pathname}${state.from.search}`)
} else { } else {
window.location.href = window.location.origin window.location.href = window.location.origin
} }
......
...@@ -376,7 +376,7 @@ class BargainMiddlePage extends Component { ...@@ -376,7 +376,7 @@ class BargainMiddlePage extends Component {
wxShare({ wxShare({
title: `我发现一门好课,快来帮我砍价吧!`, title: `我发现一门好课,快来帮我砍价吧!`,
desc: `我已经砍了${this.state.bargainData.bargain_price}元,看看你能砍多少`, desc: `我已经砍了${this.state.bargainData.bargain_price}元,看看你能砍多少`,
link: encodeURI(location.href), link: encodeURI(window.location.href),
imgUrl: this.state.course.course_img, imgUrl: this.state.course.course_img,
}) })
} }
......
...@@ -295,7 +295,7 @@ class CourseList extends Component { ...@@ -295,7 +295,7 @@ class CourseList extends Component {
toQQque = () => { toQQque = () => {
if (!getParam("version")) { if (!getParam("version")) {
location.href = "https://q.url.cn/AB8aue?_type=wpa&qidian=true" window.location.href = "https://q.url.cn/AB8aue?_type=wpa&qidian=true"
} else { } else {
SendMessageToApp("toQQ", "https://q.url.cn/AB8aue?_type=wpa&qidian=true") SendMessageToApp("toQQ", "https://q.url.cn/AB8aue?_type=wpa&qidian=true")
} }
......
...@@ -185,7 +185,7 @@ class FormalDraw extends Component { ...@@ -185,7 +185,7 @@ class FormalDraw extends Component {
} else if (status == 2) { } else if (status == 2) {
this.subscribe(id) this.subscribe(id)
} else if (status == 4) { } else if (status == 4) {
location.href = `/prize-winner-list?tid=${id}` window.location.href = `/prize-winner-list?tid=${id}`
} }
} }
......
/* global _czc */
import React, { Component } from "react" import React, { Component } from "react"
import "./index.scss" import "./index.scss"
import { Tabs, Toast } from "antd-mobile" import { Tabs, Toast } from "antd-mobile"
......
...@@ -28,11 +28,11 @@ export default class RecordPopup extends Component { ...@@ -28,11 +28,11 @@ export default class RecordPopup extends Component {
e.preventDefault() e.preventDefault()
const { history } = this.props const { history } = this.props
if (!getParam("version")) { if (!getParam("version")) {
location.href = `${API.m}/levelTest/report?id=${id}` window.location.href = `${API.m}/levelTest/report?id=${id}`
} else { } else {
location.href = `${API.m}/levelTest/report?id=${id}&version=${getParam( window.location.href = `${
"version" API.m
)}` }/levelTest/report?id=${id}&version=${getParam("version")}`
} }
} }
......
...@@ -91,7 +91,7 @@ class ToAppDemo extends Component { ...@@ -91,7 +91,7 @@ class ToAppDemo extends Component {
title: "AI充电节,积福气享1折秒课,超10万元奖品来就送!!", title: "AI充电节,积福气享1折秒课,超10万元奖品来就送!!",
desc: desc:
"把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线", "把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线",
link: encodeURI(location.href), link: encodeURI(window.location.href),
imgUrl: imgUrl:
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png", "https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png",
}) })
......
...@@ -151,7 +151,7 @@ class UseCoupon extends PureComponent { ...@@ -151,7 +151,7 @@ class UseCoupon extends PureComponent {
const { data: select } = selectCoupons const { data: select } = selectCoupons
const { data: expansion } = expansionCoupons const { data: expansion } = expansionCoupons
let PzCoupon = Array.isArray(expansion.data) ? expansion.data : [] let PzCoupon = Array.isArray(expansion.data) ? expansion.data : []
if (expansion.code == 200) { if (expansion.code === 200) {
Array.isArray(expansion.data) && Array.isArray(expansion.data) &&
(expansion.data = expansion.data.map( (expansion.data = expansion.data.map(
(item) => ((item.ctype = 4), item) (item) => ((item.ctype = 4), item)
...@@ -173,7 +173,7 @@ class UseCoupon extends PureComponent { ...@@ -173,7 +173,7 @@ class UseCoupon extends PureComponent {
selectedCouponId: inuse_coupon.length ? inuse_coupon[0].id : 0, selectedCouponId: inuse_coupon.length ? inuse_coupon[0].id : 0,
}) })
} else { } else {
Toast.info(data.msg) Toast.info(select.msg)
} }
}) })
} }
...@@ -244,7 +244,7 @@ class UseCoupon extends PureComponent { ...@@ -244,7 +244,7 @@ class UseCoupon extends PureComponent {
} }
} else { } else {
Toast.info("未知错误") Toast.info("未知错误")
location.reload() window.location.reload()
} }
} }
......
...@@ -34,7 +34,7 @@ class ToGroup extends Component { ...@@ -34,7 +34,7 @@ class ToGroup extends Component {
wxShare({ wxShare({
title: `【仅剩${number}个名额】我${pdd_price}元拼了《${data.course_title}》`, title: `【仅剩${number}个名额】我${pdd_price}元拼了《${data.course_title}》`,
desc: data.course_title, desc: data.course_title,
link: location.href + "&is_originator=1", link: window.location.href + "&is_originator=1",
imgUrl: data.image_name, imgUrl: data.image_name,
}) })
} else { } else {
......
...@@ -503,7 +503,9 @@ class Detail extends Component { ...@@ -503,7 +503,9 @@ class Detail extends Component {
wxShare({ wxShare({
title: course_info.course_title, title: course_info.course_title,
desc: course_info.index_description, desc: course_info.index_description,
link: encodeURI(location.origin + "/detail?id=" + getParam("id")), link: encodeURI(
window.location.origin + "/detail?id=" + getParam("id")
),
imgUrl: course_info.image_name, imgUrl: course_info.image_name,
}) })
} }
......
...@@ -14,39 +14,39 @@ import { Link } from "react-router-dom" ...@@ -14,39 +14,39 @@ import { Link } from "react-router-dom"
class RedPacket extends PureComponent { class RedPacket extends PureComponent {
constructor(props) { constructor(props) {
super(props), super(props)
(this.state = { this.state = {
// 弹窗类型:0: 无弹出,1:非微信,2:微信 // 弹窗类型:0: 无弹出,1:非微信,2:微信
type: 0, type: 0,
isCopy: false, isCopy: false,
validate: "", validate: "",
captchaInstance: null, captchaInstance: null,
seconds: 60, seconds: 60,
isFirst: true, isFirst: true,
timer: null, timer: null,
isTimer: false, // 是否开始倒计时 isTimer: false, // 是否开始倒计时
shareInfo: { shareInfo: {
url: "", url: "",
share_code: "", share_code: "",
command: "【七月在线送你一个红包】https://www.julyedu.com/", command: "【七月在线送你一个红包】https://www.julyedu.com/",
}, },
doneInfo: { doneInfo: {
//领取后的状态,1:领取成功,2:领取超时 //领取后的状态,1:领取成功,2:领取超时
status: 2, status: 2,
txt: "手机号绑定超时,红包已失效!", txt: "手机号绑定超时,红包已失效!",
desc: "", desc: "",
}, },
money: "", // 红包金额, money: "", // 红包金额,
endTime: 10, // 手机绑定时限 endTime: 10, // 手机绑定时限
countdownTimer: null, countdownTimer: null,
countdown: "00分00秒", // 绑定时间 countdown: "00分00秒", // 绑定时间
accountInfo: {}, accountInfo: {},
bindInfo: {}, bindInfo: {},
country: { country: {
num: "86", num: "86",
}, },
validationData: null, validationData: null,
}) }
} }
componentDidMount() { componentDidMount() {
......
...@@ -121,7 +121,7 @@ class IntelligentRecommend extends Component { ...@@ -121,7 +121,7 @@ class IntelligentRecommend extends Component {
if (state.records && state.records.length > 1) { if (state.records && state.records.length > 1) {
window.history.go(-1) window.history.go(-1)
} else if (state.from && state.from.pathname) { } else if (state.from && state.from.pathname) {
location.replace(`${state.from.pathname}${state.from.search}`) window.location.replace(`${state.from.pathname}${state.from.search}`)
} else { } else {
window.location.href = window.location.origin window.location.href = window.location.origin
} }
......
...@@ -90,7 +90,7 @@ class ML extends Component { ...@@ -90,7 +90,7 @@ class ML extends Component {
if (res.data.errno === 401) { if (res.data.errno === 401) {
clearInterval(_this.intervalPayStatus) clearInterval(_this.intervalPayStatus)
_this.intervalPayStatus = null _this.intervalPayStatus = null
location.href = "/ml?id=" + getParam("id") window.location.href = "/ml?id=" + getParam("id")
} }
}) })
}, 1000) }, 1000)
...@@ -130,7 +130,7 @@ class ML extends Component { ...@@ -130,7 +130,7 @@ class ML extends Component {
if (res.data.errno === 401) { if (res.data.errno === 401) {
clearInterval(_this.intervalPayStatus) clearInterval(_this.intervalPayStatus)
_this.intervalPayStatus = null _this.intervalPayStatus = null
location.href = "/ml?id=" + getParam("id") window.location.href = "/ml?id=" + getParam("id")
} }
}) })
}, 1000) }, 1000)
......
...@@ -80,7 +80,10 @@ class PythonDes extends Component { ...@@ -80,7 +80,10 @@ class PythonDes extends Component {
// 微信内部-支付 // 微信内部-支付
if (browser.isWeixin) { if (browser.isWeixin) {
let url = let url =
window.location.origin + location.pathname + "?id=" + getParam("id") window.location.origin +
window.location.pathname +
"?id=" +
getParam("id")
window.location.href = window.location.href =
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=" + "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=" +
encodeURIComponent(url + "&aa=bb&oid=" + orderId).toLowerCase() + encodeURIComponent(url + "&aa=bb&oid=" + orderId).toLowerCase() +
......
...@@ -112,7 +112,10 @@ class PythonStudy extends Component { ...@@ -112,7 +112,10 @@ class PythonStudy extends Component {
// 微信内部-支付 // 微信内部-支付
if (browser.isWeixin) { if (browser.isWeixin) {
let url = let url =
window.location.origin + location.pathname + "?id=" + getParam("id") window.location.origin +
window.location.pathname +
"?id=" +
getParam("id")
window.location.href = window.location.href =
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=" + "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=" +
encodeURIComponent(url + "&aa=bb&oid=" + orderId).toLowerCase() + encodeURIComponent(url + "&aa=bb&oid=" + orderId).toLowerCase() +
......
...@@ -100,7 +100,7 @@ class MLClass extends Component { ...@@ -100,7 +100,7 @@ class MLClass extends Component {
? `我已在【${params.course_name}】上运行了行代码了${params.code_lines}` ? `我已在【${params.course_name}】上运行了行代码了${params.code_lines}`
: `我在${params.course_name}${this.formatTitle(params)}遇到了困难`, : `我在${params.course_name}${this.formatTitle(params)}遇到了困难`,
desc: this.formatTitle(params), desc: this.formatTitle(params),
link: encodeURI(location.href), link: encodeURI(window.location.href),
imgUrl: params.course_img, imgUrl: params.course_img,
}) })
} }
......
...@@ -66,7 +66,7 @@ class MyOrders extends Component { ...@@ -66,7 +66,7 @@ class MyOrders extends Component {
} }
http.post(`${API.home}/m/cancel_order`, data).then((res) => { http.post(`${API.home}/m/cancel_order`, data).then((res) => {
if (res.data.code === 200) { if (res.data.code === 200) {
location.reload() window.location.reload()
} else { } else {
Toast.info(res.data.msg, 2) Toast.info(res.data.msg, 2)
} }
......
...@@ -178,7 +178,7 @@ const formikConfig = { ...@@ -178,7 +178,7 @@ const formikConfig = {
localStorage.removeItem("binding_redirect") localStorage.removeItem("binding_redirect")
history.replace(JSON.parse(redirect)) history.replace(JSON.parse(redirect))
} else { } else {
location.assign(data.data["jump_url"]) window.location.assign(data.data["jump_url"])
} }
} }
} else { } else {
......
...@@ -68,7 +68,7 @@ class Problems extends Component { ...@@ -68,7 +68,7 @@ class Problems extends Component {
goBack = () => { goBack = () => {
if (document.referrer.includes(API.www)) { if (document.referrer.includes(API.www)) {
history.go(-1) window.history.go(-1)
} else { } else {
const { state, hash } = this.props.location const { state, hash } = this.props.location
if (hash.includes("goback")) { if (hash.includes("goback")) {
...@@ -80,7 +80,7 @@ class Problems extends Component { ...@@ -80,7 +80,7 @@ class Problems extends Component {
if (state.records && state.records.length > 1) { if (state.records && state.records.length > 1) {
window.history.go(-1) window.history.go(-1)
} else if (state.from && state.from.pathname) { } else if (state.from && state.from.pathname) {
location.replace(`${state.from.pathname}${state.from.search}`) window.location.replace(`${state.from.pathname}${state.from.search}`)
} else { } else {
window.location.href = window.location.origin window.location.href = window.location.origin
} }
......
...@@ -101,7 +101,7 @@ class PythonClass extends Component { ...@@ -101,7 +101,7 @@ class PythonClass extends Component {
? `我已在【${params.course_name}】上运行了行代码了${params.code_lines}` ? `我已在【${params.course_name}】上运行了行代码了${params.code_lines}`
: `我在${params.course_name}${this.formatTitle(params)}遇到了困难`, : `我在${params.course_name}${this.formatTitle(params)}遇到了困难`,
desc: this.formatTitle(params), desc: this.formatTitle(params),
link: encodeURI(location.href), link: encodeURI(window.location.href),
imgUrl: params.course_img, imgUrl: params.course_img,
}) })
} }
......
...@@ -57,7 +57,7 @@ class AistShare extends PureComponent { ...@@ -57,7 +57,7 @@ class AistShare extends PureComponent {
title: data.share_title, title: data.share_title,
desc: data.share_desc, desc: data.share_desc,
imgUrl: data.image_name, imgUrl: data.image_name,
link: location.href, link: window.location.href,
}) })
} }
}) })
......
...@@ -430,7 +430,7 @@ class Video extends Component { ...@@ -430,7 +430,7 @@ class Video extends Component {
let reconnect = setTimeout(function () { let reconnect = setTimeout(function () {
clearTimeout(reconnect) clearTimeout(reconnect)
reconnect = null reconnect = null
_this.ws = new WebSocket(PROCESS_URL) _this.ws = new WebSocket(API["process-api"])
}, 500) }, 500)
} }
} }
......
...@@ -10,6 +10,7 @@ const PrivateRoute = ({ component: Component, path, user, ...rest }) => { ...@@ -10,6 +10,7 @@ const PrivateRoute = ({ component: Component, path, user, ...rest }) => {
useEffect(() => { useEffect(() => {
let _auth = !user.hasError && user.code != 4040 let _auth = !user.hasError && user.code != 4040
// eslint-disable-next-line no-unused-expressions
typeof _auth !== "undefined" && typeof _auth !== "undefined" &&
(setAuthorization(_auth), setLoadingState(false)) (setAuthorization(_auth), setLoadingState(false))
}, [user.hasError]) }, [user.hasError])
......
/* global AndroidWebViewBridge */
export default function SendMessageToApp() { export default function SendMessageToApp() {
let messageName = "nullName" let messageName = "nullName"
let params = "" let params = ""
......
/* global wx */
import { http, browser } from "src/utils" import { http, browser } from "src/utils"
// const url = `https://res.wx.qq.com/open/js/jweixin-1.4.0.js` // const url = `https://res.wx.qq.com/open/js/jweixin-1.4.0.js`
......
/* global wx */
import { getWXObject, getSignature } from "./base" import { getWXObject, getSignature } from "./base"
const shareApiList = [ const shareApiList = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment