zhengkaixin 1 tahun lalu
induk
melakukan
5e706e78bb

+ 3 - 3
.env.dev.js

@@ -8,7 +8,7 @@ const UNI_APP = {
 	NODE_ENV :"dev",
 	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
 	defaultStation:["3865b3a3-13fd-461a-8145-ee9711df35a2","da6e714d-c5a8-4f76-8132-5f4a56677130"],
-	defaultStation:["160cb8c6-5686-442a-8dbb-f067f30019dc"],
+	defaultStation:["e012f9fe-90a8-4a47-bb64-26ea139c3c05"],
 	//defaultStation:[],
 	openId:"zkxtest",//zkx
 	
@@ -18,8 +18,8 @@ const UNI_APP = {
 	//openId:"oK9Wr5_2USr1yP4MRew9KbJA0-ng",//老板
 	//openId:"oK9Wr5-ViXQMUP2cjiW3bGIABj1Q",
 	//openId:"oK9Wr5wkU3OwWhQ7mRrLZ5MDZNHo",
-	//		openId:"oK9Wr50ojExHjOTC_wFcuAEI9s-M",
-	//openId:"oK9Wr55J1J1eL6BqI2tW749NTxNU",//zq
+	openId:"oK9Wr53qHzp7kOSiue_PYjwEqivM",
+	openId:"oK9Wr55J1J1eL6BqI2tW749NTxNU",//zq
 	//openId:"oK9Wr51zplhm_50G4FRHxi-jAcDM",//月卡用户
 	//oK9Wr5yvyBbFqaiO7ZM1GXpMzkD4
 	//小鹏管家appid

+ 12 - 2
README.md

@@ -81,12 +81,17 @@ u-loadmore//加载更多
 
 【腾讯文档】51充电联盟自营站充电服务费6折卡购买协议--100
https://docs.qq.com/doc/DT0Z6Rm54R2ZodkxM
【腾讯文档】51充电联盟常见问题
https://docs.qq.com/doc/DT0pQT1BsWkhtcElM--100
 
-原型更新:
新增6折卡活动相关详情页、订单相关流程页面;
【充电中】页面增加“常见问题”板块,后台增加常见问题解答功能的配置管理;--- 50%
【联系客服】页面改版;
【我的】页面增加卡包入口;
增加【我的卡包】列表页、详情页;
首页、站点列表、详情页,增加“自营站”标签,列表筛选弹窗文字描述调整、增加“自营站”筛选项。
+原型更新:
新增6折卡活动相关详情页、订单相关流程页面;---!!
+列表筛选弹窗文字描述调整、增加“自营站”筛选项。---!!
+
+
【充电中】页面增加“常见问题”板块,后台增加常见问题解答功能的配置管理;--- 100%
+
+
【联系客服】页面改版;--100%
【我的】页面增加卡包入口;--100%
增加【我的卡包】列表页、详情页;--100%
首页、站点列表、详情页,增加“自营站”标签,--100
 
 
 
 原型更新:
【首页】增加6折卡banner、瓷片区左1入口修改为6折卡活动;--90
-!!!活动管理新增  ,首页banner 新增 2个
+!!!【配置】活动管理新增  ,首页banner 新增 2个
 
 
 
【站点详情】原服务费包月会员入口改为6折卡活动入口;--100
@@ -106,4 +111,9 @@ u-loadmore//加载更多
 4.“服务费包月会员”改为“折扣卡会员价”---100
 
 
+
+51充电联盟原型更新:
站点详情、充电结束、充电枪 页面增加6折卡相关信息展示。
+
+
+
 //pages/discountCard/productDetails

+ 10 - 2
apis/index.js

@@ -37,7 +37,7 @@ export function codeOperation(url) {
 			return	'/pages/user/finance/rechargeRes?id=' + id
 		}
 		if(str2 == 'C') {
-			return	'/pages/user/finance/rechargeRes?id=' + id
+			return	'/pages/user/discountCard/paymentSuccess?id=' + id
 		}
 	} else {
 		return false;
@@ -206,4 +206,12 @@ export function passengerMessageNoReadNum(data) {
 			url: '/mobile/chargingCouponApi/readCoupon'
 		})
 	}
-	
+	
+	
+	export function personCardList(data) {
+		return request({
+			method: 'post',
+			data: data,
+			url: '/mobile/regUser/personCardList'
+		})
+	}

+ 9 - 0
apis/news.js

@@ -11,6 +11,15 @@ export function newsInfoList(data) {
 	})
 }
 
+export function newsInfoContentList(data) {
+	 
+	return requestWhite({
+		method: 'post',
+		data:data ,
+		url: '/mobile/newsInfo/newsInfoContentList'
+	})
+}
+
 export function newsInfoDetail(id) {
 	 
 	return requestWhite({

+ 165 - 0
components/u-line-progress/u-line-progress.vue

@@ -0,0 +1,165 @@
+<template>
+	<view class="u-progress" :style="{
+		borderRadius: round ? '100rpx' : 0,
+		height: height + 'rpx',
+		backgroundColor: inactiveColor
+	}">
+		<view :class="[
+			type ? `u-type-${type}-bg` : '',
+			striped ? 'u-striped' : '',
+			striped && stripedActive ? 'u-striped-active' : ''
+		]" class="u-active" :style="[progressStyle]">
+			<slot v-if="$slots.default || $slots.$default" />
+			<block v-else-if="showPercent&&percent>=20">
+				{{percent + '%'}}
+			</block>
+		</view>
+		
+		<view :class="[
+			type ? `u-type-${type}-bg` : '',
+			striped ? 'u-striped' : '',
+			striped && stripedActive ? 'u-striped-active' : ''
+		]" class="" :style="[progressStyle2]">
+			<slot v-if="$slots.default || $slots.$default" />
+			<block v-else-if="showPercent&&percent<20">
+				{{percent + '%'}}
+			</block>
+		</view>
+	</view>
+</template>
+
+<script>
+	/**
+	 * lineProgress 线型进度条
+	 * @description 展示操作或任务的当前进度,比如上传文件,是一个线形的进度条。
+	 * @tutorial https://www.uviewui.com/components/lineProgress.html
+	 * @property {String Number} percent 进度条百分比值,为数值类型,0-100
+	 * @property {Boolean} round 进度条两端是否为半圆(默认true)
+	 * @property {String} type 如设置,active-color值将会失效
+	 * @property {String} active-color 进度条激活部分的颜色(默认#19be6b)
+	 * @property {String} inactive-color 进度条的底色(默认#ececec)
+	 * @property {Boolean} show-percent 是否在进度条内部显示当前的百分比值数值(默认true)
+	 * @property {String Number} height 进度条的高度,单位rpx(默认28)
+	 * @property {Boolean} striped 是否显示进度条激活部分的条纹(默认false)
+	 * @property {Boolean} striped-active 条纹是否具有动态效果(默认false)
+	 * @example <u-line-progress :percent="70" :show-percent="true"></u-line-progress>
+	 */
+	export default {
+		name: "u-line-progress",
+		props: {
+			// 两端是否显示半圆形
+			round: {
+				type: Boolean,
+				default: true
+			},
+			// 主题颜色
+			type: {
+				type: String,
+				default: ''
+			},
+			// 激活部分的颜色
+			activeColor: {
+				type: String,
+				default: '#19be6b'
+			},
+			inactiveColor: {
+				type: String,
+				default: '#ececec'
+			},
+			// 进度百分比,数值
+			percent: {
+				type: Number,
+				default: 0
+			},
+			// 是否在进度条内部显示百分比的值
+			showPercent: {
+				type: Boolean,
+				default: true
+			},
+			// 进度条的高度,单位rpx
+			height: {
+				type: [Number, String],
+				default: 28
+			},
+			// 是否显示条纹
+			striped: {
+				type: Boolean,
+				default: false
+			},
+			// 条纹是否显示活动状态
+			stripedActive: {
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+
+			}
+		},
+		computed: {
+			progressStyle() {
+				let style = {};
+				style.width = this.percent + '%';
+				if(this.activeColor) style.backgroundColor = this.activeColor;
+				return style;
+			},
+			progressStyle2() {
+				let style = {};
+				style.width =(100- this.percent) + '%';
+				style.textAlign= "center";
+				//if(this.activeColor) style.backgroundColor = this.activeColor;
+				return style;
+			}
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	//@import "../../libs/css/style.components.scss";
+	
+	.u-progress {
+		overflow: hidden;
+		height: 15px;
+		/* #ifndef APP-NVUE */
+		display: inline-flex;
+		/* #endif */
+		align-items: center;
+		width: 100%;
+		border-radius: 100rpx;
+	}
+
+	.u-active {
+		width: 0;
+		height: 100%;
+		align-items: center;
+		display: flex;
+		justify-items: flex-end;
+		justify-content: space-around;
+		font-size: 20rpx;
+		color: #ffffff;
+		transition: all 0.4s ease;
+	}
+
+	.u-striped {
+		background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+		background-size: 39px 39px;
+	}
+
+	.u-striped-active {
+		animation: progress-stripes 2s linear infinite;
+	}
+
+	@keyframes progress-stripes {
+		0% {
+			background-position: 0 0;
+		}
+
+		100% {
+			background-position: 39px 0;
+		}
+	}
+</style>

+ 143 - 25
pages/cardBag/cardBag.vue

@@ -7,20 +7,8 @@
 		</view>
 		<view class="main">
 			
-			<view class="monthly-payment" >
-              <view class="icon">
-              	<img src="../../assets/img/monthlyPayment.png" alt="">
-              </view>
-			  <view class="infos">
-			  	<view class="name">
-			  		服务费包月会员
-			  	</view>
-				<view class="date">
-					2023.07.31到期
-				</view>
-			  </view>
-			</view>
-			<view class="mcorporate-member"  v-for="(item,i) in  businessVipList"
+			
+			<view class="mcorporate-member" v-if="current==0"  v-for="(item,i) in  businessVipList"
 			  @click="gotoUrl('pages/user/company-vip?id='+item.platform)"  :key="i"  >
 			 
 			  <view class="icon">
@@ -39,19 +27,48 @@
 				</view>
 			  </view>
 			</view>
-			<view class="discount-card">
-				<view class="name">
-					自营站充电服务费6折卡
+			<template v-for="(item,i) in showList">
+				<view class="monthly-payment"  @click="gotoUrl('pages/monthlyCardActivity/monthlyCardBuy')"
+				
+				:key="i" v-if="item.classify==1" >
+				  <view class="icon">
+				  	<img src="../../assets/img/monthlyPayment.png" alt="">
+				  </view>
+				  <view class="infos">
+				  	<view class="name">
+				  		服务费包月会员
+				  	</view>
+					<view class="date">
+						{{item.endTime.substring(0,10)}}到期
+					</view>
+				  </view>
 				</view>
-				<view class="progress">
-					<view class="time">
-						2023.09.16到期 | 剩余29天
+				
+				<view class="discount-card"    @click="gotocardDetails(item)"
+				:key="i" v-if="item.classify==2">
+					<view class="name">
+						自营站充电服务费6折卡
 					</view>
-					<view class="electric-quantity">
-						已用119度 / 共338度
+					<view class="progress">
+						<view class="time">
+							{{thisendTime(item.endTime)}}到期 剩余{{thisdaysDistance(item.endTime)}}天
+						</view>
+						<view class="electric-quantity">
+							已用{{item.chargedDegree?item.chargedDegree.toFixed(0):0.00}}度 / 共{{item.chargeDegreeLimit}}度
+						</view>
 					</view>
+					<ujp-line-progress active-color="#2979ff" :percent="thispercent(item)"></ujp-line-progress>
 				</view>
-				<u-line-progress active-color="#2979ff" :percent="70"></u-line-progress>
+			</template>
+			
+			
+			<view class="carNone" v-if="current==0&&businessVipList.length==0&&!userCardBool">
+				<img src="static/img/暂无数据-缺省页.png" alt="">
+				<p class="oldTextjp2" oldstyle="font-size: 18px;">暂无数据</p>
+			</view>
+			<view class="carNone" v-if="current==1&&expireUserCardList.length==0">
+				<img src="static/img/暂无数据-缺省页.png" alt="">
+				<p class="oldTextjp2" oldstyle="font-size: 18px;">暂无数据</p>
 			</view>
 		</view>
 	</view>
@@ -59,7 +76,10 @@
 
 <script>
 	import * as API from '@/apis/index.js'
-	
+	import {
+		newDate,daysDistance
+		
+	} from '@/utils'
 	export default {
 		data() {
 			return {
@@ -68,14 +88,46 @@
 				}, {
 					name: '已过期'
 				}],
+				expireUserCardList:[],
+				pageIndex: 1,
+				recordsTotal: 0,
 				current: 0,
 				businessVipList:[],
 				userCard:null,
 			}
 		},
+		computed:{
+			showList(){
+				if(this.current==0&&this.userCardBool){
+					
+					return  [this.userCard]
+				}
+				if(this.current==1){
+					
+					return  this.expireUserCardList
+				}
+				return []
+			},
+			userCardBool(){
+				if(this.userCard){
+					var date=new Date().getTime()
+					//var reg=new RegExp('-','gi')
+					var str=this.userCard.endTime;
+					//console.log(str.replace(reg,'/'))
+					var date2=newDate(str).getTime();
+					
+					if(date<date2){
+						
+						return true;
+					}
+				}
+				return false
+			}
+		},
 		onReady() {
 			this.userCard=this.carhelp.getPersonInfoPlus().userCard
-			
+			 
+
 			this.businessVipList=this.carhelp.getPersonInfoPlus().businessVipList
 			if(this.businessVipList.length){
 			
@@ -91,8 +143,60 @@
 					}
 			}
 			
+			this.getChargeList();
+			
 		},
