You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.2 KiB
63 lines
1.2 KiB
import { wxRequestPost } from "@utils/promise-wx-api";
|
|
|
|
const app = getApp();
|
|
|
|
Page({
|
|
data: {
|
|
isOpenedNovice: false,
|
|
},
|
|
|
|
onLoad() {
|
|
wx.setNavigationBarColor({
|
|
frontColor: "#ffffff",
|
|
backgroundColor: "#ff8b73",
|
|
animation: {
|
|
duration: 30,
|
|
timingFunc: "linear",
|
|
},
|
|
});
|
|
|
|
// this.getConf();
|
|
},
|
|
|
|
// 是否开通了新手体验区
|
|
async getConf() {
|
|
const {
|
|
msg,
|
|
data: { data },
|
|
} = await wxRequestPost(
|
|
"epmet/greenhand/isopennovice",
|
|
{},
|
|
{
|
|
hasToken: false,
|
|
isQuiet: true,
|
|
}
|
|
);
|
|
|
|
if (msg != "success" || data.code !== 0) {
|
|
this.setData({
|
|
isOpenedNovice: data.data.isOpenNovice,
|
|
});
|
|
}
|
|
},
|
|
|
|
async getLocalGrids() {
|
|
app.setAccountInfo({ isNoviceEnv: false, isPhoneAccount: false });
|
|
|
|
wx.showLoading({ title: "请求中" });
|
|
await app.loginGetToken();
|
|
wx.hideLoading();
|
|
|
|
wx.navigateTo({
|
|
url: "chooseGrid/chooseGrid",
|
|
});
|
|
},
|
|
|
|
async toNovice() {
|
|
app.setAccountInfo({ isNoviceEnv: true });
|
|
|
|
wx.navigateTo({
|
|
url: "novice/index",
|
|
});
|
|
},
|
|
});
|
|
|