feat: 调试页面跳转,登录接口修改

This commit is contained in:
mayubo@gmail.com 2025-05-08 16:56:38 +08:00
parent 29e7a931a5
commit b47373e7ce
31 changed files with 337 additions and 246 deletions

View File

@ -1,5 +1,5 @@
export const apiArr = { export const apiArr = {
login: '/wechat/mpusers/login', // 小程序登录 login: '/wechat/multi-login', // 小程序登录
loginInfo: '/wechat/mpusers/login-info', // 获取用户信息 loginInfo: '/wechat/mpusers/login-info', // 获取用户信息
loginGetPhone: '/wechat/mpusers/get-phone', // 获取用户手机号 loginGetPhone: '/wechat/mpusers/get-phone', // 获取用户手机号
} }

View File

@ -36,7 +36,7 @@
result.data[2].nav_name = "手机通行" result.data[2].nav_name = "手机通行"
result.data[2].url = "/pages/phoneGo/phoneGo" result.data[2].url = "/pages/phoneGo/phoneGo"
result.data[3].url = `packages/community/index/index` result.data[3].url = `/packages/community/index/index`
result.data[4].url = "/pages/user/index" result.data[4].url = "/pages/user/index"
result.data.splice(1, 2); result.data.splice(1, 2);

View File

