牟新芬 hace 3 años
padre
commit
54e738e957

+ 30 - 0
api/api.js

@@ -6,6 +6,12 @@ export function getIndexData()
 	return request.get("index/getIndex",{},{ noAuth : true});
 }
 
+//站点信息
+export function siteResouce()
+{
+	return request.get("pub/siteResouce",{},{ noAuth : true});
+}
+
 //公告列表
 export function getNotice()
 {
@@ -66,6 +72,24 @@ export function loginApi(data)
 	return request.post("login/l",data,{ noAuth : true});
 }
 
+//重置密码验证码
+export function ApiForgetYzm(data)
+{
+	return request.post("login/forgetYzm",data,{ noAuth : true});
+}
+
+//重置密码一
+export function ApiForget1(data)
+{
+	return request.post("login/forget1",data,{ noAuth : true});
+}
+
+//重置密码一
+export function ApiForget2(data)
+{
+	return request.post("login/forget2",data,{ noAuth : true});
+}
+
 //用户信息
 export function getUserInfo()
 {
@@ -84,6 +108,12 @@ export function getOrderList(data)
 	return request.post("user/getOrderList",data);
 }
 
+//订单详情
+export function orderSubItem(data)
+{
+	return request.post("user/orderSubItem",data);
+}
+
 //邀请链接
 export function spreadLink()
 {

+ 16 - 0
components/wyb-popup/iconfont.css

@@ -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: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-close:before {
+  content: "\e622";
+}
+

+ 243 - 0
components/wyb-popup/wyb-popup.vue

@@ -0,0 +1,243 @@
+<template>
+	<view v-if="isShow" class="container">
+		<wyb-transition :contentStyle="maskRoot" :isContentShow="isPopupShow" :typeList="['fade']" :duration="duration">
+			<view :style="maskRoot" @tap="close" />
+		</wyb-transition>
+
+		<wyb-transition :contentStyle="root" :isContentShow="isPopupShow" :zoomLessenMulti="zoomLessenMulti" :typeList="popupAnim" mode="ease-out" :duration="duration">
+			<view v-if="showCloseIcon" class="iconfont icon-close close" :style="closeRoot" @tap="hide" />
+			<slot></slot>
+		</wyb-transition>
+	</view>
+</template>
+
+<script>
+	import wybTransition from '../wyb-transition/wyb-transition.vue'
+	export default {
+		components: {
+			wybTransition
+		},
+		data() {
+			return {
+				w: uni.getSystemInfoSync().screenWidth,
+				h: uni.getSystemInfoSync().screenHeight,
+				root: '',
+				maskRoot: '',
+				closeRoot: '',
+				isShow: false,
+				isPopupShow: false,
+				popupAnim: ['slide-up']
+			}
+		},
+		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
+			},
+			centerAnim: {
+				type: String,
+				default: 'zoom-lessen'
+			},
+			closeIconPos: {
+				type: String,
+				default: 'top-right'
+			},
+			bgColor: {
+				type: String,
+				default: '#ffffff'
+			},
+			zoomLessenMulti: {
+				type: Number,
+				default: 1.15
+			}
+		},
+		methods: {
+			processStyle() {
+				let style = 'z-index: ' + this.zIndex + '; '
+				style += 'background-color: ' + this.bgColor + '; position: fixed; '
+				switch (this.type) {
+					case 'bottom':
+						if (this.mode === 'size-fixed') {
+							style += 'height: ' + this.height + 'rpx; '
+						} else if (this.mode === 'size-auto') {
+							style += 'min-height: ' + this.height + 'rpx; '
+							style += 'height: auto; '
+						}
+						style += 'bottom: 0;  left: 0;  right: 0; '
+						style += 'border-top-left-radius: ' + this.radius + 'px; '
+						style += 'border-top-right-radius: ' + this.radius + 'px; '
+						style += 'width: 100%; '
+						this.popupAnim = ['slide-up']
+						break
+
+					case 'top':
+						if (this.mode === 'size-fixed') {
+							style += 'height: ' + this.height + 'rpx; '
+						} else if (this.mode === 'size-auto') {
+							style += 'min-height: ' + this.height + 'rpx; '
+							style += 'height: auto; '
+						}
+						style += 'top: 0;  left: 0;  right: 0; '
+						style += 'border-bottom-left-radius: ' + this.radius + 'px; '
+						style += 'border-bottom-right-radius: ' + this.radius + 'px; '
+						style += 'width: 100%; '
+						this.popupAnim = ['slide-down']
+						break
+
+					case 'left':
+						if (this.mode === 'size-fixed') {
+							style += 'width: ' + this.width + 'rpx; '
+						} else if (this.mode === 'size-auto') {
+							style += 'min-width: ' + this.width + 'rpx; '
+							style += 'width: auto; '
+						}
+						style += 'height: 100%; '
+						style += 'top: 0;  left: 0;  bottom: 0; '
+						style += 'border-top-right-radius: ' + this.radius + 'px; '
+						style += 'border-bottom-right-radius: ' + this.radius + 'px; '
+						this.popupAnim = ['slide-left']
+						break
+
+					case 'right':
+						if (this.mode === 'size-fixed') {
+							style += 'width: ' + this.width + 'rpx; '
+						} else if (this.mode === 'size-auto') {
+							style += 'min-width: ' + this.width + 'rpx; '
+							style += 'width: auto; '
+						}
+						style += 'height: 100%; '
+						style += 'top: 0;  right: 0;  bottom: 0; '
+						style += 'border-top-left-radius: ' + this.radius + 'px; '
+						style += 'border-bottom-left-radius: ' + this.radius + 'px; '
+						this.popupAnim = ['slide-right']
+						break
+
+					case 'center':
+						style += 'border-radius: ' + this.radius + 'px;'
+						style += 'width: ' + this.width + 'rpx; '
+						style += 'height: ' + this.height + 'rpx; '
+						let statusBarHeight = uni.getSystemInfoSync().statusBarHeight
+						// #ifdef H5
+						style += 'left: ' + (this.w - this.rpxToPx(this.width)) / 2 + 'px; top: ' + (this.h - this.rpxToPx(this.height)) / 2 +
+							'px; '
+						// #endif
+						// #ifndef H5 || MP-WEIXIN
+						style += 'left: ' + (this.w - this.rpxToPx(this.width)) / 2 + 'px; top: ' + (((this.h - this.rpxToPx(this.height)) / 2) -
+							45 - statusBarHeight) + 'px; '
+						// #endif
+						// #ifdef MP-WEIXIN
+						let navBarHeight = wx.getMenuButtonBoundingClientRect().bottom
+						style += 'left: ' + (this.w - this.rpxToPx(this.width)) / 2 + 'px; top: ' + (this.h - this.rpxToPx(this.height)) / 2 -
+							statusBarHeight - navBarHeight + 'px; '
+						// #endif
+						if (this.centerAnim === 'zoom-lessen') {
+							this.popupAnim = ['fade', 'zoom-lessen']
+						} else if (this.centerAnim === 'zoom-largen') {
+							this.popupAnim = ['fade', 'zoom-largen']
+						} else if (this.centerAnim === 'fade') {
+							this.popupAnim = ['fade']
+						} else if (this.centerAnim === 'bounce') {
+							this.popupAnim = ['bounce', 'fade']
+						} else if (this.centerAnim === 'slide-up') {
+							this.popupAnim = ['fade', 'slide-up']
+						} else if (this.centerAnim === 'slide-down') {
+							this.popupAnim = ['fade', 'slide-down']
+						}						
+						break
+				}
+				return style
+			},
+			processMask() {
+				let style = 'z-index: ' + (parseInt(this.zIndex) - 1) + '; '
+				style += 'background-color: rgba(0, 0, 0, ' + this.maskAlpha +
+					'); position: fixed; top: 0; left: 0; right: 0; bottom: 0;'
+				style += 'width: ' + this.w + 'px; '
+				style += 'height: ' + this.h + 'px; '
+				return style
+			},
+			processClose() {
+				let style = 'position: absolute; font-size: 40rpx; color: #808080;'
+				switch (this.closeIconPos) {
+					case 'top-right':
+						style += 'top: 22rpx; right: 22rpx;'
+						break
+					case 'top-left':
+						style += 'top: 22rpx; left: 22rpx;'
+						break
+					case 'bottom-left':
+						style += 'bottom: 22rpx; left: 22rpx;'
+						break
+					case 'bottom-right':
+						style += 'bottom: 22rpx; right: 22rpx;'
+						break
+				}
+				return style
+			},
+			close() {
+				this.maskClickClose && this.hide()
+			},
+			show() {
+				this.root = this.processStyle()
+				this.maskRoot = this.processMask()
+				this.closeRoot = this.processClose()
+				this.isShow = true
+				setTimeout(function() {
+					this.isPopupShow = true
+					setTimeout(function() {
+						this.$emit('show')
+					}.bind(this), this.duration + 10)
+				}.bind(this), 10)
+			},
+			hide() {
+				this.isPopupShow = false
+				setTimeout(function() {
+					this.isShow = false
+					this.$emit('hide')
+				}.bind(this), this.duration + 10)
+			},
+			rpxToPx(rpx) {
+				return rpx / 750 * this.w
+			}
+		}
+	}
+</script>
+
+<style>
+	@import "./iconfont.css";
+</style>

+ 360 - 0
components/wyb-transition/wyb-transition.vue

