lhl преди 1 година
родител
ревизия
c37ff9b1c4

+ 16 - 0
api/index.js

@@ -1,4 +1,5 @@
 import request from '@/utils/request'
+import exp from 'constants';
 
 // 促销商品
 export function groom4(data) {
@@ -50,3 +51,18 @@ export function orderVerific(data) {
 		data
 	});
 }
+
+export function getArtList(data,id) {
+	return request({
+		url: '/api/article/list/' + id,
+		method: 'get',
+		data
+	});
+}
+
+export function getDetail(id) {
+	return request({
+		url: '/api/article/details/' + id,
+		method: 'get'
+	});
+}

+ 17 - 0
api/wallet.js

@@ -130,3 +130,20 @@ export function setBank(data) {
 		data
 	});
 }
+
+
+export function getRecharge(data) {
+	return request({
+		url: '/api/recharge/index',
+		method: 'get',
+		data
+	});
+}
+
+export function rechargeAli(data) {
+	return request({
+		url: '/api/recharge/ali',
+		method: 'post',
+		data
+	});
+}

+ 181 - 0
components/xzw-notice/xzw-notice.vue

@@ -0,0 +1,181 @@
+<template>
+	<view class="xzw_notice" :style="{color:getColor(theme),backgroundColor:getBgColor(theme)}">
+		<uni-icons v-if="showIcon === true || showIcon === 'true'" class="notice_left" type="sound" :color="getColor(theme)" size="22" />
+		<!-- 垂直滚动用到轮播组件 -->
+		<swiper class="notice_center" vertical v-if="direction=='column'" :autoplay="true" :interval="speed=='fast'?4000:speed=='normal'?6000:10000" :duration="500" :circular="true" disable-touch>
+			<swiper-item v-for="(item, index) in list" :key="index" class="swiperIn" @click="goItem(item)">
+				<view>{{item[theKey]}}</view>
+			</swiper-item>
+		</swiper>
+		<!-- 水平滚动取第一条公告 -->
+		<view class="notice_center2" v-else>
+			<view :class="speed">{{list[rowIndex][theKey]}}</view>
+		</view>
+		<view class="notice_right" v-if="showMore">
+			<view @click="goMore">更多</view>
+		</view>
+	</view>
+</template>
+<script>
+	export default {
+		name: "xzw-notice",
+		props: {
+			//主题色,default|primary|error|warning|success|info
+			theme: {
+				type: String,
+				default: 'default'
+			},
+			// 是否显示左侧icon
+			showIcon: {
+				type: [Boolean, String],
+				default: true
+			},
+			// 是否显示更多
+			showMore: {
+				type: [Boolean, String],
+				default: true
+			},
+			//公告数组,必须是二维数组
+			list: {
+				type: Array,
+				default () {
+					return [{ id: 1, title: '公告1' }, { id: 2, title: '公告2' }]
+				}
+			},
+			//公告数组的键名
+			theKey: {
+				type: String,
+				default: 'title'
+			},
+			//方向,column垂直,row水平时取第一条公告
+			direction: {
+				type: String,
+				default: 'column'
+			},
+			//滚动速度,快fast,慢slow,默认normal
+			speed: {
+				type: String,
+				default: 'normal'
+			}
+		},
+		data() {
+			return {
+				rowIndex: 0
+			}
+		},
+		methods: {
+			getColor(theme) {
+				if (theme == "primary") {
+					return "#2979FF"
+				} else if (theme == "error") {
+					return "#FA3534"
+				} else if (theme == "warning") {
+					return "#FF9A43"
+				} else if (theme == "success") {
+					return "#1BBF6C"
+				} else if (theme == "info") {
+					return "#909399"
+				}else if(theme.indexOf('#') != -1) {
+					return theme
+				} else {
+					return "#303133"
+				}
+			},
+			getBgColor(theme) {
+				if (theme == "primary") {
+					return "#ECF5FF"
+				} else if (theme == "error") {
+					return "#FEF0F0"
+				} else if (theme == "warning") {
+					return "#FDF6EC"
+				} else if (theme == "success") {
+					return "#DBF1E1"
+				} else if (theme == "info") {
+					return "#F4F4F5"
+				} else {
+					return "#FFFFFF"
+				}
+			},
+			// 点击公告
+			goItem(item) {
+				this.$emit('goItem', item)
+			},
+			//点击更多
+			goMore() {
+				this.$emit('goMore')
+			}
+		},
+		created() {
+			if (this.direction == "row") {
+				let time = this.speed == "fast" ? 4000 : this.speed == "normal" ? 6000 : 10000
+				setInterval(() => {
+					if (this.rowIndex == this.list.length - 1) {
+						this.rowIndex = 0;
+					} else {
+						this.rowIndex++;
+					}
+				}, time);
+			}
+		}
+	}
+</script>
+<style lang="scss">
+	.xzw_notice {
+		font-size: 26upx;
+		height: 90upx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 0 20upx;
+		box-sizing: border-box;
+		width: 100%;
+		.notice_left {
+			margin: 0 20upx 0 0;
+		}
+		.notice_center {
+			flex: 1;
+			height: 90upx;
+			.swiperIn {
+				height: 80upx;
+				display: flex;
+				align-items: center;
+				view {
+					overflow: hidden;
+					display: -webkit-box;
+					-webkit-line-clamp: 1;
+					-webkit-box-orient: vertical;
+				}
+			}
+		}
+		.notice_center2 {
+			flex: 1;
+			position: relative;
+			display: flex;
+			align-items: center;
+			height: 90upx;
+			overflow: hidden;
+			view {
+				position: absolute;
+				white-space: nowrap;
+				padding-left: 100%;
+				&.fast {
+					animation: notice 4s linear infinite both;
+				}
+				&.normal {
+					animation: notice 6s linear infinite both;
+				}
+				&.slow {
+					animation: notice 10s linear infinite both;
+				}
+			}
+		}
+		.notice_right {
+			margin: 0 0 0 20upx;
+		}
+		@keyframes notice {
+			100% {
+				transform: translate3d(-100%, 0, 0);
+			}
+		}
+	}
+</style>

+ 233 - 0
components/yk-authpup/yk-authpup.vue

