Kaynağa Gözat

Merge branch 'master' of http://139.9.50.163:3000/Project2024/menber-center

LinWuTai 1 gün önce
ebeveyn
işleme
aaca708241

+ 1 - 1
api/home.js

@@ -31,7 +31,7 @@ export function homeReportList() {
 	return request({
 		'url': '/home/report',
 		headers: {
-			isToken: false
+			isToken: true
 		},
 		'method': 'get'
 	})

+ 29 - 7
pages/goOnEdu/course/courseDetail/courseDetail.vue

@@ -56,7 +56,8 @@
 		ref, computed
 	} from 'vue'
 	import {
-		onLoad
+		onLoad,
+		onShow
 	} from '@dcloudio/uni-app'
 
 	const courseDetail = ref({});
@@ -147,7 +148,8 @@
 		loadCourseDetail(id).then(res => {
 			if (res?.data) {
 				courseDetail.value = res.data;
-				console.log(courseDetail, "课程详情")
+				showBuy.value = showBuyAction()
+				// console.log(courseDetail, "课程详情")
 			}
 		})
 	}
@@ -191,8 +193,7 @@
 
 		return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 	}
-
-	const showBuy = computed(()=>{
+	function showBuyAction(){
 		if (courseDetail.value.viewMode === '2' &&
 			!isMember.value &&
 			!courseDetail.value.hasBuy &&
@@ -209,7 +210,26 @@
 		}
 		console.log(3)
 		return false
-	})
+	}
+	// const showBuy = computed(()=>{
+	// 	if (courseDetail.value.viewMode === '2' &&
+	// 		!isMember.value &&
+	// 		!courseDetail.value.hasBuy &&
+	// 		currentTab.value === 0) {
+	// 		console.log(1)
+	// 		return true
+	// 	}
+	// 	// 付费,不管是不是会员,并且没买的
+	// 	if (courseDetail.value.viewMode === '3' &&
+	// 		!courseDetail.value.hasBuy &&
+	// 		currentTab.value === 0) {
+	// 		console.log(2)
+	// 		return true
+	// 	}
+	// 	console.log(3)
+	// 	return false
+	// })
+	const showBuy = ref(false)
 	const isMember = computed(()=>{
 		return authStore.userInfo.isMember == '0' ? false : true
 	})
@@ -222,12 +242,14 @@
 		// isMember.value = authStore.userInfo.isMember == '0' ? false : true;
 		// console.log("是否是会员", isMember.value)
 		courseId.value = id
-		init(id)
-		getComment(id)
 		uni.setNavigationBarTitle({
 			title: name
 		});
 	})
+	onShow(()=>{
+		init(courseId.value)
+		getComment(courseId.value)
+	})
 </script>
 
 <style lang="scss" scoped>

+ 7 - 4
pages/goOnEdu/course/courseDetail/courseOrder.vue

@@ -175,6 +175,9 @@
 				})
 			}
 		})
+		// uni.navigateTo({
+		// 	url:"/pages/goOnEdu/course/courseDetail/coursePay?id="+ courseId.value
+		// })
 		// uni.redirectTo({
 		// 	url: "/pages/goOnEdu/course/courseDetail/coursePay?id=" + courseId.value
 		// })
@@ -202,7 +205,7 @@
 			url: '/pages/joinClub/joinClub'
 		})
 	}
