Ver Fonte

10-13-saoma

lhl há 3 anos atrás
pai
commit
efe5656002

+ 6 - 0
pages.json

@@ -397,6 +397,12 @@
 				"navigationBarTitleText": "充值"
 			}
 		},
+		{
+			"path": "pages/wallet/card",
+			"style": {
+				"navigationBarTitleText": "充值卡兑换"
+			}
+		},
 		{
 			"path": "pages/favorites/favorites",
 			"style": {

+ 13 - 14
pages/category/category.vue

@@ -4,10 +4,10 @@
 			<view v-for="item in flist" :key="item.id" class="f-item b-b" :class="{ active: item.id === currentId }" @click="tabtap(item)">{{ item.cate_name }}</view>
 		</scroll-view>
 		<scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll" :scroll-top="tabScrollTop">
-			<view v-for="item in slist" :key="item.id" class="s-list" :id="'main-' + item.id">
+			<view v-for="item in flist" :key="item.id" class="s-list" :id="'main-' + item.id">
 				<text class="s-item">{{ item.cate_name }}</text>
 				<view class="t-list ">
-					<view @click="navToList(item.id, titem.id)" v-if="titem.pid === item.id" class="t-item" v-for="titem in tlist" :key="titem.id">
+					<view @click="navToList(item.id, titem.id)" class="t-item" v-for="titem in slist" :key="titem.id">
 						<image :src="titem.pic"></image>
 						<text>{{ titem.cate_name }}</text>
 					</view>
@@ -27,7 +27,7 @@ export default {
 			currentId: 1,
 			flist: [],
 			slist: [],
-			tlist: []
+			// tlist: []
 		};
 	},
 	onLoad() {
@@ -51,21 +51,20 @@ export default {
 					this.flist = data.map(function (s) {
 								return s
 							});
+					console.log(this.flist,'1111111')
 					data.forEach(function(e) {
 						obj.slist.push(...e.children.map(function (s) {
 								return s
 							}));
-					});
-					console.log(obj.slist,'ddddddddddddd')
-					data.forEach(function(e) {
-						e.children.forEach(function(es) {
-							obj.tlist.push(...es.children.map(function (s) {
-								return s
-							}))
-							
-						});
-					});
-					console.log(obj.tlist,'66666')
+					});
+					console.log(obj.slist,'22222222')
+					// data.forEach(function(e) {
+					// 	e.children.forEach(function(es) {
+					// 		obj.tlist.push(...es.children.map(function (s) {
+					// 			return s
+					// 		}))
+					// 	});
+					// });
 				})
 				.catch(err => {
 					console.log(err);

+ 3 - 3
pages/merchant/merchant.vue

@@ -6,7 +6,7 @@
 				<view class="userInfo-box">
 					<view class="userInfo-img"><image class="portrait" :src="image || '../../static/error/missing-face.png'"></image></view>
 					<view class="userInfo-xinxi">
-						<view class="title"><text>{{name}}</text></view>
+						<view class="title clamp"><text>{{name}}</text></view>
 						<view class="phone"><text>{{phone}}</text></view>
 					</view>
 					<view class="balance clamp">{{address}}</view>
@@ -153,7 +153,7 @@ page {
 				font-family: PingFang SC;
 				font-weight: bold;
 				color: #333333;
-				line-height: 21rpx;
+				text-align: center;
 			}
 
 			.phone {
@@ -162,11 +162,11 @@ page {
 				font-weight: 500;
 				color: #666666;
 				line-height: 21rpx;
-				margin-bottom: 40rpx;
 			}
 		}
 
 		.balance {
+			margin-top: 10rpx;
 			text-align: center;
 			width: 500rpx;
 			height: 60rpx;

+ 14 - 5
pages/merchant/storeQr.vue

@@ -34,6 +34,7 @@
 </template>
 
 <script>
+	import { my } from '@/api/merchant.js'
 	import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue';
 	import { mapState, mapMutations } from 'vuex';
 	export default {
@@ -54,7 +55,7 @@
 				icon: '', //二维码图标URL(必须是本地图片,网络图需要先下载至本地)
 				iconSize: 0, //二维码图标大小
 				lv: 3, //容错级别
-				onval: false, //监听val值变化自动重新生成二维码
+				onval: true, //监听val值变化自动重新生成二维码
 				loadMake: true, //组件初始化完成后自动生成二维码,val需要有值
 				usingComponents: false, //是否使用了自定义组件模式(主要是为了修复非自定义组件模式时 v-if 无法生成二维码的问题)
 				showLoading: false, //是否显示loading
@@ -64,11 +65,14 @@
 				ctxSrc: '', //要显示的图片
 				loading: true,//是否载入图片中
 				canHeight: '',//画布高度
-				canWeidth: ''//画布宽度
+				canWeidth: '',//画布宽度
+				id: '',
+				uid: '',
 			}
 		},
 		computed: {
-			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
+			...mapState(['baseURL'])
 		},
 		onShow() {
 			console.log(this.userInfo)
@@ -80,8 +84,13 @@
 				// console.log(this.userInfo)
 			}
 		},
-		onLoad(opt) {
-			this.val = 'hello word'
+		async onLoad(opt) {
+			await my({}).then(({data}) =>{
+				this.id = data.id;
+				this.uid = data.uid
+				
+			})
+			this.val = this.baseURL + '/index/pages/index/index?store_id=' + this.id + '&spread=' + this.uid
 			console.log(this.val )
 		},
 		methods: {

+ 8 - 0
pages/wallet/card.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 14 - 0
pages/wallet/recharge.vue

@@ -41,6 +41,7 @@
 			</radio-group>
 		</view>
 		<button class="add-btn up" :class="{ 'active-bg': payLoding }" @click="!payLoding ? confirm() : ''">立即充值</button>
+		<button class="card" @click="navTo('/pages/wallet/card')">充值卡兑换</button>
 	</view>
 </template>
 
@@ -225,6 +226,19 @@ page {
 	border-radius: 10rpx;
 	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
 }
+.card {
+	background: #FFFFFF;
+	border: 1px solid $base-color;
+	color: $base-color;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 690rpx;
+	height: 80rpx;
+	margin: 30rpx auto 0;
+	font-size: $font-lg;
+	border-radius: 10rpx;
+}
 .row-box {
 	margin-top: 30rpx;
 	padding: 20rpx 0rpx 20rpx 30rpx;