Kaynağa Gözat

修改至接单二次确认

李万涛 2 yıl önce
ebeveyn
işleme
8f0473005c

+ 1 - 1
App.vue

xqd
@@ -15,7 +15,7 @@
 			// uni.hideTabBar({});
 			// // #endif		
 
-		}
+		},
 	};
 </script>
 

+ 2 - 2
common/wechat/wechat.js

xqd
@@ -78,10 +78,10 @@ export default {
 			});
 			throw false;
 		}
-		// let host = $platform.host();
+		let host = $platform.host();
 
 		// let host = window.Location.href;
-		let host = 'http://www.liwantao.top';
+		// let host = 'http://www.liwantao.top';
 		// let host = 'http://t20.9026.com/h5';
 
 		let payloadObject = {

+ 31 - 1
pages/chat/chat.vue

xqd xqd xqd xqd
@@ -114,6 +114,7 @@
 						:cursorSpacing="80"></u--textarea>
 				</view>
 				<button class="send" @click.prevent="send(content)">发送</button>
+				<!-- <button class="send" @click.prevent="test">测试</button> -->
 			</view>
 		</view>
 	</view>
@@ -177,6 +178,15 @@
 
 		},
 		methods: {
+			async test() {
+				console.log('sendGpt()66666666666666666');
+				let res = await sendGpt({
+					message: '3699+1'
+				})
+				if (res.code == 0) {
+					console.log('sendGpt()', res);
+				}
+			},
 			copy(e) {
 				var that = this;
 				var text = e.currentTarget.dataset.text;
@@ -262,12 +272,26 @@
 					});
 				});
 
+				// 修改,方案二
+				// let res9 = await sendGpt({
+				// 	message: that.thecontent
+				// })
+				// if (res9.code == 0) {
+				// 	console.log('sendGpt()', res9);
+
+
+				// }else{
+
+				// }
+
+				// 原方案
 
 				let url = 'http://t20.9026.com/api/chat/send'
 				fetch(url, {
 					method: 'POST',
 					headers: {
-						'Content-Type': 'application/json'
+						'Content-Type': 'application/json',
+						'Authorization': uni.getStorageSync('token')
 					},
 					body: JSON.stringify({
 						// message:'介绍一下思维定制'
@@ -315,6 +339,12 @@
 					})
 				})
 			},
+
+
+
+
+
+
 			// 复制文本
 			copyText(e) {
 				uni.setClipboardData({

+ 4 - 1
pages/index/scoreDetail/index.vue

xqd
@@ -135,8 +135,11 @@
 				})
 			},
 			async goStudy(course_id) {
-				// console.log(isWechat());
 
+				// return uni.navigateTo({
+				// 	url: '/pages/index/scorePaySuc/index?id=' + this
+				// 		.course_id
+				// })
 				if (!isWechat()) {
 					uni.showToast({
 						title: '请用微信内置浏览器打开本网站,进行课程购买!',

+ 16 - 0
pages/index/scorePaySuc/index.scss

xqd
@@ -41,4 +41,20 @@ page {
 		
 	}
 	
+	
+	
+	
+	.res{
+		padding-left: 60rpx;
+		padding-right: 30rpx;
+		word-break: break-all;
+		word-wrap: break-word;
+		margin-top: 30rpx;
+		.inner{
+			margin-bottom: 20rpx;
+			// text-decoration: underline;
+			font-size: 34rpx;
+		}
+	}
+	
 	

+ 22 - 23
pages/index/scorePaySuc/index.vue

xqd xqd xqd
@@ -20,8 +20,15 @@
 					支付成功
 				</view>
 			</view>
-			<view class="btn" @click="downLoad">
-				查看学习资料
+			<view class="btn" @click="handleShowRes">
+				{{resShow?'收起学习资料':'查看学习资料'}}
+			</view>
+
+			<view class="res" v-if="resShow&&this.detail.content">
+				<view class="inner" v-for="(i,index) in this.detail.content" @click="downLoad(i)">
+					<text style="text-decoration: underline;">
+						{{'学习资料'+(index+1)}}</text><text>{{i.slice(i.lastIndexOf('.'))}}</text>
+				</view>
 			</view>
 		</view>
 	</view>
@@ -41,6 +48,7 @@
 				detail: {},
 
 				tobheight: 45,
+				resShow: false
 			};
 		},
 		computed: {
@@ -68,35 +76,26 @@
 
 		},
 		methods: {
-			downLoad() {
-				if (!this.detail.content) {
-					uni.showToast({
-						title: '当前课程暂无学习资料',
-						icon: 'none',
-						duration: 1500
-					})
-					return
-				}
+			handleShowRes() {
+				this.resShow = !this.resShow
+			},
 
-				if (this.detail.content.endsWith('.mp4')) {
-					let plat = uni.getSystemInfoSync().platform
 
-					if (plat == 'android' || plat == 'ios') {
-						window.open(
-							this.detail.content
-						)
-					} else {
-						downLoad2(this.detail.content, this.detail.name + '-学习资料', 'video/mp4')
-					}
-				} else {
+			downLoad(fileName) {
+				if (fileName.endsWith('.mp4') || fileName.endsWith('.pdf')) {
 					let plat = uni.getSystemInfoSync().platform
 					if (plat == 'android' || plat == 'ios') {
+						console.log("plat == 'android' || plat == 'ios'");
 						window.open(
-							this.detail.content
+							fileName
 						)
 					} else {
-						downLoad2(this.detail.content, this.detail.name + '-学习资料', 'application/pdf')
+						downLoad2(fileName, this.detail.course.name + '-学习资料', 'video/mp4')
 					}
+				} else {
+					window.open(
+						fileName
+					)
 				}
 			},
 

+ 47 - 39
pages/tusk/tuskDetail/index.vue

xqd
@@ -120,46 +120,54 @@
 			},
 
 			async handleReceiveOrder(task_id) {
-				if (this.detail.is_new) {
-					if (this.taskOrderList.length > 3) {
-						console.log('新用户限制次数-已接单', this.taskOrderList.length);
-						uni.showToast({
-							title: '接单失败,您已不是新用户',
-							icon: 'none'
-						})
-						return
+				let _this = this
+				uni.showModal({
+					title: '提示',
+					content: '确认接单:' + this.detail.name + "?",
+					confirmColor: 'rgb(38, 179, 160)',
+					success: async (res) => {
+						if (res.confirm) {
+							if (_this.detail.is_new) {
+								if (_this.taskOrderList.length > 3) {
+									uni.showToast({
+										title: '接单失败,您已不是新用户',
+										icon: 'none'
+									})
+									return
+								}
+							}
+							if (_this.detail.max_count == _this.detail.order_total) {
+								uni.showToast({
+									title: '接单失败,允许的最大接单人数是:' + _this.detail.max_count,
+									icon: 'none'
+								})
+								return
+							}
+							let res = await receiveOrder({
+								task_id
+							})
+							console.log('立即接单返回值', res);
+							if (res.code == 0) {
+								uni.showToast({
+									title: '接单成功',
+									icon: 'none'
+								})
+								setTimeout(() => {
+									uni.navigateTo({
+										url: '/pages/user/work/index'
+									})
+								}, 1000)
+							} else {
+								uni.showToast({
+									title: res.msg,
+									icon: 'none'
+								})
+							}
+						} else if (res.cancel) {
+							return
+						}
 					}
-				}
-				if (this.detail.max_count == this.detail.order_total) {
-					uni.showToast({
-						title: '接单失败,允许的最大接单人数是:' + this.detail.max_count,
-						icon: 'none'
-					})
-					return
-				}
-
-
-
-				let res = await receiveOrder({
-					task_id
-				})
-				console.log('立即接单返回值', res);
-				if (res.code == 0) {
-					uni.showToast({
-						title: '接单成功',
-						icon: 'none'
-					})
-					setTimeout(() => {
-						uni.navigateTo({
-							url: '/pages/user/work/index'
-						})
-					}, 1000)
-				} else {
-					uni.showToast({
-						title: res.msg,
-						icon: 'none'
-					})
-				}
+				});
 			}
 		}
 	};

+ 2 - 2
pages/user/accountSafe/index.scss

xqd
@@ -8,8 +8,8 @@ page {
 	
 	.user {
 		// height: 1800rpx;
-		padding-bottom: 200rpx;
-		padding-top: 100rpx;
+		padding-bottom: 80rpx;
+		padding-top: 0rpx;
 	
 		
 		.com-item {

+ 20 - 2
pages/user/commission/commission-log.vue

xqd
@@ -72,8 +72,26 @@
 							<!-- 	<view class="log-num" :style="{ color: item.type?'#05C3A1' :'red'}">
 								{{(item.type?'+':'-')+ item.money }}
 							</view> -->
-							<view class="log-num" :style="{ color: item.type==3? 'red':'#05C3A1'}">
-								{{(item.type==3? '-':'+')+item.amount}}
+							<view v-if="item.status==0" class="log-num"
+								style="display: flex;flex-direction: column;align-items: center;">
+								<view class="" style="color:orange;">
+									待入账
+								</view>
+								<view class="" style="color:orange">
+									{{item.amount}}
+								</view>
+							</view>
+							<view v-if="item.status==1" class="log-num"
+								style="display: flex;flex-direction: column;align-items: center;">
+								<view class="" style="color:#05C3A1">
+									+{{item.amount}}
+								</view>
+							</view>
+							<view v-if="item.status==2" class="log-num"
+								style="display: flex;flex-direction: column;align-items: center;">
+								<view class="" style="color:red;">
+									审核失败
+								</view>
 							</view>
 							<view class="log-date"></view>
 						</view>

+ 20 - 6
pages/user/commission/commission-log2.vue

xqd
@@ -78,13 +78,27 @@
 							</view>
 						</view>
 						<view class="item-right">
-							<!-- 	<view class="log-num" :style="{ color: item.type?'#05C3A1' :'red'}">
-								{{(item.type?'+':'-')+ item.money }}
-							</view> -->
-							<view class="log-num" :style="{ color: item.type==3? 'red':'#05C3A1'}">
-								{{(item.type==3? '-':'+')+item.amount}}
+							<view v-if="item.status==0" class="log-num"
+								style="display: flex;flex-direction: column;align-items: center;">
+								<view class="" style="color:orange;width: 100rpx;text-align: center;">
+									待入账
+								</view>
+								<view class="" style="color:orange">
+									{{item.amount}}
+								</view>
+							</view>
+							<view v-if="item.status==1" class="log-num"
+								style="display: flex;flex-direction: column;align-items: center;">
+								<view class="" style="color:#05C3A1">
+									+{{item.amount}}
+								</view>
+							</view>
+							<view v-if="item.status==2" class="log-num"
+								style="display: flex;flex-direction: column;align-items: center;">
+								<view class="" style="color:red;width: 70rpx;margin-left: 10rpx;">
+									审核失败
+								</view>
 							</view>
-							<view class="log-date"></view>
 						</view>
 					</view>
 				</view>

+ 16 - 1
pages/user/score/index.scss

xqd
@@ -69,4 +69,19 @@ page {
 			}
 		}
 	}
-	
+	
+	
+	
+	
+	.res{
+		padding-left: 60rpx;
+		padding-right: 30rpx;
+		word-break: break-all;
+		word-wrap: break-word;
+		margin-top: 30rpx;
+		.inner{
+			margin-bottom: 20rpx;
+			// text-decoration: underline;
+			font-size: 34rpx;
+		}
+	}

+ 29 - 67
pages/user/score/index.vue

xqd xqd xqd xqd
@@ -26,8 +26,18 @@
 				<u-parse :content="detail.course ? detail.course.description : '暂无课程信息'"></u-parse>
 			</view>
 
-			<view class="topBtn" @click="downLoad(detail.status)">
+			<!-- <view class="topBtn" @click="downLoad(detail.status)">
 				查看学习资料
+			</view> -->
+			<view class="topBtn" @click="handleShowRes">
+				{{resShow?'收起学习资料':'查看学习资料'}}
+			</view>
+
+			<view class="res" v-if="resShow&&this.detail.course">
+				<view class="inner" v-for="(i,index) in this.detail.course.content" @click="downLoad(i)">
+					<text style="text-decoration: underline;">
+						{{'学习资料'+(index+1)}}</text><text>{{i.slice(i.lastIndexOf('.'))}}</text>
+				</view>
 			</view>
 
 			<view class="divLine">
@@ -87,7 +97,9 @@
 				tobheight: 45,
 				detail: {},
 
-				orderId: ''
+				orderId: '',
+
+				resShow: false
 			};
 		},
 		computed: {
@@ -105,14 +117,8 @@
 			console.log('课程详情', this.detail);
 		},
 		methods: {
-			goPay() {
-				let pay = new ShoproPay(this.orderId);
-			},
-			downLoad(status) {
-				// uni.navigateTo({
-				// 	url: '/pages/test/index'
-				// })
-				if (status == 0) {
+			handleShowRes() {
+				if (this.detail.status == 0) {
 					uni.showToast({
 						title: '待支付课程不能查看学习资料',
 						icon: 'none',
@@ -130,73 +136,29 @@
 					return
 				}
 
-				if (this.detail.course.content.endsWith('.mp4')) {
-					console.log('.mp4', this.detail.course.content);
-
-					// row.fileAdd  文件地址   row.fileName  文件名称,需要加上文件后缀
-					// fetch(this.detail.course.content)
-					// 	.then(response => response.blob())
-					// 	.then(blob => {
-					// 		const url = URL.createObjectURL(blob);
-					// 		const link = document.createElement('a');
-					// 		link.href = url;
-					// 		link.setAttribute('download', '123456.mp4');
-					// 		document.body.appendChild(link);
-					// 		link.click();
-					// 	})
-					// 	.catch(console.error);
-
+				this.resShow = !this.resShow
+			},
+			goPay() {
+				let pay = new ShoproPay(this.orderId);
+			},
+			downLoad(fileName) {
+				if (fileName.endsWith('.mp4') || fileName.endsWith('.pdf')) {
 					let plat = uni.getSystemInfoSync().platform
-
 					if (plat == 'android' || plat == 'ios') {
 						console.log("plat == 'android' || plat == 'ios'");
-
-						// uni.downloadFile({
-						// 	url: this.detail.course.content, //仅为示例,并非真实的资源
-						// 	success: (res) => {
-						// 		if (res.statusCode === 200) {
-						// 			console.log('下载成功', res.tempFilePath);
-						// 			downLoad2(res.tempFilePath, this.detail.course.name + '-学习资料')
-						// 		}
-						// 	}
-						// });
 						window.open(
-							this.detail.course.content
+							fileName
 						)
-						// fetch(this.detail.course.content)
-						// 	.then(response => {
-						// 		return response.blob()
-						// 	})
-						// 	.then(blob => {
-						// 		const url = URL.createObjectURL(blob);
-						// 		const link = document.createElement('a');
-						// 		link.href = url;
-						// 		link.setAttribute('download', '123456.mp4');
-						// 		document.body.appendChild(link);
-						// 		link.click();
-						// 	})
-						// 	.catch(console.error);
-
 					} else {
-						console.log("pc");
-						downLoad2(this.detail.course.content, this.detail.course.name + '-学习资料', 'video/mp4')
+						downLoad2(fileName, this.detail.course.name + '-学习资料', 'video/mp4和zip')
 					}
-
-					// saveAs(this.detail.course.content, '测试文件名')
 				} else {
-					let plat = uni.getSystemInfoSync().platform
-					if (plat == 'android' || plat == 'ios') {
-						console.log("plat == 'android' || plat == 'ios'");
-						window.open(
-							this.detail.course.content
-						)
-					} else {
-						console.log("pc");
-						downLoad2(this.detail.course.content, this.detail.course.name + '-学习资料', 'application/pdf')
-					}
+					window.open(
+						fileName
+					)
 				}
 			}
-		}
+		},
 	}
 </script>
 

+ 3 - 1
pages/user/score/record/index.scss

xqd
@@ -52,4 +52,6 @@ page {
 	
 	.recordBox{
 		padding: 30rpx;
-	}
+	}
+	
+	

+ 7 - 0
pages/user/score/record/index.vue

xqd
@@ -88,6 +88,13 @@
 		methods: {
 			async goScoreDetail(score) {
 				this.course_id = score.course_id
+
+
+				// return uni.navigateTo({
+				// 	url: '/pages/user/score/index?id=' + score.id
+				// })
+
+
 				if (score.status) {
 					uni.navigateTo({
 						url: '/pages/user/score/index?id=' + score.id

+ 3 - 3
pages/user/set/index.scss

xqd xqd
@@ -8,8 +8,8 @@ page {
 
 	.user {
 		// height: 1800rpx;
-		padding-bottom: 200rpx;
-		padding-top: 100rpx;
+		padding-bottom: 80rpx;
+		padding-top:0rpx;
 
 		
 		.com-item {
@@ -68,7 +68,7 @@ page {
 		background: #26C47D;
 		font-size: 34rpx;
 		color: #fff;
-		margin: 0 60rpx 40rpx;
+		margin: 0 60rpx 0rpx;
 		text-align: center;
 		line-height: 90rpx;
 		height: 90rpx;

+ 8 - 6
pages/user/signin.scss

xqd xqd
@@ -1,9 +1,11 @@
 .topTxtAndImg{
 	margin-bottom: 100rpx;
+	display: flex;
+	align-items: center;
+	flex-direction: column;
 	.swiper{
-		// width: 100%;
-		// border-radius: 20rpx;
-		// height: 500rpx;
+
+		
 	}
 	.txt{
 		font-size: 32rpx;
@@ -259,10 +261,10 @@
 	
 	
 	.banner{
-		// height: 500rpx;
-		// width: 100%;
+		width: 680rpx;
+	
 		border-radius: 30rpx;
-		// aspect-ratio: 4/3;
+		aspect-ratio: 4/3;
 		image{
 			width: 100%;
 			height: 100%;

+ 10 - 2
pages/user/signin.vue

xqd xqd xqd
@@ -4,7 +4,9 @@
 			<view style="padding: 30rpx; padding-top: 24rpx;padding-bottom: 200rpx;">
 				<view class="topTxtAndImg">
 					<view class="swiper">
-						<swiper class="banner" circular :autoplay="false" :style="{height:isPc?'':'500rpx'}">
+						<swiper class="banner" circular :autoplay="false"
+							:style="{width:isPc?'600rpx':'680rpx',height:isPc?'auto':'450rpx'}">
+							<!-- <swiper class="banner" circular :autoplay="false"> -->
 							<swiper-item v-for="i in bannerList">
 								<image :src="i.picture" mode=""></image>
 							</swiper-item>
@@ -164,7 +166,7 @@
 
 
 
-				agree: false,
+				agree: true,
 				// agree1: false,
 				showAuthorizationModal: false,
 				tobheight: 45,
@@ -266,6 +268,12 @@
 			if (uni.getStorageSync('invite_code')) {
 				this.accountLogin.invite_code = uni.getStorageSync('invite_code')
 			}
+
+			// if (uni.getStorageSync('token')) {
+			// 	uni.redirectTo({
+			// 		url: '/pages/index/index'
+			// 	})
+			// }
 		},
 		methods: {
 			async thirdLogin(provider) {