Commit 88f49af3 by zhangzhen

第6代版本更新

parents a32b9317 f89eb868
<script>
import Vue from 'vue'
import { login } from "@/api/index.js";
export default {
onLaunch: function(e) {
......@@ -26,6 +27,24 @@
// })
// }
wx.login({
success: (res) => {
login(res.code).then(res => {
console.log(res,99999)
if (res.data.code == 200) {
uni.setStorageSync('loginStatus', res.data.data.type)
if (res.data.data.type === "login") {
uni.setStorageSync('tokenHeaders', "Authori-zation")
uni.setStorage({
key: uni.getStorageSync('tokenHeaders'),
data: res.data.data.token
})
}
}
})
}
})
if(uni.getStorageSync("storeId")){
uni.removeStorageSync("storeId")
}
......@@ -34,6 +53,10 @@
uni.removeStorageSync("storePopShow")
}
if(uni.getStorageSync("popupTipStatus")){
uni.removeStorageSync("popupTipStatus")
}
uni.getSystemInfo({
success: (e) => {
Vue.prototype.screenHeight = e.screenHeight;
......
import http from "@/common/vmeitime-http/index.js"
export const getStoreManageList=(data)=>{
let url=`/store/manageList`
return http.get(url,data)
}
export const getDataStatistics=(data)=>{
let url=`/order/statistics`
return http.post(url,data)
}
export const getOrderStatistics=(data)=>{
let url=`/order/statistics/orderList`
return http.get(url,data)
}
......@@ -24,6 +24,12 @@ export const getUserInfo=()=>{
return http.get(url)
}
export const getUserWallet=()=>{
let url=`/wallet/query`
return http.get(url)
}
// 修改用户信息
export const updateUserInfo=(data)=>{
let url=`/consumer/edit`
......
import http from "@/common/vmeitime-http/index.js"
// 会员配置列表
export const memberConfigList=(data)=>{
let url=`/memberConfig/query`
return http.get(url,data)
}
......@@ -68,3 +68,4 @@ export const orderCancelPay=(data)=>{
let url=`/order/cancelPay?orderNo=${data.orderNo}`
return http.post(url)
}
import http from "@/common/vmeitime-http/index.js"
// 查询充值记录列表
export const recordsList=(data)=>{
let url=`/recharge/list`
return http.get(url,data)
}
// 积分日志
export const integralList=(data)=>{
let url=`/integralLog/query`
return http.get(url,data)
}
// 时长日志
export const durationList=(data)=>{
let url=`/durationLog/query`
return http.get(url,data)
}
// 充值配置
export const rechargeConf=(data)=>{
let url=`/rechargeConf/list`
return http.get(url,data)
}
export const createRecharge=(data)=>{
let url=`/recharge/createRecharge`
return http.post(url,data)
}
export const balanceLog=(data)=>{
let url=`/balanceLog/query`
return http.get(url,data)
}
export const equityFundLog=(data)=>{
let url=`/equityFundLog/list`
return http.get(url,data)
}
......@@ -41,3 +41,8 @@ export const getListByIds=(data)=>{
let url=`/store/queryByStoreIds`
return http.post(url,data)
}
export const getStoreActivity=(data)=>{
let url=`/activity/query`
return http.get(url,data)
}
import http from "@/common/vmeitime-http/index.js"
// 可购买的权益列表
export const equityMembersList=(data)=>{
let url=`/equityMembersOrderConfig/list`
return http.get(url,data)
}
export const createEquityMembers=(data)=>{
let url=`/equityMembersOrder/createEquityMembers`
return http.post(url,data)
}
// 购买记录表
export const equityRecordsList=(data,)=>{
let url=`/equityMembersOrder/query`
return http.get(url,data)
}
......@@ -50,8 +50,13 @@ http.interceptor.request = (config => {
})
http.interceptor.response = (config) => {
// uni.hideLoading();
// console.log(config.data, "请求结果")
if(config.statusCode == 502){
uni.hideLoading()
uni.showToast({
icon: "none",
title: "内部服务错误,请稍后重试"
})
}
if (config.header && config.header["Access-Control-Expose-Headers"]) {
uni.setStorageSync('tokenHeaders', config.header["Access-Control-Expose-Headers"])
......
......@@ -46,14 +46,15 @@
success: (res) => {
login(res.code).then(res => {
if (res.data.code == 200) {
uni.setStorageSync('loginStatus', res.data.data.type)
if (res.data.data.type === "login") {
uni.setStorageSync('tokenHeaders', "Authori-zation")
uni.setStorage({
key: uni.getStorageSync('tokenHeaders'),
data: res.data.data.token
})
that.$emit('success')
that.onGetUserInfoToSave()
that.$emit('success')
} else {
uni.removeStorageSync('tokenHeaders')
this.$refs.popupPhone.open();
......@@ -66,8 +67,6 @@
})
}
})
},
onCancle(){
this.$refs.popupPhone.close()
......@@ -81,11 +80,17 @@
uni.showLoading({
title: "授权中"
})
register({
let registData = {
loginCode:res.code,
phoneCode: this.phoneCode,
type: "routine",
}).then(res => {
type: "routine"
}
if(uni.getStorageSync("shareUserId")){
registData.uid = uni.getStorageSync("shareUserId");
registData.activityType = 0;
}
register(registData).then(res => {
uni.hideLoading();
if (res.data.code == 200) {
uni.setStorageSync('tokenHeaders', "Authori-zation")
uni.setStorage({
......
......@@ -10,11 +10,11 @@
<view class="u-flex left" hover-class="left--hover" hover-start-time="150" v-if="navbarType==3">
<view class="u-flex u-home-arrow-left" :style="{borderColor:isWhite?'rgba(255,255,255,.5)':'#dadbde'}">
<view @click="onBack">
<u-icon name="arrow-left" size="19" :color="leftColor"></u-icon>
<u-icon name="arrow-left" size="24" :color="leftColor"></u-icon>
</view>
<u-line direction="column" :hairline="false" length="16" margin="0 8px" :color="isWhite?'rgba(255,255,255,.3)':'#dadbde'"></u-line>
<view @click="onHome">
<u-icon name="home" size="20" :color="leftColor"></u-icon>
<u-icon name="home" size="24" :color="leftColor"></u-icon>
</view>
</view>
</view>
......@@ -22,7 +22,8 @@
<slot name="left">
<!-- 左边箭头背景渐变 -->
<view class="iconBg u-flex" :style="{background: 'rgba(0,0,0,'+(navbarType == 5 ?(1-transparentValue)>0.4?.4:(1-transparentValue):0)+')'}">
<u-icon :name="iconLeft" size="16" :color="leftColor"></u-icon>
<text v-if="iconLeft == 'home'" :style="{fontSize:'16px',color:leftColor,whiteSpace:'nowrap'}">首页</text>
<u-icon v-else :name="iconLeft" size="20" :color="leftColor"></u-icon>
</view>
<text v-if="leftText" class="left__text" :style="{color: leftColor}">{{ leftText }}</text>
</slot>
......
......@@ -102,6 +102,12 @@
iconFill: '/static/tab-bar-img/home_selected.png'
},
{
name: '会员中心',
url: 'pages/vipCreate/vipCreate',
icon: '/static/tab-bar-img/vip.png',
iconFill: '/static/tab-bar-img/vip_selected.png'
},
{
name: '订单',
url: 'pages/orderRecord/orderRecord',
icon: '/static/tab-bar-img/order.png',
......@@ -134,6 +140,9 @@
},
methods: {
onTabbar(index) {
if(uni.getStorageSync("statusIndex")){
uni.removeStorageSync('statusIndex')
}
if (this.path !== this.list[index].url) {
uni.switchTab({
url: '/' + this.list[index].url
......
......@@ -44,7 +44,6 @@
},
onGetPhoneNumber(e){
if(e.detail.errMsg !== "getPhoneNumber:ok") return;
console.log(e,111)
let that = this;
this.phoneCode = e.detail.code;
wx.login({
......@@ -52,11 +51,17 @@
uni.showLoading({
title: "授权中"
})
register({
let registData = {
loginCode:res.code,
phoneCode: this.phoneCode,
type: "routine",
}).then(res => {
type: "routine"
}
if(uni.getStorageSync("shareUserId")){
registData.uid = uni.getStorageSync("shareUserId");
registData.activityType = 0;
}
register(registData).then(res => {
uni.hideLoading();
if (res.data.code == 200) {
uni.setStorageSync('tokenHeaders', "Authori-zation")
uni.setStorage({
......
<template>
<view class="tool-box" >
<view v-for="(item, index) in toolList" :key="index" class="tool-item" :class="{active:!show}" :style="{transitionDuration: dNum+'s' }" @tap.stop="onHandle(item)">
<view class="tool-box">
<view class="gitf" @tap="onNavToVip">
<image :src="assetsPath+'/gitf.png'" mode="widthFix"></image>
</view>
<view v-for="(item, index) in toolList" :key="index" class="tool-item" :class="{active:!show}"
:style="{transitionDuration: dNum+'s' }" @tap.stop="onHandle(item)">
<!-- <text class="text-white text-bold text-xl">{{item.name}}</text> -->
<image v-if="show" class="image" :src="item.url" mode="scaleToFill"></image>
......@@ -11,71 +15,74 @@
<script>
import config from "@/config/index.config"
import {getOrderByAvailable, openDoor} from "@/api/order.js"
import {
getOrderByAvailable,
openDoor
} from "@/api/order.js"
export default {
name:"toolBox",
props:{
value:{
type:Boolean,
default:true
name: "toolBox",
props: {
value: {
type: Boolean,
default: true
},
storeId:{
storeId: {
type: [String, Number]
}
},
data() {
return {
show:true,
dNum:0.4,
toolList:[
{
name:"验券",
url:config.assetsPath+'/tool_3.png',
imgUrl: config.assetsPath+'/scan_code_icon.png',
sortName:"验",
routePath:"/pages/couponCheck/couponCheck",
value:1
show: true,
dNum: 0.4,
assetsPath:config.assetsPath,
toolList: [{
name: "验券",
url: config.assetsPath + '/tool_3_v1.png',
imgUrl: config.assetsPath + '/tool_3m_v1.png',
sortName: "验",
routePath: "/pages/couponCheck/couponCheck",
value: 1
},
{
name:"开门",
url:config.assetsPath+'/tool_1.png',
imgUrl: config.assetsPath+'/open_door_icon.png',
sortName:"开",
value:2
name: "开门",
url: config.assetsPath + '/tool_1_v1.png',
imgUrl: config.assetsPath + '/tool_1m_v1.png',
sortName: "开",
value: 2
},
{
name:"续单",
url:config.assetsPath+'/tool_2.png',
imgUrl: config.assetsPath+'/order_2_icon.png',
sortName:"续",
value:3
name: "续单",
url: config.assetsPath + '/tool_2_v1.png',
imgUrl: config.assetsPath + '/tool_2m_v1.png',
sortName: "续",
value: 3
},
{
name:"咨询",
url:config.assetsPath+'/tool_4.png',
imgUrl: config.assetsPath+'/zcpt.png',
sortName:"客",
value:4
name: "咨询",
url: config.assetsPath + '/tool_4_v1.png',
imgUrl: config.assetsPath + '/tool_4m_v1.png',
sortName: "客",
value: 4
}
],
timer:null,
orderInfo:{},
servicePhone:'',
timer: null,
orderInfo: {},
servicePhone: '',
};
},
watch:{
value(val){
if(this.timer){
watch: {
value(val) {
if (this.timer) {
clearTimeout(this.timer)
}
if(val){
this.timer = setTimeout(()=>{
if (val) {
this.timer = setTimeout(() => {
this.dNum = 0.8;
this.show = val;
},1500)
}else{
}, 1500)
} else {
this.show = val
}
}
......@@ -83,98 +90,89 @@
mounted() {
},
methods:{
onGetSysConfig(){
let sysConfigList = uni.getStorageSync('sysConfig')
let s = sysConfigList.find(item=>item.configKey === 'wechat.customer.service.phone')
if(s){
this.servicePhone= s.configValue;
uni.makePhoneCall({
phoneNumber:this.servicePhone
methods: {
onNavToVip(){
uni.switchTab({
url:"/pages/vipCreate/vipCreate"
})
},
onGetSysConfig() {
let sysConfigList = uni.getStorageSync('sysConfig')
let s = sysConfigList.find(item=>item.configKey === 'wechat.service.url')
wx.openCustomerServiceChat({
extInfo: {
url: s? s.configValue : 'https://work.weixin.qq.com/kfid/kfc64ed401ad337a3c8'
},
corpId: 'wwef93286fdc08b2ac',
success(res) {
console.log(res)
}
})
},
onHandle(val){
if(val.value===4){
onHandle(val) {
if (val.value === 4) {
this.onGetSysConfig()
return
};
if([2,3].includes(val.value)){
if ([2, 3].includes(val.value)) {
this.onGetOrderByAvailable(val.value)
return
}
if(val.value===1){
if (val.value === 1) {
uni.navigateTo({
url:val.routePath+'?storeId='+this.storeId
url: val.routePath + '?storeId=' + this.storeId
})
}
},
onGetOrderByAvailable(i){
getOrderByAvailable().then(res=>{
if(res.data.code === 200){
if(res.data.data&&res.data.data.length===1){
this.orderInfo = res.data.data[0];
if(i === 3){
if(this.orderInfo.status ==1){
// 去续单
onGetOrderByAvailable(i) {
getOrderByAvailable().then(res => {
if (res.data.code === 200) {
if (res.data.data && res.data.data.length) {
let arr = res.data.data.filter(item => item.status);
if (arr.length && arr.length == 1) {
this.orderInfo = arr[0];
if (i == 3) {
// 续单
uni.navigateTo({
url:`/pages/order/order?roomId=${this.orderInfo.roomId}&orderNo=${this.orderInfo.orderNo}`
url: `/pages/order/order?orderNo=${this.orderInfo.orderNo}`
})
}else{
uni.showToast({
icon:"none",
title:"无使用中的订单,无法续单哦!"
})
}
}else{
// 去开门
} else {
// 开门
this.onOpenDoor()
}
}else if(res.data.data&&res.data.data.length > 1){
let list = res.data.data.filter(item=> item.status ==1)
if(list.length ===1){
this.orderInfo = list[0];
if(i === 3){
// 去续单
uni.navigateTo({
url:`/pages/order/order?roomId=${this.orderInfo.roomId}&orderNo=${this.orderInfo.orderNo}`
})
}else{
// 去开门
this.onOpenDoor()
}
}else{
} else if (arr.length && arr.length > 1) {
uni.switchTab({
url:"/pages/orderRecord/orderRecord"
url: "/pages/orderRecord/orderRecord?index=2"
})
} else {
uni.showToast({
icon: "none",
title: "暂无可用的订单,请先下单预约哦!"
})
}
}else{
} else {
uni.showToast({
icon:"none",
title:"暂无可用的订单,请先下单预约哦!"
icon: "none",
title: "暂无可用的订单,请先下单预约哦!"
})
}
}else{
} else {
uni.showToast({
icon:"none",
title:res.data.msg
icon: "none",
title: res.data.msg
})
}
})
},
onOpenDoor(){
onOpenDoor() {
uni.showLoading({
title:"开门中..."
title: "开门中..."
})
openDoor(this.orderInfo.orderNo).then(res=>{
openDoor(this.orderInfo.orderNo).then(res => {
uni.hideLoading()
uni.showToast({
icon:"none",
title:res.data.msg
icon: "none",
title: res.data.msg
})
})
}
......@@ -183,43 +181,55 @@
</script>
<style lang="scss" scoped>
.tool-box{
.tool-box {
position: fixed;
bottom: 10vh;
right: 0;
display: flex;
flex-direction: column;
align-items: flex-end;
z-index: 99;
.tool-item{
.gitf{
width: 144upx;
max-height: 150upx;
}
.tool-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 60px;
height: 54px;
border-radius: 20upx 0 0 20upx;
background: rgba(255, 255, 255, 0.72);
height: 60px;
border-radius: 12px 0 0 12px;
// background: rgba(255, 255, 255, 0.72);
// border-top: 1px solid #E40583;
// border-left: 1px solid #E40583;
// border-bottom: 1px solid #E40583;
margin: 20rpx 0;
transition-property: all;
transition-timing-function:ease;
box-shadow: -4rpx 4rpx 13rpx 0rpx rgba(74, 11, 47, 0.4);
transition: width 2s, height 2s;
transition-timing-function: ease;
box-shadow: 0rpx 0rpx 28rpx 0rpx rgba(0, 0, 0, 0.6);
// opacity: 0.9;
overflow: hidden;
.image{
.image {
width: 100%;
height: 100%;
}
text{
text {
white-space: nowrap;
font-size: 28rpx;
color: #3D3D3D;
}
}
.active{
width: 36px;
height:32px;
border-radius: 12upx 0 0 12upx;
.active {
width: 40px;
height: 40px;
border-radius: 8px 0 0 8px;
opacity: 0.9;
}
}
}
</style>
\ No newline at end of file
const CONFIG = {
// 开发环境配置
development: {
// assetsPath: 'https://www.coujio.com/wechat_static', // 静态资源路径
// assetsPath: 'https://coujiao.pseer.com/wechat_static', // 静态资源路径
assetsPath: 'http://localhost:8211/static', // 静态资源路径
// baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址
baseUrl: 'https://coujiao.pseer.com/front-api', // 后台接口请求地址
// baseUrl: 'http://10.24.3.185:8883/front-api',
// hostUrl: 'https://www.coujio.com/prod-api', // H5地址(前端运行地址)
hostUrl: 'https://coujiao.pseer.com/prod-api', // H5地址(前端运行地址)
assetsPath: 'https://www.coujio.com/wechat_static', // 静态资源路径
// assetsPath: 'http://coujiao.pseer.com:8888/wechat_static', // 静态资源路径
// assetsPath: 'http://10.24.5.63:8211/static', // 静态资源路径
baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址
// baseUrl: 'https://coujiao.pseer.com/front-api', // 后台接口请求地址
// hostUrl: 'http://coujiao.pseer.com:8888/prod-api', // H5地址(前端运行地址)
hostUrl: 'https://www.coujio.com/prod-api', // H5地址(前端运行地址)
websocketUrl: '', // websocket服务端地址
weixinAppId: '' ,// 微信公众号appid
codeHeadUrl:"",
......@@ -16,12 +15,12 @@ const CONFIG = {
},
// 生产环境配置
production: {
assetsPath: 'https://coujiao.pseer.com/wechat_static', // 静态资源路径
// assetsPath: 'https://www.coujio.com/wechat_static', // 静态资源路径
baseUrl: 'https://coujiao.pseer.com/front-api', // 后台接口请求地址
// baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址
hostUrl: 'https://coujiao.pseer.com/prod-api', // H5地址(前端运行地址)
// hostUrl: 'https://www.coujio.com/prod-api', // H5地址(前端运行地址)
// assetsPath: 'http://coujiao.pseer.com:8888/wechat_static', // 静态资源路径
assetsPath: 'https://www.coujio.com/wechat_static', // 静态资源路径
// baseUrl: 'https://coujiao.pseer.com/front-api', // 后台接口请求地址
baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址
// hostUrl: 'https://coujiao.pseer.com/prod-api', // H5地址(前端运行地址)
hostUrl: 'https://www.coujio.com/prod-api', // H5地址(前端运行地址)
websocketUrl: '', // websocket服务端地址
weixinAppId: '', // 微信公众号appid
codeHeadUrl:"",
......
......@@ -73,6 +73,9 @@
"requiredPrivateInfos" : [ "getLocation" ],
"uniStatistics" : {
"enable" : false
},
"secureNetwork" : {
"enable" : false
}
},
"mp-alipay" : {
......
......@@ -8,6 +8,14 @@
}
},
{
"path" : "pages/vipCreate/vipCreate",
"style" :
{
"navigationBarTitleText" : "权益充值",
"navigationStyle": "custom"
}
},
{
"path": "pages/storeList/storeList",
"style": {
"navigationBarTitleText": "选择门店",
......@@ -32,7 +40,8 @@
"path": "pages/order/order",
"style": {
"navigationBarTitleText": "房间预约",
"navigationStyle": "default"
"navigationStyle": "default",
"backgroundColorTop": "white"
}
},
{
......@@ -50,13 +59,6 @@
}
},
{
"path": "pages/webUrl/index",
"style": {
"navigationBarTitleText": "详情",
"navigationStyle": "default"
}
},
{
"path": "pages/article/article",
"style": {
"navigationBarTitleText": "详情",
......@@ -144,19 +146,18 @@
}
},
{
"path": "pages/payRecord/index",
"path": "pages/deviceManage/index",
"style": {
"navigationBarTitleText": "消费记录",
"enablePullDownRefresh" : false
"navigationBarTitleText": "设备控制"
}
},
{
"path": "pages/deviceManage/index",
"style": {
"navigationBarTitleText": "设备控制"
"path" : "pages/userShare/userShare",
"style" :
{
"navigationBarTitleText" : "分享"
}
}
],
"subPackages": [
{
......@@ -168,6 +169,93 @@
"navigationBarTitleText": "我的车辆",
"navigationStyle": "default"
}
},
{
"path": "webUrl/index",
"style": {
"navigationBarTitleText": "详情",
"navigationStyle": "default"
}
},
{
"path": "payRecord/index",
"style": {
"navigationBarTitleText": "消费记录",
"enablePullDownRefresh" : false
}
},
{
"path": "equityRecord/index",
"style": {
"navigationBarTitleText": "购买记录",
"enablePullDownRefresh" : false
}
},
{
"path": "recharge/index",
"style": {
"navigationBarTitleText": "充值记录",
"enablePullDownRefresh" : false
}
},
{
"path": "recharge/record",
"style": {
"navigationBarTitleText": "余额记录",
"enablePullDownRefresh" : false
}
},
{
"path": "recharge/integral",
"style": {
"navigationBarTitleText": "积分记录",
"enablePullDownRefresh" : false
}
},
{
"path": "recharge/duration",
"style": {
"navigationBarTitleText": "时长记录",
"enablePullDownRefresh" : false
}
},
{
"path" : "rule/rule",
"style": {
"navigationBarTitleText": "活动规则",
"enablePullDownRefresh" : false
}
},
{
"path" : "levelDetail/index",
"style": {
"navigationBarTitleText": "会员等级详情",
"enablePullDownRefresh" : false
}
},
{
"path" : "dataStatistics/index",
"style": {
"navigationBarTitleText": "门店数据统计",
"navigationStyle": "custom",
"enablePullDownRefresh" : false
}
},
{
"path" : "equityDetail/equityDetail",
"style" :
{
"navigationBarTitleText" : "权益详情",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "equityFundLog/index",
"style": {
"navigationBarTitleText": "收益明细",
"enablePullDownRefresh" : false
}
}
]
}
......@@ -191,6 +279,12 @@
"text": "首页"
},
{
"pagePath": "pages/vipCreate/vipCreate",
"iconPath": "static/tab-bar-img/vip.png",
"selectedIconPath": "static/tab-bar-img/vip_selected.png",
"text": "会员中心"
},
{
"pagePath": "pages/orderRecord/orderRecord",
"iconPath": "static/tab-bar-img/order.png",
"selectedIconPath": "static/tab-bar-img/order_selected.png",
......
......@@ -68,7 +68,7 @@
<view class="room-stauts">
<view class="flex-row">
<text class="text-sm" :style="{color: colorEnum[val.colorStatus]}">{{statusEnum[val.colorStatus]}}</text>
<text v-if="val.facilities.length" class="text-yellow2 text-sm">({{val.facilities[0]}})</text>
<text v-if="val.facilities.length" class="text-gray text-sm">({{val.facilities[0]}})</text>
</view>
<view class="order-info-box">
<view v-if="val.orderList&&val.orderList.length" class="list">
......@@ -121,11 +121,11 @@ import moment from "@/common/moment";
6:'已下架'
},
colorEnum:{
0:"#6fc544",
1:"#e7a646",
2:"#4aa3ff",
3:"#ff494e",
4:"#ff49ef",
0:"#02F6FF",
1:"#e51771",
2:"#aaaaaa",
3:"#EE8A1A",
4:"#EE8A1A",
5:"#ff0000",
6:"#999999",
},
......@@ -133,27 +133,27 @@ import moment from "@/common/moment";
{
label:"空闲中",
status:0,
color:"#6fc544"
color:"#02F6FF"
},
{
label:"使用中",
status:1,
color:"#e7a646"
color:"#e51771"
},
{
label:"维护中",
status:2,
color:"#4aa3ff"
color:"#aaaaaa"
},
{
label:"待保洁",
status:3,
color:"#ff49ef"
color:"#EE8A1A"
},
{
label:"保洁中",
status:4,
color:"#ff49ef"
color:"#EE8A1A"
}
],
cleanStatusEnum:{},
......@@ -212,7 +212,7 @@ import moment from "@/common/moment";
preEndDate: moment(oItem.preEndDate).format("HH:mm")
}
}):[],
facilities: val.facilities.split(",").map(fItem=> this.facilitieList[fItem]).filter(fVal => fVal.includes('窗')),
facilities: val.facilities? val.facilities.split(",").map(fItem=> this.facilitieList[fItem]).filter(fVal => fVal.includes('窗')):[],
colorStatus: val.roomStat ===3? 2 : val.roomStat ===2? 6: val.isDirtyRoom>=1 && val.recordsStatus===0 ? 5 : val.recordsStatus>=0&& val.recordsStatus=== 0? 3: val.recordsStatus >= 0&& val.recordsStatus=== 1? 4: val.status
}
}):[]
......
......@@ -79,6 +79,7 @@
</view>
</view>
</uni-popup>
<LoginPop ref="loginPop" />
</view>
</template>
......@@ -87,9 +88,10 @@
import {couponChecked,getStoreListByCouponCode,getCouponByCode} from "@/api/coupon.js";
import moment from "@/common/moment_zh_cn.js";
import StoreList from "@/components/storeList/couponStoreList"
import LoginPop from "@/components/login/login"
export default {
components: {
LoginPop,
StoreList
},
data() {
......@@ -116,7 +118,8 @@
eventChannel:null,
orderPage:false,
popStoreList:[],
qrCode:''
qrCode:'',
loginStatus: uni.getStorageSync('loginStatus') == 'login'? true: false
};
},
filters:{
......@@ -139,9 +142,17 @@
this.storeId = ''
}
})
if(!this.loginStatus){
this.$refs.loginPop.open();
}
},
methods:{
onConfirm(){
if(!this.loginStatus){
this.$refs.loginPop.open();
return
}
let that = this;
if(!this.code){
uni.showToast({
......
......@@ -29,7 +29,7 @@
<text class="">来源:</text>
<text>{{couponSourceEnum[item.sourceType]}} {{item.platformType!==1? '('+platformEnum[item.platformType]+')' : ''}}</text>
</view>
<view v-if="item.couponType == 4" class="flex-1 flex-row text-gray ">
<view v-if=" [4,5].includes(item.couponType) " class="flex-1 flex-row text-gray ">
<text class="">使用说明:</text>
<text>{{item.remark || ''}}</text>
</view>
......
......@@ -49,13 +49,14 @@
<view v-if="val.deviceList" class="flex-col device-list">
<view class="part" v-if="val.deviceList.door" >
<text class="text-title">门禁控制</text>
<view v-if="val.deviceList.door.status ==1" class="">
<text>电量:{{val.deviceList.door.voltage}}</text>
<view class="">
<text v-if="val.deviceList.door.status =='0'" class="text-green">离线</text>
<text v-else>电量:{{val.deviceList.door.voltage}}</text>
<button @tap="onDeviceRun(10,val.deviceList.door)" class="cu-btn bg-blue margin-left-sm">开启</button>
</view>
<view v-else-if="val.deviceList.door.status =='0'" class="">
<!-- <view v-else-if="val.deviceList.door.status =='0'" class="">
<text>离线</text>
</view>
</view> -->
</view>
<view class="part" v-if="val.deviceList.el">
<text class="text-title">取电开关</text>
......@@ -63,8 +64,8 @@
<text class="margin-right-sm" :class="val.deviceList.el.status==3?'text-red':'text-green'">{{deviceStatusEnum[val.deviceList.el.status]}}</text>
<button @tap="onDeviceRun(20,val.deviceList.el)" class="cu-btn margin-right-sm" :class="val.deviceList.el.status==2?'bg-blue':'bg-gray'">开启</button>
<button @tap="onDeviceRun(40,val.deviceList.el)" class="cu-btn" :class="val.deviceList.el.status==3?'bg-blue':'bg-gray'">关闭</button>
<button @tap="onDeviceRun(20,val.deviceList.el)" class="cu-btn margin-right-sm bg-blue">开启</button>
<button @tap="onDeviceRun(40,val.deviceList.el)" class="cu-btn bg-blue">关闭</button>
<!-- <switch data-type="door" :data-index="index" :data-k="k" :data-id="val.deviceList.el.roomId" @change="onSwitchDoor" :class="val.deviceList.el.status==3?'checked':''" :checked="val.deviceList.el.status==3?true:false" color="#e54d42"></switch> -->
</view>
</view>
......@@ -244,8 +245,8 @@ import moment from "@/common/moment";
// this.onDeviceRun(t,e.target.dataset.id)
// },
onDeviceRun(opType,device){
if(opType == 20 && device.status != 2) return;
if(opType == 40 && device.status != 3) return;
// if(opType == 20 && device.status != 2) return;
// if(opType == 40 && device.status != 3) return;
let that = this;
if(this.deviceTime){
uni.showToast({
......
......@@ -61,8 +61,16 @@
</view>
</view>
</view>
<view class="flex-between part-1">
<view v-if="item.balance > 0" class="flex-between part-1">
<view class="">
<text>余额支付:</text>
<text class="text-black text-bold text-lg">{{item.balance}}</text>
</view>
<view class="flex-row">
<text v-if="item.payPrice <= 0">{{item.orderType==1?'房间预定':'房间续订'}}</text>
</view>
</view>
<view v-if="item.payPrice > 0 || (item.payPrice <= 0 && item.balance <= 0)" class="flex-between part-1">
<view class="">
<text>{{item.payType==1?'微信支付':'余额支付'}}:</text>
<text class="text-black text-bold text-lg">{{item.payPrice}}</text>
......@@ -183,7 +191,6 @@ import NoLogin from "@/components/noLogin/noLogin"
};
},
onLoad() {
// 隐藏原生的tabbar
uni.hideTabBar();
},
onReachBottom() {
......@@ -193,6 +200,11 @@ import NoLogin from "@/components/noLogin/noLogin"
}
},
onShow() {
let statusIndex = uni.getStorageSync("statusIndex");
console.log(statusIndex,99999)
if(statusIndex === 0 || statusIndex > 0){
this.statusIndex = statusIndex
}
this.onGetDicts()
},
methods: {
......
......@@ -9,7 +9,7 @@
<text class="text-lg">{{orderInfo.startDate||'-'}}</text>
</view>
<view class="flex-col part-center">
<text class="text-xxl text-bold">{{orderInfo.timeLong || 0}}小时</text>
<text class="text-xl text-bold">{{orderInfo.timeLong || 0}}小时</text>
</view>
<view class="flex-col part-right">
<text class="text-xxl text-bold">{{orderInfo.endTime||'-'}}</text>
......@@ -53,21 +53,52 @@
<text class="text-gray ">订单编号</text>
<text class="text-title ">{{orderInfo.orderNo||'-'}}</text>
</view>
<view class="flex-between">
<text class="text-gray ">订单应付</text>
<view class="flex-row" style="align-items: center;text-decoration-line: line-through;">
<text class="text-lg">{{orderInfo.totalPrice||'0'}}</text>
<text style="margin-left: 4upx;"></text>
</view>
</view>
<view v-if="orderInfo.packName" class="flex-between">
<text class="text-gray ">购买套餐</text>
<text class="text-title ">{{orderInfo.packName||'-'}}</text>
</view>
<view class="flex-between">
<!-- <view class="flex-between">
<text class="text-gray">支付方式</text>
<text class="text-title">{{orderInfo.payType==1?'微信支付':'其他支付'}}</text>
</view>
</view> -->
<view v-if="orderInfo.couponName && orderInfo.couponId" class="flex-between">
<text class="text-gray">优惠券抵扣</text>
<text class="text-title">{{orderInfo.couponName}}</text>
</view>
<view class="flex-between">
<text class="text-gray">实付金额</text>
<view v-if="orderInfo.duration" class="flex-between">
<text class="text-gray">时长抵扣</text>
<view class="">
<text class="text-title">{{orderInfo.duration}}</text>
<text>小时</text>
</view>
</view>
<!-- <view v-if="orderInfo.discountRatio" class="flex-between">
<text class="text-gray">折扣优惠</text>
<view class="">
<text class="text-title">{{orderInfo.discountRatio}}</text>
</view>
</view> -->
<view v-if="orderInfo.balance>0" class="flex-between">
<text class="text-gray">余额支付</text>
<view class="flex-row" style="align-items: center;">
<text class="text-pink text-bold text-xxl">{{orderInfo.balance||'0'}}</text>
<text style="margin-left: 4upx;"></text>
</view>
</view>
<view v-if="orderInfo.payPrice>0" class="flex-between">
<text class="text-gray">微信支付</text>
<view class="flex-row" style="align-items: center;">
<text class="text-pink text-bold text-xxl">{{orderInfo.payPrice||'0'}}</text>
<text style="margin-left: 4upx;"></text>
......@@ -96,12 +127,12 @@
</view>
<view class="flex-between btn-box">
<view v-if="orderInfo.status <= 1" class="part">
<button class="cu-btn block round bg-pink lg" :class="openDoorStatus?'bg-gray':'bg-pink'" @tap="onOpenDoor">进店开门</button>
<button class="cu-btn block round bg-pink lg" :class="openDoorStatus?'bg-gray':'bg-pink'" @tap="onCheckOrderStatus">进店开门</button>
</view>
<view class="part">
<button class="cu-btn block round line-pink lg" open-type="share">分享好友</button>
</view>
<view v-if="(continStatus || orderInfo.status ==1) && userInfo.id == orderInfo.consumerId" class="part">
<view v-if="continStatus || orderInfo.status ==1 " class="part">
<button class="cu-btn block round bg-mauve lg" @tap="onCheckLogin">房间续单</button>
</view>
</view>
......@@ -131,14 +162,18 @@
<uni-popup-dialog mode="base" content="请确认是否退单" :duration="2000" :before-close="true" @close="close" @confirm="confirm"></uni-popup-dialog>
</uni-popup>
<uni-popup ref="popupDialog" type="dialog">
<uni-popup-dialog type="warn" mode="base" title="提示" content="订单暂未开始,请确认是否立即开始此订单?" :duration="2000" :before-close="true" @close="onCancleTip" @confirm="onOpenDoor"></uni-popup-dialog>
</uni-popup>
<LoginPop ref="loginPop" @success='onNavToOrder' />
</view>
</template>
<script>
import {login} from "@/api/index.js";
import {getDictItem} from "@/utils/tools.js"
import {login,dictList} from "@/api/index.js";
import {getDictItem,getSysConfigValue} from "@/utils/tools.js"
import fNavbar from '@/components/module/f-navbar/f-navbar';
import {getOrderInfoByNo,orderRefund,openDoor,noLoginOpenDoor,noLoginGetOrderInfo} from "@/api/order.js"
import moment from "@/common/moment_zh_cn.js";
......@@ -164,7 +199,8 @@
shareOrder:false,
userInfo:{
id:''
}
},
storeCleanDuration: getSysConfigValue('StoreCleanDuration')? Number(getSysConfigValue('StoreCleanDuration')):30
};
},
onLoad(option) {
......@@ -198,14 +234,12 @@
dicts = JSON.parse(uni.getStorageSync('dicts'))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.roomTypeEnum = getDictItem(dicts, "store_room_type");
} else {
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.roomTypeEnum = getDictItem(dicts, "store_room_type");
})
}
},
......@@ -260,12 +294,13 @@
},
onGetOrderInfo(){
noLoginGetOrderInfo(this.orderNo).then(res=>{
if(res.data.data.status === 2){
let nowTime = moment().valueOf();
let endTime = moment(res.data.data.endDate).valueOf();
if(nowTime - endTime< 15*60*1000){
this.continStatus = true;
}
console.log(this.continStatus,888)
}
this.orderInfo = {
...res.data.data,
roomImages: res.data.data.roomImages.split(','),
......@@ -286,7 +321,15 @@
menus: ['shareAppMessage', 'shareTimeline']
})
},
onCheckOrderStatus(){
if(this.orderInfo.status === 0){
this.$refs.popupDialog.open();
}else{
this.onOpenDoor();
}
},
onOpenDoor(){
this.$refs.popupDialog.close();
if(this.orderInfo.status <=1){
if(this.openDoorStatus){
uni.showToast({
......@@ -355,7 +398,7 @@
listSortDistance({
storeId: this.orderInfo.storeId,
roomId: this.orderInfo.roomId,
day: this.orderInfo.endDate,
day: this.orderInfo.status ==1 ? this.orderInfo.endDate: moment().format("YYYY-MM-DD"),
orderType:2,
orderId: this.orderInfo.id
}).then(res=>{
......@@ -372,7 +415,7 @@
// 续单开始时间戳,订单未结束使用订单实际结束时间,订单结束使用当前时间
let startDateStemp = this.orderInfo.status == 2? moment(moment().format("YYYY-MM-DD HH:mm:00")).valueOf(): moment(orderEndDate).valueOf()
//可续单的结束时间戳
let endDateStemp = startDateStemp + 60*60*1000;
let endDateStemp = startDateStemp + (60+this.storeCleanDuration)*60*1000;
let continueStatus = true;
if(res.data.code ==200 && res.data.data && res.data.data.length){
new Promise((resolve,reject) => {
......@@ -382,12 +425,15 @@
if(start < endDateStemp && start >= startDateStemp && item.status ==1 ){
if(this.onCheckHourUse(item.startHoldTime,item.endHoldTime)){
continueStatus = false;
console.log(1)
}else{
if( startDateStemp >= moment(item.startHoldTime).valueOf() && startDateStemp < moment(item.endHoldTime).valueOf()){
continueStatus = false;
}else if( endDateStemp >= moment(item.startHoldTime).valueOf()){
console.log(2)
}else if(startDateStemp < start && endDateStemp >= moment(item.startHoldTime).valueOf()){
continueStatus = false;
console.log(3)
}
}
......@@ -397,11 +443,41 @@
}
})
}).then(continueStatus =>{
console.log(continueStatus,"continueStatus")
if(continueStatus){
uni.navigateTo({
url:`/pages/order/order?roomId=${this.orderInfo.roomId}&orderNo=${this.orderInfo.orderNo}`
url:`/pages/order/order?roomId=${this.orderInfo.roomId}&orderNo=${this.orderInfo.orderNo}&modeIndex=1`
})
}else{
endDateStemp = startDateStemp + (30+this.storeCleanDuration)*60*1000;
continueStatus = true;
new Promise((resolve,reject) => {
res.data.data.forEach((item,i)=>{
let start = moment(item.timeHour +':00:00').valueOf();
let end = moment(item.timeHour +':59:59').valueOf();
if(start < endDateStemp && start >= startDateStemp && item.status ==1 ){
if(this.onCheckHourUse(item.startHoldTime,item.endHoldTime)){
continueStatus = false;
}else{
if( startDateStemp >= moment(item.startHoldTime).valueOf() && startDateStemp < moment(item.endHoldTime).valueOf()){
continueStatus = false;
}else if( startDateStemp < start && endDateStemp >= moment(item.startHoldTime).valueOf()){
continueStatus = false;
}
}
}
if(i>= res.data.data.length-1){
resolve(continueStatus)
}
})
}).then(continueStatus2 => {
console.log(continueStatus2,"continueStatus2")
if(continueStatus2){
uni.navigateTo({
url:`/pages/order/order?roomId=${this.orderInfo.roomId}&orderNo=${this.orderInfo.orderNo}`
})
}else{
uni.showToast({
icon:"none",
......@@ -410,6 +486,8 @@
}
})
}
})
}
}).catch(err=>{
uni.hideLoading()
uni.showToast({
......@@ -456,6 +534,9 @@
}
})
},
onCancleTip(){
this.$refs.popupDialog.close();
},
onMessagePush(){
}
......
......@@ -20,7 +20,7 @@
</view>
<view class="VerticalBox" :style="{paddingTop:CustomBar+50+'px'}">
<view class="banner2">
<image :src="assetsPath+'/banner2.png'" mode="widthFix"></image>
<image :src="assetsPath+'/banner4.png'" mode="widthFix"></image>
</view>
<view class="room-content-box">
<!-- 展示所有房间列表 -->
......@@ -74,7 +74,7 @@
nowLongitude: "",
name: '',
pageNum: 1,
pageSize: 20
pageSize: 400
},
show:true,
timer:null,
......@@ -196,7 +196,7 @@
}
.banner2 {
width: 674upx;
margin: -12upx auto 0;
margin: 12px auto 0;
image {
display: block;
......
......@@ -110,6 +110,7 @@
// eventChannel.emit('acceptDataFromOpenedPage', {data: 'data from test page'});
this.eventChannel.on('sendData', (data) => {
console.log(data,99999)
this.selectId = data.selectId || ''
this.onLoading(data);
})
......@@ -134,6 +135,7 @@
})
},
onLoading(d) {
console.log(d,"d");
getUseCoupon(d).then(res => {
if (res.statusCode == 200) {
if (res.data && res.data.data.length) {
......
<template>
<view class="user-share">
<view class="header-part">
<view v-if="loginStatus" class="flex-between">
<view class="flex-row user-info">
<image class="avatar-img" :src="userInfo.avatar|| assetsPath+'/logo_icon.png'" mode="scaleToFill">
</image>
<view class="">
<text>{{userInfo.nickName || '凑角会员_'+userName}}</text>
</view>
</view>
</view>
<view v-else class="logo-box">
<button class="cu-btn round bg-pink sm margin-left-sm" @tap.stop="onNavToLogin">立即授权绑定</button>
</view>
</view>
<view v-if="loginStatus" class="share-qrcode">
<view class="qrcode-box">
<tki-qrcode ref="qrcode" :cid="cid" :val="text" :size="size" unit="upx"
icon="../../static/logo_icon.png" :iconSize="iconSize" :onval="true" :loadMake="loadMake"
:showLoading="true" @result="qrR" />
</view>
<view class="part-bottom">
<button class="btn cu-btn bg-white" @tap="onSaveImg">
<image src="../../static/icon_album.png" mode="widthFix"></image>
<text>保存到相册</text>
</button>
<button open-type="share" class="btn cu-btn bg-blue">
<image src="../../static/share_icon_2.png" mode="widthFix"></image>
<text>分享邀请</text>
</button>
</view>
</view>
<view class="tip-rule">
<view class="flex-col">
<text class="text-black text-lg text-bold">活动介绍:</text>
<view class="margin-top-sm padding-sm">
<text>
已授权并注册过的用户,可通过此页面的分享按钮进行分享小程序,或页面内提供的二维码让新用户扫码,授权并注册成功后,分享该小程序的用户即可获得1小时时长,可在房间下单时进行抵扣;
</text>
</view>
</view>
</view>
<LoginPop ref="loginPop" @success="onSuccess" />
</view>
</template>
<script>
import LoginPop from "@/components/login/login"
import tkiQrcode from "@/components/tki-qrcode/tki-qrcode.vue"
import config from "@/config/index.config";
import {
getUserInfo
} from "@/api/index.js"
export default {
components: {
LoginPop,
tkiQrcode
},
data() {
return {
cid: "qrCode",
qrPath: '',
text: '生成中',
size: 520,
iconSize: 52,
colorDark: '#000000',
loadMake: false,
qrPath: '',
assetsPath: config.assetsPath,
loginStatus: uni.getStorageSync('loginStatus') == 'login' ? true : false,
userInfo: '',
userName: ''
};
},
onLoad(query) {
if (query.q) {
const q = decodeURIComponent(query.q)
// let q = 'https://www.coujio.com/userShare?uid=8&act=0'
let d = q.split('?')
let c = d[1].split('&')
let obj = {};
c.forEach(item => {
let l = item.split('=');
obj[l[0]] = l[1];
})
if (obj.uid) {
uni.setStorageSync("shareUserId", obj.uid)
}
}
if (query.uid) {
uni.setStorageSync("shareUserId", query.uid)
}
if (this.loginStatus) {
this.onGetUserInfo();
}
},
onShareAppMessage() {
return {
title: "邀请扫码注册",
path: `/pages/userShare/userShare?uid=${this.userInfo.id}`,
imageUrl: this.qrPath
}
},
methods: {
onGetUserInfo() {
getUserInfo().then(res => {
if (res.data.code == 200) {
this.userInfo = {
...res.data.data,
consumerWallet: res.data.data.consumerWallet ? res.data.data.consumerWallet : {
remainingIntegral: 0
}
}
if (this.userInfo && this.userInfo.phone) {
this.userName = this.userInfo.phone.slice(-4);
}
this.text = `https://www.coujio.com/userShare?uid=${this.userInfo.id}&act=0`;
this.loadMake = true;
}
})
},
onSaveImg() {
uni.saveImageToPhotosAlbum({
filePath: this.qrPath,
success: () => {
uni.showToast({
icon: 'none',
title: '保存成功'
})
},
fail: (err) => {
console.log(err, 999)
}
})
},
qrR(r) {
console.log(r, "二维码路径")
this.qrPath = r;
},
onNavToLogin() {
this.$refs.loginPop.open();
},
onSuccess(){
uni.showToast({
icon:"none",
title:"授权登录成功"
})
this.loginStatus = uni.getStorageSync('loginStatus') == 'login' ? true : false;
this.onGetUserInfo();
}
}
}
</script>
<style lang="scss" scoped>
.user-share {
display: flex;
flex-direction: column;
align-items: center;
width: 100vw;
min-height: 100vh;
overflow-x: hidden;
background: linear-gradient(140deg, rgba(228, 5, 131, 0.16) 0%, #f1f1f1 32%, #f1f1f1 72%, rgba(228, 5, 131, 0.16) 100%);
}
.tip-rule {
display: flex;
flex: 1;
padding: 20upx 30upx;
.flex-col {
align-self: flex-end;
margin-bottom: 24upx;
}
}
.header-part {
width: 100%;
.flex-between {
display: flex;
justify-content: center;
padding: 30upx;
align-items: center;
}
.user-info {
display: flex;
flex-direction: row;
align-items: center;
margin-right: 12upx;
}
.avatar-img {
width: 40px;
height: 40px;
border-radius: 50%;
box-shadow: 0 0 6upx #ff00ff;
margin-right: 12upx;
}
}
.qrcode-box {
width: 580upx;
background-color: #ffffff;
border-radius: 12upx;
box-shadow: 0 0 12upx #ff00ff;
padding: 20upx;
margin-top: 24upx;
}
.share-qrcode {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
.part-bottom {
display: flex;
flex-direction: row;
justify-content: center;
margin-top: 24upx;
width: 100%;
.btn {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
flex: 1;
height: 88upx;
border-radius: 20upx;
margin: 0 20upx;
image {
display: block;
width: 46upx;
height: auto;
margin-right: 6upx;
}
text {
font-size: 26*1.2upx;
}
}
}
}
.logo-box {
display: flex;
justify-content: center;
align-items: center;
padding: 20upx 0;
}
</style>
\ No newline at end of file
<template>
<view class="order-record">
<view class="content-box">
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="list-item" @tap="onNavToOrderInfo(item)">
<view class="flex-between">
<text class="">支付金额</text>
<text class="text-bold text-pink text-lg">{{item.payPrice}}</text>
</view>
<view class="flex-between">
<text class="">购买期限</text>
<text class="text-black text-bold text-lg">一年</text>
</view>
<view class="flex-between">
<text class="">支付方式</text>
<text>{{payTypeEnum[item.payType]}}</text>
</view>
<view class="flex-between">
<text class="">订单编号</text>
<text class="text-black">{{item.equityOrderNo}}</text>
</view>
<view class="flex-between">
<text class="">操作日期</text>
<text>{{item.payTime}}</text>
</view>
</view>
</view>
</view>
<view v-if="loginStatus && list.length == 0" class="empty-box">
<u-empty text="暂无数据" textColor='#C1C1C1' width="120" :icon="listBlankImage">
</u-empty>
</view>
<view v-if="loginStatus && list.length" style="padding: 12px 6% 0;">
<u-loadmore :status="status" :icon="true" :line='true' :loading-text="loadingText"
:loadmore-text="loadmoreText" :nomore-text="nomoreText" />
</view>
</view>
</template>
<script>
import config from "@/config/index.config"
import {
equityFundLog
} from "@/api/recharge.js"
import NoLogin from "@/components/noLogin/noLogin"
import {
getDictItem
} from "@/utils/tools.js"
export default {
components: {
NoLogin
},
data() {
return {
status: 'nomore ',
loadingText: '努力加载中',
loadmoreText: '上划加载',
nomoreText: '到底啦',
statusIndex: 0,
list: [],
statusList: [{
label: "全部",
value: "",
},
{
label: "已预约",
value: "0",
},
{
label: "使用中",
value: "1",
},
{
label: "已完成",
value: "2",
},
{
label: "退单",
value: "3",
}
],
queryParams: {
pageNum: 1,
pageSize: 100,
id: uni.getStorageSync("userInfo").id
},
orderStatusEnum: {},
payTypeEnum: {
1: "微信支付",
2: "支付宝支付",
3: "余额支付"
},
payStatus: {
expenditure: '-',
income: '+'
},
listBlankImage: config.assetsPath + '/no_data_icon.png',
};
},
onLoad() {
},
onReachBottom() {
if (this.status == 'loadmore') {
this.queryParams.pageNum += 1;
this.onLoading();
}
},
onShow() {
this.onGetDicts()
},
methods: {
onGetDicts() {
let dicts = []
if (uni.getStorageSync('dicts')) {
dicts = JSON.parse(uni.getStorageSync('dicts'))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
} else {
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
})
}
},
onLoading() {
uni.showLoading({
title: '加载中'
})
this.status = 'loading'
// this.queryParams.status = this.statusList[this.statusIndex].value;
equityFundLog(this.queryParams).then(res => {
console.log(res)
uni.hideLoading()
this.status = "nomore"
if (res.data.code == 200) {
this.list = res.data.data.map(item => {
return {
...item
}
})
} else if (res.data.code == 401) {
this.loginStatus = false
}
})
},
tabSelect(i) {
console.log(i, 99999)
this.statusIndex = i;
this.queryParams.pageNum = 1;
this.list = []
this.onLoading()
},
onNavToOrderInfo(val) {
// uni.navigateTo({
// url:"/pages/orderResult/orderResult?orderNo="+val.orderNo
// })
}
}
}
</script>
<style>
page {
background-color: #f1f1f1;
}
</style>
<style lang="scss" scoped>
.order-record {
display: flex;
flex-direction: column;
.content-box {
display: flex;
flex-direction: column;
.list-content {
display: flex;
flex-direction: column;
align-items: center;
.list-item {
display: flex;
flex-direction: column;
width: 94%;
padding: 20upx 20upx;
border-radius: 20upx;
background-color: #ffffff;
margin-top: 30upx;
.part-1 {
display: flex;
.flex-row {
display: flex;
flex-direction: row;
}
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<view class="order-record">
<view v-if="loginStatus" class="content-box">
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="list-item" @tap="onNavToOrderInfo(item)">
<view class="flex-between">
<text class="">支付金额</text>
<text class="text-bold text-pink text-lg">{{item.payPrice}}</text>
</view>
<view class="flex-between">
<text class="">购买期限</text>
<text class="text-black text-bold text-lg">一年</text>
</view>
<view class="flex-between">
<text class="">支付方式</text>
<text>{{payTypeEnum[item.payType]}}</text>
</view>
<view class="flex-between">
<text class="">订单编号</text>
<text class="text-black">{{item.equityOrderNo}}</text>
</view>
<view class="flex-between">
<text class="">操作日期</text>
<text>{{item.payTime}}</text>
</view>
</view>
</view>
</view>
<view v-if="loginStatus && list.length == 0" class="empty-box">
<u-empty text="暂无数据" textColor='#C1C1C1' width="120" :icon="listBlankImage">
</u-empty>
</view>
<view v-if="loginStatus && list.length" style="padding: 12px 6% 0;">
<u-loadmore :status="status" :icon="true" :line='true' :loading-text="loadingText"
:loadmore-text="loadmoreText" :nomore-text="nomoreText" />
</view>
<NoLogin v-model="loginStatus" />
</view>
</template>
<script>
import config from "@/config/index.config"
import {
equityRecordsList
} from "@/api/userInfo.js"
import NoLogin from "@/components/noLogin/noLogin"
import {
getDictItem
} from "@/utils/tools.js"
export default {
components: {
NoLogin
},
data() {
return {
status: 'nomore ',
loadingText: '努力加载中',
loadmoreText: '上划加载',
nomoreText: '到底啦',
statusIndex: 0,
list: [],
statusList: [{
label: "全部",
value: "",
},
{
label: "已预约",
value: "0",
},
{
label: "使用中",
value: "1",
},
{
label: "已完成",
value: "2",
},
{
label: "退单",
value: "3",
}
],
queryParams: {
pageNum: 1,
pageSize: 100
},
loginStatus: true,
orderStatusEnum: {},
payTypeEnum: {
1: "微信支付",
2: "支付宝支付",
3: "余额支付"
},
payStatus: {
expenditure: '-',
income: '+'
},
listBlankImage: config.assetsPath + '/no_data_icon.png',
};
},
onLoad() {
},
onReachBottom() {
if (this.status == 'loadmore') {
this.queryParams.pageNum += 1;
this.onLoading();
}
},
onShow() {
this.onGetDicts()
},
methods: {
onGetDicts() {
let dicts = []
if (uni.getStorageSync('dicts')) {
dicts = JSON.parse(uni.getStorageSync('dicts'))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
} else {
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
})
}
},
onLoading() {
uni.showLoading({
title: '加载中'
})
this.status = 'loading'
this.queryParams.status = this.statusList[this.statusIndex].value;
equityRecordsList(this.queryParams).then(res => {
console.log(res)
uni.hideLoading()
this.status = "nomore"
if (res.data.code == 200) {
this.list = res.data.data.map(item => {
return {
...item
}
})
} else if (res.data.code == 401) {
this.loginStatus = false
}
})
},
tabSelect(i) {
console.log(i, 99999)
this.statusIndex = i;
this.queryParams.pageNum = 1;
this.list = []
this.onLoading()
},
onNavToOrderInfo(val) {
// uni.navigateTo({
// url:"/pages/orderResult/orderResult?orderNo="+val.orderNo
// })
}
}
}
</script>
<style>
page {
background-color: #f1f1f1;
}
</style>
<style lang="scss" scoped>
.order-record {
display: flex;
flex-direction: column;
.content-box {
display: flex;
flex-direction: column;
.list-content {
display: flex;
flex-direction: column;
align-items: center;
.list-item {
display: flex;
flex-direction: column;
width: 94%;
padding: 20upx 20upx;
border-radius: 20upx;
background-color: #ffffff;
margin-top: 30upx;
.part-1 {
display: flex;
.flex-row {
display: flex;
flex-direction: row;
}
}
}
}
}
}
</style>
\ No newline at end of file
......@@ -61,14 +61,12 @@
userInfo:{}
};
},
onLoad(option) {
console.log(option, 999)
onLoad() {
this.userInfo = uni.getStorageSync('userInfo')
if (option.number){
if (this.userInfo.numberplate){
this.licensePlateNumber.push({
name: option.number
name: this.userInfo.numberplate
})
}
},
......
......@@ -8,7 +8,7 @@
<text class="text-title">{{item.name}}</text>
</view>
<view class="flex-row">
<text class="text-bold text-xl" :class="item.sign=='income'?'text-red':'text-black'">{{payStatus[item.sign||'expenditure']}}</text>
<text class="text-bold text-xl" :class="item.sign=='income'?'text-red':'text-black'">{{ item.price !== 0? payStatus[item.sign||'expenditure']:''}}</text>
<text class="text-black text-bold text-lg" >{{item.price}}</text>
</view>
</view>
......
<template>
<view class="order-record">
<view v-if="loginStatus" class="content-box">
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="list-item" >
<view class="flex-between part-1">
<view class="">
<text class="text-title">{{item.operationType? '增加' : "消费"}}</text>
</view>
<view class="flex-row">
<text class="text-bold text-xl" :class="item.sign=='income'?'text-red':'text-black'">{{item.operationType?'+':'-'}}</text>
<text class="text-black text-bold text-lg" >{{item.variableDuration}}小时</text>
</view>
</view>
<view class="flex-between part-1">
<text>{{item.operationTime}}</text>
<text>剩余{{item.operationType? item.currentDuration+item.variableDuration : item.currentDuration-item.variableDuration}}小时</text>
</view>
</view>
</view>
</view>
<view v-if="loginStatus && list.length == 0" class="empty-box">
<u-empty text="暂无数据" textColor='#C1C1C1' width="120"
:icon="listBlankImage">
</u-empty>
</view>
<view v-if="loginStatus && list.length" style="padding: 12px 6% 0;">
<u-loadmore :status="status" :icon="true" :line='true' :loading-text="loadingText"
:loadmore-text="loadmoreText" :nomore-text="nomoreText" />
</view>
<NoLogin v-model="loginStatus" />
</view>
</template>
<script>
import config from "@/config/index.config"
import {
durationList
} from "@/api/recharge.js"
import NoLogin from "@/components/noLogin/noLogin"
import {
getDictItem
} from "@/utils/tools.js"
export default {
components:{
NoLogin
},
data() {
return {
status: 'nomore ',
loadingText: '努力加载中',
loadmoreText: '上划加载',
nomoreText: '到底啦',
statusIndex: 0,
list: [],
statusList: [{
label: "全部",
value: "",
},
{
label: "已预约",
value: "0",
},
{
label: "使用中",
value: "1",
},
{
label: "已完成",
value: "2",
},
{
label: "退单",
value: "3",
}
],
queryParams: {
pageNum: 1,
pageSize: 10
},
loginStatus:true,
orderStatusEnum:{},
payTypeEnum:{
1:"微信支付",
2:"支付宝支付",
3:"余额支付"
},
payStatus:{
'0':'-',
'1':'+'
},
listBlankImage:config.assetsPath+'/no_data_icon.png',
};
},
onLoad() {
},
onReachBottom() {
if (this.status == 'loadmore') {
this.queryParams.pageNum += 1;
this.onLoading();
}
},
onShow() {
this.onGetDicts()
},
methods: {
onGetDicts() {
let dicts = []
if (uni.getStorageSync('dicts')) {
dicts = JSON.parse(uni.getStorageSync('dicts'))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
} else {
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
})
}
},
onLoading() {
uni.showLoading({
title: '加载中'
})
this.status = 'loading'
this.queryParams.status = this.statusList[this.statusIndex].value;
durationList(this.queryParams).then(res => {
console.log(res)
uni.hideLoading()
if (res.data.code == 200) {
this.list = res.data.data
this.status = 'nomore'
}else if(res.data.code == 401){
this.loginStatus = false
}
})
},
tabSelect(i) {
console.log(i, 99999)
this.statusIndex = i;
this.queryParams.pageNum = 1;
this.list = []
this.onLoading()
},
onNavToOrderInfo(val){
uni.navigateTo({
url:"/pages/orderResult/orderResult?orderNo="+val.orderNo
})
}
}
}
</script>
<style>
page{
background-color: #f1f1f1;
}
</style>
<style lang="scss" scoped>
.order-record {
display: flex;
flex-direction: column;
.content-box {
display: flex;
flex-direction: column;
.list-content{
display: flex;
flex-direction: column;
align-items: center;
.list-item{
width: 94%;
padding: 20upx 20upx;
border-radius: 20upx;
background-color: #ffffff;
margin-top: 30upx;
.part-1{
display: flex;
align-items: center;
padding: 10upx;
.flex-row{
display: flex;
flex-direction: row;
align-items: center;
}
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<view class="order-record">
<view class="flex-between record-box">
<view class="">
</view>
<view class="text-btn" @tap="onNav">
<text>使用记录</text>
<text class="cuIcon-right"></text>
</view>
</view>
<view v-if="loginStatus" class="content-box">
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="list-item" @tap="onNavToOrderInfo(item)">
<view class="flex-between part-1">
<view class="flex-row">
<text class="text-title text-gray text-lg">充值金额</text>
<text class="text-bold text-black">{{item.rechargeAmount}}</text>
</view>
<view class="flex-col">
<view v-if="item.giveType.includes(1)" class="flex-row">
<text>赠送金额</text>
<text class="text-pink text-bold text-lg" >{{item.giveAmount}}</text>
</view>
<view v-if="item.giveType.includes(2)" class="flex-row">
<text>赠送时长</text>
<text class="text-pink text-bold text-lg" >{{item.giveDuration || 0}}</text>
<text>小时</text>
</view>
<view v-if="item.giveType.includes(3)" class="flex-row">
<text>赠送</text>
<text class="text-pink text-bold text-lg" >{{item.giveIntegral||0}}</text>
<text>积分</text>
</view>
<view v-if="item.giveType.includes(4)" class="flex-row">
<text>赠送优惠券</text>
<text class="text-pink text-bold text-lg" >{{item.consumerCouponIds||''}}1张</text>
</view>
</view>
</view>
<view class="flex-between part-1">
<text>{{item.rechargeDate}}</text>
<text>{{payTypeEnum[item.payType]}}</text>
</view>
</view>
</view>
</view>
<view v-if="loginStatus && list.length == 0" class="empty-box">
<u-empty text="暂无数据" textColor='#C1C1C1' width="120"
:icon="listBlankImage">
</u-empty>
</view>
<view v-if="loginStatus && list.length" style="padding: 12px 6% 0;">
<u-loadmore :status="status" :icon="true" :line='true' :loading-text="loadingText"
:loadmore-text="loadmoreText" :nomore-text="nomoreText" />
</view>
<NoLogin v-model="loginStatus" />
</view>
</template>
<script>
import config from "@/config/index.config"
import {
recordsList
} from "@/api/recharge.js"
import NoLogin from "@/components/noLogin/noLogin"
import {
getDictItem
} from "@/utils/tools.js"
export default {
components:{
NoLogin
},
data() {
return {
status: 'nomore ',
loadingText: '努力加载中',
loadmoreText: '上划加载',
nomoreText: '到底啦',
statusIndex: 0,
list: [],
statusList: [{
label: "全部",
value: "",
},
{
label: "已预约",
value: "0",
},
{
label: "使用中",
value: "1",
},
{
label: "已完成",
value: "2",
},
{
label: "退单",
value: "3",
}
],
queryParams: {
pageNum: 1,
pageSize: 10
},
loginStatus:true,
orderStatusEnum:{},
payTypeEnum:{
1:"微信支付",
2:"支付宝支付",
3:"余额支付"
},
payStatus:{
expenditure:'-',
income:'+'
},
listBlankImage:config.assetsPath+'/no_data_icon.png',
};
},
onLoad() {
},
onReachBottom() {
if (this.status == 'loadmore') {
this.queryParams.pageNum += 1;
this.onLoading();
}
},
onShow() {
this.onGetDicts()
},
methods: {
onGetDicts() {
let dicts = []
if (uni.getStorageSync('dicts')) {
dicts = JSON.parse(uni.getStorageSync('dicts'))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
} else {
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
})
}
},
onLoading() {
uni.showLoading({
title: '加载中'
})
this.status = 'loading'
this.queryParams.status = this.statusList[this.statusIndex].value;
recordsList(this.queryParams).then(res => {
console.log(res)
uni.hideLoading()
if (res.data.code == 200) {
if(this.queryParams.pageNum ==1){
this.list = res.data.rows.map(item=> {
return {
...item,
giveType: item.giveType.split(',').map(v=>Number(v))
}
})
}else{
this.list = [...this.list,...res.data.rows]
}
if(this.list.length < res.data.total){
this.status = "loadmore"
}else{
this.status = 'nomore'
}
}else if(res.data.code == 401){
this.loginStatus = false
}
})
},
tabSelect(i) {
console.log(i, 99999)
this.statusIndex = i;
this.queryParams.pageNum = 1;
this.list = []
this.onLoading()
},
onNav(){
uni.navigateTo({
url:"/setting/recharge/record"
})
},
onNavToOrderInfo(val){
// uni.navigateTo({
// url:"/pages/orderResult/orderResult?orderNo="+val.orderNo
// })
}
}
}
</script>
<style>
page{
background-color: #f1f1f1;
}
</style>
<style lang="scss" scoped>
.order-record {
display: flex;
flex-direction: column;
.record-box{
padding: 24upx 24upx 0;
.text-btn{
display: flex;
flex-direction: row;
align-items: center;
color: #55aaff;
font-size: 30upx;
}
}
.content-box {
display: flex;
flex-direction: column;
.list-content{
display: flex;
flex-direction: column;
align-items: center;
.list-item{
width: 94%;
padding: 20upx 20upx;
border-radius: 20upx;
background-color: #ffffff;
margin-top: 30upx;
.part-1{
display: flex;
align-items: center;
padding: 10upx;
.flex-row{
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
}
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<view class="order-record">
<view v-if="loginStatus" class="content-box">
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="list-item" >
<view class="flex-between part-1">
<view class="">
<text class="text-title">{{item.operationType? '增加' : "消费"}}</text>
</view>
<view class="flex-row">
<text class="text-bold text-xl" :class="item.sign=='income'?'text-red':'text-black'">{{item.operationType?'+':'-'}}</text>
<text class="text-black text-bold text-lg" >{{item.variableIntegral}}积分</text>
</view>
</view>
<view class="flex-between part-1">
<text>{{item.operationTime}}</text>
<text>剩余{{item.operationType? item.currentIntegral + item.variableIntegral : item.currentIntegral - item.variableIntegral}}积分</text>
</view>
</view>
</view>
</view>
<view v-if="loginStatus && list.length == 0" class="empty-box">
<u-empty text="暂无数据" textColor='#C1C1C1' width="120"
:icon="listBlankImage">
</u-empty>
</view>
<view v-if="loginStatus && list.length" style="padding: 12px 6% 0;">
<u-loadmore :status="status" :icon="true" :line='true' :loading-text="loadingText"
:loadmore-text="loadmoreText" :nomore-text="nomoreText" />
</view>
<NoLogin v-model="loginStatus" />
</view>
</template>
<script>
import config from "@/config/index.config"
import {
integralList
} from "@/api/recharge.js"
import NoLogin from "@/components/noLogin/noLogin"
import {
getDictItem
} from "@/utils/tools.js"
export default {
components:{
NoLogin
},
data() {
return {
status: 'nomore ',
loadingText: '努力加载中',
loadmoreText: '上划加载',
nomoreText: '到底啦',
statusIndex: 0,
list: [],
statusList: [{
label: "全部",
value: "",
},
{
label: "已预约",
value: "0",
},
{
label: "使用中",
value: "1",
},
{
label: "已完成",
value: "2",
},
{
label: "退单",
value: "3",
}
],
queryParams: {
pageNum: 1,
pageSize: 10
},
loginStatus:true,
orderStatusEnum:{},
payTypeEnum:{
1:"微信支付",
2:"支付宝支付",
3:"余额支付"
},
payStatus:{
'0':'-',
'1':'+'
},
listBlankImage:config.assetsPath+'/no_data_icon.png',
};
},
onLoad() {
},
onReachBottom() {
if (this.status == 'loadmore') {
this.queryParams.pageNum += 1;
this.onLoading();
}
},
onShow() {
this.onGetDicts()
},
methods: {
onGetDicts() {
let dicts = []
if (uni.getStorageSync('dicts')) {
dicts = JSON.parse(uni.getStorageSync('dicts'))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
} else {
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
})
}
},
onLoading() {
uni.showLoading({
title: '加载中'
})
this.status = 'loading'
this.queryParams.status = this.statusList[this.statusIndex].value;
integralList(this.queryParams).then(res => {
console.log(res)
uni.hideLoading()
if (res.data.code == 200) {
this.list = res.data.data
this.status = 'nomore'
}else if(res.data.code == 401){
this.loginStatus = false
}
})
},
tabSelect(i) {
console.log(i, 99999)
this.statusIndex = i;
this.queryParams.pageNum = 1;
this.list = []
this.onLoading()
},
onNavToOrderInfo(val){
uni.navigateTo({
url:"/pages/orderResult/orderResult?orderNo="+val.orderNo
})
}
}
}
</script>
<style>
page{
background-color: #f1f1f1;
}
</style>
<style lang="scss" scoped>
.order-record {
display: flex;
flex-direction: column;
.content-box {
display: flex;
flex-direction: column;
.list-content{
display: flex;
flex-direction: column;
align-items: center;
.list-item{
width: 94%;
padding: 20upx 20upx;
border-radius: 20upx;
background-color: #ffffff;
margin-top: 30upx;
.part-1{
display: flex;
align-items: center;
padding: 10upx;
.flex-row{
display: flex;
flex-direction: row;
align-items: center;
}
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<view class="order-record">
<view v-if="loginStatus" class="content-box">
<view class="list-content">
<view v-for="(item,index) in list" :key="index" class="list-item">
<view class="flex-between part-1">
<view class="">
<text class="text-title">{{item.operationType? '增加' : "消费"}}</text>
</view>
<view class="flex-row">
<text class="text-bold text-xl" :class="item.sign=='income'?'text-red':'text-black'">{{item.operationType?'+':'-'}}</text>
<text class="text-black text-bold text-lg" >{{item.variableAmount}}</text>
</view>
</view>
<view class="flex-between part-1">
<text>{{item.operationTime}}</text>
<text>{{item.payType}}</text>
</view>
</view>
</view>
</view>
<view v-if="loginStatus && list.length == 0" class="empty-box">
<u-empty text="暂无数据" textColor='#C1C1C1' width="120"
:icon="listBlankImage">
</u-empty>
</view>
<view v-if="loginStatus && list.length" style="padding: 12px 6% 0;">
<u-loadmore :status="status" :icon="true" :line='true' :loading-text="loadingText"
:loadmore-text="loadmoreText" :nomore-text="nomoreText" />
</view>
<NoLogin v-model="loginStatus" />
</view>
</template>
<script>
import config from "@/config/index.config"
import {
balanceLog
} from "@/api/recharge.js"
import NoLogin from "@/components/noLogin/noLogin"
import {
getDictItem
} from "@/utils/tools.js"
export default {
components:{
NoLogin
},
data() {
return {
status: 'nomore ',
loadingText: '努力加载中',
loadmoreText: '上划加载',
nomoreText: '到底啦',
statusIndex: 0,
list: [],
statusList: [{
label: "全部",
value: "",
},
{
label: "已预约",
value: "0",
},
{
label: "使用中",
value: "1",
},
{
label: "已完成",
value: "2",
},
{
label: "退单",
value: "3",
}
],
queryParams: {
pageNum: 1,
pageSize: 10
},
loginStatus:true,
orderStatusEnum:{},
payTypeEnum:{
1:"微信支付",
2:"支付宝支付",
3:"余额支付"
},
payStatus:{
'0':'-',
'1':'+'
},
listBlankImage:config.assetsPath+'/no_data_icon.png',
};
},
onLoad() {
},
onReachBottom() {
if (this.status == 'loadmore') {
this.queryParams.pageNum += 1;
this.onLoading();
}
},
onShow() {
this.onGetDicts()
},
methods: {
onGetDicts() {
let dicts = []
if (uni.getStorageSync('dicts')) {
dicts = JSON.parse(uni.getStorageSync('dicts'))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
} else {
dictList().then(res => {
dicts = res.data.data;
uni.setStorageSync('dicts', JSON.stringify(res.data.data))
this.orderStatusEnum = getDictItem(dicts, "store_order_status");
this.onLoading()
})
}
},
onLoading() {
uni.showLoading({
title: '加载中'
})
this.status = 'loading'
this.queryParams.status = this.statusList[this.statusIndex].value;
balanceLog(this.queryParams).then(res => {
console.log(res)
uni.hideLoading()
if (res.data.code == 200) {
this.list = res.data.data
this.status = 'nomore'
}else if(res.data.code == 401){
this.loginStatus = false
}
})
},
tabSelect(i) {
console.log(i, 99999)
this.statusIndex = i;
this.queryParams.pageNum = 1;
this.list = []
this.onLoading()
},
onNavToOrderInfo(val){
uni.navigateTo({
url:"/pages/orderResult/orderResult?orderNo="+val.orderNo
})
}
}
}
</script>
<style>
page{
background-color: #f1f1f1;
}
</style>
<style lang="scss" scoped>
.order-record {
display: flex;
flex-direction: column;
.content-box {
display: flex;
flex-direction: column;
.list-content{
display: flex;
flex-direction: column;
align-items: center;
.list-item{
width: 94%;
padding: 20upx 20upx;
border-radius: 20upx;
background-color: #ffffff;
margin-top: 30upx;
.part-1{
display: flex;
align-items: center;
padding: 10upx;
.flex-row{
display: flex;
flex-direction: row;
align-items: center;
}
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<view class="article">
<view class="bg-box-1">
<view class="bg-box-2">
<view class="flex-row-center title-content">
<view class="xx">
<image :src="assetsPath+'/xx.png'" mode="widthFix"></image>
</view>
<view class="title-text">
<view class="text">
<text>{{article.protocolTitle || '规则'}}</text>
</view>
<view class="line">
</view>
</view>
<view class="xx">
<image :src="assetsPath+'/xx.png'" mode="widthFix"></image>
</view>
</view>
<scroll-view class="scroll-view" scroll-y="true">
<view class="scroll-view-content">
<view class="" v-html="article.content">
</view>
</view>
</scroll-view>
</view>
</view>
</view>
</template>
<script>
import config from "@/config/index.config";
import {
getProtocol
} from "@/api/index.js";
export default {
data() {
return {
assetsPath: config.assetsPath,
article: {
protocolTitle: '',
content: '',
},
keyData: ""
};
},
onLoad(option) {
if (option && option.keyData) {
this.keyData = option.keyData
}
this.onLoading()
},
methods: {
onLoading() {
getProtocol(this.keyData).then(res => {
console.log(res)
if (res.data.code) {
uni.setNavigationBarTitle({
title: res.data.data.protocolTitle
})
this.article = res.data.data
}
})
}
}
}
</script>
<style>
page {
width: 100%;
height: 100%;
background-color: rgb(255, 234, 191);
}
</style>
<style lang="scss">
.article {
display: flex;
flex-direction: column;
align-items: center;
width: 100vw;
height: 100%;
}
.bg-box-1 {
display: flex;
flex: 1;
flex-direction: column;
justify-content: center;
align-items: center;
width: 690upx;
background: #FFCA7E;
border-radius: 32upx;
padding: 6px 0;
margin: 30upx 0 40upx;
.bg-box-2 {
display: flex;
height: 98%;
width: 650upx;
flex-direction: column;
align-items: center;
background: linear-gradient(-42deg, #FFF5CB, #FFFFFF);
border-radius: 32upx;
.title-content {
margin: 24upx 0;
.title-text {
display: flex;
justify-content: center;
position: relative;
margin: 0 20upx;
.text {
position: relative;
font-weight: normal;
font-size: 48rpx;
color: #000000;
background: linear-gradient(-90deg, #FF7800 0%, #FF0000 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
z-index: 2;
}
.line {
position: absolute;
bottom: 0;
width: 110%;
height: 15upx;
background: #FFEABF;
border-radius: 8upx;
}
}
.xx {
width: 30upx;
image {
width: 100%;
max-height: 34upx;
}
}
}
.scroll-view {
display: flex;
flex: 1;
position: relative;
width: 100%;
overflow: hidden;
.scroll-view-content {
position: absolute;
left: 0;
width: 100%;
padding: 24upx;
}
}
}
}
</style>
\ No newline at end of file
## 1.9.1(2024-04-02)
- 修复 uni-popup-dialog vue3下使用value无法进行绑定的bug(双向绑定兼容旧写法)
## 1.9.0(2024-03-28)
- 修复 uni-popup-dialog 双向绑定时初始化逻辑修正
## 1.8.9(2024-03-20)
- 修复 uni-popup-dialog 数据输入时修正为双向绑定
## 1.8.8(2024-02-20)
- 修复 uni-popup 在微信小程序下出现文字向上闪动的bug
## 1.8.7(2024-02-02)
- 新增 uni-popup-dialog 新增属性focus:input模式下,是否自动自动聚焦
## 1.8.6(2024-01-30)
- 新增 uni-popup-dialog 新增属性maxLength:限制输入框字数
## 1.8.5(2024-01-26)
- 新增 uni-popup-dialog 新增属性showClose:控制关闭按钮的显示
## 1.8.4(2023-11-15)
- 新增 uni-popup 支持uni-app-x 注意暂时仅支持 `maskClick` `@open` `@close`
## 1.8.3(2023-04-17)
- 修复 uni-popup 重复打开时的 bug
## 1.8.2(2023-02-02)
- uni-popup-dialog 组件新增 inputType 属性
## 1.8.1(2022-12-01)
- 修复 nvue 下 v-show 报错
## 1.8.0(2022-11-29)
- 优化 主题样式
## 1.7.9(2022-04-02)
- 修复 弹出层内部无法滚动的bug
## 1.7.8(2022-03-28)
- 修复 小程序中高度错误的bug
## 1.7.7(2022-03-17)
- 修复 快速调用open出现问题的Bug
## 1.7.6(2022-02-14)
- 修复 safeArea 属性不能设置为false的bug
## 1.7.5(2022-01-19)
- 修复 isMaskClick 失效的bug
## 1.7.4(2022-01-19)
- 新增 cancelText \ confirmText 属性 ,可自定义文本
- 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色
- 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题
## 1.7.3(2022-01-13)
- 修复 设置 safeArea 属性不生效的bug
## 1.7.2(2021-11-26)
- 优化 组件示例
## 1.7.1(2021-11-26)
......
......@@ -10,14 +10,15 @@
</view>
<view v-else class="uni-dialog-content">
<slot>
<input class="uni-dialog-input" v-model="val" type="text" :placeholder="placeholderText" :focus="focus" >
<input class="uni-dialog-input" :maxlength="maxlength" v-model="val" :type="inputType"
:placeholder="placeholderText" :focus="focus">
</slot>
</view>
<view class="uni-dialog-button-group">
<view class="uni-dialog-button" @click="closeDialog">
<text class="uni-dialog-button-text">{{cancelText}}</text>
<view class="uni-dialog-button" v-if="showClose" @click="closeDialog">
<text class="uni-dialog-button-text">{{closeText}}</text>
</view>
<view class="uni-dialog-button uni-border-left" @click="onOk">
<view class="uni-dialog-button" :class="showClose?'uni-border-left':''" @click="onOk">
<text class="uni-dialog-button-text uni-button-color">{{okText}}</text>
</view>
</view>
......@@ -31,13 +32,16 @@
initVueI18n
} from '@dcloudio/uni-i18n'
import messages from '../uni-popup/i18n/index.js'
const { t } = initVueI18n(messages)
const {
t
} = initVueI18n(messages)
/**
* PopUp 弹出层-对话框样式
* @description 弹出层-对话框样式
* @tutorial https://ext.dcloud.net.cn/plugin?id=329
* @property {String} value input 模式下的默认值
* @property {String} placeholder input 模式下输入提示
* @property {Boolean} focus input模式下是否自动聚焦,默认为true
* @property {String} type = [success|warning|info|error] 主题样式
* @value success 成功
* @value warning 提示
......@@ -46,8 +50,10 @@
* @property {String} mode = [base|input] 模式、
* @value base 基础对话框
* @value input 可输入对话框
* @showClose {Boolean} 是否显示关闭按钮
* @property {String} content 对话框内容
* @property {Boolean} beforeClose 是否拦截取消事件
* @property {Number} maxlength 输入
* @event {Function} confirm 点击确认按钮触发
* @event {Function} close 点击取消按钮触发
*/
......@@ -55,12 +61,30 @@
export default {
name: "uniPopupDialog",
mixins: [popup],
emits:['confirm','close'],
emits: ['confirm', 'close', 'update:modelValue', 'input'],
props: {
inputType: {
type: String,
default: 'text'
},
showClose: {
type: Boolean,
default: true
},
// #ifdef VUE2
value: {
type: [String, Number],
default: ''
},
// #endif
// #ifdef VUE3
modelValue: {
type: [Number, String],
default: ''
},
// #endif
placeholder: {
type: [String, Number],
default: ''
......@@ -84,21 +108,36 @@
beforeClose: {
type: Boolean,
default: false
},
cancelText: {
type: String,
default: ''
},
confirmText: {
type: String,
default: ''
},
maxlength: {
type: Number,
default: -1,
},
focus: {
type: Boolean,
default: true,
}
},
data() {
return {
dialogType: 'error',
focus: false,
val: ""
}
},
computed: {
okText() {
return t("uni-popup.ok")
return this.confirmText || t("uni-popup.ok")
},
cancelText() {
return t("uni-popup.cancel")
closeText() {
return this.cancelText || t("uni-popup.cancel")
},
placeholderText() {
return this.placeholder || t("uni-popup.placeholder")
......@@ -117,34 +156,48 @@
}
},
value(val) {
if (this.maxlength != -1 && this.mode === 'input') {
this.val = val.slice(0, this.maxlength);
} else {
this.val = val
}
},
val(val) {
// #ifdef VUE2
// TODO 兼容 vue2
this.$emit('input', val);
// #endif
// #ifdef VUE3
// TODO 兼容 vue3
this.$emit('update:modelValue', val);
// #endif
}
},
created() {
// 对话框遮罩不可点击
this.popup.disableMask()
// this.popup.closeMask()
if (this.mode === 'input') {
this.dialogType = 'info'
this.val = this.value
this.val = this.value;
// #ifdef VUE3
this.val = this.modelValue;
// #endif
} else {
this.dialogType = this.type
}
},
mounted() {
this.focus = true
},
methods: {
/**
* 点击确认按钮
*/
onOk() {
if (this.mode === 'input'){
if (this.mode === 'input') {
this.$emit('confirm', this.val)
}else{
} else {
this.$emit('confirm')
}
if(this.beforeClose) return
if (this.beforeClose) return
this.popup.close()
},
/**
......@@ -152,17 +205,17 @@
*/
closeDialog() {
this.$emit('close')
if(this.beforeClose) return
if (this.beforeClose) return
this.popup.close()
},
close(){
close() {
this.popup.close()
}
}
}
</script>
<style lang="scss" scoped>
<style lang="scss">
.uni-popup-dialog {
width: 300px;
border-radius: 11px;
......
......@@ -71,7 +71,7 @@
}
}
</script>
<style lang="scss" scoped>
<style lang="scss" >
.uni-popup-message {
/* #ifndef APP-NVUE */
display: flex;
......
......@@ -47,7 +47,7 @@
{
text: '支付宝',
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/d684ae40-50be-11eb-8ff1-d5dcf8779628.png',
name: 'wx'
name: 'ali'
},
{
text: 'QQ',
......@@ -103,7 +103,7 @@
}
}
</script>
<style lang="scss" scoped>
<style lang="scss" >
.uni-popup-share {
background-color: #fff;
border-top-left-radius: 11px;
......
<template>
<view class="popup-root" v-if="isOpen" v-show="isShow" @click="clickMask">
<view @click.stop>
<slot></slot>
</view>
</view>
</template>
<script>
type CloseCallBack = ()=> void;
let closeCallBack:CloseCallBack = () :void => {};
export default {
emits:["close","clickMask"],
data() {
return {
isShow:false,
isOpen:false
}
},
props: {
maskClick: {
type: Boolean,
default: true
},
},
watch: {
// 设置show = true 时,如果没有 open 需要设置为 open
isShow:{
handler(isShow) {
// console.log("isShow",isShow)
if(isShow && this.isOpen == false){
this.isOpen = true
}
},
immediate:true
},
// 设置isOpen = true 时,如果没有 isShow 需要设置为 isShow
isOpen:{
handler(isOpen) {
// console.log("isOpen",isOpen)
if(isOpen && this.isShow == false){
this.isShow = true
}
},
immediate:true
}
},
methods:{
open(){
// ...funs : CloseCallBack[]
// if(funs.length > 0){
// closeCallBack = funs[0]
// }
this.isOpen = true;
},
clickMask(){
if(this.maskClick == true){
this.$emit('clickMask')
this.close()
}
},
close(): void{
this.isOpen = false;
this.$emit('close')
closeCallBack()
},
hiden(){
this.isShow = false
},
show(){
this.isShow = true
}
}
}
</script>
<style>
.popup-root {
position: fixed;
top: 0;
left: 0;
width: 750rpx;
height: 100%;
flex: 1;
background-color: rgba(0, 0, 0, 0.3);
justify-content: center;
align-items: center;
z-index: 99;
}
</style>
\ No newline at end of file
{
"id": "uni-popup",
"displayName": "uni-popup 弹出层",
"version": "1.7.2",
"version": "1.9.1",
"description": " Popup 组件,提供常用的弹层",
"keywords": [
"uni-ui",
......@@ -18,10 +18,6 @@
"example": "../../temps/example_temps"
},
"dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"sale": {
"regular": {
"price": "0.00"
......@@ -38,7 +34,8 @@
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
},
"uni_modules": {
"dependencies": [
......@@ -49,7 +46,8 @@
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
"aliyun": "y",
"alipay": "n"
},
"client": {
"App": {
......
## 1.0.3(2022-01-21)
- 优化 组件示例
## 1.0.2(2021-11-22)
- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题
## 1.0.1(2021-11-22)
......
{
"id": "uni-scss",
"displayName": "uni-scss 辅助样式",
"version": "1.0.2",
"version": "1.0.3",
"description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。",
"keywords": [
"uni-scss",
......@@ -14,8 +14,8 @@
},
"dcloudext": {
"category": [
"uni-app前端模板",
"前端页面模板"
"JS SDK",
"通用 SDK"
],
"sale": {
"regular": {
......
## 1.3.3(2024-04-23)
- 修复 当元素会受变量影响自动隐藏的bug
## 1.3.2(2023-05-04)
- 修复 NVUE 平台报错的问题
## 1.3.1(2021-11-23)
- 修复 init 方法初始化问题
## 1.3.0(2021-11-19)
......
......@@ -10,7 +10,10 @@ const nvueAnimation = uni.requireNativePlugin('animation')
class MPAnimation {
constructor(options, _this) {
this.options = options
this.animation = uni.createAnimation(options)
// 在iOS10+QQ小程序平台下,传给原生的对象一定是个普通对象而不是Proxy对象,否则会报parameter should be Object instead of ProxyObject的错误
this.animation = uni.createAnimation({
...options
})
this.currentStepAnimates = {}
this.next = 0
this.$ = _this
......
<template>
<!-- #ifndef APP-NVUE -->
<view v-show="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
<!-- #endif -->
<!-- #ifdef APP-NVUE -->
<view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
<!-- #endif -->
</template>
<script>
......@@ -48,7 +53,11 @@ export default {
customClass:{
type: String,
default: ''
}
},
onceRender:{
type:Boolean,
default:false
},
},
data() {
return {
......@@ -245,7 +254,7 @@ export default {
},
animationType(type) {
return {
fade: type ? 1 : 0,
fade: type ? 0 : 1,
'slide-top': `translateY(${type ? '0' : '-100%'})`,
'slide-right': `translateX(${type ? '0' : '100%'})`,
'slide-bottom': `translateY(${type ? '0' : '100%'})`,
......
{
"id": "uni-transition",
"displayName": "uni-transition 过渡动画",
"version": "1.3.1",
"version": "1.3.3",
"description": "元素的简单过渡动画",
"keywords": [
"uni-ui",
......@@ -17,11 +17,7 @@
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
......@@ -38,7 +34,8 @@
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
},
"uni_modules": {
"dependencies": ["uni-scss"],
......@@ -46,7 +43,8 @@
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
"aliyun": "y",
"alipay": "n"
},
"client": {
"App": {
......
......@@ -159,3 +159,14 @@ export function getDictItem(dicts, dictType) {
}
return obj
}
// 通过系统配置参数key字段获取value值;
export function getSysConfigValue(key) {
let value = ""
let sysConfigList = uni.getStorageSync('sysConfig');
let obj = sysConfigList.find(item => item.configKey === key);
if(obj){
value = obj.configValue;
}
return value
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment