diff --git a/gasStation-uni/config.js b/gasStation-uni/config.js
index 25f634e11..9ad023720 100644
--- a/gasStation-uni/config.js
+++ b/gasStation-uni/config.js
@@ -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',
diff --git a/gasStation-uni/pagesHome/PointsMing/PointsMing.vue b/gasStation-uni/pagesHome/PointsMing/PointsMing.vue
index 00aeb14e5..4ff716deb 100644
--- a/gasStation-uni/pagesHome/PointsMing/PointsMing.vue
+++ b/gasStation-uni/pagesHome/PointsMing/PointsMing.vue
@@ -11,7 +11,6 @@
{{item.changeReason}}
积分支出
-
{{item.createTime}}
+{{item.pointsChange}}
@@ -20,7 +19,6 @@
-
@@ -86,7 +84,6 @@
}
}).then((res) => {
if (res.code == 200) {
-
if (this.pageNo != 1) {
this.detailList = this.detailList.concat(res.data.records)
} else {
@@ -174,4 +171,4 @@
font-weight: 500;
color: #F52D22;
}
-
\ No newline at end of file
+
diff --git a/gasStation-uni/pagesMy/Recharge/Recharge.vue b/gasStation-uni/pagesMy/Recharge/Recharge.vue
index 26c0ba5cd..4f361d8af 100644
--- a/gasStation-uni/pagesMy/Recharge/Recharge.vue
+++ b/gasStation-uni/pagesMy/Recharge/Recharge.vue
@@ -14,10 +14,32 @@
-
-
+
+
+ 储值卡
+ 充值成功
+
+
+
+ 充值金额
+ ¥123
+
+
+ 优惠合计
+ ¥999
+
+
+ 订单时间
+ 20230304
+
+
+
+
+
+
@@ -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;
+ }
\ No newline at end of file
diff --git a/gasStation-uni/pagesMy/myorder/myorder.vue b/gasStation-uni/pagesMy/myorder/myorder.vue
index 34bdfa80a..90cb97895 100644
--- a/gasStation-uni/pagesMy/myorder/myorder.vue
+++ b/gasStation-uni/pagesMy/myorder/myorder.vue
@@ -10,7 +10,7 @@
-
+
搜索
@@ -22,16 +22,17 @@
-
+
-
+
-
+
{{getStoreName(storeList,item.storeId)}}
{{getPayName(payList,item.orderStatus)}}
-
+
订单金额
¥{{item.orderAmount}}
@@ -55,31 +56,6 @@
-
-
@@ -92,29 +68,36 @@
return {
title: '',
tapindex: 0,
- tapList: [
- { text: '全部' },
- { text: '待支付' },
- { text: '已完成' },
- { text: '待评价' },
+ tapList: [{
+ text: '全部'
+ },
+ {
+ text: '待支付'
+ },
+ {
+ text: '已完成'
+ },
+ {
+ text: '待评价'
+ },
],
// 订单列表信息
- orderList:[],
- list:[],
- map:{
- page:1,
- pageSize:5,
- storeId:"",
- orderStatus:"",
- remark:"",
+ orderList: [],
+ list: [],
+ map: {
+ page: 1,
+ pageSize: 5,
+ storeId: "",
+ orderStatus: "",
+ remark: "",
},
// 总条数
- total:0,
+ total: 0,
// 店铺列表信息
- storeList:[],
+ storeList: [],
// 支付状态列表
- payList:[],
- query:"",
+ payList: [],
+ query: "",
status: 'more', // 状态-正在加载中
scrollTop: 0,
}
@@ -129,53 +112,53 @@
},
methods: {
// 搜索我的订单
- queryOrder(){
+ queryOrder() {
let _this = this;
_this.list = [];
- if (_this.query==""){
+ if (_this.query == "") {
_this.list = _this.orderList
- }else{
+ } else {
_this.storeList.forEach(item => {
- _this.orderList.forEach(item1 => {
- if (item.name.includes(_this.query)) {
- if (item1.storeId == item.id){
- _this.list.push(item1)
- }
- return
- }
- if (item.name.includes(_this.query)) {
- if (item1.storeId == item.id){
- _this.list.push(item1)
- }
- }
- })
+ _this.orderList.forEach(item1 => {
+ if (item.name.includes(_this.query)) {
+ if (item1.storeId == item.id) {
+ _this.list.push(item1)
+ }
+ return
+ }
+ if (item.name.includes(_this.query)) {
+ if (item1.storeId == item.id) {
+ _this.list.push(item1)
+ }
+ }
+ })
})
}
},
- parseTime(dateTime){
+ parseTime(dateTime) {
let date = new Date(dateTime);
let y = date.getFullYear() + "-";
- let mon = ((date.getMonth()+1 < 10) ? ('0' + date.getMonth()) : date.getMonth())+ "-";
+ let mon = ((date.getMonth() + 1 < 10) ? ('0' + date.getMonth()) : date.getMonth()) + "-";
let d = ((date.getDate() < 10) ? ('0' + date.getDate()) : date.getDate()) + " ";
let h = ((date.getHours() < 10) ? ('0' + date.getHours()) : date.getHours()) + ":";
let m = ((date.getMinutes() < 10) ? ('0' + date.getMinutes()) : date.getMinutes()) + ":";
let s = ((date.getSeconds() < 10) ? ('0' + date.getSeconds()) : date.getSeconds());
- return y+mon+d+h+m+s;
+ return y + mon + d + h + m + s;
},
- getStoreName(list,id){
+ getStoreName(list, id) {
let name = "";
list.forEach(item => {
if (item.id == id) {
- if (item.description!="" && item.description!=null) {
- name = item.name + "("+item.description+")"
- }else{
+ if (item.description != "" && item.description != null) {
+ name = item.name + "(" + item.description + ")"
+ } else {
name = item.name
}
}
})
return name;
},
- getPayName(list,type){
+ getPayName(list, type) {
let name = "";
list.forEach(item => {
if (item.dictValue == type) {
@@ -185,46 +168,46 @@
return name;
},
// 查询支付状态列表信息
- getPayList(){
+ getPayList() {
let _this = this;
request({
url: "system/dict/data/type/pay_status",
method: 'get',
- }).then((res)=>{
+ }).then((res) => {
_this.payList = res.data
})
},
// 查询店铺列表信息
- getStores(){
+ getStores() {
let _this = this;
request({
url: "business/storeInformation/store/stores",
method: 'get',
- }).then((res)=>{
+ }).then((res) => {
_this.storeList = res.data
})
},
// 滚动区域
- scrolltolower(){
- if (this.orderList.length{
+ }).then((res) => {
if (_this.map.page == 1) {
_this.orderList = res.data.records
_this.list = res.data.records
- }else{
+ } else {
_this.orderList = _this.orderList.concat(res.data.records)
_this.list = _this.list.concat(res.data.records)
}
@@ -233,38 +216,38 @@
},
getTapIndex(index) {
this.tapindex = index
- if (this.tapindex==0){
+ if (this.tapindex == 0) {
this.map = {
- storeId:"",
- orderStatus:"",
- remark:"",
+ storeId: "",
+ orderStatus: "",
+ remark: "",
}
this.getMyOrder()
- }else if(this.tapindex==1){
+ } else if (this.tapindex == 1) {
this.map = {
- page:1,
- pageSize:5,
- storeId:"",
- orderStatus:"unpaid",
- remark:"",
+ page: 1,
+ pageSize: 5,
+ storeId: "",
+ orderStatus: "unpaid",
+ remark: "",
}
this.getMyOrder()
- }else if(this.tapindex==2){
+ } else if (this.tapindex == 2) {
this.map = {
- page:1,
- pageSize:5,
- storeId:"",
- orderStatus:"paid",
- remark:"",
+ page: 1,
+ pageSize: 5,
+ storeId: "",
+ orderStatus: "paid",
+ remark: "",
}
this.getMyOrder()
- }else{
+ } else {
this.map = {
- page:1,
- pageSize:5,
- storeId:"",
- orderStatus:"",
- remark:"待评价",
+ page: 1,
+ pageSize: 5,
+ storeId: "",
+ orderStatus: "",
+ remark: "待评价",
}
this.getMyOrder()
}
diff --git a/gasStation-uni/utils/request.js b/gasStation-uni/utils/request.js
index 70c25c2b6..9bed2f3a3 100644
--- a/gasStation-uni/utils/request.js
+++ b/gasStation-uni/utils/request.js
@@ -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'
- })
- })
- }
+ uni.reLaunch({
+ url: '/pagesLogin/login/login'
+ })
+ // if (res.confirm) {
+ // store.dispatch('LogOut').then(res => {
+
+ // })
+ // }
})
reject('无效的会话,或者会话已过期,请重新登录。')
} else if (code === 500) {
@@ -78,4 +79,4 @@ const request = config => {
})
}
-export default request
\ No newline at end of file
+export default request
diff --git a/gasStation-uni/utils/upload.js b/gasStation-uni/utils/upload.js
index 740387e9e..38ce5077a 100644
--- a/gasStation-uni/utils/upload.js
+++ b/gasStation-uni/utils/upload.js
@@ -1,70 +1,81 @@
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
const upload = config => {
- // 是否需要设置 token
- const isToken = (config.headers || {}).isToken === false
- config.header = config.header || {}
- if (getToken() && !isToken) {
- config.header['Authorization'] = 'Bearer ' + getToken()
- }
- // get请求映射params参数
- if (config.params) {
- let url = config.url + '?' + tansParams(config.params)
- url = url.slice(0, -1)
- config.url = url
- }
- return new Promise((resolve, reject) => {
- uni.uploadFile({
- timeout: config.timeout || timeout,
- url: baseUrl + config.url,
- filePath: config.filePath,
- name: config.name || 'file',
- header: config.header,
- formData: config.formData,
- success: (res) => {
- let result = JSON.parse(res.data)
- const code = result.code || 200
- const msg = errorCode[code] || result.msg || errorCode['default']
- if (code === 200) {
- resolve(result)
- } else if (code == 401) {
- showConfirm("登录状态已过期,您可以继续留在该页面,或者重新登录?").then(res => {
- if (res.confirm) {
- store.dispatch('LogOut').then(res => {
- uni.reLaunch({ url: '/pages/login/login' })
- })
- }
- })
- reject('无效的会话,或者会话已过期,请重新登录。')
- } else if (code === 500) {
- toast(msg)
- reject('500')
- } else if (code !== 200) {
- toast(msg)
- reject(code)
- }
- },
- fail: (error) => {
- let { message } = error
- if (message == 'Network Error') {
- message = '后端接口连接异常'
- } else if (message.includes('timeout')) {
- message = '系统接口请求超时'
- } else if (message.includes('Request failed with status code')) {
- message = '系统接口' + message.substr(message.length - 3) + '异常'
- }
- toast(message)
- reject(error)
- }
- })
- })
+ // 是否需要设置 token
+ const isToken = (config.headers || {}).isToken === false
+ config.header = config.header || {}
+ if (getToken() && !isToken) {
+ config.header['Authorization'] = 'Bearer ' + getToken()
+ }
+ // get请求映射params参数
+ if (config.params) {
+ let url = config.url + '?' + tansParams(config.params)
+ url = url.slice(0, -1)
+ config.url = url
+ }
+ return new Promise((resolve, reject) => {
+ uni.uploadFile({
+ timeout: config.timeout || timeout,
+ url: baseUrl + config.url,
+ filePath: config.filePath,
+ name: config.name || 'file',
+ header: config.header,
+ formData: config.formData,
+ success: (res) => {
+ let result = JSON.parse(res.data)
+ const code = result.code || 200
+ const msg = errorCode[code] || result.msg || errorCode['default']
+ if (code === 200) {
+ resolve(result)
+ } else if (code == 401) {
+ showConfirm("登录状态已过期,您可以继续留在该页面,或者重新登录?").then(res => {
+ if (res.confirm) {
+ store.dispatch('LogOut').then(res => {
+ uni.reLaunch({
+ url: '/pages/login/login'
+ })
+ })
+ }
+ })
+
+ reject('无效的会话,或者会话已过期,请重新登录。')
+ } else if (code === 500) {
+ toast(msg)
+ reject('500')
+ } else if (code !== 200) {
+ toast(msg)
+ reject(code)
+ }
+ },
+ fail: (error) => {
+ let {
+ message
+ } = error
+ if (message == 'Network Error') {
+ message = '后端接口连接异常'
+ } else if (message.includes('timeout')) {
+ message = '系统接口请求超时'
+ } else if (message.includes('Request failed with status code')) {
+ message = '系统接口' + message.substr(message.length - 3) + '异常'
+ }
+ toast(message)
+ reject(error)
+ }
+ })
+ })
}
export default upload