LinWuTai vor 1 Monat
Ursprung
Commit
eaf0a42d4a

+ 3 - 4
components/creditCard.vue

@@ -20,7 +20,7 @@
 		</view>
 		<view class="image-box" v-if="isLogin && data.creditNo">
 			<view class="image-item-box">
-				<image class="photo" :src="data.photo"></image>
+				<image class="photo" :src="data.headUrl"></image>
 			</view>
 			<view class="image-item-box">
 				<view class="qrcode-box">
@@ -77,13 +77,12 @@
 		data: {
 			type: Object,
 			default: {
-				id: null,
 				creditNo: null,
 				name: null,
 				date: null,
 				publisher: null,
-				photo: null,
-				qrCode: null
+				headUrl: null,
+				url: null
 			}
 		},
 		size: {

+ 13 - 1
pages/certificateDetail/certificateDetail.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="container">
 		<view class="photo-box">
-			<cover-image class="photo" src="https://ok.166.net/reunionpub/1_20210628_17a5105e667995566.jpeg"></cover-image>
+			<cover-image class="photo" :src="creditCard.headUrl"></cover-image>
 		</view>
 		<view class="info-box">
 			<view class="info-item-box">
@@ -71,10 +71,21 @@
 	import { onLoad } from '@dcloudio/uni-app'
 	
 	import { getZhongjie, getAnjie } from '@/api/user.js'
+	import { useAuthStore } from '@/store/authStore'
+	const authStore = useAuthStore()
 	
 	const certificateType = ref()
 	const certificateTitle = ref()
 	
+	const creditCard = ref({
+		creditNo: null,
+		name: null,
+		date: null,
+		publisher: null,
+		headUrl: null,
+		url: null
+	})
+	
 	const info = ref({
 		zsbh: null,
 		fzbm: null,
@@ -91,6 +102,7 @@
 		uni.setNavigationBarTitle({
 			title: certificateTitle.value
 		})
+		creditCard.value = authStore.creditCard
 		
 		if (certificateType.value === 'zhongjie') {
 			getZhongjie().then(res => {

+ 3 - 3
pages/collect/collect.vue

@@ -69,7 +69,7 @@
 	const searchType = [
 		{
 			label: '全部',
-			value: 0
+			value: null
 		},
 		{
 			label: '研究报告',
@@ -86,7 +86,7 @@
 	const loadMoreStatus = ref('more')
 	const searchForm = ref({
 		keyword: '',
-		type: 0,
+		type: null,
 		pageNumber: 1,
 		pageSize: 10
 	})
@@ -133,7 +133,7 @@
 	
 	function onClickReport(report) {
 		uni.navigateTo({
-			url: `/pages/reportDetail/reportDetail?id=${report.id}&title=${report.title}`
+			url: `/pages/goOnEdu/course/courseDetail/courseDetail?id=${report.id}&name=${report.title}`
 		})
 	}
 	onPullDownRefresh((e) => {

+ 6 - 0
pages/daiJiaoDanWeiHuiFei/daiJiaoDanWeiHuiFei.vue

@@ -17,6 +17,7 @@
 <script setup>
 	import { ref, reactive } from 'vue'
 	import { onLoad, onReady } from '@dcloudio/uni-app'
+	import { dept } from '@/api/cost.js'
 	
 	const formRef = ref()
 	const formData = reactive({
@@ -75,6 +76,11 @@
 				uni.navigateTo({
 					url: `/pages/daiJiaoDanWeiChaXunJieGuo/daiJiaoDanWeiChaXunJieGuo?id=${id}`
 				})
+				// dept(formData.form).then(res => {
+				// 	if(res && res.message === 'message') {
+				// 		console.log(res)
+				// 	}
+				// })
 			}
 		})
 	}

+ 15 - 1
pages/daiJiaoGeRenChaXunJieGuo/daiJiaoGeRenChaXunJieGuo.vue

@@ -91,7 +91,21 @@
 		}
 		personPayment(form).then(res => {
 			if (res && res.message === 'success') {
-				console.log('会费缴交', res)
+				const params = res.data
+				console.log('会费缴交params', params)
+				wx.requestPayment({
+				  timeStamp: params.timeStamp,
+				  nonceStr: params.nonceStr,
+				  package: params.package,
+				  signType: params.signType,
+				  paySign: params.paySign,
+				  success (res) {
+						console.log('支付成功', res)
+					},
+				  fail (res) {
+						console.log('支付失败', res)
+					}
+				})
 			}
 		})
 	}

+ 14 - 1
pages/geRenHuiFeiJiaoJiao/geRenHuiFeiJiaoJiao.vue

@@ -96,7 +96,20 @@
 		}
 		personPayment(form).then(res => {
 			if (res && res.message === 'success') {
-				console.log('会费缴交', res)
+				const params = res.data
+				wx.requestPayment({
+				  timeStamp: params.timeStamp,
+				  nonceStr: params.nonceStr,
+				  package: params.package,
+				  signType: params.signType,
+				  paySign: params.paySign,
+				  success (res) {
+						console.log('支付成功', res)
+					},
+				  fail (res) {
+						console.log('支付失败', res)
+					}
+				})
 			}
 		})
 	}

+ 16 - 5
pages/personalCenter/personalCenter.vue

@@ -46,7 +46,7 @@
 				我的证件
 			</view>
 			<view class="list-box">
-				<view class="list-item-box" @click="onShowCreditCard(creditCard.id)">
+				<view class="list-item-box" @click="onShowCreditCard">
 					<CreditCard :isLogin="isLogin" :data="creditCard" @guide="onCreditCardGuideClick()"></CreditCard>
 				</view>
 				<view class="list-item-box" :class="[isLogin ? (zhongjie.zsbh ? 'zhongjie-back' : 'zhongjie-back-zhiyin') : 'zhongjie-back-login']" @click="onZhongJieRenZhengClick(zhongjie.zsbh)">
@@ -252,17 +252,22 @@
 		name: '彭于晏',
 		date: '2018年6月22日',
 		publisher: '广州市住房和城乡建设委员会',
-		photo: 'https://ok.166.net/reunionpub/1_20210628_17a5105e667995566.jpeg',
-		qrCode: 'http://www.gzrea.org.cn:8543/icon/wxmp/zhengshu/qrCode.png'
+		headUrl: 'https://ok.166.net/reunionpub/1_20210628_17a5105e667995566.jpeg',
+		url: 'http://www.gzrea.org.cn:8543/icon/wxmp/zhengshu/qrCode.png'
 	})
-	function onShowCreditCard(valid) {
+	function onShowCreditCard() {
 		showCreditCard.value = false
-		if (isLogin.value &&  valid) {
+		if (isLogin.value) {
 			showCreditCard.value = true
 		}
 	}
 	// 信息信用卡-点击指引
 	function onCreditCardGuideClick() {
+		// {
+		// 	"id": 26314850,
+		// 	"title": "广州市房地产中介服务人员 —— 信用信息卡办理指引",
+		// 	"date": "2018-10-22"
+		// },
 		console.log('点击-信息信用卡指引');
 	}
 	// 中介认证点击
@@ -271,6 +276,11 @@
 			return
 		}
 		if (valid) {
+			// {
+			// 		"id": 33842433,
+			// 		"title": "广州市房地产中介从业人员信用信息卡办理指引",
+			// 		"date": "2018-10-26"
+			// },
 			uni.navigateTo({
 				url: '/pages/certificateDetail/certificateDetail?type=zhongjie&title=广州市房地产中介从业人员水平认证证书'
 			})
@@ -353,6 +363,7 @@
 		getCreditCard().then(res => {
 			if (res && res.message === 'success') {
 				creditCard.value = res.data
+				authStore.setCreditCard(res.data)
 			}
 		})
 		getZhongjie().then(res => {

+ 5 - 1
store/authStore.js

@@ -5,7 +5,8 @@ export const useAuthStore = defineStore('auth', {
 	state: () => ({
 		token: null,
 		userInfo: null,
-		phone: null
+		phone: null,
+		creditCard: ''
 	}),
 	actions: {
 		setAuthToken(newToken) {
@@ -13,6 +14,9 @@ export const useAuthStore = defineStore('auth', {
 			// 可以选择将 token 存储到 localStorage 或 sessionStorage
 			setToken(newToken)
 		},
+		setCreditCard(creditCard) {
+			this.creditCard = creditCard
+		},
 		clearAuthToken() {
 			this.token = null
 			removeToken()

+ 2 - 2
utils/request.js

@@ -59,9 +59,9 @@ const request = config => {
 				} = error;
 				if (message === 'Network Error') {
 					message = '后端接口连接异常';
-				} else if (message.indexOf('timeout')!==-1) {
+				} else if (message && message.indexOf('timeout')!==-1) {
 					message = '系统接口请求超时';
-				} else if (message.indexOf('Request failed with status code')!==-1) {
+				} else if (message && message.indexOf('Request failed with status code')!==-1) {
 					message = '系统接口' + message.substr(message.length - 3) + '异常';
 				}
 				toast(message);