1、后台配置小程序模块路径反斜杠问题已做兼容

master
chen 2022-03-07 16:40:15 +08:00
parent 011064a9f8
commit 570ae6e826
25 changed files with 125 additions and 64 deletions

View File

@ -306,9 +306,50 @@ swiper-item view:last-child .duan-xian{border-bottom: none;}
.diary-item-img:nth-child(3n){ .diary-item-img:nth-child(3n){
margin-right: 0; margin-right: 0;
} }
@media screen and (height:568px){
.blue-img{height: 471rpx;}
}
@media screen and (height:640px){
.blue-img{height: 450rpx;}
}
@media screen and (height:667px){
.blue-img{height: 450rpx;}
}
@media screen and (height:731px){
.blue-img{height: 426rpx;}
}
@media screen and (height:736px){
.blue-img{height: 430rpx;}
}
@media screen and (width:375px) and (height:736px){
.blue-img{height: 444rpx;}
}
@media screen and (height:800px){
.blue-img{height: 406rpx;}
}
@media screen and (height:812px){ @media screen and (height:812px){
.blue-img{height: 500rpx;} .blue-img{height: 500rpx;}
} }
@media screen and (height:823px){
.blue-img{height: 440rpx;}
}
@media screen and (height:844px){
.blue-img{height: 496rpx;}
}
@media screen and (height:896px){
.blue-img{height: 478rpx;}
}
@media screen and (min-height:926px){
.blue-img{height: 476rpx;}
}
/* @media screen and (height:812px){
.blue-img{height: 500rpx;}
}
@media screen and (height:844px){ @media screen and (height:844px){
.blue-img{height: 496rpx;} .blue-img{height: 496rpx;}
} }
@ -317,7 +358,7 @@ swiper-item view:last-child .duan-xian{border-bottom: none;}
} }
@media screen and (min-height:926px){ @media screen and (min-height:926px){
.blue-img{height: 490rpx;} .blue-img{height: 490rpx;}
} } */

View File

@ -60,8 +60,11 @@
let pages = getCurrentPages(); // let pages = getCurrentPages(); //
let currentPage = pages[pages.length - 1]; // let currentPage = pages[pages.length - 1]; //
// console.log(currentPage.route,''); // console.log(currentPage.route,'');
uni.setStorageSync('url',currentPage.route); // console.log(currentPage.$page.fullPath,'');
console.log(uni.getStorageSync('url'),64); uni.setStorageSync('url',`/${currentPage.route}`);
uni.setStorageSync('paramsUrl',currentPage.$page.fullPath);
console.log(uni.getStorageSync('paramsUrl'),66);
// console.log(uni.getStorageSync('url'),64);
}, },
data() { data() {
return { return {

View File

@ -458,7 +458,8 @@
this.dataList = []; this.dataList = [];
} }
} else { } else {
this.checkCate(this.cateListTwo[0].id); this.category_id = '';
this.checkCate('');
} }
// console.log(':',index); // console.log(':',index);
}, },

View File

@ -239,9 +239,7 @@
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
uni.removeStorageSync('shareAll')// uni.removeStorageSync('shareAll')//
if(uni.getStorageSync('phone_active')!=0){ if(uni.getStorageSync('phone_active')!=0){
setTimeout(()=>{
this.checkInfo(); this.checkInfo();
},6000)
this.$requst.post('index/mini-program-setting').then(res=>{ this.$requst.post('index/mini-program-setting').then(res=>{
// log('',res); // log('',res);
if(res.code==0){ if(res.code==0){

View File

@ -169,12 +169,6 @@
this.isAutoPlay = true; this.isAutoPlay = true;
}, },
onLoad(options) { onLoad(options) {
if(uni.getStorageSync('token')!='' ) {
this.checkUserInfo();
}
if(uni.getStorageSync('token')=='' || uni.getStorageSync('phone_active')=='' || uni.getStorageSync('phone_active')==0){
this.loginEv(options);
}
if(options.q!=undefined){ if(options.q!=undefined){
// unescape("http%3A//www.baidu.com%3Fname%3Dzhang@xiao@jie%26order%3D1") // unescape("http%3A//www.baidu.com%3Fname%3Dzhang@xiao@jie%26order%3D1")
// decodeURIComponent("http%3A%2F%2Fwww.baidu.com%3Fname%3Dzhang%40xiao%40jie%26order%3D1") // decodeURIComponent("http%3A%2F%2Fwww.baidu.com%3Fname%3Dzhang%40xiao%40jie%26order%3D1")
@ -199,9 +193,15 @@
source_code:newsource_code source_code:newsource_code
} }
// console.log(params); // console.log(params);
this.$requst.post('user/login',params).then(res => {console.log('调用成功');},error => {}) this.$requst.post('user/login',params).then(res => {
uni.setStorageSync('phone_active',res.data.phone_active);
uni.setStorageSync('invite_code',res.data.invite_code);
uni.setStorageSync('token',res.data.token);
},error => {})
}, },
}); });
} else if(uni.getStorageSync('token')=='' || uni.getStorageSync('phone_active')==0){
this.loginEv(options);
} }
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
query.select('.statusHNH').boundingClientRect((rect) => { query.select('.statusHNH').boundingClientRect((rect) => {
@ -219,6 +219,9 @@
this.quanImg= uni.getStorageSync('quanImg'); this.quanImg= uni.getStorageSync('quanImg');
this.quanId = uni.getStorageSync('quanId'); this.quanId = uni.getStorageSync('quanId');
},3000) },3000)
setTimeout(()=>{
this.checkUserInfo();
},10000)
}, },
methods: { methods: {
loginEv(option){ loginEv(option){
@ -231,7 +234,6 @@
source_code:option.source_code || '', source_code:option.source_code || '',
channel:option.channel || '' channel:option.channel || ''
} }
console.log(params,234);
this.$requst.post('user/login',params).then(res => { this.$requst.post('user/login',params).then(res => {
uni.setStorageSync('phone_active',res.data.phone_active); uni.setStorageSync('phone_active',res.data.phone_active);
uni.setStorageSync('invite_code',res.data.invite_code); uni.setStorageSync('invite_code',res.data.invite_code);
@ -500,7 +502,14 @@
url:'/pages/tabbar/cate/cate' url:'/pages/tabbar/cate/cate'
}) })
} else { } else {
uni.navigateTo({url:this.gonggList[index].url}) let existfx = this.gonggList[index].url.indexOf('/');
let newUrl = '';
if(existfx!=0) {
newUrl = `/${this.gonggList[index].url}`;
} else {
newUrl = this.gonggList[index].url;
}
uni.navigateTo({url:newUrl})
} }
} }
}, },