@@ -0,0 +1,233 @@
+<template>
+	<view v-if="showPopup" class="uni-popup" @touchmove.stop.prevent="">
+		<view :class="[type, ani, animation ? 'ani' : '']" class="uni-custom uni-popup__wrapper"
+			@click="close(true)">
+			<view class="uni-popup__wrapper-box">
+				<view :style="[{paddingTop: StatusBar+'px'}]">
+					<view class="title">{{authList[permissionID].title}}</view>
+					<view class="content">{{authList[permissionID].content}}</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'YkAuthpup',
+		props: {
+			// 开启动画
+			animation: {
+				type: Boolean,
+				default: true
+			},
+			//弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层,
+			type: {
+				type: String,
+				default: 'center'
+			},
+			show: {
+				type: Boolean,
+				default: true
+			},
+			permissionID: {
+				type: [String, Number],
+				default: ''
+			}
+		},
+		data() {
+			return {
+				ani: '',
+				showPopup: false,
+				StatusBar:'',
+				authList: {
+					'WRITE_EXTERNAL_STORAGE': {
+						title: "精联惠选对存储空间/照片权限申请说明",
+						content: "便于您使用该功能上传您的照片/图片/视频及用于更换头像、意见反馈、保存相册、下载与客服沟通等场景中读取和写入相册和文件内容。"
+					},
+					'ACCESS_FINE_LOCATION': {
+						title: "精联惠选对地理位置权限申请说明",
+						content: "便于应用程序可以提供基于位置的服务、定位导航、附近搜索等功能。"
+					},
+					'CALL_PHONE': {
+						title: "精联惠选对拨打/管理电话权限申请说明",
+						content: "便于您使用该功能联系买家、骑手或者客服、业务经理与联系等场景下使用"
+					}
+				}
+			}
+		},
+		created() {
+			this.getSystemInfo();
+		},
+		methods: {
+			//获取状态栏高度
+			getSystemInfo(){
+				uni.getSystemInfo({
+				  success: function(e) {
+				    this.StatusBar = e.statusBarHeight;
+				  }
+				})
+			},
+			open() {
+				this.requestPermissions(this.permissionID);
+			},
+			close(type) {
+				this.ani = ''
+				this.$nextTick(() => {
+					setTimeout(() => {
+						this.showPopup = false
+					}, 300)
+				})
+			},
+			//权限检测
+			requestPermissions(permissionID) {
+				let _this = this;
+				let _permissionID;
+				_permissionID = 'android.permission.' + permissionID;
+				// #ifdef APP-PLUS
+				//判断安卓与ios设备
+				if ( plus.os.name =='Android') {
+					plus.android.checkPermission(_permissionID,
+						granted => {
+							if (granted.checkResult == -1) {
+								//还未授权当前查询的权限,打开权限申请目的自定义弹框
+								_this.showPopup = true;
+								_this.$nextTick(() => {
+									setTimeout(() => {
+										_this.ani = 'uni-' + _this.type
+									}, 30)
+								})
+							}
+						},
+						error => {
+							console.log(error.message);
+						}
+					);
+					plus.android.requestPermissions([_permissionID],
+						(e) => {
+							//关闭权限申请目的自定义弹框
+							_this.ani = '';
+							_this.$nextTick(() => {
+								setTimeout(() => {
+									_this.showPopup = false
+								}, 300)
+							})
+							if (e.granted.length > 0) {
+								//当前查询权限已授权,此时可以通知页面执行接下来的操作
+								_this.$emit('changeAuth');
+							}
+						})
+				}else{
+					//IOS不需要,在配置文件的隐私信息访问的许可描述里可添加
+				}
+				// #endif
+			}
+		}
+	}
+</script>
+<style lang="scss">
+	.uni-popup {
+		position: fixed;
+		/*  #ifdef  H5  */
+		top: 0px;
+		// top: 50px;
+		/*  #endif  */
+		/*  #ifndef  H5  */
+		top: 0px;
+		/*  #endif  */
+		bottom: 0;
+		left: 0;
+		right: 0;
+		z-index: 99999;
+		overflow: hidden;
+		&__wrapper {
+			position: absolute;
+			z-index: 999;
+			box-sizing: border-box;
+
+			&.ani {
+				transition: all 0.3s;
+			}
+
+			&.top {
+				top: 0;
+				left: 0;
+				width: 100%;
+				transform: translateY(-100%);
+			}
+
+			&.bottom {
+				bottom: 0;
+				left: 0;
+				width: 100%;
+				transform: translateY(100%);
+			}
+
+			&.right {
+				bottom: 0;
+				left: 0;
+				width: 70%;
+				transform: translateY(100%);
+			}
+
+			&.center {
+				width: 100%;
+				height: 100%;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				transform: scale(1.2);
+				opacity: 0;
+			}
+
+			&-box {
+				position: relative;
+				box-sizing: border-box;
+			}
+
+			&.uni-custom {
+				& .uni-popup__wrapper-box {
+					// border-radius: 20upx 20upx 0 0;
+					padding: 30upx;
+					background: #fff;
+					.title{
+						font-size: 32rpx;
+						font-weight: bold;
+					}
+					.content{
+						margin-top: 16rpx;
+						line-height: 1.6;
+					}
+				}
+
+				&.center {
+					& .uni-popup__wrapper-box {
+						position: relative;
+						max-width: 80%;
+						max-height: 80%;
+						overflow-y: scroll;
+					}
+				}
+
+				&.top,
+				&.bottom {
+					& .uni-popup__wrapper-box {
+						width: 100%;
+						max-height: 1000upx;
+						// overflow-y: scroll;
+					}
+				}
+			}
+
+			&.uni-top,
+			&.uni-bottom {
+				transform: translateY(0);
+			}
+
+			&.uni-center {
+				transform: scale(1);
+				opacity: 1;
+			}
+		}
+	}
+</style>

+ 9 - 4
manifest.json

@@ -2,8 +2,8 @@
     "name" : "精联惠选",
     "appid" : "__UNI__991D0D9",
     "description" : "精联惠选",
-    "versionName" : "1.1.5",
-    "versionCode" : 115,
+    "versionName" : "1.2.0",
+    "versionCode" : 120,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */
@@ -17,7 +17,8 @@
         "modules" : {
             "Barcode" : {},
             "Camera" : {},
-            "VideoPlayer" : {}
+            "VideoPlayer" : {},
+            "Payment" : {}
         },
         /* 模块配置 */
         "distribute" : {
@@ -49,7 +50,11 @@
                 "maps" : {},
                 "oauth" : {},
                 "geolocation" : {},
-                "payment" : {},
+                "payment" : {
+                    "alipay" : {
+                        "__platform__" : [ "android" ]
+                    }
+                },
                 "push" : {},
                 "share" : {},
                 "speech" : {},

+ 7 - 0
pages.json

@@ -13,6 +13,13 @@
 				"navigationStyle": "custom"
 			}
 		},
