文档添加关于字符串、字节和void数据类型的说明

在NumPy文档中,常规介绍部分现在包含了关于字符串、字节和void数据类型的信息,以及现有的数值类型。
lu_quan_dev
Tuzki 1 year ago
parent fa0add6152
commit 24441a7490
  1. 26
      common/httpRequest.js
  2. 69
      common/login.js
  3. 12
      pages/index/index.vue
  4. 2
      store/modules/user.js
  5. 2
      subPageA/scenic/scenicdetial/scenicdetial.css
  6. 41
      subPageA/scenic/scenicdetial/scenicdetial.vue
  7. 38
      subPageA/scenic/sceniclist/sceniclist.vue
  8. 2
      subPageB/static/css/scenicdetial.css
  9. 4
      subPageC/bookTicket/bookTicket.vue
  10. 11
      subPageC/order/order.vue

@ -20,16 +20,15 @@ const refreshToken = () => {
store.commit('setUserInfo', null)
uni.removeStorageSync('userInfo');
setTimeout(() => {
uni.navigateBack({ delta: 1 })
}, 1500)
uni.showToast({
title: '用户失效,请重新登录',
title: '登录过期,请重新登录',
icon: 'none',
mask: true
})
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/index'
});
},1500)
}else{
return module.exports.post(config.refreshToken, { refreshToken: refreshTokenValue }, 'application/json', null, false, false)
@ -55,7 +54,7 @@ const refreshToken = () => {
const requestInterceptor = function (config) {
const tok = store.state.userInfo.accessToken || uni.getStorageSync('userInfo').accessToken;
const tok = uni.getStorageSync('userInfo') ? uni.getStorageSync('userInfo').accessToken:null;
if (tok) {
config.header['Authorization'] = 'Bearer ' + tok;
}
@ -97,6 +96,19 @@ const responseInterceptor = function (response,config) {
}).catch(reject);
});
}
if(code&&code==400){
store.commit('setUserInfo', null)
console.log(store,'store清除了吗')
uni.removeStorageSync('userInfo');
setTimeout(() => {
uni.navigateBack({ delta: 1 })
}, 1500)
uni.showToast({
title: '登录过期,请重新登录',
icon: 'none',
mask: true
})
}
return response[1];
};

