hwq 3 rokov pred
rodič
commit
9dda476d76

+ 8 - 1
api/user.js

@@ -131,4 +131,11 @@ export function delcollect(data) {
 	});
 }
 
-
+//积分转账
+export function transfer(data) {
+	return request({
+		url:'/api/trade',
+		method: 'post',
+		data
+	})
+}

+ 9 - 2
manifest.json

@@ -73,14 +73,21 @@
         "devServer" : {
             "proxy" : {
                 "/api" : {
-                    // "target" : "http://lnpt.frp.liuniu946.com/api",
-                    "target" : "https://xl.liuniu946.com/api",
+                    "target" : "http://lnpt.frp.liuniu946.com/api",
+                    // "target" : "https://xl.liuniu946.com/api",
                     // "changeOrigin": true,
                     "pathRewrite" : {
                         "/api" : "" // rewrite path
                     }
                 }
             }
+        },
+        "sdkConfigs" : {
+            "maps" : {
+                "qqmap" : {
+                    "key" : "VYZBZ-P2TRG-RMIQ3-ITAIN-2DKBK-CKFQQ"
+                }
+            }
         }
     }
 }

+ 18 - 14
pages.json

@@ -86,7 +86,12 @@
 				}
 			}
 		},
-
+		{
+			"path": "pages/money/withdmoenys",
+			"style": {
+				"navigationBarTitleText": "响亮积分转账"
+			}
+		},
 		{
 			"path": "pages/product/groupBooking/index",
 			"style": {
@@ -345,7 +350,7 @@
 				}
 			}
 		},
-	
+
 		{
 			"path": "pages/order/expressInfo",
 			"style": {
@@ -471,17 +476,16 @@
 			}
 		}
 
