1.支付台页面完成

2.搭建基础框架
dev
杨杰 3 years ago
parent 8b97456339
commit 8a86cc5335
  1. 12
      App.vue
  2. 13
      Utils/Api.js
  3. 61
      Utils/Request.js
  4. 52
      Utils/js/date.js
  5. 372
      components/cj-slider/cj-slider.vue
  6. 16
      components/wyb-popup/iconfont.css
  7. 420
      components/wyb-popup/wyb-popup.vue
  8. 12
      manifest.json
  9. 30
      node_modules/jweixin-module/README.md
  10. 1
      node_modules/jweixin-module/lib/index.js
  11. 54
      node_modules/jweixin-module/package.json
  12. 21
      node_modules/vue-jsonp/LICENSE
  13. 153
      node_modules/vue-jsonp/README.md
  14. 73
      node_modules/vue-jsonp/dist/index.d.ts
  15. 8
      node_modules/vue-jsonp/dist/index.esm.js
  16. 8
      node_modules/vue-jsonp/dist/index.js
  17. 20
      node_modules/vue-jsonp/dist/utils/index.d.ts
  18. 80
      node_modules/vue-jsonp/package.json
  19. 16
      package-lock.json
  20. 8
      pages.json
  21. 530
      pages/index/index.vue
  22. BIN
      static/index1.png
  23. BIN
      static/index2.png
  24. BIN
      static/jt.png
  25. BIN
      static/noorder.png
  26. 705
      uni.scss
  27. 43
      uni_modules/uni-pay/README.md
  28. 37
      uni_modules/uni-pay/changelog.md
  29. 83
      uni_modules/uni-pay/package.json
  30. 201
      uni_modules/uni-pay/uniCloud/cloudfunctions/common/uni-pay/LICENSE.md
  31. 8
      uni_modules/uni-pay/uniCloud/cloudfunctions/common/uni-pay/index.js
  32. 16
      uni_modules/uni-pay/uniCloud/cloudfunctions/common/uni-pay/package.json

@ -1,5 +1,17 @@
<script>
export default {
globalData: {
//
// url: 'https://pay.bxb.cn/crest',
// imgUrl: 'https://xuan-pay-private.obs.cn-southwest-2.myhuaweicloud.com',
//
url: 'https://paycs.dctpay.com/crest',
imgUrl: 'https://xuan-pay-private.obs.cn-southwest-2.myhuaweicloud.com',
userInfo: "",
openId: '',
code: '',
token: ''
},
onLaunch: function() {
console.log('App Launch')
},

@ -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.valueprops$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;
//
// statusmoving
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))
// max100
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) {
// $uGetRectuView
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>

@ -68,5 +68,15 @@
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "2"
"vueVersion" : "2",
"h5" : {
"router" : {
"mode" : "hash",
"base" : "/scanPay"
},
"title" : "支付",
"devServer" : {
"https" : false
}
}
}

@ -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"
}

21
node_modules/vue-jsonp/LICENSE generated vendored

@ -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.

153
node_modules/vue-jsonp/README.md generated vendored

@ -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"
}

16
package-lock.json generated

@ -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=="
}
}
}

@ -3,7 +3,13 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "uni-app"
"navigationBarTextStyle": "white",
"navigationBarTitleText": "首页",
"onReachBottomDistance": 50,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
}
}
],