@ -1,16 +1,16 @@
import store from '@/store';
// APP--授权登录
// type授权登录平台 'qq'、'weixin'、'apple'
export const loginApp = (type,successCallback,errorCallback) => {
export const loginApp = (type, successCallback, errorCallback) => {
uni.login({
provider: type,
success: function(loginRes) {
success: function (loginRes) {
// 获取用户信息
uni.getUserInfo({
provider: type,
success: function(infoRes) {
success: function (infoRes) {
let data = {}
if(type=='qq'){
if (type == 'qq') {
data = {
'openid': loginRes.authResult.openid,
'nickname': infoRes.userInfo.nickname,
@ -19,7 +19,7 @@ export const loginApp = (type,successCallback,errorCallback) => {
'city': infoRes.userInfo.city,
'figureurl': infoRes.userInfo.figureurl_qq
}
}else if(type=='weixin'){
} else if (type == 'weixin') {
data = {
'openid': loginRes.authResult.openid,
'nickname': infoRes.userInfo.nickName,
@ -30,18 +30,18 @@ export const loginApp = (type,successCallback,errorCallback) => {
'headimgurl': infoRes.userInfo.avatarUrl,
'unionid': loginRes.authResult.unionid
}
}else if(type=='apple'){
} else if (type == 'apple') {
data = {
verifyType: 'password',
personalPhone: '13888888888',
personalPhoneCountryCode: '86',
password:'123456'
password: '123456'
}
}
successCallback && successCallback(data)
}
});
},fail: function (err) {
}, fail: function (err) {
console.log(res, "失败")
errorCallback && errorCallback(res)
}
@ -81,18 +81,18 @@ export const getPhoneInfo = (info, successCallback, errCallback) => {
// });
}
// 微信/支付宝小程序---通用授权个人信息登录
export const getUserInfo = (successCallback,errorCallback) => {
export const getUserInfo = (successCallback, errorCallback) => {
uni.showLoading({
title: '正在申请授权',
});
// #ifdef MP-WEIXIN
uni.getUserProfile({
desc: '用于完善会员资料',
success: function(res) {
success: function (res) {
uni.hideLoading()
var offUserInfo = res.userInfo
successCallback && successCallback(offUserInfo)
},fail: (res) => {
}, fail: (res) => {
uni.hideLoading()
errorCallback && errorCallback(res)
}
@ -105,7 +105,7 @@ export const getUserInfo = (successCallback,errorCallback) => {
var offUserInfo = JSON.parse(res.response).response // 以下方的报文格式解析两层 response
offUserInfo.avatarUrl = offUserInfo.avatar
successCallback && successCallback(offUserInfo)
},fail: (res) => {
}, fail: (res) => {
uni.hideLoading()
console.log(res, "失败")
errorCallback && errorCallback(res)
@ -131,14 +131,14 @@ export const getToken = () => {
username: 'ceshi',
password: '111111',
}
uni.$u.http.post('/api/Tokensys/login',httpData,{custom: {isFactory:false}}).then(res => {
if(res.code==1){
uni.$u.http.post('/api/Tokensys/login', httpData, { custom: { isFactory: false } }).then(res => {
if (res.code == 1) {
let userInfo = {
token:res.token,//token用于判断是否登录
token: res.token,//token用于判断是否登录
}
console.log(res.token,'res.token')
store.commit('setUserInfo',userInfo)
console.log(store.state.userInfo.token,'getToken-token')
console.log(res.token, 'res.token')
store.commit('setUserInfo', userInfo)
console.log(store.state.userInfo.token, 'getToken-token')
// uni.$emit("loginCallback") //全局登录监听回调方法
}
while (promiseResult.length) {
@ -169,40 +169,35 @@ export const getCurrentRouter = (callback) => {
var throttleLogin = true
//判断是否登录(所有端)
export const judgeLogin = (callback) => {
let storeUserInfo = store.state.userInfo;
if (!storeUserInfo.userId){ // nvue页面读取不到vuex里面数据,将取缓存
// #ifdef MP-WEIXIN
storeUserInfo = uni.getStorageSync('userInfo')
// #endif
}
console.log(storeUserInfo,'storeUserInfo----')
if (!storeUserInfo.accessToken) {
if(throttleLogin){
console.log('judgeLogin', store)
const storeUserInfo = uni.getStorageSync('userInfo')
if (!storeUserInfo) {
if (throttleLogin) {
throttleLogin = false
setTimeout(()=>{
setTimeout(() => {
throttleLogin = true //节流
},1000)
store.commit('setCurrentRouter',getCurrentRouter()) //获取当前路径
}, 1000)
store.commit('setCurrentRouter', getCurrentRouter()) //获取当前路径
// #ifdef MP
store.commit('setLoginPopupShow', true);
// #endif
// #ifdef APP-PLUS
uni.$showModal({
title: "登录提示",
confirmVal:'去登录',
cancelVal:'再逛会',
content:'此时此刻需要您登录喔~',
}).then(res=>{
confirmVal: '去登录',
cancelVal: '再逛会',
content: '此时此刻需要您登录喔~',
}).then(res => {
uni.navigateTo({
url: "/pages/user/login"
});
}).catch(res=>{})
}).catch(res => { })
// #endif
}else{
} else {
// uni.$u.toast('您点击的太频繁了')
}
}else{
} else {
callback && callback()
}
}

@ -573,18 +573,10 @@ export default {
},
goToDetail: function (type, guid, region) {
if (type == "scenic") {
// const list = JSON.stringify(this.scenicList)
let arr = this.scenicList.filter((item) => item.guid != guid.guid);
let list = []
if (arr.length <= 2) {
list = JSON.stringify(arr)
} else {
list = JSON.stringify(arr.slice(0, 2))
}
console.log("list", list)
uni.navigateTo({
// url: "/subPageA/scenic/scenicdetial/scenicdetial?guid=" + guid + `&listA=` + list,
url: "/subPageA/scenic/scenicdetial/scenicdetial?guid=" + guid.guid + `&list=` + list,
url: "/subPageA/scenic/scenicdetial/scenicdetial?guid=" + guid.guid ,
});
} else if (type == "food") {
uni.navigateTo({

@ -13,6 +13,8 @@ export const mutations = {
// #ifndef H5
uni.setStorageSync('userInfo', state.userInfo);
// #endif
}else{
state.userInfo = null
}
},
// 退出APP

@ -69,7 +69,7 @@
.btn_open{display: none}
/*景区地址*/
.btn_daoh{ background: #44b7ab; color: #fff; font-size:28rpx ; display: inline-block; padding:0rpx 30rpx; height: 60rpx; line-height: 60rpx; }
.btn_daoh{ background: #0983FF; color: #fff; font-size:28rpx ; display: inline-block; padding:0rpx 30rpx; height: 60rpx; line-height: 60rpx; }

@ -60,10 +60,10 @@
<span class="ticket-rule">{{ item.refundRulesName }}</span>
</view>
<view class="ticket-tips">
<view :class="item.qmxSettlementPrice == null ? 'ticket-price' :'decoration'">{{
<view class="ticket-price" v-if="item.qmxId == null">{{
item.settlementPrice
| money }} <span class="m-danwei"></span></view>
<view class="ticket-price" v-if="item.qmxSettlementPrice!=null">{{ item.qmxSettlementPrice
<view class="ticket-price" v-else>{{ item.qmxSettlementPrice
| money }} <span class="m-danwei"></span></view>
</view>
<view class="btn-box">
@ -74,10 +74,11 @@
</view>
<!-- 攻略 -->
<view class="mode_com mt_1 gl" v-if="wanleList.length > 0 && wanleList != undefined">
<text class="tit_com">附近玩乐</text>
<text class="tit_com">推荐景区</text>
<text v-if="wanleList.length == 0 || wanleList == undefined" class="mssj_adr">暂无数据</text>
<view class="category-content">
<view class="product-item" v-for="(p_item, p_index) in wanleList">
<view class="product-item" v-for="(p_item, p_index) in wanleList" @click="detailInfo(p_item.cid)"
:key="p_index">
<image class="product-img" :src="p_item.thumb || p_item.slogo"></image>
<view class="m-content">
<text class="product-title1">{{ p_item.cname || p_item.sname }}</text>
@ -150,12 +151,12 @@ export default {
mask: true,
});
this.guid = options.guid;
if (options.list != "" && options.list != null) {
const arr = JSON.parse(options.list);
// if (options.list != "" && options.list != null) {
// const arr = JSON.parse(options.list);
this.wanleList = arr;
// this.wanleList = arr;
}
// }
this.detailInfo(options.guid);
this.getIsShow();
// #ifdef H5
@ -263,6 +264,28 @@ export default {
},
},
methods: {
getRedisData(){
var data = {
key: this.$param.userkey + "_scenic_list",
};
this.$Request.post(this.$config.getRedisData, data).then((res) => {
if (res.status == 200 && res.data.error == 0) {
let list = [];
list = res.data.list[0].content;
let filteredList = list.filter(item => {
return item.isrecommend === "YES" && item.cid != this.guid;
});
if (Array.isArray(filteredList) && filteredList.length>0){
filteredList.forEach(item=>{
item.thumb = this.$config.ROOTPATH + item.thumb;
})
}
this.wanleList = filteredList
} else {
this.wanleList = []
}
});
},
bookIt(val) {
this.judgeLogin((resa) => {
const obj = {
@ -346,6 +369,7 @@ export default {
});
},
detailInfo: function (guid) {
this.guid = guid
/* var that = this;
var data = {
key: this.$param.userkey+'_scenic_' + guid
@ -413,6 +437,7 @@ export default {
this.getTicketList(this.info.controlInfo.cyjcScenicId);
uni.hideLoading();
this.getRedisData()
});
},

@ -58,16 +58,22 @@
<view class="category-content" v-if="scenicList.content.length > 0">
<view class="product-item relative" v-for="(p_item, p_index) in scenicList.content"
@tap="gotoDetail(p_item.cid)">
<view class="lq_recommend" v-if="p_item.isrecommend=='YES'">
<image src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/tuijian.png" mode="widthFix"></image>
<view class="lq_recommend" v-if="p_item.isrecommend == 'YES'">
<image src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/tuijian.png"
mode="widthFix"></image>
</view>
<view style="width:200rpx;flex:0 0 200rpx; height: 150rpx;overflow: hidden;">
<image mode="aspectFill" style="width:100%; height: 200rpx;" :src="p_item.thumb"></image>
</view>
<view style="width:200rpx;flex:0 0 200rpx; height: 150rpx;overflow: hidden;"><image mode="aspectFill" style="width:100%; height: 200rpx;" :src="p_item.thumb"></image></view>
<view class="m-content">
<view class="product-title1">{{ p_item.cname }}</view>
<view class="product-title m-blue border blue-border">{{
p_item.slevel
}}</view>
<view class="product-con"><image src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon_address.png" mode="widthFix"></image>{{ p_item.address }}</view>
<view class="product-con">
<image src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon_address.png"
mode="widthFix"></image>{{ p_item.address }}
</view>
</view>
</view>
</view>
@ -394,16 +400,9 @@ export default {
},
gotoDetail(e) {
console.log(e);
let arr = this.scenicList.content.filter((item) => item.cid != e);
let list = []
if (arr.length <= 2) {
list = JSON.stringify(arr)
} else {
list = JSON.stringify(arr.slice(0, 2))
}
console.log("list", list)
uni.navigateTo({
url: `/subPageA/scenic/scenicdetial/scenicdetial?guid=` + e + `&list=` + list,
url: `/subPageA/scenic/scenicdetial/scenicdetial?guid=` + e,
});
},
getRedisRegion: function () {
@ -1035,7 +1034,7 @@ page {
.m-content {
overflow: hidden;
flex:1;
flex: 1;
margin-left: 15rpx;
.product-title1 {
@ -1050,13 +1049,20 @@ page {
padding: 3rpx 10rpx;
margin-bottom: 20rpx;
}
.product-con{ font-size: 28rpx;color: #999;
.product-con {
font-size: 28rpx;
color: #999;
height: 40rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
image{width: 24rpx;margin-right: 8rpx;}
image {
width: 24rpx;
margin-right: 8rpx;
}
}
}
}

@ -69,7 +69,7 @@
.btn_open{display: none}
/*景区地址*/
.btn_daoh{ background: #44b7ab; color: #fff; font-size:28rpx ; display: inline-block; padding:0rpx 30rpx; height: 60rpx; line-height: 60rpx; }
.btn_daoh{ background: #0983FF; color: #fff; font-size:28rpx ; display: inline-block; padding:0rpx 30rpx; height: 60rpx; line-height: 60rpx; }

@ -61,7 +61,7 @@
@change="changeCount($event, ticket)" />
</view>
<view class="m-ticket-count-value" v-else>
<uni-number-box :min="0" :max="maxBuyNums" :disabled="!ticket.date"
<uni-number-box :min="ticket.qmxTicketInfoVO.minBuyNum ? ticket.qmxTicketInfoVO.minBuyNum:0" :max="ticket.qmxTicketInfoVO.maxBuyNum ? ticket.qmxTicketInfoVO.maxBuyNum :maxBuyNums" :disabled="!ticket.date"
v-model="ticket.num" @change="changeCount($event, ticket)" />
</view>
</view>
@ -875,7 +875,7 @@ export default {
const index = res.data.findIndex(item => item.date == nowDate)
if (index != -1) {
if (res.data[index].isAvailable == true) {
that.maxBuyNums = res.data[index].inventory
that.maxBuyNums = res.data[index].inventory==-1? 100: res.data[index].inventory
that.overSituation = true
} else {
that.overSituation = false

@ -130,12 +130,9 @@
<view class="m-middle-list-item">
<view class="m-item-label">退款清单</view>
<view class="m-item-value-box">
<view class="m-item-value m-item-value-item" v-for="item in orderInfo.ticketList"><span
class="ticket-name">{{
item.ticketname }}</span>
<span class="ticket-num">*{{
item.ticketNums
}}</span>
<view class="m-item-value m-item-value-item" v-for="item in orderInfo.ticketList">
<span class="ticket-name">{{item.ticketname }}</span>
<span class="ticket-num">*{{item.ticketNums}}</span>
</view>
</view>
</view>
@ -245,6 +242,7 @@ export default {
},
closeBackMoney() {
this.$refs.refundPopup.close();
this.upCallback()
},
//退
backMoney() {
@ -753,6 +751,7 @@ export default {
.m-item-label {
width: 200rpx;
color: #666;
flex: none;
}
.m-item-value-box {

Loading…
Cancel
Save