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 = {
login: '/wechat/mpusers/login', // 小程序登录
login: '/wechat/multi-login', // 小程序登录
loginInfo: '/wechat/mpusers/login-info', // 获取用户信息
loginGetPhone: '/wechat/mpusers/get-phone', // 获取用户手机号
}

View File

@ -36,7 +36,7 @@
result.data[2].nav_name = "手机通行"
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.splice(1, 2);

View File

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

View File

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

View File

@ -100,10 +100,10 @@
const { type } = e.currentTarget.dataset;
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{
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{
uni.showToast({

View File

@ -205,15 +205,15 @@
this.NotOpen();
return
}
NavgateTo( `${event.url}?title=${pageTitle}`, {isLogin: false})
NavgateTo( `${event.url}?title=${pageTitle}`)
},
repair(){
NavgateTo(`/packages/community/oneRepair/index`, {isLogin: false })
NavgateTo(`/packages/community/oneRepair/index`)
},
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"
/>
</view>
<nav-footer />
</view>
</template>

View File

@ -108,7 +108,7 @@
},
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) {
console.log('12313', event);
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: {
chooseCom(){
NavgateTo(`/packages/community/index/index?joinType=3`, { isLogin: false })
NavgateTo(`/packages/community/index/index?joinType=3`)
},
chooseFac(e){
console.log('eeee', e);
const { type } = e.currentTarget.dataset;
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{
console.log(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{
uni.showToast({
title: '请先选择楼宇号',

View File

@ -82,11 +82,11 @@
},
headerRepairClick(e){
NavgateTo(`/packages/community/oneRepair/index`, { isLogin: false })
NavgateTo(`/packages/community/oneRepair/index`)
},
headerRepairDetailClick(e){
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){

View File

@ -270,7 +270,7 @@
},
jump(id){
NavgateTo(`/packages/communityService/serviceMore/index?id=${id}`, { isLogin: false });
NavgateTo(`/packages/communityService/serviceMore/index?id=${id}`);
},
@ -293,11 +293,11 @@
headerItemClick(e) {
const { id } = e.currentTarget.dataset;
NavgateTo(`/packages/communityService/reservation/index?id=${id}`, {isLogin: false });
NavgateTo(`/packages/communityService/reservation/index?id=${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() {
NavgateTo(`/packages/communityService/reservationApply/index?id=${this.id}`, {isLogin: false });
NavgateTo(`/packages/communityService/reservationApply/index?id=${this.id}`);
},
},
onLoad(options) {

View File

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

View File

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

View File

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

View File

@ -101,7 +101,8 @@
"navigationBarTitleText": "社区列表",
"usingComponents": {
"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>
<view class="login" style="background-image: url(https://wechat-img-file.oss-cn-beijing.aliyuncs.com/login/Group_491.png);">
<view class="login-title">
<view class="login-tip" style="font-size: 40rpx; color: #000000;">欢迎来到榴园社区</view>
<view class="login-tip" style="font-size: 28rpx; color: #555555; margin-top: 30rpx;">为了更好的体验申请获取您的公开信息</view>
<view class="login-tip" style="font-size: 28rpx; color: #555555; margin-top: 14rpx;">头像昵称等</view>
<view class="login-button">
<button
class="login-btn"
open-type="getPhoneNumber"
@click="headerLoginClick"
getPhoneNumber="getPhoneNumber"
>
授权登录
</button>
</view>
<view class="login-to-home" >
<text class="login-to-home-text" @click='tohome'>
返回首页>>
</text>
</view>
</view>
</view>
<view class="login"
style="background-image: url(https://wechat-img-file.oss-cn-beijing.aliyuncs.com/login/Group_491.png);">
<view class="login-title">
<view class="login-tip" style="font-size: 40rpx; color: #000000;">欢迎来到榴园社区</view>
<view v-if="loginChannel === 'android' || loginChannel === 'ios'" class="app_login">
<input class="input" type="number" maxlength="11" data-name="userId" @input='headerInputClick' :value="userId"
placeholder="请输入手机号" />
<input class="input" password data-name="passWord" @input='headerInputClick' :value="passWord"
placeholder="请输入密码" />
<view class="tips">未注册用户填写手机号后点击登录即可无需输入密码</view>
<button class="app_login_btn" @click="headerLoginClick">登录</button>
</view>
<view v-if="loginChannel === 'mp-weixin'" class="">
<view class="login-tip" style="font-size: 28rpx; color: #555555; margin-top: 30rpx;">为了更好的体验申请获取您的公开信息</view>
<view class="login-tip" style="font-size: 28rpx; color: #555555; margin-top: 14rpx;">头像昵称等</view>
<view class="login-button">
<button class="login-btn" open-type="getPhoneNumber" @click="headerLoginClick"
getPhoneNumber="getPhoneNumber">
授权登录
</button>
</view>
</view>
<view class="login-to-home">
<text class="login-to-home-text" @click='tohome'>
返回首页>>
</text>
</view>
</view>
</view>
</template>
<script>
@ -30,189 +39,185 @@
data() {
return {
isLogin: false,
loginChannel: '', //
userId: '',
passWord: '',
}
},
methods: {
headerInputClick(e) {
const { name } = e.currentTarget.dataset;
const { value } = e.detail;
this[name] = value
},
headerLoginClick() {
let _this = this;
const systemInfo = uni.getSystemInfoSync();
const platform = systemInfo.platform;
// if (platform === 'android' || platform === 'ios') {
// console.log('', platform);
// 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;
// }
if (this.loginChannel === 'android' || this.loginChannel === 'ios') {
this.appLogin();
return;
}
uni.login({
onlyAuthorize: true,
success: (res) => {
console.log('res',res);
console.log('res', res);
request(apiArr.login, 'POST', {
code: res.code
}).then((res1) => {
console.log('11231231', res1);
if(res1.error) return;
request(apiArr.loginInfo, 'POST', {}, {token: res1.token}).then((res2) => {
console.log('11231231', res1);
if(res2.error) return;
}).then((loginRes) => {
console.log('11231231', loginRes);
//
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);
//
request(apiArr.loginInfo, 'POST', {}, {
token: loginRes.token
}).then((res2) => {
console.log('11231231', res2);
if (res2.error) return;
// userId 使
uni.setStorageSync('userId', res2.user_id);
uni.setStorageSync('openId', res2.open_id);
uni.setStorageSync('shopId', res2.wshop_id);
this.isLogin = true;
})
uni.hideLoading();
}, (err) => {
console.log('登录接口错误', err);
})
}
})
},
//
getPhoneNumber(event) {
let that = this
console.log('thias', that);
const { isLogin } = this;
const {
isLogin
} = this;
console.log('获取信息', event);
if (event.detail.errMsg === "getPhoneNumber:ok") {
request(apiArr.loginGetPhone, 'POST', {
code: event.detail.code
}).then((res) => {
if (isLogin) {
uni.setStorageSync('phone', res.phone);
uni.showToast({
title: '登录成功',
icon: 'success',
mask: true,
duration: 2000,
success: () => {
// setTimeout(() => {
// this.tohome();
// }, 2000)
}
});
} else {
uni.showToast({
title: '登录失败',
icon: 'error',
mask: true,
duration: 2000,
})
}
uni.setStorageSync('phone', res.phone);
uni.showToast({
title: '登录成功',
icon: 'success',
mask: true,
duration: 2000,
success: () => {
setTimeout(() => {
this.tohome();
}, 2000)
}
});
} else {
uni.showToast({
title: '登录失败',
icon: 'error',
mask: true,
duration: 2000,
})
}
})
} else {
// uni.removeStorageSync('ctoken');
// uni.removeStorageSync('userId');
// uni.removeStorageSync('openId');
// uni.removeStorageSync('phone');
//     uni.removeStorageSync('is_deal');
//      uni.removeStorageSync('is_dev');
// uni.removeStorageSync('is_shop');
// uni.removeStorageSync('shopId');
uni.removeStorageSync('ctoken');
uni.removeStorageSync('userId');
uni.removeStorageSync('openId');
uni.removeStorageSync('phone');
uni.removeStorageSync('is_deal');
uni.removeStorageSync('is_dev');
uni.removeStorageSync('is_shop');
uni.removeStorageSync('shopId');
console.error('用户拒绝授权:', event.detail.errMsg);
}
},
async appLogin (code) {
console.log('appLogin', code)
try {
const res = await request(apiArr.login, 'POST', {code});
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); //
// app
async appLogin() {
console.log('appLogin', this.userId);
console.log('passWord', this.passWord);
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);
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('业务登录异常', error);
console.log('app登录异常', error);
}
},
//
tohome: function () {
tohome: function() {
// console.log(123);
uni.redirectTo({
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>
<style>
.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;
}
@import url("./login.css");
</style>

View File

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

View File

@ -166,12 +166,12 @@
},
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) {
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) {
console.log('NavgateTo', id);
console.log('totaltotaltotal', total);
if (total === 0) {
uni.showToast({
title: '暂无可领取数量',
icon: 'none'
})
}
NavgateTo(`/reservation/receive/index?id=${id}`, {isLogin: false });
NavgateTo(`/reservation/receive/index?id=${id}`);
},
headerLookClick() {
uni.getLocation({
type: "gcj02",
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) {
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,
_options$nested = options.nested,
nested = _options$nested === void 0 ? false : _options$nested;
var ctoken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZWFsZXJfaWQiOjAsImV4cCI6MTc0Njc1Mjg0OCwiaW1nIjoiL3N0YXRpYy9pbWFnZXMvMjAyNS0wNS0wNi9kOW94b3EwYzJoZjV2Z2pxZGYucG5nIiwibXNob3BfaWQiOjAsIm9wZW5faWQiOiJvV2MxODY3b2dYZ0RHektneWtkLUpTM0dVT2tFIiwicm9sZV9pZCI6MSwidXNlcl9pZCI6NzIsInVzZXJfbmFtZSI6IuW-ruS_oeeUqOaItyIsIndzaG9wX2lkIjowfQ.Ycvx_EOFqQnmoUkE4-pp5EMVqQKKTReNsxOxk0NRbSA';
// if (options.token) {
// ctoken = options.token;
// } else {
// ctoken = uni.getStorageSync('ctoken'); // 后续接口强依赖强校验该字段
// }
var ctoken = null;
if (options.token) {
ctoken = options.token;
} else {
ctoken = uni.getStorageSync('ctoken'); // 后续接口强依赖强校验该字段
}
if (silent) {
uni.showLoading({
@ -19395,7 +19394,6 @@ var request = function request(url) {
content: '请登录后查看',
confirmText: "去登陆",
complete: function complete(res) {
console.log('11131', res);
if (res.cancel) {
uni.hideLoading();
return;
@ -19726,7 +19724,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports.apiArr = void 0;
var apiArr = {
login: '/wechat/mpusers/login',
login: '/wechat/multi-login',
// 小程序登录
loginInfo: '/wechat/mpusers/login-info',
// 获取用户信息

View File

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

View File

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

View File

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

View File

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