+		{
+			"path": "pages/index/artList",
+			"style": {
+				"navigationBarTitleText": "",
+				"navigationStyle": "custom"
+			}
+		},
 		{
 			"path": "pages/index/dkf",
 			"style": {

+ 53 - 173
pages/index/artDetail.vue

@@ -1,186 +1,66 @@
 <template>
-	<view class="center">
-		<view class="hotgoods">
-			<view class="hotgoods-item" v-for="item in list" :key="item.id"
-				@click="navto('/pages/product/product?id=' + item.id + '&isfg=1')" style="height: 520rpx;">
-				<view class="image-wrapper">
-					<image class="image" :src="item.image" mode="scaleToFill"></image>
-				</view>
-				<view class="flex"
-					style="flex-direction: column;justify-content: space-between;align-items: flex-start;height: 170rpx;">
-					<view class="title clamp2">{{item.store_name}}</view>
-					<view class="hot-price">
-						<view class="price">
-							<text class="font-size-sm"></text>
-							¥{{ item.price * 1 }}
-						</view>
-						<view class="yuanPrice" v-if="item.ot_price*1 > item.price*1">¥{{ item.ot_price*1 }}</view>
-					</view>
-				</view>
-
-			</view>
-		</view>
-		<uni-load-more :status="loadingType"></uni-load-more>
+	<view class="container">
+	<view class="notice-item">
+		<jyf-parser :html="description" ref="article"></jyf-parser>
+	</view>
 	</view>
 </template>
 
 <script>
-	import {
-		loadIndexs,
-		groom1
-	} from '@/api/index.js';
-	export default {
-		data() {
-			return {
-				id: '',
-				list: [],
-				page: 1,
-				limit: 10,
-				loadingType: 'more'
-			};
+	import { getDetail ,  } from '@/api/index.js';
+	import jyfParser from "@/components/jyf-parser/jyf-parser.vue";
+	export default{
+		components: {
+		   jyfParser
+		 },
+		data(){
+			return{
+				id:'',
+				list:"",
+				description:'',
+				type:0,
+				
+			}
 		},
-		onLoad() {
-			this.loadData();
+		onLoad(option) {
+			this.id = option.id;
+				this.loadData();
 		},
-		methods: {
-			loadData() {
-				this.loadingType = 'loading'
-				groom1().then(res => {
-					this.list = res.data.list
-					this.loadingType = 'noMore'
-				})
-			},
-			navto(url, type = 0) {
-				if (type == 1) {
-					if (!this.hasLogin) {
-						// 保存地址
-						saveUrl();
-						// 登录拦截
-						interceptor();
-					} else {
-						uni.navigateTo({
-							url,
-							fail() {
-								uni.switchTab({
-									url
-								})
-							}
-						})
-					}
-				} else {
-					uni.navigateTo({
-						url,
-						fail() {
-							uni.switchTab({
-								url
-							})
-						}
-					})
-				}
-			
-			},
+		methods:{
+			loadData(){
+				let obj = this;
+			getDetail(obj.id).then(function(e) {
+				obj.list = e.data;
+				if(obj.list.content != null){
+					obj.description = obj.list.content.replace(/<img/g,"<img style='max-width:100%;height:auto;'");
+				}//小程序商品详情图超出屏幕问题
+			});
+			}
 		}
-	};
+	}
 </script>
 
 <style lang="scss">
-	.hotgoods {
-		margin-top: 38rpx;
-		width: 100%;
-		display: flex;
-		flex-wrap: wrap;
-		padding: 0 20rpx 30rpx;
-		justify-content: space-between;
-
-		.hotgoods-item {
-			width: 345rpx;
-			background-color: #ffffff;
-			border-radius: 12rpx;
-			box-shadow: 0 0 15rpx rgba(0, 0, 0, 0.2);
-			margin-bottom: 15rpx;
-
-			.image-wrapper {
-				width: 345rpx;
-				height: 345rpx;
-				border-radius: 3px;
-				overflow: hidden;
-				position: relative;
-
-				.image-bg {
-					position: absolute;
-					top: 0;
-					left: 0;
-					right: 0;
-					bottom: 0;
-					width: 100%;
-					height: 100%;
-					opacity: 1;
-					border-radius: 12rpx 12rpx 0 0;
-					z-index: 2;
-				}
-
-				.image {
-					width: 100%;
-					height: 100%;
-					opacity: 1;
-					border-radius: 12rpx 12rpx 0 0;
-				}
-			}
-
-			.title {
-				margin-top: 24rpx;
-				padding: 0 20rpx;
-				font-size: 32rpx;
-				font-weight: 500;
-				color: #333333;
-			}
-
-			.hot-price {
-				display: flex;
-				justify-content: flex-start;
-				align-items: center;
-				// padding: 14rpx 0 30rpx;
-
-				.hotPrice-box {
-					padding: 2rpx 6rpx;
-
-					background: linear-gradient(90deg, #c79a4c, #f9df7f);
-					border-radius: 5rpx;
-					text-align: center;
-					line-height: 28rpx;
-					font-size: 20rpx;
-					font-family: Source Han Sans CN;
-					font-weight: 400;
-					color: #ffffff;
-				}
-
-				.price {
-					margin-left: 10rpx;
-					font-size: 40rpx;
-					color: #ff0000;
-					font-weight: 500;
-
-					.jf {
-						font-size: 20rpx;
-					}
-				}
-
-				.yuanPrice {
-					margin-left: 10rpx;
-					font-size: 20rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					text-decoration: line-through;
-					color: #999999;
-				}
-
-				.cart-icon {
-					image {
-						width: 44rpx;
-						height: 44rpx;
-					}
-				}
-			}
+page {
+	min-height: 100%;
+	background:#FFFFFF;
+}
+.notice_name {
+	font-size: 35rpx !important;
+	color: #303133;
+	padding: 25rpx 25rpx 0rpx 25rpx;
+	margin-bottom: 25rpx;
+}
+.course-video{
+			width: 100%;
+			height: 500rpx;
 		}
-	}
+.notice-item {
+	width: 100%;
+	height: 100%;
+	color: #666666;
+	padding: 35rpx 35rpx;
+	font-size: 23rpx;
+	padding-bottom: 30rpx;
+}
 </style>

+ 117 - 0
pages/index/artList.vue

@@ -0,0 +1,117 @@
+<template>
+	<view class="item">
+		<view class="love-item" v-for="item in list" :key="item.id" @click="Jump(item.id)">
+			<image :src="item.image_input[0]" mode=""></image>
+			<view class="content">
+				<view class="title">
+					{{item.title}}
+				</view>
+				<view class="time">
+					{{item.add_time | time}}
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { getArtList} from '@/api/index.js';
+	export default {
+		data() {
+			return {
+				list: [],
+				id: 0,
+			}
+		},
+		onLoad(opt) {
+			if(opt.id) {
+				this.id = opt.id
+			}
+			this.loadData()
+		},
+		onShow() {
+		},
+		filters: {
+			time(val) {
+				if( val / 1000000000000 < 1){
+					val = val*1000
+				}
+				let date = new Date(val)
+				console.log(val,date)
+				let Y = date.getFullYear()
+				let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth()+1) :( date.getMonth()+1)
+				let D = date.getDate()< 10 ? '0' + date.getDate() : date.getDate()
+				let h = date.getHours()< 10 ? '0' + date.getHours() : date.getHours()
+				let m = date.getMinutes()< 10 ? '0' + date.getMinutes() : date.getMinutes()
+				let s = date.getSeconds()< 10 ? '0' + date.getSeconds() : date.getSeconds()
+				return Y + '-' + M + '-' + D + ' ' + h +':' + m + ':' + s
+			}
+		},
+		methods:{
+			navTo(url) {
+				uni.navigateTo({
+					url
+				})
+			},
+			loadData(){
+				let obj = this;
+				getArtList({
+					page: 1,
+					limit: 100
+				},obj.id).then(({ data }) => {
+					console.log(data);
+					obj.list = data;
+				});
+			},
+			Jump(id) {
+				uni.navigateTo({
+					url:"/pages/index/artDetail?id="+id
+				})	
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	// .item {}
+	.item {
+		background-color: #fff;
+		
+	}
+	.love-item {
+		margin: 0 auto;
+		width: 702rpx;
+		height: 208rpx;
+		border-bottom: 1px solid #EEEEEE;
+		display: flex;
+		justify-content: flex-start;
+		align-items: center;
+		image {
+			width: 160rpx;
+			height: 160rpx;
+			background-color: #eee;
+		}
+		.content {
+			height: 160rpx;
+			padding-left: 16rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-between;
+			
+			.title {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #333333;
+				// line-height: 39px;
+			}
+			.time {
+				font-size: 26rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+			}
+		}
+		
+	}
+</style>

+ 37 - 0
pages/index/index.vue

@@ -29,6 +29,12 @@
 			</view>
 		</view>
 		<!-- 分类 ed -->
+		<!-- 公告 start -->
+		<view class="notice" v-if="list.length > 0">
+			<xzw-notice  theme="#ff5050" :list="list" @goItem="goItem" @goMore="goMore"/>
+		</view>
+		
+		<!-- 公告 end -->
 		<view class="jg">
 		</view>
 		<!-- #ifdef APP-PLUS -->
@@ -86,8 +92,10 @@
 </template>
 
 <script>
+	import { xzwNotoce} from '@/components/xzw-notice/xzw-notice.vue'
 	import {
 		loadIndexs,
+		getArtList,
 		groom1
 	} from '@/api/index.js';
 	import {
@@ -115,8 +123,12 @@
 	} from '@/utils/wxAuthorized';
 	// #endif
 	export default {
+		components: {
+			xzwNotoce
+		},
 		data() {
 			return {
+				list: [],
 				muted: false,
 				cateList: [
 					{
@@ -272,6 +284,7 @@
 		onShow: function() {
 			this.getGoodList()
 			this.loadData();
+			this.getArtList()
 		},
 		onHide() {
 			console.log('滴答滴答滴答滴答滴答滴答的')
@@ -286,6 +299,26 @@
 			// this.$refs.inv.pause()
 		},
 		methods: {
+			getArtList() {
+				getArtList({
+					page: 1,
+					limit: 100
+				},2).then(({ data }) => {
+					this.list = data;
+				});
+			},
+ 			goItem(e) {
+				console.log('bbbbbbbbbb',e);
+				uni.navigateTo({
+					url: '/pages/index/artDetail?id=' + e.id
+				})
+			},
+			goMore() {
+				console.log('dddddddddd');
+				uni.navigateTo({
+					url: '/pages/index/artList?id=2'
+				})
+			},
 			gogogo(item) {
 				if(!item.path) {
 					uni.navigateTo({
@@ -766,4 +799,8 @@
 	        height: var(--status-bar-height);
 	        width: 100%;
 	    }
+		.notice {
+			padding: 0 30rpx;
+			background-color: #fff;
+		}
 </style>

+ 162 - 13
pages/index/life.vue

@@ -17,10 +17,11 @@
 						{{itemt.num}}元
 					</view>
 					<view class="base-price">
-						官方¥{{itemt.num}}
+						<!-- 官方¥{{itemt.num}} -->
+						赠送:{{(itemt.num*1*pUser.recharge_resumption*0.01).toFixed(0)}}复投积分
 					</view>
 					<view class="price">
-						¥{{(itemt.num * 1 * pUser.recharge_discount*1*0.01).toFixed(2)}}
+						实付{{(itemt.num * 1 * pUser.recharge_discount*1*0.01).toFixed(2)}}
 					</view>
 				</view>
 			</view>
@@ -36,7 +37,7 @@
 		<uni-popup ref="popup" type="bottom">
 			<view class="cz-model">
 				<view class="price">
-					{{choose.price}}
+					{{(choose.num* 1 * pUser.recharge_discount*1*0.01).toFixed(2)}}
 				</view>
 				<view class="">
 					{{choose.goods_name}}
@@ -50,6 +51,23 @@
 				<view class="tip tips">
 					请仔细核对号码。输错号码后果自负
 				</view>
+				<view class="pay-type-list ">
+					<!-- #ifdef APP-PLUS -->
+					<view class="type-item b-b flex" @click="changePayType(2)">
+						<text class="icon iconfont iconzhifubao"></text>
+						<view class="con"><text class="tit">支付宝支付</text></view>
+						<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 2"></radio></label>
+					</view>
+					<!-- #endif -->
+					<view class="type-item" @click="changePayType(3)">
+						<text class="icon iconfont iconyue"></text>
+						<view class="con">
+							<text class="tit">消费积分支付</text>
+							<text>可用消费积分 ¥{{ userInfo.now_money }}</text>
+						</view>
+						<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 3"></radio></label>
+					</view>
+				</view>
 				<view class="btn" @click="goNew">
 					立即充值
 				</view>
@@ -60,6 +78,7 @@
 </template>
 
 <script>
+	import { mapState } from 'vuex';
 	import {
 		getCzList,
 		createCz
@@ -74,9 +93,17 @@
 				content: '',
 				choose: {
 					goods_id: 0
-				}
+				},
+				payType: 3,
+				payName: 'yue'
 			}
 		},
+		computed: {
+			// #ifdef H5
+			...mapState(['weichatObj']),
+			// #endif
+			...mapState('user',['userInfo'])
+		},
 		onLoad() {},
 		onShow() {
 			this.passUser()
@@ -94,6 +121,19 @@
 			})
 		},
 		methods: {
+			//选择支付方式
+			changePayType(type) {
+				this.payType = type;
+				if (this.payType == 1) {
+					this.payName = 'weixin';
+				}
+				if (this.payType == 2) {
+					this.payName = 'ali';
+				}
+				if (this.payType == 3) {
+					this.payName = 'yue';
+				}
+			},
 			passUser() {
 				passUser().then(res => {
 					this.pUser = res.data
@@ -111,22 +151,90 @@
 				if (!this.choose.goods_id) {
 					return this.$api.msg('请选择需要充值的套餐')
 				}
+				// 校验手机
+				let phoneType = this.getMobileOperator(this.phone)
+				if(this.choose.goods_name.indexOf(phoneType) == -1) {
+					this.choose = {}
+					return uni.showModal({
+						title: '温馨提醒',
+						content: `您当前的手机号为${phoneType}号码,与充值套餐的运营商不一致,请重新选择套餐!`,
+						showCancel:false
+					})
+					
+				}
+				
 				this.$refs.popup.open()
 			},
+			getMobileOperator(phoneNumber) {
+			  // 移动号段
+			  var cmccPrefixes = ['134', '135', '136', '137', '138', '139', '150', '151', '152', '157', '158', '159', '182', '183', '184', '187', '188', '178', '147', '172', '198'];
+			  // 联通号段
+			  var cuccPrefixes = ['130', '131', '132', '155', '156', '185', '186', '145', '176', '175', '166'];
+			  // 电信号段
+			  var ctcPrefixes = ['133', '153', '180', '181', '189', '177', '173', '199'];
+			  // 虚拟运营商号段
+			  var virtualPrefixes = ['170', '171'];
+			  var prefix = phoneNumber.substring(0, 3);
+			  
+			  if (cmccPrefixes.includes(prefix)) {
+			    return '移动';
+			  } else if (cuccPrefixes.includes(prefix)) {
+			    return '联通';
+			  } else if (ctcPrefixes.includes(prefix)) {
+			    return '电信';
+			  } else if (virtualPrefixes.includes(prefix)) {
+			    return '虚拟运营商';
+			  } else {
+			    return '未知运营商';
+			  }
+			},
+			// // 示例用法
+			// var phoneNumber = '13812345678';
+			// var operator = getMobileOperator(phoneNumber);
+			// console.log(operator); // 输出: 中国移动
+
 			goNew() {
+				let that = this
+				if(this.payName == 'yue' && this.userInfo.now_money*1 < (this.choose.num * 1 * this.pUser.recharge_discount*1*0.01).toFixed(2)) {
+					return this.$api.msg('当前消费积分不足,请选择其他方式支付!')
+				}
 				createCz({
 					rechargeno: this.phone,
-					pay_type: 'yue',
+					pay_type: this.payName,
 					goods_id: this.choose.goods_id,
-					pay_price: (this.choose.num * 1 * this.pUser.recharge_discount*1*0.01).toFixed(2)
+					pay_price: (this.choose.num * 1 * this.pUser.recharge_discount*1*0.01).toFixed(2),
+					price: this.choose.num
 				}).then(res => {
-					if(res.data.status == 'PAY_DEFICIENCY') {
+					if(res.data.status == 'PAY_DEFICIENCY' ||res.data.status ==  'PAY_ERROR') {
 						this.$api.msg(res.msg)
 					}else {
-						uni.showToast({
-							icon: 'success',
-							title: '充值成功'
-						})
+						if(this.payName == 'ali') {
+							let da = res.data.result.jsConfig;
+							uni.requestPayment({
+							    provider: 'alipay',
+							    orderInfo: da, //微信、支付宝订单数据 【注意微信的订单信息,键值应该全部是小写,不能采用驼峰命名】
+							    success: function (res) {
+							        console.log('success:' + JSON.stringify(res));
+									uni.showToast({
+										icon: 'success',
+										title: '充值成功'
+									})
+									// obj.paySuccessTo();
+							    },
+							    fail: function (err) {
+							        console.log('fail:' + JSON.stringify(err));
+									// uni.navigateTo({
+									// 	url: '/pages/order/order?state=0'
+									// });
+							    }
+							});
+						}else {
+							uni.showToast({
+								icon: 'success',
+								title: '充值成功'
+							})
+						}
+						
 					}
 					this.$refs.popup.close()
 					
@@ -197,12 +305,12 @@
 			padding-top: 40rpx;
 
 			.item {
-				width: 192rpx;
+				// width: 192rpx;
 				border-radius: 20rpx;
 				margin-right: 20rpx;
 				background-color: #e9f1fe;
 				text-align: center;
-				padding: 40rpx 0;
+				padding: 40rpx;
 
 				.num {
 					color: #409EFF;
@@ -305,4 +413,45 @@
 			margin: auto;
 		}
 	}
+	.pay-type-list {
+		margin-top: 20upx;
+		background-color: #fff;
+		padding-left: 60upx;
+		.type-item {
+			height: 120upx;
+			padding: 20upx 0;
+			display: flex;
+			justify-content: flex-start;
+			align-items: center;
+			padding-right: 60upx;
+			font-size: 30upx;
+			position: relative;
+		}
+	
+		.icon {
+			width: 100upx;
+			font-size: 52upx;
+		}
+		.iconyue {
+			color: #fe8e2e;
+		}
+		.iconweixin {
+			color: #36cb59;
+		}
+		.iconzhifubao {
+			color: #01aaef;
+		}
+		.tit {
+			font-size: $font-lg;
+			color: $font-color-dark;
+			margin-bottom: 4upx;
+		}
+		.con {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			font-size: $font-sm;
+			color: $font-color-light;
+		}
+	}
 </style>

+ 8 - 2
pages/index/usert.vue

@@ -43,7 +43,7 @@
 			</view>
 		</view>
 		<view class="tit">
-			我的資產
+			我的资产
 		</view>
 		<view class="bottom-list" v-for="key in navList">
 			<view class="flex list-item">
@@ -59,8 +59,13 @@
 				<view class="btn" v-if="key.agent" @click="goft">
 					复投
 				</view>
+				<!-- #ifdef APP-PLUS -->
+				<view class="btn" @click="navto('/pages/money/recharge')" v-if="key.cz">
+					充值
+				</view>
+				<!-- #endif -->
 				<view class="more" @click="navto('/pages/user/sz?type=' + key.type)">
-					查看明细
+					明细
 				</view>
 				<image src="../../static/icon/back.png" mode="" class="black"></image>
 			</view>
@@ -112,6 +117,7 @@
 						name: '消费积分',
 						val: 'now_money',
 						type:4,
+						cz: true,
 						agent: false,
 						img: '../../static/icon/xc4.png'
 					}

+ 1 - 1
pages/index/zero.vue

@@ -26,7 +26,7 @@
 		</view>
 		<view class="flex banne">
 			<image src="../../static/img/zjf.png" mode="" @click="navto('/pages/zero/task')"></image>
-			<image src="../../static/img/yj.png" mode="" @click="navto('/pages/index/dkf')"></image>
+			<image src="../../static/img/yj.png" mode="" @click="navto('/pages/zero/chou')"></image>
 		</view>
 		<view class="flex nav">
 			<view class="nav-item" v-for="(item,index) in navList" :class="{'action': current == index}"

+ 27 - 2
pages/money/pay.vue

@@ -14,11 +14,11 @@
 				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 1"></radio></label>
 			</view> -->
 			<!-- #ifdef APP-PLUS -->
-			<!-- <view class="type-item b-b" @click="changePayType(2)">
+			<view class="type-item b-b" @click="changePayType(2)">
 				<text class="icon iconfont iconzhifubao"></text>
 				<view class="con"><text class="tit">支付宝支付</text></view>
 				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 2"></radio></label>
-			</view> -->
+			</view>
 			<!-- #endif -->
 			<view class="type-item" @click="changePayType(3)">
 				<text class="icon iconfont iconyue"></text>
@@ -174,6 +174,31 @@ export default {
 						}
 						// #endif
 					}
+					if(obj.payName == 'ali') {
+						
+						//
+						let da = e.data.result.jsConfig;
+						uni.requestPayment({
+						    provider: 'alipay',
+						    orderInfo: da, //微信、支付宝订单数据 【注意微信的订单信息,键值应该全部是小写,不能采用驼峰命名】
+						    success: function (res) {
+						        console.log('success:' + JSON.stringify(res));
+								// obj.paying = false
+								uni.showToast({
+									title:'支付成功',
+									icon:'success'
+								})
+								obj.paySuccessTo();
+						    },
+						    fail: function (err) {
+						        console.log('fail:' + JSON.stringify(err));
+								// obj.paying = false
+								uni.navigateTo({
+									url: '/pages/order/order?state=0'
+								});
+						    }
+						});
+					}
 					uni.hideLoading();
 					obj.payLoding = false;
 				})

+ 414 - 72
pages/money/recharge.vue

@@ -1,13 +1,35 @@
 <template>
 	<view class="content">
-		<view class="row-box">
+		<view class="now">
+			<view>当前余额:</view>
+			<view class="now-money">¥{{new_money}}</view>
+		</view>
+		<view class="main-jg"></view>
+		<view class="add-wrapper">
+			<view class="add-box">
+				<view class="add-log">¥</view>
+				<input type="digit" v-model="money" placeholder="请输入充值金额" placeholder-class="place" @keyup="clearNoNum()" />
+			</view>
+			<view class="jg" style="height: 1px; background-color: #E6E6E6;"></view>
+			<view class="add-tags">
+				<view class="tag " v-for="(item, index) in addTags" :key="item.id" @click="tagClick(index,item)" :class="{ action: currentIndex === index && (money == (item.price *1))}">
+					<view class="price">{{ item.price }}元</view>
+					<view>赠送{{ item.give_money }}</view>
+				</view>
+			</view>
+		</view>
+		<view class="main-jg"></view>
+		<!-- <view class="btn-wrapper">
+			<view class="icon iconfont iconweixin1"><view>微信充值</view></view>
+			<view class="btn" @click="btnClick" :class="{'actiont': isSect}"><image src="../../static/icon/btncz.png" mode="" :class="{'action':!isSect}"></image></view>
+		</view> -->
+		<!-- <view class="row-box">
 			<view class="title">充值金额</view>
 			<view class="row">
 				<text class="tit">¥</text>
 				<input class="input" type="number" v-model="money" placeholder="请输入充值金额" placeholder-class="placeholder" />
 			</view>
-		</view>
-
+		</view> -->
 		<view class="list">
 			<radio-group @change="tabRadio">
 				<!-- #ifdef APP-PLUS -->
@@ -17,47 +39,54 @@
 						<view class="title-box">
 							<view class="title"><text>支付宝充值</text></view>
 						</view>
-						<view class="right"><radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" /></view>
-					</view>
-				</label>
-				<label>
-					<view class="box">
-						<view class="icon iconfont iconweixin1"></view>
-						<view class="title-box">
-							<view class="title"><text>微信充值</text></view>
-							<view class="node"><text>真实姓名(代勇明)</text></view>
-						</view>
-						<view class="right"><radio value="weixin" color=" #5dbc7c" :checked="type == 'weixin'" /></view>
+						<view class="right"><radio value="alipay" color="#ff4c4c" :checked="type == 'alipay'" str/></view>
 					</view>
 				</label>
 				<!-- #endif -->
 			</radio-group>
 		</view>
-		<button class="add-btn up" :class="{ 'active-bg': payLoding }" @click="!payLoding ? confirm() : ''">确认充值</button>
+		<button class="add-btn up" :class="{ 'active-bg': payLoding }" @click="!payLoding ? confirm() : ''">立即充值</button>
+		
 	</view>
 </template>
 
 <script>
 import { getMoneyStyle } from '@/utils/rocessor.js';
 // #ifdef H5
-import { rechargeWechat } from '@/api/wallet.js';
+import { rechargeWechat ,userBalance,getRecharge,rechargeAli} from '@/api/wallet.js';
 // #endif
 // #ifdef MP
-import { rechargeRoutine } from '@/api/wallet.js';
+import { rechargeRoutine ,userBalance,getRecharge} from '@/api/wallet.js';
+// #endif
+// #ifdef APP-PLUS
+import { rechargeRoutine ,userBalance,getRecharge,rechargeAli} from '@/api/wallet.js';
 // #endif
 import { mapState } from 'vuex';
+import { orderData, getUserInfo } from '@/api/user.js';
 export default {
 	filters: {
 		getMoneyStyle
 	},
 	data() {
 		return {
-			type: 'weixin',
-			money: '', //充值金额
-			payLoding: false //是否加载中
+			chooseTc: {
+				id: 0
+			},
+			type: 'alipay',
+			money: 0, //充值金额
+			payLoding: false, //是否加载中
+			addTags: [300, 200, 150, 100, 50],
+			currentIndex: 0,
+			addMoney: 0,
+			isSect: false ,//是否选择微信充值
+			new_money: 0,
+			paying: false
 		};
 	},
-	onLoad(options) {},
+	onLoad(options) {
+		this.userBalance()
+		this.getRecharge()
+	},
 	computed: {
 		// #ifdef H5
 		...mapState(['weichatObj'])
@@ -72,62 +101,185 @@ export default {
 		},
 		// 切换选中对象
 		tabRadio(e) {
-			this.type = e;
+			console.log(e.detail.value)
+			this.type = e.detail.value;
 		},
 		// 提交
 		confirm() {
 			let obj = this;
-			obj.payLoding = true;
-			// #ifdef H5
-			rechargeWechat({ price: this.money, from: this.type })
-				.then(e => {
-					let da = e.data.data;
-					obj.weichatObj.chooseWXPay({
-						timestamp: da.timestamp,
-						nonceStr: da.nonceStr,
-						package: da.package,
-						signType: da.signType,
-						paySign: da.paySign,
-						success: function(res) {
+			if(obj.paying) {
+				return
+			}
+			if(this.money == 0){
+				return this.$api.msg('请输入充值金额');
+			}
+			if(!this.type) {
+				return this.$api.msg('请选择支付方式');
+			}
+			
+			// // #ifndef APP-PLUS
+			// if (wx.requestSubscribeMessage) {
+			//     wx.requestSubscribeMessage({
+			//     	tmplIds: ['HgPU5FHUTwqGNSkJ7IsAP0XkJZV3UUf9fjUWUD3ebZY'],
+			//     	success(res) {
+			//     		console.log(res,'订阅消息')
+			//     	},
+			//     	fail(err) {
+			//     		console.log(err)
+			//     	},
+			//     	complete() {
+			//     		obj.payLoding = true;
+			//     		// #ifdef H5
+			//     		rechargeWechat({
+			//     			price: obj.money,
+			//     			from: obj.type
+			//     		})
+			//     			.then(e => {
+			//     				let da = e.data.data;
+			//     				obj.weichatObj.chooseWXPay({
+			//     					timestamp: da.timestamp,
+			//     					nonceStr: da.nonceStr,
+			//     					package: da.package,
+			//     					signType: da.signType,
+			//     					paySign: da.paySign,
+			//     					success: function(res) {
+			//     						uni.showToast({
+			//     							title: '充值成功',
+			//     							duration: 2000,
+			//     							position: 'top'
+			//     						});
+			//     					}
+			//     				});
+			//     				obj.payLoding = false;
+			//     			})
+			//     			.catch(e => {
+			//     				obj.payLoding = false;
+			//     				console.log(e);
+			//     			});
+			//     		// #endif
+			//     		// #ifdef MP
+			//     		rechargeRoutine({
+			//     			price: obj.money
+			//     		})
+			//     			.then(e => {
+			//     				let da = e.data;
+			//     				wx.requestPayment({
+			//     					timeStamp: da.timestamp,
+			//     					nonceStr: da.nonceStr,
+			//     					package: da.package,
+			//     					signType: da.signType,
+			//     					paySign: da.paySign,
+			//     					success: function(res) {
+			//     						uni.redirectTo({
+			//     							url: '/pages/money/paySuccess?isshow=false'
+			//     						});
+			//     					}
+			//     				});
+			    		
+			//     				obj.payLoding = false;
+			//     			})
+			//     			.catch(e => {
+			//     				obj.payLoding = false;
+			//     				console.log(e);
+			//     			});
+			//     		// #endif
+			//     	}
+			//     })
+			// } else {
+			//     obj.payLoding = true;
+			//     // #ifdef H5
+			//     rechargeWechat({
+			//     	price: obj.money,
+			//     	from: obj.type
+			//     })
+			//     	.then(e => {
+			//     		let da = e.data.data;
+			//     		obj.weichatObj.chooseWXPay({
+			//     			timestamp: da.timestamp,
+			//     			nonceStr: da.nonceStr,
+			//     			package: da.package,
+			//     			signType: da.signType,
+			//     			paySign: da.paySign,
+			//     			success: function(res) {
+			//     				uni.showToast({
+			//     					title: '充值成功',
+			//     					duration: 2000,
+			//     					position: 'top'
+			//     				});
+			//     			}
+			//     		});
+			//     		obj.payLoding = false;
+			//     	})
+			//     	.catch(e => {
+			//     		obj.payLoding = false;
+			//     		console.log(e);
+			//     	});
+			//     // #endif
+			//     // #ifdef MP
+			//     rechargeRoutine({
+			//     	price: this.money
+			//     })
+			//     	.then(e => {
+			//     		let da = e.data;
+			//     		wx.requestPayment({
+			//     			timeStamp: da.timestamp,
+			//     			nonceStr: da.nonceStr,
+			//     			package: da.package,
+			//     			signType: da.signType,
+			//     			paySign: da.paySign,
+			//     			success: function(res) {
+			//     				uni.redirectTo({
+			//     					url: '/pages/money/paySuccess?isshow=false'
+			//     				});
+			//     			}
+			//     		});
+			    
+			//     		obj.payLoding = false;
+			//     	})
+			//     	.catch(e => {
+			//     		obj.payLoding = false;
+			//     		console.log(e);
+			//     	});
+			//     // #endif
+			// }
+			// // #endif
+			// #ifdef APP-PLUS
+			console.log(obj.chooseTc.id)
+			rechargeAli({
+				price: obj.money,
+				rechar_id: obj.chooseTc.id
+			}).then(res => {
+				console.log(res);
+				let data = res.data.data
+				if(obj.type == 'alipay') {
+					uni.requestPayment({
+					    provider: 'alipay',
+					    orderInfo: data, //微信、支付宝订单数据 【注意微信的订单信息,键值应该全部是小写,不能采用驼峰命名】
+					    success: function (res) {
+					        console.log('success:' + JSON.stringify(res));
+							obj.paying = false;
+							obj.money = 0
 							uni.showToast({
-								title: '充值成功',
-								duration: 2000,
-								position: 'top'
-							});
-						}
-					});
-					obj.payLoding = false;
-				})
-				.catch(e => {
-					obj.payLoding = false;
-					console.log(e);
-				});
-			// #endif
-			// #ifdef MP
-			rechargeRoutine({ price: this.money})
-				.then(e => {
-					let da = e.data;
-						wx.requestPayment({
-								timeStamp: da.timestamp,
-								nonceStr: da.nonceStr,
-								package: da.package,
-								signType: da.signType,
-								paySign: da.paySign,
-								success: function(res) {
-									uni.redirectTo({
-										url: '/pages/money/paySuccess'
-									});
-								},
-								
+								title:'支付成功',
+								icon:'success'
 							})
-					
-					obj.payLoding = false;
-				})
-				.catch(e => {
-					obj.payLoding = false;
-					console.log(e);
-				});
+							obj.userBalance()
+					    },
+					    fail: function (err) {
+					        console.log('fail:' + JSON.stringify(err));
+							obj.paying = false
+					    }
+					});
+				}
+			}).catch(err => {
+				console.log(err)
+				obj.paying = false
+			})
 			// #endif
+				
+			
+			
+			
 		},
 		//获取订单列表
 		loadData(source) {
@@ -155,6 +307,40 @@ export default {
 				//判断是否还有数据, 有改为 more, 没有改为noMore
 				navItem.loadingType = 'more';
 			}, 600);
+		},
+		tagClick(index,item) {
+			this.currentIndex = index;
+			this.chooseTc = item
+			this.money = item.price * 1;
+		},
+		clearNoNum() {
+			// this.money = this.money.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3');
+			
+			this.addTags.forEach((item,index) => {
+				if(this.money*1 == item.price*1) {
+					this.chooseTc = item
+					return this.currentIndex = index
+				}else {
+					this.chooseTc = {
+						id: 0
+					}
+				}
+			})
+		},
+		btnClick() {
+			this.isSect = !this.isSect
+		},
+		userBalance() {
+			userBalance().then( res => {
+				this.new_money = res.data.now_money
+				console.log(res)
+			})
+		},
+		getRecharge() {
+			getRecharge().then(res => {
+				console.log(res)
+				this.addTags = res.data.recharge_quota
+			})
 		}
 	}
 };
@@ -163,51 +349,60 @@ export default {
 <style lang="scss">
 page {
 	height: 100%;
+	background-color: #fff;
 }
 
 .add-btn {
 	&.modified {
 		color: $base-color;
 	}
+
 	&.up {
 		background-color: $base-color;
 		color: #fff;
 	}
+
 	display: flex;
 	align-items: center;
 	justify-content: center;
-	width: 690rpx;
-	height: 80rpx;
+	width: 604rpx;
+	height: 90rpx;
 	margin: 0 auto;
 	margin-top: 30rpx;
 	font-size: $font-lg;
 	border-radius: 10rpx;
 	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
 }
+
 .row-box {
 	margin-top: 30rpx;
 	padding: 20rpx 30rpx;
 	background: #fff;
+
 	.title {
 		font-size: $font-base + 2rpx;
 		color: $font-color-dark;
 	}
+
 	.row {
 		display: flex;
 		align-items: center;
 		position: relative;
 		height: 80rpx;
+
 		.tit {
 			flex-shrink: 0;
 			width: 40rpx;
 			font-size: 30rpx;
 			color: $font-color-dark;
 		}
+
 		.input {
 			flex: 1;
 			font-size: 30rpx;
 			color: $font-color-dark;
 		}
+
 		.iconlocation {
 			font-size: 36rpx;
 			color: $font-color-light;
@@ -219,33 +414,41 @@ page {
 		}
 	}
 }
+
 .list {
 	padding-left: 30rpx;
 	margin-top: 30rpx;
 	background-color: #ffffff;
+
 	.box {
 		display: flex;
 		align-items: center;
 		width: 100%;
 		height: 120rpx;
 		border-bottom: 1px solid $border-color-light;
+
 		.icon {
 			font-size: 48rpx;
 			padding-right: 20rpx;
 		}
+
 		.iconweixin1 {
 			color: #18bf16;
 		}
+
 		.iconzhifubao {
 			color: #08aaec;
 		}
+
 		.title-box {
 			flex-grow: 1;
 			text-align: left;
+
 			.title {
 				font-size: $font-base + 2rpx;
 				color: $font-color-base;
 			}
+
 			.node {
 				font-size: $font-sm;
 				color: $font-color-light;
@@ -253,6 +456,7 @@ page {
 		}
 	}
 }
+
 /deep/ .uni-radio-input {
 	width: 45rpx;
 	height: 45rpx;
@@ -261,4 +465,142 @@ page {
 .active-bg {
 	background-color: $color-gray !important;
 }
+
+.now {
+	width: 100%;
+	height: 86rpx;
+	padding: 0 26rpx 0 47rpx;
+	display: flex;
+	justify-content: space-between;
+	line-height: 86rpx;
+	background-color: #fff;
+	// margin-bottom: 21rpx;
+
+	view {
+		font-size: 28rpx;
+		font-weight: 500;
+		color: #333333;
+	}
+
+	.now-money {
+		font-size: 32rpx;
+		font-weight: bold;
+		color: $base-color;
+	}
+}
+
+.add-wrapper {
+	width: 750rpx;
+	padding-left: 30rpx;
+	background: #ffffff;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	// margin-bottom: 22rpx;
+	.add-box {
+		width: 100%;
+		height: 103rpx;
+		display: flex;
+		flex-direction: row;
+		justify-content: space-between;
+		padding: 0 39rpx 0 10rpx;
+		align-items: center;
+
+		.add-log {
+			font-size: 37rpx;
+			font-weight: bold;
+		}
+
+		input {
+			width: 218rpx;
+			height: 30rpx;
+			font-size: 32rpx;
+			font-weight: 500;
+			color: #000;
+			line-height: 40px;
+			text-align: right;
+
+			.place {
+				color: #bfbfbf;
+			}
+		}
+	}
+
+	.jg {
+		width: 100%;
+	}
+
+	.add-tags {
+		padding-top: 47rpx;
+		padding-bottom: 17rpx;
+		display: flex;
+		flex-direction: row;
+		flex-wrap: wrap;
+
+		// justify-content: space-between;
+		.tag {
+			width: 210rpx;
+			
+			background-color: #f0f0f0;
+			border-radius: 4rpx;
+			margin: 0 30rpx 30rpx 0;
+			text-align: center;
+			font-size: 22rpx;
+			padding: 20rpx;
+			.price {
+				font-size: 32rpx;
+				font-weight: 500;
+				padding-bottom: 20rpx;
+			}
+		}
+
+		.action {
+			color: #fff;
+			background-color: $base-color;
+		}
+	}
+}
+.btn-wrapper {
+	padding: 49rpx 32rpx 0 40rpx;
+	height: 183rpx;
+	display: flex;
+	justify-content: space-between;
+	background-color: #fff;
+	.iconweixin1 {
+		color: #18bf16;
+		font-size: 48rpx;
+		display: flex;
+		view {
+			// display: inline-block;
+			height: 48rpx;
+			text-align: 48rpx;
+			padding-left: 20rpx;
+			// padding-top: 10rpx;
+			color: #000000;
+			font-size: 30rpx;
+		}
+	}
+	.btn {
+		width: 36rpx;
+		height: 36rpx;
+		border: 4rpx $base-color solid;
+		border-radius: 8rpx 8rpx;
+		image {
+			// display: none;
+			width: 100%;
+			height: 100%;
+		}
+		.action {
+			display: none;
+		}
+	}
+	.actiont {
+		border:none;
+	}
+}
+.main-jg {
+	width: 100%;
+	height: 21rpx;
+	background-color: #f8f6f6;
+}
 </style>

+ 2 - 2
pages/order/createOrder.vue

@@ -119,10 +119,10 @@
 				<text class="cell-tit clamp">优惠金额</text>
 				<text class="cell-tip red">-¥35</text>
 			</view> -->
-			<!-- <view class="yt-list-cell b-b" v-if="integralAll > 0 && userInfo.level > 0">
+			<view class="yt-list-cell b-b" v-if="integralAll > 0">
 				<text class="cell-tit clamp">积分抵扣{{ '(当前积分:' + integralAll + ')' }}</text>
 				<view class="cell-tip"><radio @click="checkedPoints = !checkedPoints" color="#ff5319" :checked="checkedPoints" /></view>
-			</view> -->
+			</view>
 			<view class="yt-list-cell b-b" v-if="tabCurrentIndex == 0">
 				<text class="cell-tit clamp">运费</text>
 				<text class="cell-tip">{{ Postage }}</text>

+ 1 - 1
pages/public/register.vue

@@ -28,7 +28,7 @@
 				<view class="login_img"><image src="/static/icon/img06.png"></image></view>
 				<view class="login_name flex">
 					<input class="uni-input width" v-model="code" focus placeholder="请输入验证码" />
-					<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
+					<view class="code" @click="verification">{{(countDown == 0 || countDown<0)  ? '验证码' : countDown }}</view>
 				</view>
 			</view>
 			<view><button type="green" @click="register" class="uni-button uni-button-green">注册账号</button></view>

+ 90 - 13
pages/user/sqdl.vue

@@ -20,15 +20,7 @@
 							ref="name" />
 					</view>
 				</view>
-				<view class="bd-wrap flex">
-					<view class="bg-name">
-						手机号:
-					</view>
-					<view class="bg-val">
-						<input type="text" value="" placeholder="请输入手机号" class="val-ipt" v-model="bankInfo.phone"
-							ref="phone" />
-					</view>
-				</view>
+				
 				<view class="bd-wrap flex">
 					<view class="bg-name">
 						银行卡号:
@@ -56,6 +48,15 @@
 							ref="storenamae" />
 					</view>
 				</view>
+				<view class="bd-wrap flex">
+					<view class="bg-name">
+						手机号:
+					</view>
+					<view class="bg-val">
+						<input type="text" value="" placeholder="请输入手机号" class="val-ipt" v-model="bankInfo.phone"
+							ref="phone" />
+					</view>
+				</view>
 			</template>
 			<template v-if="current == 1">
 				<view class="bd-wrap flex">
@@ -85,6 +86,15 @@
 						<image v-else :src="aliInfo.qr" mode="" @click="upimg(1)"></image>
 					</view>
 				</view>
+				<view class="bd-wrap flex">
+					<view class="bg-name">
+						手机号:
+					</view>
+					<view class="bg-val">
+						<input type="text" value="" placeholder="请输入手机号" class="val-ipt" v-model="aliInfo.phone"
+							ref="phone" />
+					</view>
+				</view>
 			</template>
 			<template v-if="current == 2">
 				<view class="bd-wrap flex">
@@ -114,7 +124,26 @@
 						<image v-else :src="wxInfo.qr" mode="" @click="upimg(2)"></image>
 					</view>
 				</view>
+				<view class="bd-wrap flex">
+					<view class="bg-name">
+						手机号:
+					</view>
+					<view class="bg-val">
+						<input type="text" value="" placeholder="请输入手机号" class="val-ipt" v-model="wxInfo.phone"
+							ref="phone" />
+					</view>
+				</view>
 			</template>
+			<!-- <view class="bd-wrap flex">
+				<view class="bg-name">
+					验证码:
+				</view>
+				<view class="bg-val flex">
+					<input type="text" value="" placeholder="请输入验证码" class="val-iptt" v-model="captcha"
+						ref="captcha" />
+					<view class="code"  @click="verification()">{{ countDown == 0 || countDown<0 ? '验证码' : countDown }}</view>
+				</view>
+			</view> -->
 		</view>
 		<view class="btm-btn" @click="bank">
 			{{current == 0? '保存银行卡信息': (current == 1? '保存支付宝信息': '保存微信信息')}}
@@ -123,6 +152,7 @@
 </template>
 <script>
 	import pickerAddress from '@/components/wangding-pickerAddress/wangding-pickerAddress.vue';
+	import { register, verify } from '@/api/login.js';
 	import {
 		enroll
 	} from '@/api/index.js'
@@ -146,6 +176,8 @@
 		},
 		data() {
 			return {
+				captcha: '',
+				countDown: 0 ,//倒计时
 				current: 0,
 				navList: [{
 						tit: '银行卡',
@@ -200,6 +232,45 @@
 			...mapState('user', ['userInfo'])
 		},
 		methods: {
+			//发送验证码
+			verification() {
+				let obj = this;
+				let index = this.current;
+				let phone;
+				if(index == 0) {
+					phone = this.bankInfo.phone
+				}else if(index == 1) {
+					phone = this.aliInfo.phone
+				}else if(index == 2) {
+					phone = this.wxInfo.phone
+				}
+				if (!phone) {
+					this.$api.msg('请输入手机号');
+					return;
+				}
+				if (phone.length < 11) {
+					this.$api.msg('请输入正确的手机号');
+					return;
+				}
+				// 判断是否在倒计时
+				if (obj.countDown > 0) {
+					return false;
+				} else {
+					obj.countDown = 60;
+					obj.time = setInterval(() => {
+						obj.countDown--;
+					}, 1000);
+					//调用验证码接口
+					verify({
+						phone: phone,
+						type: 'verify'
+					})
+						.then(({ data }) => {})
+						.catch(err => {
+							console.log(err);
+						});
+				}
+			},
 			upimg(type) {
 				let that = this
 				upload({
@@ -303,10 +374,8 @@
 					}
 					qdata = that.wxInfo
 				}
-
+				// qdata.captcha = that.captcha
 				that.loading = true
-
-
 				setInfo(qdata).then(res => {
 					console.log(res);
 					uni.showToast({
@@ -358,7 +427,12 @@
 		.bg-val {
 			width: 430rpx;
 			height: 100%;
-
+			.code {
+				height: 100%;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+			}
 			.val-ipt {
 				padding-top: 10rpx;
 				display: inline-block;
@@ -368,6 +442,9 @@
 				padding-left: 10rpx;
 
 			}
+			.val-iptt {
+				width: 70%;
+			}
 
 			image {
 				width: 150rpx;

+ 5 - 5
pages/user/xzdl.vue

@@ -51,11 +51,11 @@
 						type: 2,
 						img: '../../static/icon/yzft.png',
 					},
-					{
-						name: '佣金兑换通证',
-						type: 3,
-						img: '../../static/icon/task2.png',
-					}
+					// {
+					// 	name: '佣金兑换通证',
+					// 	type: 3,
+					// 	img: '../../static/icon/task2.png',
+					// }
 				]
 			}
 		},