parent
8b97456339
commit
8a86cc5335
@ -0,0 +1,13 @@ |
||||
import { |
||||
POST |
||||
} from './Request.js'; |
||||
let app = getApp(); |
||||
let base = app.globalData.url; |
||||
// 门店详情
|
||||
export const getQrCodeDetail = params => { |
||||
return POST('POST', `${base}/payQrCode/getQrCodeDetail`, params).then(res => res.data); |
||||
} |
||||
//银行卡识别
|
||||
export const recognizeBankCard = params => { |
||||
return POST('GET', `${base}/ocr/recognizeBankCard`, params).then(res => res.data); |
||||
} |
@ -0,0 +1,61 @@ |
||||
let app = getApp(); |
||||
|
||||
function request(method, url, data) { |
||||
return new Promise((resolve) => { |
||||
uni.request({ |
||||
method: method, |
||||
url: url, |
||||
data: data, |
||||
header: { |
||||
'Accept': "*/*", |
||||
'content-type': 'application/json;charset=utf-8', |
||||
'Authorization': app.globalData.token |
||||
}, //有的时候这里不一定是 token 还可能是 Authorization
|
||||
success(res) { |
||||
resolve(res) |
||||
if (res.statusCode === 401 || res.data.return_code == 102014 || res.data.return_code == |
||||
104001) { |
||||
app.globalData.userInfo = ''; |
||||
app.globalData.token = ''; |
||||
uni.setStorage({ |
||||
key: "user", |
||||
data: '' |
||||
}) |
||||
uni.setStorage({ |
||||
key: "token", |
||||
data: '' |
||||
}) |
||||
uni.showToast({ |
||||
title: '登录信息过期,请重新授权', |
||||
icon: 'none', |
||||
duration: 2000, |
||||
success() { |
||||
setTimeout(() => { |
||||
// uni.navigateTo({
|
||||
// url: '/pages/login/login'
|
||||
// })
|
||||
}, 2000); |
||||
} |
||||
}) |
||||
} |
||||
}, |
||||
fail(err) { |
||||
uni.showToast({ |
||||
title: '请求失败', |
||||
icon: 'none', |
||||
duration: 1500, |
||||
}) |
||||
} |
||||
}) |
||||
}) |
||||
} |
||||
|
||||
|
||||
function POST(method, url, data) { |
||||
return request(method, url, data) |
||||
} |
||||
|
||||
|
||||
module.exports = { |
||||
POST |
||||
} |
@ -0,0 +1,52 @@ |
||||
const isNullOrEmpty = function(val) { |
||||
if (val == null || val == "" || typeof(val) == undefined) { |
||||
return true; |
||||
} else { |
||||
return false; |
||||
} |
||||
} |
||||
|
||||
const timeFormat = (value, format) => { |
||||
let date = new Date(value); |
||||
let y = date.getFullYear(); |
||||
let m = date.getMonth() + 1; |
||||
let d = date.getDate(); |
||||
let h = date.getHours(); |
||||
let min = date.getMinutes(); |
||||
let s = date.getSeconds(); |
||||
let result = ""; |
||||
if (format == undefined) { |
||||
result = `${y}-${m < 10 ? "0" + m : m}-${d < 10 ? "0" + d : d} ${ |
||||
h < 10 ? "0" + h : h |
||||
}:${min < 10 ? "0" + min : min}:${s < 10 ? "0" + s : s}`;
|
||||
} |
||||
if (format == "yyyy-mm-dd") { |
||||
result = `${y}-${m < 10 ? "0" + m : m}-${d < 10 ? "0" + d : d} `; |
||||
} |
||||
if (format == "yyyy-mm") { |
||||
result = `${y}-${m < 10 ? "0" + m : m}`; |
||||
} |
||||
if (format == "mm-dd") { |
||||
result = ` ${mm < 10 ? "0" + mm : mm}:${ddmin < 10 ? "0" + dd : dd}`; |
||||
} |
||||
if (format == "hh:mm") { |
||||
result = ` ${h < 10 ? "0" + h : h}:${min < 10 ? "0" + min : min}`; |
||||
} |
||||
if (format == "yyyy") { |
||||
result = `${y}`; |
||||
} |
||||
return result; |
||||
}; |
||||
|
||||
|
||||
// {{date|isNullOrEmpty}}
|
||||
// {{date|timeFormat('yyyy-mm-dd')}}
|
||||
// {{date|timeFormat('yyyy-mm')}}
|
||||
// {{date|timeFormat('hh:mm')}}
|
||||
// {{date|timeFormat('yyyy')}}
|
||||
// {{date|timeFormat}}
|
||||
|
||||
export { |
||||
isNullOrEmpty, |
||||
timeFormat |
||||
} |
@ -0,0 +1,372 @@ |
||||
<template> |
||||
<view class="cj-slider" @mousemove="onSliMouseMove" @mouseup="onSliMouseUp"> |
||||
<view class="mouse-move" :style="{height: moveHeight + 'rpx'}"></view> |
||||
<view class="cj-slider__line" :class="[disabled ? 'cj-slider--disabled' : '']" :style="{ |
||||
backgroundColor: inactiveColor, |
||||
height: height + 'rpx' |
||||
}" style="border-radius: 8px;" ></view> |
||||
<view class="cj-slider__gap" :style="[ |
||||
barStyle, |
||||
{ |
||||
height: height + 'rpx', |
||||
backgroundColor: activeColor |
||||
} |
||||
]" style="border-radius: 8px;"> |
||||
<!-- <view class="cj-slider__button-wrap" @mousedown="onMouseDown(1, $event)" @mousemove="onMouseMove($event)" |
||||
@mouseleave="onMouseLeave(1)" @mouseup="onMouseUp(1)" @touchstart="onTouchStart(1, $event)" |
||||
@touchmove="onTouchMove(1, $event)" @touchend="onTouchEnd(1)" @touchcancel="onTouchEnd"> |
||||
<slot v-if="$slots.default || $slots.$default" /> |
||||
<view v-else class="cj-slider__button" :style="[blockStyle, { |
||||
height: blockWidth + 'rpx', |
||||
width: blockWidth + 'rpx', |
||||
backgroundColor: blockColor |
||||
}]"></view> |
||||
</view> --> |
||||
<view class="cj-slider__button-wrap2" @mousedown="onMouseDown(2, $event)" @mousemove="onMouseMove($event)" |
||||
@mouseleave="onMouseLeave(2)" @mouseup="onMouseUp(2)" @touchstart="onTouchStart(2, $event)" |
||||
@touchmove="onTouchMove(2, $event)" @touchend="onTouchEnd(2)" @touchcancel="onTouchEnd"> |
||||
<slot v-if="$slots.default || $slots.$default" /> |
||||
<view v-else class="cj-slider__button" :style="[blockStyle, { |
||||
height: blockWidth + 'rpx', |
||||
width: blockWidth + 'rpx', |
||||
backgroundColor: blockColor |
||||
}]"></view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
/** |
||||
* slider 滑块选择器 |
||||
* @property {Number | String} value 滑块默认值(默认[最小值,最大值]) |
||||
* @property {Number | String} min 最小值(默认0) |
||||
* @property {Number | String} max 最大值(默认100) |
||||
* @property {Number | String} step 步长(默认1) |
||||
* @property {Number | String} blockWidth 滑块宽度,高等于宽(30) |
||||
* @property {Number | String} height 滑块条高度,单位rpx(默认6) |
||||
* @property {String} inactiveColor 底部条背景颜色(默认#c0c4cc) |
||||
* @property {String} activeColor 底部选择部分的背景颜色(默认#2979ff) |
||||
* @property {String} blockColor 滑块颜色(默认#ffffff) |
||||
* @property {Object} blockStyle 给滑块自定义样式,对象形式 |
||||
* @property {Boolean} disabled 是否禁用滑块(默认为false) |
||||
* @property {Number | String} moveHeight 鼠标离开滑块仍可滑动的区域高度,单位rpx(默认100) |
||||
* @event {Function} start 滑动触发 |
||||
* @event {Function} moving 正在滑动中 |
||||
* @event {Function} end 滑动结束 |
||||
* @example <cj-slider v-model="value" /> |
||||
*/ |
||||
export default { |
||||
name: 'cj-slider', |
||||
props: { |
||||
// 当前进度百分比值 |
||||
value: { |
||||
type: Array, |
||||
default: [] |
||||
}, |
||||
// 是否禁用滑块 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false |
||||
}, |
||||
// 滑块宽度,高等于宽,单位rpx |
||||
blockWidth: { |
||||
type: [Number, String], |
||||
default: 30 |
||||
}, |
||||
// 最小值 |
||||
min: { |
||||
type: [Number, String], |
||||
default: 0 |
||||
}, |
||||
// 最大值 |
||||
max: { |
||||
type: [Number, String], |
||||
default: 100 |
||||
}, |
||||
// 步进值 |
||||
step: { |
||||
type: [Number, String], |
||||
default: 1 |
||||
}, |
||||
// 滑块条高度,单位rpx |
||||
height: { |
||||
type: [Number, String], |
||||
default: 20 |
||||
}, |
||||
// 进度条的激活部分颜色 |
||||
activeColor: { |
||||
type: String, |
||||
default: '#f3b43f' |
||||
}, |
||||
// 进度条的背景颜色 |
||||
inactiveColor: { |
||||
type: String, |
||||
default: '#f5f6f4' |
||||
}, |
||||
// 滑块的背景颜色 |
||||
blockColor: { |
||||
type: String, |
||||
default: '#ffffff' |
||||
}, |
||||
// 用户对滑块的自定义颜色 |
||||
blockStyle: { |
||||
type: Object, |
||||
default () { |
||||
return {}; |
||||
} |
||||
}, |
||||
// 鼠标可离开滑块后仍能滑动的范围高度 |
||||
moveHeight: { |
||||
type: [Number, String], |
||||
default: '60' |
||||
} |
||||
}, |
||||
data() { |
||||
return { |
||||
mouseLeave: false, // 鼠标移出了滑块 |
||||
mouseType: 1, // 1 左滑块 2 右滑块 |
||||
mouseDown: false, // 鼠标按下 |
||||
startX: 0, |
||||
status: 'end', |
||||
newValue: 0, |
||||
distanceX: 0, |
||||
startValue: 0, |
||||
barStyle: {}, |
||||
sliderRect: { |
||||
left: 0, |
||||
width: 0 |
||||
} |
||||
}; |
||||
}, |
||||
created() { |
||||
// 如果不是长度为2的数组,默认值为[最小值, 最大值] |
||||
if (Object.prototype.toString.call(this.value) == '[object Array]' && this.value.length === 2) { |
||||
this.updateValue(this.value[0], this.value[1], false); |
||||
} else { |
||||
this.$emit('input', Array(this.min, this.max)) |
||||
} |
||||
}, |
||||
mounted() { |
||||
// 获取滑块条的尺寸信息 |
||||
this.$uGetRect('.cj-slider').then(rect => { |
||||
this.sliderRect = rect; |
||||
}); |
||||
}, |
||||
methods: { |
||||
onTouchStart(type, event) { |
||||
if (this.disabled) return; |
||||
this.startX = 0; |
||||
// 触摸点集 |
||||
let touches = event.touches[0]; |
||||
// 触摸点到屏幕左边的距离 |
||||
this.startX = touches.clientX; |
||||
// 此处的this.value虽为props值,但是通过$emit('input')进行了修改 |
||||
this.startValue = type === 1 ? this.format(this.value[0]) : this.format(this.value[1]); |
||||
// 标示当前的状态为开始触摸滑动 |
||||
this.status = 'start'; |
||||
}, |
||||
onMouseDown(type, event) { |
||||
if (this.disabled) return; |
||||
this.mouseDown = true; |
||||
this.mouseType = type |
||||
this.startX = event.clientX || 0; |
||||
this.startValue = type === 1 ? this.format(this.value[0]) : this.format(this.value[1]); |
||||
this.status = 'start'; |
||||
}, |
||||
onTouchMove(type, event) { |
||||
if (this.disabled) return; |
||||
// 连续触摸的过程会一直触发本方法,但只有手指触发且移动了才被认为是拖动了,才发出事件 |
||||
// 触摸后第一次移动已经将status设置为moving状态,故触摸第二次移动不会触发本事件 |
||||
if (this.status == 'start') this.$emit('start'); |
||||
let touches = event.touches[0] |
||||
// 滑块的左边不一定跟屏幕左边接壤,所以需要减去最外层父元素的左边值 |
||||
this.distanceX = touches.clientX - this.sliderRect.left |
||||
// 获得移动距离对整个滑块的百分比值,此为带有多位小数的值,不能用此更新视图 |
||||
// 否则造成通信阻塞,需要每改变一个step值时修改一次视图 |
||||
this.newValue = (this.distanceX / this.sliderRect.width) * (this.max - this.min) + this.min |
||||
this.status = 'moving' |
||||
// 发出moving事件 |
||||
this.$emit('moving'); |
||||
if (type === 1) { |
||||
this.updateValue(this.newValue, this.format(this.value[1]), true); |
||||
} else { |
||||
this.updateValue(this.format(this.value[0]), this.newValue, true); |
||||
} |
||||
}, |
||||
onMouseMove(event) { |
||||
if (!this.mouseDown) return; |
||||
if (this.disabled) return; |
||||
if (this.status == 'start') this.$emit('start'); |
||||
// 滑块的左边不一定跟屏幕左边接壤,所以需要减去最外层父元素的左边值 |
||||
this.distanceX = event.clientX - this.sliderRect.left |
||||
// 获得移动距离对整个滑块的百分比值,此为带有多位小数的值,不能用此更新视图 |
||||
// 否则造成通信阻塞,需要每改变一个step值时修改一次视图 |
||||
this.newValue = (this.distanceX / this.sliderRect.width) * (this.max - this.min) + this.min |
||||
this.status = 'moving' |
||||
// 发出moving事件 |
||||
this.$emit('moving'); |
||||
if (this.mouseType === 1) { |
||||
this.updateValue(this.newValue, this.format(this.value[1]), true); |
||||
} else { |
||||
this.updateValue(this.format(this.value[0]), this.newValue, true); |
||||
} |
||||
}, |
||||
onMouseLeave(type) { |
||||
this.mouseLeave = true |
||||
}, |
||||
onTouchEnd(type) { |
||||
if (this.disabled) return; |
||||
if (this.status === 'moving') { |
||||
if (type === 1) { |
||||
this.updateValue(this.newValue, this.format(this.value[1]), true); |
||||
} else { |
||||
this.updateValue(this.format(this.value[0]), this.newValue, true); |
||||
} |
||||
this.$emit('end'); |
||||
} |
||||
this.status = 'end'; |
||||
}, |
||||
onMouseUp(type) { |
||||
this.mouseDown = false; |
||||
this.mouseLeave = false; |
||||
if (this.disabled) return; |
||||
if (this.status === 'moving') { |
||||
if (type === 1) { |
||||
this.updateValue(this.newValue, this.format(this.value[1]), true); |
||||
} else { |
||||
this.updateValue(this.format(this.value[0]), this.newValue, true); |
||||
} |
||||
this.$emit('end'); |
||||
} |
||||
this.status = 'end'; |
||||
}, |
||||
onSliMouseUp() { |
||||
// 鼠标在滑块范围内松开 |
||||
this.mouseDown = false; |
||||
this.mouseLeave = false; |
||||
}, |
||||
onSliMouseMove(e) { |
||||
// 监听整个滑动内的鼠标移动,因为PC端只能监听到小滑块内的移动,移动过快鼠标移出了小滑块则移动失败。 |
||||
if (!this.mouseDown) return; |
||||
if (!this.mouseLeave) return; |
||||
this.onMouseMove(e) |
||||
}, |
||||
updateValue(value, value2, drag) { |
||||
// 去掉小数部分,同时也是对step步进的处理 |
||||
const widthB1 = this.format(value) |
||||
const widthB2 = this.format(value2) |
||||
const widthB1B = Math.round((widthB1 - this.min) * 100 / (this.max - this.min)) |
||||
const widthB2B = Math.round((widthB2 - this.min) * 100 / (this.max - this.min)) |
||||
// 不允许滑动的值超过max最大值,百分比也不能超过100 |
||||
if (widthB1 > widthB2 || widthB2 > this.max || widthB2B > 100) return; |
||||
// 设置移动的百分比值 |
||||
let barStyle = { |
||||
width: widthB2B - widthB1B + '%', |
||||
left: widthB1B + '%', |
||||
}; |
||||
// 移动期间无需过渡动画 |
||||
if (drag == true) { |
||||
barStyle.transition = 'none'; |
||||
} else { |
||||
// 非移动期间,删掉对过渡为空的声明,让css中的声明起效 |
||||
delete barStyle.transition; |
||||
} |
||||
// 修改value值,这里使用change改变,使用input H5桌面端会卡死, |
||||
this.$emit('input', Array(widthB1, widthB2)); |
||||
this.barStyle = barStyle; |
||||
}, |
||||
format(value) { |
||||
// 将小数变成整数,为了减少对视图的更新,造成视图层与逻辑层的阻塞 |
||||
return Math.round(Math.max(this.min, Math.min(value, this.max)) / this.step) * this.step; |
||||
}, |
||||
onClick(event) { |
||||
if (this.disabled) return; |
||||
// 直接点击滑块的情况,计算方式与onTouchMove方法相同 |
||||
const widthB1 = this.value[0] |
||||
const widthB2 = this.value[1] |
||||
const value = this.format(((event.detail.x - this.sliderRect.left) / this.sliderRect.width) * (this.max - this |
||||
.min) + |
||||
this.min); |
||||
if (value < widthB1 || (value - widthB1) <= (widthB2 - value)) { |
||||
// 点击位置在左滑块的左边 || 点击位置在中间,且靠近左滑块 => 移动左滑块到该位置 |
||||
this.updateValue(value, widthB2, false) |
||||
} else { |
||||
// 点击位置在右滑块的右边 || 点击位置在中间,且靠近右滑块 => 移动右滑块到该位置 |
||||
this.updateValue(widthB1, value, false) |
||||
} |
||||
}, |
||||
$uGetRect(selector, all) { |
||||
// $uGetRect为uView自带的节点查询简化方法 |
||||
return new Promise(resolve => { |
||||
uni.createSelectorQuery(). |
||||
in(this)[all ? 'selectAll' : 'select'](selector) |
||||
.boundingClientRect(rect => { |
||||
if (all && Array.isArray(rect) && rect.length) { |
||||
resolve(rect) |
||||
} |
||||
if (!all && rect) { |
||||
resolve(rect) |
||||
} |
||||
}) |
||||
.exec() |
||||
}) |
||||
}, |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.cj-slider { |
||||
position: relative; |
||||
// background-color: #ebedf0; |
||||
|
||||
&__line { |
||||
position: absolute; |
||||
width: 100%; |
||||
background-color: #ebedf0; |
||||
} |
||||
|
||||
&__gap { |
||||
position: relative; |
||||
// 动画有bug,暂时取消 |
||||
// transition: width 0.2s; |
||||
background-color: #1989fa; |
||||
} |
||||
|
||||
&__button { |
||||
width: 24px; |
||||
height: 24px; |
||||
border-radius: 50%; |
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); |
||||
background-color: #fff; |
||||
cursor: pointer; |
||||
} |
||||
|
||||
&__button-wrap { |
||||
position: absolute; |
||||
top: 50%; |
||||
left: 0; |
||||
transform: translate3d(-50%, -50%, 0); |
||||
} |
||||
|
||||
&__button-wrap2 { |
||||
position: absolute; |
||||
top: 50%; |
||||
right: 0; |
||||
transform: translate3d(50%, -50%, 0); |
||||
} |
||||
} |
||||
|
||||
.cj-slider--disabled { |
||||
opacity: 0.5; |
||||
} |
||||
|
||||
.mouse-move { |
||||
position: fixed; |
||||
left: 0; |
||||
right: 0; |
||||
transform: translateY(-50%); |
||||
opacity: 0; |
||||
} |
||||
</style> |
@ -0,0 +1,16 @@ |
||||
@font-face {font-family: "iconfont"; |
||||
src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAKUAAsAAAAABlAAAAJJAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcApcdgE2AiQDCAsGAAQgBYRtBy8bmwXIrjBu4UkbIjvjLimCmu1EP9KHAd4jgmi/3+zde18toRbpnkUTzRKRUkgQE6RA9xL+tMuG6RYp8bFsgmbcecAB9mDhH67tDS3pQsIsmSbPL7chM1RKsFr5mNDBoUDPJItlaZG8fvhi/tciWcbRfJ7L6U2gA1l9oBz3orEmTRpAvTigAPfCKLISSiNtGLvAJdwn0DCHgMfN/kgLK1jLAvE0p7YWzoUVCparCZWavYV4U6qllxTNa/j5+JeKMEmZWQ1njw1PK39hF+TnFG59QoSADpfI2AEUxFVt+oQpGIc10pYlYF+1wRfTfZfYq12wv86qboEZqLgnpau61VyC21L06V8d9cuJmT795hWPJp8ayHj0wrZNx+/+1Nzdf8MBtu9H2p+tgB5tn/W1PEZvgeD5Xf/if61ZgE9foa3Qz0ttd57gtyh79hS62nKmQlXWDiczp2tqaGAK+we+sZbxPeRDzXiEt2o2RVazQhbsDkpNu6io2UPDNn24aagxRVHHlgkQehaSjg9kPYcs2IvSxENFL0w03ASd2bQW82is0d6iB+YE2ZWCOO5tNKodIN0xe51Vh/wE15t5DGQsUcy1UOB6jg19T1NjSyCsJQcFHkPGJJS1XKC7jaXtVpV4nNS9KGYl16KOrCHbFvIA4wRkLkkg/uitaOn9A4jaYWzrlq6a/ARa25hPDiRG9CBbBtGr616e6faolGGLAMGaxAEFZiGGkUCpn7WAXFsxaURSKeH2oNDXEFvfxL/uGDRY1hT2lKy8Y3KDmgYA') format('woff2') |
||||
} |
||||
|
||||
.iconfont { |
||||
font-family: "iconfont" !important; |
||||
font-size: 30px; |
||||
font-style: normal; |
||||
-webkit-font-smoothing: antialiased; |
||||
-moz-osx-font-smoothing: grayscale; |
||||
} |
||||
|
||||
.icon-close:before { |
||||
content: "\e622"; |
||||
} |
||||
|
@ -0,0 +1,420 @@ |
||||
<template> |
||||
<view v-if="isShow"> |
||||
<view |
||||
@tap.stop.prevent |
||||
@touchmove.stop.prevent |
||||
class="wyb-popup-box" |
||||
:style="{ |
||||
transitionDuration: duration + 'ms', |
||||
opacity: contentOpacity || (type === 'center' ? 0 : 1), |
||||
transform: contentTransform || autoTransform, |
||||
zIndex: zIndex, |
||||
borderTopRightRadius: type === 'center' || type === 'bottom' || type === 'left' ? radius + 'px' : 0, |
||||
borderTopLeftRadius: type === 'center' || type === 'bottom' || type === 'right' ? radius + 'px' : 0, |
||||
borderBottomRightRadius: type === 'center' || type === 'top' || type === 'left' ? radius + 'px' : 0, |
||||
borderBottomLeftRadius: type === 'center' || type === 'top' || type === 'right' ? radius + 'px' : 0, |
||||
width: autoWidth, |
||||
height: autoHeight, |
||||
minWidth: width + 'rpx', |
||||
minHeight: height + 'rpx', |
||||
top: sizeChange && type === 'center' ? winReTop : autoTop, |
||||
bottom: autoBottom, |
||||
left: autoLeft, |
||||
right: autoRight, |
||||
backgroundColor: bgColor}"> |
||||
<view |
||||
class="wyb-popup-close" |
||||
v-if="showCloseIcon" |
||||
:style="{ |
||||
width: closeIcon ? closeIconSize + 'rpx' : 'auto', |
||||
height: closeIcon ? closeIconSize + 'rpx' : 'auto', |
||||
top: closeIconPos === 'top-right' || closeIconPos === 'top-left' ? vertOffset + 'rpx' : 'auto', |
||||
bottom: closeIconPos === 'bottom-right' || closeIconPos === 'bottom-left' ? vertOffset + 'rpx' : 'auto', |
||||
left: closeIconPos === 'bottom-left' || closeIconPos === 'top-left' ? horiOffset + 'rpx' : 'auto', |
||||
right: closeIconPos === 'bottom-right' || closeIconPos === 'top-right' ? horiOffset + 'rpx' : 'auto'}"> |
||||
<image class="wyb-popup-custom-close" v-if="showCloseIcon&&closeIcon" :src="closeIcon" @tap="hide" :style="{ |
||||
width: closeIconSize + 'rpx', |
||||
height: closeIconSize + 'rpx'}" /> |
||||
<view v-if="showCloseIcon&&!closeIcon" class="iconfont icon-close" @tap="hide" /> |
||||
</view> |
||||
|
||||
<scroll-view |
||||
class="wyb-popup-container" |
||||
:style="{ |
||||
width: autoWidth, |
||||
height: autoHeight}" |
||||
:enable-flex="true" |
||||
:scroll-y="scrollY" |
||||
:scroll-x="scrollX"> |
||||
<view class="wyb-popup-slot"><slot></slot></view> |
||||
</scroll-view> |
||||
</view> |
||||
<view |
||||
class="wyb-popup-mask" |
||||
@tap.stop="close" |
||||
@touchmove.stop.prevent |
||||
:style="{ |
||||
opacity: maskOpacity, |
||||
transitionDuration: duration + 'ms', |
||||
backgroundColor: 'rgba(0, 0, 0, ' + maskAlpha + ')', |
||||
zIndex: zIndex - 1}" /> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
data() { |
||||
return { |
||||
w: uni.getSystemInfoSync().screenWidth, |
||||
h: uni.getSystemInfoSync().screenHeight, |
||||
isShow: false, |
||||
winReBottom: '', |
||||
winReTop: '', |
||||
sizeChange: false, |
||||
contentOpacity: null, |
||||
contentTransform: null, |
||||
maskOpacity: 0 |
||||
} |
||||
}, |
||||
computed: { |
||||
autoCenterTop() { |
||||
let statusBarHeight = uni.getSystemInfoSync().statusBarHeight |
||||
let windowHeight = uni.getSystemInfoSync().windowHeight |
||||
let popupHeight = this.rpxToPx(this.height) |
||||
let navHeight = 44 |
||||
let result = `${(windowHeight - popupHeight) / 2 - this.negativeTop}px` |
||||
return result |
||||
}, |
||||
autoTransform() { |
||||
let result = '' |
||||
switch(this.type) { |
||||
case 'center': |
||||
if (this.centerAnim === 'zoom-lessen') { |
||||
result = `scale(${this.zoomLessenMulti})` |
||||
} else if (this.centerAnim === 'slide-up') { |
||||
result = `translateY(${100 * this.slideMulti}%)` |
||||
} else if (this.centerAnim === 'slide-down') { |
||||
result = `translateY(${-100 * this.slideMulti}%)` |
||||
} else if (this.centerAnim === 'fade') { |
||||
result = 'auto' |
||||
} |
||||
break |
||||
case 'bottom': |
||||
result = 'translateY(100%)' |
||||
break |
||||
case 'top': |
||||
result = 'translateY(-100%)' |
||||
break |
||||
case 'left': |
||||
result = 'translateX(-100%)' |
||||
break |
||||
case 'right': |
||||
result = 'translateX(100%)' |
||||
break |
||||
} |
||||
return result |
||||
}, |
||||
autoWidth() { |
||||
if (this.type === 'center') { |
||||
return `${this.width}rpx` |
||||
} else { |
||||
if (this.mode === 'size-fixed') { |
||||
if (this.type === 'top' || this.type === 'bottom') { |
||||
return '100%' |
||||
} else { |
||||
return `${this.width}rpx` |
||||
} |
||||
} else { |
||||
if (this.type === 'top' || this.type === 'bottom') { |
||||
return '100%' |
||||
} else { |
||||
return 'auto' |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
autoHeight() { |
||||
if (this.type === 'center') { |
||||
return `${this.height}rpx` |
||||
} else { |
||||
if (this.mode === 'size-fixed') { |
||||
if (this.type === 'left' || this.type === 'right') { |
||||
return '100%' |
||||
} else { |
||||
return `${this.height}rpx` |
||||
} |
||||
} else { |
||||
if (this.type === 'left' || this.type === 'right') { |
||||
return '100%' |
||||
} else { |
||||
return '400px' |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
autoTop() { |
||||
if (this.type === 'center') { |
||||
return this.autoCenterTop |
||||
} else if (this.type === 'bottom') { |
||||
return 'auto' |
||||
} else { |
||||
return 0 |
||||
} |
||||
}, |
||||
autoBottom() { |
||||
if (this.type === 'center' || this.type === 'top') { |
||||
return 'auto' |
||||
} else { |
||||
return 0 |
||||
} |
||||
}, |
||||
autoLeft() { |
||||
if (this.type === 'center') { |
||||
return `${(this.w - this.rpxToPx(this.width)) / 2}px` |
||||
} else if (this.type === 'right') { |
||||
return 'auto' |
||||
} else { |
||||
return 0 |
||||
} |
||||
}, |
||||
autoRight() { |
||||
if (this.type === 'center' || this.type === 'left') { |
||||
return 'auto' |
||||
} else { |
||||
return 0 |
||||
} |
||||
} |
||||
}, |
||||
props: { |
||||
type: { |
||||
type: String, |
||||
default: 'bottom' |
||||
}, |
||||
mode: { |
||||
type: String, |
||||
default: 'size-auto' |
||||
}, |
||||
height: { |
||||
type: [String, Number], |
||||
default: 400 |
||||
}, |
||||
width: { |
||||
type: [String, Number], |
||||
default: 500 |
||||
}, |
||||
radius: { |
||||
type: [String, Number], |
||||
default: 0 |
||||
}, |
||||
zIndex: { |
||||
type: [String, Number], |
||||
default: 10076 |
||||
}, |
||||
maskClickClose: { |
||||
type: Boolean, |
||||
default: true |
||||
}, |
||||
maskAlpha: { |
||||
type: Number, |
||||
default: 0.5 |
||||
}, |
||||
duration: { |
||||
type: Number, |
||||
default: 400 |
||||
}, |
||||
showCloseIcon: { |
||||
type: Boolean, |
||||
default: false |
||||
}, |
||||
scrollY: { |
||||
type: Boolean, |
||||
default: false |
||||
}, |
||||
scrollX: { |
||||
type: Boolean, |
||||
default: false |
||||
}, |
||||
closeIconPos: { |
||||
type: String, |
||||
default: 'top-right' |
||||
}, |
||||
closeIcon: { |
||||
type: String, |
||||
default: '' |
||||
}, |
||||
closeIconSize: { |
||||
type: [String, Number], |
||||
default: '20' |
||||
}, |
||||
vertOffset: { |
||||
type: [String, Number], |
||||
default: '22' |
||||
}, |
||||
horiOffset: { |
||||
type: [String, Number], |
||||
default: '22' |
||||
}, |
||||
centerAnim: { |
||||
type: String, |
||||
default: 'zoom-lessen' |
||||
}, |
||||
bgColor: { |
||||
type: String, |
||||
default: '#ffffff' |
||||
}, |
||||
zoomLessenMulti: { |
||||
type: Number, |
||||
default: 1.15 |
||||
}, |
||||
slideMulti: { |
||||
type: Number, |
||||
default: 1 |
||||
}, |
||||
negativeTop: { |
||||
type: Number, |
||||
default: 0 |
||||
} |
||||
}, |
||||
mounted() { |
||||
// #ifdef H5 |
||||
let winHeight = uni.getSystemInfoSync().windowHeight |
||||
uni.onWindowResize(res => { |
||||
this.sizeChange = true |
||||
if (this.type === 'bottom') { |
||||
this.winReBottom = winHeight - res.size.windowHeight + 'px' |
||||
} else if (this.type === 'center') { |
||||
this.winReTop = ((res.size.windowHeight - this.rpxToPx(this.height)) / 2 - this.negativeTop) + 'px' |
||||
} |
||||
}) |
||||
// #endif |
||||
}, |
||||
methods: { |
||||
close() { |
||||
this.maskClickClose && this.hide() |
||||
}, |
||||
show() { |
||||
this.isShow = true |
||||
// #ifndef H5 |
||||
this.$nextTick(() => { |
||||
this.maskIn() |
||||
this.contentIn() |
||||
this.wait(this.duration + 1).then(() => { |
||||
this.$emit('show', { |
||||
pageScroll: false, |
||||
overflow: 'hidden' |
||||
}) |
||||
}) |
||||
}) |
||||
// #endif |
||||
// #ifdef H5 |
||||
this.wait(10).then(() => { |
||||
this.maskIn() |
||||
this.contentIn() |
||||
this.wait(this.duration + 1).then(() => { |
||||
this.$emit('show', { |
||||
pageScroll: false, |
||||
overflow: 'hidden' |
||||
}) |
||||
}) |
||||
}) |
||||
// #endif |
||||
}, |
||||
hide() { |
||||
this.contentOut() |
||||
this.maskOut() |
||||
this.wait(this.duration + 1).then(() => { |
||||
this.isShow = false |
||||
this.$emit('hide', { |
||||
pageScroll: true, |
||||
overflow: 'scroll' |
||||
}) |
||||
}) |
||||
}, |
||||
contentIn() { |
||||
switch (this.type) { |
||||
case 'center': |
||||
if (this.centerAnim === 'zoom-lessen') { |
||||
this.contentOpacity = 1 |
||||
this.contentTransform = 'scale(1)' |
||||
} else if (this.centerAnim === 'slide-up' || this.centerAnim === 'slide-down') { |
||||
this.contentOpacity = 1 |
||||
this.contentTransform = 'translateY(0)' |
||||
} else if (this.centerAnim === 'fade') { |
||||
this.contentOpacity = 1 |
||||
} |
||||
break |
||||
case 'bottom': |
||||
case 'top': |
||||
this.contentTransform = 'translateY(0)' |
||||
break |
||||
case 'left': |
||||
case 'right': |
||||
this.contentTransform = 'translateX(0)' |
||||
break |
||||
} |
||||
}, |
||||
contentOut() { |
||||
this.contentOpacity = null |
||||
this.contentTransform = null |
||||
}, |
||||
maskIn() { |
||||
this.maskOpacity = 1 |
||||
}, |
||||
maskOut() { |
||||
this.maskOpacity = 0 |
||||
}, |
||||
rpxToPx(rpx) { |
||||
return rpx / 750 * this.w |
||||
}, |
||||
wait(time) { |
||||
return new Promise(resolve => { |
||||
setTimeout(() => { |
||||
resolve() |
||||
}, time) |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style> |
||||
@import "./iconfont.css"; |
||||
.wyb-popup-box{ |
||||
position: fixed; |
||||
transition-timing-function: ease-out; |
||||
transition-property: opacity, transform; |
||||
} |
||||
|
||||
.wyb-popup-container { |
||||
position: relative; |
||||
box-sizing: border-box; |
||||
} |
||||
|
||||
.wyb-popup-slot { |
||||
width: 100%; |
||||
height: 100%; |
||||
} |
||||
|
||||
.wyb-popup-mask { |
||||
position: fixed; |
||||
top: 0; |
||||
left: 0; |
||||
bottom: 0; |
||||
right: 0; |
||||
transition-timing-function: ease; |
||||
transition-property: opacity, transform; |
||||
} |
||||
|
||||
.wyb-popup-close { |
||||
position: absolute; |
||||
fontSize: 40rpx; |
||||
color: #808080; |
||||
z-index: 20000; |
||||
} |
||||
|
||||
.wyb-popup-custom-close { |
||||
left: 0; |
||||
top: 0; |
||||
position: absolute; |
||||
} |
||||
</style> |
@ -0,0 +1,30 @@ |
||||
# jweixin-module |
||||
|
||||
微信JS-SDK |
||||
|
||||
## 安装 |
||||
|
||||
### NPM |
||||
|
||||
```shell |
||||
npm install jweixin-module --save |
||||
``` |
||||
|
||||
### UMD |
||||
|
||||
```http |
||||
https://unpkg.com/jweixin-module/out/index.js |
||||
``` |
||||
|
||||
## 使用 |
||||
|
||||
```js |
||||
var jweixin = require('jweixin-module') |
||||
jweixin.ready(function(){ |
||||
// TODO |
||||
}); |
||||
``` |
||||
|
||||
## 完整API |
||||
|
||||
>[微信JS-SDK说明文档](https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115) |
File diff suppressed because one or more lines are too long
@ -0,0 +1,54 @@ |
||||
{ |
||||
"_from": "jweixin-module", |
||||
"_id": "jweixin-module@1.6.0", |
||||
"_inBundle": false, |
||||
"_integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w==", |
||||
"_location": "/jweixin-module", |
||||
"_phantomChildren": {}, |
||||
"_requested": { |
||||
"type": "tag", |
||||
"registry": true, |
||||
"raw": "jweixin-module", |
||||
"name": "jweixin-module", |
||||
"escapedName": "jweixin-module", |
||||
"rawSpec": "", |
||||
"saveSpec": null, |
||||
"fetchSpec": "latest" |
||||
}, |
||||
"_requiredBy": [ |
||||
"#USER", |
||||
"/" |
||||
], |
||||
"_resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz", |
||||
"_shasum": "4a7ea614083e3c9c3f49e2fdc2bb882cfa58dfcd", |
||||
"_spec": "jweixin-module", |
||||
"_where": "D:\\Documents\\high-mini", |
||||
"author": { |
||||
"name": "Shengqiang Guo" |
||||
}, |
||||
"bugs": { |
||||
"url": "https://github.com/zhetengbiji/jweixin-module/issues" |
||||
}, |
||||
"bundleDependencies": false, |
||||
"deprecated": false, |
||||
"description": "微信JS-SDK", |
||||
"devDependencies": {}, |
||||
"homepage": "https://github.com/zhetengbiji/jweixin-module#readme", |
||||
"keywords": [ |
||||
"wxjssdk", |
||||
"weixin", |
||||
"jweixin", |
||||
"wechat", |
||||
"jssdk", |
||||
"wx" |
||||
], |
||||
"license": "ISC", |
||||
"main": "lib/index.js", |
||||
"name": "jweixin-module", |
||||
"repository": { |
||||
"type": "git", |
||||
"url": "git+https://github.com/zhetengbiji/jweixin-module.git" |
||||
}, |
||||
"scripts": {}, |
||||
"version": "1.6.0" |
||||
} |
@ -0,0 +1,21 @@ |
||||
MIT License |
||||
|
||||
Copyright (c) 2020 LancerComet |
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
of this software and associated documentation files (the "Software"), to deal |
||||
in the Software without restriction, including without limitation the rights |
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
copies of the Software, and to permit persons to whom the Software is |
||||
furnished to do so, subject to the following conditions: |
||||
|
||||
The above copyright notice and this permission notice shall be included in all |
||||
copies or substantial portions of the Software. |
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
SOFTWARE. |
@ -0,0 +1,153 @@ |
||||
# Vue-jsonp |
||||
|
||||
[![VueJsonp](https://github.com/LancerComet/vue-jsonp/workflows/Test/badge.svg)](https://github.com/LancerComet/vue-jsonp/actions) |
||||
|
||||
A tiny library for handling JSONP request. |
||||
|
||||
## Quick Start |
||||
|
||||
As Vue plugin: |
||||
|
||||
```ts |
||||
import { VueJsonp } from 'vue-jsonp' |
||||
|
||||
// Vue Plugin. |
||||
Vue.use(VueJsonp) |
||||
|
||||
// Now you can use this.$jsonp in Vue components. |
||||
const vm = new Vue() |
||||
vm.$jsonp('/some-jsonp-url', { |
||||
myCustomUrlParam: 'veryNice' |
||||
}) |
||||
``` |
||||
|
||||
Use function directly: |
||||
|
||||
```ts |
||||
import { jsonp } from 'vue-jsonp' |
||||
|
||||
jsonp('/some-jsonp-url', { |
||||
myCustomUrlParam: 'veryNice' |
||||
}) |
||||
``` |
||||
|
||||
## Send data and set query & function name |
||||
|
||||
### Send data |
||||
|
||||
```ts |
||||
// The request url will be "/some-jsonp-url?name=LancerComet&age=100&callback=jsonp_{RANDOM_STR}". |
||||
jsonp('/some-jsonp-url', { |
||||
name: 'LancerComet', |
||||
age: 100 |
||||
}) |
||||
``` |
||||
|
||||
### Custom query & function name |
||||
|
||||
The url uniform is `/url?{callbackQuery}={callbackName}&...`, the default is `/url?callback=jsonp_{RANDOM_STRING}&...`. |
||||
|
||||
And you can change it like this: |
||||
|
||||
```ts |
||||
// The request url will be "/some-jsonp-url?name=LancerComet&age=100&cb=jsonp_func". |
||||
jsonp('/some-jsonp-url', { |
||||
callbackQuery: 'cb', |
||||
callbackName: 'jsonp_func', |
||||
name: 'LancerComet', |
||||
age: 100 |
||||
}) |
||||
``` |
||||
|
||||
## Module exports |
||||
|
||||
- `VueJsonp: PluginObject<never>` |
||||
|
||||
- `jsonp<T>: (url: string, param?: IJsonpParam, timeout?: number) => Promise<T>` |
||||
|
||||
## API |
||||
|
||||
### IJsonpParam |
||||
|
||||
IJsonpParam is the type of param for jsonp function. |
||||
|
||||
```ts |
||||
/** |
||||
* JSONP parameter declaration. |
||||
*/ |
||||
interface IJsonpParam { |
||||
/** |
||||
* Callback query name. |
||||
* This param is used to define the query name of the callback function. |
||||
* |
||||
* @example |
||||
* // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice" |
||||
* jsonp('/some-url', { |
||||
* callbackQuery: 'myCallback', |
||||
* callbackName: 'jsonp_func', |
||||
* myCustomUrlParam: 'veryNice' |
||||
* }) |
||||
* |
||||
* @default callback |
||||
*/ |
||||
callbackQuery?: string |
||||
|
||||
/** |
||||
* Callback function name. |
||||
* This param is used to define the jsonp function name. |
||||
* |
||||
* @example |
||||
* // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice" |
||||
* jsonp('/some-url', { |
||||
* callbackQuery: 'myCallback', |
||||
* callbackName: 'jsonp_func', |
||||
* myCustomUrlParam: 'veryNice' |
||||
* }) |
||||
* |
||||
* @default jsonp_ + randomStr() |
||||
*/ |
||||
callbackName?: string |
||||
|
||||
/** |
||||
* Custom data. |
||||
*/ |
||||
[key: string]: any |
||||
} |
||||
``` |
||||
|
||||
## Example |
||||
|
||||
```ts |
||||
import Vue from 'vue' |
||||
import { VueJsonp } from 'vue-jsonp' |
||||
|
||||
Vue.use(VueJsonp) |
||||
|
||||
const vm = new Vue() |
||||
const { code, data, message } = await vm.$jsonp<{ |
||||
code: number, |
||||
message: string, |
||||
data: { |
||||
id: number, |
||||
nickname: string |
||||
} |
||||
}>('/my-awesome-url', { |
||||
name: 'MyName', age: 20 |
||||
}) |
||||
|
||||
assert(code === 0) |
||||
assert(message === 'ok') |
||||
assert(data.id === 1) |
||||
assert(data.nickname === 'John Smith') |
||||
``` |
||||
|
||||
```ts |
||||
import { jsonp } from 'vue-jsonp' |
||||
|
||||
const result = await jsonp<string>('/my-awesome-url') |
||||
assert(result === 'such a jsonp') |
||||
``` |
||||
|
||||
## License |
||||
|
||||
MIT |
@ -0,0 +1,73 @@ |
||||
/** |
||||
* Vue Jsonp. |
||||
* # Carry Your World # |
||||
* |
||||
* @author: LancerComet |
||||
* @license: MIT |
||||
*/ |
||||
import { PluginObject } from 'vue/types/plugin'; |
||||
declare module 'vue/types/vue' { |
||||
interface Vue { |
||||
$jsonp: typeof jsonp; |
||||
} |
||||
} |
||||
/** |
||||
* Vue JSONP. |
||||
*/ |
||||
declare const VueJsonp: PluginObject<never>; |
||||
/** |
||||
* JSONP function. |
||||
* |
||||
* @param { string } url Target URL address. |
||||
* @param { IJsonpParam } param Querying params object. |
||||
* @param { number } timeout Timeout setting (ms). |
||||
* |
||||
* @example |
||||
* jsonp('/url', { |
||||
* callbackQuery: '' |
||||
* callbackName: '', |
||||
* name: 'LancerComet', |
||||
* age: 26 |
||||
* }, 1000) |
||||
*/ |
||||
declare function jsonp<T = any>(url: string, param?: IJsonpParam, timeout?: number): Promise<T>; |
||||
export { VueJsonp, jsonp }; |
||||
/** |
||||
* JSONP parameter declaration. |
||||
*/ |
||||
interface IJsonpParam { |
||||
/** |
||||
* Callback query name. |
||||
* This param is used to define the query name of the callback function. |
||||
* |
||||
* @example |
||||
* // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice"
|
||||
* jsonp('/some-url', { |
||||
* callbackQuery: 'myCallback', |
||||
* callbackName: 'jsonp_func', |
||||
* myCustomUrlParam: 'veryNice' |
||||
* }) |
||||
* |
||||
* @default callback |
||||
*/ |
||||
callbackQuery?: string; |
||||
/** |
||||
* Callback function name. |
||||
* This param is used to define the jsonp function name. |
||||
* |
||||
* @example |
||||
* // The request url will be "/some-url?myCallback=jsonp_func&myCustomUrlParam=veryNice"
|
||||
* jsonp('/some-url', { |
||||
* callbackQuery: 'myCallback', |
||||
* callbackName: 'jsonp_func', |
||||
* myCustomUrlParam: 'veryNice' |
||||
* }) |
||||
* |
||||
* @default jsonp_ + randomStr() |
||||
*/ |
||||
callbackName?: string; |
||||
/** |
||||
* Custom data. |
||||
*/ |
||||
[key: string]: any; |
||||
} |
@ -0,0 +1,8 @@ |
||||
function e(t,n){t=t.replace(/=/g,"");var o=[];switch(n.constructor){case String:case Number:case Boolean:o.push(encodeURIComponent(t)+"="+encodeURIComponent(n));break;case Array:n.forEach((function(n){o=o.concat(e(t+"[]=",n))}));break;case Object:Object.keys(n).forEach((function(r){var a=n[r];o=o.concat(e(t+"["+r+"]",a))}))}return o}function t(e){var n=[];return e.forEach((function(e){"string"==typeof e?n.push(e):n=n.concat(t(e))})),n} |
||||
/** |
||||
* Vue Jsonp. |
||||
* # Carry Your World # |
||||
* |
||||
* @author: LancerComet |
||||
* @license: MIT |
||||
*/var n={install:function(e){e.prototype.$jsonp=o}};function o(n,o,r){if(void 0===o&&(o={}),"string"!=typeof n)throw new Error('[Vue-jsonp] Type of param "url" is not string.');if("object"!=typeof o||!o)throw new Error("[Vue-jsonp] Invalid params, should be an object.");return r="number"==typeof r?r:5e3,new Promise((function(a,c){var u="string"==typeof o.callbackQuery?o.callbackQuery:"callback",i="string"==typeof o.callbackName?o.callbackName:"jsonp_"+(Math.floor(1e5*Math.random())*Date.now()).toString(16);o[u]=i,delete o.callbackQuery,delete o.callbackName;var s=[];Object.keys(o).forEach((function(t){s=s.concat(e(t,o[t]))}));var l=t(s).join("&"),f=function(){p(),clearTimeout(m),c({status:400,statusText:"Bad Request"})},p=function(){b.removeEventListener("error",f)},d=function(){document.body.removeChild(b),delete window[i]},m=null;r>-1&&(m=setTimeout((function(){p(),d(),c({statusText:"Request Timeout",status:408})}),r)),window[i]=function(e){clearTimeout(m),p(),d(),a(e)};var b=document.createElement("script");b.addEventListener("error",f),b.src=n+(/\?/.test(n)?"&":"?")+l,document.body.appendChild(b)}))}export{n as VueJsonp,o as jsonp}; |
@ -0,0 +1,8 @@ |
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).VueJsonp={})}(this,(function(e){"use strict";function t(e,o){e=e.replace(/=/g,"");var n=[];switch(o.constructor){case String:case Number:case Boolean:n.push(encodeURIComponent(e)+"="+encodeURIComponent(o));break;case Array:o.forEach((function(o){n=n.concat(t(e+"[]=",o))}));break;case Object:Object.keys(o).forEach((function(r){var c=o[r];n=n.concat(t(e+"["+r+"]",c))}))}return n}function o(e){var t=[];return e.forEach((function(e){"string"==typeof e?t.push(e):t=t.concat(o(e))})),t} |
||||
/** |
||||
* Vue Jsonp. |
||||
* # Carry Your World # |
||||
* |
||||
* @author: LancerComet |
||||
* @license: MIT |
||||
*/var n={install:function(e){e.prototype.$jsonp=r}};function r(e,n,r){if(void 0===n&&(n={}),"string"!=typeof e)throw new Error('[Vue-jsonp] Type of param "url" is not string.');if("object"!=typeof n||!n)throw new Error("[Vue-jsonp] Invalid params, should be an object.");return r="number"==typeof r?r:5e3,new Promise((function(c,a){var i="string"==typeof n.callbackQuery?n.callbackQuery:"callback",s="string"==typeof n.callbackName?n.callbackName:"jsonp_"+(Math.floor(1e5*Math.random())*Date.now()).toString(16);n[i]=s,delete n.callbackQuery,delete n.callbackName;var u=[];Object.keys(n).forEach((function(e){u=u.concat(t(e,n[e]))}));var f=o(u).join("&"),l=function(){p(),clearTimeout(b),a({status:400,statusText:"Bad Request"})},p=function(){m.removeEventListener("error",l)},d=function(){document.body.removeChild(m),delete window[s]},b=null;r>-1&&(b=setTimeout((function(){p(),d(),a({statusText:"Request Timeout",status:408})}),r)),window[s]=function(e){clearTimeout(b),p(),d(),c(e)};var m=document.createElement("script");m.addEventListener("error",l),m.src=e+(/\?/.test(e)?"&":"?")+f,document.body.appendChild(m)}))}e.VueJsonp=n,e.jsonp=r,Object.defineProperty(e,"__esModule",{value:!0})})); |
@ -0,0 +1,20 @@ |
||||
/** |
||||
* Generate random string. |
||||
* |
||||
* @return { string } |
||||
*/ |
||||
declare function randomStr(): string; |
||||
/** |
||||
* Format params into querying string. |
||||
* |
||||
* @return {string[]} |
||||
*/ |
||||
declare function formatParams(queryKey: string, value: any): string[]; |
||||
/** |
||||
* Flat querys. |
||||
* |
||||
* @param {string[] | (string[])[]} array |
||||
* @returns |
||||
*/ |
||||
declare function flatten(array: string[] | (string[])[]): string[]; |
||||
export { formatParams, flatten, randomStr }; |
@ -0,0 +1,80 @@ |
||||
{ |
||||
"_from": "vue-jsonp", |
||||
"_id": "vue-jsonp@2.0.0", |
||||
"_inBundle": false, |
||||
"_integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA==", |
||||
"_location": "/vue-jsonp", |
||||
"_phantomChildren": {}, |
||||
"_requested": { |
||||
"type": "tag", |
||||
"registry": true, |
||||
"raw": "vue-jsonp", |
||||
"name": "vue-jsonp", |
||||
"escapedName": "vue-jsonp", |
||||
"rawSpec": "", |
||||
"saveSpec": null, |
||||
"fetchSpec": "latest" |
||||
}, |
||||
"_requiredBy": [ |
||||
"#USER", |
||||
"/" |
||||
], |
||||
"_resolved": "https://registry.npmjs.org/vue-jsonp/-/vue-jsonp-2.0.0.tgz", |
||||
"_shasum": "3bfac56bb72941a2511c11e1a123b876f03427f7", |
||||
"_spec": "vue-jsonp", |
||||
"_where": "C:\\Users\\Administrator\\Documents\\high-mini", |
||||
"author": { |
||||
"name": "LancerComet", |
||||
"email": "chw644@hotmail.com" |
||||
}, |
||||
"bugs": { |
||||
"url": "https://github.com/LancerComet/vue-jsonp/issues" |
||||
}, |
||||
"bundleDependencies": false, |
||||
"deprecated": false, |
||||
"description": "A tiny library for handling JSONP request.", |
||||
"devDependencies": { |
||||
"@types/expect-puppeteer": "^4.4.3", |
||||
"@types/jest": "^26.0.14", |
||||
"@types/jest-environment-puppeteer": "^4.4.0", |
||||
"@types/puppeteer": "^3.0.2", |
||||
"jest": "^26.4.2", |
||||
"jest-puppeteer": "^4.4.0", |
||||
"puppeteer": "^5.3.1", |
||||
"rollup": "^2.28.2", |
||||
"rollup-plugin-cleanup": "^3.2.1", |
||||
"rollup-plugin-delete": "^2.0.0", |
||||
"rollup-plugin-terser": "^7.0.2", |
||||
"rollup-plugin-typescript2": "^0.27.3", |
||||
"ts-jest": "^26.4.1", |
||||
"tslint": "^6.1.3", |
||||
"typescript": "^4.0.3", |
||||
"vue": "^2.6.12" |
||||
}, |
||||
"files": [ |
||||
"dist/", |
||||
"index.d.ts", |
||||
"README.md" |
||||
], |
||||
"homepage": "https://github.com/LancerComet/vue-jsonp#readme", |
||||
"keywords": [ |
||||
"Vue", |
||||
"JSONP" |
||||
], |
||||
"license": "MIT", |
||||
"main": "./dist/index.js", |
||||
"module": "./dist/index.esm.js", |
||||
"name": "vue-jsonp", |
||||
"repository": { |
||||
"type": "git", |
||||
"url": "git+https://github.com/LancerComet/vue-jsonp.git" |
||||
}, |
||||
"scripts": { |
||||
"build": "rollup -c", |
||||
"prepublish": "npm run test", |
||||
"pretest": "npm run build", |
||||
"preversion": "npm run test", |
||||
"test": "jest" |
||||
}, |
||||
"version": "2.0.0" |
||||
} |
@ -0,0 +1,16 @@ |
||||
{ |
||||
"requires": true, |
||||
"lockfileVersion": 1, |
||||
"dependencies": { |
||||
"jweixin-module": { |
||||
"version": "1.6.0", |
||||
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz", |
||||
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w==" |
||||
}, |
||||
"vue-jsonp": { |
||||
"version": "2.0.0", |
||||
"resolved": "https://registry.npmjs.org/vue-jsonp/-/vue-jsonp-2.0.0.tgz", |
||||
"integrity": "sha512-Mzd9GNeuKP5hHFDWZNMWOsCuMILSkA6jo2l4A02wheFz3qqBzH7aSEFTey1BRCZCLizlaf1EqJ5YUtF392KspA==" |
||||
} |
||||
} |
||||
} |
@ -1,140 +1,464 @@ |
||||
<template> |
||||
<view class="content"> |
||||
<!-- 密码输入框 --> |
||||
<div> |
||||
<text>是否展示密码:</text> |
||||
<switch :checked="showPsw" @change="showPswChange" /> |
||||
</div> |
||||
<!-- #ifndef H5 --> |
||||
<password-input @tap="openKeyBoard('number')" :length="length" :gutter="20" :list="numberList" :showPsw="showPsw"></password-input> |
||||
<!-- #endif --> |
||||
|
||||
<!-- H5 openKeyBoard 点击事件失效,需要在外侧包裹一层view外衣 --> |
||||
<!-- #ifdef H5 --> |
||||
<view @tap="openKeyBoard('number')"> |
||||
<password-input :length="length" :gutter="40" :list="numberList" :showPsw="showPsw"></password-input> |
||||
</view> |
||||
<!-- #endif --> |
||||
|
||||
<view class="idcard" @tap="openKeyBoard('idCard')"> |
||||
idCard:{{passStr}} |
||||
</view> |
||||
|
||||
<view class="idcard" @tap="openKeyBoard('plateNumber')"> |
||||
plateNumber:{{plateNumberStr}} |
||||
</view> |
||||
<!-- 键盘 --> |
||||
|
||||
<!-- 数字键盘 --> |
||||
<keyboard-package ref="number" @onInput="onInput" @onDelete="onDelete" @onConfirm="onConfirm" :disableDot="true"/> |
||||
|
||||
<!-- 身份证键盘 --> |
||||
<keyboard-package ref="idCard" type="idCard" @onInput="onInput" @onDelete="onDelete" @onConfirm="onConfirm"/> |
||||
|
||||
<!-- 车牌键盘 --> |
||||
<keyboard-package ref="plateNumber" type="plateNumber" @onInput="onInput" @onDelete="onDelete" @onConfirm="onConfirm"/> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import keyboardPackage from "../../components/keyboard-package/keyboard-package.vue" |
||||
import passwordInput from "../../components/password-input/password-input.vue" |
||||
export default { |
||||
components: { |
||||
keyboardPackage, |
||||
passwordInput, |
||||
}, |
||||
data() { |
||||
return { |
||||
numberList:[], |
||||
idCardList:[], |
||||
plateNumberList:[], |
||||
length:4, |
||||
type:'number', |
||||
showPsw: false, |
||||
} |
||||
}, |
||||
mounted() { |
||||
this.openKeyBoard('plateNumber'); |
||||
}, |
||||
methods: { |
||||
openKeyBoard(key) { |
||||
this.type=key; |
||||
this.$refs[key].open(); |
||||
}, |
||||
onInput(val){ |
||||
switch(this.type){ |
||||
case 'number': |
||||
if(this.numberList.length>=this.length){ |
||||
this.close(); |
||||
return; |
||||
}; |
||||
if(this.numberList.length===this.length-1){ |
||||
this.numberList.push(val); |
||||
this.close(); |
||||
return; |
||||
}; |
||||
this.numberList.push(val); |
||||
break; |
||||
case 'idCard': |
||||
this.idCardList.push(val); |
||||
break; |
||||
case 'plateNumber': |
||||
this.plateNumberList.push(val); |
||||
break; |
||||
} |
||||
|
||||
}, |
||||
onDelete(){ |
||||
switch (this.type){ |
||||
case 'number': |
||||
this.numberList.pop(); |
||||
break; |
||||
case 'idCard': |
||||
this.idCardList.pop(); |
||||
break; |
||||
default: |
||||
this.plateNumberList.pop(); |
||||
break; |
||||
} |
||||
}, |
||||
onConfirm(){ |
||||
uni.showToast({ |
||||
title:'完成输入!', |
||||
duration:2000, |
||||
icon:'none' |
||||
}) |
||||
}, |
||||
close(){ |
||||
this.$refs[this.type].close(); |
||||
}, |
||||
showPswChange(e){ |
||||
this.showPsw = e.detail.value; |
||||
}, |
||||
}, |
||||
computed:{ |
||||
passStr(){ |
||||
let str=''; |
||||
this.idCardList.forEach(item=>{ |
||||
str+=item.toString(); |
||||
}) |
||||
return str; |
||||
}, |
||||
plateNumberStr(){ |
||||
let str=''; |
||||
this.plateNumberList.forEach(item=>{ |
||||
str+=item.toString(); |
||||
}) |
||||
return str; |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss"> |
||||
.idcard{ |
||||
padding: 40rpx; |
||||
background-color: #f5f5f5; |
||||
margin: 20rpx 0; |
||||
} |
||||
<template> |
||||
<view> |
||||
<view class="width100 height220 backcor008"> |
||||
<view class="paddtop40 font24 fcorfff fotct fontlet">商户名称</view> |
||||
<view class="paddtop25 font14 fcorfff fotct fontlet">-请输入金额-</view> |
||||
<view class="idcard fcorfff font40 fontlet"> |
||||
{{plateNumberStr==''?'¥0.00':'¥'+plateNumberStr}} |
||||
</view> |
||||
<view class="width40w mart10 line1"></view> |
||||
</view> |
||||
<!-- 积分抵扣 --> |
||||
<view class="fotct mart20 fcor666 font14 fontspec" style="margin-left: 30%;">抵扣金额 : ¥{{priceValue[1] / 10 /10}} |
||||
</view> |
||||
<view class="width90 alicntend"> |
||||
<view class="width30 font16 fcor666 alijusstart"> |
||||
<image mode="widthFix" src="../../static/index1.png" class="iconw25 marglerig"></image> 积分抵扣 |
||||
</view> |
||||
<view class="cj-slider"> |
||||
<view class="flleft fotct font14 fcor666" style="width: 15%;">0</view> |
||||
<cj-slider style="width: 60%;margin: 0px;" :disabled="cjstu" v-model="priceValue" :min="0" :max="0" |
||||
:step="100" :blockWidth="40" @start="blockStart" @moving="blockMoving" @end="blockEnd" /> |
||||
<view class="flright fotrt font14 fcor666" style="width: 25%;">0</view> |
||||
</view> |
||||
</view> |
||||
<view class="width90 line1 mart10 marb5"></view> |
||||
|
||||
<!-- 优惠券抵扣 --> |
||||
<view class="height50 width100 backcorfff" @click="showPopup()"> |
||||
<view class="width50 flleft fcor666 font16 alijusstart" style="padding-left: 5%;"> |
||||
<image mode="widthFix" src="../../static/index2.png" class="iconw25 marglerig"></image> 优惠券抵扣 |
||||
</view> |
||||
<!-- <view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" |
||||
style="align-items: center;" v-if="deductionPrice == 0"> |
||||
未使用 |
||||
<image style="width: 40rpx;height: 40rpx;" src="../../static/img/jt.png"></image> |
||||
</view> --> |
||||
<view class="width40 flright fotrt paddtright15 font15 fcor666 alijun" style="align-items: center;"> |
||||
暂无优惠券 |
||||
<image style="width: 40rpx;height: 40rpx;" src="../../static/jt.png"></image> |
||||
</view> |
||||
</view> |
||||
<view class="width90 line1 mart5 marb5"></view> |
||||
<!-- //待支付 --> |
||||
<view class="height50 width100 backcorfff"> |
||||
<view class="width50 flleft fcor666 font16 alijusstart" style="padding-left: 5%;"> |
||||
<!-- <image mode="widthFix" src="../../static/index2.png" class="iconw25 marglerig"></image> --> |
||||
待支付 |
||||
</view> |
||||
<!-- <view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" |
||||
style="align-items: center;" v-if="deductionPrice == 0"> |
||||
未使用 |
||||
<image style="width: 40rpx;height: 40rpx;" src="../../static/img/jt.png"></image> |
||||
</view> --> |
||||
<view class="width40 flright fotrt paddtright15 font20 fcoreb5 alijusend" style="align-items: center;"> |
||||
¥ {{payPrice}} |
||||
</view> |
||||
</view> |
||||
<view class="width90 line1 mart5 marb5"></view> |
||||
<!-- //键盘 --> |
||||
<view class="numkeyboard"> |
||||
<view class="num-area"> |
||||
<view class="row" v-for="(item,index) in numKeybordList" :key="index"> |
||||
<view :class="['item',ite===0?'z':'',(disableDot && ite==='.')?'disabled':'']" |
||||
v-for="(ite,idx) in item" hover-class="active" :hover-start-time="0" :hover-stay-time="5" |
||||
:key="idx" @tap="input(ite)">{{ite}}</view> |
||||
</view> |
||||
</view> |
||||
<view class="btn-area"> |
||||
<view :class="['item','del']" hover-class="active" :hover-start-time="0" :hover-stay-time="5" |
||||
@tap="deleteVal"> |
||||
删除 |
||||
</view> |
||||
<view class="confirem item" hover-class="active" :hover-start-time="0" :hover-stay-time="5" |
||||
@tap="confirm"> |
||||
完成 |
||||
</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<!-- 优惠券弹窗 scrollY="true" --> |
||||
<wybPopup ref="popup" type="bottom" width="500" radius="6" :showCloseIcon="true"> |
||||
<view class="fotct font18 fontwig6 fcor333 mart10 height30">优惠券选择</view> |
||||
<view v-if="discountList == ''" class="mart60 fotct font14 fcor666"> |
||||
<image mode="widthFix" style="width: 50vw;" src="../../static/noorder.png"></image> |
||||
</view> |
||||
<view class="width90 height40 tccs mart10 couts" v-for="(items, index) in discountList" :key="items" |
||||
@click="radioChanges(items)"> |
||||
<view class="margle20"> |
||||
<view class="yhprice"> |
||||
<radio :checked="items.id == memDiscountId.indexOf(items.id)" color="#0083f5" /> |
||||
</view> |
||||
<view class="font16 fontwig6 fcor333 text1">{{item.name}}</view> |
||||
</view> |
||||
</view> |
||||
</wybPopup> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import passwordInput from "../../components/password-input/password-input.vue"; |
||||
import cjSlider from '../../components/cj-slider/cj-slider.vue'; |
||||
import wybPopup from '../../components/wyb-popup/wyb-popup.vue'; |
||||
import { |
||||
getQrCodeDetail |
||||
} from '../../Utils/Api.js'; |
||||
// #ifdef H5 |
||||
var jweixin = require('jweixin-module'); |
||||
// var unipay = require('uni-pay'); |
||||
// #endif |
||||
export default { |
||||
components: { |
||||
passwordInput, |
||||
cjSlider, |
||||
wybPopup |
||||
}, |
||||
data() { |
||||
return { |
||||
plateNumberList: [], |
||||
length: 4, |
||||
inputPrice: '', //输入金额 |
||||
discountPrice: 0, //优惠金额 |
||||
payPrice: 0, //支付金额 |
||||
reNum: 0, // 是否重复 |
||||
priceValue: [0, 0], // 可以指定默认值 |
||||
discountList: [], //优惠券数据 |
||||
memDiscountId: [], //选择中的值 |
||||
numKeybordList: [ |
||||
[1, 2, 3], |
||||
[4, 5, 6], |
||||
[7, 8, 9], |
||||
[0, '.'] |
||||
], //键盘数据 |
||||
disableDot: { //数字键盘是否禁止点击.仅type为number生效 |
||||
type: Boolean, |
||||
default: false |
||||
}, |
||||
cjstu: true, //禁止拖动 |
||||
suNo: '' //sn号 |
||||
} |
||||
}, |
||||
mounted() { |
||||
// this.openKeyBoard('number'); |
||||
}, |
||||
onLoad: function() { |
||||
var arr1 = window.location.href; |
||||
var arr2 = arr1.split('='); |
||||
var arr3 = arr2[1].split('#/'); |
||||
if (arr3[0]) { |
||||
this.suNo = arr3[0]; |
||||
this.getQrCodeDetail(); |
||||
} |
||||
}, |
||||
computed: { |
||||
//获取输入金额值 |
||||
plateNumberStr() { |
||||
let str = ''; |
||||
this.plateNumberList.forEach(item => { |
||||
str += item.toString(); |
||||
}) |
||||
this.payPrice = str - (this.priceValue[1] / 10 / 10); |
||||
if (this.payPrice > 0) { |
||||
this.cjstu = false; |
||||
} else { |
||||
this.payPrice = 0; |
||||
this.priceValue = [0, 0]; |
||||
} |
||||
return str; |
||||
}, |
||||
|
||||
}, |
||||
methods: { |
||||
//查询门店详情 |
||||
getQrCodeDetail() { |
||||
let datas = { |
||||
serialNumber: this.suNo |
||||
} |
||||
getQrCodeDetail(datas).then(res => { |
||||
if (res.return_code == '000000') {} |
||||
}) |
||||
}, |
||||
//显示弹出 |
||||
showPopup() { |
||||
this.$refs.popup.show(); |
||||
}, |
||||
//选择优惠券 |
||||
radioChanges(item) { |
||||
|
||||
}, |
||||
//提交支付 |
||||
confirm() { |
||||
let lenth = this.plateNumberList.length - 1; |
||||
// if (!this.payPrice) { |
||||
// uni.showToast({ |
||||
// title: '请输入支付金额', |
||||
// duration: 2000, |
||||
// icon: 'none' |
||||
// }) |
||||
// return; |
||||
// } |
||||
if (this.plateNumberList[lenth] == '.') { |
||||
uni.showToast({ |
||||
title: '请输入正确的支付金额', |
||||
duration: 2000, |
||||
icon: 'none' |
||||
}) |
||||
this.payPrice = 0; |
||||
this.plateNumberList = []; |
||||
return; |
||||
} |
||||
var n = String(this.payPrice) |
||||
var t = n.charAt(0) |
||||
// 必须保证第一个为数字而不是. |
||||
n = n.replace(/^\./g, '') |
||||
// 保证只有出现一个.而没有多个. |
||||
n = n.replace(/\.{2,}/g, '.') |
||||
if (n == 0) { |
||||
uni.showToast({ |
||||
title: '请输入正确的支付金额', |
||||
duration: 2000, |
||||
icon: 'none' |
||||
}) |
||||
this.payPrice = 0; |
||||
this.plateNumberList = []; |
||||
return; |
||||
} |
||||
var userAgent = navigator.userAgent.toLowerCase(); |
||||
if (userAgent.match(/Alipay/i) == "alipay") { |
||||
alert("支付宝浏览器"); |
||||
} else if (userAgent.match(/MicroMessenger/i) == "micromessenger") { |
||||
alert("微信浏览器"); |
||||
} |
||||
}, |
||||
//删除金额 |
||||
deleteVal() { |
||||
this.plateNumberList.pop(); |
||||
}, |
||||
blockStart() { |
||||
if (this.payPrice > 0) { |
||||
this.cjstu = false; |
||||
} else { |
||||
this.payPrice = 0; |
||||
this.priceValue = [0, 0]; |
||||
uni.showToast({ |
||||
title: '请输入金额再使用积分抵扣', |
||||
duration: 2000, |
||||
icon: 'none' |
||||
}) |
||||
this.cjstu = true; |
||||
} |
||||
}, |
||||
blockMoving() { |
||||
// console.log('正在滑动中') |
||||
}, |
||||
blockEnd() { |
||||
// console.log('滑动结束') |
||||
}, |
||||
//输入金额 |
||||
input(val) { |
||||
if (this.plateNumberList[0] == '.') { |
||||
uni.showToast({ |
||||
title: '请输入正确的金额', |
||||
duration: 2000, |
||||
icon: 'none' |
||||
}) |
||||
return; |
||||
} |
||||
|
||||
if (this.plateNumberList.length >= this.length) { |
||||
uni.showToast({ |
||||
title: '输入金额不能超过最大值', |
||||
duration: 2000, |
||||
icon: 'none' |
||||
}) |
||||
return; |
||||
} |
||||
this.plateNumberList.push(val); |
||||
}, |
||||
//微笑支付 |
||||
payRequest: function(self) { |
||||
uni.showLoading({ |
||||
title: '支付中...' |
||||
}) |
||||
jweixin.config({ |
||||
// debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 |
||||
appId: self.return_data.appId, // 必填,公众号的唯一标识 |
||||
timestamp: self.return_data.timeStamp, // 必填,生成签名的时间戳 |
||||
nonceStr: self.return_data.nonceStr, // 必填,生成签名的随机串 |
||||
signature: self.return_data.sign, // 必填,签名,见附录1 |
||||
jsApiList: ['chooseWXPay'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2 |
||||
}); |
||||
uni.hideLoading(); |
||||
jweixin.ready(function() { |
||||
jweixin.checkJsApi({ |
||||
jsApiList: ['chooseWXPay'], // 需要检测的JS接口列表,所有JS接口列表见附录2, |
||||
success: function(res) {}, |
||||
fail: function(res) {} |
||||
}); |
||||
jweixin.chooseWXPay({ |
||||
appId: self.return_data.appId, |
||||
timestamp: self.return_data |
||||
.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 |
||||
nonceStr: self.return_data.nonceStr, // 支付签名随机串,不长于 32 位 |
||||
package: self.return_data |
||||
.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***) |
||||
signType: 'MD5', // 签名方式,默认为'SHA1',使用新版支付需传入'MD5' |
||||
paySign: self.return_data.sign, // 支付签名 |
||||
success: function(res) { |
||||
// 支付成功后的回调函数 |
||||
uni.showToast({ |
||||
title: '支付成功' |
||||
}) |
||||
}, |
||||
cancel: function(r) {}, |
||||
fail: function(res) {} |
||||
}); |
||||
}); |
||||
|
||||
jweixin.error(function(res) { |
||||
uni.showToast({ |
||||
icon: 'none', |
||||
title: '支付失败了', |
||||
duration: 4000 |
||||
}); |
||||
}); |
||||
}, |
||||
//支付宝支付 |
||||
unialiPay() { |
||||
// const unipayIns = this.unipay.initAlipay({ |
||||
// appId: 'your appId', |
||||
// mchId: 'your mchId', |
||||
// privateKey: 'your privateKey', |
||||
// // 如果不使用证书(普通公钥模式)需要alipayPublicKey |
||||
// alipayPublicKey: 'you alipayPublicKey', // 使用支付时需传递此值做返回结果验签 |
||||
// // 如果使用证书需要传alipayRootCertPath、appCertPath、alipayPublicCertPath |
||||
// alipayRootCertPath: path.join(__dirname,'../fixtures/alipayRootCert.crt'), |
||||
// appCertPath: path.join(__dirname,'../fixtures/appCertPublicKey.crt'), |
||||
// alipayPublicCertPath: path.join(__dirname,'../fixtures/alipayCertPublicKey_RSA2.crt'), |
||||
// }) |
||||
} |
||||
}, |
||||
|
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss"> |
||||
.idcard { |
||||
padding-top: 40rpx; |
||||
text-align: center; |
||||
} |
||||
|
||||
.cj-slider { |
||||
width: 70%; |
||||
align-items: center; |
||||
display: flex; |
||||
} |
||||
|
||||
.yhprice { |
||||
width: 20%; |
||||
height: 25px; |
||||
text-align: right; |
||||
float: right; |
||||
} |
||||
|
||||
.couts { |
||||
border: 1px solid #f6f6f6; |
||||
} |
||||
|
||||
.btn { |
||||
color: #FFFFFF; |
||||
background-color: #0083f5; |
||||
width: 84%; |
||||
margin-left: 8%; |
||||
margin-top: 200rpx; |
||||
margin-bottom: 50rpx; |
||||
height: 90rpx; |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
border-radius: 10rpx; |
||||
font-size: 40rpx; |
||||
letter-spacing: 5px; |
||||
} |
||||
|
||||
.numkeyboard { |
||||
height: 432rpx; |
||||
display: flex; |
||||
background-color: #ebedf0; |
||||
position: absolute; |
||||
width: 100%; |
||||
bottom: 0px; |
||||
|
||||
.btn-area { |
||||
width: 180rpx; |
||||
height: 100%; |
||||
display: flex; |
||||
flex-direction: column; |
||||
|
||||
.item { |
||||
width: 100%; |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
flex-grow: 1; |
||||
} |
||||
|
||||
.del { |
||||
background-color: #ebedf0; |
||||
color: #333; |
||||
|
||||
&.active { |
||||
background-color: #f1f3f5; |
||||
} |
||||
} |
||||
|
||||
.confirem { |
||||
background-color: #1989fa; |
||||
color: #FFFFFF; |
||||
|
||||
&.active { |
||||
background-color: #0570db; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.num-area { |
||||
flex-grow: 1; |
||||
display: flex; |
||||
flex-wrap: wrap; |
||||
|
||||
.row { |
||||
width: 100%; |
||||
height: 25%; |
||||
display: flex; |
||||
margin-top: 1px; |
||||
|
||||
.item { |
||||
flex-grow: 1; |
||||
height: 100%; |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
background-color: #FFFFFF; |
||||
border-right: 1px solid #ebedf0; |
||||
width: 33.33%; |
||||
|
||||
&.active { |
||||
background-color: #ebedf0; |
||||
} |
||||
|
||||
&.z { |
||||
flex-grow: 2; |
||||
width: 66.66%; |
||||
} |
||||
|
||||
&.disabled { |
||||
background: #FFFFFF; |
||||
color: #B9B9B9; |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
||||
} |
||||
</style> |
||||
|
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 824 B |
After Width: | Height: | Size: 37 KiB |
@ -0,0 +1,43 @@ |
||||
## 简介 |
||||
|
||||
`uni-pay`为`uniCloud`开发者提供了简单、易用、统一的支付能力封装。让开发者无需研究支付宝、微信等支付平台的后端开发、无需为它们编写不同代码,拿来即用,屏蔽差异。 |
||||
|
||||
`uni-app`前端已经封装的全端支付 api `uni.requestPayment`,现在服务端也封装好了`uni-pay for uniCloud`,从此开发者可以极快的完成前后一体的支付业务。 |
||||
|
||||
目前已封装 App 端(微信支付和支付宝支付)、微信小程序、支付宝小程序的支付能力。 |
||||
|
||||
`uni-pay`是开源 sdk,可放心使用。本插件还包含示例工程,配置自己在微信和支付宝申请的相关配置后即可运行。 |
||||
|
||||
对于`uni-pay`还未封装的支付能力,欢迎大家在开源项目上提交pr,共同完善这个开源项目。 |
||||
|
||||
详细Api请参考:[uni-pay](https://uniapp.dcloud.io/uniCloud/unipay) |
||||
|
||||
## 示例项目使用说明 |
||||
|
||||
1. 首先在`cloudfunctions/common/uni-config-center/uni-pay/config.js`内填写各个平台所需的配置。 |
||||
|
||||
**示例项目已集成[uni-id](https://ext.dcloud.net.cn/plugin?id=2116),需在`cloudfunctions/common/uni-config-center/uni-id/config.json`内填写支付宝小程序、微信小程序登录相关信息** |
||||
|
||||
如需开通对应平台的支付能力请参考以下文档 |
||||
|
||||
- [支付宝小程序开通支付](https://opendocs.alipay.com/mini/introduce/pay) |
||||
- [App接入支付宝支付](https://opendocs.alipay.com/open/204/105297/) |
||||
- [接入微信支付](https://pay.weixin.qq.com/index.php/apply/applyment_home/guide_normal#none) |
||||
|
||||
**注意** |
||||
|
||||
- 商户认证不支持个人类型的账号。 |
||||
- 微信的App支付、小程序支付、H5支付是不同的体系。微信小程序支付在 微信商户平台 申请支付时,选择公众号支付; |
||||
|
||||
2. 在`cloudfunctions`目录右键选择服务空间 |
||||
3. 上传公用模块,公用模块用法请参考:[云函数公用模块](https://uniapp.dcloud.io/uniCloud/cf-common) |
||||
4. 上传所有云函数 |
||||
5. 在`cloudfunctions/db_init.json`上右键初始化数据库 |
||||
6. 在项目内的`manifest.json`内配置App端支付参数或者微信小程序appid,[manifest.json里配置App支付相关参数](https://uniapp.dcloud.io/api/plugins/payment?id=manifestjson%e9%87%8c%e9%85%8d%e7%bd%ae%e7%9b%b8%e5%85%b3%e5%8f%82%e6%95%b0) |
||||
7. 如果是运行到App端请使用云打包制作自定义基座来测试,其他平台直接运行即可 |
||||
|
||||
## 支付流程说明 |
||||
|
||||
下面的流程图很好的展示了示例项目的支付流程 |
||||
|
||||
![](https://img.cdn.aliyun.dcloud.net.cn/uni-app/uniCloud/uni-pay-flow-chart.jpg) |
@ -0,0 +1,37 @@ |
||||
## 1.0.28(2022-01-10) |
||||
- 支付宝下单接口返回详细错误信息 |
||||
- 优化发行包体积 |
||||
## 1.0.27(2021-11-02) |
||||
- 新增 苹果应用内购买凭证校验接口 [详情](https://uniapp.dcloud.io/uniCloud/unipay?id=verifyreceipt) |
||||
## 1.0.26(2021-11-01) |
||||
- 新增 苹果内购凭证校验接口 |
||||
## 1.0.25(2021-10-18) |
||||
- 修复微信子商户id参数错误的Bug |
||||
## 1.0.24(2021-09-23) |
||||
- 新增 微信外部浏览器支付(H5支付) |
||||
## 1.0.23(2021-09-22) |
||||
- 修复微信支付部分值被转化为NaN导致无法直接入库的错误 |
||||
## 1.0.22(2021-08-26) |
||||
- 修复 支付宝用户未支付状态下查询订单状态(orderQuery)报错的Bug |
||||
## 1.0.21(2021-08-19) |
||||
- 修复1.0.18版本引出的微信退款通知验签失败的bug |
||||
## 1.0.20(2021-08-04) |
||||
- 修复1.0.19版本引出的微信支付签名错误问题 |
||||
## 1.0.19(2021-08-03) |
||||
- 修复timeStamp大小写导致的微信公众号支付失败 |
||||
## 1.0.18(2021-07-16) |
||||
- 通知类型不匹配时返回校验未通过 |
||||
## 1.0.17(2021-07-16) |
||||
- 新增 支付宝退款通知回调 [详情](https://uniapp.dcloud.io/uniCloud/unipay?id=verify-refund-notify) |
||||
- 新增 判断通知类型接口 [详情](https://uniapp.dcloud.io/uniCloud/unipay?id=check-notify-type) |
||||
## 1.0.16(2021-07-14) |
||||
- 修复APP微信支付报签名错误的Bug |
||||
## 1.0.15(2021-07-13) |
||||
- 修复1.0.14版本引出的微信支付使用pfx时报错的Bug |
||||
## 1.0.14(2021-07-12) |
||||
- 支持使用微信子商户号,[详情](https://uniapp.dcloud.net.cn/uniCloud/unipay?id=init),感谢[studytime](https://gitee.com/studytime) |
||||
- 修复支付宝支付传入encode后的passbackParams参数导致验签无法通过的Bug |
||||
## 1.0.13(2021-03-25) |
||||
- 修复 微信退款通知解析报错的Bug |
||||
## 1.0.12(2021-02-03) |
||||
- 调整为uni_modules目录规范 |
@ -0,0 +1,83 @@ |
||||
{ |
||||
"id": "uni-pay", |
||||
"displayName": "uni-pay", |
||||
"version": "1.0.28", |
||||
"description": "更简单的支付接口调用方式、拉齐不同支付平台", |
||||
"keywords": [ |
||||
"unipay", |
||||
"uni-pay", |
||||
"微信支付", |
||||
"支付宝" |
||||
], |
||||
"repository": "https://gitee.com/dcloud/uniPay.git", |
||||
"engines": { |
||||
"HBuilderX": "^3.1.0" |
||||
}, |
||||
"dcloudext": { |
||||
"category": [ |
||||
"uniCloud", |
||||
"云函数模板" |
||||
], |
||||
"sale": { |
||||
"regular": { |
||||
"price": "0.00" |
||||
}, |
||||
"sourcecode": { |
||||
"price": "0.00" |
||||
} |
||||
}, |
||||
"contact": { |
||||
"qq": "" |
||||
}, |
||||
"declaration": { |
||||
"ads": "无", |
||||
"data": "无", |
||||
"permissions": "无" |
||||
}, |
||||
"npmurl": "" |
||||
}, |
||||
"uni_modules": { |
||||
"dependencies": [], |
||||
"encrypt": [], |
||||
"platforms": { |
||||
"cloud": { |
||||
"tcb": "y", |
||||
"aliyun": "y" |
||||
}, |
||||
"client": { |
||||
"App": { |
||||
"app-vue": "u", |
||||
"app-nvue": "u" |
||||
}, |
||||
"H5-mobile": { |
||||
"Safari": "u", |
||||
"Android Browser": "u", |
||||
"微信浏览器(Android)": "u", |
||||
"QQ浏览器(Android)": "u" |
||||
}, |
||||
"H5-pc": { |
||||
"Chrome": "u", |
||||
"IE": "u", |
||||
"Edge": "u", |
||||
"Firefox": "u", |
||||
"Safari": "u" |
||||
}, |
||||
"小程序": { |
||||
"微信": "u", |
||||
"阿里": "u", |
||||
"百度": "u", |
||||
"字节跳动": "u", |
||||
"QQ": "u" |
||||
}, |
||||
"快应用": { |
||||
"华为": "u", |
||||
"联盟": "u" |
||||
}, |
||||
"Vue": { |
||||
"vue2": "y", |
||||
"vue3": "u" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,201 @@ |
||||
Apache License |
||||
Version 2.0, January 2004 |
||||
http://www.apache.org/licenses/ |
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
||||
|
||||
1. Definitions. |
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, |
||||
and distribution as defined by Sections 1 through 9 of this document. |
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by |
||||
the copyright owner that is granting the License. |
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all |
||||
other entities that control, are controlled by, or are under common |
||||
control with that entity. For the purposes of this definition, |
||||
"control" means (i) the power, direct or indirect, to cause the |
||||
direction or management of such entity, whether by contract or |
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the |
||||
outstanding shares, or (iii) beneficial ownership of such entity. |
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity |
||||
exercising permissions granted by this License. |
||||
|
||||
"Source" form shall mean the preferred form for making modifications, |
||||
including but not limited to software source code, documentation |
||||
source, and configuration files. |
||||
|
||||
"Object" form shall mean any form resulting from mechanical |
||||
transformation or translation of a Source form, including but |
||||
not limited to compiled object code, generated documentation, |
||||
and conversions to other media types. |
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or |
||||
Object form, made available under the License, as indicated by a |
||||
copyright notice that is included in or attached to the work |
||||
(an example is provided in the Appendix below). |
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object |
||||
form, that is based on (or derived from) the Work and for which the |
||||
editorial revisions, annotations, elaborations, or other modifications |
||||
represent, as a whole, an original work of authorship. For the purposes |
||||
of this License, Derivative Works shall not include works that remain |
||||
separable from, or merely link (or bind by name) to the interfaces of, |
||||
the Work and Derivative Works thereof. |
||||
|
||||
"Contribution" shall mean any work of authorship, including |
||||
the original version of the Work and any modifications or additions |
||||
to that Work or Derivative Works thereof, that is intentionally |
||||
submitted to Licensor for inclusion in the Work by the copyright owner |
||||
or by an individual or Legal Entity authorized to submit on behalf of |
||||
the copyright owner. For the purposes of this definition, "submitted" |
||||
means any form of electronic, verbal, or written communication sent |
||||
to the Licensor or its representatives, including but not limited to |
||||
communication on electronic mailing lists, source code control systems, |
||||
and issue tracking systems that are managed by, or on behalf of, the |
||||
Licensor for the purpose of discussing and improving the Work, but |
||||
excluding communication that is conspicuously marked or otherwise |
||||
designated in writing by the copyright owner as "Not a Contribution." |
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity |
||||
on behalf of whom a Contribution has been received by Licensor and |
||||
subsequently incorporated within the Work. |
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of |
||||
this License, each Contributor hereby grants to You a perpetual, |
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
||||
copyright license to reproduce, prepare Derivative Works of, |
||||
publicly display, publicly perform, sublicense, and distribute the |
||||
Work and such Derivative Works in Source or Object form. |
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of |
||||
this License, each Contributor hereby grants to You a perpetual, |
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
||||
(except as stated in this section) patent license to make, have made, |
||||
use, offer to sell, sell, import, and otherwise transfer the Work, |
||||
where such license applies only to those patent claims licensable |
||||
by such Contributor that are necessarily infringed by their |
||||
Contribution(s) alone or by combination of their Contribution(s) |
||||
with the Work to which such Contribution(s) was submitted. If You |
||||
institute patent litigation against any entity (including a |
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work |
||||
or a Contribution incorporated within the Work constitutes direct |
||||
or contributory patent infringement, then any patent licenses |
||||
granted to You under this License for that Work shall terminate |
||||
as of the date such litigation is filed. |
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the |
||||
Work or Derivative Works thereof in any medium, with or without |
||||
modifications, and in Source or Object form, provided that You |
||||
meet the following conditions: |
||||
|
||||
(a) You must give any other recipients of the Work or |
||||
Derivative Works a copy of this License; and |
||||
|
||||
(b) You must cause any modified files to carry prominent notices |
||||
stating that You changed the files; and |
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works |
||||
that You distribute, all copyright, patent, trademark, and |
||||
attribution notices from the Source form of the Work, |
||||
excluding those notices that do not pertain to any part of |
||||
the Derivative Works; and |
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its |
||||
distribution, then any Derivative Works that You distribute must |
||||
include a readable copy of the attribution notices contained |
||||
within such NOTICE file, excluding those notices that do not |
||||
pertain to any part of the Derivative Works, in at least one |
||||
of the following places: within a NOTICE text file distributed |
||||
as part of the Derivative Works; within the Source form or |
||||
documentation, if provided along with the Derivative Works; or, |
||||
within a display generated by the Derivative Works, if and |
||||
wherever such third-party notices normally appear. The contents |
||||
of the NOTICE file are for informational purposes only and |
||||
do not modify the License. You may add Your own attribution |
||||
notices within Derivative Works that You distribute, alongside |
||||
or as an addendum to the NOTICE text from the Work, provided |
||||
that such additional attribution notices cannot be construed |
||||
as modifying the License. |
||||
|
||||
You may add Your own copyright statement to Your modifications and |
||||
may provide additional or different license terms and conditions |
||||
for use, reproduction, or distribution of Your modifications, or |
||||
for any such Derivative Works as a whole, provided Your use, |
||||
reproduction, and distribution of the Work otherwise complies with |
||||
the conditions stated in this License. |
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, |
||||
any Contribution intentionally submitted for inclusion in the Work |
||||
by You to the Licensor shall be under the terms and conditions of |
||||
this License, without any additional terms or conditions. |
||||
Notwithstanding the above, nothing herein shall supersede or modify |
||||
the terms of any separate license agreement you may have executed |
||||
with Licensor regarding such Contributions. |
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade |
||||
names, trademarks, service marks, or product names of the Licensor, |
||||
except as required for reasonable and customary use in describing the |
||||
origin of the Work and reproducing the content of the NOTICE file. |
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or |
||||
agreed to in writing, Licensor provides the Work (and each |
||||
Contributor provides its Contributions) on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
||||
implied, including, without limitation, any warranties or conditions |
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
||||
PARTICULAR PURPOSE. You are solely responsible for determining the |
||||
appropriateness of using or redistributing the Work and assume any |
||||
risks associated with Your exercise of permissions under this License. |
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, |
||||
whether in tort (including negligence), contract, or otherwise, |
||||
unless required by applicable law (such as deliberate and grossly |
||||
negligent acts) or agreed to in writing, shall any Contributor be |
||||
liable to You for damages, including any direct, indirect, special, |
||||
incidental, or consequential damages of any character arising as a |
||||
result of this License or out of the use or inability to use the |
||||
Work (including but not limited to damages for loss of goodwill, |
||||
work stoppage, computer failure or malfunction, or any and all |
||||
other commercial damages or losses), even if such Contributor |
||||
has been advised of the possibility of such damages. |
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing |
||||
the Work or Derivative Works thereof, You may choose to offer, |
||||
and charge a fee for, acceptance of support, warranty, indemnity, |
||||
or other liability obligations and/or rights consistent with this |
||||
License. However, in accepting such obligations, You may act only |
||||
on Your own behalf and on Your sole responsibility, not on behalf |
||||
of any other Contributor, and only if You agree to indemnify, |
||||
defend, and hold each Contributor harmless for any liability |
||||
incurred by, or claims asserted against, such Contributor by reason |
||||
of your accepting any such warranty or additional liability. |
||||
|
||||
END OF TERMS AND CONDITIONS |
||||
|
||||
APPENDIX: How to apply the Apache License to your work. |
||||
|
||||
To apply the Apache License to your work, attach the following |
||||
boilerplate notice, with the fields enclosed by brackets "[]" |
||||
replaced with your own identifying information. (Don't include |
||||
the brackets!) The text should be enclosed in the appropriate |
||||
comment syntax for the file format. We also recommend that a |
||||
file or class name and description of purpose be included on the |
||||
same "printed page" as the copyright notice for easier |
||||
identification within third-party archives. |
||||
|
||||
Copyright [yyyy] [name of copyright owner] |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
File diff suppressed because one or more lines are too long
@ -0,0 +1,16 @@ |
||||
{ |
||||
"name": "uni-pay", |
||||
"version": "1.0.28", |
||||
"description": "unipay for uniCloud", |
||||
"main": "index.js", |
||||
"homepage": "https://uniapp.dcloud.io/uniCloud/unipay", |
||||
"repository": { |
||||
"type": "git", |
||||
"url": "git+https://gitee.com/dcloud/uniPay.git" |
||||
}, |
||||
"scripts": {}, |
||||
"keywords": [], |
||||
"author": "", |
||||
"license": "Apache-2.0", |
||||
"devDependencies": {} |
||||
} |
Loading…
Reference in new issue