+		 
 		methods: {
+			gotocardDetails(item){
+				this.carhelp.set("cardDetails-info",item)
+				uni.navigateTo({
+					url:'/pages/cardBag/cardDetails?id='+item.id
+				})
+			},
+			 thisdaysDistance(endTime){
+			
+				 var date=new Date()
+				 var date2=newDate(endTime);
+				 return daysDistance(date,date2)
+				 
+			 },
+			getChargeList() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				API.personCardList({
+				
+				}).then((res) => {
+					uni.hideLoading();
+					
+					this.expireUserCardList = res.data.expireUserCardList;
+					//this.recordsTotal = res.data.recordsTotal;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			thisendTime(endTime){
+				if(endTime){
+					var reg=new RegExp('-','gi')
+					var str=endTime.substring(0,10).replace(reg,'.')
+					return str
+				}
+				return ''
+			},
+			thispercent(userCard){
+				var p=0
+				
+				if(userCard){
+					p=userCard.chargedDegree/userCard.chargeDegreeLimit*100
+				}
+				return p.toFixed(0)
+			},
 			personalCenter(){
 				API.personalCenter().then((res2) => {
 					var entRegList=res2.data.entRegList;
@@ -116,12 +220,26 @@
 			},
 			change(index) {
 				this.current = index;
+				
 			}
 		}
 	}
 </script>
 
 <style scoped lang="scss">
+	.carNone{
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		img{
+			width: 100%;
+			height: 100%;
+		}
+		p{
+			margin-top: -60px;
+		}
+	}
 	/deep/.u-tab-bar {
 		background-color: #00B962 !important;
 	}

+ 270 - 167
pages/cardBag/cardDetails.vue

@@ -1,170 +1,273 @@
-<template>
-	<view>
-		<ujp-navbar title="会员卡详情">
-			<view slot="right" style="margin-right: 10px;">
-
-				<view class="iconfont qr-code">
-					&#xe60d;
-				</view>
-			</view>
-		</ujp-navbar>
-
-		<view class="header">
-<view class="discount-card">
-				<view class="name">
-					自营站充电服务费6折卡
-				</view>
-				<view class="progress">
-					<view class="time">
-						2023.09.16到期 | 剩余29天
-					</view>
+<template>
+	<view>
+		<ujp-navbar title="会员卡详情">
+			<view slot="right" style="margin-right: 10px;">
+
+				<view @click="openModalBl=true" class="iconfont qr-code">
+					&#xe60d;
+				</view>
+			</view>
+		</ujp-navbar>
+
+		<view class="header" v-if="item.id" >
+			<view class="discount-card">
+				<view class="name">
+					自营站充电服务费6折卡
+				</view>
+				<view class="progress">
+					<view class="time">
+						{{thisendTime(item.endTime)}}到期 | 剩余{{thisdaysDistance(item.endTime)}}天
+					</view>
 					<view class="electric-quantity">
-						已用119度 / 共338度
-					</view>
-				</view>
-				<u-line-progress active-color="#2979ff" :percent="70"></u-line-progress>
-			</view>
-		</view>
-<!-- 卡片信息 -->
-<view class="card-infos">
-	<view class="item">
-		<view class="title">
-			卡类型
-		</view>
-		<view class="value">
-			服务费折扣卡
-		</view>
-	</view>
-	<view class="item">
-		<view class="title">
-			折扣率
-		</view>
-		<view class="value">
-			6折
-		</view>
-	</view>
-	<view class="item">
-		<view class="title">
-			规格
-		</view>
-		<view class="value">
-			可用338度(有效期30天)
-		</view>
-	</view>
-	<view class="item">
-		<view class="title">
-			有效期
-		</view>
-		<view class="value">
-			2023.08.17-2023.09.16
-		</view>
-	</view>
-	<view class="item">
-		<view class="title">
-			剩余度数
-		</view>
-		<view class="value">
-			119度
-		</view>
-	</view>
-	<view class="item">
-		<view class="title">
-			绑定账号
-		</view>
-		<view class="value">
-			15500001111
-		</view>
-	</view>
-	<view class="item">
-		<view class="title">
-			卡号
-		</view>
-		<view class="value">
-			T20230816112557708460925
-		</view>
-	</view>
-	<view class="item">
-		<view class="title">
-			使用规则
-		</view>
-		<view class="value highlight">
-			点击查看活动详情
-		</view>
-	</view>
-</view>
-
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-
-			}
-		},
+						已用{{item.chargedDegree?item.chargedDegree.toFixed(0):0.00}}度 / 共{{item.chargeDegreeLimit}}度
+					</view>
+				</view>
+				<ujp-line-progress active-color="#2979ff" :percent="thispercent(item)"></ujp-line-progress>
+			</view>
+		</view>
+		<!-- 卡片信息 -->
+		<view class="card-infos" v-if="item.id">
+			<view class="item">
+				<view class="title">
+					卡类型
+				</view>
+				<view class="value">
+					服务费折扣卡
+				</view>
+			</view>
+			<view class="item">
+				<view class="title">
+					折扣率
+				</view>
+				<view class="value">
+					6折
+				</view>
+			</view>
+			<view class="item">
+				<view class="title">
+					规格
+				</view>
+				<view class="value">
+					可用{{item.chargeDegreeLimit}}度(有效期{{thisdaysDistance2()}}天)
+				</view>
+			</view>
+			<view class="item">
+				<view class="title">
+					有效期
+				</view>
+				<view class="value">
+					{{thisendTime(item.startTime)}}-{{thisendTime(item.endTime)}}
+				</view>
+			</view>
+			<view class="item">
+				<view class="title">
+					剩余度数
+				</view>
+				<view class="value">
+					{{item.chargedDegree?item.chargedDegree.toFixed(0):0.00}}度
+				</view>
+			</view>
+			<view class="item" v-if="false">
+				<view class="title">
+					绑定账号
+				</view>
+				<view class="value">
+					15500001111
+				</view>
+			</view>
+			<view class="item">
+				<view class="title">
+					卡号
+				</view>
+				<view class="value">
+					{{item.cardNo}}
+				</view>
+			</view>
+			<view class="item">
+				<view class="title">
+					使用规则
+				</view>
+				<view class="value highlight" @click="gotoUrl('pages/article/details?code=FWF6ZK')">
+					点击查看活动详情
+				</view>
+			</view>
+		</view>
+
+		<u-modal v-model="openModalBl" @confirm="confirmPhone" confirm-text="拨打电话" confirm-color="#606266"
+			:show-cancel-button="true" ref="uModal" :asyncClose="true" title="客服电话" :content="content"
+			:content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
+	</view>
+
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/index.js'
+	import {
+		newDate,
+		daysDistance
+
+	} from '@/utils'
+	export default {
+		data() {
+			return {
+				id: "",
+				item: {},
+				content: "400-8899-619",
+				openModalBl: false,
+				expireUserCardList: [],
+				//userCard: {},
+			}
+		},
+		onLoad(op) {
+			this.id = op.id
+			this.getChargeList();
+		},
+		onReady() {
+
+			var consumerPhone = this.carhelp.getConfig().consumerPhone
+			// img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"		
+			if (consumerPhone) {
+				this.content = consumerPhone
+			}
+
+		},
 		methods: {
-
-		}
-	}
-</script>
-<style>
-	page{
-		background-color: #fff;
-		padding-bottom: 100px;
-	}
-</style>
-<style lang="scss" scoped>
-	.header{
-		padding: 24rpx 32rpx;
-		opacity: 0.9;
-		background: linear-gradient(30deg, rgba(59,182,254,1) 13.4%,rgba(0,185,98,1) 85.87%);
-	
-	.discount-card{
-		
-		border-radius: 8px;
-		background-color: rgba(55, 59, 80, 1);
-		padding: 24rpx;
-		margin-top: 24rpx;
-		
-		.name{
-			color: rgba(255, 255, 255, 1);
-			font-size: 32rpx;
-		}
-		.progress{
-			display: flex;
-			justify-content: space-between;
-			color: rgba(219, 219, 219, 1);
-			font-size: 24rpx;
-			margin-bottom: 16rpx;
-			margin-top: 24rpx;
-		}
-		/deep/.u-active{
-			background: linear-gradient(84.49deg, rgba(59,182,254,1) 4.25%,rgba(0,185,98,1) 95.02%);
-		}
-	}
-	
-	}
-  // 卡片信息
-  .card-infos{
-	  padding: 24rpx 32rpx;
-	  .item{
-		  display: flex;
-		  align-items: center;
-		  margin-bottom: 24rpx;
-		  .title{
-			  color: rgba(119, 119, 119, 1);
-			  font-size: 32rpx;
-			  width: 140rpx;
-		  }
-		  .value{
-			  color: rgba(16, 16, 16, 1);
-			  font-size: 32rpx;
-			  margin-left: 24rpx;
-		  }
-		  .highlight{
-			  color: rgba(0, 185, 98, 1);
-		  }
-	  }
-  }
+			thisendTime(endTime){
+				if(endTime){
+					var reg=new RegExp('-','gi')
+					var str=endTime.substring(0,10).replace(reg,'.')
+					return str
+				}
+				return ''
+			},
+			thispercent(userCard){
+				var p=0
+				
+				if(userCard){
+					p=userCard.chargedDegree/userCard.chargeDegreeLimit*100
+				}
+				return p.toFixed(0)
+			},
+			thisdaysDistance(endTime){
+						
+							 var date=new Date()
+							 var date2=newDate(endTime);
+							 return daysDistance(date,date2)
+							 
+			},
+			thisdaysDistance2(){
+						if(this.item.endTime){
+							var date=newDate(this.item.startTime)
+							var date2=newDate(this.item.endTime);
+							return daysDistance(date,date2)
+						}
+							return 0
+							 
+			},
+			getChargeList() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+
+				API.personCardList({
+
+				}).then((res) => {
+					uni.hideLoading();
+					var cardList = res.data.cardList;
+					var expireUserCardList = res.data.expireUserCardList;
+					var sz = [
+						...cardList,
+						...expireUserCardList
+					]
+					var obj = sz.find(item => {
+						return item.id == this.id
+					})
+					this.item = obj
+					//console.log(obj)
+
+					//this.recordsTotal = res.data.recordsTotal;
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			confirmPhone() {
+				this.openModalBl = false;
+				uni.makePhoneCall({
+					phoneNumber: this.content //仅为示例
+				});
+			},
+		}
+	}
+</script>
+<style>
+	page {
+		background-color: #fff;
+		padding-bottom: 100px;
+	}
+</style>
+<style lang="scss" scoped>
+	.header {
+		padding: 24rpx 32rpx;
+		opacity: 0.9;
+		background: linear-gradient(30deg, rgba(59, 182, 254, 1) 13.4%, rgba(0, 185, 98, 1) 85.87%);
+
+		.discount-card {
+
+			border-radius: 8px;
+			background-color: rgba(55, 59, 80, 1);
+			padding: 24rpx;
+			margin-top: 24rpx;
+
+			.name {
+				color: rgba(255, 255, 255, 1);
+				font-size: 32rpx;
+			}
+
+			.progress {
+				display: flex;
+				justify-content: space-between;
+				color: rgba(219, 219, 219, 1);
+				font-size: 24rpx;
+				margin-bottom: 16rpx;
+				margin-top: 24rpx;
+			}
+
+			/deep/.u-active {
+				background: linear-gradient(84.49deg, rgba(59, 182, 254, 1) 4.25%, rgba(0, 185, 98, 1) 95.02%);
+			}
+		}
+
+	}
+
+	// 卡片信息
+	.card-infos {
+		padding: 24rpx 32rpx;
+
+		.item {
+			display: flex;
+			align-items: center;
+			margin-bottom: 24rpx;
+
+			.title {
+				color: rgba(119, 119, 119, 1);
+				font-size: 32rpx;
+				width: 140rpx;
+			}
+
+			.value {
+				color: rgba(16, 16, 16, 1);
+				font-size: 32rpx;
+				margin-left: 24rpx;
+			}
+
+			.highlight {
+				color: rgba(0, 185, 98, 1);
+			}
+		}
+	}
 </style>