View File

@ -230,7 +230,8 @@
expressInfo:{ expressInfo:{
default_price:0 default_price:0
}, },
isVirtual:false// isVirtual:false,//
payType:''// wechat=;coin=;hybrid=
} }
}, },
onShareAppMessage(res) { onShareAppMessage(res) {
@ -271,6 +272,19 @@
this.payFS[2].isActive = true; this.payFS[2].isActive = true;
this.isCurrent = 1; this.isCurrent = 1;
} }
// wechat=;coin=;hybrid=
this.payType = uni.getStorageSync('payType');
// this.payType = 'hybrid';
if(this.payType=='wechat') {
this.payFS = [{title:'微信支付',isActive:true,num:0}]
} else if(this.payType=='coin'){
this.payFS = [{title:'孔雀币',isActive:true,num:0}]
} else if(this.payType=='hybrid'){
this.payFS = [
{title:'微信支付',isActive:true,num:0},
{title:'孔雀币',isActive:false,num:0}
]
}
}, },
methods: { methods: {
loginEv(invite_code='',source='',channel=''){ loginEv(invite_code='',source='',channel=''){
@ -506,6 +520,10 @@
this.$toolAll.tools.showToast('请添加微信支付方式'); this.$toolAll.tools.showToast('请添加微信支付方式');
} else if(this.isNei != 3 && !this.payFS[0].isActive && !this.payFS[1].isActive){ } else if(this.isNei != 3 && !this.payFS[0].isActive && !this.payFS[1].isActive){
this.$toolAll.tools.showToast('请选择支付方式') this.$toolAll.tools.showToast('请选择支付方式')
} else if(this.payFS[0].title=='孔雀币'){
if(this.allPrice*1 > this.coin_price*1){
this.$toolAll.tools.showToast('孔雀币不足');
}
} else if(this.isNei != 3 && !this.payFS[0].isActive && this.allPrice*1 > this.coin_price*1){ } else if(this.isNei != 3 && !this.payFS[0].isActive && this.allPrice*1 > this.coin_price*1){
this.$toolAll.tools.showToast('孔雀币不足'); this.$toolAll.tools.showToast('孔雀币不足');
} else{ } else{
@ -561,9 +579,11 @@
}, },
fail:()=> { fail:()=> {
this.$toolAll.tools.showToast('取消支付'); this.$toolAll.tools.showToast('取消支付');
setTimeout(()=>{
uni.navigateTo({ uni.navigateTo({
url:'/pagesA/myOrder/myOrder' url:'/pagesA/myOrder/myOrder'
}) })
},2000)
} }
}); });
} else { } else {

View File

@ -84,6 +84,7 @@
onShow() { onShow() {
this.$toolAll.tools.isLogin(); this.$toolAll.tools.isLogin();
uni.removeStorageSync('orderList'); uni.removeStorageSync('orderList');
uni.removeStorageSync('payType');
}, },
onLoad(options) { onLoad(options) {
options.isScore=='score' ? this.isScore = 'score' : '' options.isScore=='score' ? this.isScore = 'score' : ''
@ -241,6 +242,7 @@
if(this.newList.length==0){ if(this.newList.length==0){
this.$toolAll.tools.showToast('请选择要支付的商品'); this.$toolAll.tools.showToast('请选择要支付的商品');
} else { } else {
uni.setStorageSync('payType',0);
uni.navigateTo({ uni.navigateTo({
url:`/pagesA/getReadyDan/getReadyDan?isNei=${isNei}` url:`/pagesA/getReadyDan/getReadyDan?isNei=${isNei}`
}) })

View File

@ -149,15 +149,7 @@
</view> </view>
<!-- 医生 --> <!-- 医生 -->
<view v-if="doctorList.length!=0" class="pad20 bacf mar-zy20 radius20 mar-s20"> <view v-if="doctorList.length!=0" class="pad20 bacf mar-zy20 radius20 mar-s20">
<view class="fon28 col3 bold">医生</view> <view class="fon28 col3 bold mar-x20">医生</view>
<!-- <view @tap="goDoctor(item.id)" v-for="(item,index) in doctorList" :key="index" class="disjbac posir pad-sx20">
<image :src="item.imgSrc" mode="aspectFill" class="flexs big-img"></image>
<view class="disjbac width100 mar-z20 pad-sx20">
<view class="fon28 col3 width50">{{item.name}}</view>
<view class="fon24 width50 col7D">擅长{{item.goodAt}}</view>
</view>
<view v-if="(doctorList.length-1)!=index" class="duan-xian"></view>
</view> -->
<!-- 推荐医生列表 --> <!-- 推荐医生列表 -->
<list-doctor v-if="doctorList.length!=0" :list="doctorList"></list-doctor> <list-doctor v-if="doctorList.length!=0" :list="doctorList"></list-doctor>
<view v-if="doctorList.length==0" class="disjcac fc" style="margin-top: 10%;"> <view v-if="doctorList.length==0" class="disjcac fc" style="margin-top: 10%;">
@ -200,7 +192,7 @@
<view @tap="lianK" class="shopKf"> <view @tap="lianK" class="shopKf">
<view class="posir"> <view class="posir">
<image src="/static/public/kf-logo.png" mode="aspectFill" style="width: 142rpx;height: 142rpx;"></image> <image src="/static/public/kf-logo.png" mode="aspectFill" style="width: 142rpx;height: 142rpx;"></image>
<button v-if="haveImg" open-type="contact" class="posia-op"></button> <button open-type="contact" class="posia-op"></button>
</view> </view>
</view> </view>
<!-- 立即购买加入购物车弹框 --> <!-- 立即购买加入购物车弹框 -->
@ -286,7 +278,6 @@
publicColor:uni.getStorageSync('publicColor') || '#3875F6',// publicColor:uni.getStorageSync('publicColor') || '#3875F6',//
cateCurrent:0, cateCurrent:0,
swiperHeight:uni.getSystemInfoSync().windowWidth, swiperHeight:uni.getSystemInfoSync().windowWidth,
haveImg:true,
cateList:[{ cateList:[{
id:1, id:1,
title:'商品详情', title:'商品详情',
@ -380,6 +371,7 @@
}, },
onShow() { onShow() {
uni.removeStorageSync('chooseAddress'); uni.removeStorageSync('chooseAddress');
uni.removeStorageSync('payType');
this.isAutoPlay = true; this.isAutoPlay = true;
}, },
onHide() { onHide() {
@ -526,6 +518,8 @@
} }
let newList = [params]; let newList = [params];
uni.setStorageSync('orderList',newList); uni.setStorageSync('orderList',newList);
//
uni.setStorageSync('payType',this.detailObj.pay_type);
uni.navigateTo({ uni.navigateTo({
url:`/pagesA/getReadyDan/getReadyDan?isNei=${this.isNei}&isVirtual=${this.detailObj.spu_type}` url:`/pagesA/getReadyDan/getReadyDan?isNei=${this.isNei}&isVirtual=${this.detailObj.spu_type}`
}) })
@ -586,14 +580,11 @@
this.skuDetail = this.allRes.sku[index]; this.skuDetail = this.allRes.sku[index];
}, },
lianK(){// lianK(){//
if(this.haveImg == false) {
} else {
this.$requst.post('user/rand-bind-service').then(res=>{}) this.$requst.post('user/rand-bind-service').then(res=>{})
this.$toolAll.tools.closeTimer()// this.$toolAll.tools.closeTimer()//
this.$requst.post('user/record',{type:'other',action:'ask',id:0}).then(res=>{},error=>{}) this.$requst.post('user/record',{type:'other',action:'ask',id:0}).then(res=>{},error=>{})
// tools.js 1314 // tools.js 1314
this.$toolAll.tools.plantPoint(this.detailObj.is_activity==0 ? 13:14); this.$toolAll.tools.plantPoint(this.detailObj.is_activity==0 ? 13:14);
}
}, },
chooseLike(e) { // chooseLike(e) { //
// console.log(this.dataList[e].is_collected); // console.log(this.dataList[e].is_collected);
@ -620,10 +611,6 @@
url:'/pages/tabbar/pagehome/pagehome' url:'/pages/tabbar/pagehome/pagehome'
}) })
}, },
shareEv(){
if(this.haveImg == false) {
}
},
checkDetail(newId,is_activity){ checkDetail(newId,is_activity){
console.log(newId,is_activity,'参数'); console.log(newId,is_activity,'参数');
uni.request({ uni.request({

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long