Browse Source

登录 答题 个人中心 接口联调

master
kola-web 3 months ago
parent
commit
df87206df6
  1. 1
      src/app.json
  2. 36
      src/app.ts
  3. 6
      src/components/global-toast/index.ts
  4. 4
      src/components/global-toast/index.wxml
  5. 8
      src/pages/home/index.ts
  6. 42
      src/pages/login/index.ts
  7. 8
      src/pages/login/index.wxml
  8. 35
      src/pages/my/index.ts
  9. 30
      src/pages/my/index.wxml
  10. 4
      src/pages/protocol/index.wxml
  11. 6
      src/pages/switchLogin/index.json
  12. 161
      src/pages/switchLogin/index.scss
  13. 95
      src/pages/switchLogin/index.ts
  14. 35
      src/pages/switchLogin/index.wxml
  15. 37
      src/pages/topic/index.scss
  16. 79
      src/pages/topic/index.ts
  17. 61
      src/pages/topic/index.wxml
  18. 8
      typings/index.d.ts

1
src/app.json

@ -3,6 +3,7 @@
"pages": [ "pages": [
"pages/home/index", "pages/home/index",
"pages/login/index", "pages/login/index",
"pages/switchLogin/index",
"pages/my/index", "pages/my/index",
"pages/topic/index", "pages/topic/index",
"pages/collection/index", "pages/collection/index",

36
src/app.ts

@ -30,12 +30,9 @@ App<IAppOption>({
loginState: '', loginState: '',
isLogin: 0, isLogin: 0,
doctorId: null, isAnswer: '0',
scene: null, scene: null,
needDeal: '',
caseNav: '0',
}, },
onLaunch() { onLaunch() {
Page = page as WechatMiniprogram.Page.Constructor; Page = page as WechatMiniprogram.Page.Constructor;
@ -68,26 +65,19 @@ App<IAppOption>({
this.globalData.scene = parseScene(options.query.scene); this.globalData.scene = parseScene(options.query.scene);
} }
}, },
waitLogin(waitLoginState = false) { waitLogin(waitLoginState = false, requireLogin = false) {
let time: number; let time: number;
return new Promise((resolve, reject) => { const { isLogin } = this.globalData;
return new Promise((resolve) => {
time = setInterval(() => { time = setInterval(() => {
if (this.globalData.loginState) { if (this.globalData.loginState) {
clearInterval(time); clearInterval(time);
if (waitLoginState) { if (waitLoginState) {
resolve(true); resolve(true);
} else if (this.globalData.isLogin === 0) { } else if (isLogin === 0) {
wx.reLaunch({ url: '/module1/pages/login/index' }); wx.reLaunch({ url: '/pages/login/index' });
} else if (this.globalData.doctorId === null) { } else if (requireLogin && isLogin === 999) {
this.getApplyDoctor().then((applyDoctorInfo) => { wx.reLaunch({ url: '/pages/login/index' });
if (applyDoctorInfo.AuditStatus === 0) {
wx.reLaunch({ url: '/module1/pages/setInfoResult/index' });
reject(new Error('还在审核中'));
} else {
wx.reLaunch({ url: '/module1/pages/setInfo/index' });
reject(new Error('还不是医生'));
}
});
} else { } else {
resolve(true); resolve(true);
} }
@ -95,21 +85,17 @@ App<IAppOption>({
}, 500); }, 500);
}); });
}, },
getApplyDoctor() {
return wx.ajax({
method: 'GET',
url: '?r=takeda/reg/get-apply-doctor',
});
},
getUserInfo(self: WechatMiniprogram.Page.Instance<any, any>, callback?: (res: any) => void) { getUserInfo(self: WechatMiniprogram.Page.Instance<any, any>, callback?: (res: any) => void) {
wx.ajax({ wx.ajax({
method: 'GET', method: 'GET',
url: '?r=shizhong/account/info', url: '?r=shizhong/account/get-info',
data: {}, data: {},
}).then((res) => { }).then((res) => {
if (self) {
self.setData({ self.setData({
userInfo: res, userInfo: res,
}); });
}
callback?.(res); callback?.(res);
}); });
}, },

6
src/components/global-toast/index.ts

@ -14,6 +14,10 @@ Component({
type: Number, type: Number,
value: 0, value: 0,
}, },
params: {
type: Object,
value: {},
},
}, },
/** /**
@ -26,7 +30,7 @@ Component({
*/ */
methods: { methods: {
handleClose() { handleClose() {
this.triggerEvent("close"); this.triggerEvent('close');
}, },
}, },
}); });

4
src/components/global-toast/index.wxml

@ -1,7 +1,7 @@
<van-popup show="{{ show }}" wx:if="{{type===1}}" custom-style="background: transparent;" bind:close="handleClose"> <van-popup show="{{ show }}" wx:if="{{type===1}}" custom-style="background: transparent;" bind:close="handleClose">
<view class="popup1" style="background: url('/images/popup1-bg.png') no-repeat top center/100%;"> <view class="popup1" style="background: url('/images/popup1-bg.png') no-repeat top center/100%">
<view class="title">关注适中健康微信公众号</view> <view class="title">关注适中健康微信公众号</view>
<image class="code" src="/images/place.png" show-menu-by-longpress></image> <image class="code" :src="{{params.mpPicture}}" show-menu-by-longpress></image>
<view class="tip">长按识别二维码关注</view> <view class="tip">长按识别二维码关注</view>
</view> </view>
</van-popup> </van-popup>

8
src/pages/home/index.ts

@ -1,11 +1,13 @@
const _app = getApp<IAppOption>(); const app = getApp<IAppOption>();
Page({ Page({
data: {}, data: {},
onLoad() {}, onLoad() {
app.waitLogin().then(() => {});
},
handleDetail() { handleDetail() {
wx.navigateTo({ wx.navigateTo({
url: "/pages/classify/index", url: '/pages/classify/index',
}); });
}, },
}); });

42
src/pages/login/index.ts

@ -87,13 +87,12 @@ Page({
mobile, mobile,
code, code,
}, },
}).then((res) => { }).then(() => {
this.submitCallback(res); this.submitCallback();
}); });
}, },
handleWxSubmit(e: any) { handleWxSubmit(e: any) {
const { protool } = this.data; const { protool } = this.data;
const { iv, encryptedData } = e.detail;
if (!protool) { if (!protool) {
wx.showToast({ wx.showToast({
icon: 'none', icon: 'none',
@ -101,6 +100,7 @@ Page({
}); });
return; return;
} }
const { iv, encryptedData } = e.detail;
if (iv && encryptedData) { if (iv && encryptedData) {
wx.ajax({ wx.ajax({
method: 'POST', method: 'POST',
@ -109,18 +109,22 @@ Page({
iv: encodeURIComponent(iv), iv: encodeURIComponent(iv),
encryptedData: encodeURIComponent(encryptedData), encryptedData: encodeURIComponent(encryptedData),
}, },
}).then((res) => { }).then(() => {
this.submitCallback(res); this.submitCallback();
}); });
} }
}, },
submitCallback(res) { submitCallback() {
app.globalData.isLogin = 1; app.globalData.isLogin = 1;
app.globalData.doctorId = res.doctorId; app.getUserInfo(null, (res) => {
app.waitLogin().then(() => { app.globalData.isAnswer = res.isAnswer;
wx.reLaunch({ if (res.isAnswer === '0') {
url: '/pages/home/index', this.setData({
show: true,
}); });
} else {
wx.reLaunch({ url: '/pages/home/index' });
}
}); });
}, },
handleProtool() { handleProtool() {
@ -131,11 +135,21 @@ Page({
handleNavProtool() { handleNavProtool() {
wx.navigateTo({ url: `/pages/protocol/index` }); wx.navigateTo({ url: `/pages/protocol/index` });
}, },
handleTopic() {
handleTopic() {}, wx.reLaunch({
url: '/pages/topic/index',
});
},
handleCancelTopic() { handleCancelTopic() {
this.setData({ app.globalData.isAnswer = '1';
show: false, wx.reLaunch({
url: '/pages/home/index',
});
},
handleVisitor() {
app.globalData.isLogin = 999;
wx.reLaunch({
url: '/pages/home/index',
}); });
}, },
}); });

8
src/pages/login/index.wxml

@ -29,11 +29,15 @@
<text class="link" bind:tap="handleNavProtool">《用户隐私协议》</text> <text class="link" bind:tap="handleNavProtool">《用户隐私协议》</text>
</view> </view>
<view class="submit" bind:tap="handleSubmit">登录</view> <view class="submit" bind:tap="handleSubmit">登录</view>
<button class="tel-btn" open-type="getPhoneNumber" bindgetphonenumber="handleWxSubmit"> <button wx:if="{{protool}}" class="tel-btn" open-type="getPhoneNumber" bindgetphonenumber="handleWxSubmit">
<image class="icon" src="/images/icon-phone.png"></image> <image class="icon" src="/images/icon-phone.png"></image>
手机号快捷登录 手机号快捷登录
</button> </button>
<view class="visitor"> <button wx:else class="tel-btn" bind:tap="handleWxSubmit">
<image class="icon" src="/images/icon-phone.png"></image>
手机号快捷登录
</button>
<view class="visitor" bind:tap="handleVisitor">
游客访问 游客访问
<van-icon name="arrow" /> <van-icon name="arrow" />
</view> </view>

35
src/pages/my/index.ts

@ -1,14 +1,43 @@
const _app = getApp<IAppOption>(); const app = getApp<IAppOption>();
Page({ Page({
data: { data: {
toastShow: false, toastShow: false,
toastType: 1, toastType: 1,
userInfo: {},
},
onLoad() {
app.waitLogin(true).then(() => {
app.getUserInfo(this);
});
}, },
onLoad() {},
handleCollection() { handleCollection() {
wx.navigateTo({ wx.navigateTo({
url: "/pages/collection/index", url: '/pages/collection/index',
});
},
handleLogin() {
wx.navigateTo({
url: '/pages/login/index',
});
},
handleLoginOut() {
wx.showModal({
title: '是否确认退出登录?',
success: (res) => {
if (res.confirm) {
wx.ajax({
method: 'POST',
url: '?r=shizhong/account/logout',
data: {},
}).then(() => {
app.globalData.isLogin = 0;
app.globalData.isAnswer = '0';
app.waitLogin();
});
}
},
}); });
}, },
handleOffice() { handleOffice() {

30
src/pages/my/index.wxml

@ -1,20 +1,21 @@
<view class="page" style="padding-top:{{ menuButtonInfo.bottom }}px;"> <view class="page" style="padding-top:{{ menuButtonInfo.bottom }}px;">
<view class="no-login"> <view class="login" wx:if="{{userInfo.isLogin===1}}">
<image class="avatar" src="/images/user.png"></image> <image wx:if="{{userInfo.avatar}}" class="avatar" mode="aspectFill" src="{{userInfo.avatar}}"></image>
<view class="name">登录</view> <image wx:else class="avatar" mode="aspectFill" src="/images/user.png"></image>
</view>
<view class="login">
<image class="avatar" mode="aspectFill" src="/images/place.png"></image>
<view class="user"> <view class="user">
<view class="name">徐萌</view> <view class="name">{{userInfo.username}}</view>
<view class="tel">186****7587</view> <view class="tel">{{userInfo.telephone}}</view>
<view class="status">非会员</view> <view class="status">{{userInfo.isMember===1?'会员':'非会员'}}</view>
</view> </view>
<view class="switch"> <view class="switch" bind:tap="handleLoginOut">
切换账号 退出登录
<van-icon name="arrow" /> <van-icon name="arrow" />
</view> </view>
</view> </view>
<view class="no-login" wx:else>
<image class="avatar" src="/images/user.png"></image>
<view class="name" bind:tap="handleLogin">登录</view>
</view>
<view class="nav-list"> <view class="nav-list">
<view class="nav-item" bind:tap="handleCollection"> <view class="nav-item" bind:tap="handleCollection">
<image class="icon" src="/images/my-list-icon1.png"></image> <image class="icon" src="/images/my-list-icon1.png"></image>
@ -27,4 +28,9 @@
</view> </view>
</view> </view>
<global-toast show="{{toastShow}}" type="{{toastType}}" bind:close="handleToastClose"></global-toast> <global-toast
show="{{toastShow}}"
type="{{toastType}}"
params="{{userInfo}}"
bind:close="handleToastClose"
></global-toast>

4
src/pages/protocol/index.wxml

@ -1 +1,3 @@
<view class="page"></view> <view class="page">
产品还没给
</view>

6
src/pages/switchLogin/index.json

@ -0,0 +1,6 @@
{
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"van-nav-bar": "@vant/weapp/nav-bar/index"
}
}

161
src/pages/switchLogin/index.scss

@ -0,0 +1,161 @@
.page {
.container {
margin-top: 336rpx;
padding: 64rpx 32rpx 0;
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.76) 0%, #ffffff 100%) no-repeat top center/100% 186rpx;
border-radius: 32rpx;
.tel {
.input {
padding: 24rpx 48rpx;
background-color: #f4f7fa;
border-radius: 96rpx;
font-size: 32rpx;
}
.place-input {
color: #babdc1;
}
}
.code-row {
margin-top: 32rpx;
display: flex;
align-items: center;
gap: 30rpx;
.code {
flex: 1;
padding: 24rpx 48rpx;
background-color: #f4f7fa;
border-radius: 96rpx;
font-size: 32rpx;
}
.place-code {
color: #babdc1;
}
.btn {
flex-shrink: 0;
padding: 24rpx;
width: 7em;
text-align: center;
color: #fff;
font-size: 32rpx;
background-color: #3795f7;
border-radius: 96rpx;
}
}
.protool {
margin-top: 56rpx;
display: flex;
align-items: center;
font-size: 28rpx;
color: #999;
.radio {
transform: scale(0.7);
}
.link {
color: #3795f7;
}
}
.submit {
margin-top: 88rpx;
padding: 22rpx;
text-align: center;
font-size: 36rpx;
color: #fff;
line-height: 44rpx;
background: linear-gradient(90deg, #134df6 36%, #3795f7 100%);
border-radius: 96rpx 96rpx 96rpx 96rpx;
}
.tel-btn {
margin: 78rpx auto 0;
padding: 12rpx 44rpx;
border-radius: 52rpx;
width: 352rpx;
font-size: 32rpx;
line-height: 40rpx;
color: rgba(153, 153, 153, 1);
display: flex;
gap: 12rpx;
align-items: center;
justify-content: center;
outline: none;
.icon {
width: 28rpx;
height: 40rpx;
}
&::after {
border: none;
outline: none;
}
}
.visitor {
margin-top: 196rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
line-height: 1;
color: #3795f7;
}
}
}
.popup {
padding: 33rpx 0 0;
.popup-container {
padding: 280rpx 48rpx 0;
width: 622rpx;
height: 490rpx;
box-sizing: border-box;
background: linear-gradient(180deg, #e7f8ff 0%, #ffffff 100%);
border-radius: 32rpx;
position: relative;
.badge {
position: absolute;
left: 0;
top: -33px;
width: 246rpx;
height: 286rpx;
}
.title {
position: absolute;
top: 50rpx;
right: 28rpx;
width: 338rpx;
height: 164rpx;
}
.conform {
height: 88rpx;
text-align: center;
background: #3795f7;
line-height: 88rpx;
font-size: 36rpx;
color: #FFFFFF;
border-radius: 96rpx 96rpx 96rpx 96rpx;
}
.cancel{
margin-top: 10rpx;
font-size: 32rpx;
color: #999999;
text-align: center;
line-height: 88rpx;
}
}
}

95
src/pages/switchLogin/index.ts

@ -0,0 +1,95 @@
const app = getApp<IAppOption>();
let timer: number | null = 0;
Page({
data: {
menuButtonInfo: {},
mobile: '',
code: '',
codeText: '发送验证码',
},
onLoad() {},
getCode() {
if (timer) return;
const mobile = this.data.mobile;
if (!mobile) {
wx.showToast({
title: '手机号不能为空',
icon: 'none',
});
return;
}
// 验证手机号
if (!/^1[3-9,]\d{9}$/.test(mobile)) {
wx.showToast({
title: '手机号格式不正确',
icon: 'none',
});
return;
}
wx.ajax({
method: 'POST',
url: '?r=shizhong/login/send-verify-code',
data: {
mobile,
},
}).then(() => {
wx.showToast({
icon: 'none',
title: '验证码已发送~',
});
let time = 60;
timer = setInterval(() => {
time--;
this.setData({
codeText: `${time}s后重新发送`,
});
if (time <= 0) {
clearInterval(timer as number);
timer = null;
this.setData({
codeText: '发送验证码',
});
}
}, 1000);
});
},
handleSubmit() {
const { mobile, code } = this.data;
if (!mobile) {
wx.showToast({
title: '请输入手机号',
icon: 'none',
});
return;
}
if (!code) {
wx.showToast({
title: '请输入验证码',
icon: 'none',
});
return;
}
wx.ajax({
method: 'POST',
url: '?r=shizhong/login/reg-login',
data: {
mobile,
code,
},
}).then(() => {
this.submitCallback();
});
},
submitCallback() {
app.globalData.isLogin = 1;
wx.reLaunch({
url: '/pages/home/index',
});
},
handleBack(){
wx.navigateBack()
}
});
export {};

35
src/pages/switchLogin/index.wxml

@ -0,0 +1,35 @@
<van-nav-bar
right-text="按钮"
left-arrow
fixed
custom-style="background:transparent;"
bind:click-left="handleBack"
/>
<view
class="page"
style="background: url('/images/login-bg.png') no-repeat top center/100% 624rpx;padding-top:{{menuButtonInfo.bottom}}px;"
>
<view class="container">
<view class="tel">
<input
type="number"
model:value="{{mobile}}"
placeholder-class="place-input"
class="input"
placeholder="请输入手机号"
/>
</view>
<view class="code-row">
<input
type="text"
placeholder="请输入验证码"
class="code"
placeholder-class="place-code"
model:value="{{code}}"
type="number"
/>
<view class="btn" bind:tap="getCode">{{codeText}}</view>
</view>
<view class="submit" bind:tap="handleSubmit">切换账号</view>
</view>
</view>

37
src/pages/topic/index.scss

@ -41,18 +41,7 @@ page {
line-height: 64rpx; line-height: 64rpx;
} }
.conform { .btn {
margin-top: 64rpx;
height: 88rpx;
font-size: 36rpx;
color: #ffffff;
line-height: 88rpx;
text-align: center;
background: #3795f7;
border-radius: 96rpx 96rpx 96rpx 96rpx;
}
.cancel {
margin-top: 32rpx; margin-top: 32rpx;
font-size: 36rpx; font-size: 36rpx;
color: #65686c; color: #65686c;
@ -61,27 +50,43 @@ page {
height: 88rpx; height: 88rpx;
background: #f4f7fa; background: #f4f7fa;
border-radius: 84rpx 84rpx 84rpx 84rpx; border-radius: 84rpx 84rpx 84rpx 84rpx;
&.active {
color: #ffffff;
background: #3795f7;
} }
.prev { }
.footer {
position: absolute; position: absolute;
bottom: 206rpx; bottom: 206rpx;
left: 0; left: 0;
width: 100%; width: 100%;
padding: 0 106rpx; padding: 0 88rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
.prev {
flex: 1;
font-size: 36rpx; font-size: 36rpx;
color: #3795f7; color: #3795f7;
font-weight: bold; font-weight: bold;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: center;
box-sizing: border-box;
.icon { .icon {
margin-right: 16rpx; margin-right: 16rpx;
width: 44rpx; width: 44rpx;
height: 44rpx; height: 44rpx;
} }
}
.submit { .submit {
width: 290rpx; flex: 1;
height: 88rpx; height: 88rpx;
font-size: 36rpx; font-size: 36rpx;
color: #ffffff; color: #ffffff;

79
src/pages/topic/index.ts

@ -1,44 +1,69 @@
const _app = getApp<IAppOption>(); const app = getApp<IAppOption>();
Page({ Page({
data: { data: {
nav: 0, nav: 0,
question: [ percentage: 0,
{ question: [] as { questionId: string; title: string; answer?: '1' | '2' }[],
content: "这是一个问题的文案,这是一个问题的文案,这是一个问题的文案",
}, },
onLoad() {
{ app.waitLogin(true).then(() => {
content: "", this.getList();
}, });
{
content: "",
},
{
content: "",
},
{
content: "",
}, },
{ getList() {
content: "", wx.ajax({
method: 'GET',
url: '?r=shizhong/account/get-question',
data: {},
}).then((res) => {
this.setData({
question: res,
});
});
}, },
{ handleBtn(e) {
content: "", const { index, id } = e.currentTarget.dataset;
const { question, nav } = this.data;
question[index].answer = id;
console.log(nav);
console.log(question.length);
this.setData({
question,
nav: nav === question.length - 1 ? nav : nav + 1,
percentage: ((nav + 1) / question.length) * 100,
});
}, },
{ handlePrev() {
content: "", this.setData({
nav: this.data.nav - 1,
});
}, },
{ handleSubmit() {
content: "", const answer = this.data.question.map((item) => {
return {
qId: item.questionId,
answer: item.answer,
};
});
wx.ajax({
method: 'POST',
url: '?r=shizhong/account/answer-question',
data: {
answer: JSON.stringify(answer),
}, },
], }).then(() => {
app.waitLogin().then(() => {
wx.reLaunch({
url: '/pages/home/index',
});
});
});
}, },
onLoad() {},
bindtransition() { bindtransition() {
this.setData({ this.setData({
nav: this.data.nav, nav: this.data.nav,
}) });
}, },
}); });

61
src/pages/topic/index.wxml

@ -1,40 +1,65 @@
<view class="page" style="background: url('/images/topic-bg.png') no-repeat {{menuButtonInfo.bottom+62}}rpx center/100% 1284rpx;"> <view
class="page"
style="background: url('/images/topic-bg.png') no-repeat {{menuButtonInfo.bottom+62}}rpx center/100% 1284rpx;"
>
<swiper <swiper
class="swiper" class="swiper"
current="{{nav}}" current="{{nav}}"
bindtransition="bindtransition" bindtransition="bindtransition"
style="margin-top:{{menuButtonInfo.bottom+73}}px;" style="margin-top:{{menuButtonInfo.bottom+73}}px;"
> >
<swiper-item <swiper-item wx:for="{{question}}" wx:key="index" wx:for-item="questionItem">
wx:for="{{question}}" <view class="topic" style="background: url('/images/topic-card-bg.png') no-repeat top center/100% 1232rpx">
wx:key="index" <view class="order">
wx:for-item="questionItem" {{index + 1}}/
> <text class="all">{{question.length}}</text>
<view class="topic" style="background: url('/images/topic-card-bg.png') no-repeat top center/100% 1232rpx;">
<view class="order">{{nav + 1}}/
<text class="all">9</text>
</view> </view>
<view class="progress"> <view class="progress">
<van-progress <van-progress
percentage="50" percentage="{{percentage}}"
show-pivot="{{false}}" show-pivot="{{false}}"
stroke-width="{{8}}" stroke-width="{{8}}"
track-color="#F4F7FA" track-color="#F4F7FA"
color="#3795F7" color="#3795F7"
/> />
</view> </view>
<view class="content"> <view class="content">{{questionItem.title}}</view>
{{questionItem.content}} <view
class="btn {{questionItem.answer==='1' && 'active'}}"
bind:tap="handleBtn"
data-id="1"
data-index="{{index }}"
>
非常了解
</view>
<view
class="btn {{questionItem.answer==='2' && 'active'}}"
bind:tap="handleBtn"
data-id="2"
data-index="{{index}}"
>
一般了解
</view> </view>
<view class="conform">是</view> <view
<view class="cancel">否</view> class="btn {{questionItem.answer==='3' && 'active'}}"
<view class="prev"> bind:tap="handleBtn"
<view class="prev-item"> data-id="3"
data-index="{{index}}"
>
完全不了解
</view>
<view class="footer">
<view class="prev" bind:tap="handlePrev" wx:if="{{index>0}}">
<image class="icon" src="/images/icon-prev.png"></image> <image class="icon" src="/images/icon-prev.png"></image>
上一题 上一题
</view> </view>
<view class="submit" wx:if="{{true}}">提交</view> <view
class="submit"
wx:if="{{index === question.length-1 && question[question.length-1].answer}}"
bind:tap="handleSubmit"
>
提交
</view>
</view> </view>
</view> </view>
</swiper-item> </swiper-item>

8
typings/index.d.ts vendored

@ -5,18 +5,14 @@ interface IAppOption {
upFileUrl: string; upFileUrl: string;
imageUrl: string; imageUrl: string;
loginState: string; loginState: string;
isLogin: number; isLogin: 0 | 1 | 999;
doctorId: null | number; isAnswer: '0' | '1';
scene: null | { [key: string]: any }; scene: null | { [key: string]: any };
needDeal: "" | "1";
caseNav: "0" | "1" | "2" | "3";
}; };
userInfoReadyCallback?: WechatMiniprogram.GetUserInfoSuccessCallback; userInfoReadyCallback?: WechatMiniprogram.GetUserInfoSuccessCallback;
waitLogin: (waitLoginState?: boolean) => Promise<any>; waitLogin: (waitLoginState?: boolean) => Promise<any>;
getMenuInfo: (arg0: WechatMiniprogram.Page.Instance<any, any>) => void; getMenuInfo: (arg0: WechatMiniprogram.Page.Instance<any, any>) => void;
getUserInfo: (arg0: WechatMiniprogram.Page.Instance<any, any>, arg1?: (arg0: any) => void) => void; getUserInfo: (arg0: WechatMiniprogram.Page.Instance<any, any>, arg1?: (arg0: any) => void) => void;
getApplyDoctor: () => Promise<any>;
} }
interface IAgaxParams extends WechatMiniprogram.RequestOption { interface IAgaxParams extends WechatMiniprogram.RequestOption {

Loading…
Cancel
Save