12.05前端

This commit is contained in:
@QQNZX 2023-12-06 09:20:25 +08:00
parent 426cd1ca30
commit 1194f7db5c
6 changed files with 254 additions and 185 deletions

View File

@ -1,12 +1,7 @@
// 应用全局配置
module.exports = {
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
// baseUrl: 'http://192.168.0.196:8081/',
<<<<<<< HEAD
baseUrl: 'http://192.168.1.6:8008/',
=======
baseUrl: 'http://192.168.0.196:8080/',
>>>>>>> 6a67ef9347914e251c82bfcd14c04a8964fd161f
baseUrl: 'http://192.168.0.181:8008/',
// baseUrl: 'http://192.168.1.5:8002/cdJdc',
imagesUrl: 'http://www.nuoyunr.com/lananRsc',

View File

@ -11,7 +11,6 @@
<view class="">
<view class="title" v-if="item.changeType == 1">{{item.changeReason}}</view>
<view class="title" v-else style="color: #F52D22;">积分支出</view>
<view class="times">{{item.createTime}}</view>
</view>
<view class="sr-nmb" v-if="item.changeType == 1">+{{item.pointsChange}}</view>
@ -20,7 +19,6 @@
<!-- 判断根据实际情况而改 -->
<u-empty text="积分明细" v-if="mingList.length == 0" icon="http://cdn.uviewui.com/uview/empty/list.png">
</u-empty>
<u-loadmore :status="status" v-if="show == true" />
</view>
</view>
@ -86,7 +84,6 @@
}
}).then((res) => {
if (res.code == 200) {
if (this.pageNo != 1) {
this.detailList = this.detailList.concat(res.data.records)
} else {

View File

@ -14,10 +14,32 @@
<view class="gang" :class="{ 'lan' : tindex == index }"></view>
</view>
</view>
<!-- Recharge -->
<u-empty v-if="list.length == 0 " mode="coupon" text="内容为空"
<view class="ail">
<view class="box-order" v-for="(item,index) in list" :key="index">
<view class="or-box-top">
<view class="">储值卡</view>
<view class="chengg">充值成功</view>
</view>
<view class="but-box">
<view class="huis">充值金额</view>
<view class="">123</view>
</view>
<view class="but-box">
<view class="huis">优惠合计</view>
<view class="reds">999</view>
</view>
<view class="but-box">
<view class="huis">订单时间</view>
<view class="">20230304</view>
</view>
</view>
</view>
<!-- <u-empty v-if="list.length == 0 " mode="coupon" text="内容为空"
icon="http://cdn.uviewui.com/uview/empty/coupon.png">
</u-empty>
</u-empty> -->
</view>
</view>
</template>
@ -28,7 +50,7 @@
return {
title: '',
tindex: 0,
list: [],
list: ["1"],
tapList: [{
text: "全部"
},
@ -123,4 +145,64 @@
.lan {
background: #0000ff;
}
.box-order {
width: 95%;
border-radius: 8px;
background: #ffffff;
box-sizing: border-box;
padding: 10px;
margin: 10px auto;
}
.or-box-top {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 5px 0px;
border-bottom: 1px solid #e5e5e5;
}
.chengg {
color: #1678ff;
}
.but-box {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
margin: 5px 0px;
}
.reds {
color: red;
}
.huis {
color: #666666;
}
.end-box {
width: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
}
.anniu {
width: 70px;
height: 25px;
background-color: #1678ff;
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
border-radius: 15px;
}
</style>

View File

@ -24,9 +24,10 @@
</view>
<view>
<scroll-view scroll-y="true" :scroll-top="scrollTop" id="scrollList" style="height: 80vh;" @scrolltolower="scrolltolower">
<scroll-view scroll-y="true" :scroll-top="scrollTop" id="scrollList" style="height: 80vh;"
@scrolltolower="scrolltolower">
<!-- 列表 -->
<view class="box-order" v-for="(item,index) in list">
<view class="box-order" v-for="(item,index) in list" :key="index">
<view class="or-box-top">
<view class="">{{getStoreName(storeList,item.storeId)}}</view>
<view class="chengg">{{getPayName(payList,item.orderStatus)}}</view>
@ -56,31 +57,6 @@
</scroll-view>
</view>
<!-- <view class="box-order">
<view class="or-box-top">
<view class="">加油站名称</view>
<view class="chengg">支付成功</view>
</view>
<view class="but-box">
<view class="huis">订单金额</view>
<view class="">999999</view>
</view>
<view class="but-box">
<view class="huis">优惠合计</view>
<view class="reds">999999</view>
</view>
<view class="but-box">
<view class="huis">订单时间</view>
<view class="">2023.3.4</view>
</view>
<view class="end-box">
<view class="anniu">
<text>评价有礼</text>
</view>
</view>
</view> -->
</view>
</view>
</template>
@ -92,11 +68,18 @@
return {
title: '',
tapindex: 0,
tapList: [
{ text: '全部' },
{ text: '待支付' },
{ text: '已完成' },
{ text: '待评价' },
tapList: [{
text: '全部'
},
{
text: '待支付'
},
{
text: '已完成'
},
{
text: '待评价'
},
],
//
orderList: [],

View File

@ -43,13 +43,14 @@ const request = config => {
const msg = errorCode[code] || res.data.msg || errorCode['default']
if (code === 401) {
showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
if (res.confirm) {
store.dispatch('LogOut').then(res => {
uni.reLaunch({
url: 'pagesLogin/login/login'
url: '/pagesLogin/login/login'
})
})
}
// if (res.confirm) {
// store.dispatch('LogOut').then(res => {
// })
// }
})
reject('无效的会话,或者会话已过期,请重新登录。')
} else if (code === 500) {

View File

@ -1,8 +1,14 @@
import store from '@/store'
import config from '@/config'
import { getToken } from '@/utils/auth'
import {
getToken
} from '@/utils/auth'
import errorCode from '@/utils/errorCode'
import { toast, showConfirm, tansParams } from '@/utils/common'
import {
toast,
showConfirm,
tansParams
} from '@/utils/common'
let timeout = 10000
const baseUrl = config.baseUrl
@ -38,10 +44,13 @@ const upload = config => {
showConfirm("登录状态已过期,您可以继续留在该页面,或者重新登录?").then(res => {
if (res.confirm) {
store.dispatch('LogOut').then(res => {
uni.reLaunch({ url: '/pages/login/login' })
uni.reLaunch({
url: '/pages/login/login'
})
})
}
})
reject('无效的会话,或者会话已过期,请重新登录。')
} else if (code === 500) {
toast(msg)
@ -52,7 +61,9 @@ const upload = config => {
}
},
fail: (error) => {
let { message } = error
let {
message
} = error
if (message == 'Network Error') {
message = '后端接口连接异常'
} else if (message.includes('timeout')) {