提交修改
This commit is contained in:
parent
8486ca4c34
commit
c40033ed5c
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onLaunch, onShow, onHide} from "@dcloudio/uni-app"
|
import { onLaunch, onShow, onHide,onShareAppMessage,onShareTimeline} from "@dcloudio/uni-app"
|
||||||
onLaunch(() => {
|
onLaunch(() => {
|
||||||
console.log("App Launch");
|
console.log("App Launch");
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,12 +1,14 @@
|
|||||||
import { createSSRApp } from 'vue'
|
import { createSSRApp } from 'vue'
|
||||||
import uviewPlus from 'uview-plus'
|
import uviewPlus from 'uview-plus'
|
||||||
|
|
||||||
|
import sharMx from './mixin'
|
||||||
|
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
export function createApp() {
|
export function createApp() {
|
||||||
const app = createSSRApp(App)
|
const app = createSSRApp(App)
|
||||||
app.use(uviewPlus)
|
app.use(uviewPlus)
|
||||||
|
app.mixin(sharMx)
|
||||||
return {
|
return {
|
||||||
app,
|
app,
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,9 @@
|
|||||||
"delay" : 0
|
"delay" : 0
|
||||||
},
|
},
|
||||||
/* 模块配置 */
|
/* 模块配置 */
|
||||||
"modules" : {},
|
"modules" : {
|
||||||
|
"Share" : {}
|
||||||
|
},
|
||||||
/* 应用发布信息 */
|
/* 应用发布信息 */
|
||||||
"distribute" : {
|
"distribute" : {
|
||||||
/* android打包配置 */
|
/* android打包配置 */
|
||||||
@ -43,7 +45,9 @@
|
|||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
"ios" : {},
|
"ios" : {},
|
||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
"sdkConfigs" : {}
|
"sdkConfigs" : {
|
||||||
|
"share" : {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* 快应用特有相关 */
|
/* 快应用特有相关 */
|
||||||
@ -62,7 +66,7 @@
|
|||||||
"scope.userLocation" : {
|
"scope.userLocation" : {
|
||||||
"desc" : "获取周边换电站"
|
"desc" : "获取周边换电站"
|
||||||
},
|
},
|
||||||
"requiredPrivateInfos": ["getLocation"]
|
"requiredPrivateInfos" : [ "getLocation" ]
|
||||||
},
|
},
|
||||||
"unipush" : {
|
"unipush" : {
|
||||||
"enable" : false
|
"enable" : false
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
<view id="mancont" class="jiner">
|
<view id="mancont" class="jiner">
|
||||||
<view class="num">
|
<view class="num">
|
||||||
<view>余额</view>
|
<view>余额</view>
|
||||||
<view><text style="font-size: 50rpx;">{{totalAmount}}</text> 元</view>
|
<view><text style="font-size: 50rpx;">{{totalAmount/100}}</text> 元</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ctbn" @tap="topage('/minePages/recharge/index')">充值</view>
|
<view class="ctbn" @tap="topage('/minePages/recharge/index')">充值</view>
|
||||||
</view>
|
</view>
|
||||||
@ -21,12 +21,16 @@
|
|||||||
<view>
|
<view>
|
||||||
<view v-for="n in list" class="mxitem">
|
<view v-for="n in list" class="mxitem">
|
||||||
<view>
|
<view>
|
||||||
<view style="padding-bottom: 8rpx;font-size: 40rpx;color: #00aa00;">充值</view>
|
<view v-if="n.tradeType == 1" style="padding-bottom: 8rpx;font-size: 40rpx;color: #00aa00;">充值</view>
|
||||||
<view style="font-size: 30rpx;color: #ccc;">2024-12-20 11:20:00</view>
|
<view v-else-if="n.tradeType == 2" style="padding-bottom: 8rpx;font-size: 40rpx;color: #191919;">支付</view>
|
||||||
|
<view v-else-if="n.tradeType == 9" style="padding-bottom: 8rpx;font-size: 40rpx;color: #c79a11;">提现</view>
|
||||||
|
<view style="font-size: 30rpx;color: #ccc;">{{n.ctime}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="text-align: right;">
|
<view style="text-align: right;">
|
||||||
<view style="padding-bottom: 8rpx;font-size: 40rpx;color: #00aa00;">+<text>100</text></view>
|
<view v-if="n.tradeType == 1" style="padding-bottom: 8rpx;font-size: 40rpx;color: #00aa00;">+<text>{{n.tradeTotalAmount/100}}</text></view>
|
||||||
<view style="font-size: 30rpx;color: #ccc;">实际到账金额:100元</view>
|
<view v-else-if="n.tradeType == 2" style="padding-bottom: 8rpx;font-size: 40rpx;color: #191919;"><text>{{n.tradeTotalAmount/100}}</text></view>
|
||||||
|
<view v-else-if="n.tradeType == 9" style="padding-bottom: 8rpx;font-size: 40rpx;color: #c79a11;">-<text>{{n.tradeTotalAmount/100}}</text></view>
|
||||||
|
<!-- <view style="font-size: 30rpx;color: #ccc;">实际到账金额:100元</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<up-empty v-if="list.length == 0" mode="list" text="暂无记录" />
|
<up-empty v-if="list.length == 0" mode="list" text="暂无记录" />
|
||||||
@ -57,8 +61,6 @@
|
|||||||
let status = ref('nomore') //loadmore loading
|
let status = ref('nomore') //loadmore loading
|
||||||
let totalAmount = ref(0)
|
let totalAmount = ref(0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//余额记录
|
//余额记录
|
||||||
let qsobj = reactive({
|
let qsobj = reactive({
|
||||||
walletCode:uni.getStorageSync('walletCode'),
|
walletCode:uni.getStorageSync('walletCode'),
|
||||||
@ -99,7 +101,6 @@
|
|||||||
//获取账户信息
|
//获取账户信息
|
||||||
let account =ref<any>({})
|
let account =ref<any>({})
|
||||||
|
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
getaccou(uni.getStorageSync('wxuid')).then((rps:any) => {
|
getaccou(uni.getStorageSync('wxuid')).then((rps:any) => {
|
||||||
if(rps.data.records){
|
if(rps.data.records){
|
||||||
@ -107,6 +108,8 @@
|
|||||||
uni.setStorageSync('totalAmount',totalAmount.value)
|
uni.setStorageSync('totalAmount',totalAmount.value)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
status.value = 'nomore'
|
||||||
|
list.value.splice(0)
|
||||||
getylist()
|
getylist()
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -116,7 +119,6 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
function topage(url:string) {
|
function topage(url:string) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url
|
url
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-if="n.status == 6 || n.status == 7">
|
<view v-if="n.status == 6 || n.status == 7">
|
||||||
<view>订单金额</view>
|
<view>订单金额</view>
|
||||||
<view>{{n.amount}}元</view>
|
<view>{{n.amount/100}}元</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view>订单状态</view>
|
<view>订单状态</view>
|
||||||
|
|||||||
@ -19,11 +19,15 @@
|
|||||||
<view style="background: #fff;">
|
<view style="background: #fff;">
|
||||||
<radio-group size="30" @change="radioChange">
|
<radio-group size="30" @change="radioChange">
|
||||||
<label style="display: flex;align-items: center;padding: 30rpx;border-bottom: 2px solid #f4f4f4;">
|
<label style="display: flex;align-items: center;padding: 30rpx;border-bottom: 2px solid #f4f4f4;">
|
||||||
<radio :checked="actv == 1" :value="1" color="#00aa00" style="transform:scale(80%);" />
|
<radio :checked="actv == 1" :value="1" :disabled="yedis" color="#00aa00" style="transform:scale(80%);" />
|
||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex;flex:1;align-items: center;">
|
||||||
<image src="/src/static/img/yuer.png" style="width: 60rpx;height: 60rpx;" />
|
<image src="/src/static/img/yuer.png" style="width: 60rpx;height: 60rpx;" />
|
||||||
<view style="padding-left: 10rpx;">余额</view>
|
<view style="padding-left: 10rpx;">余额</view>
|
||||||
<!-- <view style="flex: 1;">100</view> -->
|
<view v-if="iskt" style="flex:1;font-size: 30rpx;;text-align:right;color: #949494;">
|
||||||
|
<template v-if="iskzf">可用{{totalAmount}}元</template>
|
||||||
|
<template v-else>余额不足,剩余{{totalAmount}}元</template>
|
||||||
|
</view>
|
||||||
|
<view v-else style="flex:1;text-align:right;color: #949494;">暂未开通</view>
|
||||||
</view>
|
</view>
|
||||||
</label>
|
</label>
|
||||||
<label style="display: flex;align-items: center;padding: 30rpx;">
|
<label style="display: flex;align-items: center;padding: 30rpx;">
|
||||||
@ -39,8 +43,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref,reactive } from 'vue'
|
import { ref,reactive,computed } from 'vue'
|
||||||
import { payment,getip } from '@/utils/service'
|
import { payment,getip,balancpay,getaccou,getInfo } from '@/utils/service'
|
||||||
import { onLoad,onShow } from '@dcloudio/uni-app'
|
import { onLoad,onShow } from '@dcloudio/uni-app'
|
||||||
|
|
||||||
onLoad((opt:any) => {
|
onLoad((opt:any) => {
|
||||||
@ -50,17 +54,56 @@
|
|||||||
payqs.goodsDetail[0].unitPrice = opt.amount*1
|
payqs.goodsDetail[0].unitPrice = opt.amount*1
|
||||||
|
|
||||||
payqs.description = `${opt.plateNum}在${opt.stationName}换电`
|
payqs.description = `${opt.plateNum}在${opt.stationName}换电`
|
||||||
|
payqs.attach.description = `${opt.plateNum}在${opt.stationName}换电`
|
||||||
// payqs.detail.costPrice = opt.amount
|
// payqs.detail.costPrice = opt.amount
|
||||||
// payqs.detail.goodsDetail.unitPrice = opt.amount
|
// payqs.detail.goodsDetail.unitPrice = opt.amount
|
||||||
|
|
||||||
orderNo.value = opt.orderNo
|
orderNo.value = opt.orderNo
|
||||||
|
|
||||||
|
getaccou(uni.getStorageSync('wxuid')).then((rps:any) => {
|
||||||
|
if(rps.data.records){
|
||||||
|
totalAmount.value = rps.data.records[0].totalAmount
|
||||||
|
iskt.value = true
|
||||||
|
if(opt.amount*1 > totalAmount.value*1){
|
||||||
|
iskzf.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
//获取账户信息
|
||||||
|
let totalAmount = ref(0)
|
||||||
|
let iskt = ref(false)
|
||||||
|
let iskzf = ref(true)
|
||||||
|
|
||||||
|
|
||||||
|
let yedis = computed(() => {
|
||||||
|
if(iskt.value && iskzf.value){
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
//获取用户信息
|
||||||
|
let username = ref('')
|
||||||
|
getInfo({
|
||||||
|
wuid:uni.getStorageSync('wxuid')
|
||||||
|
}).then((rps:any) => {
|
||||||
|
if(rps.data.name){
|
||||||
|
username.value = rps.data.name
|
||||||
|
}else if(rps.data.nickName){
|
||||||
|
username.value = rps.data.nickName
|
||||||
|
}else{
|
||||||
|
username.value = ''
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
let orderNo = ref('')
|
let orderNo = ref('')
|
||||||
|
|
||||||
let actv = ref(2)
|
let actv = ref(2)
|
||||||
function radioChange(v:any) {
|
function radioChange(v:any) {
|
||||||
console.log(v,'v')
|
actv.value = v.detail.value
|
||||||
}
|
}
|
||||||
|
|
||||||
let payqs = reactive<any>({
|
let payqs = reactive<any>({
|
||||||
@ -72,9 +115,10 @@
|
|||||||
type: 2, //"1-充值,2-订单。类型 number"
|
type: 2, //"1-充值,2-订单。类型 number"
|
||||||
orderNo:'', //"订单号",
|
orderNo:'', //"订单号",
|
||||||
trader:'', //交易发起人
|
trader:'', //交易发起人
|
||||||
|
description:'',
|
||||||
tradercode:uni.getStorageSync('wxuid') //交易人编码
|
tradercode:uni.getStorageSync('wxuid') //交易人编码
|
||||||
//walletCode:'' //钱包编码
|
//walletCode:'' //钱包编码
|
||||||
// ownerId:'', //"户主ID,个人wuid,企业为公司编码",
|
// ownerId:'', //"户主ID,个人wuid,企业:公司编码",
|
||||||
// walletCode:'' //"钱包编码"
|
// walletCode:'' //"钱包编码"
|
||||||
},
|
},
|
||||||
goodsDetail:[
|
goodsDetail:[
|
||||||
@ -87,8 +131,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
payerClientIp:'', //用户IP
|
payerClientIp:'', //用户IP
|
||||||
deviceId:'', //用户设备型号
|
//deviceId:'', //用户设备型号
|
||||||
stationCode:''
|
//stationCode:''
|
||||||
})
|
})
|
||||||
|
|
||||||
//获取ip
|
//获取ip
|
||||||
@ -97,6 +141,17 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
function payhand() {
|
function payhand() {
|
||||||
|
if(actv.value == 1){
|
||||||
|
balancpay({
|
||||||
|
orderNo:orderNo.value,
|
||||||
|
wuid:uni.getStorageSync('wxuid'),
|
||||||
|
uname:username.value
|
||||||
|
}).then(() => {
|
||||||
|
uni.redirectTo({
|
||||||
|
url:`/minePages/paySuccess/index?orderNo=${orderNo.value}`
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}else{
|
||||||
payqs.attach = JSON.stringify(payqs.attach)
|
payqs.attach = JSON.stringify(payqs.attach)
|
||||||
payment(payqs).then((rps:any) => {
|
payment(payqs).then((rps:any) => {
|
||||||
|
|
||||||
@ -118,7 +173,7 @@
|
|||||||
})
|
})
|
||||||
//#endif
|
//#endif
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -51,11 +51,18 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref,reactive } from 'vue'
|
import { ref,reactive } from 'vue'
|
||||||
import { payment,getip,getInfo } from '@/utils/service'
|
import { payment,getip,getInfo,getaccou,openaccou } from '@/utils/service'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
|
|
||||||
onLoad((opt:any) => {
|
// onLoad((opt:any) => {
|
||||||
//payqs.attach.walletCode = opt.walletCode
|
// payqs.attach.walletCode = opt.walletCode
|
||||||
|
// })
|
||||||
|
|
||||||
|
getaccou(uni.getStorageSync('wxuid')).then((rps:any) => {
|
||||||
|
if(!rps.data.records){
|
||||||
|
//开通余额
|
||||||
|
openaccou(uni.getStorageSync('wxuid'))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
let phoneNumber = ref('')
|
let phoneNumber = ref('')
|
||||||
@ -130,7 +137,7 @@
|
|||||||
type: 1, //"1-充值,2-订单。类型 number"
|
type: 1, //"1-充值,2-订单。类型 number"
|
||||||
//orderNo:'', //"订单号",
|
//orderNo:'', //"订单号",
|
||||||
trader:'', //交易发起人
|
trader:'', //交易发起人
|
||||||
tradercode:uni.getStorageSync('wxuid'), //交易人编码 个人wuid,企业为公司编码
|
traderCode:uni.getStorageSync('wxuid'), //交易人编码 个人wuid,企业为公司编码
|
||||||
walletCode:uni.getStorageSync('walletCode') //钱包编码
|
walletCode:uni.getStorageSync('walletCode') //钱包编码
|
||||||
// ownerId:'', //"户主ID,个人wuid,企业为公司编码",
|
// ownerId:'', //"户主ID,个人wuid,企业为公司编码",
|
||||||
// walletCode:'' //"钱包编码"
|
// walletCode:'' //"钱包编码"
|
||||||
@ -158,6 +165,7 @@
|
|||||||
//'{"type":1,"trader":"cijiangbo","tradercode":"8d4638c713e9391baa60395385932fb3","walletCode":"YTWAP1863511124008374272NARVLW"}'
|
//'{"type":1,"trader":"cijiangbo","tradercode":"8d4638c713e9391baa60395385932fb3","walletCode":"YTWAP1863511124008374272NARVLW"}'
|
||||||
|
|
||||||
payqs.attach = JSON.stringify(payqs.attach)
|
payqs.attach = JSON.stringify(payqs.attach)
|
||||||
|
payqs.total = payqs.total*100
|
||||||
payment(payqs).then((rps:any) => {
|
payment(payqs).then((rps:any) => {
|
||||||
|
|
||||||
//#ifdef MP-WEIXIN
|
//#ifdef MP-WEIXIN
|
||||||
|
|||||||
@ -8,7 +8,16 @@
|
|||||||
:placeholder="true"
|
:placeholder="true"
|
||||||
/>
|
/>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view v-for="n in list" :key="n.pkId" class="list">
|
<view class="tabct">
|
||||||
|
<up-tabs
|
||||||
|
:list="statelist"
|
||||||
|
:scrollable="false"
|
||||||
|
@click="tabshand"
|
||||||
|
lineColor="#00aa00"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view class="lisct">
|
||||||
|
<view v-for="n in list" :key="n.orderNo" class="list">
|
||||||
<view class="zoddu">
|
<view class="zoddu">
|
||||||
<view>
|
<view>
|
||||||
<view>换电站:</view>
|
<view>换电站:</view>
|
||||||
@ -32,27 +41,68 @@
|
|||||||
<view v-else-if="n.status == 3" class="qxyy">已取消</view>
|
<view v-else-if="n.status == 3" class="qxyy">已取消</view>
|
||||||
<view v-else class="qxyy">已过期</view>
|
<view v-else class="qxyy">已过期</view>
|
||||||
</view>
|
</view>
|
||||||
<up-empty v-if="list.length == 0" mode="list" text="暂无预约记录" />
|
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
<up-empty v-if="list.length == 0" mode="list" text="暂无预约记录" />
|
||||||
|
<up-loadmore v-else :status="status" color="#c0c4cc" lineColor="#c0c4cc" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref,reactive } from 'vue'
|
||||||
import { getyylist,cancelrese } from '@/utils/service'
|
import { getyylist,cancelrese } from '@/utils/service'
|
||||||
|
import { onShow,onReachBottom } from '@dcloudio/uni-app'
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
pageNo.value = 1
|
||||||
|
list.value.splice(0)
|
||||||
|
getlist()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
//预约状态
|
||||||
|
const statelist = reactive([
|
||||||
|
{ name: '全部', status:'1'},
|
||||||
|
{ name: '已使用', status:'2' },
|
||||||
|
{ name: '已取消', status:'3' },
|
||||||
|
{ name: '已过期', status:'4'}
|
||||||
|
])
|
||||||
|
|
||||||
|
let status = ref('nomore') //loadmore loading
|
||||||
|
|
||||||
let list = ref<any[]>([])
|
let list = ref<any[]>([])
|
||||||
|
let pageNo = ref(1)
|
||||||
|
let stanum = ref('')
|
||||||
|
//点击tabs
|
||||||
|
function tabshand(n:any){
|
||||||
|
pageNo.value = 1
|
||||||
|
list.value.splice(0)
|
||||||
|
stanum.value = n.status
|
||||||
getlist()
|
getlist()
|
||||||
|
}
|
||||||
function getlist() {
|
function getlist() {
|
||||||
getyylist({
|
let qsobj = {
|
||||||
ucode:uni.getStorageSync('wxuid')
|
ucode:uni.getStorageSync('wxuid'),
|
||||||
// plateNum:'冀A12345D',
|
pageSize:30,
|
||||||
// status:'1',
|
pageNo:pageNo.value
|
||||||
// stationCode:'123456789'
|
}
|
||||||
}).then((rps:any) => {
|
if(stanum.value){
|
||||||
list.value = rps.data
|
qsobj = Object.assign(qsobj,{status:stanum.value})
|
||||||
|
}
|
||||||
|
status.value = 'loading'
|
||||||
|
getyylist(qsobj).then((rps:any) => {
|
||||||
|
if(rps.data.total > 0){
|
||||||
|
list.value = [...list.value,...rps.data.records]
|
||||||
|
if(list.value.length == rps.data.total){
|
||||||
|
status.value = 'nomore'
|
||||||
|
}else{
|
||||||
|
status.value = 'loadmore'
|
||||||
|
pageNo.value++
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function cancel(id:string) {
|
function cancel(id:string) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '温馨提示',
|
title: '温馨提示',
|
||||||
@ -77,13 +127,32 @@
|
|||||||
function ytime(n:string,v?:string){
|
function ytime(n:string,v?:string){
|
||||||
return `${n.substring(0,4)}年${n.substring(4,6)}月${n.substring(6,8)}日 ${v?v:''}`
|
return `${n.substring(0,4)}年${n.substring(4,6)}月${n.substring(6,8)}日 ${v?v:''}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onReachBottom(() => {
|
||||||
|
if(status.value == 'loadmore'){
|
||||||
|
getlist()
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
|
page{
|
||||||
|
background: #f4f4f4;
|
||||||
|
}
|
||||||
.content{
|
.content{
|
||||||
padding: 25rpx;
|
padding-bottom: 30rpx;
|
||||||
|
.tabct{
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-bottom: 10rpx;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
.lisct{
|
||||||
|
padding-top: 130rpx;
|
||||||
.list{
|
.list{
|
||||||
margin-bottom: 40rpx;
|
margin:0 25rpx 40rpx;
|
||||||
|
//padding: 25rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
box-shadow: 0 0 10px 2px rgba(190, 190, 190, 0.5);
|
box-shadow: 0 0 10px 2px rgba(190, 190, 190, 0.5);
|
||||||
background: #fff;
|
background: #fff;
|
||||||
@ -113,6 +182,12 @@
|
|||||||
background: #ccc;
|
background: #ccc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.hdbzcont{
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 85vw;
|
||||||
|
padding: 30rpx;
|
||||||
|
background: #fff;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -90,6 +90,7 @@
|
|||||||
|
|
||||||
let genderName = ref('')
|
let genderName = ref('')
|
||||||
let formdata = reactive({
|
let formdata = reactive({
|
||||||
|
wuid:uni.getStorageSync('wxuid'),
|
||||||
phoneNumber:'', //手机号
|
phoneNumber:'', //手机号
|
||||||
nickName:'', //用户昵称
|
nickName:'', //用户昵称
|
||||||
avatarUrl:'', //用户头像
|
avatarUrl:'', //用户头像
|
||||||
@ -221,6 +222,9 @@
|
|||||||
title: '保存成功',
|
title: '保存成功',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack()
|
||||||
|
},2500)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
|||||||
@ -98,12 +98,12 @@
|
|||||||
"selectedIconPath": "static/img/tabbar/home.png",
|
"selectedIconPath": "static/img/tabbar/home.png",
|
||||||
"text": "首页"
|
"text": "首页"
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// "pagePath":"pages/scanCode/index",
|
"pagePath":"pages/scanCode/index",
|
||||||
// "iconPath": "static/img/tabbar/saom.png",
|
"iconPath": "static/img/tabbar/saom.png",
|
||||||
// "selectedIconPath": "static/img/tabbar/saom.png",
|
"selectedIconPath": "static/img/tabbar/saom.png",
|
||||||
// "text": "扫码换电"
|
"text": "扫码换电"
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/mine/index",
|
"pagePath": "pages/mine/index",
|
||||||
"iconPath": "static/img/tabbar/wode.png",
|
"iconPath": "static/img/tabbar/wode.png",
|
||||||
|
|||||||
@ -28,12 +28,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="niche">{{username()}}</view>
|
<view class="niche">{{username()}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<!-- <view>
|
||||||
<view style="font-size: 36rpx;">5</view>
|
<view style="font-size: 36rpx;">5</view>
|
||||||
<view style="font-size: 26rpx;color: #8e8a8a;">优惠券</view>
|
<view style="font-size: 26rpx;color: #8e8a8a;">优惠券</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view @tap="topage('/minePages/account/index')">
|
<view @tap="topage('/minePages/account/index')">
|
||||||
<view style="font-size: 36rpx;">{{account.totalAmount?account.totalAmount:0}}</view>
|
<view style="font-size: 36rpx;">{{account.totalAmount?account.totalAmount/100:0}}</view>
|
||||||
<view style="font-size: 26rpx;color: #8e8a8a;">余额</view>
|
<view style="font-size: 26rpx;color: #8e8a8a;">余额</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -152,6 +152,7 @@ import {
|
|||||||
getInfo,
|
getInfo,
|
||||||
getaccou
|
getaccou
|
||||||
} from '@/utils/service'
|
} from '@/utils/service'
|
||||||
|
|
||||||
let height = ref('')
|
let height = ref('')
|
||||||
let islogin = ref(false)
|
let islogin = ref(false)
|
||||||
let PhoneNumber = ref('')
|
let PhoneNumber = ref('')
|
||||||
@ -198,7 +199,7 @@ onShow(() => {
|
|||||||
islogin.value = false
|
islogin.value = false
|
||||||
PhoneNumber.value = ''
|
PhoneNumber.value = ''
|
||||||
covers.value = []
|
covers.value = []
|
||||||
hdzcode.value = ''
|
//hdzcode.value = ''
|
||||||
imglist.value = []
|
imglist.value = []
|
||||||
showxy()
|
showxy()
|
||||||
}
|
}
|
||||||
@ -288,6 +289,7 @@ function getinfo(){
|
|||||||
getInfo({
|
getInfo({
|
||||||
wuid:uni.getStorageSync('wxuid')
|
wuid:uni.getStorageSync('wxuid')
|
||||||
}).then((rps:any) => {
|
}).then((rps:any) => {
|
||||||
|
uni.setStorageSync('userInfor',rps.data)
|
||||||
userInfo.phoneNumber = rps.data.phoneNumber?rps.data.phoneNumber:''
|
userInfo.phoneNumber = rps.data.phoneNumber?rps.data.phoneNumber:''
|
||||||
userInfo.nickName = rps.data.nickName?rps.data.nickName:''
|
userInfo.nickName = rps.data.nickName?rps.data.nickName:''
|
||||||
userInfo.avatarUrl = rps.data.avatarUrl?rps.data.avatarUrl:''
|
userInfo.avatarUrl = rps.data.avatarUrl?rps.data.avatarUrl:''
|
||||||
@ -298,8 +300,8 @@ function getinfo(){
|
|||||||
getaccou(uni.getStorageSync('wxuid')).then((rps:any) => {
|
getaccou(uni.getStorageSync('wxuid')).then((rps:any) => {
|
||||||
if(rps.data.records){
|
if(rps.data.records){
|
||||||
account.value = rps.data.records[0]
|
account.value = rps.data.records[0]
|
||||||
uni.setStorageSync('totalAmount', rps.data.records[0].totalAmount) //??
|
uni.setStorageSync('totalAmount', rps.data.records[0].totalAmount)
|
||||||
uni.setStorageSync('walletCode', rps.data.records[0].code) //??
|
uni.setStorageSync('walletCode', rps.data.records[0].code)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -323,7 +325,6 @@ function wdltip() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getdh() {
|
function getdh() {
|
||||||
console.log(latitude.value,longitude.value)
|
|
||||||
uni.openLocation({
|
uni.openLocation({
|
||||||
latitude:latitude.value*1,
|
latitude:latitude.value*1,
|
||||||
longitude:longitude.value*1,
|
longitude:longitude.value*1,
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view @tap="topage('/minePages/account/index')">
|
<view @tap="topage('/minePages/account/index')">
|
||||||
<view style="font-size: 36rpx;">{{totalAmount}}</view>
|
<view style="font-size: 36rpx;text-align: center;">{{totalAmount/100}}</view>
|
||||||
<view style="color: #848484;">余额</view>
|
<view style="color: #848484;">余额</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -177,6 +177,7 @@
|
|||||||
import { ref,reactive } from 'vue'
|
import { ref,reactive } from 'vue'
|
||||||
import { onShow } from '@dcloudio/uni-app'
|
import { onShow } from '@dcloudio/uni-app'
|
||||||
import { getInfo } from '@/utils/service'
|
import { getInfo } from '@/utils/service'
|
||||||
|
|
||||||
let islogin = ref(false)
|
let islogin = ref(false)
|
||||||
let PhoneNumber = ref('')
|
let PhoneNumber = ref('')
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<up-navbar
|
<!-- <up-navbar
|
||||||
title="扫码换电"
|
title="扫码换电"
|
||||||
bgColor="#00aa7f"
|
bgColor="#00aa7f"
|
||||||
:autoBack="true"
|
:autoBack="true"
|
||||||
leftIconColor="#00aa7f"
|
leftIconColor="#00aa7f"
|
||||||
titleStyle="color:#fff"
|
titleStyle="color:#fff"
|
||||||
:placeholder="true"
|
:placeholder="true"
|
||||||
/>
|
/> -->
|
||||||
<view>扫码换电</view>
|
<!-- <view>扫码换电</view>
|
||||||
<view>{{JSON.stringify(code)}}</view>
|
<view style="width:600rpx;word-break: break-all;">{{JSON.stringify(code)}}</view> -->
|
||||||
|
<!--decodeURIComponent(code.rawData)-->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -16,17 +17,17 @@
|
|||||||
import { BarHeight } from '@/utils/commen'
|
import { BarHeight } from '@/utils/commen'
|
||||||
import { onTabItemTap } from '@dcloudio/uni-app'
|
import { onTabItemTap } from '@dcloudio/uni-app'
|
||||||
let code = ref<any>('')
|
let code = ref<any>('')
|
||||||
|
let hdzcode = ref('')
|
||||||
onTabItemTap((item) => {
|
onTabItemTap((item) => {
|
||||||
console.log('tabBar item clicked', item);
|
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
|
onlyFromCamera:true,
|
||||||
success(res){
|
success(res){
|
||||||
|
code.value = res
|
||||||
console.log('条码类型:' + res.scanType);
|
console.log('条码类型:' + res.scanType);
|
||||||
console.log('条码内容:' + res.result);
|
console.log('条码内容:' + res.result);
|
||||||
// uni.navigateTo({
|
uni.navigateTo({
|
||||||
// url:'/codePage/index'
|
url:`/homePages/reservation/index?hdzcode=${hdzcode}&phoneNumber=${uni.getStorageSync('userInfor').phoneNumber?uni.getStorageSync('userInfor').phoneNumber:''}`
|
||||||
// })
|
})
|
||||||
},
|
},
|
||||||
fail() {
|
fail() {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
|
|||||||
@ -29,8 +29,8 @@ export function request(method:any,url:string,data?:any,isLoading?:any){
|
|||||||
uni.request({
|
uni.request({
|
||||||
header:headers,
|
header:headers,
|
||||||
//url:'http://192.168.5.200:9100/gateway'+ url,//`${conf.apiBaseUrl}${url}`,
|
//url:'http://192.168.5.200:9100/gateway'+ url,//`${conf.apiBaseUrl}${url}`,
|
||||||
url:'http://192.168.5.213:9100/gateway'+ url,
|
//url:'http://192.168.5.213:9100/gateway'+ url,
|
||||||
//url:'https://api.evo-techina.com'+url,
|
url:'https://api.evo-techina.com'+url,
|
||||||
method,
|
method,
|
||||||
data:data,
|
data:data,
|
||||||
timeout:30000,
|
timeout:30000,
|
||||||
|
|||||||
@ -55,17 +55,17 @@ interface Ydata{
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function addrese(parameter:Ydata){
|
export function addrese(parameter:Ydata){
|
||||||
return request('post_form','/wechat/cloud/order/swap/pre/add',parameter)
|
return request('post_form','/wechat/order/swap/pre/add',parameter) //wechat/cloud/order/swap/pre/add
|
||||||
}
|
}
|
||||||
|
|
||||||
//预约记录
|
//预约记录
|
||||||
export function getyylist(parameter:any){
|
export function getyylist(parameter:any){
|
||||||
return request('GET','/wechat/cloud/order/swap/pre/list',parameter)
|
return request('GET','/wechat/order/swap/pre/list',parameter)
|
||||||
}
|
}
|
||||||
|
|
||||||
//取消预约
|
//取消预约
|
||||||
export function cancelrese(id:string){
|
export function cancelrese(id:string){
|
||||||
return request('post_form','/wechat/cloud/order/swap/pre/cancel',{id})
|
return request('post_form','/wechat/order/swap/pre/cancel',{id})
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询换电站
|
//查询换电站
|
||||||
@ -143,12 +143,12 @@ export function getUser() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function orderlist(parameter:Oderqs){
|
export function orderlist(parameter:Oderqs){
|
||||||
return request('GET','/wechat/cloud/order/swap/list',parameter)
|
return request('GET','/wechat/order/swap/list',parameter)
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询换电步骤
|
//查询换电步骤
|
||||||
export function dzbzxq(orderNo:string){
|
export function dzbzxq(orderNo:string){
|
||||||
return request('GET','/wechat/cloud/order/swap/step/list',{orderNo})
|
return request('GET','/wechat/order/swap/step/list',{orderNo})
|
||||||
}
|
}
|
||||||
|
|
||||||
//协议
|
//协议
|
||||||
@ -221,3 +221,14 @@ export function balancedetails(parameter:Balande){
|
|||||||
return request('post_form','/wechat/wechat/user/wallet/detail/list',parameter)
|
return request('post_form','/wechat/wechat/user/wallet/detail/list',parameter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//个人余额支付
|
||||||
|
interface Bapay{
|
||||||
|
orderNo:String
|
||||||
|
wuid:String
|
||||||
|
uname:String
|
||||||
|
}
|
||||||
|
|
||||||
|
export function balancpay(parameter:Bapay){
|
||||||
|
return request('post_form','/wechat/order/swap/wallet/pay',parameter)
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user