-	
-	    ,{
-            "path" : "pages/user/jiedianDetails",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-    ],
+
+		, {
+			"path": "pages/user/jiedianDetails",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
+		}
+	],
 	"subPackages": [{
 		"root": "pages/activity",
 		"name": "activity",
@@ -519,7 +523,7 @@
 		"navigationBarBackgroundColor": "#FFFFFF",
 		"backgroundColor": "#f8f8f8",
 		//#ifdef H5
-		"navigationStyle":"custom"
+		"navigationStyle": "custom"
 		//#endif
 	},
 	"tabBar": {

+ 57 - 15
pages/index/index.vue

@@ -31,13 +31,13 @@
 					<image class="nitem-image" src="../../static/index/index05.png" mode=""></image>
 					<view class="nitem-font">天天领红包</view>
 				</view>
-				<view class="navbar-item"  @click="navTo('')">
+				<view class="navbar-item" @click="navTo('')">
 					<image class="nitem-image" src="../../static/index/index04.png" mode=""></image>
 					<view class="nitem-font">积分商城</view>
 				</view>
-				<view class="navbar-item"  @click="navTo('/pages/product/seckill')">
+				<view class="navbar-item" @click="navTo('')">
 					<image class="nitem-image" src="../../static/index/index03.png" mode=""></image>
-					<view class="nitem-font">限时秒杀</view>
+					<view class="nitem-font">公益</view>
 				</view>
 				<view class="navbar-item" @click="navTo('/pages/user/shareQrCode')">
 					<image class="nitem-image" src="../../static/index/index02.png" mode=""></image>
@@ -125,8 +125,11 @@ import { getUserInfo } from '@/api/user.js';
 import { setCoupons } from '@/api/functionalUnit.js';
 import { getBargainList } from '@/api/product.js';
 import { interceptor } from '@/utils/loginUtils';
-import { mapState } from 'vuex';
+import { mapState, mapMutations } from 'vuex';
 import { tabbar } from '@/utils/tabbar.js';
+// #ifdef H5
+import { weixindata } from '@/utils/wxAuthorized';
+// #endif
 export default {
 	components: {
 		seckill
@@ -140,11 +143,13 @@ export default {
 			swiperHeight: 0,
 			checkid: 0,
 			titleNViewBackground: '',
+			longitude: 0, //经度
+			latitude: 0, //纬度
 			swiperCurrent: 0,
 			swiperLength: 0,
 			carouselList: [], //轮播列表
 			bastList: [], //会员礼包
-			shoplist:[],//商店列表
+			shoplist: [], //商店列表
 			page: 1,
 			limit: 5,
 			actTime: new Date()
@@ -155,6 +160,7 @@ export default {
 		...mapState('user', ['hasLogin', 'userInfo'])
 	},
 	onLoad: function(option) {
+		this.getaddress();
 		// #ifndef MP
 		if (option.spread) {
 			// 存储其他邀请人
@@ -211,6 +217,42 @@ export default {
 	},
 	// #endif
 	methods: {
+		...mapMutations(['setLat', 'setLon']),
+		getaddress() {
+			console.log('dizhi+++++++++++');
+			let obj = this;
+			uni.getLocation({
+				type: 'gcj02',
+				success: res => {
+					console.log(res, 123456);
+					obj.setLat(res.latitude);
+					obj.setLon(res.longitude);
+				},
+				fail: err => {
+					console.log(err, 'shi+++++++++++++++');
+					openMap().then(e => {
+						this.getaddress();
+					});
+				}
+			});
+			// weixindata().then(wxOjb => {
+			// 	console.log(wxOjb,'获取微信');
+			// 	wxOjb.getLocation({
+			// 		type: 'gcj02',
+			// 		success: res => {
+			// 			console.log(res, 123456);
+			// 			obj.setLat(res.latitude);
+			// 			obj.setLon(res.longitude);
+			// 		},
+			// 		fail: err => {
+			// 			console.log(err, 'shi+++++++++++++++');
+			// 			openMap().then(e => {
+			// 				this.getaddress();
+			// 			});
+			// 		}
+			// 	});
+			// });
+		},
 		//砍价商品推荐详情页
 		navToDetailPages(item) {
 			let id = item.product_id;
@@ -220,13 +262,13 @@ export default {
 				url: '/pages/product/product?id=' + id
 			});
 		},
-		navTo(url){
-			if(url == '') {
-				this.$api.msg('暂未开通,敬请期待')
-			}else{
+		navTo(url) {
+			if (url == '') {
+				this.$api.msg('暂未开通,敬请期待');
+			} else {
 				uni.navigateTo({
 					url
-				})
+				});
 			}
 		},
 		openSubscribe: function(e) {
@@ -659,7 +701,7 @@ export default {
 			align-items: flex-start;
 			margin-left: 20rpx;
 			padding: 13rpx 0 35rpx;
-			border-bottom: 1px solid #EAECED;
+			border-bottom: 1px solid #eaeced;
 			.shopm-info {
 				max-width: 60%;
 				line-height: 1;
@@ -676,12 +718,12 @@ export default {
 						margin-left: 6rpx;
 						width: 30rpx;
 						height: 30rpx;
-						border: 1px solid #FF4C4C;
+						border: 1px solid #ff4c4c;
 						border-radius: 5rpx;
 						font-size: 20rpx;
 						font-family: PingFang SC;
 						font-weight: 500;
-						color: #FF4C4C;
+						color: #ff4c4c;
 						text-align: center;
 						line-height: 30rpx;
 					}
@@ -697,12 +739,12 @@ export default {
 					position: relative;
 					margin-top: 52rpx;
 					padding: 8rpx;
-					background: #FCF3F0;
+					background: #fcf3f0;
 					border-radius: 16rpx 16rpx 16rpx 0px;
 					font-size: 20rpx;
 					font-family: PingFang SC;
 					font-weight: 500;
-					color: #FF440D;
+					color: #ff440d;
 				}
 			}
 			.right {

+ 259 - 0
pages/money/withdmoenys.vue

@@ -0,0 +1,259 @@
+<template>
+	<view class="content">
+		<view class="content-money">
+			<view class="flex">
+				<view class="buttom">
+					<view class="icon">{{ userInfo.integral | getMoneyStyle }}</view>
+					<text class="text">可用响亮积分</text>
+				</view>
+			</view>
+		</view>
+		<u-form ref="uForm" class="item">
+			<u-form-item label-width='150' label="用户手机"><u-input type="text" v-model="card" /></u-form-item>
+		</u-form>
+		<view class="row-box">
+			<view class="title">转账金额</view>
+			<view class="row">
+				<text class="tit">¥</text>
+				<input class="input" type="number" v-model="withdrawal" placeholder='转入金额' placeholder-class="placeholder" />
+				<view class="buttom" @click="withdrawal = userInfo.integral">全部转账</view>
+			</view>
+		</view>
+		
+		<button class="add-btn up" :class="{'action':loding}" @click="!loding?confirm():''">转入</button>
+	</view>
+</template>
+
+<script>
+import { getMoneyStyle } from '@/utils/rocessor.js';
+import { getUserInfo,transfer } from '@/api/user.js';
+import { mapMutations,mapState } from 'vuex';
+export default {
+	filters: {
+		getMoneyStyle
+	},
+	data() {
+		return {
+			money: '0.00', //可提现金额
+			withdrawal: '', //提现金额
+			password:'',//支付密码
+			card:'',//转账卡号
+			name:'',
+			// #ifdef H5
+			weichatBsrowser: false,
+			// #endif
+			loding:false,
+		};
+	},
+	onLoad(options) {
+		// #ifdef H5
+		this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
+		// #endif
+		this.dataUp();
+	},
+	computed: {
+		...mapState('user', ['userInfo']) 
+	},
+	methods: {
+		...mapMutations('user', ['setUserInfo', 'login']),
+		// 更新数据
+		dataUp(){
+			let obj = this;
+			getUserInfo({}).then((e) => {
+				obj.login();
+				// 保存返回用户数据
+				obj.setUserInfo(e.data);
+			}).catch((e) => {
+				console.log(e);
+			})
+		},
+		// 切换选中对象
+		tabRadio(e) {
+			this.type = e.detail.value;
+		},
+		// 提交
+		confirm() {
+			let obj = this;
+			obj.loding = true;
+			if(obj.withdrawal == 0){
+				obj.loding = false;
+				uni.showModal({
+					title:"提示",
+					content:"转账金额不要为0"
+				})
+				return;
+			}
+			if(obj.card == obj.userInfo.phone){
+				obj.loding = false;
+				uni.showModal({
+					title:"提示",
+					content:"不要输入自己的用户账号"
+				})
+			}else{
+				
+				let data = {
+					to_user_account:obj.card, //编号
+					num: obj.withdrawal //金额
+				}
+				transfer(data)
+					.then(e => {
+						// 允许按钮点击
+						obj.loding = false;
+						// 初始化提现金额
+						obj.withdrawal = ''
+						uni.showToast({
+							title: '提交成功',
+							duration: 2000,
+							position: 'top'
+						});
+						obj.dataUp();
+					})
+					.catch(e => {
+						obj.$api.msg(e.msg)
+						obj.loding = false;
+						console.log();
+					});
+			}
+			
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	height: 100%;
+}
+.content-money {
+	padding: 30rpx 0;
+	background: #ffffff;
+}
+
+.item{
+	padding: 0 $page-row-spacing;
+	background-color: #FFFFFF;
+}
+.flex {
+	background-color: #ffffff;
+	text-align: center;
+	margin: 0 30rpx;
+	border-radius: $border-radius-sm;
+	justify-content: center;
+	.buttom {
+		font-size: $font-lg;
+		width: 50%;
+	}
+	.interval {
+		width: 2px;
+		height: 60rpx;
+		background-color: #eeeeee;
+	}
+	.icon {
+		background-size: 100%;
+		font-size: 42rpx;
+		color: $font-color-dark;
+		font-weight: bold;
+		background-repeat: no-repeat;
+		background-position: center;
+	}
+	.text {
+		color: $font-color-light;
+	}
+}
+
+.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;
+		}
+
+		.buttom {
+			color: $base-color;
+			font-size: $font-base;
+		}
+	}
+}
+.add-btn {
+	background: $base-color;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 690rpx;
+	height: 80rpx;
+	margin: 0 auto;
+	margin-top: 30rpx;
+	font-size: $font-lg;
+	border-radius: 10rpx;
+	color: #fff;
+	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+}
+.name {
+	background: #fff;
+	padding: 30rpx;
+}
+.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;
+			.icon-img {
+				height: 50rpx;
+				width: 50rpx;
+			}
+		}
+		.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;
+			}
+		}
+	}
+}
+/deep/ .uni-radio-input {
+	width: 45rpx;
+	height: 45rpx;
+}
+</style>

+ 18 - 0
pages/user/scoreAccumulate.vue

@@ -27,6 +27,9 @@
 				</scroll-view>
 			</swiper-item>
 		</swiper>
+		<view class="btn" @click="navto('/pages/money/withdmoenys')">
+			响亮积分转账
+		</view>
 	</view>
 </template>
 
@@ -197,4 +200,19 @@ page {
 		background-color: #ffffff;
 	}
 }
+.btn {
+	position: fixed;
+	bottom: 30rpx;
+	left: 0;
+	right: 0;
+	width: 690upx;
+	height: 80upx;
+	margin: 0 auto;
+	font-size: $font-lg;
+	color: #fff;
+	background-color: $base-color;
+	border-radius: 10upx;
+	text-align: center;
+	line-height: 80upx;
+}
 </style>

+ 2 - 2
pages/user/user.vue

@@ -17,7 +17,7 @@
 					</view>
 					<view class="config iconfont">
 						<text class="setting iconsetting" @click="navTo('/pages/set/set')"></text>
-						<text class="message iconmessage" @click="navTo('/pages/user/notice')"></text>
+						<!-- <text class="message iconmessage" @click="navTo('/pages/user/notice')"></text> -->
 					</view>
 				</view>
 				<!-- 会员卡功能 -->
@@ -128,7 +128,7 @@
 							<view class="icon"><image class="icon-img" src="/static/icon/u2.png" mode="aspectFit"></image></view>
 							<text>奖励明细</text>
 						</view>
-						<view class="order-item" @click="navTo('/pages/user/award')" hover-class="common-hover" :hover-stay-time="50">
+						<view class="order-item" @click="navTo('/pages/user/scoreAccumulate')" hover-class="common-hover" :hover-stay-time="50">
 							<view class="icon"><image class="icon-img" src="/static/icon/u3.png" mode="aspectFit"></image></view>
 							<text>积分明细</text>
 						</view>

+ 10 - 2
store/index.js

@@ -13,7 +13,7 @@ const store = new Vuex.Store({
 	state: {
 		// baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置 
 		baseURL:'https://xl.liuniu946.com',//请求地址配置 
-		// baseURL:'https://xl.liuniu946.com/',//请求地址配置 
+		// baseURL:'http://lnpt.frp.liuniu946.com/',//请求地址配置 
 		urlFile:'/index',//项目部署所在文件夹
 		userInfo: {}, //登录信息
 		loginInterceptor:false,//是否打开强制登录
@@ -21,6 +21,8 @@ const store = new Vuex.Store({
 		weichatInfo:{},//保存微信注册信息
 		weichatObj:'',//微信对象
 		// #endif
+		latitude: '',
+		longitude: '',
 	},
 	mutations: {
 		//保存微信信息
@@ -30,7 +32,13 @@ const store = new Vuex.Store({
 		//保存微信对象
 		setWeiChatObj(state, provider) {
 			state.weichatObj = provider;
-		}
+		},
+		setLat(state, provider) {
+			state.latitude = provider
+		},
+		setLon(state, provider) {
+			state.longitude = provider
+		},
 	},
 	modules:{
 		user

BIN
unpackage/dist/build/h5/3-9-2.rar → unpackage/dist/build/h5/h5.rar


+ 1 - 1
unpackage/dist/build/h5/index.html

@@ -1,2 +1,2 @@
 <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>响亮商城</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
-            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/index/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/index/static/js/chunk-vendors.0c0314dc.js></script><script src=/index/static/js/index.57caccad.js></script></body></html>
+            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/index/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/index/static/js/chunk-vendors.0c0314dc.js></script><script src=/index/static/js/index.a3411fff.js></script></body></html>

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
unpackage/dist/build/h5/static/js/index.57caccad.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
unpackage/dist/build/h5/static/js/index.a3411fff.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-index.c0928d1d.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-index.eee45769.js


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov