Kaynağa Gözat

优化及去除多余项

hwb0 3 yıl önce
ebeveyn
işleme
5d104a69b3

+ 2 - 2
components/pay-popup/pay-popup.vue

@@ -15,14 +15,14 @@
 				<!-- 优惠券信息 -->
 				<view class="flex coupon" @click="toCoupon">
 					<view class="flex coupon-left">
-						<image src="../../static/icon/public_coupon.png" mode="scaleToFill"></image>
+						<image src="../../static/public/public_coupon.png" mode="scaleToFill"></image>
 						<view class="txt">优惠券</view>
 					</view>
 					<view class="coupon-right flex">
 						<view class="txt coupon-right-color" v-if="$numberFormat(payInfo.discountAmt) != 0">-¥{{ $numberFormat(payInfo.discountAmt)}}</view>
 						<view class="txt" v-else-if="payInfo.listNum != undefined">{{payInfo.listNum}}张可用</view>
 						<view class="txt" v-else>暂无可用优惠券</view>
-						<image src="../../static/icon/public_right_arrow.png" mode="scaleToFill"></image>
+						<image src="../../static/public/public_right_arrow.png" mode="scaleToFill"></image>
 					</view>
 				</view>
 				<view class="flex agreement">

+ 0 - 367
packageGoods/core/index.vue

@@ -1,367 +0,0 @@
-<template>
-	<view>
-		<u-navbar :border="true" :placeholder="true" :autoBack="true" bgColor="#ffffff" :title="title"></u-navbar>
-		<view class="screen-coin">
-			<view class="flex screen-coin-select">
-				<view @click="ascSelect" class="flex">
-					<view class="title">
-						<text>{{ ascListsingle.text}}</text>
-					</view>
-					<u-icon name="arrow-up" color="#333" size="18" v-if="ascShow"></u-icon>
-					<u-icon name="arrow-down" color="#333" size="18" v-else></u-icon>
-				</view>
-				
-				<!-- <view @click="openSelect" class="flex">
-					<view class="title">
-						<text v-if="actionInfo.min">{{ actionInfo.min }}</text>
-						<text v-if="actionInfo.max">-{{ actionInfo.max }}</text>
-						<text>{{ actionInfo.desc }}</text>
-					</view>
-					<u-icon name="arrow-up" color="#333" size="18" v-if="coinShow"></u-icon>
-					<u-icon name="arrow-down" color="#333" size="18" v-else></u-icon>
-				</view> -->
-			</view>
-			<view class="screen-coin-list" v-if="ascShow" @touchmove.prevent.stop>
-				<view class="flex screen-coin-list-item" v-for="(item, index) in ascList" :key="index" @click="selectCoinTwo(item, index)">
-					<text :class="{ 'action': ascListIndex == index }">{{ item.text }}</text>
-				</view>
-			</view>
-			<view class="screen-coin-list" v-if="coinShow" @touchmove.prevent.stop>
-				<view class="flex screen-coin-list-item" v-for="(item, index) in coinList" :key="index" @click="selectCoin(item, index)">
-					<text v-if="item.min" :class="{ 'action': actionIndex == index }">{{ item.min }}</text>
-					<text v-if="item.max" :class="{ 'action': actionIndex == index }">-{{ item.max }}</text>
-					<text :class="{ 'action': actionIndex == index }">{{ item.desc }}</text>
-				</view>
-			</view>
-		</view>
-		<view class="core">
-			<view class="flex core-list">
-				<navigator :url="`/packageGoods/goods/detail?id=${ item.goodsId }`" class="core-list-item"
-					hover-class="navigator-hover" v-for="(item, index) in list" :key="index">
-					<view class="flex iamge-wrap">
-						<image :src="item.picUrl" mode=""></image>
-					</view>
-					<view class="title">{{ item.title }}</view>
-					<view class="bean">
-						<image src="../../static/icon/bean.png" mode="aspectFill"></image>
-						<view>× {{ item.exchangePrice }}</view>
-					</view>
-				</navigator>
-				<view class="core-list-item"></view>
-			</view>
-			<view class="flex empty" v-if="!list.length">
-				<u-empty text="数据为空" mode="order" />
-			</view>
-		</view>
-		<custom-tab-bar :activeValue="'core'" />
-	
-		<u-overlay :show="coinShow" @click="coinShow = false" zIndex="1" @touchmove.prevent.stop></u-overlay>
-		<u-overlay :show="ascShow" @click="ascShow = false" zIndex="1" @touchmove.prevent.stop></u-overlay>
-	</view>
-</template>
-
-<script>
-	import env from '../../config/env.js'
-	import CustomTabBar from '../../components/custom-tab-bar/custom-tab-bar.vue'
-	import $http from '@/utils/request.js'
-	export default {
-		components: {
-			CustomTabBar,
-		},
-		data() {
-			return {
-				title:"兑换大厅",
-				pageNum: 1,
-				total: 0,
-				list: [],
-				coinShow: false,
-				coinList:[
-					{
-						min: null,
-						max: null,
-						desc: '全部价格'
-					},
-					{
-						min: 1,
-						max: 100,
-						desc: '盲豆'
-					},
-					{
-						min: 101,
-						max: 200,
-						desc: '盲豆'
-					},
-					{
-						min: 201,
-						max: 500,
-						desc: '盲豆'
-					},
-					{
-						min: 501,
-						max: 1000,
-						desc: '盲豆'
-					},
-					{
-						min: 1001,
-						max: 5000,
-						desc: '盲豆'
-					},
-					{
-						min: 5000,
-						max: null,
-						desc: '盲豆以上'
-					},
-				],
-				actionInfo:{},
-				actionIndex: 0,
-				coinNum:{
-					startPrice: null,
-					endPrice: null
-				},
-				tagIds:'',//标签
-				categoryId:'',//链接
-				
-				orderByColumn:'',//默认exchangePrice
-				isAsc:'',//从低到高asc isAsc:'desc'从高到低
-				ascShow:false,
-				ascList:[
-					{
-						data:'',
-						text:'默认排序'
-					},
-					{
-						data:'asc',
-						text:'价格从低到高'
-					},
-					{
-						data:'desc',
-						text:'价格从高到低'
-					},
-				],
-				ascListsingle:{},
-				ascListIndex:0,
-				
-			};
-		},
-	
-	// 跳转接参数
-		onLoad(opthios) {
-			this.title = opthios.name
-			if(opthios.type == 'category'){
-				this.categoryId = opthios.data
-			}else{
-				this.tagIds = opthios.data
-			}
-			
-			this.pageList()
-			this.actionInfo = this.coinList[this.actionIndex]
-			this.ascListsingle = this.ascList[this.ascListIndex]
-		},
-		methods: {
-			
-			toBackCore(){
-				uni.navigateBack({
-				})
-			},
-			
-			getList() {
-				uni.showLoading({
-					title: '加载中'
-				});
-				let data = {
-					categoryId: this.categoryId,
-					tagIds: this.tagIds,
-					...this.coinNum,
-					noToken: true
-				}
-				$http.post(`/api/v1/mp/user/exchange/goods/list?pageNum=${this.pageNum}&pageSize=20&orderByColumn=${this.orderByColumn}&isAsc=${this.isAsc}`, data).then(
-					res => {
-						uni.hideLoading();
-						if (res.code == 0) {
-							res.rows.forEach(item => {
-								let picUrlArr = item.picUrl.split(',')
-								item.picUrl = env.filePublic + picUrlArr[0] + '?imageView2/2/w/340'
-							})
-							this.total = res.total
-							this.list = this.list.concat(res.rows)
-						}
-					}).catch(() => {
-					uni.hideLoading();
-				})
-			},
-	
-			pageList() {
-				this.pageNum = 1
-				this.total = 0
-				this.list = []
-				this.getList()
-			},
-			pageListTwo() {
-				this.pageNum = 1
-				this.total = 0
-				this.list = []
-				this.getList()
-			},
-			
-			openSelect(){
-				if(this.coinShow == false){
-					this.coinShow = true
-					this.ascShow = false
-				}else{
-					this.coinShow = false
-				}
-			},
-			//排序切换
-			ascSelect(){
-				if(this.ascShow == false){
-					this.ascShow = true
-					this.coinShow = false
-				}else{
-					this.ascShow = false
-				}
-			},
-			
-			selectCoin(item, index){
-				this.actionIndex = index
-				this.actionInfo = this.coinList[this.actionIndex]
-				this.coinShow = false
-				this.coinNum.startPrice = item.min
-				this.coinNum.endPrice = item.max
-				this.pageList()
-			},
-			selectCoinTwo(item, index){
-				this.ascListIndex = index
-				this.ascListsingle = this.ascList[this.ascListIndex]
-				this.ascShow = false
-				
-				if(item.data == ''){
-					this.orderByColumn = ''
-					this.isAsc = ''
-				}else{
-					this.isAsc = item.data
-					this.orderByColumn = 'exchangePrice'
-				}
-
-				this.pageListTwo()
-			},
-		},
-	
-		onReachBottom() {
-			// 判断是否有数据
-			if (this.total > this.pageNum * 20) {
-				setTimeout(() => {
-					++this.pageNum
-					this.getList()
-				}, 500)
-			} else {
-				uni.$u.toast('已经到底了')
-			}
-		},
-	}
-</script>
-
-<style lang="scss" scoped>
-.screen-coin {
-		position: fixed;
-		width: 100%;
-		z-index: 10;
-		background-color: #FFFFFF;
-		border-top: 1px solid #F8F8F8;
-		box-shadow: 0 4rpx 10rpx 0 rgba(151, 151, 151, 0.24);
-
-		&-select {
-			height: 86rpx;
-			line-height: 86rpx;
-			width: 100%;
-			justify-content: flex-start;
-
-			.title {
-				padding-left: 40rpx;
-				margin-right: 10rpx;
-			}
-		}
-		&-list {
-			width: 100%;
-			background-color: #FFFFFF;
-			border-top: 1px solid #F8F8F8;
-			
-			&-item{
-				height: 86rpx;
-				line-height: 86rpx;
-				background-color: #FFFFFF;
-				border-bottom: 1px solid #F8F8F8;
-			}
-			&-item:last-child{
-				border: 0;
-			}
-			.action{
-				color: $uni-text-color;
-			}
-		}
-	}
-
-	.core {
-		margin: 20rpx 0;
-
-		&-list {
-			justify-content: space-evenly;
-			flex-wrap: wrap;
-			padding-top: 96rpx;
-
-			&-item {
-				box-sizing: border-box;
-				width: 340rpx;
-				height: 502rpx;
-				background-color: #FFFFFF;
-				border-radius: 10rpx;
-				margin-bottom: 30rpx;
-
-				.iamge-wrap {
-					image {
-						border-top-left-radius: 10rpx;
-						border-top-right-radius: 10rpx;
-						width: 340rpx;
-						height: 340rpx;
-						margin-bottom: 6rpx;
-					}
-				}
-
-				.title {
-					padding: 0 14rpx;
-					font-size: 28rpx;
-					line-height: 40rpx;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					display: -webkit-box;
-					-webkit-box-orient: vertical;
-					-webkit-line-clamp: 2;
-				}
-
-				.bean {
-					padding: 0 14rpx;
-					display: flex;
-					align-items: center;
-					font-size: 32rpx;
-					line-height: 44rpx;
-					color: rgba(235, 112, 9, 100);
-					margin-top: 12rpx;
-
-					image {
-						width: 42rpx;
-						height: 42rpx;
-						margin-right: 16rpx;
-					}
-				}
-			}
-
-			&-item:last-child {
-				padding: 0;
-				height: 0;
-			}
-		}
-
-		.empty {
-			height: 60vh;
-		}
-	}
-</style>

+ 5 - 5
packageGoods/coupon/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="选择优惠券"></u-navbar>
-		<view class="coupon-title">可用优惠券:{{listNum}}</view>
+		<view class="coupon-title">可用优惠券:{{ total }}</view>
 		<view class="coupon-list">
 			<u-radio-group v-model="radiovalue1" placement="column" @change="changeChechk()">
 				<view class="flex coupon-list-item" v-for="(item,index) in list" :key="index" :style="{backgroundImage:`url(${ index == isActive ? backOn : backOff })`}">
@@ -95,16 +95,16 @@
 				uni.showLoading({
 					title: '加载中'
 				});
-				$http.post(`/api/v1/mp/user/ticket/order/coupon/list?pageNum=${_this.pageNum}&pageSize=20`, {}).then(
+				$http.post(`/api/v1/mp/user/ticket/order/coupon/listPage?pageNum=${_this.pageNum}&pageSize=20`, {}).then(
 					res => {
 						uni.hideLoading();
 						if (res.code == 0) {
-							this.listNum = res.data.length
-							res.data.forEach(item => {
+							this.listNum = res.rows.length
+							res.rows.forEach(item => {
 								let useAreaDesc = JSON.parse(item.useArea)
 								item.useAreaDesc = useAreaDesc.desc
 							})
-							_this.list = res.data
+							_this.list = [..._this.list, ...res.rows]
 							_this.total = res.total
 							for (var i = 0; i < _this.list.length; i++) {
 								if(_this.list[i].id == _this.couponId){

+ 1 - 1
packageGoods/goods/list.vue

@@ -42,7 +42,7 @@
 								<image src="../../static/public/goods_coin.png" mode=""></image>
 								<view class="num"><text>×</text>{{ item.exchangePrice }}</view>
 							</view>
-							<view class="content-coin__right" v-if="item.originPrice">原盲豆:{{ item.originPrice }}</view>
+							<view class="content-coin__right" v-if="item.originPrice">{{ item.originPrice }}</view>
 						</view>
 						<view class="content-price">¥{{ $numberFormat(item.value) }}</view>
 					</view>

+ 1 - 1
packageOperate/share/index.vue

@@ -4,7 +4,7 @@
 
 		<view class="flex invitation">
 			<view class="flex invitation-user">
-				<image src="../../static/bg/share_bg.png" mode="aspectFit"></image>
+				<image src="../../static/public/share_bg.png" mode="aspectFit"></image>
 				<view class="title">盲票</view>
 				<image class="avatar" :src="avatar" mode=""></image>
 			</view>

+ 1 - 1
packageOther/about/index.vue

@@ -3,7 +3,7 @@
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="关于我们"></u-navbar>
 		<view class="about">
 			<view class="flex about-logo">
-				<image src="../../static/logo.png" mode=""></image>
+				<image src="../../static/public/logo.png" mode=""></image>
 				<view class="edition">v 2.0.0</view>
 			</view>
 			<view class="about-action">

+ 1 - 3
pages.json

@@ -35,9 +35,7 @@
 	],
 	"subPackages": [{
 			"root": "packageGoods",
-			"pages": [{
-					"path": "core/index"
-				},
+			"pages": [
 				{
 					"path": "coupon/index"
 				},

+ 1 - 1
pages/core/index.vue

@@ -87,7 +87,7 @@
 								<image src="../../static/public/goods_coin.png" mode=""></image>
 								<view class="num"><text>×</text>{{ item.exchangePrice }}</view>
 							</view>
-							<view class="content-coin__right" v-if="item.originPrice">原盲豆:{{ item.originPrice }}</view>
+							<view class="content-coin__right" v-if="item.originPrice">{{ item.originPrice }}</view>
 						</view>
 						<view class="content-price">¥{{ $numberFormat(item.value) }}</view>
 					</view>

+ 1 - 1
pages/login/index.vue

@@ -3,7 +3,7 @@
 		<u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" title="登录"></u-navbar>
 		<view class="flex login">
 			<view class="flex login-image">
-				<image src="../../static/logo.png" mode=""></image>
+				<image src="../../static/public/logo.png" mode=""></image>
 				<view class="login-image-txt">盲票</view>
 			</view>
 			<view class="login-btn">

BIN
static/icon/bean.png


BIN
static/icon/coupon.png


BIN
static/icon/coupon_bg.png


BIN
static/icon/coupon_bg2.png


BIN
static/public/goods_coin.png


+ 0 - 0
static/logo.png → static/public/logo.png


+ 0 - 0
static/icon/public_coupon.png → static/public/public_coupon.png


+ 0 - 0
static/icon/public_right_arrow.png → static/public/public_right_arrow.png


+ 0 - 0
static/bg/share_bg.png → static/public/share_bg.png