Compare commits

..

No commits in common. 'master' and 'xiaozy_积分' have entirely different histories.

  1. 10
      packageIntegral/productList/index.vue
  2. 112
      packageOrders/pages/orderList/orderList.vue
  3. 7
      pages/login/boforeLogin/boforeLogin.vue
  4. 9
      pages/login/posLogin/posLogin.vue
  5. 44
      utils/request.js

@ -24,7 +24,7 @@
<view class="introduce"> <view class="introduce">
<image :src="item.url"></image> <image :src="item.url"></image>
<view>{{item.productName}}</view> <view>{{item.productName}}</view>
<view>规格{{ item.attributesTypeName }}</view> <view>规格默认</view>
<view>库存{{item.totalStock}}</view> <view>库存{{item.totalStock}}</view>
</view> </view>
<view class="examine" @click="examineDetail(item)" <view class="examine" @click="examineDetail(item)"
@ -215,7 +215,7 @@
productByPage() { productByPage() {
serve.productByPage(this.paramter).then(res => { serve.productByPage(this.paramter).then(res => {
if (res.code === 20000) { if (res.code === 20000) {
if (!res.data.list.length && this.paramter.currentPage != 1) { if (!res.data.list.length&&this.paramter.currentPage!=1) {
uni.showToast({ uni.showToast({
title: '没有更多订单啦~', title: '没有更多订单啦~',
icon: 'none' icon: 'none'
@ -245,10 +245,8 @@
this.$refs.delete.open('center') this.$refs.delete.open('center')
this.deleteData = item this.deleteData = item
}, },
deleteIntegral() { deleteIntegral(){
serve.deleteProductById({ serve.deleteProductById({id:this.deleteData.id}).then(res=>{
id: this.deleteData.id
}).then(res => {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none' icon: 'none'

@ -4,7 +4,6 @@
<block slot="backText">返回</block> <block slot="backText">返回</block>
<block slot="content">加油记录</block> <block slot="content">加油记录</block>
</cu-custom> </cu-custom>
<view class="fixed-t"> <view class="fixed-t">
<view class="flex bg-main-oil padding solid-bottom"> <view class="flex bg-main-oil padding solid-bottom">
<!-- <view class="flex-sub"> <!-- <view class="flex-sub">
@ -25,11 +24,7 @@
v-for="(item,index) in tabList" :key="index" @tap="tabSelect" :data-id="index">{{item}}</view> v-for="(item,index) in tabList" :key="index" @tap="tabSelect" :data-id="index">{{item}}</view>
</view> </view>
</scroll-view> </scroll-view>
<view v-if="exportShow" style="margin-top: 16rpx;text-align: right;padding-right: 30rpx;">
<button class="cu-btn bg-white" style="border: 1px solid #ddd;" @click="orderExport">订单导出</button>
</view>
</view> </view>
<view v-if="exportShow" style="padding: 24rpx;"></view>
<!-- <view class="placeholder-hidden"> <!-- <view class="placeholder-hidden">
<view class="flex bg-main-oil padding solid-bottom"> <view class="flex bg-main-oil padding solid-bottom">
<view class="flex-sub"> <view class="flex-sub">
@ -51,12 +46,12 @@
</view> </view>
</scroll-view> </scroll-view>
</view> --> </view> -->
<!-- <view v-if="exportShow"> <view v-if="exportShow==true">
<view style="padding: 30rpx;"></view> <view style="padding: 30upx;"></view>
<view style="position: fixed;width: 750rpx;z-index: 5;text-align: right;top:315rpx;right: 30rpx;"> <view style="position: fixed;width: 750upx;z-index: 5;text-align: right;top:315upx;right: 30upx;">
<button class="cu-btn bg-white" style="border: 1px solid #ddd;" @click="orderExport">订单导出</button> <button class="cu-btn bg-white" @click="orderExport">订单导出</button>
</view>
</view> </view>
</view> -->
<view class="padding  padding-bottom-0" style="padding-top: 200upx;"> <view class="padding  padding-bottom-0" style="padding-top: 200upx;">
<!-- 0 全部 1 待支付 2 已支付 3退款 --> <!-- 0 全部 1 待支付 2 已支付 3退款 -->
@ -114,22 +109,19 @@
<input v-model="params.email" class="card_item_input" placeholder="请输入邮箱" /> <input v-model="params.email" class="card_item_input" placeholder="请输入邮箱" />
</view> </view>
<view class="popup_card_from_item"> <view class="popup_card_from_item">
<view class="popup_card_from_item_left_text" style="margin-top: 32rpx;">开始时间</view> <view class="popup_card_from_item_left_text">开始时间</view>
<view class="uni-list-cell-db"> <view class="uni-list-cell-db">
<uni-datetime-picker type="datetime" :value="startDate" @change="startDateChange" /> <picker mode="date" :value="startDate" @change="startDateChange" class="uni-picker">
<!-- <picker mode="date" :value="startDate" @change="startDateChange" class="uni-picker">
<view class="uni-input">{{startDate}}</view> <view class="uni-input">{{startDate}}</view>
</picker> --> </picker>
</view> </view>
</view> </view>
<view class="popup_card_from_item"> <view class="popup_card_from_item">
<view class="popup_card_from_item_left_text" style="margin-top: 32rpx;">结束时间</view> <view class="popup_card_from_item_left_text">结束时间</view>
<view class="uni-list-cell-db"> <view class="uni-list-cell-db">
<uni-datetime-picker type="datetime" :value="endDate" @change="endDateChange" <picker mode="date" :value="endDate" @change="endDateChange" :start="endStartDate" :end="endEndDate" class="uni-picker">
:start="endStartDate" :end="endEndDate" />
<!-- <picker mode="date" :value="endDate" @change="endDateChange" :start="endStartDate" :end="endEndDate" class="uni-picker">
<view class="uni-input">{{endDate}}</view> <view class="uni-input">{{endDate}}</view>
</picker> --> </picker>
</view> </view>
</view> </view>
</view> </view>
@ -158,13 +150,13 @@
data() { data() {
return { return {
startTime: '', startTime:'',
endTime: "", endTime:"",
activeSource: '小程序', activeSource: '小程序',
indexSource: 1, indexSource: 1,
sources: ['网页版', '小程序'], sources: ['网页版', '小程序'],
tabList: [ tabList: [
'全部', '待支付', '已支付 ', '退款' '全部','待支付', '已支付 ', '退款'
], ],
TabCur: 0, TabCur: 0,
pageNumber: 1, pageNumber: 1,
@ -205,15 +197,15 @@
params: { params: {
siteId: uni.getStorageSync('oilSitePriceId'), siteId: uni.getStorageSync('oilSitePriceId'),
siteName: uni.getStorageSync('oilSitePriceName'), siteName: uni.getStorageSync('oilSitePriceName'),
email: '', email:'',
startTime: '', startTime:'',
endTime: '' endTime:''
}, },
startDate: '', startDate:'',
endDate: '', endDate:'',
endStartDate: '', endStartDate:'',
endEndDate: '', endEndDate:'',
exportShow: false exportShow:false
} }
}, },
@ -230,19 +222,14 @@
'1689183144276463616', '1689183144276463616',
'1689183774927818752', '1689183774927818752',
'1689184331812888576', '1689184331812888576',
'1689185023261741056', '1689185023261741056'
'1782596400854310912',
'1661994395596533760',
'1825776105145946112',
'1802612281797746688',
'1508364963431362560'
] ]
var exportFields = exportList.filter((item) => { var exportFields = exportList.filter((item) => {
return item == uni.getStorageSync('oilSitePriceId'); return item == uni.getStorageSync('oilSitePriceId');
}) })
if (exportFields.length > 0) { if(exportFields.length>0){
this.exportShow = true this.exportShow = true
} else { }else{
this.exportShow = false this.exportShow = false
} }
@ -255,16 +242,16 @@
this.loadMoreOrder('onReachBottom') this.loadMoreOrder('onReachBottom')
}, },
methods: { methods: {
getTime() { getTime(){
let nowDate = new Date(); let nowDate = new Date();
let year = nowDate.getFullYear(); let year = nowDate.getFullYear();
let month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1) : nowDate.getMonth() + 1; let month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1) : nowDate.getMonth() + 1;
let day = nowDate.getDate() < 10 ? "0" + nowDate.getDate() : nowDate.getDate(); let day = nowDate.getDate() < 10 ? "0" + nowDate.getDate() : nowDate.getDate();
let hr = nowDate.getHours() let hr = nowDate.getHours()
let mf = nowDate.getMinutes() < 10 ? '0' + nowDate.getMinutes() : nowDate.getMinutes() let mf = nowDate.getMinutes() < 10 ? '0' + nowDate.getMinutes() : nowDate.getMinutes()
let ss = nowDate.getSeconds() < 10 ? '0' + nowDate.getSeconds() : nowDate.getSeconds() let ss =nowDate.getSeconds() < 10 ? '0' + nowDate.getSeconds() :nowDate.getSeconds()
this.startTime = year + "-" + month + "-" + day + " " + '00:00:00'; this.startTime = year + "-" + month + "-" + day+" " + '00:00:00';
this.endTime = year + "-" + month + "-" + day + " " + hr + ':' + mf + ':' + ss this.endTime = year + "-" + month + "-" + day+" " +hr+':'+mf+':'+ss
}, },
loadMoreOrder(from) { loadMoreOrder(from) {
// console.log(from,'loadMoreOrder') // console.log(from,'loadMoreOrder')
@ -297,7 +284,7 @@
this.loadMoreOrder('tabSelect') this.loadMoreOrder('tabSelect')
}, },
pickSource(e) { pickSource(e) {
this.indexSource = parseInt(e.detail.value) this.indexSource = parseInt( e.detail.value)
this.activeSource = this.sources[this.indexSource] this.activeSource = this.sources[this.indexSource]
uni.setStorageSync('orderType', this.indexSource) uni.setStorageSync('orderType', this.indexSource)
this.pageNumber1 = 0 this.pageNumber1 = 0
@ -342,7 +329,7 @@
let that = this let that = this
const data2 = { const data2 = {
istate: istate, //Number 0 1 '' istate: istate, //Number 0 1 ''
pageIndex: pageNumber, //Number ,10 pageIndex: pageNumber ,//Number ,10
// startTime: that.startTime, // startTime: that.startTime,
// endTime: that.endTime // endTime: that.endTime
} }
@ -463,33 +450,33 @@
}) })
} }
}, },
startDateChange: function(e) { startDateChange:function(e){
this.startDate = e this.startDate = e.detail.value
let data = this.startDate let data=this.startDate
this.endStartDate = data this.endStartDate = data
this.endEndDate = this.getEndDate(Date.parse(data) + 3600 * 1000 * 24 * 31) this.endEndDate = this.getEndDate(Date.parse(data)+ 3600 * 1000 * 24 * 30)
this.params.startTime = this.startDate this.params.startTime = this.startDate
}, },
endDateChange: function(e) { endDateChange:function(e){
if (this.startDate == '') { if(this.startDate ==''){
uni.showToast({ uni.showToast({
title: '请先选择开始时间', title: '请先选择开始时间',
icon: 'none' icon: 'none'
}); });
} else { }else{
this.endDate = e this.endDate = e.detail.value
this.params.endTime = this.endDate this.params.endTime = this.endDate
} }
}, },
getEndDate(val) { getEndDate(val){
let nowDate = new Date(val) let nowDate = new Date(val)
let year = nowDate.getFullYear(); let year = nowDate.getFullYear();
let month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1) : nowDate.getMonth() + 1; let month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1) : nowDate.getMonth() + 1;
let day = nowDate.getDate() < 10 ? "0" + nowDate.getDate() : nowDate.getDate(); let day = nowDate.getDate() < 10 ? "0" + nowDate.getDate() : nowDate.getDate();
return year + "-" + month + "-" + day return year + "-" + month + "-" + day
}, },
orderExport() { orderExport(){
this.startDate = '' this.startDate = ''
this.endDate = '' this.endDate = ''
this.params.email = '' this.params.email = ''
@ -515,14 +502,14 @@
return false return false
} }
} }
if (this.params.startTime == '') { if(this.params.startTime==''){
uni.showToast({ uni.showToast({
title: '请选择开始时间', title: '请选择开始时间',
icon: 'none' icon: 'none'
}); });
return false return false
} }
if (this.params.endTime == '') { if(this.params.endTime==''){
uni.showToast({ uni.showToast({
title: '请选择结束时间', title: '请选择结束时间',
icon: 'none' icon: 'none'
@ -530,8 +517,8 @@
return false return false
} }
uni.showModal({ uni.showModal({
content: '请确认邮箱 \n' + this.params.email, content: '请确认邮箱 \n'+this.params.email,
success: (res) => { success: (res)=> {
if (res.confirm) { if (res.confirm) {
oliFinanceApi.getOrderInfoExport(this.params).then(res => { oliFinanceApi.getOrderInfoExport(this.params).then(res => {
if (res.code == 20000) { if (res.code == 20000) {
@ -569,16 +556,13 @@
width: 750upx; width: 750upx;
z-index: 3; z-index: 3;
} }
.uni-input{
.uni-input {
height: 25rpx; height: 25rpx;
} }
.uni-picker{
.uni-picker {
height: 25rpx; height: 25rpx;
} }
.uni-list-cell-db{
.uni-list-cell-db {
width: 100%; width: 100%;
height: 30rpx; height: 30rpx;
} }

@ -23,10 +23,9 @@
</view> </view>
<view class="margin text-center"> <view class="margin text-center">
<!-- <text class="cuIcon-weixin padding-right-xs"> </text> --> <button v-if="checked" class="cu-btn round bg-main-oil lg text-lg" open-type="getPhoneNumber"
<!-- <button v-if="checked" class="cu-btn round bg-main-oil lg text-lg" open-type="getPhoneNumber"
@getphonenumber="decryptPhoneNumber"> @getphonenumber="decryptPhoneNumber">
<!-- <text class="cuIcon-weixin padding-right-xs"> </text> -->
<text> <text>
手机号快捷登录 手机号快捷登录
</text> </text>
@ -35,7 +34,7 @@
<text> <text>
手机号快捷登录 手机号快捷登录
</text> </text>
</button> --> </button>
<!-- <button class="cu-btn round btnSize" open-type="getPhoneNumber" <!-- <button class="cu-btn round btnSize" open-type="getPhoneNumber"
@getphonenumber="decryptPhoneNumber"> @getphonenumber="decryptPhoneNumber">
<text class="cuIcon-weixin text-green lg"></text> <text class="cuIcon-weixin text-green lg"></text>

@ -10,7 +10,7 @@
<text class>油站工作人员绑定油站</text> <text class>油站工作人员绑定油站</text>
</view> </view>
</view> --> </view> -->
<view v-if="!isPad" class="banner text-lg"> <view class="banner text-lg">
欢迎使用星油云站 欢迎使用星油云站
</view> </view>
<view class="pannel"> <view class="pannel">
@ -140,7 +140,6 @@
export default { export default {
data() { data() {
return { return {
isPad:false,
titleText: "", titleText: "",
errMsg: '', errMsg: '',
checkUser: false, checkUser: false,
@ -163,12 +162,6 @@
}, },
created() { created() {
uni.showShareMenu() uni.showShareMenu()
uni.getSystemInfo({
success:(res) => {
// console.log('getSystemInfoSync',res)
this.isPad = res.deviceType === 'pad'
}
})
}, },
methods: { methods: {
checkAgree(val) { checkAgree(val) {

@ -7,9 +7,10 @@ import utils from '@/utils/encode'
//42 洛超 /29 孙志华 /40 阿浩 //42 洛超 /29 孙志华 /40 阿浩
// 测试日日顺时需要连阿浩 // 测试日日顺时需要连阿浩
const testUrl = 'http://192.168.110.77:38080' const testUrl = 'http://192.168.0.26:38080'
// const productionUrl = 'https://www.51xingka.net/oilApp' // 生产,加密 old // const productionUrl = 'https://www.51xingka.net/oilApp' // 生产,加密 old
// const productionUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new // const productionUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
// const productionUrl = 'https://www.xingoil.com/adminapi' // 生产,加密 new
const productionUrl = 'http://uat.xingoil.com/adminapi' const productionUrl = 'http://uat.xingoil.com/adminapi'
// const env = process.env.NODE_ENV // 环境 // const env = process.env.NODE_ENV // 环境
const service = axios.create({ const service = axios.create({
@ -48,7 +49,7 @@ service.interceptors.request.use(
if (env === 'production') { if (env === 'production') {
// 生产环境,加密,不输出任何东西 // 生产环境,加密,不输出任何东西
// 设置jsessionid和token // 设置jsessionid和token
// console.log('这里是生产') console.log('这里是生产')
const JSESSIONID = utils.uuid() const JSESSIONID = utils.uuid()
config.headers['JSESSIONID'] = JSESSIONID config.headers['JSESSIONID'] = JSESSIONID
config.headers['token'] = utils.md5Salt(JSESSIONID) config.headers['token'] = utils.md5Salt(JSESSIONID)
@ -99,13 +100,13 @@ service.interceptors.response.use(
// console.log('生产环境 请求路径', response.config.url, '解密为', res.data) // console.log('生产环境 请求路径', response.config.url, '解密为', res.data)
} }
} else { } else {
// console.log('请求路径', response.config.url, '返回结果未加密', res) console.log('请求路径', response.config.url, '返回结果未加密', res)
// console.log('-------------------------------------------') console.log('-------------------------------------------')
} }
uni.hideLoading() uni.hideLoading()
if (res.code != 20000) { if (res.code != 20000) {
// console.log('这里是登录报错处',res) console.log('这里是登录报错处',res)
if(response.config.url.indexOf('/oil-user/oilCustomerChannelRelation/getByPhone/') != -1){ if(response.config.url.indexOf('/oil-user/oilCustomerChannelRelation/getByPhone/') != -1){
// uni.hideToast() // uni.hideToast()
}else{ }else{
@ -124,11 +125,23 @@ service.interceptors.response.use(
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
uni.reLaunch({ uni.reLaunch({
url: '/pages/login/boforeLogin/boforeLogin' url: '/pages/login/boforeLogin/boforeLogin',
success: () => {
console.log('跳转成功')
},
fail: (err) => {
console.log(err)
}
}) })
} else if (res.cancel) { } else if (res.cancel) {
uni.reLaunch({ uni.reLaunch({
url: '/pages/login/boforeLogin/boforeLogin?type=1' url: '/pages/login/boforeLogin/boforeLogin?type=1',
success: () => {
console.log('跳转成功')
},
fail: (err) => {
console.log(err)
}
}) })
} }
} }
@ -141,7 +154,13 @@ service.interceptors.response.use(
icon: "none" icon: "none"
}) })
uni.reLaunch({ uni.reLaunch({
url: '/pages/login/boforeLogin/boforeLogin' url: '/pages/login/boforeLogin/boforeLogin',
success: () => {
console.log('跳转成功')
},
fail: (err) => {
console.log(err)
}
}) })
} }
if(res.code == 42077){ if(res.code == 42077){
@ -150,7 +169,13 @@ service.interceptors.response.use(
icon: "none" icon: "none"
}) })
uni.reLaunch({ uni.reLaunch({
url: '/pages/login/boforeLogin/boforeLogin' url: '/pages/login/boforeLogin/boforeLogin',
success: () => {
console.log('跳转成功')
},
fail: (err) => {
console.log(err)
}
}) })
} }
@ -176,6 +201,7 @@ service.interceptors.response.use(
uni.hideLoading() uni.hideLoading()
uni.getNetworkType({ uni.getNetworkType({
success: function(res) { success: function(res) {
console.log(res.networkType);
if (res.networkType === 'none') { if (res.networkType === 'none') {
uni.showToast({ uni.showToast({
title: '没有网啦!', title: '没有网啦!',

Loading…
Cancel
Save