+ 114 - 1
pages/discountCard/paymentSuccess.vue

@@ -62,14 +62,127 @@
 </template>
 
 <script>
+	import * as API from '@/apis/finance.js'
+	import * as newsApi from '@/apis/news.js'
 	export default {
 		data() {
 			return {
-				
+				detail: {},
+				id: "",
+				charge:false,
+				chargeObj:{},
+				title:'充值结果',
+				bannerList:[],
+			}
+		},
+		onLoad(op) {
+			if(op.id){
+				this.id=op.id
+				this.getInfo();
 			}
+			var obj=this.carhelp.getGunIdCharge();
+			if(obj){
+				this.charge=true
+				this.chargeObj=obj
+			}
+			this.getBannerInfo("recharge-end")
 		},
 		methods: {
+			clickBanner(index){
+				var mod= this.bannerList[index]
+				
+				if(mod.linkUrl.indexOf('http')==0){
+				    window.location=mod.linkUrl;
+				}
+				else if(mod.linkUrl.indexOf('#/')==0){
+					if(mod.linkUrl.indexOf("?")==-1){
+						mod.linkUrl+='?';
+					}
+				    //window.location=mod.linkUrl;
+					var url=mod.linkUrl.split("#")[1]
+					//window.location = mod.clickUrl;
+					uni.navigateTo({
+						url: url
+					})
+				}
+				else if(mod.linkUrl=='#'||mod.linkUrl==''){
+				
+				}
+				else{
+					uni.navigateTo({
+						url:mod.linkUrl
+					})
+				}
+				
+			},
+			getBannerInfo(code){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				newsApi.getBannerInfo(code).then((res) => {
+					uni.hideLoading();
+					this.bannerList =res.data;
+					
+					// document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 300px;"
+				 }).catch(error => {
+						uni.showToast({
+						
+							title: error,icon: "none"
+						})
+				})
+			},
+			getInfo() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.accountDetail({
+					outOrderNo: this.id
+				}).then((res) => {
+					uni.hideLoading()
 			
+					this.detail = res.data.orderInfo;
+					if(this.detail.type=='2'){
+						this.title='开通会员'
+					}
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			userindex() {
+				uni.redirectTo({
+					url: '/pages/user/index'
+				})
+			},
+			rechargeContinue() {
+				uni.redirectTo({
+					url: '/pages/user/finance/recharge'
+				})
+			},
+			chargeLook2(){
+			 	
+				uni.redirectTo({
+					url:"/pages/searchPile/chargeProcess/dcCharging?id=" + this.detail.recordId
+				})
+				
+			},
+			chargeLook(){
+				
+				uni.redirectTo({
+					url:'/pages/searchPile/chargeProcess/charge?isback=1&deviceNo='+this.chargeObj.deviceNo+"&gun="+this.chargeObj.channelNo+"&carNumber="+this.chargeObj.carNumber
+				})
+				
+			},
+			balanceLook() {
+				uni.redirectTo({
+					url: '/pages/user/finance/balance'
+				})
+			}
 		}
 	}
 </script>

+ 429 - 4
pages/discountCard/productDetails.vue

@@ -69,6 +69,19 @@
 					选择商品规格<u-icon name="arrow-right" color="#999" size="28"></u-icon>
 				</view>
 			</view>
+			
+			<view class="notice2">
+				
+			
+				<view class="upupupView" v-show="flag==1">
+					<view class="upupupImg">
+						<img src="@/assets/img/upupup.svg">
+					</view>
+			
+					<p>上划查看更多内容</p>
+				</view>
+			
+			</view>
 			<!-- 适用站点 -->
 			<view class="applicable-site">
 				适用站点:平台自营站
@@ -431,7 +444,7 @@
 							</view>
 						  </view>
 						  <!-- 数量 -->
-						  <view class="amount">
+						  <view class="amount" v-if="false">
 						  	<view class="title">
 						  		数量(单笔订单限购1件)
 						  	</view>
@@ -462,20 +475,394 @@
 	  </u-popup>
 	  	
 	</view>
+	<u-action-sheet :list="list" @click="click" v-model="showPay"></u-action-sheet>
+	<u-modal v-model="showModel" :show-cancel-button="true" @cancel="getUserInfo()" @confirm="confirm"
+		confirm-text="支付成功?" title="扫码支付">
+		<view style="
+							text-align: center;
+						">
+			<img id="qrcode2" :src="qrCodeImg">
+		</view>
+		<view style="
+							text-align: center;
+						">请使用支付宝扫码</view>
+	
+	</u-modal>
+	
+	<u-modal v-model="show1" @confirm="gotoGz" cancel-text="暂不关注" confirm-text="前往关注" confirm-color="#53b56b"
+		:show-cancel-button="true" ref="uModal2" :asyncClose="true">
+		<view style="padding: 15px;">请先关注<span style=" color:  #53b56b;">{{projectName}}</span>公众号,购买月卡</view>
+	
+	
+	</u-modal>
+	
+	
+	<u-modal v-model="infoSet1" @confirm="infoSet1=false,gotoUrl('pages/user/dataSet')" cancel-text="取消"
+		confirm-text="完善个人信息" confirm-color="#53b56b" :show-cancel-button="true" ref="uModal2" :asyncClose="true">
+		<view style="padding: 15px;">购买月卡需要完善以下2点<br />
+			1.填写真实姓名<br />
+			2.填写车牌号<br />
+		</view>
+	</u-modal>
+	<img id="qrcode" style="display: none;">
+	
 	
 	</view>
 </template>
 
 <script>
+	import * as API_weixin from '@/apis/weixin.js'
+	
+	import * as Pay from '@/apis/weixin.js'
+	import * as API from '@/apis/card.js'
+	import * as loginApi from '@/apis/login.js'
+	
+	import QRCode from 'qrcodejs2'
+	import {
+		newDate,
+		convertCanvasToImage,
+	} from '@/utils'
+	import {
+		wxPayJs
+	} from '@/utils/wxpay'
+	
 	export default {
 		data() {
 			return {
-                   show:false,
-				   value: 1
+				checked: "false",
+				cardId: '',
+				qrCodeImg: "",
+				showModel: false,
+                   show:false,//选择规格
+				   showPay:false,//支付方式
+				   value: 1,
+				   cardList: [],
+				   projectName: "",
+				   list: [{
+				   	text: '微信',
+				   
+				   }, {
+				   	text: '支付宝'
+				   }],
+				   submitForm: {},
+				   ykgz: '',
+				   detail: {},
+				   ispay: false,
+				   show3: false,
+				   show2: false,
+				   show1: false,
+				   infoSet: false,
+				   infoSet1: false,
+				   userCard: null,
+				   isReady: false,
+				   userInfo: {},
+				   elderStatus: false,
+				   consumerPhone: "",
+				   scrollLeftSet: 0,
+				   scrollLeftOldSet: 0,
+				   scrollLeftSetBl: false,
+				   flag: 0, //0  初始化,  1 ,开始判断, 2已经滑动
+				   
+			}
+		},
+		onReady() {
+			var consumerPhone = this.carhelp.getConfig().consumerPhone
+			// img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"		
+			if (consumerPhone) {
+				this.consumerPhone = consumerPhone
+			}
+		
+			//this.ykgz = this.carhelp.getConfig().ykgz
+			
+			var userCard = this.carhelp.getPersonInfoPlus().userCard
+			if(userCard&&userCard.classify==2){
+				this.userCard=userCard
+				this.ispay = this.userCardBool(this.userCard)
+			}
+			
+			
+			//this.checkSubscribe()
+			this.getCardList();
+		
+		},
+		onShow() {
+			
+			this.checkSubscribe();
+		
+		},
+		computed: {
+			
+			endCardBool() {
+				if (!this.cardList.length) {
+					return false;
+				}
+				var date = new Date().getTime()
+				if (!this.detail.endTime) {
+					return true;
+				}
+				var date2 = newDate(this.detail.endTime).getTime();
+		
+				if (date < date2) {
+					return true;
+				} else {
+					return false;
+				}
+			}
+		},
+		onPageScroll(e) {
+		
+			if (this.flag == 1) {
+				if (e.scrollTop >= 50) {
+					this.flag = 2;
+				} else {
+		
+				}
 			}
 		},
 		methods: {
-
+			confirmPhone() {
+				this.show = false;
+				uni.makePhoneCall({
+					phoneNumber: this.consumerPhone //仅为示例
+				});
+			},
+			checkboxChange(monthlyRentCard) {
+			
+				this.detail = monthlyRentCard;
+				this.cardId = monthlyRentCard.id
+				monthlyRentCard.checked = true
+				for (var i in this.cardList) {
+					var obj = this.cardList[i].monthlyRentCard;
+					if (this.cardId == obj.id) {
+			
+					} else {
+						obj.checked = false
+					}
+				}
+				
+			},
+			gotoGz() {
+				this.carhelp.setGzDate()
+				var url = "https://mp.weixin.qq.com/s/mCHz1nNvg0xAICiBeIyKRQ";
+				window.location.href = url
+			
+			},
+			checkSubscribe() {
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API_weixin.checkSubscribe({
+					openId: this.carhelp.getOpenId()
+				}).then((res) => {
+					uni.hideLoading()
+					if (res.data == "0") {
+						this.show1 = true
+			
+					} else {
+						//this.getInfo();
+			
+						this.getCardList();
+						this.show2 = true;
+						//this.carhelp.setGzDate() 
+					}
+			
+					//setGzDate
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			
+			},
+			userCardBool(userCard) {
+			
+			
+				if (userCard) {
+					var date = new Date().getTime()
+					var date2 = newDate(userCard.endTime).getTime();
+					if (date < date2) {
+						return true;
+					}
+				}
+				return false
+			},
+			getCardList() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.cardList({
+					type:2
+				}).then((response) => {
+					uni.hideLoading()
+					this.cardList = response.data.cardList;
+			 
+					if (this.cardList.length) {
+						this.detail = this.cardList[0].monthlyRentCard
+						this.cardId = this.detail.id;
+						this.cardList[0].monthlyRentCard.checked = true
+					
+					}
+					this.getUserInfo()
+					this.isReady = true;
+					//cardId: this.cardId
+			
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			},
+			getUserInfo() {
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				loginApi.findByOpenId({
+					openId: this.carhelp.getOpenId(),
+					noerror: true
+				}).then((res) => {
+			
+			
+					if (res.code == 200 && res.result) {
+			
+						if (res.data.regUser) {
+							var userInfo = res.data.regUser
+							this.userInfo = userInfo;
+							if (userInfo.userType == "1") {
+			
+							} else if (userInfo.carId && userInfo.realName) {
+								this.infoSet = true;
+			
+							} else {
+								this.infoSet = false;
+								if (this.endCardBool) {
+									this.infoSet1 = true;
+								}
+			
+							}
+			
+							var userCard = res.data.userCard;
+							this.userCard = userCard
+							this.ispay = this.userCardBool(userCard)
+			
+						} else {
+			
+						}
+						if (this.flag == 0) {
+							this.flag = 1;
+							setTimeout(() => {
+								this.flag = 2;
+							}, 5000)
+						}
+					}
+					uni.hideLoading();
+			
+			
+			
+			
+			
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			submit(type) {
+				if (!this.endCardBool) {
+					return
+				}
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.openCard({
+					cardId: this.cardId
+				}).then((response) => {
+					this.submitForm.id = response.data.orderInfoId
+			
+					if (type == 0) {
+						this.wxpy()
+					}
+					if (type == 1) {
+						this.alpy()
+					}
+				}).catch(error => {
+					uni.showToast({
+						title: error
+					})
+				})
+			
+			},
+			alpy() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				var listcanvas = document.getElementsByTagName('canvas')
+			
+				if (listcanvas.length > 0) {
+					document.getElementById("qrcode").removeChild(document.getElementsByTagName('canvas')[0]);
+				}
+				Pay.alpay(this.submitForm).then((response) => {
+			
+					let qrcode = new QRCode('qrcode', {
+						width: 200,
+						height: 200,
+						text: response.data.qr_code,
+						correctLevel: QRCode.CorrectLevel.M,
+			
+					})
+					this.outOrderNo = response.data.outOrderNo;
+					var canvas = document.getElementsByTagName('canvas')[0];
+					this.qrCodeImg = convertCanvasToImage(canvas);
+					uni.hideLoading()
+					this.showModel = true
+			
+				}).catch(error => {
+					uni.showToast({
+			
+						title: error
+					})
+				})
+			},
+			wxpy() {
+			
+				Pay.wxpay(this.submitForm).then((response) => {
+			
+					if (!response.result) {
+						uni.showToast({
+							title: response.message
+						})
+						return
+					}
+					var data = response.data
+					uni.hideLoading()
+					//("Pay+"+new Date().getTime())		
+					wxPayJs(data);
+			
+				}).catch(error => {
+					uni.showToast({
+			
+						title: error
+					})
+			
+				})
+			},
+			confirm() {
+				this.getUserInfo();
+				uni.redirectTo({
+					url: "/pages/user/discountCard/paymentSuccess?id=" + this.outOrderNo
+				})
+			},
+			click(index) {
+				console.log(`点击了第${index + 1}项,内容为:${this.list[index].text}`)
+				this.submit(index);
+			}
 		}
 	}
 </script>
@@ -485,6 +872,44 @@
 		padding-bottom: 200px;
 	}
 </style>
+<style>
+	@keyframes movepoint {
+		25% {
+			top: 10px;
+		}
+
+		100% {
+			top: 15px;
+		}
+	}
+
+	.upupupImg {
+		height: 80px;
+	}
+
+	.upupupView {
+		text-align: center;
+		font-size: 12px;
+		padding: 30rpx;
+		border-radius: 12px;
+		position: absolute;
+		background: rgb(0 0 0 / 70%);
+		top: 50%;
+		transform: translate(-50%);
+		left: 50%;
+		color: #fff;
+
+
+	}
+
+	.upupupView img {
+		top: 15px;
+		position: relative;
+		width: 60px;
+		animation: movepoint 2s infinite;
+		-webkit-animation: movepoint 2s infinite;
+	}
+</style>
 <style lang="scss" scoped>
 	.header {
 		width: 100%;

+ 6 - 2
pages/monthlyCardActivity/monthlyCardBuy.vue

@@ -349,8 +349,12 @@
 
 			this.ykgz = this.carhelp.getConfig().ykgz
 			
-			this.userCard = this.carhelp.getPersonInfoPlus().userCard
-			this.ispay = this.userCardBool(this.userCard)
+			var userCard = this.carhelp.getPersonInfoPlus().userCard
+			if(userCard&&userCard.classify==1){
+				this.userCard=userCard
+				this.ispay = this.userCardBool(this.userCard)
+			}
+			
 			
 			//this.checkSubscribe()
 			this.getCardList();

+ 67 - 9
pages/searchPile/chargeProcess/dcCharging.vue

@@ -525,19 +525,43 @@
 					
 			
 				</view>
-				<view  class="else-infos">
+				<view  class="else-infos" v-if="false">
 					<view class="item">常见问题</view>
 					<u-tabs   :list="tabList" 
 					height="60"  style="    position: relative; left: -20rpx;"
 					:current="current" @change="change" active-color="#101010" :bold="false" :bar-style="barstyle" inactive-color="#c4c0c0"></u-tabs>
-					<view class="collapse">
+					
+					<view class="collapse" v-for="(itemList,i) in newsList" :key="i" v-show="current==i">
 								<!-- -->
-								<u-collapse   v-if="newsList.length" >
-									<u-collapse-item :title="item.title"  v-for="(item, index) in newsList" :key="index">
+								
+								<u-collapse   v-if="itemList.length" >
+									<u-collapse-item  v-for="(item, index) in itemList"  :title="(index+1)+'.'+item.title"  :key="index">
 					<!-- 					<textarea maxlength="-1" :auto-height="true" v-model="item.content" readonly ></textarea>
 					 -->					<view v-html="item.content"></view> 
 									</u-collapse-item>
 								</u-collapse>
+								
+							</view>
+				</view>
+				<!-- 常见问题 -->
+				<view class="common-problem ">
+					<view class="title">
+						常见问题
+					</view>
+					<view class="tabs">
+						<u-tabs active-color="#333333" inactive-color="#999999" :list="tabList" :is-scroll="false"
+							:current="current" @change="change"></u-tabs>
+					</view>
+					<view class="collapse" v-for="(itemList,i) in newsList"  :key="i"  v-show="current==i">
+								<!-- -->
+								
+								<u-collapse   v-if="itemList.length" >
+									<u-collapse-item  v-for="(item, index) in itemList"  :title="(index+1)+'.'+item.title" :key="index">
+					<!-- 					<textarea maxlength="-1" :auto-height="true" v-model="item.content" readonly ></textarea>
+					 -->					<view v-html="item.content"></view> 
+									</u-collapse-item>
+								</u-collapse>
+								
 							</view>
 				</view>
 			
@@ -612,7 +636,9 @@
 					{name: '活动优惠',type: 'CJWT-YHHD'},
 				],
 				current: 0,
-				newsList: [],
+				newsList: [
+					[],[],[]
+				],
 				newsType: 'CJWT-GZ',
 				pageIndex: 1,
 				recordsTotal: 0,
@@ -721,21 +747,23 @@
 			change(index) {
 				this.current = index;
 				this.newsType = this.tabList[index].type;
+				if(this.newsList[this.current].length==0){
+					this.getNewsList(true)
+				}
 				
-				this.getNewsList(true)
 			},
 			getNewsList() {
 				
 				
 				
-				newsApi.newsInfoList({
+				newsApi.newsInfoContentList({
 					pageIndex: 1,
 					pageSize: 100,
 					shortName: this.newsType
 				}).then((res) => {
 					
 					var newsList = res.data.data;
-					this.newsList = newsList.reverse()
+					this.newsList[this.current] = newsList.reverse()
 					//this.recordsTotal = res.data.recordsTotal		
 				}).catch(error => {
 					uni.showToast({
@@ -1100,7 +1128,37 @@
 	}
 </style>
 <style lang="scss" scoped>
-	 
+	 
+	 
+	 .common-problem {
+	 	//margin: -125px 32rpx 0;
+	 	border-radius: 8px;
+	 	background-color: #fff;
+	 		padding: 20rpx 24rpx 48rpx 24rpx;
+			margin: 32rpx 40rpx 40rpx 40rpx;
+			
+	 	.title {
+	 		color: rgba(16, 16, 16, 1);
+	 		font-size: 32rpx;
+	 		padding-bottom: 20rpx;
+	 		border-bottom: 1px solid rgba(246, 246, 246, 1);
+	 		padding-left: 32rpx;
+	 	}
+	 
+	 	.tabs {
+	 		width: 400rpx;
+	 		padding-bottom: 20rpx;
+	 		border-bottom: 1px solid rgba(246, 246, 246, 1);
+	 
+	 		/deep/.u-tab-bar {
+	 			background-color: #00B962 !important;
+	 		}
+	 	}
+	 
+	 	.collapse {
+	 		padding: 0 32rpx;
+	 	}
+	 }
 	.voltageShow{
 		color: rgba(119, 119, 119, 100);
 		font-size: 18px;

+ 65 - 33
pages/service/service.vue

@@ -7,7 +7,7 @@
 				<view class="title">
 					问题反馈
 				</view>
-				<view class="suggestion-feedback">
+				<view class="suggestion-feedback" @click="gotoUrl('pages/user/message')" >
 					<view class="box">
 						<img src="../../assets/img/riLine-edit-box-line@3x.png" alt="">
 					</view>
@@ -26,13 +26,17 @@
 				<u-tabs active-color="#333333" inactive-color="#999999" :list="list" :is-scroll="false"
 					:current="current" @change="change"></u-tabs>
 			</view>
-			<view class="collapse">
-				<u-collapse>
-					<u-collapse-item :title="item.head" v-for="(item, index) in itemList" :key="index">
-						{{item.body}}
-					</u-collapse-item>
-				</u-collapse>
-			</view>
+			<view class="collapse" v-for="(itemList,i) in newsList"  :key="i"  v-show="current==i">
+						<!-- -->
+						
+						<u-collapse   v-if="itemList.length" >
+							<u-collapse-item  v-for="(item, index) in itemList" :title="(index+1)+'.'+item.title"  :key="index">
+			<!-- 					<textarea maxlength="-1" :auto-height="true" v-model="item.content" readonly ></textarea>
+			 -->					<view v-html="item.content"></view> 
+							</u-collapse-item>
+						</u-collapse>
+						
+					</view>
 		</view>
 		<!-- 底部 -->
 		<view class="bottom">
@@ -45,53 +49,81 @@
 				</view>
 			</view>
 		</view>
-		<u-action-sheet :list="serviceList" v-model="show"></u-action-sheet>
+		<u-action-sheet :list="serviceList" 
+		@click="clickAcs"
+		v-model="show"></u-action-sheet>
 		
 	</view>
 </template>
 
 <script>
+	import * as newsApi from '@/apis/news.js'
+	
 	export default {
 		data() {
 			return {
-				list: [{
-					name: '故障'
-				}, {
-					name: '软件使用'
-				}, {
-					name: '活动优惠',
-
-				}],
+				newsType: 'CJWT-GZ',
+				
+				list: [
+					{name: '故障',type: 'CJWT-GZ'},
+					{name: '软件使用',type: 'CJWT-RJSY'},
+					{name: '活动优惠',type: 'CJWT-YHHD'},
+				],
 				serviceList: [{
 					text: '平台服务 400-8899-619',
+					tel:"400-8899-619",
 					
 				}, {
-					text: '故障反馈 15607217777'
+					text: '故障反馈 15607217777',
+					tel:"15607217777",
 				}, {
-					text: '售后受理 15607217777'
+					text: '售后受理 15607217777',
+					tel:"15607217777",
 				}],
 
-				itemList: [{
-					head: "赏识在于角度的转换",
-					body: "只要我们正确择取一个合适的参照物乃至稍降一格去看待他人,值得赏识的东西便会扑面而来",
-					open: true,
-					disabled: true
-				}, {
-					head: "生活中不是缺少美,而是缺少发现美的眼睛",
-					body: "学会欣赏,实际是一种积极生活的态度,是生活的调味品,会在欣赏中发现生活的美",
-					open: false,
-				}, {
-					head: "周围一些不起眼的人、事、物,或许都隐藏着不同凡响的智慧",
-					body: "但是据说雕刻大卫像所用的这块大理石,曾被多位雕刻家批评得一无是处,有些人认为这块大理石采凿得不好,有些人嫌它的纹路不够美",
-					open: false,
-				}],
+				newsList: [
+					[],[],[]
+				],
 				current: 0,
 				show:false
 			}
 		},
+		onReady() {
+			
+			this.getNewsList();
+		},
 		methods: {
+			getNewsList() {
+				
+				newsApi.newsInfoContentList({
+					pageIndex: 1,
+					pageSize: 100,
+					shortName: this.newsType
+				}).then((res) => {
+					
+					var newsList = res.data.data;
+					this.newsList[this.current] = newsList.reverse()
+					//this.recordsTotal = res.data.recordsTotal	
+					this.$forceUpdate()
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
+			clickAcs(i){
+				
+				uni.makePhoneCall({
+					phoneNumber: this.serviceList[i].tel //仅为示例
+				});
+			},
 			change(index) {
 				this.current = index;
+				this.newsType = this.list[index].type;
+				if(this.newsList[this.current].length==0){
+					this.getNewsList(true)
+				}
 			}
 		}
 	}

+ 3 - 1
pages/user/index.vue

@@ -368,6 +368,8 @@
 			}
 		},
 		onReady() {
+			this.getBannerInfo("userinfo")
+			
 			WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
 				// //(res)
 			}).catch(error => {
@@ -379,7 +381,7 @@
 			if(consumerPhone){
 				this.content=consumerPhone
  			}
-			this.getBannerInfo("userinfo")
+			
 		},
 		methods: {