@@ -0,0 +1,360 @@
+<template>
+	<view :class="contentClass" id="content" v-if="isShow" :animation="animData" :style="root + contentStyle">
+		<slot></slot>
+	</view>
+</template>
+
+<script>
+	/**
+	 * wybTransition 过渡
+	 * @description 基于uni.createAnimation()进行封装的,简单过渡动画组件
+	 * @property {Boolean} isContentShow = [false|true] 控制组件显示或隐藏
+	 * @property {Array} typeList = ['fade', 'slide-up', 'rotate-aw'] 过渡动画类型
+	 *  @value fade 渐隐渐现
+	 *  @value slide-up         向上滑出
+	 *  @value slide-right      向右滑出
+	 *  @value slide-down       向下滑出
+	 *  @value slide-left       向左滑出
+	 * 	@value slide-up-left    向左上方滑出
+	 * 	@value slide-up-right   向右上方滑出
+	 * 	@value slide-down-left  向左下方滑出
+	 * 	@value slide-down-right 向右下方滑出
+	 *  @value zoom-largen      缩放(由小到大)
+	 *  @value zoom-lesson      缩放(由大到小)
+	 *  @value rotate-cw        顺时针旋转而出
+	 *  @value rotate-aw        逆时针旋转而出
+	 *  @value bounce           弹簧弹出
+	 * @property {Number} duration 过渡动画持续时间
+	 * @property {String} mode 动画演出模式
+	 *  @value linear 		动画从头到尾的速度是相同的
+	 *  @value ease 		动画以低速开始,然后加快,在结束前变慢
+	 *  @value ease-in 		动画以低速开始
+	 *  @value ease-in-out 	动画以低速开始和结束
+	 *  @value ease-out 	动画以低速结束
+	 *  @value step-start 	动画第一帧就跳至结束状态直到结束
+	 *  @value step-end 	动画一直保持开始状态,最后一帧跳到结束状态
+	 * @property {String} origin 动画演出中心 例如:'50% 50%',第一个是控制水平方向的,第二个是控制垂直方向的
+	 * @property {Number} multi 所有slide-*动画的平移倍数(对于自身宽高的倍数,默认一倍,即平移本身宽高的距离)
+	 * @property {Number} zoomLessenMulti 当type包含zoom-lessen(从大到小缩放)时的基础放大倍数,默认1.5倍
+	 * @property {Number} delay 动画演出延迟,默认为0,单位ms
+	 * @property {String} contentClass 可放入css样式类,因为组件本身就是一个view容器
+	 * @property {String} contentStyle 可放入css样式,因为组件本身就是一个view容器
+	 * @event {Function} onComeIn     入场动画开始事件
+	 * @event {Function} onGoOut      退场动画开始事件
+	 * @event {Function} finishComeIn 入场动画完成事件
+	 * @event {Function} finishGoOut  退场动画完成事件
+	 */
+	var width = 0
+	var height = 0
+	export default {
+		data() {
+			return {
+				animData: {}, // 动画对象
+				isShow: false, // 组件内部的显隐开关,在动画结束时,改变值的时候,比isContentShow晚1ms(防止动画无法演出)
+				root: '', // 组件的基础样式,给动画演出提供基础环境。例如在演出fade时,先将opacity设为0
+			}
+		},
+		props: {
+			isContentShow: {
+				type: Boolean,
+				default: false
+			},
+			duration: {
+				type: Number,
+				default: 400
+			},
+			typeList: {
+				type: Array,
+				default () {
+					return ['fade']
+				}
+			},
+			mode: {
+				type: String,
+				default: 'ease'
+			},
+			origin: {
+				type: String,
+				default: '50% 50%'
+			},
+			multi: {
+				type: Number,
+				default: 1
+			},
+			zoomLessenMulti: {
+				type: Number,
+				default: 1.5
+			},
+			delay: {
+				type: Number,
+				default: 0
+			},
+			contentClass: {
+				type: String,
+				default: ''
+			},
+			contentStyle: {
+				type: String,
+				default: ''
+			}
+		},
+		watch: {
+			// 监视isContentShow值的改变,演出相应动画
+			isContentShow(val) {
+				// 处理动画的函数
+				this.processAll(val)
+			}
+		},
+		created() {
+			// 创建动画
+			this.animation = uni.createAnimation({
+				duration: this.duration,
+				timingFunction: this.mode,
+				transformOrigin: this.origin,
+				delay: this.delay
+			})
+		},
+		methods: {
+			// 处理动画的函数
+			processAll(val) {
+				/**
+				 * 判断isContentShow的值
+				 * true:内部开关isShow设为true,然后注册入场动画开始事件,并延时1ms启动入场动画(防止动画无法演出),演出完成后,注册入场动画完成事件
+				 * false: 注册退场动画开始事件,并启动退场动画,然后延时(动画演出时间 + 10)ms的时间,再将内部开关isShow设为false,演出完成后,注册退场动画完成事件
+				 */
+				if (val) {
+					this.isShow = true
+					this.root = this.processStyle(this.typeList)
+					setTimeout(function() {
+						this.$emit('onComeIn')
+						this.processIn(this.typeList)
+						this.animation.step()
+						this.animData = this.animation.export()
+						setTimeout(function() {
+							this.$emit('finishComeIn')
+						}.bind(this), this.duration + 1)
+					}.bind(this), 10)
+
+				} else {
+					this.$emit('onGoOut')
+					this.processOut(this.typeList)
+					this.animation.step()
+					this.animData = this.animation.export()
+					setTimeout(function() {
+						this.isShow = false
+						this.$emit('finishGoOut')
+						this.$forceUpdate()
+					}.bind(this), this.duration + 1)
+				}
+			},
+			/**
+			 * @param {Array} typeList 动画类型列表
+			 * 函数作用:将root处理为 "opacity: 0; transform: scale(1.5) translateY(-100%);" 的形式
+			 */
+			processStyle(typeList) {
+				let root = ''
+				let transform = 'transform:'
+				const hundred = 100
+
+				if (typeList.includes('fade'))
+					root += 'opacity: 0;'
+
+				if (typeList.includes('zoom-largen') || typeList.includes('bounce')) {
+					if (root.indexOf(transform) === -1) {
+						root += transform + ' scale(0)'
+					} else {
+						root += ' scale(0)'
+					}
+
+				} else if (typeList.includes('zoom-lessen')) {
+					if (root.indexOf(transform) === -1) {
+						root += transform + ' scale(' + this.zoomLessenMulti + ')'
+					} else {
+						root += ' scale(' + this.zoomLessenMulti + ')'
+					}
+				}
+
+				if (typeList.includes('slide-down')) {
+					if (root.indexOf(transform) === -1) {
+						root += transform + ' translateY(-' + hundred * this.multi + '%)'
+					} else {
+						root += ' translateY(-' + hundred * this.multi + '%)'
+					}
+
+				} else if (typeList.includes('slide-up')) {
+					if (root.indexOf(transform) === -1) {
+						root += transform + ' translateY(' + hundred * this.multi + '%)'
+					} else {
+						root += ' translateY(' + hundred * this.multi + '%)'
+					}
+
+				} else if (typeList.includes('slide-left')) {
+					if (root.indexOf(transform) === -1) {
+						root += transform + ' translateX(-' + hundred * this.multi + '%)'
+					} else {
+						root += ' translateX(-' + hundred * this.multi + '%)'
+					}
+
+				} else if (typeList.includes('slide-right')) {
+					if (root.indexOf(transform) === -1) {
+						root += transform + ' translateX(' + hundred * this.multi + '%)'
+					} else {
+						root += ' translateX(' + hundred * this.multi + '%)'
+					}
+
+				} else if (typeList.includes('slide-up-left')) {
+					if (root.indexOf(transform) === -1) {
+						root += transform + ' translate(' + hundred * this.multi + '%, ' + hundred * this.multi + '%)'
+					} else {
+						root += ' translate(' + hundred * this.multi + '%, ' + hundred * this.multi + '%)'
+					}
+
+				} else if (typeList.includes('slide-up-right')) {
+					if (root.indexOf(transform) === -1) {
+						root += transform + ' translate(-' + hundred * this.multi + '%, ' + hundred * this.multi + '%)'
+					} else {
+						root += ' translate(-' + hundred * this.multi + '%, ' + hundred * this.multi + '%)'
+					}
+
+				} else if (typeList.includes('slide-down-left')) {
+					if (root.indexOf(transform) === -1) {
+						root += transform + ' translate(' + hundred * this.multi + '%, -' + hundred * this.multi + '%)'
+					} else {
+						root += ' translate(' + hundred * this.multi + '%, -' + hundred * this.multi + '%)'
+					}
+
+				} else if (typeList.includes('slide-down-right')) {
+					if (root.indexOf(transform) === -1) {
+						root += transform + ' translate(-' + hundred * this.multi + '%, -' + hundred * this.multi + '%)'
+					} else {
+						root += ' translate(-' + hundred * this.multi + '%, -' + hundred * this.multi + '%)'
+					}
+				}
+
+				if (typeList.includes('rotate-cw')) {
+					if (root.indexOf(transform) === -1) {
+						root += transform + ' rotate(-180deg)'
+					} else {
+						root += ' rotate(-180deg)'
+					}
+
+				} else if (typeList.includes('rotate-aw')) {
+					if (root.indexOf(transform) === -1) {
+						root += transform + ' rotate(180deg)'
+					} else {
+						root += ' rotate(180deg)'
+					}
+				}
+
+				let rootList = root.split('')
+				if (rootList[root.length - 1] !== ';') {
+					root += ';'
+				}
+				return root
+			},
+			/**
+			 * @param {Array} typeList 动画类型列表
+			 * 函数作用:设置退场动画
+			 */
+			processOut(typeList) {
+				if (typeList.includes('fade'))
+					this.animation.opacity(0)
+
+				if (typeList.includes('zoom-largen'))
+					this.animation.scale(0)
+
+				else if (typeList.includes('zoom-lessen'))
+					this.animation.scale(this.zoomLessenMulti)
+
+				else if (typeList.includes('bounce')) {
+					this.animation.scale(1.2).step({
+						duration: this.duration * 1 / 3
+					})
+					this.animation.scale(0).step({
+						duration: this.duration * 2 / 3
+					})
+				}
+
+				if (typeList.includes('slide-down'))
+					this.animation.translateY(0 - height)
+
+				else if (typeList.includes('slide-up'))
+					this.animation.translateY(height)
+
+				else if (typeList.includes('slide-left'))
+					this.animation.translateX(0 - width)
+
+				else if (typeList.includes('slide-right'))
+					this.animation.translateX(width)
+
+				else if (typeList.includes('slide-up-left'))
+					this.animation.translate(width, height)
+
+				else if (typeList.includes('slide-up-right'))
+					this.animation.translate(0 - width, height)
+
+				else if (typeList.includes('slide-down-left'))
+					this.animation.translate(width, 0 - height)
+
+				else if (typeList.includes('slide-down-right'))
+					this.animation.translate(0 - width, 0 - height)
+
+				if (typeList.includes('rotate-cw'))
+					this.animation.rotate(-180)
+
+				else if (typeList.includes('rotate-aw'))
+					this.animation.rotate(180)
+			},
+			/**
+			 * @param {Array} typeList 动画类型列表
+			 * 函数作用:设置入场动画
+			 */
+			processIn(typeList) {
+				// 查询放进组件slot节点元素的宽高,用于后面的平移距离
+				this.getRect('#content').then(res => {
+					width = parseFloat(res.width) * this.multi,
+						height = parseFloat(res.height) * this.multi
+				})
+
+				if (typeList.includes('fade'))
+					this.animation.opacity(1)
+
+				if (typeList.includes('zoom-largen') || typeList.includes('zoom-lessen'))
+					this.animation.scale(1)
+
+				else if (typeList.includes('bounce')) {
+					this.animation.scale(1.2).step({
+						duration: this.duration * 1 / 3
+					})
+					this.animation.scale(1).step({
+						duration: this.duration * 2 / 3
+					})
+				}
+
+				if (typeList.includes('slide-up') || typeList.includes('slide-down')) {
+					this.animation.translateY(0)
+				} else if (typeList.includes('slide-left') || typeList.includes('slide-right')) {
+					this.animation.translateX(0)
+				} else if (typeList.includes('slide-up-left') || typeList.includes('slide-up-right') ||
+					typeList.includes('slide-down-left') || typeList.includes('slide-down-right'))
+					this.animation.translate(0, 0)
+
+				if (typeList.includes('rotate-cw') || typeList.includes('rotate-aw'))
+					this.animation.rotate(0)
+			},
+			/**
+			 * @param {Object} selector 选择器
+			 * 函数作用:查询元素的宽高、位置等信息
+			 */
+			getRect(selector) {
+				return new Promise(resolve => {
+					uni.createSelectorQuery().in(this)['select'](selector).boundingClientRect(rect => {
+						if (rect) {
+							resolve(rect)
+						}
+					}).exec()
+				})
+			}
+		}
+	}
+</script>

+ 24 - 0
pages.json

@@ -10,6 +10,12 @@
 				}
 			}
 		},
+		{
+			"path": "pages/index/site",
+			"style": {
+				"navigationBarTitleText": "开通分站"
+			}
+		},
 		{
 			"path": "pages/product/index",
 			"style": {
@@ -40,6 +46,12 @@
 				"navigationBarTitleText": "注册"
 			}
 		},
+		{
+			"path": "pages/users/retrievePassword/index",
+			"style": {
+				"navigationBarTitleText": "重置密码"
+			}
+		},
 		{
 			"path": "pages/my/index",
 			"style": {
@@ -52,6 +64,12 @@
 				"navigationBarTitleText": "我的订单"
 			}
 		},
