Commit ea5dcfa1 authored by 刘文虎's avatar 刘文虎

查欠款

parent 20a08b68
......@@ -6,9 +6,9 @@
hover-class="u-hover-class"
@click="handleClick"
>
<u-icon :name="leftIcon" v-if="leftIcon" :size="fontSize" class="ab-button-left"></u-icon>
<u-icon :name="leftIcon" v-if="leftIcon" class="ab-button-left"></u-icon>
<text class="disabled-text">{{ content }}</text>
<u-icon :name="rightIcon" v-if="rightIcon" :size="fontSize" class="ab-button-right"></u-icon>
<u-icon :name="rightIcon" v-if="rightIcon" class="ab-button-right"></u-icon>
</view>
</template>
......
<template>
<u-mask :show="visible" @click="handleClick" :zoom="false">
<view class="tip-view" :style="'margin-top:' + statusBarHeight + 'px'">
<image
class="tip-image"
:src="currentImage.url"
:style="currentImage.style"
mode="widthFix"
></image>
<image
class="button-image"
:style="currentImage.buttonStyle"
:src="buttonImage"
mode="widthFix"
></image>
<image
v-if="imageList.length > 1"
class="bottom-image"
:src="bottomImage"
mode="widthFix"
@click.stop="handleClose"
></image>
</view>
</u-mask>
</template>
<script>
/**
* @description 创建一个遮罩层,提示图片
* @property {Boolean} show 是否显示遮罩(默认false)
* @example <mask-tip :show="show"></mask-tip>
*/
export default {
props: {
show: {
type: Boolean,
default: false,
},
imageList: {
type: Array,
default() {
return []
},
},
current: {
type: Number,
default: 0,
},
timeout: {
type: Boolean,
default: true,
},
},
data() {
return {
statusBarHeight: 20,
visible: false,
currentIndex: 0,
}
},
watch: {
show(val) {
if (!val) {
this.visible = false
this.$emit('click')
return
}
this.currentIndex = this.current
uni.getSystemInfo({
success: (res) => {
this.statusBarHeight = res.statusBarHeight
setTimeout(() => {
this.visible = true
}, this.time)
},
})
},
},
computed: {
baseUrl() {
return process.uniEnv.qn_base_url
},
time() {
return this.timeout ? 1500 : 0
},
currentImage() {
return {
url: this.baseUrl + this.imageList[this.currentIndex].name,
style: this.imageList[this.currentIndex].style,
buttonStyle: this.imageList[this.currentIndex].buttonStyle,
buttonImage: this.imageList[this.currentIndex].buttonImage || null,
}
},
buttonImage() {
return this.currentImage.buttonImage || this.baseUrl + 'xiayibu@3x.png'
},
bottomImage() {
return this.baseUrl + 'tiaoguo@3x.png'
},
},
methods: {
handleClick() {
if (this.currentIndex + 1 == this.imageList.length) {
this.handleClose()
} else {
this.currentIndex++
}
},
handleClose() {
this.visible = false
this.$emit('click')
},
},
}
</script>
<style lang="scss" scoped>
.tip-view {
position: relative;
width: 100%;
height: 100%;
.tip-image {
position: absolute;
}
.button-image {
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
width: 262rpx;
height: 118rpx;
position: absolute;
}
.bottom-image {
position: fixed;
width: 128rpx;
height: 56rpx;
bottom: 40rpx;
right: 32rpx;
}
}
</style>
const BindingX = uni.requireNativePlugin('bindingx');
const dom = uni.requireNativePlugin('dom');
const animation = uni.requireNativePlugin('animation');
export default {
data() {
return {}
},
watch: {
show(newVal) {
if (this.autoClose) return
if (this.stop) return
this.stop = true
if (newVal) {
this.open(newVal)
} else {
this.close()
}
},
leftOptions() {
this.getSelectorQuery()
this.init()
},
rightOptions(newVal) {
this.init()
}
},
created() {
if (this.swipeaction.children !== undefined) {
this.swipeaction.children.push(this)
}
},
mounted() {
this.box = this.getEl(this.$refs['selector-box--hock'])
this.selector = this.getEl(this.$refs['selector-content--hock']);
this.leftButton = this.getEl(this.$refs['selector-left-button--hock']);
this.rightButton = this.getEl(this.$refs['selector-right-button--hock']);
this.init()
},
beforeDestroy() {
this.swipeaction.children.forEach((item, index) => {
if (item === this) {
this.swipeaction.children.splice(index, 1)
}
})
},
methods: {
init() {
this.$nextTick(() => {
this.x = 0
this.button = {
show: false
}
setTimeout(() => {
this.getSelectorQuery()
}, 200)
})
},
onClick(index, item, position) {
this.$emit('click', {
content: item,
index,
position
})
},
touchstart(e) {
// 每次只触发一次,避免多次监听造成闪烁
if (this.stop) return
this.stop = true
if (this.autoClose) {
this.swipeaction.closeOther(this)
}
const leftWidth = this.button.left.width
const rightWidth = this.button.right.width
let expression = this.range(this.x, -rightWidth, leftWidth)
let leftExpression = this.range(this.x - leftWidth, -leftWidth, 0)
let rightExpression = this.range(this.x + rightWidth, 0, rightWidth)
this.eventpan = BindingX.bind({
anchor: this.box,
eventType: 'pan',
props: [{
element: this.selector,
property: 'transform.translateX',
expression
}, {
element: this.leftButton,
property: 'transform.translateX',
expression: leftExpression
}, {
element: this.rightButton,
property: 'transform.translateX',
expression: rightExpression
}, ]
}, (e) => {
// nope
if (e.state === 'end') {
this.x = e.deltaX + this.x;
this.isclick = true
this.bindTiming(e.deltaX)
}
});
},
touchend(e) {
if (this.isopen !== 'none' && !this.isclick) {
this.open('none')
}
},
bindTiming(x) {
const left = this.x
const leftWidth = this.button.left.width
const rightWidth = this.button.right.width
const threshold = this.threshold
if (!this.isopen || this.isopen === 'none') {
if (left > threshold) {
this.open('left')
} else if (left < -threshold) {
this.open('right')
} else {
this.open('none')
}
} else {
if ((x > -leftWidth && x < 0) || x > rightWidth) {
if ((x > -threshold && x < 0) || (x - rightWidth > threshold)) {
this.open('left')
} else {
this.open('none')
}
} else {
if ((x < threshold && x > 0) || (x + leftWidth < -threshold)) {
this.open('right')
} else {
this.open('none')
}
}
}
},
/**
* 移动范围
* @param {Object} num
* @param {Object} mix
* @param {Object} max
*/
range(num, mix, max) {
return `min(max(x+${num}, ${mix}), ${max})`
},
/**
* 开启swipe
*/
open(type) {
this.animation(type)
},
/**
* 关闭swipe
*/
close() {
this.animation('none')
},
/**
* 开启关闭动画
* @param {Object} type
*/
animation(type) {
const time = 300
const leftWidth = this.button.left.width
const rightWidth = this.button.right.width
if (this.eventpan && this.eventpan.token) {
BindingX.unbind({
token: this.eventpan.token,
eventType: 'pan'
})
}
switch (type) {
case 'left':
Promise.all([
this.move(this.selector, leftWidth),
this.move(this.leftButton, 0),
this.move(this.rightButton, rightWidth * 2)
]).then(() => {
this.setEmit(leftWidth, type)
})
break
case 'right':
Promise.all([
this.move(this.selector, -rightWidth),
this.move(this.leftButton, -leftWidth * 2),
this.move(this.rightButton, 0)
]).then(() => {
this.setEmit(-rightWidth, type)
})
break
default:
Promise.all([
this.move(this.selector, 0),
this.move(this.leftButton, -leftWidth),
this.move(this.rightButton, rightWidth)
]).then(() => {
this.setEmit(0, type)
})
}
},
setEmit(x, type) {
const leftWidth = this.button.left.width
const rightWidth = this.button.right.width
this.isopen = this.isopen || 'none'
this.stop = false
this.isclick = false
// 只有状态不一致才会返回结果
if (this.isopen !== type && this.x !== x) {
if (type === 'left' && leftWidth > 0) {
this.$emit('change', 'left')
}
if (type === 'right' && rightWidth > 0) {
this.$emit('change', 'right')
}
if (type === 'none') {
this.$emit('change', 'none')
}
}
this.x = x
this.isopen = type
},
move(ref, value) {
return new Promise((resolve, reject) => {
animation.transition(ref, {
styles: {
transform: `translateX(${value})`,
},
duration: 150, //ms
timingFunction: 'linear',
needLayout: false,
delay: 0 //ms
}, function(res) {
resolve(res)
})
})
},
/**
* 获取ref
* @param {Object} el
*/
getEl(el) {
return el.ref
},
/**
* 获取节点信息
*/
getSelectorQuery() {
Promise.all([
this.getDom('left'),
this.getDom('right'),
]).then((data) => {
let show = 'none'
if (this.autoClose) {
show = 'none'
} else {
show = this.show
}
if (show === 'none') {
// this.close()
} else {
this.open(show)
}
})
},
getDom(str) {
return new Promise((resolve, reject) => {
dom.getComponentRect(this.$refs[`selector-${str}-button--hock`], (data) => {
if (data) {
this.button[str] = data.size
resolve(data)
} else {
reject()
}
})
})
}
}
}
var MIN_DISTANCE = 10;
/**
* 监听页面内值的变化,主要用于动态开关swipe-action
* @param {Object} newValue
* @param {Object} oldValue
* @param {Object} ownerInstance
* @param {Object} instance
*/
function sizeReady(newValue, oldValue, ownerInstance, instance) {
var state = instance.getState()
var buttonPositions = JSON.parse(newValue)
if (!buttonPositions || !buttonPositions.data || buttonPositions.data.length === 0) return
state.leftWidth = buttonPositions.data[0].width
state.rightWidth = buttonPositions.data[1].width
state.threshold = instance.getDataset().threshold
if (buttonPositions.show && buttonPositions.show !== 'none') {
openState(buttonPositions.show, instance, ownerInstance)
return
}
if (state.left) {
openState('none', instance, ownerInstance)
}
resetTouchStatus(instance)
}
/**
* 开始触摸操作
* @param {Object} e
* @param {Object} ins
*/
function touchstart(e, ins) {
var instance = e.instance;
var disabled = instance.getDataset().disabled
var state = instance.getState();
// fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复
disabled = (typeof(disabled) === 'string' ? JSON.parse(disabled) : disabled) || false;
if (disabled) return
// 开始触摸时移除动画类
instance.requestAnimationFrame(function(){
instance.removeClass('ani');
ins.callMethod('closeSwipe');
})
// 记录上次的位置
state.x = state.left || 0
// 计算滑动开始位置
stopTouchStart(e, ins)
}
/**
* 开始滑动操作
* @param {Object} e
* @param {Object} ownerInstance
*/
function touchmove(e, ownerInstance) {
var instance = e.instance;
var disabled = instance.getDataset().disabled
var state = instance.getState()
// fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复
disabled = (typeof(disabled) === 'string' ? JSON.parse(disabled) : disabled) || false;
if (disabled) return
// 是否可以滑动页面
stopTouchMove(e);
if (state.direction !== 'horizontal') {
return;
}
if (e.preventDefault) {
// 阻止页面滚动
e.preventDefault()
}
move(state.x + state.deltaX, instance, ownerInstance)
}
/**
* 结束触摸操作
* @param {Object} e
* @param {Object} ownerInstance
*/
function touchend(e, ownerInstance) {
var instance = e.instance;
var disabled = instance.getDataset().disabled
var state = instance.getState()
// fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复
disabled = (typeof(disabled) === 'string' ? JSON.parse(disabled) : disabled) || false;
if (disabled) return
// 滑动过程中触摸结束,通过阙值判断是开启还是关闭
// fixed by mehaotian 定时器解决点击按钮,touchend 触发比 click 事件时机早的问题 ,主要是 ios13
moveDirection(state.left, instance, ownerInstance)
}
/**
* 设置移动距离
* @param {Object} value
* @param {Object} instance
* @param {Object} ownerInstance
*/
function move(value, instance, ownerInstance) {
value = value || 0
var state = instance.getState()
var leftWidth = state.leftWidth
var rightWidth = state.rightWidth
// 获取可滑动范围
state.left = range(value, -rightWidth, leftWidth);
instance.requestAnimationFrame(function(){
instance.setStyle({
transform: 'translateX(' + state.left + 'px)',
'-webkit-transform': 'translateX(' + state.left + 'px)'
})
})
}
/**
* 获取范围
* @param {Object} num
* @param {Object} min
* @param {Object} max
*/
function range(num, min, max) {
return Math.min(Math.max(num, min), max);
}
/**
* 移动方向判断
* @param {Object} left
* @param {Object} value
* @param {Object} ownerInstance
* @param {Object} ins
*/
function moveDirection(left, ins, ownerInstance) {
var state = ins.getState()
var threshold = state.threshold
var position = state.position
var isopen = state.isopen || 'none'
var leftWidth = state.leftWidth
var rightWidth = state.rightWidth
if (state.deltaX === 0) {
openState('none', ins, ownerInstance)
return
}
if ((isopen === 'none' && rightWidth > 0 && -left > threshold) || (isopen !== 'none' && rightWidth > 0 && rightWidth +
left < threshold)) {
// right
openState('right', ins, ownerInstance)
} else if ((isopen === 'none' && leftWidth > 0 && left > threshold) || (isopen !== 'none' && leftWidth > 0 &&
leftWidth - left < threshold)) {
// left
openState('left', ins, ownerInstance)
} else {
// default
openState('none', ins, ownerInstance)
}
}
/**
* 开启状态
* @param {Boolean} type
* @param {Object} ins
* @param {Object} ownerInstance
*/
function openState(type, ins, ownerInstance) {
var state = ins.getState()
var position = state.position
var leftWidth = state.leftWidth
var rightWidth = state.rightWidth
var left = ''
state.isopen = state.isopen ? state.isopen : 'none'
switch (type) {
case "left":
left = leftWidth
break
case "right":
left = -rightWidth
break
default:
left = 0
}
// && !state.throttle
if (state.isopen !== type ) {
state.throttle = true
ownerInstance.callMethod('change', {
open: type
})
}
state.isopen = type
// 添加动画类
ins.requestAnimationFrame(function(){
ins.addClass('ani');
move(left, ins, ownerInstance)
})
// 设置最终移动位置,理论上只要进入到这个函数,肯定是要打开的
}
function getDirection(x, y) {
if (x > y && x > MIN_DISTANCE) {
return 'horizontal';
}
if (y > x && y > MIN_DISTANCE) {
return 'vertical';
}
return '';
}
/**
* 重置滑动状态
* @param {Object} event
*/
function resetTouchStatus(instance) {
var state = instance.getState();
state.direction = '';
state.deltaX = 0;
state.deltaY = 0;
state.offsetX = 0;
state.offsetY = 0;
}
/**
* 设置滑动开始位置
* @param {Object} event
*/
function stopTouchStart(event) {
var instance = event.instance;
var state = instance.getState();
resetTouchStatus(instance);
var touch = event.touches[0];
state.startX = touch.clientX;
state.startY = touch.clientY;
}
/**
* 滑动中,是否禁止打开
* @param {Object} event
*/
function stopTouchMove(event) {
var instance = event.instance;
var state = instance.getState();
var touch = event.touches[0];
state.deltaX = touch.clientX - state.startX;
state.deltaY = touch.clientY - state.startY;
state.offsetX = Math.abs(state.deltaX);
state.offsetY = Math.abs(state.deltaY);
state.direction = state.direction || getDirection(state.offsetX, state.offsetY);
}
module.exports = {
sizeReady: sizeReady,
touchstart: touchstart,
touchmove: touchmove,
touchend: touchend
}
export default {
data() {
return {
x: 0,
transition: false,
width: 0,
viewWidth: 0,
swipeShow: 0
}
},
watch: {
show(newVal) {
if (this.autoClose) return
if (newVal && newVal !== 'none' ) {
this.transition = true
this.open(newVal)
} else {
this.close()
}
}
},
created() {
if (this.swipeaction.children !== undefined) {
this.swipeaction.children.push(this)
}
},
beforeDestroy() {
this.swipeaction.children.forEach((item, index) => {
if (item === this) {
this.swipeaction.children.splice(index, 1)
}
})
},
mounted() {
this.isopen = false
setTimeout(() => {
this.getQuerySelect()
}, 50)
},
methods: {
appTouchStart(e) {
const {
clientX
} = e.changedTouches[0]
this.clientX = clientX
this.timestamp = new Date().getTime()
},
appTouchEnd(e, index, item, position) {
const {
clientX
} = e.changedTouches[0]
// fixed by xxxx 模拟点击事件,解决 ios 13 点击区域错位的问题
let diff = Math.abs(this.clientX - clientX)
let time = (new Date().getTime()) - this.timestamp
if (diff < 40 && time < 300) {
this.$emit('click', {
content: item,
index,
position
})
}
},
// onClick(index, item, position) {
// this.$emit('click', {
// content: item,
// index,
// position
// })
// },
/**
* 移动触发
* @param {Object} e
*/
onChange(e) {
this.moveX = e.detail.x
this.isclose = false
},
touchstart(e) {
this.transition = false
this.isclose = true
this.autoClose && this.swipeaction.closeOther(this)
},
touchmove(e) {},
touchend(e) {
// 0的位置什么都不执行
if (this.isclose && this.isopen === 'none') return
if (this.isclose && this.isopen !== 'none') {
this.transition = true
this.close()
} else {
this.move(this.moveX + this.leftWidth)
}
},
/**
* 移动
* @param {Object} moveX
*/
move(moveX) {
// 打开关闭的处理逻辑不太一样
this.transition = true
// 未打开状态
if (!this.isopen || this.isopen === 'none') {
if (moveX > this.threshold) {
this.open('left')
} else if (moveX < -this.threshold) {
this.open('right')
} else {
this.close()
}
} else {
if (moveX < 0 && moveX < this.rightWidth) {
const rightX = this.rightWidth + moveX
if (rightX < this.threshold) {
this.open('right')
} else {
this.close()
}
} else if (moveX > 0 && moveX < this.leftWidth) {
const leftX = this.leftWidth - moveX
if (leftX < this.threshold) {
this.open('left')
} else {
this.close()
}
}
}
},
/**
* 打开
*/
open(type) {
this.x = this.moveX
this.animation(type)
},
/**
* 关闭
*/
close() {
this.x = this.moveX
// TODO 解决 x 值不更新的问题,所以会多触发一次 nextTick ,待优化
this.$nextTick(() => {
this.x = -this.leftWidth
if(this.isopen!=='none'){
this.$emit('change', 'none')
}
this.isopen = 'none'
})
},
/**
* 执行结束动画
* @param {Object} type
*/
animation(type) {
this.$nextTick(() => {
if (type === 'left') {
this.x = 0
} else {
this.x = -this.rightWidth - this.leftWidth
}
if(this.isopen!==type){
this.$emit('change', type)
}
this.isopen = type
})
},
getSlide(x) {},
getQuerySelect() {
const query = uni.createSelectorQuery().in(this);
query.selectAll('.movable-view--hock').boundingClientRect(data => {
this.leftWidth = data[1].width
this.rightWidth = data[2].width
this.width = data[0].width
this.viewWidth = this.width + this.rightWidth + this.leftWidth
if (this.leftWidth === 0) {
// TODO 疑似bug ,初始化的时候如果x 是0,会导致移动位置错误,所以让元素超出一点
this.x = -0.1
} else {
this.x = -this.leftWidth
}
this.moveX = this.x
this.$nextTick(() => {
this.swipeShow = 1
})
if (!this.buttonWidth) {
this.disabledView = true
}
if (this.autoClose) return
if (this.show !== 'none') {
this.transition = true
this.open(this.shows)
}
}).exec();
}
}
}
const MIN_DISTANCE = 10;
export default {
data() {
return {
uniShow: false,
left: 0,
buttonShow: 'none',
ani: false,
moveLeft:''
}
},
watch: {
show(newVal) {
if (this.autoClose) return
this.openState(newVal)
},
left(){
this.moveLeft = `translateX(${this.left}px)`
},
buttonShow(newVal){
if (this.autoClose) return
this.openState(newVal)
},
leftOptions() {
this.init()
},
rightOptions() {
this.init()
}
},
mounted() {
// this.position = {}
if (this.swipeaction.children !== undefined) {
this.swipeaction.children.push(this)
}
this.init()
},
beforeDestoy() {
this.swipeaction.children.forEach((item, index) => {
if (item === this) {
this.swipeaction.children.splice(index, 1)
}
})
},
methods: {
init(){
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.getSelectorQuery()
}, 100)
// 移动距离
this.left = 0
this.x = 0
},
closeSwipe(e) {
if (!this.autoClose) return
this.swipeaction.closeOther(this)
},
appTouchStart(e) {
const {
clientX
} = e.changedTouches[0]
this.clientX = clientX
this.timestamp = new Date().getTime()
},
appTouchEnd(e, index, item, position) {
const {
clientX
} = e.changedTouches[0]
// fixed by xxxx 模拟点击事件,解决 ios 13 点击区域错位的问题
let diff = Math.abs(this.clientX - clientX)
let time = (new Date().getTime()) - this.timestamp
if (diff < 40 && time < 300) {
this.$emit('click', {
content: item,
index,
position
})
}
},
touchstart(e) {
if (this.disabled) return
this.ani = false
this.x = this.left || 0
this.stopTouchStart(e)
this.autoClose && this.closeSwipe()
},
touchmove(e) {
if (this.disabled) return
// 是否可以滑动页面
this.stopTouchMove(e);
if (this.direction !== 'horizontal') {
return;
}
this.move(this.x + this.deltaX)
},
touchend() {
if (this.disabled) return
this.moveDirection(this.left)
},
/**
* 设置移动距离
* @param {Object} value
*/
move(value) {
value = value || 0
const leftWidth = this.leftWidth
const rightWidth = this.rightWidth
// 获取可滑动范围
this.left = this.range(value, -rightWidth, leftWidth);
},
/**
* 获取范围
* @param {Object} num
* @param {Object} min
* @param {Object} max
*/
range(num, min, max) {
return Math.min(Math.max(num, min), max);
},
/**
* 移动方向判断
* @param {Object} left
* @param {Object} value
*/
moveDirection(left) {
const threshold = this.threshold
const isopen = this.isopen || 'none'
const leftWidth = this.leftWidth
const rightWidth = this.rightWidth
if (this.deltaX === 0) {
this.openState('none')
return
}
if ((isopen === 'none' && rightWidth > 0 && -left > threshold) || (isopen !== 'none' && rightWidth > 0 && rightWidth +
left < threshold)) {
// right
this.openState('right')
} else if ((isopen === 'none' && leftWidth > 0 && left > threshold) || (isopen !== 'none' && leftWidth > 0 &&
leftWidth - left < threshold)) {
// left
this.openState('left')
} else {
// default
this.openState('none')
}
},
/**
* 开启状态
* @param {Boolean} type
*/
openState(type) {
const leftWidth = this.leftWidth
const rightWidth = this.rightWidth
let left = ''
this.isopen = this.isopen ? this.isopen : 'none'
switch (type) {
case "left":
left = leftWidth
break
case "right":
left = -rightWidth
break
default:
left = 0
}
if (this.isopen !== type) {
this.throttle = true
this.$emit('change', type)
}
this.isopen = type
// 添加动画类
this.ani = true
this.$nextTick(() => {
this.move(left)
})
// 设置最终移动位置,理论上只要进入到这个函数,肯定是要打开的
},
close() {
this.openState('none')
},
getDirection(x, y) {
if (x > y && x > MIN_DISTANCE) {
return 'horizontal';
}
if (y > x && y > MIN_DISTANCE) {
return 'vertical';
}
return '';
},
/**
* 重置滑动状态
* @param {Object} event
*/
resetTouchStatus() {
this.direction = '';
this.deltaX = 0;
this.deltaY = 0;
this.offsetX = 0;
this.offsetY = 0;
},
/**
* 设置滑动开始位置
* @param {Object} event
*/
stopTouchStart(event) {
this.resetTouchStatus();
const touch = event.touches[0];
this.startX = touch.clientX;
this.startY = touch.clientY;
},
/**
* 滑动中,是否禁止打开
* @param {Object} event
*/
stopTouchMove(event) {
const touch = event.touches[0];
this.deltaX = touch.clientX - this.startX;
this.deltaY = touch.clientY - this.startY;
this.offsetX = Math.abs(this.deltaX);
this.offsetY = Math.abs(this.deltaY);
this.direction = this.direction || this.getDirection(this.offsetX, this.offsetY);
},
getSelectorQuery() {
const views = uni.createSelectorQuery().in(this)
views
.selectAll('.uni-swipe_button-group')
.boundingClientRect(data => {
let show = 'none'
if (this.autoClose) {
show = 'none'
} else {
show = this.show
}
this.leftWidth = data[0].width || 0
this.rightWidth = data[1].width || 0
this.buttonShow = show
})
.exec()
}
}
}
export default {
data() {
return {
position: [],
button: {},
btn: "[]"
}
},
// computed: {
// pos() {
// return JSON.stringify(this.position)
// },
// btn() {
// return JSON.stringify(this.button)
// }
// },
watch: {
button: {
handler(newVal) {
this.btn = JSON.stringify(newVal)
},
deep: true
},
show(newVal) {
if (this.autoClose) return
if (!this.button) {
this.init()
return
}
this.button.show = newVal
},
leftOptions() {
this.init()
},
rightOptions() {
this.init()
}
},
created() {
if (this.swipeaction.children !== undefined) {
this.swipeaction.children.push(this)
}
},
mounted() {
this.init()
},
beforeDestroy() {
this.swipeaction.children.forEach((item, index) => {
if (item === this) {
this.swipeaction.children.splice(index, 1)
}
})
},
methods: {
init() {
clearTimeout(this.swipetimer)
this.swipetimer = setTimeout(() => {
this.getButtonSize()
}, 50)
},
closeSwipe(e) {
if (!this.autoClose) return
this.swipeaction.closeOther(this)
},
change(e) {
this.$emit('change', e.open)
let show = this.button.show
if (show !== e.open) {
this.button.show = e.open
}
},
appTouchStart(e) {
const {
clientX
} = e.changedTouches[0]
this.clientX = clientX
this.timestamp = new Date().getTime()
},
appTouchEnd(e, index, item, position) {
const {
clientX
} = e.changedTouches[0]
// fixed by xxxx 模拟点击事件,解决 ios 13 点击区域错位的问题
let diff = Math.abs(this.clientX - clientX)
let time = (new Date().getTime()) - this.timestamp
if (diff < 40 && time < 300) {
this.$emit('click', {
content: item,
index,
position
})
}
},
getButtonSize() {
const views = uni.createSelectorQuery().in(this)
views
.selectAll('.uni-swipe_button-group')
.boundingClientRect(data => {
let show = 'none'
if (this.autoClose) {
show = 'none'
} else {
show = this.show
}
this.button = {
data,
show
}
})
.exec()
}
}
}
<template>
<!-- 在微信小程序 app vue端 h5 使用wxs 实现-->
<!-- #ifdef APP-VUE || MP-WEIXIN || H5 -->
<view class="uni-swipe">
<view
class="uni-swipe_box"
:data-threshold="threshold"
:data-disabled="disabled"
:change:prop="swipe.sizeReady"
:prop="btn"
@touchstart="swipe.touchstart"
@touchmove="swipe.touchmove"
@touchend="swipe.touchend"
>
<!-- 在微信小程序 app vue端 h5 使用wxs 实现-->
<view class="uni-swipe_button-group button-group--left">
<slot name="left">
<view
v-for="(item,index) in leftOptions"
:data-button="btn"
:key="index"
:style="{
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
}"
class="uni-swipe_button button-hock"
@touchstart="appTouchStart"
@touchend="appTouchEnd($event,index,item,'left')"
><text
class="uni-swipe_button-text"
:style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF',}"
>{{ item.text }}</text></view>
</slot>
</view>
<slot></slot>
<view class="uni-swipe_button-group button-group--right">
<slot name="right">
<view
v-for="(item,index) in rightOptions"
:data-button="btn"
:key="index"
:style="{
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
}"
class="uni-swipe_button button-hock"
@touchstart="appTouchStart"
@touchend="appTouchEnd($event,index,item,'right')"
><text
class="uni-swipe_button-text"
:style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF',}"
>{{ item.text }}</text></view>
</slot>
</view>
</view>
</view>
<!-- #endif -->
<!-- app nvue端 使用 bindingx -->
<!-- #ifdef APP-NVUE -->
<view
ref="selector-box--hock"
class="uni-swipe"
@horizontalpan="touchstart"
@touchend="touchend"
>
<view
ref='selector-left-button--hock'
class="uni-swipe_button-group button-group--left"
>
<slot name="left">
<view
v-for="(item,index) in leftOptions"
:data-button="btn"
:key="index"
:style="{
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
}"
class="uni-swipe_button button-hock"
@click.stop="onClick(index,item,'left')"
><text
class="uni-swipe_button-text"
:style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF',}"
>{{ item.text }}</text></view>
</slot>
</view>
<view
ref='selector-right-button--hock'
class="uni-swipe_button-group button-group--right"
>
<slot name="right">
<view
v-for="(item,index) in rightOptions"
:data-button="btn"
:key="index"
:style="{
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
}"
class="uni-swipe_button button-hock"
@click.stop="onClick(index,item,'right')"
><text
class="uni-swipe_button-text"
:style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF',}"
>{{ item.text }}</text></view>
</slot>
</view>
<view
ref='selector-content--hock'
class="uni-swipe_box"
>
<slot></slot>
</view>
</view>
<!-- #endif -->
<!-- 其他平台使用 js ,长列表性能可能会有影响-->
<!-- #ifdef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO || MP-QQ -->
<view class="uni-swipe">
<view
class="uni-swipe_box"
@touchstart="touchstart"
@touchmove="touchmove"
@touchend="touchend"
:style="{transform:moveLeft}"
:class="{ani:ani}"
>
<view class="uni-swipe_button-group button-group--left">
<slot name="left">
<view
v-for="(item,index) in leftOptions"
:data-button="btn"
:key="index"
:style="{
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
}"
class="uni-swipe_button button-hock"
@touchstart="appTouchStart"
@touchend="appTouchEnd($event,index,item,'left')"
><text
class="uni-swipe_button-text"
:style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF',}"
>{{ item.text }}</text></view>
</slot>
</view>
<slot></slot>
<view class="uni-swipe_button-group button-group--right">
<slot name="right">
<view
v-for="(item,index) in rightOptions"
:data-button="btn"
:key="index"
:style="{
backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
}"
@touchstart="appTouchStart"
@touchend="appTouchEnd($event,index,item,'right')"
class="uni-swipe_button button-hock"
><text
class="uni-swipe_button-text"
:style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF',}"
>{{ item.text }}</text></view>
</slot>
</view>
</view>
</view>
<!-- #endif -->
</template>
<script
src="./index.wxs"
module="swipe"
lang="wxs"
></script>
<script>
// #ifdef APP-VUE|| MP-WEIXIN || H5
import mpwxs from './mpwxs'
// #endif
// #ifdef APP-NVUE
import bindingx from './bindingx.js'
// #endif
// #ifndef APP-PLUS|| MP-WEIXIN || H5
import mixins from './mpother'
// #endif
/**
* SwipeActionItem 滑动操作子组件
* @description 通过滑动触发选项的容器
* @tutorial https://ext.dcloud.net.cn/plugin?id=181
* @property {Boolean} show = [left|right|none] 开启关闭组件,auto-close = false 时生效
* @property {Boolean} disabled = [true|false] 是否禁止滑动
* @property {Boolean} autoClose = [true|false] 滑动打开当前组件,是否关闭其他组件
* @property {Number} threshold 滑动缺省值
* @property {Array} leftOptions 左侧选项内容及样式
* @property {Array} rgihtOptions 右侧选项内容及样式
* @event {Function} click 点击选项按钮时触发事件,e = {content,index} ,content(点击内容)、index(下标)
* @event {Function} change 组件打开或关闭时触发,left\right\none
*/
export default {
// #ifdef APP-VUE|| MP-WEIXIN||H5
mixins: [mpwxs],
// #endif
// #ifdef APP-NVUE
mixins: [bindingx],
// #endif
// #ifndef APP-PLUS|| MP-WEIXIN || H5
mixins: [mixins],
// #endif
props: {
// 控制开关
show: {
type: String,
default: 'none'
},
// 禁用
disabled: {
type: Boolean,
default: false
},
// 是否自动关闭
autoClose: {
type: Boolean,
default: true
},
// 滑动缺省距离
threshold: {
type: Number,
default: 20
},
// 左侧按钮内容
leftOptions: {
type: Array,
default () {
return []
}
},
// 右侧按钮内容
rightOptions: {
type: Array,
default () {
return []
}
}
},
inject: ['swipeaction']
}
</script>
<style
lang="scss"
scoped
>
.uni-swipe {
position: relative;
/* #ifndef APP-NVUE */
overflow: hidden;
/* #endif */
}
.uni-swipe_box {
/* #ifndef APP-NVUE */
display: flex;
flex-shrink: 0;
/* #endif */
position: relative;
}
.uni-swipe_content {
// border: 1px red solid;
}
.uni-swipe_button-group {
/* #ifndef APP-NVUE */
box-sizing: border-box;
display: flex;
/* #endif */
flex-direction: row;
position: absolute;
top: 0;
bottom: 0;
}
.button-group--left {
left: 0;
transform: translateX(-100%)
}
.button-group--right {
right: 0;
transform: translateX(100%)
}
.uni-swipe_button {
/* #ifdef APP-NVUE */
flex: 1;
/* #endif */
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
padding: 0 20px;
}
.uni-swipe_button-text {
/* #ifndef APP-NVUE */
flex-shrink: 0;
/* #endif */
font-size: 14px;
}
.ani {
transition-property: transform;
transition-duration: 0.3s;
transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
}
/* #ifdef MP-ALIPAY */
.movable-area {
/* width: 100%; */
height: 45px;
}
.movable-view {
display: flex;
/* justify-content: center; */
position: relative;
flex: 1;
height: 45px;
z-index: 2;
}
.movable-view-button {
display: flex;
flex-shrink: 0;
flex-direction: row;
height: 100%;
background: #C0C0C0;
}
/* .transition {
transition: all 0.3s;
} */
.movable-view-box {
flex-shrink: 0;
height: 100%;
background-color: #fff;
}
/* #endif */
</style>
<template>
<view>
<slot></slot>
</view>
</template>
<script>
/**
* SwipeAction 滑动操作
* @description 通过滑动触发选项的容器
* @tutorial https://ext.dcloud.net.cn/plugin?id=181
*/
export default {
data() {
return {};
},
provide() {
return {
swipeaction: this
};
},
created() {
this.children = [];
},
methods: {
closeOther(vm) {
if (this.openItem && this.openItem !== vm) {
// #ifdef APP-VUE || H5 || MP-WEIXIN
this.openItem.button.show = 'none'
// #endif
// #ifndef APP-VUE || H5 || MP-WEIXIN
this.openItem.close()
// #endif
}
this.openItem = vm
}
}
};
</script>
<style></style>
......@@ -12,7 +12,7 @@ Vue.use(router)
import uView from "uview-ui";
Vue.use(uView);
import {parseTime} from "@/utils/common.js"
import {parseTime,showToast} from "@/utils/common.js"
Vue.prototype.parseTime=parseTime
import {platform, channel} from './utils/platform'
Vue.prototype.$u.platform = platform
......
......@@ -73,6 +73,33 @@
}
}
,{
"path" : "debit-note/debit-note",
"style" :
{
"navigationBarTitleText": "查欠账",
"enablePullDownRefresh": false
}
}
,{
"path" : "quoted-price/quoted-price",
"style" :
{
"navigationBarTitleText": "查报价",
"enablePullDownRefresh": false
}
}
,{
"path" : "quoted-price/choose-category/choose-category",
"style" :
{
"navigationBarTitleText": "选品类",
"enablePullDownRefresh": false
}
}
]
}, {
"root": "pages/mine",
......@@ -100,7 +127,10 @@
"style" :
{
"navigationBarTitleText": "兑换会员",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"backgroundColor": "#02A074",
"navigationBarBackgroundColor": "#02A074",
"navigationBarTextStyle": "white"
}
}
......
<template>
<view class="debit-detail">
<view class="content">
<view class="content-item">
<text class="content-item-label">客户名称:</text>
<text class="content-item-value">{{detail.name}}</text>
</view>
<view class="content-item">
<text class="content-item-label">联系电话:</text>
<text class="content-item-value">{{detail.phone}}</text>
</view>
<view class="line">
</view>
</view>
<view class="debit-detail-right">
<view class="finish" v-if="detail.status === '1'">账单已结清</view>
<view class="debt" v-else-if="detail.status === '0'">
<view class="content-item debt-status">欠款</view>
<view class="content-item debt-money">
<text>¥</text>
<text>{{ detail.money }}</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
detail: {
type: Object,
default: () => {}
}
},
data() {
return {};
}
};
</script>
<style lang="scss" scoped>
.debit-detail {
height: 152upx;
background: #FFFFFF;
border-radius: 16upx;
padding: 24upx;
display: flex;
align-items: center;
margin-bottom: 24upx;
.content {
width: 420upx;
position: relative;
overflow: hidden;
&-item {
font-size: 28upx;
line-height: 28upx;
&:first-child{
margin-bottom: 32upx;
}
&-label {
color: #8D8D8D;
}
&-value {
font-weight: bold;
}
}
.line{
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
width: 2upx;
height: 80upx;
background: #F6F7FA;
}
}
&-right {
flex: 1;
.finish {
display: flex;
align-items: center;
justify-content: center;
color: $default-color;
}
.debt {
text-align: center;
&-status {
color: #8D8D8D;
}
&-money {
color: #FC524D;
}
}
}
}
</style>
<template>
<view class="debit-note">
<view class="search-wrap">
<u-search v-model="form.keyword" height="80" bg-color="#ffffff" :show-action="false" placeholder="搜索客户姓名/手机" @change="changeSearch"></u-search>
</view>
<view class="tabs-box">
<u-tabs-swiper
ref="uTabs"
bg-color='#f6f7fa'
font-size="28"
bar-width="32"
bar-height="4"
height="60"
inactive-color="#8D8D8D"
active-color="#02A074"
name="title"
:list="tabs"
:current="current"
@change="tabsChange"
:is-scroll="false"
swiperWidth="750"
></u-tabs-swiper>
</view>
<view class="swiper-box">
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" style="height:100%">
<swiper-item class="swiper-item" v-for="(listData, index) in list" :key="index">
<scroll-view
scroll-y
style="height: 100%;width: 100%;"
@scrolltolower="onreachBottom"
@refresherrefresh="onRefresh"
@refresherrestore="onRestore"
enable-back-to-top
refresher-enabled
:refresher-triggered="getCurrentPage(index).triggered"
:refresher-threshold="100"
>
<view class="scroll-view">
<NoData v-if="noData(index)" :text="noDataText" customStyle="margin-top: 0rpx;" :imageName="noDataImage" />
<template v-else>
<view class="container"><debit-detail v-for="item in listData" :key="item.userid" :detail="item" @handleClick="toDetail"></debit-detail></view>
<view class="loading-view" v-if="!getCurrentPage(index).loaded && !getCurrentPage(index).freshing"><u-loading mode="flower"></u-loading></view>
<view v-show="(getCurrentPage(index).pageNumber === 0 && getCurrentPage(index).loaded) || getCurrentPage(index).pageNumber > 1">
<u-loadmore :status="getCurrentPage(index).loadStatus" />
</view>
</template>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
</view>
</template>
<script>
import NoData from '@/components/no-data';
import DebitDetail from './components/debit-detail.vue';
import { billBaseUrl } from '@/utils/config.js';
import { debitNotePages, debitNoteTabs } from '@/utils/options/bill/index.js';
export default {
components: {
NoData,
DebitDetail
},
data() {
return {
form: {
keyword: ''
},
list: [[{
name:"王先生",
phone:"13598489568",
status:"1",
money:"1000.00",
},{
name:"王先生",
phone:"13598489568",
status:"0",
money:"1000.00",
}], [], []],
current: 0, // tabs组件的current值,表示当前活动的tab选项
swiperCurrent: 0, // swiper组件的current值,表示当前那个swiper-item是活动的
tabs: debitNoteTabs,
pages: debitNotePages,
activeItemStyle: {
color: '#ff286d'
},
noDataText: '当前暂无欠款信息',
noDataImage: 'bill/wuqiankuanxinxi@3x.png'
};
},
computed: {
currentTab() {
return this.tabs[this.current];
},
currentPage() {
return this.pages[this.current];
}
},
onLoad(options) {
this.init();
},
methods: {
toDetail(){
// uni.navigateTo({
// url:``
// })
},
changeSearch() {
this.onRefresh();
},
noData(index) {
return this.list[index].length == 0 && this.getCurrentPage(index).loaded;
},
getCurrentPage(index) {
return this.pages[index];
},
async init() {
try {
let res = await initApp();
uni.setStorageSync('resData', res);
this.tabs = res.hometab;
if (this.tabs[0]) {
this.getData();
}
} catch (e) {
//TODO handle the exception
this.currentPage.loaded = true;
}
},
async getData() {
if (this.currentPage.pageNumber === 0) {
this.currentPage.loaded = false;
}
var postData = {
tab: this.currentTab.name,
limit: this.currentPage.limit,
offset: this.currentPage.pageNumber * this.currentPage.limit
};
console.log(postData);
try {
let res = await nearbySearch(postData);
console.log('searchUrl', res);
if (this.currentPage.pageNumber === 0) {
// 下拉刷新或切换到新tab,清空对应数组
this.list[this.current] = [];
}
if (res.data && res.data.length) {
res.data.forEach(item => {
item.stature = RandomNumBoth(145, 180);
item.cityName = RandomCity();
});
this.list[this.current].push(...res.data);
// 更新底部加载状态
this.currentPage.loadStatus = 'loadmore';
this.currentPage.isLoadMore = false;
} else {
this.currentPage.isLoadMore = true;
this.currentPage.loadStatus = 'nomore';
}
this.$nextTick(() => {
if (this.currentPage.freshing) {
this.currentPage.triggered = false;
this.currentPage.freshing = false;
}
});
this.currentPage.loaded = true;
} catch (e) {
console.log(e);
this.$nextTick(() => {
if (this.currentPage.freshing) {
this.currentPage.triggered = false;
this.currentPage.freshing = false;
}
});
this.currentPage.loaded = true;
}
},
//点击当前主播的from表单事件
toDetail(item) {
uni.navigateTo({
url: `/pages/user/user?id=${item.userid}`
});
},
// tabs通知swiper切换
tabsChange(index) {
this.swiperCurrent = index;
console.log('-------tabsChange------');
// this.getWalletRecord(); // 与swiper change重复,tab变化无需再次请求数据
},
// swiper-item左右移动,通知tabs的滑块跟随移动
transition(e) {
let dx = e.detail.dx;
this.$refs.uTabs.setDx(dx);
},
// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
// swiper滑动结束,分别设置tabs和swiper的状态
animationfinish(e) {
let current = e.detail.current;
this.$refs.uTabs.setFinishCurrent(current);
this.swiperCurrent = current;
this.current = current;
console.log('-------animationfinish------');
if (this.currentPage.loaded === false) {
this.getData();
}
},
onRefresh() {
if (this.currentPage.freshing) return;
this.currentPage.freshing = true;
this.currentPage.pageNumber = 0;
this.getData();
},
onRestore() {
this.currentPage.triggered = 'restore'; // 需要重置
},
onreachBottom(e) {
//上拉触底函数
if (!this.currentPage.isLoadMore) {
//此处判断,上锁,防止重复请求
this.currentPage.isLoadMore = true;
this.currentPage.pageNumber += 1;
this.getData();
}
}
}
};
</script>
<style lang="scss" scoped>
.debit-note {
padding: 24upx;
height: 100vh;
display: flex;
flex-direction: column;
.search-wrap {
width: 100%;
}
.tabs-box {
margin: 32upx 0;
}
.swiper-box {
flex: 1;
width: 100%;
}
.swiper-item {
height: 100%;
}
.container {
padding: 20upx 0;
}
.loading-view {
width: 100%;
background-color: transparent;
display: flex;
align-items: center;
justify-content: center;
top: 50%;
left: 0;
position: fixed;
}
.scroll-view {
width: 100%;
height: 100%;
}
}
</style>
<template>
<!-- 查报价 -->
<view class="choose-category">
<view class="choose-category-tips">
<view class="choose-category-tips-icon"><image :src="tipsUrl" mode=""></image></view>
<view class="choose-category-tips-content">本报价数据与美的官方同步,仅供参考</view>
<view class="choose-category-tips-brand"><image :src="logoUrl" mode=""></image></view>
</view>
<view class="choose-category-brand">
<view class="choose-category-brand-item" v-for="(item, index) in list" :key="index" @click="next(item)">
<view class="choose-category-brand-item-icon"><image :src="item.icon" mode=""></image></view>
<view class="choose-category-brand-item-title">{{item.title}}</view>
</view>
</view>
</view>
</template>
<script>
import { mineBaseUrl, billBaseUrl } from '@/utils/config.js';
import { } from '@/utils/options/bill/index.js';
export default {
data() {
return {
tipsUrl: mineBaseUrl + 'shouzhishezhitixing@3x.png',
logoUrl: billBaseUrl + 'meidi@3x.png',
arrowUrl: billBaseUrl + 'meidi@3x.png',
list: [
{
title: '美的',
icon: billBaseUrl + 'meidi@3x.png',
id: '1'
},
{
title: '美的',
icon: billBaseUrl + 'meidi@3x.png',
id: '1'
},
{
title: '美的',
icon: billBaseUrl + 'meidi@3x.png',
id: '1'
},
{
title: '美的',
icon: billBaseUrl + 'meidi@3x.png',
id: '1'
},
{
title: '美的',
icon: billBaseUrl + 'meidi@3x.png',
id: '1'
},
]
};
},
methods: {
next(item) {
uni.navigateTo({
url:`./choose-category/choose-category?id=${item.id}`
})
}
}
};
</script>
<style lang="scss" scoped>
.choose-category {
padding: 0 24upx;
&-tips {
padding-top: 24rpx;
width: 100%;
display: flex;
align-items: center;
padding-bottom: 36rpx;
&-icon {
width: 32rpx;
height: 32rpx;
margin-right: 16rpx;
}
&-content {
font-size: 26rpx;
font-weight: 400;
color: #333333;
line-height: 26rpx;
}
&-brand {
margin-left: 10upx;
width: 140upx;
height: 40upx;
}
}
&-brand {
display: flex;
flex-wrap: wrap;
&-item {
width: 218upx;
height: 218upx;
background: #ffffff;
border-radius: 16upx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-right: 24upx;
margin-bottom: 24upx;
&:nth-child(3n){
margin-right: 0;
}
&-icon {
width: 100upx;
height: 100upx;
background: pink;
border-radius: 16upx;
overflow: hidden;
}
&-title {
margin-top: 32upx;
font-size: 28upx;
}
}
}
}
</style>
<template>
<!-- 查报价 -->
<view class="quoted-price">
<view class="quoted-price-tips">
<view class="quoted-price-tips-icon"><image :src="tipsUrl" mode=""></image></view>
<view class="quoted-price-tips-content">本报价数据与美的官方同步,仅供参考</view>
<view class="quoted-price-tips-brand"><image :src="logoUrl" mode=""></image></view>
</view>
<view class="quoted-price-step">
<view class="quoted-price-step-label">操作流程:</view>
<view class="quoted-price-step-value">
<view class="quoted-price-step-item" v-for="(item, index) in steps" :key="index">
<view class="quoted-price-step-item-num">{{ item.id }}</view>
<view class="quoted-price-step-item-title">{{ item.title }}</view>
<view class="quoted-price-step-item-arrow" v-if="index !== steps.length - 1"><image :src="arrowUrl" mode=""></image></view>
</view>
</view>
</view>
<view class="quoted-price-brand">
<view class="quoted-price-brand-item" v-for="(item, index) in list" :key="index" @click="next(item)">
<view class="quoted-price-brand-item-icon"><image :src="item.icon" mode=""></image></view>
<view class="quoted-price-brand-item-title">{{item.title}}</view>
</view>
</view>
</view>
</template>
<script>
import { mineBaseUrl, billBaseUrl } from '@/utils/config.js';
import { quotedPriceSteps } from '@/utils/options/bill/index.js';
export default {
data() {
return {
tipsUrl: mineBaseUrl + 'shouzhishezhitixing@3x.png',
logoUrl: billBaseUrl + 'meidi@3x.png',
arrowUrl: billBaseUrl + 'meidi@3x.png',
steps: quotedPriceSteps,
list: [
{
title: '美的',
icon: billBaseUrl + 'meidi@3x.png',
id: '1'
},
{
title: '美的',
icon: billBaseUrl + 'meidi@3x.png',
id: '1'
},
{
title: '美的',
icon: billBaseUrl + 'meidi@3x.png',
id: '1'
},
{
title: '美的',
icon: billBaseUrl + 'meidi@3x.png',
id: '1'
},
{
title: '美的',
icon: billBaseUrl + 'meidi@3x.png',
id: '1'
},
]
};
},
methods: {
next(item) {
uni.navigateTo({
url:`./choose-category/choose-category?id=${item.id}`
})
}
}
};
</script>
<style lang="scss" scoped>
.quoted-price {
padding: 0 24upx;
&-tips {
padding-top: 24rpx;
width: 100%;
display: flex;
align-items: center;
padding-bottom: 36rpx;
&-icon {
width: 32rpx;
height: 32rpx;
margin-right: 16rpx;
}
&-content {
font-size: 26rpx;
font-weight: 400;
color: #333333;
line-height: 26rpx;
}
&-brand {
margin-left: 10upx;
width: 140upx;
height: 40upx;
}
}
&-step {
height: 104upx;
background: #ffffff;
border-radius: 16upx;
padding: 0 24upx;
display: flex;
align-items: center;
margin-bottom: 24upx;
font-size: 28upx;
&-label {
color: #8d8d8d;
}
&-value {
display: flex;
align-items: center;
font-weight: bold;
}
&-item {
display: flex;
align-items: center;
&-num {
width: 32upx;
height: 32upx;
display: flex;
align-items: center;
font-size: 24upx;
font-weight: bold;
color: #ffffff;
justify-content: center;
border-radius: 50%;
background-color: $default-color;
margin-right: 8upx;
}
&-arrow {
width: 24upx;
height: 22upx;
display: flex;
margin: 0 20upx;
}
}
}
&-brand {
display: flex;
flex-wrap: wrap;
&-item {
width: 218upx;
height: 218upx;
background: #ffffff;
border-radius: 16upx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-right: 24upx;
margin-bottom: 24upx;
&:nth-child(3n){
margin-right: 0;
}
&-icon {
width: 100upx;
height: 100upx;
background: pink;
border-radius: 16upx;
overflow: hidden;
}
&-title {
margin-top: 32upx;
font-size: 28upx;
}
}
}
}
</style>
<template>
<!-- 账单 -->
<view>
<NavbarNormal background="transparent" titleColor="#191C27" :border-bottom="false" :custom-back="customBack" title=" " title-bold>
<view class="left-text">{{ title }}</view>
......
......@@ -261,7 +261,7 @@ export default {
},
{
image: this.baseUrl + 'chaqianzhang@3x.png',
path: '',
path: '/pages/bill/debit-note/debit-note',
name: '查欠账',
},
]
......@@ -317,6 +317,9 @@ export default {
},
handleClickOperate(path) {
if (!this.checkVip()) return
uni.navigateTo({
url: path
});
},
handleSelectCell(id) {
console.log('-----------', id)
......
This diff is collapsed.
......@@ -94,12 +94,12 @@ export default {
maxlength: 20,
height: 240
};
case 'menu-name':
case 'payments-setting':
return {
title: '频道名称',
title: '类型名称',
type: 'textarea',
placeholder: '请输入频道名称(10个字以内)',
maxlength: 10,
placeholder: '请输入类型名称(4个字以内)',
maxlength: 4,
height: 240
};
case 'menu-introduce':
......@@ -172,6 +172,10 @@ export default {
},
handleClick() {
if (!this.disabled) {
if(!this.value.trim()){
this.$u.toast("内容不能为空")
return false
}
let notification = `input-sure-${this.type}`;
uni.$emit(notification, {
content: this.value
......@@ -210,7 +214,7 @@ export default {
height: 104rpx;
.button-text {
color: #333333;
color: #ffffff;
height: 104rpx;
line-height: 104rpx;
font-weight: bold;
......
......@@ -10,7 +10,7 @@
<text class="t-right">{{ userStatus }}</text>
</view>
<view class="record">
<view class="account-title">开通服务</view>
<view class="account-title">请选择开通服务</view>
<view class="open-type">
<view
class="info-item"
......@@ -37,7 +37,7 @@
<block v-if="isIOS">
<view v-if="platform !== '3'" class="service-button-m" @tap="handleService">
<text class="more-text">了解更多</text>
<u-icon name="arrow-right" color="#3383FE" :size="24" />
<u-icon name="arrow-right" :size="24" />
</view>
</block>
</view>
......@@ -48,7 +48,7 @@
</view>
<view class="exchange-button" @tap="handleService">
<text class="exchange-button-text">立即联系</text>
<u-icon name="arrow-right" color="#3383FE" :size="24" />
<u-icon name="arrow-right" :size="24" />
</view>
</view>
<view class="service-view" v-if="cdKeySetting">
......@@ -58,30 +58,15 @@
</view>
<view class="exchange-button" @tap="handleExchange">
<text class="exchange-button-text">立即兑换</text>
<u-icon name="arrow-right" color="#3383FE" :size="24" />
<u-icon name="arrow-right" :size="24" />
</view>
</view>
<view class="record-b">
<view class="account-title">会员特权介绍</view>
<view class="intro-item top-border">
<image class="search-icon" :src="searchIcon"></image>
<view class="line-right">
<view class="line-up">故障码查询</view>
<view class="line-down">100+品牌故障码,不限次数查询</view>
</view>
</view>
<view class="intro-item top-border">
<image class="search-icon" :src="boshiIcon"></image>
<view class="line-right">
<view class="line-up">厂商资料学习</view>
<view class="line-down">在线查阅学习,各品牌厂商售后资料</view>
</view>
</view>
<view class="intro-item top-border">
<image class="search-icon" :src="wxIcon"></image>
<view class="line-right">
<view class="line-up">加入粉丝群</view>
<view class="line-down">优享平台福利,同行们学习互助</view>
<view class="intro">
<view class="intro-item" v-for="(item,index) in introOptions" :key="index">
<view class="search-icon"><image class="" :src="item.icon"></image></view>
<view class="intro-item-text">{{item.label}}</view>
</view>
</view>
</view>
......@@ -89,16 +74,16 @@
<view v-if="!isIOS" class="bottom-view"><button class="buy-button" @tap="$u.throttle(handleClickBuy, 500)">立即购买</button></view>
<BottomPay :visible.sync="showPay" @click="$u.throttle(handleClickPay, 500)" />
</view>
<!-- 底部 -->
<!-- <code-footer activeIndex="2"></code-footer> -->
</template>
<script>
// var user = require('../../utils/user.js');
import api from "@/api/mine/pay.js"
import api from '@/api/mine/pay.js';
import log from "@/utils/log.js"
import log from '@/utils/log.js';
import BottomPay from '@/components/bottom-pay/index.vue';
import { mineBaseUrl } from '@/utils/config.js';
import { introOptions } from '@/utils/options/mine/pay.js';
import { mapGetters } from 'vuex';
export default {
components: {
......@@ -106,23 +91,20 @@ export default {
},
data() {
return {
introOptions,
avatar: '',
nickname: '',
userStatus: '',
searchIcon: '/static/images/mine/teuqan1@2x.png',
boshiIcon: '/static/images/mine/tequan2@2x.png',
wxIcon: '/static/images/mine/tequan3@2x.png',
gougouImage: '/static/images/mine/yixuanzetikule@3x.png',
duihuanwentiImg: '/static/images/mine/duihuanwenti@3x.png',
huiyuan1Img: '/static/images/mine/huiyuan1@3x.png',
dhmImg: '/static/images/mine/duihuanma.png',
duihuanwentiImg: mineBaseUrl+'duihuanwenti@3x.png',
huiyuan1Img: mineBaseUrl+'huiyuanduihuanma@3x.png',
priceList: [],
uid: '',
isIOS: false,
showPay: false,
current: 0,
isIOSPlatform: false,
iap:""
iap: ''
};
},
computed: {
......@@ -181,13 +163,13 @@ export default {
if (fUid) {
this.addShare(fUid);
}
if (this.platform === '4' && this.isIOSPlatform ) {
console.log("restoreFlag====",this.restoreFlag);
if (this.platform === '4' && this.isIOSPlatform) {
console.log('restoreFlag====', this.restoreFlag);
this.$store.dispatch('getChannels');
if( this.restoreFlag){
setTimeout(()=>{
if (this.restoreFlag) {
setTimeout(() => {
this.$store.dispatch('Restore_complate_request');
},1500)
}, 1500);
}
}
},
......@@ -373,7 +355,7 @@ export default {
data: data,
success: res => {
console.log('afterPay-unify-pay', res);
this.$store.dispatch("Restore_finishTransaction",res)
this.$store.dispatch('Restore_finishTransaction', res);
this.getUserInfo();
},
complete: res => {
......@@ -436,7 +418,7 @@ export default {
}
}
if (iap) {
this.iap=iap
this.iap = iap;
this.getOrderInfo(iap);
} else {
uni.hideLoading();
......@@ -527,7 +509,7 @@ export default {
.content {
padding: 20rpx 24rpx 64rpx 24rpx;
height: 100%;
background-color: rgba(242, 242, 242, 1);
// background-color: ;
font-size: 28rpx;
overflow-y: scroll;
}
......@@ -649,7 +631,7 @@ export default {
border-radius: 12rpx;
background-color: #fff;
margin-top: 24rpx;
padding-bottom: 30rpx;
// padding-bottom: 30rpx;
// margin-bottom: 140rpx;
}
......@@ -663,7 +645,7 @@ export default {
.exchange-button {
display: flex;
align-items: center;
color: #3383fe;
color: $default-color;
}
.exchange-title {
......@@ -681,29 +663,40 @@ export default {
text-align: center;
}
.top-border {
border-top: 1rpx solid #f4f5f7;
.intro {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 0 32rpx;
}
.intro-item {
display: flex;
flex-direction: column;
align-items: center;
padding: 32rpx;
height: 148rpx;
justify-content: center;
width: 21%;
// padding: 0 16upx;
margin-bottom: 48upx;
// margin-right: 58upx;
&:nth-child(4n){
// margin-right: 0;
}
}
.line-right {
margin-left: 20rpx;
.intro-item-text {
margin-top: 24upx;
line-height: 28upx;
color: #333333;
font-size: 28upx;
}
.search-icon {
width: 80rpx;
height: 80rpx;
width: 72rpx;
height: 72rpx;
border-radius: 50%;
}
.line-up {
color: #3383fe;
color: $default-color;
font-size: 32rpx;
padding-bottom: 6rpx;
}
......@@ -714,17 +707,17 @@ export default {
}
.bottom-view {
padding: 0 24upx;
padding-bottom: 44rpx;
background-color: #fff;
// background-color: #fff;
}
.buy-button {
background-color: #3383fe;
border-radius: 52rpx;
background-color: $default-color;
border-radius: 16rpx;
color: #fff;
text-align: center;
height: 104rpx;
width: 652rpx;
font-size: 32rpx;
margin-top: 20rpx;
font-weight: bold;
......@@ -784,9 +777,9 @@ export default {
height: 40rpx;
width: 104rpx;
margin-left: 32rpx;
color: #3383fe;
color: $default-color;
font-size: 20rpx;
border: 2rpx solid #3383fe;
border: 2rpx solid $default-color;
text-align: center;
border-radius: 8rpx;
padding: 4rpx 0;
......@@ -794,7 +787,7 @@ export default {
.service-button-m {
height: 60rpx;
color: #3383fe;
color: $default-color;
font-size: 22rpx;
text-align: center;
display: flex;
......
This diff is collapsed.
<template>
<view>
<!-- 收支设置 -->
<view class="column-administer" @click="closeDrap">
<view class="content-view">
<view class="content-view-tips">
<view class="content-view-tips-icon"><image :src="tipsUrl" mode="" class="content-view-tips-icon-image"></image></view>
<view class="content-view-tips-content"><view>操作提示:1、长按可移动排序;2、左滑可编辑删除。</view></view>
</view>
<view class="button-view">
<view class="button-view-item" :class="{ 'button-view-active': form.type === item.value }" v-for="(item, index) in buttons" :key="index" @click="tabChange(item)">
{{ item.label }}
</view>
</view>
<!-- 拖动 -->
<view class="drap-view"><drap-view ref="drap-view" :list="list" @onChange="onChange" @handleChange="handleChange"></drap-view></view>
<view class="submit">
<ab-button content="创建类型" :customStyle="customStyle" left-icon="plus" @click="toAdd"></ab-button>
</view>
</view>
<mask-tip :imageList="imageList" :show="showTip"></mask-tip>
<u-toast ref="uToast" />
</view>
</template>
<script>
export default {
data() {
return {
};
import NavbarNormal from '@/components/navbar-normal';
import DrapView from './components/drap-view.vue';
import MaskTip from '@/components/mask-tip';
import AbButton from '@/components/common/ab-button.vue';
import { cellInfoOptions, menuIconOptions,muckList } from '@/utils/options/mine/payments-setting.js';
import { baseUrl,mineBaseUrl } from '@/utils/config.js';
export default {
name: 'column-administer',
components: {
NavbarNormal,
DrapView,
MaskTip,
AbButton
},
data() {
return {
baseUrl,
cellInfoOptions,
menuIconOptions,
customStyle:{
height:"104rpx",
'font-size':'32rpx'
},
buttons: [
{
label: '支出类型',
value: '1'
},
{
label: '收入类型',
value: '2'
}
],
form: {
type: '1'
},
tipsUrl: mineBaseUrl + 'shouzhishezhitixing@3x.png',
list: [],
props: {
label: 'label'
},
listHeight: 0,
showTip: false,
imageTop: 0
};
},
computed: {
bottomImage() {
return this.baseUrl + 'column-administer/wozhidaole@3x.png';
},
imageList() {
return [
{
name: 'column-administer/changanyindao@3x.png',
style: `top:${this.imageTop}px;left:24rpx;width:702rpx;height:406rpx;position:fixed`,
buttonStyle: `margin: 0 auto;top:${this.imageTop + 200}px;`,
buttonImage: this.bottomImage
}
];
}
},
onLoad(options) {
// this.getList();
this.list=muckList
uni.hideShareMenu();
},
onReady() {
// this.showTipView();
},
methods: {
closeDrap(){
this.$refs["drap-view"].closeAll()
},
tabChange(item) {
this.form.type = item.value;
},
toAdd(){
this.$u.route({
url: '/pages/mine/input/input',
params: {
type: "payments-setting",
value: ""
}
});
uni.$once(`input-sure-payments-setting`, res => {
this.create(res.content)
});
},
create(content){
console.log(content)
},
showTipView() {
if (!this.read_column_administer) {
const query = uni.createSelectorQuery().in(this);
query
.select('.drap-view')
.boundingClientRect(data => {
console.log('data', data);
if (data) {
this.imageTop = data.top;
this.showTip = true;
this.$u.vuex('read_column_administer', true);
}
})
.exec();
}
},
getGuid() {
function S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
return S4() + S4() + '_' + S4() + '_' + S4() + '_' + S4() + '_' + S4() + S4() + S4();
},
getList() {
this.$u.api
.getCampColumnListByCampModules(this.camp_id)
.then(res => {
res &&
res.forEach(item => {
item.guid = this.getGuid();
if (item.campMenu) {
if (item.campMenu.name) {
item.label = item.campMenu.name;
}
if (item.campMenu.applicationId) {
item.icon = this.cellInfoOptions[item.campMenu.applicationId].icon || this.menuIconOptions['BASE'];
}
} else {
item.icon = this.menuIconOptions[item.columnType.code] || this.menuIconOptions['BASE'];
item.label = item.columnType.desc;
}
});
this.list = res || [];
})
.catch(err => {
this.loading = false;
console.log(err);
});
},
// 开关和推拽排序都会触发此事件
onChange(e) {
let list = e.map(item => {
return { id: item.id, menuId: item.menuId, show: item.show };
});
console.log(list)
// this.submitChange(list);
},
async submitChange(list) {
uni.showLoading({
mask: true
});
try {
let res = await this.$u.api.sortCampColumnListByCampModules(this.camp_id, list);
if (!res) this.getList();
} catch (e) {
this.getList();
//TODO handle the exception
}
},
naviTo() {
this.$u.route('pages/camp/layout');
}
}
};
</script>
<!-- <style scoped>
page {
height: 100%;
}
</style> -->
<style scoped lang="scss">
.column-administer {
background: #f6f7fa;
padding: 24rpx;
height: 100vh;
width: 100%;
display: flex;
flex-direction: column;
.content-view {
flex: 1;
width: 100%;
display: flex;
flex-direction: column;
&-tips {
padding-top: 8rpx;
width: 100%;
display: flex;
padding-bottom: 36rpx;
&-icon {
width: 32rpx;
height: 32rpx;
margin-right: 16rpx;
margin-top: 8rpx;
&-image {
width: 100%;
height: 100%;
}
}
<style lang="scss">
&-content {
flex: 1;
font-size: 26rpx;
font-weight: 400;
color: #333333;
line-height: 48rpx;
}
}
.drap-view {
flex: 1;
width: 100%;
position: relative;
// height: 500rpx;
}
.button-view {
display: flex;
align-items: center;
width: 360upx;
// height: 72upx;
background: #FFFFFF;
border-radius: 12upx;
border: 4upx solid #FFFFFF;
margin-bottom: 24upx;
&-item {
width: 176upx;
height: 64upx;
font-size: 28upx;
color: #8d8d8d;
display: flex;
align-items: center;
justify-content: center;
}
&-active {
background: #02a074;
border-radius: 12upx;
color: #ffffff;
font-weight: bold;
}
}
}
.submit{
margin: 36upx 0;
}
}
</style>
<template>
<view>
<view class="backView">
<view class="serviceView">
<view class="top-image">
<image :src="image" mode="widthFix" class=""></image>
<view class="top-text">
<view class="top-text-title">客服服务</view>
<view class="top-text-subtitle">扳手记账很高心为您服务</view>
</view>
</view>
<view class="time-tip-view">
<view>客服服务时间段</view>
<view class="time-text-view">
<text>周一至周六</text>
<text class="time-text">09:00 - 20:00</text>
</view>
</view>
<view class="QRcodeImage"><image class="" :src="QRcodeURL" :show-menu-by-longpress="true" @tap="QRcodeClick"></image></view>
<view class="serviceText">长按识别二维码添加好友入群</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
import { mineBaseUrl } from '@/utils/config.js';
export default {
data() {
return {
//正式
imgUrls: ['https://img-code.banshouhui.com/qrweixin/kuaichaerweima.png'],
QRcodeURL: 'https://img-code.banshouhui.com/qrweixin/kuaichaerweima.png',
image: mineBaseUrl + 'lianxikefu@3x.png'
};
},
methods: {
QRcodeClick: function() {
uni.previewImage({
current: this.QRcodeURL,
// 当前显示图片的http链接
urls: this.imgUrls // 需要预览的图片http链接列表
});
}
}
};
</script>
<style lang="scss" scoped>
/* pages/mine/service.wxss */
.top-text {
position: absolute;
z-index: 1;
color: #ffffff;
left: 0;
top: 0;
padding: 48upx;
text-align: left;
&-title {
font-size: 40upx;
line-height: 40upx;
font-weight: bold;
margin-bottom: 24upx;
}
&-subtitle {
font-size: 28upx;
}
}
.backView {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
background-color: rgba(242, 242, 242, 1);
}
.serviceView {
width: 702rpx;
margin: 20rpx 24rpx 64rpx 24rpx;
background-color: white;
border-radius: 12rpx;
text-align: center;
}
.serviceText {
margin-top: 80rpx;
font-size: 28rpx;
text-align: center;
color: #666666;
margin-bottom: 120rpx;
}
.QRcodeImage {
margin: 0 auto;
margin-top: 60rpx;
width: 400rpx;
height: 400rpx;
}
.top-image {
width: 100%;
height: 240rpx;
border-radius: 12rpx 12rpx 0 0;
overflow: hidden;
position: relative;
}
.time-tip-view {
color: #333;
font-size: 32rpx;
margin-top: 68rpx;
}
<style lang="scss">
.time-text-view {
margin-top: 8rpx;
}
.time-text {
color: $default-color;
padding-left: 12rpx;
}
</style>
......@@ -10,7 +10,9 @@ export const temperature = 'TEMPERATURE';
export const appid="wx55e75ad85611191f"
// export const API_HOST = ''; // 正式服
export const API_HOST = ''; // 测试服
export const OSSBaseUrl = ''; // 阿里云OSS图片地址
export const baseUrl = process.uniEnv.qn_base_url; // 七牛云OSS图片地址
export const mineBaseUrl = process.uniEnv.qn_base_url+'mine/'; // 七牛云OSS图片地址
export const billBaseUrl = process.uniEnv.qn_base_url+'bill/'; // 七牛云OSS图片地址
export const IMG_HOST = ''; // 服务器线上图片地址
export const STATIC_IMG_HOST = ''; // 服务器静态图片地址
......
export const billCountOptions = [{
value: "income",
label: "本月总收入(元)",
icon:""
icon: ""
},
{
value: "disbursement",
label: "本月总支出(元)",
icon:""
icon: ""
},
{
value: "surplus",
label: "本月总结余(元)",
icon:""
icon: ""
},
]
export const billingCategoryOptions = [{
value: "1",
label: "交通",
icon:''
icon: ''
},
{
value: "2",
label: "餐饮",
icon:''
icon: ''
},
{
value: "3",
label: "服饰",
icon:''
icon: ''
},
{
value: "4",
label: "购物",
icon:''
icon: ''
},
{
value: "5",
label: "娱乐",
icon:''
icon: ''
},
{
value: "6",
label: "教育",
icon:''
icon: ''
},
{
value: "7",
label: "材料",
icon:''
icon: ''
},
{
value: "8",
label: "设置",
icon:''
icon: ''
},
]
export const debitNotePages = [{
pageNumber: 0,
limit: 10,
loaded: false,
loadStatus: 'loadmore',
freshing: false,
},
{
pageNumber: 0,
limit: 10,
loaded: false,
loadStatus: 'loadmore',
freshing: false,
},
{
pageNumber: 0,
limit: 10,
loaded: false,
loadStatus: 'loadmore',
freshing: false,
},
]
export const debitNoteTabs = [{
title: '欠款',
name: ''
},
{
title: '正常',
name: ''
},
{
title: '全部',
name: ''
},
]
export const quotedPriceSteps = [{
id: 1,
title: "选服务",
},
{
id: 2,
title: "选品类",
},
]
\ No newline at end of file
{
id: 3,
title: "查报价",
},
]
import {
mineBaseUrl
} from "@/utils/config.js"
export const introOptions = [{
label: '无广告',
icon: mineBaseUrl + 'huiyuanwuguanggao@3x.png',
},
{
label: '维修记账',
icon: mineBaseUrl + 'huiyuanweixiujizhang@3x.png',
},
{
label: '日常记账',
icon: mineBaseUrl + 'huiyuanrichangjizhang@3x.png',
},
{
label: '收款码',
icon: mineBaseUrl + 'huiyuanshoukuanma@3x.png',
},
{
label: '发名片',
icon: mineBaseUrl + 'huiyuanfamingpian@3x.png',
},
{
label: '查报价',
icon: mineBaseUrl + 'huiyuanchabaojia@3x.png',
},
{
label: '查欠账',
icon: mineBaseUrl + 'huiyuanchaqianzhang@3x.png',
},
{
label: '帐统计',
icon: mineBaseUrl + 'huiyuanzhangtongji@3x.png',
},
{
label: '快搜索',
icon: mineBaseUrl + 'huiyuankuaisousuo@3x.png',
},
{
label: '导出',
icon: mineBaseUrl + 'huiyuandaochu@3x.png',
},
{
label: '自定义',
icon: mineBaseUrl + 'huiyuanzidingyi@3x.png',
},
{
label: '做计划',
icon: mineBaseUrl + 'zuojihua@3x.png',
},
]
import {
billBaseUrl
} from "@/utils/config.js"
export const cellInfoOptions = {
// 交通
'1': {
icon: billBaseUrl + 'jiaotong1@3x.png',
},
// 餐饮
'2': {
icon: billBaseUrl + 'canying1@3x.png',
},
// 服饰
'3': {
icon: billBaseUrl + 'fushi1@3x.png',
},
// 购物
'4': {
icon: billBaseUrl + 'gouwu1@3x.png',
},
// 娱乐
'5': {
icon: billBaseUrl + 'yule1@3x.png',
},
// 教育
'6': {
icon: billBaseUrl + 'jiaoyu1@3x.png',
},
// 材料
'7': {
icon: billBaseUrl + 'cailiao1@3x.png',
},
// 借出
'8': {
icon: billBaseUrl + 'jiechu1@3x.png',
}
}
export const menuIconOptions = {
// 主页
'HOMEPAGE': billBaseUrl + 'column-administer/zhuyeicon@3x.png',
// 动态
'DYNAMIC': billBaseUrl + "column-administer/dongtaiicon@3x.png",
// 默认
'BSAE': billBaseUrl + 'tiezipingdao@3x.png'
}
export const muckList =[
{
label:'交通',
type:'1',
guid:'1',
icon:cellInfoOptions['1'].icon,
show:false
},
{
label:'餐饮',
type:'2',
guid:'2',
icon:cellInfoOptions['2'].icon,
show:false
},
{
label:'服饰',
type:'3',
guid:'3',
icon:cellInfoOptions['3'].icon,
show:false
},
{
label:'购物',
type:'4',
guid:'4',
icon:cellInfoOptions['4'].icon,
show:false
},
{
label:'娱乐',
type:'5',
guid:'5',
icon:cellInfoOptions['5'].icon,
show:false
},
{
label:'教育',
type:'6',
guid:'6',
icon:cellInfoOptions['6'].icon,
show:false
},
{
label:'材料',
type:'7',
guid:'7',
icon:cellInfoOptions['7'].icon,
show:false
},
{
label:'借出',
type:'8',
guid:'8',
icon:cellInfoOptions['8'].icon,
show:false
},
]
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