@ -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>
<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>
<!-- #endif -->
<view class="idcard" @tap="openKeyBoard('idCard')">
idCard:{{passStr}}
<!-- 积分抵扣 -->
<view class="fotct mart20 fcor666 font14 fontspec" style="margin-left: 30%;">抵扣金额 : ¥{{priceValue[1] / 10 /10}}
</view>
<view class="idcard" @tap="openKeyBoard('plateNumber')">
plateNumber:{{plateNumberStr}}
<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>
<!-- 键盘 -->
<!-- 数字键盘 -->
<keyboard-package ref="number" @onInput="onInput" @onDelete="onDelete" @onConfirm="onConfirm" :disableDot="true"/>
<view class="width90 line1 mart10 marb5"></view>
<!-- 身份证键盘 -->
<keyboard-package ref="idCard" type="idCard" @onInput="onInput" @onDelete="onDelete" @onConfirm="onConfirm"/>
<!-- 优惠券抵扣 -->
<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>
<!-- 车牌键盘 -->
<keyboard-package ref="plateNumber" type="plateNumber" @onInput="onInput" @onDelete="onDelete" @onConfirm="onConfirm"/>
<!-- 优惠券弹窗 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 keyboardPackage from "../../components/keyboard-package/keyboard-package.vue"
import passwordInput from "../../components/password-input/password-input.vue"
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: {
keyboardPackage,
passwordInput,
cjSlider,
wybPopup
},
data() {
return {
numberList:[],
idCardList:[],
plateNumberList:[],
length:4,
type:'number',
showPsw: false,
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: { //.typenumber
type: Boolean,
default: false
},
cjstu: true, //
suNo: '' //sn
}
},
mounted() {
this.openKeyBoard('plateNumber');
// this.openKeyBoard('number');
},
methods: {
openKeyBoard(key) {
this.type=key;
this.$refs[key].open();
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;
},
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;
},
methods: {
//
getQrCodeDetail() {
let datas = {
serialNumber: this.suNo
}
getQrCodeDetail(datas).then(res => {
if (res.return_code == '000000') {}
})
},
//
showPopup() {
this.$refs.popup.show();
},
//
radioChanges(item) {
},
onDelete(){
switch (this.type){
case 'number':
this.numberList.pop();
break;
case 'idCard':
this.idCardList.pop();
break;
default:
this.plateNumberList.pop();
break;
//
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("微信浏览器");
}
},
onConfirm(){
uni.showToast({
title:'完成输入!',
duration:2000,
icon:'none'
})
//
deleteVal() {
this.plateNumberList.pop();
},
close(){
this.$refs[this.type].close();
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;
}
},
showPswChange(e){
this.showPsw = e.detail.value;
blockMoving() {
// console.log('')
},
},
computed:{
passStr(){
let str='';
this.idCardList.forEach(item=>{
str+=item.toString();
})
return str;
blockEnd() {
// console.log('')
},
plateNumberStr(){
let str='';
this.plateNumberList.forEach(item=>{
str+=item.toString();
//
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: '支付中...'
})
return str;
jweixin.config({
// debug: false, // ,apialertpclogpc
appId: self.return_data.appId, //
timestamp: self.return_data.timeStamp, //
nonceStr: self.return_data.nonceStr, //
signature: self.return_data.sign, // 1
jsApiList: ['chooseWXPay'] // 使JSJS2
});
uni.hideLoading();
jweixin.ready(function() {
jweixin.checkJsApi({
jsApiList: ['chooseWXPay'], // JSJS2,
success: function(res) {},
fail: function(res) {}
});
jweixin.chooseWXPay({
appId: self.return_data.appId,
timestamp: self.return_data
.timeStamp, // jssdk使timestamp使timeStampS
nonceStr: self.return_data.nonceStr, // 32
package: self.return_data
.package, // prepay_idprepay_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', // 使
// // 使alipayRootCertPathappCertPathalipayPublicCertPath
// 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: 40rpx;
background-color: #f5f5f5;
margin: 20rpx 0;
}
.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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

@ -39,38 +39,707 @@ $uni-border-color:#c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:12px;
$uni-font-size-base:14px;
$uni-font-size-lg:16;
$uni-font-size-sm:24upx;
$uni-font-size-base:28upx;
$uni-font-size-lg:32upx;
/* 图片尺寸 */
$uni-img-size-sm:20px;
$uni-img-size-base:26px;
$uni-img-size-lg:40px;
$uni-img-size-sm:40upx;
$uni-img-size-base:52upx;
$uni-img-size-lg:80upx;
/* Border Radius */
$uni-border-radius-sm: 2px;
$uni-border-radius-base: 3px;
$uni-border-radius-lg: 6px;
$uni-border-radius-sm: 4upx;
$uni-border-radius-base: 6upx;
$uni-border-radius-lg: 12upx;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 5px;
$uni-spacing-row-base: 10px;
$uni-spacing-row-lg: 15px;
$uni-spacing-row-sm: 10px;
$uni-spacing-row-base: 20upx;
$uni-spacing-row-lg: 30upx;
/* 垂直间距 */
$uni-spacing-col-sm: 4px;
$uni-spacing-col-base: 8px;
$uni-spacing-col-lg: 12px;
$uni-spacing-col-sm: 8upx;
$uni-spacing-col-base: 16upx;
$uni-spacing-col-lg: 24upx;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:20px;
$uni-font-size-title:40upx;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:26px;
$uni-font-size-subtitle:36upx;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:15px;
$uni-font-size-paragraph:30upx;
/* 字体大小 */
.font11 {
font-size: 11px;
}
.font12 {
font-size: 12px;
}
.font13 {
font-size: 13px;
}
.fontlet{
letter-spacing: 2px;
}
.font14 {
font-size: 14px;
}
.font15 {
font-size: 15px;
}
.font16 {
font-size: 16px;
}
.font18 {
font-size: 18px;
}
.font20 {
font-size: 20px;
}
.font24 {
font-size: 24px;
}
.font28 {
font-size: 28px;
}
.font40 {
font-size: 40px;
}
.font48 {
font-size: 48px;
}
// 字体加粗
.fontwig6{
font-weight: bold;
}
/* 字体间距 */
.fontspec {
letter-spacing: 1px;
}
.fontspec10 {
letter-spacing: 10px;
}
/* 字体行间距 */
.linehet {
line-height: 20px;
}
/* 字体位置 */
.fotlt {
text-align: left;
}
.fotrt {
text-align: right;
}
.fotct {
text-align: center;
}
.margle {
margin-left: 6px;
}
.margle20 {
margin-left: 20px;
}
.marglerig{
margin-right: 5px;
}
.marRight20{
margin-right: 20px;
}
.verc {
vertical-align: middle;
}
.versub {
vertical-align: sub;
}
.text1 {
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
}
.text2 {
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
}
/* 字体颜色 */
.fcor333 {
color: #333333;
}
.fcorfff {
color: #ffffff;
}
.fcor666 {
color: #666666;
}
.fcor999 {
color: #b2b2b2;
}
.fcor089 {
color: #089bf5;
}
.fcoreb5 {
color: #eb5823;
}
.fcorred{
color: red;
}
.fcor41c{
color: #41cda2;
}
/* 背景颜色 */
.backcor9 {
background-color: #f6f6f6;
}
//渐变
.backcorlr{
background: linear-gradient(to right, #fe1a1a, #ff722e);
}
.backcor9 {
background-color: #f6f6f6;
}
.backcor008{
background-color: #0083f5;
}
.backcor89 {
background-color: #089bf5;
}
.backcorfff {
background-color: white;
}
.backshare {
background: rgba(0, 0, 0, 0);
}
/* 页面布局 */
.width90 {
width: 90%;
margin-left: 5%;
}
.width96 {
width: 96%;
margin-left: 2%;
}
.width94 {
width: 94%;
margin-left: 3%;
}
.width92 {
width: 92%;
margin-left: 4%;
}
.width80 {
width: 80%;
margin-left: 10%;
}
.width80p {
width: 80%;
}
.width70 {
width: 70%;
}
.width85 {
width: 85%;
}
.width50 {
width: 50%;
}
.width40 {
width: 40%;
}
.width60 {
width: 60%
}
.width60w {
width: 60%;
margin-left: 20%;
}
.width40w {
width: 40%;
margin-left: 30%;
}
.width20w {
width: 20%;
margin-left: 40%;
}
.width35 {
width: 35%;
}
.width30 {
width: 30%;
}
.width20 {
width: 20%;
}
.width25 {
width: 25%;
}
.width15 {
width: 15%;
}
.width8 {
width: 8%;
}
.width95 {
width: 95%;
}
.width100 {
width: 100%;
}
.bor-botm1 {
border-bottom: 1px solid #f4f4f4;
}
/* 高40px */
.height40p {
height: 40px;
}
.height45 {
height: 45px;
}
.height22{
height: 22px;
}
.height100 {
height: 100%;
}
.height10 {
height: 10px;
}
.height60 {
height: 60px;
}
.height70 {
height: 70px;
}
.height80 {
height: 80px;
}
.height90 {
height: 90px;
}
.height100p {
height: 100px;
}
.height110 {
height: 110px;
}
.height120{
height: 120px;
}
.height130{
height: 130px;
}
.height150{
height: 150px;
}
.height180{
height: 180px;
}
.height220{
height: 220px;
}
.height30 {
height: 30px;
line-height: 30px;
}
.height40 {
height: 40px;
line-height: 40px;
}
.height45l {
height: 45px;
line-height: 45px;
}
.heightl60 {
height: 60px;
line-height: 60px;
}
.height20 {
height: 20px;
line-height: 20px;
}
.height25 {
height: 25px;
}
.height20 {
height: 20px;
line-height: 20px;
}
.height50 {
height: 50px;
line-height: 50px;
}
/* 向上下外间距 */
.margle10{
margin-left: 10px;
}
.mart90 {
margin-top: 90px;
}
.mart80{
margin-top: 80px;
}
.mart70{
margin-top: 70px;
}
.mart60{
margin-top: 60px;
}
.mart50 {
margin-top: 50px;
}
.mart40 {
margin-top: 40px;
}
.mart30 {
margin-top: 30px;
}
.mart15 {
margin-top: 15px;
}
.mart20 {
margin-top: 20px;
}
.mart10 {
margin-top: 10px;
}
.mart5 {
margin-top: 5px;
}
.mart1 {
margin-top: 1px;
}
.marb65 {
margin-bottom: 65px;
}
.marb50 {
margin-bottom: 50px;
}
.marb40 {
margin-bottom: 40px;
}
.marb30 {
margin-bottom: 30px;
}
.marb20 {
margin-bottom: 20px;
}
.marb10 {
margin-bottom: 10px;
}
.marb5 {
margin-bottom: 5px;
}
/* 向上下内间距 */
.paddtop5 {
padding-top: 5px;
}
.paddtop10 {
padding-top: 10px;
}
.paading10{
padding : 10px;
}
.paddtop13 {
padding-top: 13px;
}
.paddtop15 {
padding-top: 15px;
}
.paddtop20 {
padding-top: 20px;
}
.paddtop25 {
padding-top: 25px;
}
.paddtop40 {
padding-top: 40px;
}
.paddleft5 {
padding-left: 5px;
}
.paddleft10 {
padding-left: 10px;
}
.padleft15 {
padding-left: 15px;
}
.paddtright5 {
padding-right: 5px;
}
.paddtright10 {
padding-right: 10px;
}
.paddtright15 {
padding-right: 15px;
}
.paddbotm10 {
padding-bottom: 10px;
}
/* 左悬浮 */
.flleft {
float: left;
}
/* 右悬浮 */
.flright {
float: right;
}
/**
* 圆角
*/
.border-r{
border-radius: 5px;
}
/* button样式 */
.btnw70 {
width: 70%;
color: white;
margin-top: 40px;
background-color: #089bf5;
border-radius: 6px;
}
.btnw50 {
width: 50%;
margin-left: 25%;
height: 45px;
line-height: 45px;
color: white;
text-align: center;
margin-top: 40px;
background-color: #0083f5;
border-radius: 6px;
}
/* 下滑线 */
.line1 {
height: 1px;
background-color: #f1f1f1;
}
.linec6 {
height: 1px;
background-color: #f1f1f1;
}
.line10 {
height: 10px;
background-color: #f4f4f4;
}
.line1089 {
height: 10px;
background-color: #089bf5;
}
/* 展示样式 */
.displ {
display: inline-block;
}
.aliitem{
align-items: center;
display: flex;
}
.alijun{
justify-content: flex-end;
display: flex;
}
.font12{
font-size: 12px;
}
.aliitem{
align-items: center;
display: flex;
}
.alijun{
justify-content: flex-end;
display: flex;
}
.alijusstart{
justify-content: flex-start;
align-items: center;
display: flex;
}
.alijusend{
justify-content: flex-end;
align-items: center;
display: flex;
}
.alicntend{
justify-content: end;
align-items: center;
display: flex;
}
.alijus{
justify-content: center;
align-items: center;
display: flex;
}
.iconw{
width: 15px;
}
.iconw25{
width: 25px;
}
.iconw40{
width: 40px;
}

@ -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…
Cancel
Save