+		{
+			"path": "pages/users/order/detail",
+			"style": {
+				"navigationBarTitleText": "订单详情"
+			}
+		},
 		{
 			"path": "pages/users/spread/index",
 			"style": {
@@ -70,6 +88,12 @@
 				"navigationBarTitleText": "余额充值"
 			}
 		},
+		{
+			"path": "pages/users/recharge/xieyi",
+			"style": {
+				"navigationBarTitleText": "用户协议"
+			}
+		},
 		{
 			"path": "pages/users/record/index",
 			"style": {

+ 9 - 3
pages/index/index.vue

@@ -32,12 +32,18 @@
 			</view>
 			
 			<view class="nav">
-				<view><image src="../../static/images/nav1.png"></image><view>开启分站</view></view>
+				<navigator class="item" url="/pages/index/site" hover-class="none">
+					<image src="../../static/images/nav1.png"></image><view>开通分站</view>
+				</navigator>
 				<navigator class="item" url="/pages/users/spread/index" hover-class="none">
 					<image src="../../static/images/nav2.png"></image><view>邀请好友</view>
 				</navigator>
-				<view><image src="../../static/images/nav3.png"></image><view>品质保证</view></view>
-				<view><image src="../../static/images/nav4.png"></image><view>降低成本</view></view>
+				<navigator class="item" url="/pages/product/index" hover-class="none" open-type='switchTab'>
+					<image src="../../static/images/nav3.png"></image><view>品质保证</view>
+				</navigator>
+				<navigator class="item" url="/pages/product/index" hover-class="none" open-type='switchTab'>
+					<image src="../../static/images/nav4.png"></image><view>降低成本</view>
+				</navigator>
 			</view>
 			
 			<view class="product">

+ 127 - 0
pages/index/site.vue

@@ -0,0 +1,127 @@
+<template>
+	<view>
+		<view class="top">
+			<image src="../../static/images/bg.jpg" mode="widthFix"></image>
+			<div class="text">
+				<h2>分站开通·拥有属于自己的网站</h2>
+				<h5>网站完全独立控制,管理操作简单,全天24小时自动售单,无需人工干预。</h5>
+				<button @click="call(custom_tel)">立即联系客服</button>
+			</div>		
+		</view>
+		<view class="advantage">
+			<h2>产品优势</h2>
+			<view class="item">
+				<image src="../../static/images/ys1.png" mode="widthFix"></image>
+				<view>提供技术支持</view>
+				<view>24小时技术在线维护</view>
+			</view>
+			<view class="item">
+				<image src="../../static/images/ys2.png" mode="widthFix"></image>
+				<view>独立域名</view>
+				<view>独立后台 自由管理</view>
+			</view>
+			<view class="item">
+				<image src="../../static/images/ys3.png" mode="widthFix"></image>
+				<view>分站成本低</view>
+				<view>提供服务器、域名</view>
+				<view>维护、升级服务</view>
+			</view>
+			<view class="item">
+				<image src="../../static/images/ys4.png" mode="widthFix"></image>
+				<view>建站速度快</view>
+				<view>10分钟即可实现建站</view>
+				<view>推广运营网站</view>
+			</view>
+			<view class="item">
+				<image src="../../static/images/ys5.png" mode="widthFix"></image>
+				<view>网站API接口</view>
+				<view>免费提供 无需任何费用</view>
+			</view>
+			<view class="item">
+				<image src="../../static/images/ys6.png" mode="widthFix"></image>
+				<view>提供稳定安全</view>
+				<view>低价的快递费 礼品货源</view>
+			</view>
+			<view class="item">
+				<image src="../../static/images/ys7.png" mode="widthFix"></image>
+				<view>利润直达账户</view>
+				<view>提现 24小时内到账</view>
+			</view>
+			<view class="item">
+				<image src="../../static/images/ys8.png" mode="widthFix"></image>
+				<view>前景可观</view>
+				<view>客源稳定 收入稳定</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		siteResouce
+	} from '@/api/api.js';
+	export default {
+		data() {
+			return {
+				custom_tel: '',
+			}
+		},
+		onLoad() {
+			siteResouce().then(res => {
+				this.custom_tel = res.data.custom_tel;
+			});
+		},
+		methods: {
+			call: function(number){
+				uni.makePhoneCall({
+					phoneNumber: number		
+				});
+			}
+		},
+	}
+</script>
+
+<style scoped lang="scss">
+	.top{
+		position: relative;
+		image{
+			width:100%;
+			vertical-align: bottom;
+		}
+		.text{
+			position: absolute;
+			top:80rpx;
+			color:#fff;
+			padding: 0 30rpx;
+			h2{
+				text-align: center;
+				margin-bottom: 20rpx;
+			}
+			button{
+				width:360rpx;
+				color: #fb3434;
+				font-size: 32rpx;
+				border-radius: 60rpx;
+				padding: 15rpx 0;
+				margin: 40rpx auto 0 auto;
+			}
+		}
+	}
+	.advantage{
+		background: #fff;
+		overflow: hidden;
+		h2{
+			text-align: center;
+			margin: 40rpx 0;
+		}
+		.item{
+			width:50%;
+			float:left;
+			text-align: center;
+			margin-bottom: 40rpx;
+			image{
+				width:100rpx;
+			}
+		}
+	}
+</style>

+ 16 - 10
pages/my/index.vue

@@ -78,29 +78,34 @@
 				userInfo: {},
 				orderMenu: [
 					{
-						title: '支付',
+						title: '支付',
 						img: '../../static/images/order1.png',						
-						url: '/pages/users/order/index?status=0'
+						url: '/pages/users/order/index?status=0',
+						num: 0
 					},
 					{
 						title: '打单中',
 						img: '../../static/images/order2.png',						
-						url: '/pages/users/order/index?status=1'
+						url: '/pages/users/order/index?status=1',
+						num: 0
 					},
 					{
 						title: '已出单',
 						img: '../../static/images/order3.png',						
-						url: '/pages/users/order/index?status=2'
+						url: '/pages/users/order/index?status=2',
+						num: 0
 					},
 					{
 						title: '异常',
 						img: '../../static/images/order4.png',						
-						url: '/pages/users/order/index?status=9'
+						url: '/pages/users/order/index?status=9',
+						num: 0
 					},
 					{
-						title: '取消',
+						title: '退货',
 						img: '../../static/images/order5.png',						
-						url: '/pages/users/order/index?status=-1'
+						url: '/pages/users/order/index?status=-2',
+						num: 0
 					}
 				],
 			}
@@ -127,7 +132,7 @@
 				getOrder().then(res => {
 					that.orderMenu.forEach((item, index) => {
 						switch (item.title) {
-							case '支付':
+							case '支付':
 								item.num = res.data.unpaid
 								break
 							case '打单中':
@@ -139,12 +144,13 @@
 							case '异常':
 								item.num = res.data.abnormalOrder
 								break
-							case '取消':
-								item.num = res.data.cancelOrder
+							case '退货':
+								item.num = res.data.refundOrder
 								break
 						}
 					})
 				})
+				console.log(that.orderMenu);
 			}
 		}
 	}

+ 129 - 0
pages/users/commission/index.vue

@@ -0,0 +1,129 @@
+<template>
+	<view>
+		<view class='commission-details'>
+			<view class='promoterHeader'>
+				<view class='headerCon acea-row row-between-wrapper'>
+					<view>
+						<view class='name'>可提现余额</view>
+						<view class='money'>¥<text class='num'>{{money}}</text></view>
+					</view>
+					<view class='iconfont icon-jinbi1'></view>
+				</view>
+			</view>
+			<view class='sign-record'>
+				<view class='list' v-for="(item,index) in recordList" :key="index">
+					<view class='item'>
+						<view class='listn'>
+							<view class='itemn acea-row row-between-wrapper'>
+								<view>
+									<view class='name line1'>{{item.title}}</view>
+									<view>{{item.time}}</view>
+								</view>
+								<view class='num font-color'>+{{item.v}}</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class='loadingicon acea-row row-center-wrapper' v-if="recordList.length>0">
+					<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
+				</view>
+				<view v-if="recordList.length == 0">
+					<emptyPage title='暂无佣金记录~'></emptyPage>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapGetters
+	} from "vuex";
+	import {
+		toLogin
+	} from '@/libs/login.js';
+	import {
+		account,
+		recordList
+	} from '@/api/api.js';
+	import emptyPage from '@/components/emptyPage.vue'
+	export default {
+		components: {
+			emptyPage
+		},
+		data() {
+			return {
+				money: 0,
+				loadTitle: '加载更多',
+				loading: false,
+				loadend: false,
+				page: 1,
+				limit: 10,
+				type: 'income',
+				recordList: []
+			};
+		},
+		computed: mapGetters(['isLogin']),
+		onLoad() {
+			if (this.isLogin) {
+				this.getAccount();
+				this.getRecordList();
+			} else {
+				toLogin();
+			}
+		},
+		methods: {
+			getAccount: function() {
+				account().then(res => {
+					this.money = res.data.tx_money;
+				});
+			},
+			getRecordList: function() {
+				let that = this;
+				if (that.loadend) return;
+				if (that.loading) return;
+				that.loading = true;
+				that.loadTitle = "";
+				let data = {
+					page: that.page,
+					tabType: that.type
+				}
+				recordList(data).then(function(res) {
+					let list = res.data.list,
+					loadend = list.length < that.limit;
+					that.recordList = that.$util.SplitArray(list, that.recordList);
+					that.loadend = loadend;
+					that.loading = false;
+					that.loadTitle = loadend ? "哼~我也是有底线的~" : "加载更多";
+					that.page = that.page + 1;
+				}, function(res) {
+					that.loading = false;
+					that.loadTitle = '加载更多';
+				});
+			},
+		},
+		onReachBottom: function() {
+			this.getRecordList();
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.commission-details .promoterHeader{
+		background: #ff5c00;
+	}
+	
+	.commission-details .promoterHeader .headerCon .money {
+		font-size: 36rpx;
+	}
+
+	.commission-details .promoterHeader .headerCon .money .num {
+		font-family: 'Guildford Pro';
+	}
+	.bg-color{
+		background-color: #e93323!important;
+	}
+	.font-color,.font-color-red {
+		color: #e93323!important;	
+	}
+</style>

+ 90 - 0
pages/users/order/detail.vue

@@ -0,0 +1,90 @@
+<template>
+	<view>
+		<view class="total">此订单共计{{total}}个包裹</view>
+		<view class="list">
+			<view class='item' v-for="(item,index) in subOrder" :key="index">
+				<view v-if="item.shop_name">店  铺:{{item.shop_name}}</view>
+				<view v-if="item.out_order_id">订单号:{{item.out_order_id}}</view>
+				<view>{{item.name}} {{item.mobile}}</view>
+				<view>{{item.address}}</view>
+				<view v-if="item.exp_number">{{item.exp_name}} {{item.exp_number}}<text class='copy' @tap='copy(item.exp_number)'>复制</text></view>
+				<view v-if="item.send_time">发货时间:{{item._send_time}}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapGetters
+	} from "vuex";
+	import {
+		toLogin
+	} from '@/libs/login.js';
+	import {
+		orderSubItem
+	} from '@/api/api.js';
+	import H5Api from '@/utils/ican-H5Api.js'
+	export default {
+		data() {
+			return {
+				id: '',
+				total: '',
+				subOrder: []
+			};
+		},
+		computed: mapGetters(['isLogin']),
+		onLoad(options) {
+			if (this.isLogin) {
+				this.id = options.id || '';
+				this.getSubOrder();
+			} else {
+				toLogin();
+			}
+		},
+		methods: {
+			getSubOrder: function() {
+				orderSubItem({'id':this.id}).then(res => {
+					this.total = res.data.pageCount;
+					this.subOrder = res.data.list;
+				});
+			},
+			copy: function(text) {
+				uni.setClipboardData({
+					data: text,
+					success:function(){
+						uni.showToast({
+							title: '复制成功'
+						})
+					}
+				});
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.total{
+		background: #fff;
+		text-align: center;
+		padding: 20rpx 0;
+		margin-bottom: 20rpx;
+	}
+	.list{
+		background: #fff;
+		.item{
+			padding: 20rpx;
+			border-bottom: 1px solid #eee;
+			view{
+				margin-bottom: 8rpx;
+			}
+			.copy {
+				font-size: 20rpx;
+				border-radius: 3rpx;
+				border: 1rpx solid #eee;
+				padding: 3rpx 15rpx;
+				margin-left: 30rpx;
+			}
+		}
+	}
+</style>

+ 388 - 0
pages/users/order/index.vue

@@ -0,0 +1,388 @@
+<template>
+	<view>
+		<view class='my-order'>
+			<view class='header bg-color'>
+				<view class='picTxt acea-row row-between-wrapper'>
+					<view class='text'>
+						<view class='name'>订单信息</view>
+						<view>总金额:¥{{orderData.total || 0}} 总子订单数:{{orderData.subOrder || 0}}</view>
+					</view>
+					<view class='pictrue'>
+						<image src='../../../static/images/orderTime.png'></image>
+					</view>
+				</view>
+			</view>
+			<view class='nav acea-row row-around'>
+				<view class='item' :class='orderType==0 ? "on": ""' @click="statusClick(0)">
+					<view>待支付</view>
+					<view class='num'>{{orderData.unpaid || 0}}</view>
+				</view>
+				<view class='item' :class='orderType==1 ? "on": ""' @click="statusClick(1)">
+					<view>打单中</view>
+					<view class='num'>{{orderData.inorder || 0}}</view>
+				</view>
+				<view class='item' :class='orderType==2 ? "on": ""' @click="statusClick(2)">
+					<view>已出单</view>
+					<view class='num '>{{orderData.sendOrder || 0}}</view>
+				</view>
+				<view class='item' :class='orderType==9 ? "on": ""' @click="statusClick(9)">
+					<view>异常</view>
+					<view class='num'>{{orderData.abnormalOrder || 0}}</view>
+				</view>
+				<view class='item' :class='orderType==-2 ? "on": ""' @click="statusClick(-2)">
+					<view>退货</view>
+					<view class='num'>{{orderData.refundOrder || 0}}</view>
+				</view>
+			</view>
+			<view class='list'>
+				<view class='item' v-for="(item,index) in orderList" :key="index">
+					<view class='title acea-row row-between-wrapper'>
+						<view class="acea-row row-middle">
+							<view>{{item.time}}</view>
+						</view>
+						<view v-if="item.status == 0" class='font-color'>未支付</view>
+						<view v-if="item.status == 1" class='font-color'>打单中</view>
+						<view v-if="item.status == 2" class='font-color'>已出单</view>
+						<view v-if="item.status == 9" class='font-color'>异常</view>
+						<view v-if="item.status == -2" class='font-color'>已退款</view>
+					</view>
+					<view class='item-info acea-row row-between row-top'>
+						<view class='pictrue'>
+							<image :src='item.pro_img'></image>
+						</view>
+						<view class='text acea-row row-between'>
+							<view class='name line2'>{{item.pro_title}}</view>
+							<view class='money'>
+								<view>{{item.platfrom_name}}</view>
+								<view>x{{item.order_count}}</view>
+							</view>
+						</view>
+					</view>
+					<view class='totalPrice'>付款金额
+						<text class='money font-color'>¥{{item.all_price}}</text>
+					</view>
+					<view class='bottom acea-row row-right row-middle'>
+						<view class='bnt bg-color' v-if="item.status == 0" @click='pay(item.order_id)'>支付</view>
+						<view class='bnt cancelBnt' v-if="item.status == 0" @click='cancel(index,item.id)'>取消</view>						
+						<view :class='item.status == 0 ? "bnt cancelBnt" : "bnt bg-color"' @click='detail(item.id)'>查看</view>
+					</view>
+				</view>
+			</view>
+			<view class='loadingicon acea-row row-center-wrapper' v-if="orderList.length>0">
+				<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
+			</view>
+			<view v-if="orderList.length == 0">
+				<emptyPage title="暂无订单~"></emptyPage>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapGetters
+	} from "vuex";
+	import {
+		toLogin
+	} from '@/libs/login.js';
+	import {
+		getOrder,
+		getOrderList,
+		balancePay,
+		cancelOrder
+	} from '@/api/api.js';
+	import emptyPage from '@/components/emptyPage.vue';
+	export default {
+		components: {
+			emptyPage
+		},
+		data() {
+			return {
+				loading: false, //是否加载中
+				loadend: false, //是否加载完毕
+				loadTitle: '加载更多', //提示语
+				orderList: [], //订单数组
+				orderData: {}, //订单详细统计
+				orderType: '0', //订单状态
+				page: 1,
+				limit: 20
+			};
+		},
+		computed: mapGetters(['isLogin']),
+		onLoad: function(options) {
+			if (options.status) this.orderType = options.status;
+			if (this.isLogin) {
+				this.getOrderData();
+				this.getOrderList();
+			} else {
+				toLogin();
+			}
+		},
+		methods: {
+			//获取订单统计数据
+			getOrderData: function() {
+				let that = this;
+				getOrder().then(res => {
+					that.$set(that, 'orderData', res.data);
+				})
+			},
+			//切换类型
+			statusClick: function(status) {
+				if (status == this.orderType) return;
+				this.orderType = status;
+				this.loadend = false;
+				this.page = 1;
+				this.$set(this, 'orderList', []);
+				this.getOrderList();
+			},
+			//获取订单列表
+			getOrderList: function() {
+				let that = this;
+				if (that.loadend) return;
+				if (that.loading) return;
+				that.loading = true;
+				that.loadTitle = "加载更多";
+				getOrderList({
+					orderType: that.orderType,
+					page: that.page,
+					limit: that.limit,
+				}).then(res => {
+					let list = res.data.list || [];
+					let loadend = list.length < that.limit;
+					that.orderList = that.$util.SplitArray(list, that.orderList);
+					that.$set(that, 'orderList', that.orderList);
+					that.loadend = loadend;
+					that.loading = false;
+					that.loadTitle = loadend ? "没有更多了" : '加载更多';
+					that.page = that.page + 1;
+				}).catch(err => {
+					that.loading = false;
+					that.loadTitle = "加载更多";
+				})
+			},
+			pay: function(order_id) {
+				let that = this;
+				balancePay({'order_id':order_id}).then(res => {
+					return that.$util.Tips({
+						title: res.data.msg,
+						icon: 'success'
+					}, () => {
+						this.loadend = false;
+						this.page = 1;
+						this.$set(this, 'orderList', []);
+						this.getOrderData();
+						this.getOrderList();
+					});
+				}).catch(err => {
+					that.$util.Tips({
+						title: err
+					});
+				});
+			},
+			cancel: function(index, id) {
+				let that = this;
+				if (!id) return that.$util.Tips({
+					title: '缺少订单号无法取消订单'
+				});
+				cancelOrder({'id':id}).then(res => {
+					return that.$util.Tips({
+						title: res.data.msg,
+						icon: 'success'
+					}, function() {
+						that.orderList.splice(index, 1);
+						that.getOrderData();
+					});
+				}).catch(err => {
+					return that.$util.Tips({
+						title: err
+					});
+				});
+			},
+			detail: function(id) {
+				uni.navigateTo({
+					url: '/pages/users/order/detail?id='+id
+				})
+			}
+		},
+		onReachBottom: function() {
+			this.getOrderList();
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.bg-color {
+	    background-color: #ff5c00!important;
+	}
+	.my-order .header {
+		height: 260rpx;
+		padding: 0 30rpx;
+	}
+
+	.my-order .header .picTxt {
+		height: 190rpx;
+	}
+
+	.my-order .header .picTxt .text {
+		color: rgba(255, 255, 255, 0.8);
+		font-size: 26rpx;
+		font-family: 'Guildford Pro';
+	}
+
+	.my-order .header .picTxt .text .name {
+		font-size: 34rpx;
+		font-weight: bold;
+		color: #fff;
+		margin-bottom: 20rpx;
+	}
+
+	.my-order .header .picTxt .pictrue {
+		width: 122rpx;
+		height: 109rpx;
+	}
+
+	.my-order .header .picTxt .pictrue image {
+		width: 100%;
+		height: 100%;
+	}
+
+	.my-order .nav {
+		background-color: #fff;
+		width: 690rpx;
+		height: 140rpx;
+		border-radius: 6rpx;
+		margin: -73rpx auto 0 auto;
+	}
+
+	.my-order .nav .item {
+		text-align: center;
+		font-size: 26rpx;
+		color: #282828;
+		padding: 29rpx 0;
+	}
+
+	.my-order .nav .item.on {
+		font-weight: bold;
+		border-bottom: 5rpx solid #ff5c00;
+	}
+
+	.my-order .nav .item .num {
+		margin-top: 18rpx;
+	}
+
+	.my-order .list {
+		width: 690rpx;
+		margin: 14rpx auto 0 auto;
+	}
+
+	.my-order .list .item {
+		background-color: #fff;
+		border-radius: 6rpx;
+		margin-bottom: 14rpx;
+	}
+
+	.my-order .list .item .title {
+		height: 84rpx;
+		padding: 0 30rpx;
+		border-bottom: 1rpx solid #eee;
+		font-size: 28rpx;
+		color: #282828;
+	}
+
+	.my-order .list .item .title .sign {
+		font-size: 24rpx;
+		padding: 0 7rpx;
+		height: 36rpx;
+		margin-right: 15rpx;
+	}
+
+	.my-order .list .item .item-info {
+		padding: 0 30rpx;
+		margin-top: 22rpx;
+	}
+
+	.my-order .list .item .item-info .pictrue {
+		width: 120rpx;
+		height: 120rpx;
+	}
+
+	.my-order .list .item .item-info .pictrue image {
+		width: 100%;
+		height: 100%;
+		border-radius: 6rpx;
+	}
+
+	.my-order .list .item .item-info .text {
+		width: 486rpx;
+		font-size: 28rpx;
+		color: #999;
+		margin-top: 6rpx;
+	}
+
+	.my-order .list .item .item-info .text .name {
+		width: 306rpx;
+		color: #282828;
+	}
+
+	.my-order .list .item .item-info .text .money {
+		text-align: right;
+	}
+
+	.my-order .list .item .totalPrice {
+		font-size: 26rpx;
+		color: #282828;
+		text-align: right;
+		margin: 27rpx 0 0 30rpx;
+		padding: 0 30rpx 30rpx 0;
+		border-bottom: 1rpx solid #eee;
+	}
+
+	.my-order .list .item .totalPrice .money {
+		font-size: 28rpx;
+		font-weight: bold;
+	}
+
+	.my-order .list .item .bottom {
+		height: 107rpx;
+		padding: 0 30rpx;
+	}
+
+	.my-order .list .item .bottom .bnt {
+		width: 176rpx;
+		height: 60rpx;
+		text-align: center;
+		line-height: 60rpx;
+		color: #fff;
+		border-radius: 50rpx;
+		font-size: 27rpx;
+	}
+
+	.my-order .list .item .bottom .bnt.cancelBnt {
+		border: 1rpx solid #ddd;
+		color: #aaa;
+	}
+	
+	.my-order .list .item .bottom .bnt{
+		width: 80px;
+	}
+
+	.my-order .list .item .bottom .bnt~.bnt {
+		margin-left: 17rpx;
+	}
+
+	.noCart {
+		margin-top: 171rpx;
+		padding-top: 0.1rpx;
+	}
+
+	.noCart .pictrue {
+		width: 414rpx;
+		height: 336rpx;
+		margin: 78rpx auto 56rpx auto;
+	}
+
+	.noCart .pictrue image {
+		width: 100%;
+		height: 100%;
+	}
+</style>

+ 511 - 0
pages/users/purchase/index.vue

@@ -0,0 +1,511 @@
+<template>
+	<view>
+		<view class="top">
+			<image src="../../../static/images/bg.png" mode="widthFix"></image>
+			<view class="title">无忧快捷发货</view>
+		</view>
+		<view class="platform">
+			<view class="step step1">1.选择数据来源平台</view>
+			<radio-group @change="changePlatform">
+				<view class="list">
+					<view :class="item.id == platformId ? 'item active' : 'item'" v-for="(item,index) in platform" :key="index">
+						<text :class="'iconfont icon-'+item.code"></text>
+						{{item.name}}
+						<radio :value="item.id.toString()" />
+					</view>				
+				</view>
+			</radio-group>
+		</view>
+		<view class="address">
+			<view class="step">2.填写收货地址</view>
+			<view class="form">
+				<view class="input">
+					订单号<input type='text' placeholder='请输入订单号(可不填)' placeholder-class='placeholder' v-model="delivery.out_order_id"></input>
+				</view>
+				<view class="input">
+					收货人<input type='text' placeholder='请输入收货人姓名' placeholder-class='placeholder' v-model="delivery.name"></input>
+				</view>
+				<view class="input">
+					手机号<input type='number' placeholder='请输入手机号码' placeholder-class='placeholder' v-model="delivery.mobile"></input>
+				</view>
+				<textarea placeholder-style="color:#ccc;font-size:28rpx;" placeholder="示例: 浙江省 台州市 椒江区 市府大道12号" v-model="delivery.address" />
+			</view>
+		</view>
+		<view class="gift">
+			<view class="step">3.选择赠送礼品</view>
+			<view class="warehouse">
+				<view v-for="(item,index) in warehouse" :key="index" :class='item.id == warehouseId ? "on" : ""' @click='changeWarehouse(index)'>
+					{{item.name}}
+				</view>
+			</view>
+			<radio-group @change="changeProduct" v-if="productList.length > 0">
+				<view class="product" v-for="(item , index) in productList" :key="index">
+					<radio :value="index.toString()" />
+					<image :src="item.img"></image>
+					<view class="info">									
+						<view>{{item.title}}</view>
+						<view class="price">¥{{item.price}}</view>
+						<view class="text">
+							<view>{{item.wget}}kg/件</view>
+							<view>库存{{item.count}}</view>
+						</view>
+					</view>
+				</view>
+			</radio-group>
+			<view class="noProduct" v-else>暂无产品</view>
+		</view>
+		<view class="bottom">
+			<view>
+				<view>礼品金额:<text>¥{{price}}</text>,运费:<text>¥{{freight}}</text></view>
+				<view class="total">总价:<text>¥{{total}}</text></view>
+			</view>
+			<button @click="submit">提交订单</button>
+		</view>
+		
+		<wyb-popup ref="payOrder" type="bottom" height="500" width="400" radius="8">
+			<view class="popup">
+				<view class="title">
+					支付订单<text class="iconfont icon-guanbi" @click='close'></text>
+				</view>
+				<view>支付单号:{{payData.order_id}}</view>
+				<view>商品名称:{{payData.title}}</view>
+				<view>发货数量:{{payData.count}}</view>
+				<view>支付金额:¥{{payData.all_price}}</view>
+				<view>支付方式:
+					<view class="payway">
+						<text class="iconfont icon-yuezhifu"></text>余额支付
+						<image src="../../../static/images/icon.png" mode="widthFix"></image>
+					</view>
+					<view class="balance">账户余额:¥{{payData.user_money}}<text @click="go">充值</text></view>
+				</view>
+				<button @click="pay(payData.order_id)">立即支付</button>
+			</view>
+		</wyb-popup>
+	</view>
+</template>
+
+<script>
+	import {
+		mapGetters
+	} from "vuex";
+	import {
+		toLogin
+	} from '@/libs/login.js';
+	import {		
+		platformList,
+		ApiWarehouse,
+		productList,
+		submitOrder,
+		payOrder,
+		balancePay
+	} from '@/api/api.js';
+	import wybPopup from '@/components/wyb-popup/wyb-popup.vue'
+	export default {
+		components: {
+			wybPopup
+		},
+		data() {
+			return {
+				platform: [],
+				platformId: '',
+				warehouse: [],
+				warehouseData: [],
+				warehouseId: '',
+				expId: '',
+				productList: [],
+				productId: '',
+				delivery: {
+					out_order_id: '',
+					name: '',
+					mobile: '',
+					address: '',
+					shop_name: ''
+				},
+				price: 0,
+				freight: 0,
+				total: 0,
+				payData: {}
+			}
+		},
+		computed: mapGetters(['isLogin']),
+		onLoad() {			
+		    if (this.isLogin) {
+		    	this.getPlatform();
+				this.getWarehouse();
+				this.getProductList();
+		    }else{
+				toLogin();
+			}
+		},
+		methods: {
+			getPlatform: function() {
+				let that = this;
+				platformList().then(res => {
+					that.platform = res.data.list;
+				});
+			},
+			getWarehouse: function() {
+				let that = this;
+				ApiWarehouse().then(res => {
+					that.warehouse = res.data;
+					that.warehouseData = res.data;
+				});
+			},
+			getProductList: function() {
+				let that = this;
+				productList({
+					warehouse: that.warehouseId,
+					countType: 1,
+					pageSize: 5
+				}).then(res => {
+					that.productList = res.data.list;
+				});
+			},
+			changePlatform:function(evt) {
+				let that = this;
+				that.platformId = evt.target.value;
+				that.tabWarehouse(that.platformId);
+				that.warehouseId = that.warehouse[0].id;
+				if(that.warehouse[0].expCode.length > 0){
+					that.expId = that.warehouse[0].expCode[0].id;
+					that.freight = parseFloat(that.warehouse[0].expCode[0].money);
+					that.total = that.price + that.freight;
+				}	
+				that.getProductList();
+			},
+			//选择平台后切换仓库
+			tabWarehouse:function(id){
+			    var data = [];
+			    //判断仓库
+			    for (var i in this.warehouseData) {
+			        var idsAr = this.warehouseData[i].platform_ids.split(',');
+			        if(idsAr.indexOf(id) >= 0) {
+			            data.push(this.warehouseData[i]);
+			        }
+			    }
+			    this.warehouse = data;
+			},
+			changeWarehouse:function(index) {
+				let that = this;
+				if (!that.platformId) return that.$util.Tips({
+					title: '请先选择数据来源平台'
+				});
+				that.warehouseId = that.warehouse[index].id;
+				if(that.warehouse[index].expCode.length > 0){
+					that.expId = that.warehouse[index].expCode[0].id;
+					that.freight = parseFloat(that.warehouse[index].expCode[0].money);
+					that.total = that.price + that.freight;
+				}else{
+					that.freight = 0;
+					that.total = that.price + that.freight;
+				}
+				that.getProductList();
+			},
+			changeProduct:function(evt) {
+				let that = this;
+				if (!that.platformId) return that.$util.Tips({
+					title: '请先选择数据来源平台'
+				});
+				let index = evt.target.value;
+				that.productId = that.productList[index].id;
+				that.price = parseFloat(that.productList[index].price);
+				that.total = that.price + that.freight;
+			},
+			submit: function() {
+				let that = this;
+				if (!that.platformId) return that.$util.Tips({
+					title: '请选择数据来源平台'
+				});
+				if (!that.delivery.name) return that.$util.Tips({
+					title: '请输入收货人姓名'
+				});
+				if (!that.delivery.mobile) return that.$util.Tips({
+					title: '请输入手机号码'
+				});
+				if (!(/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.delivery.mobile))) return that.$util.Tips({
+					title: '请输入正确的手机号码'
+				});
+				if (!that.delivery.address) return that.$util.Tips({
+					title: '请输入收货地址'
+				});
+				if (!that.productId) return that.$util.Tips({
+					title: '请选择赠送礼品'
+				});
+				let orderAr = [];
+				orderAr.push(that.delivery);
+				submitOrder({					
+					platformId: that.platformId,
+					warehouseId: that.warehouseId,
+					proId: that.productId,					
+					expId: that.expId,
+					orderAr: orderAr,
+					mono: ''
+				}).then(res => {
+					payOrder({'order_id':res.data.order_id}).then(res => {
+						that.payData = res.data;
+						that.$refs.payOrder.show();
+					});					
+				}).catch(err => {
+					that.$util.Tips({
+						title: err
+					});
+				});
+			},
+			close() {
+				this.$refs.payOrder.hide();
+			},
+			pay: function(order_id) {
+				let that = this;
+				balancePay({'order_id':order_id}).then(res => {
+					that.$util.Tips({
+						title:res.data.msg
+					},{
+						tab: 2,
+						url: '/pages/users/order/index?status=1'
+					})
+				}).catch(err => {
+					that.$util.Tips({
+						title: err
+					});
+				});
+			},
+			go() {
+				uni.navigateTo({
+					url: `/pages/users/recharge/index`
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.top{
+		background: #ff5c00;
+		position: relative;
+		image{
+			width:100%;
+		}
+		.title{
+			position: absolute;
+			top:50rpx;
+			left:30rpx;
+			font-size: 46rpx;
+			color:#fff;
+		}
+	}
+	.step{
+		font-weight: 600;
+		color:#262626;
+		margin-bottom: 20rpx;
+	}
+	.platform{
+		background: #fff;
+		width:700rpx;
+		margin: -200rpx 25rpx 0 25rpx;
+		padding: 30rpx 10rpx;
+		border-radius: 20rpx;
+		position: relative;
+		z-index: 100;
+		.step1{
+			padding-left: 10rpx;
+		}
+		.list{
+			display: flex;
+			flex-wrap: wrap;
+			.item{
+				width:320rpx;
+				margin: 10rpx;
+				border: 1px solid #ddd;
+				border-radius: 4rpx;
+				display: flex;
+				align-items: center;
+				padding: 0 15rpx;
+				line-height: 92rpx;
+				.iconfont{
+					font-size: 45rpx;
+					margin-right: 15rpx;
+				}
+				.icon-taobao{color:#FF780A;font-size: 50rpx;}
+				.icon-t1688{color:#FF5400;font-size: 65rpx;margin-right: 0;}
+				.icon-jd{color:#E0251B;}
+				.icon-pdd{color:#E12E24;}
+				.icon-othen{color:#488EFF;}
+				radio{
+					flex-grow:1;
+					text-align: right;
+				}				
+			}
+			.active{
+				border: 1px solid #ff5c00;
+			}
+		}
+	}
+	.address{
+		background: #fff;
+		width:700rpx;
+		margin:20rpx 25rpx 0 25rpx;
+		padding: 30rpx 20rpx;
+		border-radius: 10rpx;
+		.form{
+			.input{
+				display: flex;
+				padding: 20rpx 0;
+				border-bottom: 1px solid #eee;				
+				input{
+					margin-left: 40rpx;
+					font-size: 28rpx;
+					.placeholder{
+						color:#ccc;
+						font-size: 28rpx;
+					}
+				}
+			}
+			textarea{
+				height:120rpx;
+				padding-top: 20rpx;
+				font-size: 28rpx;
+			}
+		}
+	}
+	.gift{
+		background: #fff;
+		width:700rpx;
+		margin:20rpx 25rpx 140rpx 25rpx;
+		padding: 30rpx 20rpx;
+		border-radius: 10rpx;
+		.warehouse{
+			display: flex;
+			flex-wrap: wrap;
+			margin: 30rpx 0 10rpx 0;
+			view{
+				padding: 10rpx 7rpx;
+				margin-bottom: 10rpx;
+				border: 1rpx solid #eee;
+			}
+			view:nth-child(odd){
+				margin-right: 10rpx;
+			}
+			.on{
+				border: 1rpx solid #ff5c00;
+				color: #ff5c00;
+			}
+		}
+		.product{
+			display: flex;
+			margin-top: 20rpx;
+			radio{
+				line-height: 160rpx;
+				margin-right: 10rpx;
+			}
+			image{
+				width:160rpx;
+				height:160rpx;
+			}
+			.info{
+				padding-left: 20rpx;
+				flex-grow: 1;
+				.price{
+					color: #f5222d;
+					font-size: 32rpx;
+					font-weight: bold;
+					margin-top: 40rpx;
+				}
+				.text{
+					display: flex;
+					justify-content:space-between;
+					font-size: 24rpx;
+					color:#666;
+				}
+			}
+		}
+		.noProduct{
+			text-align: center;
+			height:120rpx;
+			line-height: 120rpx;
+		}
+	}
+	.bottom{
+		background: #fff;
+		position: absolute;
+		bottom: 100rpx;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		width:100%;
+		height:120rpx;
+		padding: 0 32rpx;
+		text{
+			color:#ea312b;
+		}
+		.total{
+			display: flex;
+			align-items: center;
+			text{
+				font-size: 36rpx;
+				font-weight: 600;
+			}
+		}
+		button{
+			width:220rpx;
+			height:80rpx;
+			line-height: 80rpx;
+			background: #ff5c00;
+			color:#fff;
+			font-size: 32rpx;
+			border-radius: 50rpx;
+		}
+	}
+	.popup{
+		padding: 30rpx;
+		view{
+			display: flex;
+			align-items: center;
+			flex-wrap: wrap;
+			margin-bottom: 10rpx;
+		}
+		.title{
+			justify-content: space-between;			
+			font-size: 32rpx;
+			margin-bottom: 20rpx;
+		}
+		.payway{
+			display: flex;
+			position: relative;
+			border: 1rpx solid #ff5c00;
+			border-radius: 8rpx;
+			width: 200rpx;
+			height: 60rpx;
+			line-height: 60rpx;
+			padding-left: 10rpx;
+			.iconfont{
+				color:#ff5c00;
+				margin-right: 5rpx;
+			}
+			image{
+				width:40rpx;
+				position: absolute;
+				bottom: 0;
+				right: 0;
+			}
+		}
+		.balance{
+			margin-left: 140rpx;
+			color:#aaa;
+			text{
+				border: 1rpx solid #ff5c00;
+				color:#ff5c00;
+				margin-left: 30rpx;
+				padding: 3rpx 20rpx;
+				border-radius: 30rpx;
+			}
+		}
+		button{
+			background: #ff5c00;
+			color:#fff;
+			border-radius: 40rpx;
+			font-size: 32rpx;
+			line-height: 80rpx;
+			margin-top: 30rpx;
+		}
+	}
+</style>

+ 358 - 0
pages/users/recharge/index.vue

@@ -0,0 +1,358 @@
+<template>
+	<view>
+		<view class="payment-top acea-row row-column row-center-wrapper">
+			<span class="name">我的余额</span>
+			<view class="pic">
+				¥<span class="pic-font">{{ user.money || 0 }}</span>
+			</view>
+		</view>
+		<view class="payment">
+			<view class="nav acea-row row-around row-middle">
+				<view class="item">充值账户:{{ user.mobile }}</view>
+			</view>
+			<view class='tip picList'>
+				<view class="pic-box pic-box-color acea-row row-center-wrapper row-column" :class="activePic == index ? 'pic-box-color-active' : ''"
+				 v-for="(item, index) in picList" :key="index" @click="picCharge(index, item)">
+					<view class="pic-number-pic">
+						{{ item.name }}<span class="pic-number"></span>
+					</view>
+					<view class="pic-number">{{ item.upname }}</view>
+				</view>
+				<view class="pic-box pic-box-color acea-row row-center-wrapper" :class="activePic == picList.length ? 'pic-box-color-active' : ''"
+				 @click="picCharge(picList.length)">
+					<input type="number" placeholder="其他" v-model="money" class="pic-box-money pic-number-pic" :class="activePic == picList.length ? 'pic-box-color-active' : ''" />
+				</view>
+				<view class="tips-box">
+					<view>支付方式:<text class="iconfont icon-weixinzhifu"></text>微信付款</view>
+					<view>用户协议:
+						<checkbox checked="true"></checkbox>
+						接受<navigator hover-class="none" url="/pages/users/recharge/xieyi">《充值协议》</navigator>
+					</view>
+				</view>		
+			</view>
+			<button class='btn' @click="recharge">立即充值</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapGetters
+	} from "vuex";
+	import {
+		toLogin
+	} from '@/libs/login.js';
+	import {
+		getUserInfo,
+		rechargeInit,
+		wxRecharge
+	} from '@/api/api.js';
+	export default {
+		data() {
+			return {
+				user: {},
+				picList: [],
+				activePic: 0,
+				money: '',
+				rechar_id: '',
+				numberPic: '',
+				code: ''
+			}
+		},
+		computed: mapGetters(['isLogin']),
+		onLoad(options) {			
+		    if (this.isLogin) {
+				getUserInfo().then(res => {
+					this.user = res.data;
+					if(this.$wechat.isWeixin() && !this.user.openid){
+						if(options.code){
+							this.code = options.code;
+						}else{
+							var appID = "wxa9130b2090dfb130"; // 公众号AppID
+							var redirect_uri = "https://babalipin.com/h5/pages/users/recharge/index"; // 授权接口地址
+							var url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + appID + "&redirect_uri=" + redirect_uri + "&response_type=code&scope=snsapi_base&state=1#wechat_redirect";
+							window.location.href = url;
+						}
+					}
+				});
+				this.getRecharge();
+		    }else{
+				toLogin();
+			}
+		},
+		methods: {
+			getRecharge: function() {
+				rechargeInit().then(res => {
+					this.picList = res.data;
+					if (this.picList[0]) {
+						this.rechar_id = this.picList[0].name;
+						this.numberPic = this.picList[0].v;
+					}
+				});
+			},
+			//选择金额
+			picCharge(idx, item) {
+				this.activePic = idx;
+				if (item === undefined) {
+					this.rechar_id = "";
+					this.numberPic = "";
+				} else {
+					this.money = "";
+					this.rechar_id = item.name;
+					this.numberPic = item.v;
+				}
+			},
+			recharge: function() {
+				let that = this;
+				uni.showLoading({
+					title: '正在支付',
+				})
+				let money = parseFloat(that.money);
+				if( that.rechar_id == ''){
+					if(Number.isNaN(money)){
+						return that.$util.Tips({title: '充值金额必须为数字'});
+					}
+					if(money <= 0){
+						return that.$util.Tips({title: '充值金额不能为0'});
+					}
+				}else{
+					money = that.numberPic
+				}
+				wxRecharge({
+					money: money,
+					from: that.$wechat.isWeixin() ? 'weixin' : 'h5',
+					code: that.code
+				}).then(res => {
+					if (res.data.result === undefined) return that.$util.Tips({
+						title: '缺少支付参数'
+					});
+					if (res.data.type == "WECHAT_H5_PAY") {
+						location.replace(res.data.result.mweb_url+'&redirect_url=https%3A%2F%2Fbabalipin.com%2Fh5%2Fpages%2Fmy%2Findex');
+					} else {
+						let response = res.data.result;
+						if (typeof WeixinJSBridge == "undefined") {
+							if (document.addEventListener) {
+								document.addEventListener('WeixinJSBridgeReady', that.onBridgeReady(response), false);
+							} else if (document.attachEvent) {
+								document.attachEvent('WeixinJSBridgeReady', that.onBridgeReady(response));
+								document.attachEvent('onWeixinJSBridgeReady', that.onBridgeReady(response));
+							}
+						} else {
+							that.onBridgeReady(response);
+						}
+					}
+				}).catch(err => {
+					uni.hideLoading();
+					return that.$util.Tips({
+						title: err
+					})
+				});
+			},
+			onBridgeReady: function(response) {
+				let that = this;
+				WeixinJSBridge.invoke(
+					'getBrandWCPayRequest', {
+						"appId": response.appId, //公众号名称,由商户传入
+						"timeStamp": response.timeStamp, //时间戳,自1970年以来的秒数
+						"nonceStr": response.nonceStr, //随机串
+						"package": response.package,
+						"signType": response.signType, //微信签名方式
+						"paySign": response.paySign //微信签名
+					},
+					function(res){
+						WeixinJSBridge.log(res.err_msg);
+						if (res.err_msg == "get_brand_wcpay_request:cancel") {
+							uni.hideLoading();
+							return that.$util.Tips({
+								title: '支付失败'
+							}, {
+								tab: 1,
+								url: '/pages/my/index'
+							});							
+						} else {
+							uni.hideLoading();
+							return that.$util.Tips({
+								title: '支付成功',
+								icon: 'success'
+							}, {
+								tab: 4,
+								url: '/pages/my/index'
+							});
+						}						
+					}
+				);
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	page {
+		width: 100%;
+		height: 100%;
+		background-color: #fff;
+	}
+	
+	.payment {
+		position: relative;
+		top: -60rpx;
+		width: 100%;
+		background-color: #fff;
+		border-radius: 10rpx;
+		padding-top: 25rpx;
+		border-top-right-radius: 39rpx;
+		border-top-left-radius: 39rpx;
+	}
+	
+	.payment .nav {
+		height: 75rpx;
+		line-height: 75rpx;
+		padding: 0 100rpx;
+	}
+	
+	.payment .nav .item {
+		font-size: 30rpx;
+		color: #333;
+	}
+	
+	.payment .nav .item.on {
+		font-weight: bold;
+		border-bottom: 4rpx solid #e83323;
+	}
+	
+	.payment .input {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		border-bottom: 1px dashed #dddddd;
+		margin: 60rpx auto 0 auto;
+		padding-bottom: 20rpx;
+		font-size: 56rpx;
+		color: #333333;
+		flex-wrap: nowrap;
+		
+	}
+	
+	.payment .input text {
+		padding-left: 106rpx;
+	}
+	
+	.payment .input input {
+		padding-right: 106rpx;
+		width: 300rpx;
+		height: 94rpx;
+		text-align: center;
+		font-size: 70rpx;
+	}
+	
+	.payment .placeholder {
+		color: #d0d0d0;
+		height: 100%;
+		line-height: 94rpx;
+	}
+	
+	.payment .tip {
+		font-size: 26rpx;
+		color: #888888;
+		padding: 0 30rpx;
+		margin-top: 25rpx;
+	}
+	
+	.payment .btn {
+		color: #fff;
+		background: #ff5c00;
+		font-size: 30rpx;
+		width: 700rpx;
+		height: 86rpx;
+		border-radius: 50rpx;
+		margin: 46rpx auto 0 auto;
+		line-height: 86rpx;
+	}
+	
+	.payment-top {
+		width: 100%;
+		height: 350rpx;
+		background-color: #ff5c00;
+	
+		.name {
+			font-size: 26rpx;
+			color: rgba(255, 255, 255, 0.8);
+			margin-top: -38rpx;
+			margin-bottom: 30rpx;
+		}
+	
+		.pic {
+			font-size: 32rpx;
+			color: #fff;
+		}
+	
+		.pic-font {
+			font-size: 78rpx;
+			color: #fff;
+		}
+	}
+	
+	.picList {
+		display: flex;
+		flex-wrap: wrap;
+		margin: 30rpx 0;
+	
+		.pic-box {
+			width: 32%;
+			height: auto;
+			border-radius: 20rpx;
+			margin-top: 21rpx;
+			padding: 20rpx 0;
+			margin-right: 12rpx;
+	
+			&:nth-child(3n) {
+				margin-right: 0;
+			}
+		}
+	
+		.pic-box-color {
+			background-color: #f4f4f4;
+			color: #656565;
+		}
+	
+		.pic-number {
+			font-size: 22rpx;
+		}
+	
+		.pic-number-pic {
+			font-size: 38rpx;
+			margin-right: 10rpx;
+			text-align: center;
+		}
+	
+		.pic-box-color-active {
+			background-color: #ff5c00 !important;
+			color: #fff !important;
+		}
+	}
+	.tips-box{
+		margin-top: 70rpx;
+		view{
+			font-size: 28rpx;
+			margin-bottom: 20rpx;
+			display: flex;
+			align-items: center;
+			.iconfont{
+				color:#09bb07;
+				font-size: 45rpx;
+				margin-right: 10rpx;
+			}
+			checkbox{
+				border-radius: 0;
+			}
+			navigator{
+				text-decoration: underline;
+			}
+		}	
+	}
+	.tips-title{
+		margin-top: 20rpx;
+		font-size: 24rpx;
+		color: #333;
+	}
+</style>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 16 - 0
pages/users/recharge/xieyi.vue


+ 131 - 0
pages/users/record/index.vue

@@ -0,0 +1,131 @@
+<template>
+	<view>
+		<view class='bill-details'>
+			<view class='nav acea-row'>
+				<view class='item' :class='type=="all" ? "on":""' @click='changeType("all")'>全部</view>
+				<view class='item' :class='type=="recharge" ? "on":""' @click='changeType("recharge")'>充值</view>
+				<view class='item' :class='type=="consumption" ? "on":""' @click='changeType("consumption")'>消费</view>
+			</view>
+			<view class='sign-record'>
+				<view class='list' v-for="(item,index) in recordList" :key="index">
+					<view class='item'>
+						<view class='listn'>
+							<view class='itemn acea-row row-between-wrapper'>
+								<view>
+									<view class='name line1'>{{item.title}}</view>
+									<view>{{item.time}}</view>
+								</view>
+								<view class='num' v-if="item.code=='recharge'">+{{item.v}}</view>
+								<view class='num font-color' v-else>-{{item.v}}</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class='loadingicon acea-row row-center-wrapper' v-if="recordList.length>0">
+					<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
+				</view>
+				<view v-if="recordList.length == 0">
+					<emptyPage title="暂无账单的记录哦~"></emptyPage>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>	
+	import {
+		mapGetters
+	} from "vuex";
+	import {
+		toLogin
+	} from '@/libs/login.js';
+	import {
+		recordList
+	} from '@/api/api.js';
+	import emptyPage from '@/components/emptyPage.vue'
+	export default {
+		components: {
+			emptyPage
+		},
+		data() {
+			return {
+				loadTitle: '加载更多',
+				loading: false,
+				loadend: false,
+				page: 1,
+				limit: 10,
+				type: 'all',
+				recordList: []
+			};
+		},
+		computed: mapGetters(['isLogin']),
+		onLoad: function(options) {
+			this.type = options.type || 'all';
+			if (this.isLogin) {
+				this.getRecordList();
+			} else {
+				toLogin();
+			}
+		},
+		onReachBottom: function() {
+			this.getRecordList();
+		},
+		methods: {
+			getRecordList: function() {
+				let that = this;
+				if (that.loadend) return;
+				if (that.loading) return;
+				that.loading = true;
+				that.loadTitle = "";
+				let data = {
+					page: that.page,
+					tabType: that.type
+				}
+				recordList(data).then(function(res) {
+					let list = res.data.list,
+					loadend = list.length < that.limit;
+					that.recordList = that.$util.SplitArray(list, that.recordList);
+					that.loadend = loadend;
+					that.loading = false;
+					that.loadTitle = loadend ? "哼~我也是有底线的~" : "加载更多";
+					that.page = that.page + 1;
+				}, function(res) {
+					that.loading = false;
+					that.loadTitle = '加载更多';
+				});
+			},
+			changeType: function(type) {
+				this.type = type;
+				this.loadend = false;
+				this.page = 1;
+				this.$set(this, 'recordList', []);
+				this.getRecordList();
+			}
+		}
+	}
+</script>
+
+<style scoped lang='scss'>
+	.bill-details .nav {
+		background-color: #fff;
+		height: 90rpx;
+		width: 100%;
+		line-height: 90rpx;
+		margin-bottom: 2rpx;
+	}
+
+	.bill-details .nav .item {
+		flex: 1;
+		text-align: center;
+		font-size: 30rpx;
+		color: #282828;
+	}
+
+	.bill-details .nav .item.on {
+		color: #e93323;
+		border-bottom: 3rpx solid #e93323;
+	}
+	.font-color {
+		color: #e93323!important;	
+	}
+</style>

+ 1 - 1
pages/users/register/index.vue

@@ -186,7 +186,7 @@
 						'time': 30
 			    	});
 					that.$store.commit("UPDATE_USERINFO", res.data.user_info);
-			    	const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
+			    	const backUrl = that.$Cache.get(BACK_URL) || "/pages/my/index";
 			    	that.$Cache.clear(BACK_URL);
 			    }).catch(err => {
 			    	that.$util.Tips({

+ 295 - 0
pages/users/retrievePassword/index.vue

@@ -0,0 +1,295 @@
+<template>
+	<view class="reg" :style="{ 'height': setHeight + 'px' }">
+		<view class="title">重置密码</view>
+		<div class="form" v-if="step === 1">
+			<form @submit="submit1" report-submit='true'>
+				<view class="verify">
+					<view class="list">
+						<view class="item">
+							<input type='number' placeholder='填写手机号码' placeholder-class='placeholder' v-model="phone"></input>
+						</view>
+						<view class="item acea-row row-between-wrapper">
+							<input type='number' placeholder='填写验证码' placeholder-class='placeholder' class="codeIput" v-model="yzm"></input>
+							<button class="code font-color" :class="disabled === true ? 'on' : ''" :disabled='disabled' @click="code">
+								{{ text }}
+							</button>
+						</view>
+					</view>
+					<button form-type="submit" class="confirmBnt">立即找回</button>
+				</view>
+			</form>
+			<view class="login">已有账号,<navigator hover-class="none" url="/pages/users/login/index">立即登录?</navigator></view>
+		</div>
+		<div class="form2" v-else>
+			<div class="item">
+				<div class="acea-row row-middle">
+					<input type="password" placeholder="请输入新密码" placeholder-class="placeholder" v-model="password" required />
+				</div>
+			</div>
+			<div class="item">
+				<div class="acea-row row-middle">
+					<input type="password" placeholder="再次确认密码" placeholder-class="placeholder" v-model="qrPassword" required />
+				</div>
+			</div>
+			<button class="btn" @click="submit2">确认修改</button>
+			<button class="back" @click="back">返回</button>
+			<view class="login">已有账号,<navigator hover-class="none" url="/pages/users/login/index">立即登录?</navigator></view>
+		</div>
+	</view>
+</template>
+
+<script>
+	import {
+		ApiForgetYzm, 
+		ApiForget1,
+		ApiForget2
+	} from '@/api/api.js';
+	import CryptoJS from "@/libs/CryptoJS";
+	import sendVerifyCode from "@/mixins/SendVerifyCode";
+	export default {
+		mixins: [sendVerifyCode],
+		data() {
+			return {
+				setHeight: 0,
+				phone:'',
+				yzm:'',
+				step:1,
+				token: '',
+				password: '',
+				qrPassword: ''
+			}
+		},
+		mounted() {
+		    let that = this
+		    uni.getSystemInfo({
+				success: function (res) {
+					that.setHeight = res.windowHeight
+				}
+		    })
+		},
+		methods: {
+			async code() {
+				let that = this;
+				if (!that.phone) return that.$util.Tips({
+					title: '请填写手机号码!'
+				});
+				if (!(/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.phone))) return that.$util.Tips({
+					title: '请输入正确的手机号码!'
+				});
+				var secret_key = "b1bd7a4b8da3e47ce58e73b9e5f656c4";
+				var AES = new CryptoJS.AES(secret_key);
+				await ApiForgetYzm({
+			        mobile: that.phone,
+			        token: AES.encrypt(that.phone),
+			        time: new Date().getTime()
+			    }).then(res => {
+					that.$util.Tips({
+						title: res.msg
+					});
+					that.sendCode();
+				}).catch(err => {
+					return that.$util.Tips({
+						title: err
+					});
+				});
+			},
+			async submit1() {
+				let that = this;
+				if (!that.phone) return that.$util.Tips({
+					title: '请填写手机号码'
+				});
+				if (!(/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.phone))) return that.$util.Tips({
+					title: '请输入正确的手机号码'
+				});
+				if (!that.yzm) return that.$util.Tips({
+					title: '请填写验证码'
+				});
+				if (!/^[\w\d]+$/i.test(that.yzm)) return that.$util.Tips({
+					title: '请输入正确的验证码'
+				});
+				ApiForget1({
+					mobile: that.phone,
+					yzm: that.yzm
+				}).then(res => {
+					that.token = res.data.token;
+					that.step = 2;
+				}).catch(res => {
+					that.$util.Tips({
+						title: res
+					});
+				});
+			},
+			submit2 () {
+				let that = this;
+				if (!that.password) return that.$util.Tips({
+					title: '请输入新密码'
+				});
+				if (that.password.length < 6) return that.$util.Tips({
+					title: '密码不能少于6位'
+				});
+				if (!that.qrPassword) return that.$util.Tips({
+					title: '请输入确认密码'
+				});
+				if (that.qrPassword !== that.password) return that.$util.Tips({
+					title: '二次密码不相等'
+				});
+			    ApiForget2({
+					token: that.token,
+			    	password: that.password,
+			    	qrPassword: that.qrPassword
+			    }).then(res => {
+			    	return that.$util.Tips({
+			    		title: '找回密码成功!',
+			    		icon: 'success'
+			    	}, {
+			    		tab: 2,
+			    		url: '/pages/users/login/index'
+			    	});
+			    }).catch(err => {
+			    	that.$util.Tips({
+			    		title: err
+			    	});
+			    });
+			},
+			back(){
+				this.step = 1;
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.reg{
+		background: #fff;
+	}
+	.title{
+		font-size: 42rpx;
+		text-align: center;
+		padding-top: 60rpx;
+	}
+	.verify .phone {
+		font-size: 32rpx;
+		font-weight: bold;
+		text-align: center;
+		margin-top: 55rpx;
+	}
+	
+	.verify .list {
+		width: 580rpx;
+		margin: 53rpx auto 0 auto;
+	}
+	
+	.verify .list .item {
+		width: 100%;
+		height: 110rpx;
+		border-bottom: 2rpx solid #f0f0f0;
+	}
+	
+	.verify .list .item input {
+		width: 100%;
+		height: 100%;
+		font-size: 32rpx;
+	}
+	
+	.verify .list .item .placeholder {
+		color: #b9b9bc;
+	}
+	
+	.verify .list .item input.codeIput {
+		width: 340rpx;
+	}
+	
+	.verify .list .item .code {
+		font-size: 32rpx;
+		background-color: #fff;
+	}
+	
+	.verify .list .item .code.on {
+		color: #b9b9bc !important;
+	}
+	
+	.verify .confirmBnt {
+		font-size: 32rpx;
+		width: 580rpx;
+		height: 90rpx;
+		border-radius: 45rpx;
+		color: #fff;
+		margin: 92rpx auto 0 auto;
+		text-align: center;
+		line-height: 90rpx;
+		background: #ff5c00;
+	}
+	.form .login{
+		display: flex;
+		justify-content: center;
+		margin-top: 30rpx;
+		navigator{
+			color:#ff5c00;
+		}
+	}
+	.form2{
+		padding: 40rpx;
+		.avatar{
+			width:140rpx;
+			height:140rpx;
+			font-size:22rpx;
+			color:#bbb;
+			border:1rpx dashed #ddd;
+			margin: 20rpx auto;
+			text-align: center;
+			.iconfont{
+				font-size: 50rpx;
+			}
+			image{
+				width:140rpx;
+				height:140rpx;
+			}
+		}
+		.item {
+		    border-bottom: 1rpx solid #ededed;
+		    padding: 45rpx 0 20rpx 0;
+			image{
+				width:40rpx;
+				height:40rpx;
+				margin-right: 20rpx;
+			}
+			input{
+				flex-grow: 1;
+				font-size: 28rpx;
+			}
+			.placeholder{
+				color:#ccc;
+			}
+		}
+		.btn {
+			font-size: 32rpx;
+			width: 580rpx;
+			height: 85rpx;
+			border-radius: 45rpx;
+			color: #fff;
+			margin: 80rpx auto 0 auto;
+			text-align: center;
+			line-height: 85rpx;
+			background: #ff5c00;
+		}
+		.back{
+			font-size: 32rpx;
+			width: 580rpx;
+			height: 85rpx;
+			border-radius: 45rpx;
+			margin: 20rpx auto 0 auto;
+			text-align: center;
+			line-height: 85rpx;
+			border: 1rpx solid #dcdee2;
+			color:#515a6e;
+		}
+		.login{
+			display: flex;
+			justify-content: center;
+			margin-top: 30rpx;
+			navigator{
+				color:#ff5c00;
+			}
+		}
+	}
+</style>

+ 105 - 0
pages/users/spread/index.vue

@@ -0,0 +1,105 @@
+<template>
+	<view class="page" :style="{ 'height': setHeight + 'px' }">
+		<image src="../../../static/images/spread.png" mode="widthFix" class="image"></image>
+		<button class="share" @click='copy'>分享H5 邀请好友</button>
+		<view class="qrcode">
+			<image :src="qrcode"></image>
+		</view>
+		<view class="tip">佣金计算方式=好友支付订单包裹数 * 0.05元/单</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapGetters
+	} from "vuex";
+	import {
+		toLogin
+	} from '@/libs/login.js';
+	import {		
+		spreadLink
+	} from '@/api/api.js';
+	import Qr from "@/utils/wxqrcode.js";
+	import H5Api from '@/utils/ican-H5Api.js'
+	export default {
+		data() {
+			return {
+				link:'',
+				qrcode: '',
+				setHeight: 0
+			}
+		},
+		computed: mapGetters(['isLogin']),
+		mounted() {
+		    let that = this
+		    uni.getSystemInfo({
+				success: function (res) {
+					that.setHeight = res.windowHeight
+				}
+		    })
+		},
+		onLoad() {
+		    if (this.isLogin) {
+		    	this.getSpreadLink();				
+		    }else{
+				toLogin();
+			}
+		},
+		methods: {
+			getSpreadLink: function() {
+				let that = this;
+				spreadLink().then(res => {
+					that.link = window.location.protocol+"//"+window.location.host + res.data.url3;
+					that.qrcode = Qr.createQrCodeImg(that.link, {typeNumber: 7});
+				});
+			},
+			copy: function() {
+				uni.setClipboardData({ 
+					data: '我发现一个电商人必备的礼品代发网站,注册网址是 ' + this.link,
+					success:function(){
+						uni.showToast({
+							title: '复制成功'
+						})
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.page{background: #fff6d7;}
+	.image{
+		width:100%;
+		vertical-align: bottom;
+	}
+	.share{
+		width:90%;
+		margin: 0 auto;
+		margin-top: 60rpx;
+		line-height: 88rpx;
+		border-radius: 60rpx;
+		font-size: 32rpx;
+		color:#fff;
+		background: linear-gradient(rgb(255, 142, 109) 0%, rgb(255, 53, 22) 100%);
+	}
+	.qrcode{
+		width:220rpx;
+		height:220rpx;
+		background: #fff;
+		margin: 0 auto;
+		margin-top: 50rpx;
+		image{
+			width:200rpx;
+			height:200rpx;
+			margin-top: 10rpx;
+			margin-left: 10rpx;
+		}
+	}
+	.tip {
+	    color: #983f3f;
+	    line-height: 40rpx;
+	    margin-top: 30rpx;
+	    text-align: center;
+	}
+</style>

BIN
static/images/bg.jpg


BIN
static/images/bg.png


BIN
static/images/empty-box.png


BIN
static/images/icon.png


BIN
static/images/noOrder.png


BIN
static/images/order1.png


BIN
static/images/order2.png


BIN
static/images/order3.png


BIN
static/images/order4.png


BIN
static/images/order5.png


BIN
static/images/orderTime.png


BIN
static/images/spread.png


BIN
static/images/ys1.png


BIN
static/images/ys2.png


BIN
static/images/ys3.png


BIN
static/images/ys4.png


BIN
static/images/ys5.png


BIN
static/images/ys6.png


BIN
static/images/ys7.png


BIN
static/images/ys8.png


+ 71 - 0
utils/ican-H5Api.js

@@ -0,0 +1,71 @@
+//#ifdef H5
+/** clipboard.js v2.0.4**/
+!function(t,e){try{window.ClipboardJS=e();}catch(e){};"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(n){var o={};function r(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}
+  return r.m=n,r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}
+  return function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}}(),a=o(n(1)),c=o(n(3)),u=o(n(4));function o(t){return t&&t.__esModule?t:{default:t}}
+  var l=function(t){function o(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return n.resolveOptions(e),n.listenClick(t),n}
+    return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,c.default),i(o,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===r(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,u.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new a.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return s("action",t)||'copy'}},{key:"defaultTarget",value:function(t){var e=s("target",t);if(e){return document.querySelector(e)}}},{key:"defaultText",value:function(t){return s("text",t)||this.text}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),o}();function s(t,e){var n="data-clipboard-"+t;let isFun=e&&typeof e.hasAttribute==='function';if(isFun&&e.hasAttribute(n)){return e.getAttribute(n)}}
+  t.exports=l},function(t,e,n){"use strict";var o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}
+  return function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}}(),a=n(2),c=(o=a)&&o.__esModule?o:{default:o};var u=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}
+  return i(e,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,c.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,c.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}
+      this.handleResult(e)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),e}();t.exports=u},function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}
+  return e}},function(t,e){function n(){}
+  n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}
+      return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,a=o.length;i<a;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=n},function(t,e,n){var d=n(5),h=n(6);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!d.string(e))throw new TypeError("Second argument must be a String");if(!d.fn(n))throw new TypeError("Third argument must be a Function");if(d.node(t))return s=e,f=n,(l=t).addEventListener(s,f),{destroy:function(){l.removeEventListener(s,f)}};if(d.nodeList(t))return a=t,c=e,u=n,Array.prototype.forEach.call(a,function(t){t.addEventListener(c,u)}),{destroy:function(){Array.prototype.forEach.call(a,function(t){t.removeEventListener(c,u)})}};if(d.string(t))return o=t,r=e,i=n,h(document.body,o,r,i);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,a,c,u,l,s,f}},function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e,n){var a=n(7);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=a(t.target,n),t.delegateTarget&&o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}
+  t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},function(t,e){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}
+  t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}}])});let Types={isFunction:function(obj){var type=Object.prototype.toString.call(obj)
+    return type=='[object Function]'},isObject:function(obj){var type=Object.prototype.toString.call(obj)
+    return type=='[object Object]'},isString:function(obj){var type=Object.prototype.toString.call(obj)
+    return type=='[object String]'}}
+uni.setClipboardData=function(options){let emptyFun=function(){}
+  let config={data:null,event:null,success:emptyFun,fail:emptyFun,complete:emptyFun}
+  if(options&&Types.isObject(options)){config=Object.assign({},config,options)}
+  if(options&&Types.isString(options)){config=Object.assign({},config,{data:options})}
+  let data=config.data
+  let success=config.success||emptyFun
+  let fail=config.fail||emptyFun
+  let complete=config.complete||emptyFun
+  let e=config.event||window.event||{}
+  let cb=new ClipboardJS('.null',{text:()=>data})
+  cb.on('success',function(res){
+    window.__clipboard__=data;
+    success&&Types.isFunction(success)&&success({data:res.text})
+    complete&&Types.isFunction(complete)&&complete()
+    cb.off('error')
+    cb.off('success')
+    cb.destroy()})
+  cb.on('error',function(err){fail&&Types.isFunction(fail)&&fail(err)
+    complete&&Types.isFunction(complete)&&complete()
+    cb.off('error')
+    cb.off('success')
+    cb.destroy()})
+  cb.onClick(e)};
+uni.getClipboardData=function(options){let emptyFun=function(){}
+    let config={data:null,event:null,success:emptyFun,fail:emptyFun,complete:emptyFun}
+    if(options&&Types.isObject(options)){config=Object.assign({},config,options)}
+    let success=config.success||emptyFun
+    let fail=config.fail||emptyFun
+    let complete=config.complete||emptyFun
+    if(window.__clipboard__!==undefined){success&&Types.isFunction(success)&&success({data:window.__clipboard__})}else{fail&&Types.isFunction(fail)&&fail({data:null})}
+    complete&&Types.isFunction(complete)&&complete()};
+function fileDownLoad(data){var linkElement=document.createElement('a')
+  linkElement.setAttribute('href',data.blob)
+  linkElement.setAttribute('downLoad',data.name)
+  linkElement.click()}
+uni.saveImageToPhotosAlbum=uni.saveVideoToPhotosAlbum=function(options){let emptyFun=function(){}
+  let config={filePath:null,success:emptyFun,fail:emptyFun,complete:emptyFun}
+  if(options&&Types.isObject(options)){config=Object.assign({},config,options)}
+  if(options&&Types.isString(options)){config=Object.assign({},config,{filePath:options})}
+  let filePath=config.filePath
+  let success=config.success||emptyFun
+  let fail=config.fail||emptyFun
+  let complete=config.complete||emptyFun
+  if(!filePath){fail&&Types.isFunction(fail)&&fail({msg:'no File'})
+    complete&&Types.isFunction(complete)&&complete()
+    return}
+  let names=filePath.split('/')
+  let name=names[names.length-1]
+  uni.downloadFile({url:filePath,success:function(res){let tempFilePath=res.tempFilePath
+      fileDownLoad({name:name,blob:tempFilePath})
+      success&&Types.isFunction(success)&&success({filePath:filePath})},fail:function(err){fail&&Types.isFunction(fail)&&fail({msg:err})},complete:function(){complete&&Types.isFunction(complete)&&complete()}})}
+//#endif

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 987 - 0
utils/wxqrcode.js


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio