12.25
This commit is contained in:
parent
a52add7452
commit
8689fad91a
17
app.js
17
app.js
@ -63,7 +63,10 @@ App({
|
|||||||
} else {
|
} else {
|
||||||
this.globalData.origion = 0;
|
this.globalData.origion = 0;
|
||||||
};
|
};
|
||||||
|
if(this.isHasToken()){
|
||||||
this.imLogin(options);
|
this.imLogin(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
method: router,
|
method: router,
|
||||||
@ -160,6 +163,20 @@ App({
|
|||||||
onKickOut(event) {
|
onKickOut(event) {
|
||||||
this.handleLogout();
|
this.handleLogout();
|
||||||
},
|
},
|
||||||
|
isHasToken(){
|
||||||
|
let token='';
|
||||||
|
const { envVersion } = wx.getAccountInfoSync().miniProgram;
|
||||||
|
if(envVersion=='release'){
|
||||||
|
token = wx.getStorageSync('AUTH_TOKEN');
|
||||||
|
}else{
|
||||||
|
token = wx.getStorageSync('DEV_AUTH_TOKEN');
|
||||||
|
}
|
||||||
|
if(token){
|
||||||
|
return true
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
async handleLogout() {
|
async handleLogout() {
|
||||||
if (wx.$TUIKit) {
|
if (wx.$TUIKit) {
|
||||||
wx.$TUIKit.destroy();
|
wx.$TUIKit.destroy();
|
||||||
|
|||||||
BIN
assets/images/cert.png
Normal file
BIN
assets/images/cert.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@ -48,6 +48,12 @@ Page({
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
goH5:throttle(function(event){
|
goH5:throttle(function(event){
|
||||||
|
if(!this.isHasToken()){
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/patient/pages/login/login',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
let {url,name,type,title}=event.currentTarget.dataset;
|
let {url,name,type,title}=event.currentTarget.dataset;
|
||||||
if(url.indexOf("http")!=-1){
|
if(url.indexOf("http")!=-1){
|
||||||
let urlName=(decodeURIComponent(url))
|
let urlName=(decodeURIComponent(url))
|
||||||
@ -150,9 +156,18 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
goMydoctor:throttle(function(){
|
goMydoctor:throttle(function(){
|
||||||
|
if(!this.isHasToken()){
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/patient/pages/login/login',
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
app.method.navigateTo({
|
app.method.navigateTo({
|
||||||
url: '/patient/pages/myDoctor/myDoctor',
|
url: '/patient/pages/myDoctor/myDoctor',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
onConfirmEntry(){
|
onConfirmEntry(){
|
||||||
@ -192,12 +207,24 @@ Page({
|
|||||||
wx.exitMiniProgram({success: (res) => {}})
|
wx.exitMiniProgram({success: (res) => {}})
|
||||||
},
|
},
|
||||||
goAgreement:throttle(function(event){
|
goAgreement:throttle(function(event){
|
||||||
|
if(!this.isHasToken()){
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/patient/pages/login/login',
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
let id=event.currentTarget.dataset.id;
|
let id=event.currentTarget.dataset.id;
|
||||||
app.method.navigateTo({
|
app.method.navigateTo({
|
||||||
url:"/patient/pages/linkPage/linkPage?url="+encodeURIComponent(urlHost+'/basic/file/agreement.htm?id='+id)
|
url:"/patient/pages/linkPage/linkPage?url="+encodeURIComponent(urlHost+'/basic/file/agreement.htm?id='+id)
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
goCheck:throttle(function(){
|
goCheck:throttle(function(){
|
||||||
|
if(!this.isHasToken()){
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/patient/pages/login/login',
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
// let that=this;
|
// let that=this;
|
||||||
// wx.scanCode({
|
// wx.scanCode({
|
||||||
// onlyFromCamera: true,
|
// onlyFromCamera: true,
|
||||||
@ -218,6 +245,12 @@ Page({
|
|||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
goMall:throttle(function(){
|
goMall:throttle(function(){
|
||||||
|
if(!this.isHasToken()){
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/patient/pages/login/login',
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
wx.navigateToMiniProgram({
|
wx.navigateToMiniProgram({
|
||||||
appId: 'wxdee7006582529713',
|
appId: 'wxdee7006582529713',
|
||||||
path:"/pages/home/dashboard/index",
|
path:"/pages/home/dashboard/index",
|
||||||
@ -228,12 +261,24 @@ Page({
|
|||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
freeConsult:throttle(function(){
|
freeConsult:throttle(function(){
|
||||||
|
if(!this.isHasToken()){
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/patient/pages/login/login',
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
app.method.navigateTo({
|
app.method.navigateTo({
|
||||||
url: '/patient/pages/expertConsult/expertConsult?type=free'
|
url: '/patient/pages/expertConsult/expertConsult?type=free'
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
handleFocus:throttle(function(event){
|
handleFocus:throttle(function(event){
|
||||||
wx.hideKeyboard();
|
wx.hideKeyboard();
|
||||||
|
if(!this.isHasToken()){
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/patient/pages/login/login',
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
if(event.detail){
|
if(event.detail){
|
||||||
app.method.navigateTo({
|
app.method.navigateTo({
|
||||||
url: '/patient/pages/search/search',
|
url: '/patient/pages/search/search',
|
||||||
@ -242,23 +287,47 @@ Page({
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
goExpertDetail:throttle(function(event){
|
goExpertDetail:throttle(function(event){
|
||||||
|
if(!this.isHasToken()){
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/patient/pages/login/login',
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
let id=event.currentTarget.dataset.id;
|
let id=event.currentTarget.dataset.id;
|
||||||
app.method.navigateTo({
|
app.method.navigateTo({
|
||||||
url: '/patient/pages/expertDetail/expertDetail?doctor_id='+id
|
url: '/patient/pages/expertDetail/expertDetail?doctor_id='+id
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
goquickExpert:throttle(function(){
|
goquickExpert:throttle(function(){
|
||||||
|
if(!this.isHasToken()){
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/patient/pages/login/login',
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
app.method.navigateTo({
|
app.method.navigateTo({
|
||||||
url:'/patient/pages/expertConsult/expertConsult' //'/patient/pages/quickConsult/quickConsult'
|
url:'/patient/pages/expertConsult/expertConsult' //'/patient/pages/quickConsult/quickConsult'
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
goExpertAndCloseOld:throttle(function(){
|
goExpertAndCloseOld:throttle(function(){
|
||||||
|
if(!this.isHasToken()){
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/patient/pages/login/login',
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
app.method.navigateTo({
|
app.method.navigateTo({
|
||||||
url:'/patient/pages/expertConsult/expertConsult'
|
url:'/patient/pages/expertConsult/expertConsult'
|
||||||
})
|
})
|
||||||
this.onClickHide();
|
this.onClickHide();
|
||||||
}),
|
}),
|
||||||
goExpertAndClose:throttle(function(event){
|
goExpertAndClose:throttle(function(event){
|
||||||
|
if(!this.isHasToken()){
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/patient/pages/login/login',
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
let id=event.currentTarget.dataset.id;
|
let id=event.currentTarget.dataset.id;
|
||||||
let url='';
|
let url='';
|
||||||
if(id==1){
|
if(id==1){
|
||||||
@ -284,11 +353,23 @@ Page({
|
|||||||
// title: '敬请期待',
|
// title: '敬请期待',
|
||||||
// icon:'none'
|
// icon:'none'
|
||||||
// })
|
// })
|
||||||
|
if(!this.isHasToken()){
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/patient/pages/login/login',
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
app.method.navigateTo({
|
app.method.navigateTo({
|
||||||
url: '/patient/pages/hivConsult/hivConsult'
|
url: '/patient/pages/hivConsult/hivConsult'
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
goconsultandbuy:throttle(function(){
|
goconsultandbuy:throttle(function(){
|
||||||
|
if(!this.isHasToken()){
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/patient/pages/login/login',
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
app.method.navigateTo({
|
app.method.navigateTo({
|
||||||
url: '/patient/pages/expertConsult/expertConsult?type=buyYao'
|
url: '/patient/pages/expertConsult/expertConsult?type=buyYao'
|
||||||
})
|
})
|
||||||
@ -298,11 +379,23 @@ Page({
|
|||||||
|
|
||||||
}),
|
}),
|
||||||
goHealth:throttle(function(){
|
goHealth:throttle(function(){
|
||||||
|
if(!this.isHasToken()){
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/patient/pages/login/login',
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
app.method.navigateTo({
|
app.method.navigateTo({
|
||||||
url: '/healthyService/pages/healthyIntro/healthyIntro'
|
url: '/healthyService/pages/healthyIntro/healthyIntro'
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
goVisit:throttle(function(){
|
goVisit:throttle(function(){
|
||||||
|
if(!this.isHasToken()){
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/patient/pages/login/login',
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
app.method.navigateTo({
|
app.method.navigateTo({
|
||||||
url: '/healthyService/pages/visitList/visitList'
|
url: '/healthyService/pages/visitList/visitList'
|
||||||
})
|
})
|
||||||
@ -339,6 +432,12 @@ goVisit:throttle(function(){
|
|||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
console.log("index onload");
|
console.log("index onload");
|
||||||
if(options.doctor_id){
|
if(options.doctor_id){
|
||||||
|
if(!this.isHasToken()){
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/patient/pages/login/login',
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '/patient/pages/expertDetail/expertDetail?doctor_id='+options.query.doctor_id,
|
url: '/patient/pages/expertDetail/expertDetail?doctor_id='+options.query.doctor_id,
|
||||||
})
|
})
|
||||||
@ -352,6 +451,20 @@ goVisit:throttle(function(){
|
|||||||
});
|
});
|
||||||
//this.handleMyDoctor();
|
//this.handleMyDoctor();
|
||||||
},
|
},
|
||||||
|
isHasToken(){
|
||||||
|
let token='';
|
||||||
|
const { envVersion } = wx.getAccountInfoSync().miniProgram;
|
||||||
|
if(envVersion=='release'){
|
||||||
|
token = wx.getStorageSync('AUTH_TOKEN');
|
||||||
|
}else{
|
||||||
|
token = wx.getStorageSync('DEV_AUTH_TOKEN');
|
||||||
|
}
|
||||||
|
if(token){
|
||||||
|
return true
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
let isIntro=wx.getStorageSync('hasIntro');
|
let isIntro=wx.getStorageSync('hasIntro');
|
||||||
//let isEntry=wx.getStorageSync('hasEntry');
|
//let isEntry=wx.getStorageSync('hasEntry');
|
||||||
@ -388,7 +501,10 @@ goVisit:throttle(function(){
|
|||||||
app.globalData.origion=0;
|
app.globalData.origion=0;
|
||||||
|
|
||||||
if(!app.globalData.totalUnread && app.globalData.totalUnread!=0){
|
if(!app.globalData.totalUnread && app.globalData.totalUnread!=0){
|
||||||
|
if(this.isHasToken()){
|
||||||
app.imLogin();
|
app.imLogin();
|
||||||
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
let total=app.globalData.totalUnread;
|
let total=app.globalData.totalUnread;
|
||||||
setBarData(total)
|
setBarData(total)
|
||||||
|
|||||||
@ -61,11 +61,10 @@
|
|||||||
<view class="wenzhencell" bindtap="goquickExpert">
|
<view class="wenzhencell" bindtap="goquickExpert">
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view class="name_title">找专家</view>
|
<view class="name_title">找专家</view>
|
||||||
<!-- <image src="{{img_host+'/find_expert.png'}}" style="width:80rpx;height:80rpx"></image> -->
|
|
||||||
<image src="{{img_host+'/findexpert.png'}}" mode="" style="width:312rpx;height:182rpx" class="bg"/>
|
<image src="{{img_host+'/findexpert.png'}}" mode="" style="width:312rpx;height:182rpx" class="bg"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="desc">
|
<view class="desc">
|
||||||
30多位主任医师
|
200多位主任医师
|
||||||
</view>
|
</view>
|
||||||
<view class="desc">专业医生,服务保障</view>
|
<view class="desc">专业医生,服务保障</view>
|
||||||
</view>
|
</view>
|
||||||
@ -73,11 +72,10 @@
|
|||||||
<view class="wenzhencell" bindtap="goconsultandbuy">
|
<view class="wenzhencell" bindtap="goconsultandbuy">
|
||||||
<view class="row">
|
<view class="row">
|
||||||
<view class="name_title">问诊购药</view>
|
<view class="name_title">问诊购药</view>
|
||||||
<image src="{{img_host+'/buyandask.png'}}" mode="" style="width:312rpx;height:182rpx" class="bg"/>
|
<image src="{{img_host+'/buyandask.png'}}" mode="" style="width:312rpx;height:182rpx;right:0;left:auto" class="bg"/>
|
||||||
<!-- <image src="{{img_host+'/hiv.png'}}" style="width:80rpx;height:80rpx"></image> -->
|
|
||||||
</view>
|
</view>
|
||||||
<view class="desc">
|
<view class="desc">
|
||||||
30多种常用处方药品
|
50多种常用处方药品
|
||||||
</view>
|
</view>
|
||||||
<view class="desc">
|
<view class="desc">
|
||||||
正品无忧,品质护航
|
正品无忧,品质护航
|
||||||
|
|||||||
@ -21,6 +21,7 @@ Page({
|
|||||||
showDialog:false,
|
showDialog:false,
|
||||||
currentData:0,
|
currentData:0,
|
||||||
avatar: '',
|
avatar: '',
|
||||||
|
register_cert:'',
|
||||||
user_name: '',
|
user_name: '',
|
||||||
doctor_title: '',
|
doctor_title: '',
|
||||||
doctor_id: '',
|
doctor_id: '',
|
||||||
@ -96,6 +97,13 @@ Page({
|
|||||||
url:'/patient/pages/videoList/videoList'
|
url:'/patient/pages/videoList/videoList'
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
|
previewImg(){
|
||||||
|
let {register_cert}=this.data;
|
||||||
|
wx.previewImage({
|
||||||
|
current: 'register_cert', // 当前显示图片的http链接
|
||||||
|
urls: [register_cert] // 需要预览的图片http链接列表
|
||||||
|
})
|
||||||
|
},
|
||||||
goSelectPatient() {
|
goSelectPatient() {
|
||||||
|
|
||||||
//判断是否能接诊
|
//判断是否能接诊
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"van-rate": "@vant/weapp/rate/index",
|
"van-rate": "@vant/weapp/rate/index",
|
||||||
|
"van-image": "@vant/weapp/image/index",
|
||||||
"van-popup": "@vant/weapp/popup/index",
|
"van-popup": "@vant/weapp/popup/index",
|
||||||
"dialog":"../../../components/dialog/dialog",
|
"dialog":"../../../components/dialog/dialog",
|
||||||
"nav":"../../../components/nav/nav"
|
"nav":"../../../components/nav/nav"
|
||||||
|
|||||||
@ -404,6 +404,25 @@
|
|||||||
|
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="borderbox" wx:if="{{register_cert}}">
|
||||||
|
<view class="rowintro">
|
||||||
|
<image src="../../../assets/images/cert.png" style="width:36rpx"></image>
|
||||||
|
<text>医师注册证</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="goodjob" style="margin-top:20rpx">
|
||||||
|
<van-image
|
||||||
|
width="100"
|
||||||
|
height="100"
|
||||||
|
fit="contain"
|
||||||
|
bindtap="previewImg"
|
||||||
|
src="{{register_cert}}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="line"></view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</van-popup>
|
</van-popup>
|
||||||
|
|||||||
@ -56,6 +56,18 @@ Page({
|
|||||||
url:"/patient/pages/linkPage/linkPage?url="+encodeURIComponent(event.currentTarget.dataset.url)
|
url:"/patient/pages/linkPage/linkPage?url="+encodeURIComponent(event.currentTarget.dataset.url)
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
|
onScroll(event) {
|
||||||
|
|
||||||
|
wx.createSelectorQuery().select('#scroller')
|
||||||
|
.boundingClientRect((res) => {
|
||||||
|
// console.log(event.detail.scrollTop)
|
||||||
|
if(event.detail.scrollTop>1400){
|
||||||
|
this.lower();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}).exec();
|
||||||
|
},
|
||||||
lower(e) {
|
lower(e) {
|
||||||
let {lock}=this.data;
|
let {lock}=this.data;
|
||||||
let addPage=this.data.page+1;
|
let addPage=this.data.page+1;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<!--patient/pages/kepuList/kepuList.wxml-->
|
<!--patient/pages/kepuList/kepuList.wxml-->
|
||||||
<nav navName="{{title}}"></nav>
|
<nav navName="{{title}}"></nav>
|
||||||
<view class="scrollwraper">
|
<view class="scrollwraper">
|
||||||
<scroll-view scroll-y style="width: 100%;height:100%" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}" refresher-threshold="200" refresher-enabled="true" bindscrolltolower="lower" id="scroller" bounces="false">
|
<scroll-view scroll-y style="width: 100%;height:100%" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}" refresher-threshold="200" refresher-enabled="true" bindscrolltolower="lower" id="scroller" bounces="false" bindscroll="onScroll">
|
||||||
<view class="cell" wx:for="{{list}}" wx:key="article_id" bind:tap="goArticle" data-url="{{item.article_url}}">
|
<view class="cell" wx:for="{{list}}" wx:key="article_id" bind:tap="goArticle" data-url="{{item.article_url}}">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="title">{{item.article_title}}</view>
|
<view class="title">{{item.article_title}}</view>
|
||||||
|
|||||||
@ -99,6 +99,7 @@ Page({
|
|||||||
const {
|
const {
|
||||||
file
|
file
|
||||||
} = event.detail;
|
} = event.detail;
|
||||||
|
console.log(file)
|
||||||
this.setData({
|
this.setData({
|
||||||
showCrop:true,
|
showCrop:true,
|
||||||
src:file.url
|
src:file.url
|
||||||
@ -204,6 +205,7 @@ Page({
|
|||||||
showCrop:false
|
showCrop:false
|
||||||
})
|
})
|
||||||
this.cropper.getImg((obj) => {
|
this.cropper.getImg((obj) => {
|
||||||
|
console.log(obj)
|
||||||
this.upload(obj)
|
this.upload(obj)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@ -51,7 +51,6 @@
|
|||||||
"tabIndent": "insertSpaces",
|
"tabIndent": "insertSpaces",
|
||||||
"tabSize": 2
|
"tabSize": 2
|
||||||
},
|
},
|
||||||
"libVersion": "2.30.2",
|
|
||||||
"packOptions": {
|
"packOptions": {
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"include": []
|
"include": []
|
||||||
|
|||||||
@ -6,5 +6,5 @@
|
|||||||
"bigPackageSizeSupport": false
|
"bigPackageSizeSupport": false
|
||||||
},
|
},
|
||||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||||
"libVersion": "3.3.0"
|
"libVersion": "3.9.3"
|
||||||
}
|
}
|
||||||
@ -26,9 +26,6 @@
|
|||||||
SDKAPPID='1600027911';
|
SDKAPPID='1600027911';
|
||||||
break;
|
break;
|
||||||
case 'trial': //体验版环境
|
case 'trial': //体验版环境
|
||||||
// host =`${Hosts.host_prod}`;
|
|
||||||
// imghost=`${Hosts.img_prod}`;
|
|
||||||
// agreehost=`${Hosts.agree_prod}`
|
|
||||||
host = `${Hosts.host_dev}`;
|
host = `${Hosts.host_dev}`;
|
||||||
imghost=`${Hosts.img_dev}`;
|
imghost=`${Hosts.img_dev}`;
|
||||||
agreehost=`${Hosts.agree_dev}`;
|
agreehost=`${Hosts.agree_dev}`;
|
||||||
|
|||||||
@ -133,6 +133,10 @@ function request(url, method, data, loding = false) {
|
|||||||
reject(res.data);
|
reject(res.data);
|
||||||
},
|
},
|
||||||
fail: function (res) {
|
fail: function (res) {
|
||||||
|
if (loding) {
|
||||||
|
wx.hideLoading()
|
||||||
|
wx.stopPullDownRefresh();
|
||||||
|
}
|
||||||
console.log(res)
|
console.log(res)
|
||||||
console.log(2222222222222222);
|
console.log(2222222222222222);
|
||||||
// wx.showToast({
|
// wx.showToast({
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
// router.js
|
// router.js
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//import {getCurrentPageUrl} from "./getUrl"
|
//import {getCurrentPageUrl} from "./getUrl"
|
||||||
module.exports = {
|
module.exports = {
|
||||||
navigateTo(object) {
|
navigateTo(object) {
|
||||||
@ -6,6 +9,25 @@ module.exports = {
|
|||||||
let len = pages.length;
|
let len = pages.length;
|
||||||
let dlt = 0;
|
let dlt = 0;
|
||||||
let cur_url=object.url;
|
let cur_url=object.url;
|
||||||
|
// let token='';
|
||||||
|
// const { envVersion } = wx.getAccountInfoSync().miniProgram;
|
||||||
|
// if(envVersion=='release'){
|
||||||
|
// token = wx.getStorageSync('AUTH_TOKEN');
|
||||||
|
// }else{
|
||||||
|
// token = wx.getStorageSync('DEV_AUTH_TOKEN');
|
||||||
|
|
||||||
|
// };
|
||||||
|
// if(!token){
|
||||||
|
// if(cur_url.indexOf('/mobileLogin/mobileLogin')!=-1 || cur_url.indexOf('/linkPage/linkPage')!=-1 || cur_url.indexOf('patient/pages/login/login')!=-1 || cur_url.indexOf('index/index') !=-1){
|
||||||
|
// AnimatorControllerStateModel.log(111)
|
||||||
|
// wx.reLaunch({
|
||||||
|
// url: '/patient/pages/login/login'
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
object.fail=function(error){
|
object.fail=function(error){
|
||||||
console.log(error)
|
console.log(error)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user