Преглед на файлове

Merge branch 'master' into xqy_h5

谢杰标 преди 2 години
родител
ревизия
d6d715c140
променени са 4 файла, в които са добавени 223 реда и са изтрити 7 реда
  1. 7 1
      common/httpList/goods.js
  2. 6 6
      common/request.js
  3. 11 0
      pages.json
  4. 199 0
      pages5/scan/recommen.vue

+ 7 - 1
common/httpList/goods.js

@@ -10,7 +10,13 @@ export default {
 			noToken: true
 		})
 	},
-
+	actGoodsList(data) {
+		return myRequest({
+			url: '/app/common/goods/share/list/'+ data,
+			method: 'get',
+			noToken: true
+		})
+	},
 	commonSystemTime() {
 		return myRequest({
 			url: '/app/common/system/dict/data/sys/time',

+ 6 - 6
common/request.js

@@ -5,18 +5,18 @@ import method from '@/common/methodTool.js'
 import api from './api.js'
 var num = 1
 //接口api   
-export const BASE_URL = 'https://api.xyyxt.net'   //release
+// export const BASE_URL = 'https://api.xyyxt.net'   //release
 // export const BASE_URL = 'https://h.gdzzkj.net'
 // export const BASE_URL = 'https://test.xyyxt.net'   //预发布
-// export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
+export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
 // export const BASE_URL = 'http://42.192.164.187:19005'    //test(后端本地)
 // export const BASE_URL = 'http://192.168.1.222:5055'    //后端本地更新到222
 // export const BASE_URL = 'http://192.168.1.24:5055'    //后端本地
 // export const BASE_URL = 'http://192.168.1.7:5055'    //后端本地
 
  //图片上传api
-export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
-// export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
+// export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
+export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 
 // web_view的
 // export const WEBVIEW_URL = 'https://m.xyyxt.net/'  //release-祥粤云学堂
@@ -39,8 +39,8 @@ RVQplIVs5z3MxcUa9ptKPHUTgh8xMCBvl8sUJKwkmn4vYWeDfHT22EL7Hr1pTMwU
 hF6WiNlWfQTVoF1rhwIDAQAB
 -----END PUBLIC KEY-----`;
 
-export const version = '1.5.12' 
-export const tenantId = '141250585240548145'  // 祥粤云学堂:867735392558919680,祥粤学堂:667735392758919630, 中建云学堂-567735392758918520,中正学堂-141250585240548145
+export const version = '1.0.2' 
+export const tenantId = '867735392558919680'  // 祥粤云学堂:867735392558919680,祥粤学堂:667735392758919630, 中建云学堂-567735392758918520
 export const myRequest = (options) => {
 	if (store.state.allowLoading && !options.noLoading) {
 		uni.showLoading({

+ 11 - 0
pages.json

@@ -1048,6 +1048,17 @@
 					"bounce": "none"
 				}
 			}
+		},{
+			"path": "scan/recommen",
+			"style": {
+				"navigationBarTitleText": "课程列表",
+				"navigationBarBackgroundColor": "#0386FD",
+				"navigationStyle": "custom", // 隐藏系统导航栏
+				"app-plus": {
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
+			}
 		}
 	]
 			

+ 199 - 0
pages5/scan/recommen.vue

@@ -0,0 +1,199 @@
+<template>
+	<view class="scan_course">
+		<nav-bar title="商品列表" class="navbar"></nav-bar>
+		<view class="list_item" v-for="(item, index) in courseList" :key="index">
+			<view class="course_content">
+				<view class="c_title">{{ item.goodsName }}</view>
+				<view class="c_downs">
+					<view class="img">
+						<image :src="$method.splitImgHost(item.coverUrl, true)"></image>
+						<view class="time" v-if="item.year">{{
+              item.year ? item.year : ""
+            }}</view>
+					</view>
+					<view class="text">
+						<view class="desc">
+							<view class="left">
+								<text class="mon_t">¥ {{ item.standPrice }}</text>
+								<text v-if="item.linePrice" class="sale"> ¥ </text>
+								<text v-if="item.linePrice" class="price_line">&nbsp;{{ item.linePrice }}</text>
+							</view>
+							<view class="right">
+								<view class="regiser_row" @click="toBuy(item)">立即购买</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				courseList: []
+			};
+		},
+		onLoad({
+			scene
+		}) {
+			this.courseList = [];
+			if (scene) {
+				let optObj = {};
+				let arrs = decodeURIComponent(scene).split("&");
+				for (let i = 0; i < arrs.length; i++) {
+					optObj[arrs[i].split("=")[0]] = arrs[i].split("=")[1];
+				}
+				this.getCourseList(optObj.sharekey);
+			}
+		},
+		methods: {
+			getCourseList(id) {
+				this.$api.actGoodsList(id).then((res) => {
+					if (res.data.code == 200) {
+						this.courseList = res.data.data;
+					} else {
+						uni.showToast({
+							title: res.data.msg,
+							icon: "error",
+						});
+					}
+				})
+			},
+			toBuy(item) {
+				if (item.goodsType == 2) {
+					uni.navigateTo({
+						url: "/pages2/bank/detail?id=" + item.goodsId,
+					});
+				} else {
+					uni.navigateTo({
+						url: "/pages3/course/detail?id=" +
+							item.goodsId +
+							"&goodsType=" +
+							item.goodsType,
+					});
+				}
+			},
+		},
+	};
+</script>
+
+<style lang="scss" scoped>
+	.scan_course {
+		padding: 32rpx 32rpx 0;
+
+		.list_item {
+			padding: 24rpx;
+			// height: 278rpx;
+			background: #ffffff;
+			box-shadow: 0rpx 0rpx 20rpx 1rpx rgba(1, 99, 235, 0.1);
+			border-radius: 24rpx;
+			background: #fff;
+			margin-bottom: 32rpx;
+			display: flex;
+			align-items: center;
+
+			.c_title {
+				font-size: 32rpx;
+				font-weight: bold;
+				margin-bottom: 24rpx;
+				font-weight: bold;
+				color: #222222;
+			}
+
+			.c_downs {
+				display: flex;
+			}
+
+			.img {
+				position: relative;
+				margin-right: 24rpx;
+				border-radius: 16rpx;
+				overflow: hidden;
+				width: 204rpx;
+				height: 120rpx;
+
+				image {
+					width: 100%;
+					height: 100%;
+				}
+
+				.time {
+					position: absolute;
+					bottom: 0;
+					right: 0;
+					width: 80rpx;
+					height: 32rpx;
+					background: rgba(1, 25, 45, 0.4);
+					color: #fff;
+					text-align: center;
+					line-height: 32rpx;
+					font-size: 24rpx;
+					border-radius: 10rpx 0px 10rpx 0px;
+				}
+			}
+
+			.text {
+				width: 440rpx;
+				position: relative;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				height: 120rpx;
+
+				.desc {
+					margin-top: 10rpx;
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					width: 100%;
+
+					.left {
+						flex: 1;
+						color: #333;
+						font-size: 26rpx;
+
+						.mon_t {
+							font-weight: bold;
+							color: #fc3f3f;
+							font-size: 36rpx;
+						}
+
+						.sale {
+							color: #999999;
+							font-size: 24rpx;
+							margin-left: 8rpx;
+						}
+
+						.price_line {
+							color: #999999;
+							font-size: 24rpx;
+							text-decoration: line-through;
+							font-weight: 400;
+						}
+					}
+
+					.right {
+						font-size: 24rpx;
+						font-weight: bold;
+						padding-right: 20rpx;
+
+						.regiser_row {
+							width: 144rpx;
+							height: 52rpx;
+							line-height: 52rpx;
+							text-align: center;
+							border-radius: 16rpx;
+							background-color: #fc3f3f;
+							color: #fff;
+							font-weight: 500;
+							font-size: 26rpx;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>