-	
+
 	// 初始化
 	function init(id) {
 		loadCourseDetail(id).then(res => {
@@ -362,7 +365,7 @@
 		width: 100%;
 		display: flex;
 		justify-content: space-between;
-		padding: 40rpx 20rpx env(safe-area-inset-bottom, 0);
+		padding: 30rpx 20rpx calc(10rpx + env(safe-area-inset-bottom, 0));
 		background-color: #fff;
 		align-items: center;
 
@@ -373,7 +376,7 @@
 		}
 
 		.pay-btn {
-			width: 200rpx;
+			// width: 200rpx;
 			height: 70rpx;
 			line-height: 70rpx;
 			background-color: red;
@@ -385,4 +388,4 @@
 	.text-red {
 		color: red;
 	}
-</style>
+</style>

+ 7 - 8
pages/goOnEdu/course/courseDetail/coursePay.vue

@@ -12,7 +12,7 @@
 </template>
 
 <script setup>
-	import { ref } from 'vue'
+	import { ref, computed } from 'vue'
 	import { onLoad } from '@dcloudio/uni-app'
 	import configService from '@/utils/baseurl.js'
 	const FILE_URL = configService.FILE_URL;
@@ -20,10 +20,7 @@
 		useAuthStore
 	} from '@/store/authStore'
 	const authStore = useAuthStore();
-	const isMember = computed(() => {
-		authStore.loadUserInfo()
-		return authStore.userInfo.isMember == '0' ? false : true
-	})
+	const isMember = ref(null)
 	const toJoin = () =>{
 		uni.navigateTo({
 			url: '/pages/joinClub/joinClub'
@@ -35,13 +32,15 @@
 		// 	url:"/pages/goOnEdu/course/courseDetail/courseDetail?id=" + courseId.value
 		// })
 		uni.navigateBack({
-			delta: 1
+			delta: 2
 		});
 	}
 	onLoad((option) => {
 		const { id } = option
 		courseId.value = id
-		console.log('onLoad')
+		authStore.loadUserInfo()
+		isMember.value = authStore.userInfo.isMember == '0' ? false : true
+		// console.log('onLoad')
 	})
 </script>
 
@@ -67,7 +66,7 @@
 		}
 		.play-btn{
 			margin-top: 100rpx;
-			width: 200rpx;
+			// width: 200rpx;
 			height: 70rpx;
 			line-height: 70rpx;
 			background-color: #0069f6;

+ 2 - 5
pages/goOnEdu/index.vue

@@ -17,7 +17,7 @@
 		data() {
 			return {
 				FILE_URL: configService.FILE_URL,
-				netAppid: "",
+				netAppid: "wx65323471c83da344",
 				courseUrl: "/pages/goOnEdu/course/index"
 			};
 		},
@@ -32,10 +32,7 @@
 				}
 				uni.navigateToMiniProgram({
 					appId: this.netAppid, // 替换为你要跳转的小程序的AppID
-					path: '', // 目标小程序的页面路径,留空则默认为首页
-					extraData: {
-						foo: 'bar' // 传递给目标小程序的数据(可选)
-					},
+					path: 'pages/index/index', // 目标小程序的页面路径,留空则默认为首页
 					envVersion: 'release', // 指定要打开的小程序版本: release 或 trial
 					success(res) {
 						console.log('成功跳转到小程序', res);

+ 79 - 48
pages/index/index.vue

@@ -2,8 +2,7 @@
 	<view class="container" :style="{backgroundColor: `${backgroundColor}`}">
 		<u-navbar :is-back="false" title="" :style="{backgroundColor: `${backgroundColor}`}" :border-bottom="false">
 			<view class="slot-wrap">
-				<image :src="`${FILE_URL}/login-icon.png`"
-					mode="aspectFit" style="width: 300rpx;"></image>
+				<image :src="`${FILE_URL}/login-icon.png`" mode="aspectFit" style="width: 300rpx;"></image>
 			</view>
 		</u-navbar>
 		<view class="page-content">
@@ -25,23 +24,23 @@
 			<u-card padding="20" margin="0rpx 0rpx 30rpx" border-radius="20"
 				box-shadow="0px 2px 5px rgba(0, 0, 0, 0.1)">
 				<template v-slot:head>
-					<u-section title="课程预告" sub-title="查看更多" sub-color="#000000" @click="toPage('/pages/goOnEdu/index')"></u-section>
+					<u-section title="课程预告" sub-title="查看更多" sub-color="#000000"
+						@click="toPage('/pages/goOnEdu/index')"></u-section>
 				</template>
 				<template v-slot:body>
-					<lg-swiper v-if="courseList.length!=0"
-					:sildeItems="courseList"
-					@swiperClick="swiperClick"
-					image="courseImg" title="courseName"></lg-swiper>
+					<lg-swiper v-if="courseList.length!=0" :sildeItems="courseList" @swiperClick="swiperClick"
+						image="courseImg" title="courseName"></lg-swiper>
 					<u-empty text="暂无内容" mode="data" v-else></u-empty>
 				</template>
 			</u-card>
 			<u-card padding="30" margin="0rpx 0rpx 30rpx" border-radius="20"
 				box-shadow="0px 2px 5px rgba(0, 0, 0, 0.1)">
 				<template v-slot:head>
-					<u-section title="研究报告" sub-title="查看更多" sub-color="#000000" @click="toPage('/pages/researchReport/reportHome/reportHome')"></u-section>
+					<u-section title="研究报告" sub-title="查看更多" sub-color="#000000"
+						@click="toPage('/pages/researchReport/reportHome/reportHome')"></u-section>
 				</template>
 				<template v-slot:body>
-					<view v-if="reportList.length!=0">
+					<view v-if="reportList.length!=0" >
 						<view v-for="(data,index) in reportList" :key="index" class="u-body-item u-flex u-p-t-0 "
 							style="align-items: inherit;" @click="toReport(data.id, data.title)">
 							<image :src="data.cover" mode="aspectFill"></image>
@@ -51,8 +50,9 @@
 									<text class="item-content-type">{{data.type}}</text>
 								</view>
 								<view class="item-button">
-									<view v-if="data.viewMode==='1'" class="func-box" style="justify-content: flex-end;">
-										<view class="button free" >免费</view>
+									<view v-if="data.viewMode==='1'" class="func-box"
+										style="justify-content: flex-end;">
+										<view class="button free">免费</view>
 									</view>
 									<view v-else-if="data.viewMode==='2' && isMember" class="func-box">
 										<view class="price">¥{{ data.price }}元</view>
@@ -71,13 +71,15 @@
 											{{data.hasBuy ? '已购买' : '立即购买'}}
 										</view>
 									</view>
-									<view v-else-if="data.viewMode==='3' && data.price===data.priceMember" class="func-box">
+									<view v-else-if="data.viewMode==='3' && data.price===data.priceMember"
+										class="func-box">
 										<view class="price">¥{{ data.price }}元</view>
 										<view :class="['button', data.hasBuy ? 'free' : 'buy']">
 											{{data.hasBuy ? '已购买' : '立即购买'}}
 										</view>
 									</view>
-									<view v-else-if="data.viewMode==='3' && data.price!==data.priceMember" class="func-box">
+									<view v-else-if="data.viewMode==='3' && data.price!==data.priceMember"
+										class="func-box">
 										<view style="flex: 0 0 auto;display: flex;align-items: center;">
 											<view class="member-free">
 												{{`会员:${data.priceMember}元`}}
@@ -105,10 +107,8 @@
 			</view>
 		</u-modal>
 		<!-- 与包裹页面所有内容的元素u-page同级,且在它的下方 -->
-		<u-tabbar v-model="tabbarCurrentIndex"
-		:list="tabbarList" icon-size="50"
-		:active-color="tabbarActiveColor"
-		:inactive-color="tabbarInactiveColor"></u-tabbar>
+		<u-tabbar v-model="tabbarCurrentIndex" :list="tabbarList" icon-size="50" :active-color="tabbarActiveColor"
+			:inactive-color="tabbarInactiveColor"></u-tabbar>
 	</view>
 </template>
 
@@ -141,7 +141,9 @@
 	} from '@/api/user.js'
 	import configService from '@/utils/baseurl.js'
 	const FILE_URL = configService.FILE_URL;
-	import { useTabbarStore } from '@/store/tabbarStore.js'
+	import {
+		useTabbarStore
+	} from '@/store/tabbarStore.js'
 	const tabbarStore = useTabbarStore()
 	// 底部导航栏数据
 	const tabbarList = computed(() => {
@@ -178,18 +180,19 @@
 	const isMember = ref(false)
 
 	// 首页-轮播图
-	const swiperList = ref([{
-			imgUrl: 'https://tse3-mm.cn.bing.net/th/id/OIP-C.YKoZzgmubNBxQ8j-mmoTKAHaEK?rs=1&pid=ImgDetMain',
-			id: 1
-		},
-		{
-			imgUrl: 'https://pic3.zhimg.com/v2-e52354ffdbd94a8e0a7649eacd34a788_r.jpg?source=1940ef5c',
-			id: 2
-		},
-		{
-			imgUrl: 'https://desk-fd.zol-img.com.cn/t_s960x600c5/g4/M03/00/0C/Cg-4zFS8bC-Ie9zBADCvovJAqiEAATJ8wDX__cAMK-6184.jpg',
-			id: 3
-		},
+	const swiperList = ref([
+		// {
+		// 	imgUrl: 'https://tse3-mm.cn.bing.net/th/id/OIP-C.YKoZzgmubNBxQ8j-mmoTKAHaEK?rs=1&pid=ImgDetMain',
+		// 	id: 1
+		// },
+		// {
+		// 	imgUrl: 'https://pic3.zhimg.com/v2-e52354ffdbd94a8e0a7649eacd34a788_r.jpg?source=1940ef5c',
+		// 	id: 2
+		// },
+		// {
+		// 	imgUrl: 'https://desk-fd.zol-img.com.cn/t_s960x600c5/g4/M03/00/0C/Cg-4zFS8bC-Ie9zBADCvovJAqiEAATJ8wDX__cAMK-6184.jpg',
+		// 	id: 3
+		// },
 	])
 
 	const courseList = ref([{
@@ -211,6 +214,7 @@
 	// 首页-导航栏
 	const navList = ref([{
 			id: 'notice',
+			isLogin: false,
 			title: '通知公告',
 			icon: 'icon-xiaoxitongzhi',
 			url: '/pages/notice/notice/notice',
@@ -220,6 +224,7 @@
 		{
 			id: 'dynamic',
 			title: '协会动态',
+			isLogin: false,
 			icon: 'icon-xinxisousuo-01',
 			url: '/pages/dynamic/dynamic/dynamic',
 			toOtherApp: false,
@@ -228,6 +233,7 @@
 		{
 			id: 'guide',
 			title: '办事指引',
+			isLogin: false,
 			icon: 'icon-caidanguanli',
 			url: '/pages/guide/guide/guide',
 			toOtherApp: false,
@@ -236,6 +242,7 @@
 		{
 			id: 'edu',
 			title: '继续教育',
+			isLogin: true,
 			icon: 'icon-xueshimao1',
 			url: '/pages/goOnEdu/index',
 			toOtherApp: false,
@@ -243,15 +250,17 @@
 		},
 		{
 			id: 'level',
+			isLogin: true,
 			title: '水平认证',
 			icon: 'icon-zhengshu-copy',
-			url: '跳转页面的路径',
+			url: 'pages/index/index',
 			toOtherApp: true,
-			otherAppId: '其他小程序的appid'
+			otherAppId: 'wx050c17d8b239da86'
 		},
 		{
 			id: 'report',
 			title: '研究报告',
+			isLogin: true,
 			icon: 'icon-circular',
 			url: '/pages/researchReport/reportHome/reportHome',
 			toOtherApp: false,
@@ -259,6 +268,7 @@
 		},
 		{
 			id: 'index',
+			isLogin: true,
 			title: '经理人指数',
 			icon: 'icon-zhishu',
 			url: '跳转页面的路径',
@@ -267,10 +277,11 @@
 		},
 		{
 			id: 'pay',
+			isLogin: true,
 			title: '会费缴交',
 			icon: 'icon-jinqian-jiage',
-			url: '跳转页面的路径',
-			toOtherApp: true,
+			url: '/pages/huiFeiJiaoJiao/huiFeiJiaoJiao',
+			toOtherApp: false,
 			otherAppId: '其他小程序的appid'
 		}
 	])
@@ -281,13 +292,26 @@
 	const jumpToPage = (data) => {
 		if (data.toOtherApp) {
 			// 跳转其他小程序
-			console.log("跳转至其他小程序", data.otherAppId)
+			wx.navigateToMiniProgram({
+				appId: data.otherAppId, // 例如:wx1234567890abcdef
+				path: data.url, // 跳转路径
+				envVersion: 'release', // 版本(develop/trial/release)
+				success(res) {
+					console.log('跳转成功');
+				},
+				fail(err) {
+					console.error('跳转失败', err);
+				}
+			});
 			return
 		}
-		if (!authStore.isAuthenticated) {
-			loginModal.value = true
-			return
+		if (data.isLogin) {
+			if (!authStore.isAuthenticated) {
+				loginModal.value = true
+				return
+			}
 		}
+
 		uni.navigateTo({
 			url: data.url
 		})
@@ -307,8 +331,9 @@
 			url: url
 		})
 	}
-	const itemClick = (data) =>{
+	const itemClick = (data) => {
 		// console.log("轮播图swiper", data)
+
 		if (!authStore.isAuthenticated) {
 			loginModal.value = true
 			return
@@ -349,16 +374,18 @@
 				courseList.value = res.data
 			}
 		})
+		initReport()
+		// homeSetting().then(res=>{
+		// 	console.log(res)
+		// })
+	}
+	function initReport (){
 		homeReportList().then(res => {
 			if (res?.data) {
 				reportList.value = res.data
 			}
 		})
-		// homeSetting().then(res=>{
-		// 	console.log(res)
-		// })
 	}
-
 	function getCharCount() {
 		count().then(res => {
 			if (res && res.message === 'success') {
@@ -371,13 +398,13 @@
 		})
 	}
 
-	function toReport(id, title){
+	function toReport(id, title) {
 		if (!authStore.isAuthenticated) {
 			loginModal.value = true
 			return
 		}
 		uni.navigateTo({
-			url:"/pages/reportDetail/reportDetail?id="+id+"&title="+title
+			url: "/pages/reportDetail/reportDetail?id=" + id + "&title=" + title
 		})
 	}
 
@@ -403,12 +430,14 @@
 		if (isLogin) {
 			// 登录后才请求消息数量
 			getCharCount()
+			initReport()
 			// 没有用户信息就加载一边
 			if (!isUserInfo) {
 				initUser();
 			} else {
-				isMember.value = authStore.userInfo.isMember==='0'?false:true;
+				isMember.value = authStore.userInfo.isMember === '0' ? false : true;
 			}
+
 		}
 
 	})
@@ -424,11 +453,13 @@
 	.slot-wrap {
 		padding-left: 20rpx;
 	}
-	.menu-item{
-		.iconfont{
+
+	.menu-item {
+		.iconfont {
 			font-size: 60rpx;
 		}
 	}
+
 	.grid-text {
 		font-size: 28rpx;
 		margin-top: 4rpx;

+ 17 - 6
pages/initial/initial.vue

@@ -3,7 +3,7 @@
 		<view class="app-login">
 			<view class="app-icon u-m-b-30 ">
 				<image src="http://www.gzrea.org.cn:8543/icon/wxmp/login-icon.png"
-					mode="aspectFit" style="height: 40px;"></image>
+					mode="aspectFit" style="height: 80rpx;"></image>
 			</view>
 			<view class="app-title u-m-b-60">
 				欢迎使用会员中心系统小程序
@@ -49,6 +49,9 @@
 	import {
 		useAuthStore
 	} from '@/store/authStore'
+	import {
+		me
+	} from '@/api/user.js'
 	const authStore = useAuthStore()
 	const userBook = ref(false)
 	const userBookModal = ref(false)
@@ -117,11 +120,15 @@
 					}else{
 						// 老用户,跳转至:首页
 						msgSuccess("授权成功!")
-						setTimeout(()=>{
-							uni.switchTab({
-								url: "/pages/index/index"
-							})
-						}, 1000)
+						let userRes = await me();
+						if(userRes && userRes?.code===0){
+							authStore.setUserInfo(userRes.data)
+							setTimeout(()=>{
+								uni.switchTab({
+									url: "/pages/index/index"
+								})
+							}, 1000)
+						}
 					}
 				}
 			}catch(err){
@@ -168,6 +175,10 @@
 	}
 
 	.app-icon {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 90rpx;
 		text-align: center;
 	}
 

+ 11 - 6
pages/login/login.vue

@@ -3,7 +3,7 @@
 		<view class="app-login">
 			<view class="app-icon mb-30">
 				<image :src="`${FILE_URL}/login-icon.png`"
-					mode="aspectFit" style="height: 40px;"></image>
+					mode="aspectFit" style="height: 80rpx;"></image>
 			</view>
 			<view class="app-title mb-30">
 				欢迎使用会员中心系统小程序
@@ -15,7 +15,7 @@
 					<text :class="[loginType=='username'? 'loginType-text-active': 'loginType-text']"
 						@click="loginType = 'username'">账号登录</text>
 				</view>
-				<view class="phone-form" v-if="loginType=='phone'">
+				<view class="phone-form" v-if="loginType=='phone'">
 					<view class="form-item">
 						<u-input height="80" placeholder="请输入手机号" border-color="#d0d0d0" v-model="phoneForm.phone"
 							:border="true" class="form-item-input" type="number" @confirm="phoneLoginHandle" />
@@ -33,7 +33,7 @@
 						立即登录
 					</view>
 				</view>
-				<view class="phone-form" v-if="loginType=='username'">
+				<view class="phone-form" v-if="loginType=='username'">
 					<view class="form-item">
 						<u-input height="80" placeholder="请输入账号" border-color="#d0d0d0" v-model="userNameForm.username"
 							:border="true" class="form-item-input" @confirm="userNameLoginHandle" />
@@ -152,13 +152,13 @@
 				// ----验证码 end -----
 				loginType: "phone",
 				phoneForm: {
-					phone: '18320082803',
+					phone: '',
 					captcha: '',
 					captchaUuid: ''
 				},
 				userNameForm: {
-					username: "纪学卫",
-					password: "123456"
+					username: "",
+					password: ""
 				},
 				userBook: false, //协议
 				redirect: null
@@ -552,6 +552,11 @@
 	}
 
 	.app-icon {
+		// text-align: center;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 90rpx;
 		text-align: center;
 	}
 

+ 30 - 33
pages/register/register.vue

@@ -70,7 +70,8 @@
 					checkPwd: '', // 确认密码
 					phone: '', // 手机号码
 					userCode: '', // 身份证
-					sex: '' // 性别
+					sex: '', // 性别
+					openid: ''
 				},
 				radioList1: [{
 						name: '1',
@@ -140,52 +141,48 @@
 			},
 			submit() {
 				const that = this;
-				that.$refs.registerForm.validate((valid) => {
+				that.$refs.registerForm.validate(async (valid) => {
 					const form = {
 						...this.registerForm
 					};
 					form.password = encryptAESCBC(form.password);
 					form.checkPwd = encryptAESCBC(form.checkPwd);
-					register(form).then(res => {
-						if (res?.token) {
-							this.useAuthStore.setAuthToken(res.token);
-							this.useAuthStore.setUserInfo({
-								userId,
-								zhangHao
-							})
-							msgSuccess("注册成功");
-							this.initUser()
-							// setTimeout(() => {
-							// 	if(this.redirect){
-							// 		uni.removeStorageSync("redirect")
-							// 		uni.reLaunch({
-							// 			url: this.redirect.url+'?id='+this.redirect.id+'&title='+this.redirect.title
-							// 		})
-							// 	}else{
-							// 		uni.switchTab({
-							// 			url: "/pages/index/index"
-							// 		})
-							// 	}
-								
-							// }, 1000)
-						}
-					})
+					
+					const loginRes = await wx.login();
+					const code = loginRes.code;
+					let wxRes = await wxLoginOpenid({code})
+					if(wxRes && wxRes?.data){
+						const { openid, sessionKey } = wxRes.data
+						// this.useAuthStore.setOpenid(openid)
+						this.registerForm.openid = openid
+						form.openid = openid
+						register(form).then(res => {
+							if (res?.data) {
+								this.useAuthStore.setAuthToken(res.data.token);
+								msgSuccess("注册成功");
+								this.initUser()
+							}
+						})
+					}
+					
+					
 				})
 			},
 			async initUser(){
-				const loginRes = await wx.login();
-				const code = loginRes.code;
+				// const loginRes = await wx.login();
+				// const code = loginRes.code;
 				let userRes = await me();
-				let wxRes = await wxLoginOpenid({code})
+				// let wxRes = await wxLoginOpenid({code})
 				// 加载用户信息
 				if(userRes && userRes?.code===0){
 					this.useAuthStore.setUserInfo(userRes.data)
 				}
+				this.useAuthStore.setOpenid(this.registerForm.openid)
 				// 加载openid
-				if(wxRes && wxRes?.data){
-					const { openid, sessionKey } = wxRes.data
-					this.useAuthStore.setOpenid(openid)
-				}
+				// if(wxRes && wxRes?.data){
+				// 	const { openid, sessionKey } = wxRes.data
+				// 	this.useAuthStore.setOpenid(openid)
+				// }
 				setTimeout(() => {
 					if(this.redirect){
 						uni.removeStorageSync("redirect")

+ 4 - 1
pages/reportDetail/reportDetail.vue

@@ -257,9 +257,12 @@
 				payForm.value.desc = res.data.title
 				payForm.value.amount = isMember.value ? report.value.priceMember : report.value.price
 				report.value.content = ""
-				if(!report.value.hasBuy){
+				if(!report.value.hasBuy && res.data.viewMode === '3'){
+					buyShow.value = true
+				}else if(!report.value.hasBuy && !isMember.value && res.data.viewMode === '2' ){
 					buyShow.value = true
 				}
+				// console.log(report.value.hasBuy, res.data.viewMode, buyShow.value, 100)
 				if(res.data.imgData){
 					const path = res.data.imgData.path
 					const type = res.data.imgData.type

+ 1 - 1
pages/researchReport/reportList/reportList.vue

@@ -3,7 +3,7 @@
 		<view class="header-box">
 			<view class="search-box">
 				<u-search v-model="searchForm.keyword" :clearabled="true" bg-color="#E5E5E5"
-					:input-style="searchInputStyle" placeholder="搜索您想要的内容" @search="toSearch"></u-search>
+					:input-style="searchInputStyle" placeholder="搜索您想要的内容" @search="toSearch" @custom="toSearch"></u-search>
 			</view>
 			<view class="tab-box">
 				<u-tabs name="label" :list="searchType" :is-scroll="true" v-model="searchForm.type"

+ 1 - 1
utils/request.js

@@ -73,4 +73,4 @@ const request = config => {
 	});
 };
 
-export default request;
+export default request;