@ -34,6 +34,11 @@
methods: { methods: {
// //
getHostInfo() { getHostInfo() {
//
if (uni.getStorageSync('city')) {
this.address = uni.getStorageSync('city');
return;
}
uni.request({ uni.request({
url: apiArr.get_host_info, url: apiArr.get_host_info,
method: 'post', method: 'post',
@ -61,7 +66,6 @@
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
success(res) { success(res) {
console.log('12313131231231312312312312313', res);
const latitude = res.latitude const latitude = res.latitude
const longitude = res.longitude const longitude = res.longitude
// const speed = res.speed // const speed = res.speed

View File

@ -153,11 +153,11 @@
pay(){ pay(){
const { shopInfo } = this; const { shopInfo } = this;
NavgateTo(`/kitchen/pay/index?id=${shopInfo.shop_id}`, { isLogin: false }); NavgateTo(`/kitchen/pay/index?id=${shopInfo.shop_id}`);
}, },
jump(){ jump(){
NavgateTo('/kitchen/recharge/index', { isLogin: false }); NavgateTo('/kitchen/recharge/index');
}, },
} }
} }

View File

@ -100,10 +100,10 @@
const { type } = e.currentTarget.dataset; const { type } = e.currentTarget.dataset;
if(type == '1'){ if(type == '1'){
NavgateTo(`/packages/community/chooseMsg/index?type=${type}&id=${this.communityId}`, {isLogin: false}); NavgateTo(`/packages/community/chooseMsg/index?type=${type}&id=${this.communityId}`);
}else{ }else{
if(this.FacId){ if(this.FacId){
NavgateTo(`/packages/community/chooseMsg/index?type=${type}&id=${this.communityId}&FacId=${this.FacId}`, {isLogin: false}); NavgateTo(`/packages/community/chooseMsg/index?type=${type}&id=${this.communityId}&FacId=${this.FacId}`);
}else{ }else{
uni.showToast({ uni.showToast({

View File

@ -205,15 +205,15 @@
this.NotOpen(); this.NotOpen();
return return
} }
NavgateTo( `${event.url}?title=${pageTitle}`, {isLogin: false}) NavgateTo( `${event.url}?title=${pageTitle}`)
}, },
repair(){ repair(){
NavgateTo(`/packages/community/oneRepair/index`, {isLogin: false }) NavgateTo(`/packages/community/oneRepair/index`)
}, },
ReparirList(){ ReparirList(){
NavgateTo(`/packages/community/repairList/index?id=${this.id}&title=${this.info.name}`, {isLogin: false }) NavgateTo(`/packages/community/repairList/index?id=${this.id}&title=${this.info.name}`)
}, },

View File

@ -19,7 +19,7 @@
@chooseCommunity="chooseCommunity" @chooseCommunity="chooseCommunity"
/> />
</view> </view>
<nav-footer />
</view> </view>
</template> </template>

View File

@ -108,7 +108,7 @@
}, },
addCar(){ addCar(){
NavgateTo(`/packages/community/addCar/index?title=${this.title}&id=${this.id}`, {isLogin: false}) NavgateTo(`/packages/community/addCar/index?title=${this.title}&id=${this.id}`)
}, },

View File

@ -63,9 +63,8 @@
headerNoticeClick(event) { headerNoticeClick(event) {
console.log('12313', event);
const { item } = event.currentTarget.dataset; const { item } = event.currentTarget.dataset;
NavgateTo(`/packages/community/desc/desc?id=${item.news_id}&title=${item.title}`, {isLogin: false}) NavgateTo(`/packages/community/desc/desc?id=${item.news_id}&title=${item.title}`)
}, },
}, },

View File

@ -176,18 +176,18 @@
}, },
methods: { methods: {
chooseCom(){ chooseCom(){
NavgateTo(`/packages/community/index/index?joinType=3`, { isLogin: false }) NavgateTo(`/packages/community/index/index?joinType=3`)
}, },
chooseFac(e){ chooseFac(e){
console.log('eeee', e); console.log('eeee', e);
const { type } = e.currentTarget.dataset; const { type } = e.currentTarget.dataset;
if(type == '1'){ if(type == '1'){
NavgateTo(`/packages/community/chooseMsg/index?type=${type}&id=${this.CommunityInfo.id}`, { isLogin: false }); NavgateTo(`/packages/community/chooseMsg/index?type=${type}&id=${this.CommunityInfo.id}`);
}else{ }else{
console.log(this.FacId); console.log(this.FacId);
if(this.FacId){ if(this.FacId){
NavgateTo(`/packages/community/chooseMsg/index?type=${type}&id=${this.CommunityInfo.id}&FacId=${this.FacId}`, { isLogin: false }); NavgateTo(`/packages/community/chooseMsg/index?type=${type}&id=${this.CommunityInfo.id}&FacId=${this.FacId}`);
}else{ }else{
uni.showToast({ uni.showToast({
title: '请先选择楼宇号', title: '请先选择楼宇号',

View File

@ -82,11 +82,11 @@
}, },
headerRepairClick(e){ headerRepairClick(e){
NavgateTo(`/packages/community/oneRepair/index`, { isLogin: false }) NavgateTo(`/packages/community/oneRepair/index`)
}, },
headerRepairDetailClick(e){ headerRepairDetailClick(e){
const { id } = e.currentTarget.dataset const { id } = e.currentTarget.dataset
NavgateTo(`/packages/community/repairDetail/index?id=${id}&title=${this.title}`, { isLogin: false }) NavgateTo(`/packages/community/repairDetail/index?id=${id}&title=${this.title}`)
}, },
changeTab(e){ changeTab(e){

View File

@ -270,7 +270,7 @@
}, },
jump(id){ jump(id){
NavgateTo(`/packages/communityService/serviceMore/index?id=${id}`, { isLogin: false }); NavgateTo(`/packages/communityService/serviceMore/index?id=${id}`);
}, },
@ -293,11 +293,11 @@
headerItemClick(e) { headerItemClick(e) {
const { id } = e.currentTarget.dataset; const { id } = e.currentTarget.dataset;
NavgateTo(`/packages/communityService/reservation/index?id=${id}`, {isLogin: false }); NavgateTo(`/packages/communityService/reservation/index?id=${id}`);
}, },
headerShopClick(id){ headerShopClick(id){
NavgateTo(`/packages/communityService/shopDetail/index?id=${id}`, { isLogin: false }); NavgateTo(`/packages/communityService/shopDetail/index?id=${id}`);
}, },

View File

@ -100,7 +100,7 @@
}, },
reservation() { reservation() {
NavgateTo(`/packages/communityService/reservationApply/index?id=${this.id}`, {isLogin: false }); NavgateTo(`/packages/communityService/reservationApply/index?id=${this.id}`);
}, },
}, },
onLoad(options) { onLoad(options) {

View File

@ -98,7 +98,7 @@
handleSelectClick(event) { handleSelectClick(event) {
const { url, title, type } = event.currentTarget.dataset const { url, title, type } = event.currentTarget.dataset
if (!url) return; if (!url) return;
NavgateTo(`${url}?title=${title}&type=${type}`, { isLogin: false }) NavgateTo(`${url}?title=${title}&type=${type}`)
}, },
/** /**

View File

@ -99,10 +99,10 @@
}, },
handleUserInfoClick() { handleUserInfoClick() {
NavgateTo('/packages/user/index/index', { isLogin: false }) NavgateTo('/packages/user/index/index')
}, },
handleShareClick() { handleShareClick() {
NavgateTo('/packages/user/share/index', { isLogin: false }) NavgateTo('/packages/user/share/index')
}, },
headerOrderClick(event) { headerOrderClick(event) {
@ -115,7 +115,7 @@
showCancel: false, showCancel: false,
}) })
} else { } else {
NavgateTo(url, { isLogin: false }) NavgateTo(url)
} }
}, },

View File

@ -282,7 +282,7 @@
headerPointsClick() { headerPointsClick() {
NavgateTo('/packages/user/points/index', { isLogin: false }) NavgateTo('/packages/user/points/index')
}, },

View File

@ -101,7 +101,8 @@
"navigationBarTitleText": "社区列表", "navigationBarTitleText": "社区列表",
"usingComponents": { "usingComponents": {
"tabularCard": "/components/tabularCard/tabularCard", "tabularCard": "/components/tabularCard/tabularCard",
"search": "/components/search/search" "search": "/components/search/search",
"nav-footer": "/components/nav/nav"
} }
} }
}, },

72
pages/login/login.css Normal file
View File

@ -0,0 +1,72 @@
.login {
background-size: 100%;
width: 100%;
height: 1334rpx;
position: fixed;
}
.login-title {
margin-top: 655rpx;
}
.login-tip {
display: flex;
justify-content: center;
}
.login-button {
margin: 61rpx 52rpx 0 48rpx;
}
.login-btn {
font-weight: 400;
font-size: 36rpx;
color: #FFFFFF;
background: #FF512A;
border-radius: 100rpx 100rpx 100rpx 100rpx;
}
.van-button__text {
font-size: 36rpx;
margin: 19rpx 253rpx;
}
.login-to-home {
margin-top: 61rpx;
display: flex;
justify-content: center;
}
.login-to-home-text {
color: #FF512A;
font-size: 26rpx;
text-decoration: underline;
}
.app_login {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-top: 30rpx;
}
.input {
border: 1px solid #EFEFEF;
width: 550rpx;
height: 60rpx;
line-height: 60rpx;
margin-bottom: 30rpx;
}
.tips {
font-size: 24rpx;
color: #FD4529;
}
.app_login_btn {
width: 550rpx;
font-weight: 400;
font-size: 36rpx;
color: #FFFFFF;
background: #FF512A;
border-radius: 100rpx 100rpx 100rpx 100rpx;
margin-top: 60rpx;
}

View File

@ -1,26 +1,35 @@
<template> <template>
<view class="login" style="background-image: url(https://wechat-img-file.oss-cn-beijing.aliyuncs.com/login/Group_491.png);"> <view class="login"
<view class="login-title"> style="background-image: url(https://wechat-img-file.oss-cn-beijing.aliyuncs.com/login/Group_491.png);">
<view class="login-tip" style="font-size: 40rpx; color: #000000;">欢迎来到榴园社区</view> <view class="login-title">
<view class="login-tip" style="font-size: 28rpx; color: #555555; margin-top: 30rpx;">为了更好的体验申请获取您的公开信息</view> <view class="login-tip" style="font-size: 40rpx; color: #000000;">欢迎来到榴园社区</view>
<view class="login-tip" style="font-size: 28rpx; color: #555555; margin-top: 14rpx;">头像昵称等</view>
<view class="login-button"> <view v-if="loginChannel === 'android' || loginChannel === 'ios'" class="app_login">
<button <input class="input" type="number" maxlength="11" data-name="userId" @input='headerInputClick' :value="userId"
class="login-btn" placeholder="请输入手机号" />
open-type="getPhoneNumber" <input class="input" password data-name="passWord" @input='headerInputClick' :value="passWord"
@click="headerLoginClick" placeholder="请输入密码" />
getPhoneNumber="getPhoneNumber" <view class="tips">未注册用户填写手机号后点击登录即可无需输入密码</view>
> <button class="app_login_btn" @click="headerLoginClick">登录</button>
授权登录 </view>
</button>
</view> <view v-if="loginChannel === 'mp-weixin'" class="">
<view class="login-to-home" > <view class="login-tip" style="font-size: 28rpx; color: #555555; margin-top: 30rpx;">为了更好的体验申请获取您的公开信息</view>
<text class="login-to-home-text" @click='tohome'> <view class="login-tip" style="font-size: 28rpx; color: #555555; margin-top: 14rpx;">头像昵称等</view>
返回首页>> <view class="login-button">
</text> <button class="login-btn" open-type="getPhoneNumber" @click="headerLoginClick"
</view> getPhoneNumber="getPhoneNumber">
</view> 授权登录
</view> </button>
</view>
</view>
<view class="login-to-home">
<text class="login-to-home-text" @click='tohome'>
返回首页>>
</text>
</view>
</view>
</view>
</template> </template>
<script> <script>
@ -30,189 +39,185 @@
data() { data() {
return { return {
isLogin: false, isLogin: false,
loginChannel: '', //
userId: '',
passWord: '',
} }
}, },
methods: { methods: {
headerInputClick(e) {
const { name } = e.currentTarget.dataset;
const { value } = e.detail;
this[name] = value
},
headerLoginClick() { headerLoginClick() {
let _this = this; let _this = this;
const systemInfo = uni.getSystemInfoSync();
const platform = systemInfo.platform; if (this.loginChannel === 'android' || this.loginChannel === 'ios') {
// if (platform === 'android' || platform === 'ios') { this.appLogin();
// console.log('', platform); return;
// var weixinOauth = null; }
// plus.oauth.getServices(function(services) {
// for (var i in services) {
// var service = services[i];
// //
// if (service.id == 'weixin') {
// weixinOauth = service;
// break;
// }
// }
// weixinOauth.authorize( function(event){
// const {code} = event;
// console.log('weixinOauth.authorize', event)
// //code,
// _this.appLogin(code);
// }, function(err) {
// //
// // err.code
// console.log('', err)
// })
// }, function(err) {
// // services
// console.log(' services ', err)
// })
// return;
// }
uni.login({ uni.login({
onlyAuthorize: true, onlyAuthorize: true,
success: (res) => { success: (res) => {
console.log('res',res); console.log('res', res);
request(apiArr.login, 'POST', { request(apiArr.login, 'POST', {
code: res.code code: res.code
}).then((res1) => { }).then((loginRes) => {
console.log('11231231', res1); console.log('11231231', loginRes);
if(res1.error) return; //
request(apiArr.loginInfo, 'POST', {}, {token: res1.token}).then((res2) => { uni.setStorageSync('ctoken', loginRes.token);
console.log('11231231', res1); uni.setStorageSync('is_deal', loginRes.is_deal);
if(res2.error) return; uni.setStorageSync('is_dev', loginRes.is_dev);
uni.setStorageSync('is_shop', loginRes.is_shop);
//
request(apiArr.loginInfo, 'POST', {}, {
token: loginRes.token
}).then((res2) => {
console.log('11231231', res2);
if (res2.error) return;
// userId 使 // userId 使
uni.setStorageSync('userId', res2.user_id); uni.setStorageSync('userId', res2.user_id);
uni.setStorageSync('openId', res2.open_id); uni.setStorageSync('openId', res2.open_id);
uni.setStorageSync('shopId', res2.wshop_id); uni.setStorageSync('shopId', res2.wshop_id);
this.isLogin = true; this.isLogin = true;
}) })
uni.hideLoading();
}, (err) => {
console.log('登录接口错误', err);
}) })
} }
}) })
}, },
//
getPhoneNumber(event) { getPhoneNumber(event) {
let that = this let that = this
console.log('thias', that); console.log('thias', that);
const { isLogin } = this; const {
isLogin
} = this;
console.log('获取信息', event); console.log('获取信息', event);
if (event.detail.errMsg === "getPhoneNumber:ok") { if (event.detail.errMsg === "getPhoneNumber:ok") {
request(apiArr.loginGetPhone, 'POST', { request(apiArr.loginGetPhone, 'POST', {
code: event.detail.code code: event.detail.code
}).then((res) => { }).then((res) => {
if (isLogin) { if (isLogin) {
uni.setStorageSync('phone', res.phone); uni.setStorageSync('phone', res.phone);
uni.showToast({ uni.showToast({
title: '登录成功', title: '登录成功',
icon: 'success', icon: 'success',
mask: true, mask: true,
duration: 2000, duration: 2000,
success: () => { success: () => {
// setTimeout(() => { setTimeout(() => {
// this.tohome(); this.tohome();
// }, 2000) }, 2000)
} }
}); });
} else { } else {
uni.showToast({ uni.showToast({
title: '登录失败', title: '登录失败',
icon: 'error', icon: 'error',
mask: true, mask: true,
duration: 2000, duration: 2000,
}) })
} }
}) })
} else { } else {
// uni.removeStorageSync('ctoken'); uni.removeStorageSync('ctoken');
// uni.removeStorageSync('userId'); uni.removeStorageSync('userId');
// uni.removeStorageSync('openId'); uni.removeStorageSync('openId');
// uni.removeStorageSync('phone'); uni.removeStorageSync('phone');
//     uni.removeStorageSync('is_deal'); uni.removeStorageSync('is_deal');
//      uni.removeStorageSync('is_dev'); uni.removeStorageSync('is_dev');
// uni.removeStorageSync('is_shop'); uni.removeStorageSync('is_shop');
// uni.removeStorageSync('shopId'); uni.removeStorageSync('shopId');
console.error('用户拒绝授权:', event.detail.errMsg); console.error('用户拒绝授权:', event.detail.errMsg);
} }
}, },
async appLogin (code) { // app
console.log('appLogin', code) async appLogin() {
try { console.log('appLogin', this.userId);
const res = await request(apiArr.login, 'POST', {code}); console.log('passWord', this.passWord);
if(res.error) return;
wx.setStorageSync('ctoken', res.token);
wx.setStorageSync('is_deal', res.is_deal);
wx.setStorageSync('is_dev', res.is_dev);
wx.setStorageSync('is_shop', res.is_shop); //
const res1 = request(apiArr.loginInfo, 'POST', {}, {token: res.token});
if(res1.error) return
uni.setStorageSync('userId', res2.user_id);
uni.setStorageSync('openId', res2.open_id);
uni.setStorageSync('shopId', res2.wshop_id);
this.isLogin = true;
} catch (error) {
//TODO handle the exception
console.log('业务登录异常', error);
}
try {
uni.showLoading({
title: '登录中...',
mask: true
})
const loginRes = await request(apiArr.login, 'POST', {
phone: this.userId,
password: this.passWord
}, { silent: false });
uni.setStorageSync('ctoken', loginRes.token);
uni.setStorageSync('is_deal', loginRes.is_deal);
uni.setStorageSync('is_dev', loginRes.is_dev);
uni.setStorageSync('is_shop', loginRes.is_shop);
//
const loginInfoRes = await request(apiArr.loginInfo, 'POST', {
token: loginRes.token
}, { slient: false });
uni.setStorageSync('userId', loginInfoRes.user_id);
uni.setStorageSync('openId', loginInfoRes.open_id);
uni.setStorageSync('shopId', loginInfoRes.wshop_id);
uni.setStorageSync('phone', this.userId); // app
this.isLogin = true;
uni.hideLoading();
if (loginRes.msg) {
uni.showModal({
title: '提示',
content: loginRes.msg,
showCancel: false,
complete: (res) => {
if (res.confirm) {
this.tohome();
}
}
})
} else {
this.tohome();
}
} catch (error) {
uni.hideLoading();
//TODO handle the exception
console.log('app登录异常', error);
}
}, },
// //
tohome: function () { tohome: function() {
// console.log(123); // console.log(123);
uni.redirectTo({ uni.redirectTo({
url: '/pages/index/index' url: '/pages/index/index'
}); });
} }
},
onLoad() {
const systemInfo = uni.getSystemInfoSync();
console.log('platformplatform', systemInfo)
this.loginChannel = systemInfo.osName;
return;
if (systemInfo.uniPlatform === 'mp-weixin') {
this.loginChannel = systemInfo.uniPlatform;
} else {
this.loginChannel = systemInfo.osName;
}
} }
} }
</script> </script>
<style> <style>
@import url("./login.css");
.login { </style>
background-size: 100%;
width: 100%;
height: 1334rpx;
position: fixed;
}
.login-title {
margin-top: 655rpx;
}
.login-tip {
display: flex;
justify-content: center;
}
.login-button {
margin: 61rpx 52rpx 0 48rpx;
}
.login-btn {
font-weight: 400;
font-size: 36rpx;
color: #FFFFFF;
background: #FF512A;
border-radius: 100rpx 100rpx 100rpx 100rpx;
}
.van-button__text {
font-size: 36rpx;
margin: 19rpx 253rpx;
}
.login-to-home {
margin-top: 61rpx;
display: flex;
justify-content: center;
}
.login-to-home-text {
color: #FF512A;
font-size: 26rpx;
text-decoration: underline;
}
</style>

View File

@ -213,27 +213,27 @@
methods: { methods: {
// //
toLogin() { toLogin() {
NavgateTo('/packages/user/index/index', { isLogin: false }); NavgateTo('/packages/user/index/index');
}, },
// //
handlePointsClick() { handlePointsClick() {
NavgateTo('/packages/user/points/index', { isLogin: false }); NavgateTo('/packages/user/points/index');
}, },
// //
handleSignClick() { handleSignClick() {
NavgateTo('/packages/user/pointsSign/index', { isLogin: false }); NavgateTo('/packages/user/pointsSign/index');
}, },
// //
handleCommunityClick(){ handleCommunityClick(){
NavgateTo('/packages/community/index/index', { isLogin: false}) NavgateTo('/packages/community/index/index')
}, },
// //
handleApplyOwnerClick(){ handleApplyOwnerClick(){
NavgateTo(`/packages/community/index/index?types=2`, { isLogin: false}) NavgateTo(`/packages/community/index/index?types=2`)
}, },
// //
@ -243,12 +243,11 @@
// //
handleMeApplyClick() { handleMeApplyClick() {
NavgateTo(`/packages/community/ownerList/index`, { isLogin: false}) NavgateTo(`/packages/community/ownerList/index`)
}, },
// //
headerOrderClick(event) { headerOrderClick(event) {
console.log('123133131', event);
if(!event.url) { if(!event.url) {
this.NotOpen(); this.NotOpen();
return return
@ -261,14 +260,14 @@
complete: (res) => { complete: (res) => {
if (res.cancel) {} if (res.cancel) {}
if (res.confirm) { if (res.confirm) {
NavgateTo( '/pages/index/shopcity', {isLogin: false}) NavgateTo( '/pages/index/shopcity')
} }
} }
}) })
return return
} }
console.log('选择城市'); console.log('选择城市');
NavgateTo( `${event.url}`, {isLogin: false}) NavgateTo( `${event.url}`)
} }
}, },
@ -284,7 +283,7 @@
return; return;
} }
if (event.url) { if (event.url) {
NavgateTo( event.url, { isLogin: false}) NavgateTo( event.url)
} }
}, },
@ -306,6 +305,7 @@
async getUserInfo() { async getUserInfo() {
const isCtoken = uni.getStorageSync('ctoken'); const isCtoken = uni.getStorageSync('ctoken');
console.log('12313131313', isCtoken)
if (!isCtoken) return; if (!isCtoken) return;
const res = await request(apiArr.loginInfo, 'POST', {}); const res = await request(apiArr.loginInfo, 'POST', {});
const newUserInfo = { const newUserInfo = {

View File

@ -166,12 +166,12 @@
}, },
headerPickClick(id, orderId, name) { headerPickClick(id, orderId, name) {
NavgateTo(`/reservation/receive/index?id=${id}&name=${name}&orderId=${orderId}`, {isLogin: false }) NavgateTo(`/reservation/receive/index?id=${id}&name=${name}&orderId=${orderId}`)
}, },
headerGoPayClick(title, pic) { headerGoPayClick(title, pic) {
console.log('去使用', title, pic); console.log('去使用', title, pic);
NavgateTo(`/reservation/ticketCode/index?pic=${pic}&name=${title}`, {isLogin: false }) NavgateTo(`/reservation/ticketCode/index?pic=${pic}&name=${title}`)
}, },
// //
@ -193,22 +193,20 @@
}, },
desc(id, total) { desc(id, total) {
console.log('NavgateTo', id);
console.log('totaltotaltotal', total);
if (total === 0) { if (total === 0) {
uni.showToast({ uni.showToast({
title: '暂无可领取数量', title: '暂无可领取数量',
icon: 'none' icon: 'none'
}) })
} }
NavgateTo(`/reservation/receive/index?id=${id}`, {isLogin: false }); NavgateTo(`/reservation/receive/index?id=${id}`);
}, },
headerLookClick() { headerLookClick() {
uni.getLocation({ uni.getLocation({
type: "gcj02", type: "gcj02",
success(res) { success(res) {
NavgateTo(`/reservation/pickPoint/index?lat=${res.latitude}&log=${res.longitude}`, { isLogin: false }) NavgateTo(`/reservation/pickPoint/index?lat=${res.latitude}&log=${res.longitude}`)
}, },
fail(err) { fail(err) {
console.log('errr', err); console.log('errr', err);

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

View File

@ -19358,13 +19358,12 @@ var request = function request(url) {
silent = _options$silent === void 0 ? true : _options$silent, silent = _options$silent === void 0 ? true : _options$silent,
_options$nested = options.nested, _options$nested = options.nested,
nested = _options$nested === void 0 ? false : _options$nested; nested = _options$nested === void 0 ? false : _options$nested;
var ctoken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZWFsZXJfaWQiOjAsImV4cCI6MTc0Njc1Mjg0OCwiaW1nIjoiL3N0YXRpYy9pbWFnZXMvMjAyNS0wNS0wNi9kOW94b3EwYzJoZjV2Z2pxZGYucG5nIiwibXNob3BfaWQiOjAsIm9wZW5faWQiOiJvV2MxODY3b2dYZ0RHektneWtkLUpTM0dVT2tFIiwicm9sZV9pZCI6MSwidXNlcl9pZCI6NzIsInVzZXJfbmFtZSI6IuW-ruS_oeeUqOaItyIsIndzaG9wX2lkIjowfQ.Ycvx_EOFqQnmoUkE4-pp5EMVqQKKTReNsxOxk0NRbSA'; var ctoken = null;
if (options.token) {
// if (options.token) { ctoken = options.token;
// ctoken = options.token; } else {
// } else { ctoken = uni.getStorageSync('ctoken'); // 后续接口强依赖强校验该字段
// ctoken = uni.getStorageSync('ctoken'); // 后续接口强依赖强校验该字段 }
// }
if (silent) { if (silent) {
uni.showLoading({ uni.showLoading({
@ -19395,7 +19394,6 @@ var request = function request(url) {
content: '请登录后查看', content: '请登录后查看',
confirmText: "去登陆", confirmText: "去登陆",
complete: function complete(res) { complete: function complete(res) {
console.log('11131', res);
if (res.cancel) { if (res.cancel) {
uni.hideLoading(); uni.hideLoading();
return; return;
@ -19726,7 +19724,7 @@ Object.defineProperty(exports, "__esModule", {
}); });
exports.apiArr = void 0; exports.apiArr = void 0;
var apiArr = { var apiArr = {
login: '/wechat/mpusers/login', login: '/wechat/multi-login',
// 小程序登录 // 小程序登录
loginInfo: '/wechat/mpusers/login-info', loginInfo: '/wechat/mpusers/login-info',
// 获取用户信息 // 获取用户信息

View File

@ -244,14 +244,10 @@ var _default = {
}, },
pay: function pay() { pay: function pay() {
var shopInfo = this.shopInfo; var shopInfo = this.shopInfo;
(0, _index.NavgateTo)("/kitchen/pay/index?id=".concat(shopInfo.shop_id), { (0, _index.NavgateTo)("/kitchen/pay/index?id=".concat(shopInfo.shop_id));
isLogin: false
});
}, },
jump: function jump() { jump: function jump() {
(0, _index.NavgateTo)('/kitchen/recharge/index', { (0, _index.NavgateTo)('/kitchen/recharge/index');
isLogin: false
});
} }
} }
}; };

View File

@ -21,7 +21,24 @@
"libVersion": "3.8.3", "libVersion": "3.8.3",
"appid": "wxb4018c78fa143450", "appid": "wxb4018c78fa143450",
"projectname": "ZHSQ", "projectname": "ZHSQ",
"condition": {}, "condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
"current": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
}
},
"editorSetting": { "editorSetting": {
"tabIndent": "insertSpaces", "tabIndent": "insertSpaces",
"tabSize": 2 "tabSize": 2

View File

@ -3,5 +3,18 @@
"projectname": "uniapp-ZHSQ", "projectname": "uniapp-ZHSQ",
"setting": { "setting": {
"compileHotReLoad": true "compileHotReLoad": true
},
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/",
"pathName": "pages/login/login",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
} }
} }

View File

@ -261,15 +261,11 @@ var _default = {
} }
}, },
headerPickClick: function headerPickClick(id, orderId, name) { headerPickClick: function headerPickClick(id, orderId, name) {
(0, _index.NavgateTo)("/reservation/receive/index?id=".concat(id, "&name=").concat(name, "&orderId=").concat(orderId), { (0, _index.NavgateTo)("/reservation/receive/index?id=".concat(id, "&name=").concat(name, "&orderId=").concat(orderId));
isLogin: false
});
}, },
headerGoPayClick: function headerGoPayClick(title, pic) { headerGoPayClick: function headerGoPayClick(title, pic) {
console.log('去使用', title, pic); console.log('去使用', title, pic);
(0, _index.NavgateTo)("/reservation/ticketCode/index?pic=".concat(pic, "&name=").concat(title), { (0, _index.NavgateTo)("/reservation/ticketCode/index?pic=".concat(pic, "&name=").concat(title));
isLogin: false
});
}, },
// 筛选指定状态订单 // 筛选指定状态订单
headerSelectClick: function headerSelectClick(item) { headerSelectClick: function headerSelectClick(item) {
@ -286,25 +282,19 @@ var _default = {
this.show = !this.show; this.show = !this.show;
}, },
desc: function desc(id, total) { desc: function desc(id, total) {
console.log('NavgateTo', id);
console.log('totaltotaltotal', total);
if (total === 0) { if (total === 0) {
uni.showToast({ uni.showToast({
title: '暂无可领取数量', title: '暂无可领取数量',
icon: 'none' icon: 'none'
}); });
} }
(0, _index.NavgateTo)("/reservation/receive/index?id=".concat(id), { (0, _index.NavgateTo)("/reservation/receive/index?id=".concat(id));
isLogin: false
});
}, },
headerLookClick: function headerLookClick() { headerLookClick: function headerLookClick() {
uni.getLocation({ uni.getLocation({
type: "gcj02", type: "gcj02",
success: function success(res) { success: function success(res) {
(0, _index.NavgateTo)("/reservation/pickPoint/index?lat=".concat(res.latitude, "&log=").concat(res.longitude), { (0, _index.NavgateTo)("/reservation/pickPoint/index?lat=".concat(res.latitude, "&log=").concat(res.longitude));
isLogin: false
});
}, },
fail: function fail(err) { fail: function fail(err) {
console.log('errr', err); console.log('errr', err);

View File

@ -41,13 +41,12 @@ export const request = (url, method = 'POST', data = {}, options = {}) => {
console.log('request 请求拓展参数 options', options); console.log('request 请求拓展参数 options', options);
const { silent = true, nested = false } = options; const { silent = true, nested = false } = options;
let ctoken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZWFsZXJfaWQiOjAsImV4cCI6MTc0Njc1Mjg0OCwiaW1nIjoiL3N0YXRpYy9pbWFnZXMvMjAyNS0wNS0wNi9kOW94b3EwYzJoZjV2Z2pxZGYucG5nIiwibXNob3BfaWQiOjAsIm9wZW5faWQiOiJvV2MxODY3b2dYZ0RHektneWtkLUpTM0dVT2tFIiwicm9sZV9pZCI6MSwidXNlcl9pZCI6NzIsInVzZXJfbmFtZSI6IuW-ruS_oeeUqOaItyIsIndzaG9wX2lkIjowfQ.Ycvx_EOFqQnmoUkE4-pp5EMVqQKKTReNsxOxk0NRbSA'; let ctoken = null;
if (options.token) {
// if (options.token) { ctoken = options.token;
// ctoken = options.token; } else {
// } else { ctoken = uni.getStorageSync('ctoken'); // 后续接口强依赖强校验该字段
// ctoken = uni.getStorageSync('ctoken'); // 后续接口强依赖强校验该字段 }
// }
if (silent) { if (silent) {
uni.showLoading({ uni.showLoading({
@ -77,7 +76,6 @@ export const request = (url, method = 'POST', data = {}, options = {}) => {
content: '请登录后查看', content: '请登录后查看',
confirmText:"去登陆", confirmText:"去登陆",
complete: (res) => { complete: (res) => {
console.log('11131', res)
if (res.cancel) { if (res.cancel) {
uni.hideLoading(); uni.hideLoading();
return return