瀏覽代碼

购物功能重写

邪性 3 年之前
當前提交
567b912969
共有 100 個文件被更改,包括 17727 次插入0 次删除
  1. 二進制
      .DS_Store
  2. 20 0
      .hbuilderx/launch.json
  3. 264 0
      App.vue
  4. 213 0
      api/httpRequest.js
  5. 10 0
      common.md
  6. 229 0
      common/othCom/liudx-pickerAddress/index.vue
  7. 99 0
      common/othCom/liudx-pickerAddress/u-mask.vue
  8. 347 0
      common/othCom/liudx-pickerAddress/u-popup.vue
  9. 33 0
      common/othCom/xb-copy/uni-copy.js
  10. 76 0
      common/tool/comJs.js
  11. 147 0
      common/tool/pathToBase64.js
  12. 146 0
      common/tool/tools.js
  13. 362 0
      common/tool/util.js
  14. 133 0
      common/tool/validate.js
  15. 122 0
      common/tool/wxApi.js
  16. 9 0
      components/number-keyboard/number-keyboard.vue
  17. 84 0
      components/pay-password-keyboard/pay-password-keyboard.vue
  18. 85 0
      components/shopList.vue
  19. 46 0
      components/uBotton/uBotton.vue
  20. 86 0
      components/videoList.vue
  21. 98 0
      components/y-action-sheet/y-action-sheet.vue
  22. 114 0
      components/y-modal/y-modal.vue
  23. 82 0
      components/y-verif/verif.vue
  24. 14 0
      index.html
  25. 37 0
      main.js
  26. 80 0
      manifest.json
  27. 448 0
      pages.json
  28. 171 0
      pages/index/classList.vue
  29. 153 0
      pages/index/components/detail-page-header.vue
  30. 106 0
      pages/index/components/knowAuthList.vue
  31. 61 0
      pages/index/components/knowList.vue
  32. 85 0
      pages/index/components/knowVidList.vue
  33. 191 0
      pages/index/components/sh-menu.vue
  34. 174 0
      pages/index/components/wordlist.vue
  35. 219 0
      pages/index/dlClassList.vue
  36. 149 0
      pages/index/indHot.vue
  37. 569 0
      pages/index/index.vue
  38. 491 0
      pages/index/indexold.vue
  39. 122 0
      pages/index/knowledgeList.vue
  40. 342 0
      pages/index/navDet.vue
  41. 152 0
      pages/index/navInfo.vue
  42. 70 0
      pages/index/school/componets/list.vue
  43. 110 0
      pages/index/school/school.vue
  44. 226 0
      pages/index/school/schoolInfo.vue
  45. 141 0
      pages/index/screenList.vue
  46. 204 0
      pages/index/search.vue
  47. 27 0
      pages/index/template.vue
  48. 76 0
      pages/index/video/componets/list.vue
  49. 171 0
      pages/index/video/video.vue
  50. 261 0
      pages/index/video/videoInfo.vue
  51. 169 0
      pages/login/login.vue
  52. 304 0
      pages/news/news.vue
  53. 194 0
      pages/news/newsInfo.vue
  54. 203 0
      pages/news/notice.vue
  55. 322 0
      pages/pay/pay.vue
  56. 313 0
      pages/pay/payVid.vue
  57. 101 0
      pages/tabbar/broadcast.vue
  58. 420 0
      pages/tabbar/class.vue
  59. 394 0
      pages/tabbar/classold.vue
  60. 111 0
      pages/tabbar/components/list.vue
  61. 179 0
      pages/user/address/address.vue
  62. 216 0
      pages/user/address/editAddres.vue
  63. 137 0
      pages/user/coupon/coupon.vue
  64. 143 0
      pages/user/coupon/myCoup.vue
  65. 275 0
      pages/user/funManage/addCash.vue
  66. 280 0
      pages/user/funManage/bindMethods.vue
  67. 193 0
      pages/user/funManage/funManage.vue
  68. 284 0
      pages/user/funManage/fundCash.vue
  69. 138 0
      pages/user/funManage/list.vue
  70. 266 0
      pages/user/funManage/recharge.vue
  71. 240 0
      pages/user/mine/buy.vue
  72. 96 0
      pages/user/mine/collect.vue
  73. 71 0
      pages/user/mine/down.vue
  74. 247 0
      pages/user/mine/feedBack.vue
  75. 189 0
      pages/user/mine/member.vue
  76. 96 0
      pages/user/mine/mineBean.vue
  77. 67 0
      pages/user/mine/poster.vue
  78. 160 0
      pages/user/mine/team.vue
  79. 110 0
      pages/user/mine/userInfo.vue
  80. 135 0
      pages/user/other/other.vue
  81. 240 0
      pages/user/set/set.vue
  82. 94 0
      pages/user/set/setImg.vue
  83. 390 0
      pages/user/user.vue
  84. 44 0
      pagesA/broadcast/bdInfo.vue
  85. 250 0
      pagesA/broadcast/bdLook.vue
  86. 89 0
      pagesA/broadcast/blist.vue
  87. 80 0
      pagesA/broadcast/components/list.vue
  88. 432 0
      pagesA/catList/catList.vue
  89. 363 0
      pagesA/catList/catli.vue
  90. 73 0
      pagesA/catList/downlist.vue
  91. 60 0
      pagesA/catList/mixin.js
  92. 109 0
      pagesA/components/collageMall.vue
  93. 72 0
      pagesA/components/collagePeoList.vue
  94. 110 0
      pagesA/components/skillList.vue
  95. 277 0
      pagesA/mall/class.vue
  96. 299 0
      pagesA/mall/collInfo.vue
  97. 91 0
      pagesA/mall/componets/hotgodlist.vue
  98. 449 0
      pagesA/mall/creatOrd.vue
  99. 347 0
      pagesA/mall/info.vue
  100. 150 0
      pagesA/mall/logisticsInfo.vue

二進制
.DS_Store


+ 20 - 0
.hbuilderx/launch.json

@@ -0,0 +1,20 @@
+{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+  // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+    "version": "0.0",
+    "configurations": [{
+     	"default" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"h5" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"mp-weixin" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"type" : "uniCloud"
+     }
+    ]
+}

+ 264 - 0
App.vue

@@ -0,0 +1,264 @@
+<script>
+export default {
+	onLaunch: function() {
+		
+	},
+	onShow: function() {
+		console.log('App Show');
+	},
+	onShareAppMessage() {
+		return {
+			title: '一起来学习吧',
+			path: `/pages/index/index`
+		};
+	},
+	onHide: function() {
+		console.log('App Hide');
+	}
+};
+</script>
+
+<style lang="scss">
+.u-button {
+	width: 690rpx;
+	background: #ed742e;
+	margin-top: 100rpx;
+	.u-button__text {
+		color: #fff;
+	}
+}
+.u-button--info {
+	width: 690rpx;
+	background: #ed742e;
+	margin-top: 100rpx;
+	color: #fff;
+}
+.defaultBtn {
+	margin: 0;
+	padding: 0;
+}
+/* 骨架屏替代方案 */
+.Skeleton {
+	background: #f3f3f3;
+	padding: 20upx 0;
+	border-radius: 8upx;
+}
+
+/*边框*/
+.b-b:after,
+.b-t:after {
+	position: absolute;
+	z-index: 3;
+	left: 0;
+	right: 0;
+	height: 0;
+	content: '';
+	transform: scaleY(0.5);
+	border-bottom: 1px solid $bordermain;
+}
+
+.b-b:after {
+	bottom: 0;
+}
+
+.b-t:after {
+	top: 0;
+}
+/* input 样式 */
+.input-placeholder {
+	color: #c6cadb;
+}
+
+.placeholder {
+	color: #c6cadb;
+}
+
+.selIcon {
+	width: 28rpx;
+	height: 28rpx;
+	margin: 0 12rpx;
+}
+.clickbtn {
+	width: 690rpx;
+	height: 90rpx;
+	line-height: 90rpx;
+	background: #ed742e;
+	font-size: 32rpx;
+	text-align: center;
+	margin: 40rpx auto 20rpx;
+	letter-spacing: 2rpx;
+	color: #fff;
+	border-radius: 45rpx;
+}
+.bold {
+	font-weight: 600;
+}
+.center {
+	width: 100%;
+	text-align: center;
+}
+.bb {
+	border-bottom: 1px solid #eeeded;
+}
+//选中规格详情
+.selAttr {
+	font-size: 28rpx;
+	// min-width: 124rpx;
+	height: 52rpx;
+	padding: 0 10rpx;
+	line-height: 52rpx;
+	background: #f9f9f9;
+	border-radius: 6rpx;
+	color: #999;
+	margin-bottom: 15rpx;
+}
+//原价
+.del {
+	font-size: 24rpx;
+	color: $textgrey;
+	text-decoration: line-through;
+}
+.scrollx {
+	display: -webkit-box;
+	overflow-x: auto;
+}
+.scrollx::-webkit-scrollbar {
+	display: none;
+}
+
+.flex1 {
+	flex: 1;
+}
+/* 一行 */
+.oneelli {
+	overflow: hidden;
+	white-space: nowrap;
+	/* 文字超出宽度则显示ellipsis省略号 */
+	text-overflow: ellipsis;
+}
+
+/* 两行,超出...表示 */
+.elli {
+	text-overflow: -o-ellipsis-lastline;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	display: -webkit-box;
+	-webkit-line-clamp: 2;
+	line-clamp: 2;
+	-webkit-box-orient: vertical;
+}
+.nodata,
+.moredata {
+	width: 100%;
+	padding: 30rpx 0;
+	text-align: center;
+	color: $textgrey;
+	align-items: center;
+	justify-content: center;
+}
+.fixBox {
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	height: 100rpx;
+	width: 100%;
+	background-color: #fff;
+}
+.status {
+	height: 0;
+	/*  #ifdef  APP-PLUS  */
+	height: var(--status-bar-height); //覆盖样式
+	/*  #endif  */
+}
+
+/* 常用样式 */
+.dfsb {
+	display: flex;
+	flex-direction: row;
+	justify-content: space-between;
+	align-items: center;
+}
+
+.dfsa {
+	display: flex;
+	flex-direction: row;
+	justify-content: space-around;
+	align-items: center;
+}
+
+.dffs {
+	display: flex;
+	flex-direction: row;
+	justify-content: flex-start;
+	align-items: center;
+}
+
+.dffd {
+	display: flex;
+	flex-direction: column;
+	justify-content: space-between;
+	align-items: flex-start;
+}
+
+/*每个页面公共css */
+page {
+	background: #f8f9fe;
+}
+.priceDan {
+	font-size: 38rpx;
+	font-family: DINPro-Bold, DINPro;
+	font-weight: bold;
+	color: #f16630;
+	line-height: 33rpx;
+	display: flex;
+	flex-direction: row;
+	&::before {
+		content: '¥';
+		font-size: 26rpx;
+	}
+}
+.mt20 {
+	margin-top: 20rpx;
+}
+.mt30 {
+	margin-top: 30rpx;
+}
+.pd30 {
+	padding: 30rpx;
+}
+.custom-style {
+	background-color: #0bb291;
+	color: #fff;
+	width: 690rpx;
+	margin-top: 40rpx;
+}
+view,
+scroll-view,
+swiper,
+swiper-item,
+cover-view,
+cover-image,
+icon,
+text,
+rich-text,
+progress,
+button,
+checkbox,
+form,
+input,
+label,
+radio,
+slider,
+switch,
+textarea,
+navigator,
+audio,
+camera,
+image,
+video {
+	color: $textmain;
+	font-family: PingFangSC-Regular, PingFang SC;
+	box-sizing: border-box;
+	font-size: 32rpx;
+}
+</style>

+ 213 - 0
api/httpRequest.js

@@ -0,0 +1,213 @@
+/**
+ * 常用方法封装 请求,文件上传等
+ **/
+
+const http = {
+	aa:'打印123',
+	//接口地址
+	interfaceUrl: function() {
+		return 'https://ht.xinmingyi.cn/api/'
+	},
+	toast: function(text, duration, success) {
+		uni.showToast({
+			title: text || "出错啦~",
+			icon: success ? 'success' : 'none',
+			duration: duration || 2000
+		})
+	},
+	modal: function(title, content, showCancel, callback, confirmColor, confirmText) {
+		uni.showModal({
+			title: title,
+			content: content,
+			showCancel: showCancel,
+			cancelColor: "#555",
+			confirmColor: confirmColor || "#5677fc",
+			confirmText: confirmText || "确定",
+			success(res) {
+				if (res.confirm) {
+					callback && callback(true)
+				} else {
+					callback && callback(false)
+				}
+			}
+		})
+	},
+	isAndroid: function() {
+		const res = uni.getSystemInfoSync();
+		return res.platform.toLocaleLowerCase() == "android"
+	},
+	isPhoneX: function() {
+		const res = uni.getSystemInfoSync();
+		let iphonex = false;
+		let models = ['iphonex', 'iphonexr', 'iphonexsmax', 'iphone11', 'iphone11pro', 'iphone11promax']
+		const model = res.model.replace(/\s/g, "").toLowerCase()
+		if (models.includes(model)) {
+			iphonex = true;
+		}
+		return iphonex;
+	},
+	constNum: function() {
+		let time = 0;
+		// #ifdef APP-PLUS
+		time = this.isAndroid() ? 300 : 0;
+		// #endif
+		return time
+	},
+	delayed: null,
+	/**
+	 * 请求数据处理
+	 * @param string url 请求地址
+	 * @param string method 请求方式
+	 *  GET or POST
+	 * @param {*} postData 请求参数
+	 * @param bool isDelay 是否延迟显示loading
+	 * @param bool isForm 数据格式
+	 *  true: 'application/x-www-form-urlencoded'
+	 *  false:'application/json'
+	 * @param bool hideLoading 是否隐藏loading
+	 *  true: 隐藏
+	 *  false:显示
+	 */
+	request: function(url, postDataa, method, isDelay, isForm, hideLoading) {
+		let postData = postDataa || {}
+		let token = uni.getStorageSync("us_token") || ''
+		if (token) {
+			postData.token = token;
+		}
+		//接口请求 
+		uni.showLoading({
+			mask: true,
+			title: '加载中...',
+			success(res) {}
+		})
+		return new Promise((resolve, reject) => {
+			uni.request({
+				url: http.interfaceUrl() + url,
+				data: postData,
+				header: {
+					'content-type': 'application/x-www-form-urlencoded',
+				},
+				method: method ? method : 'POST', //'GET','POST'
+				dataType: 'json',
+				success: (res) => {
+					uni.hideLoading()
+					if (res.data.msg=='账号信息已过期,请重新登录'||res.data.msg=='请先登录') { 
+						uni.navigateTo({
+							url: '/pages/login/login'
+						})
+						// return http.modal('温馨提示', res.data.msg, true, (res => {
+
+						// }))
+					}
+					resolve(res.data)
+				},
+				fail: (res) => {
+					clearTimeout(http.delayed)
+					http.delayed = null;
+					http.toast('网络错误,请稍后重试~')
+					reject(res)
+				}
+			})
+		})
+	},
+	/**
+	 * 上传文件
+	 * @param string url 请求地址
+	 * @param string src 文件路径
+	 */
+	uploadFile: function(url, src) {
+		uni.showLoading({
+			title: '请稍候...'
+		})
+		return new Promise((resolve, reject) => {
+			const uploadTask = uni.uploadFile({
+				url: http.interfaceUrl() + url,
+				filePath: src,
+				name: 'file',
+				header: {
+					// 'Authorization': http.getToken()
+				},
+				formData: {
+					// sizeArrayText:""
+				},
+				success: function(res) {
+					uni.hideLoading()
+					let d = JSON.parse(res.data.replace(/\ufeff/g, "") || "{}")
+					if (d.code % 100 == 0) {
+						//返回图片地址
+						let fileObj = d.data;
+						resolve(fileObj)
+					} else {
+						http.toast(res.msg);
+					}
+				},
+				fail: function(res) {
+					reject(res)
+					http.toast(res.msg);
+				}
+			})
+		})
+	},
+	qinJsonp: function(url, callback, callbackname) {
+		// #ifdef H5
+		window[callbackname] = callback;
+		let qinScript = document.createElement("script");
+		qinScript.src = url;
+		qinScript.type = "text/javascript";
+		document.head.appendChild(qinScript);
+		document.head.removeChild(qinScript);
+		// #endif
+	},
+	//设置用户信息
+	setUserInfo: function(mobile, token) {
+		uni.setStorageSync("mobile", mobile)
+	},
+	// //获取token
+	// getToken() {
+	// 	return uni.getStorageSync("token")
+	// },
+	//判断是否登录
+	isLogin: function() {
+		return uni.getStorageSync("token") ? true : false
+	},
+	//判断微信浏览器
+	isweixin: function() {
+		let type = false;
+		// #ifdef MP-WEIXIN
+		type = true
+		//#endif
+		// #ifdef H5 
+		let en = window.navigator.userAgent.toLowerCase();
+		// 匹配en中是否含有MicroMessenger字符串
+		if (en.match(/MicroMessenger/i) == 'micromessenger') {
+			// alert("在微信",11111) 
+			type = true
+		}
+		return type
+		//#endif
+
+	},
+	//跳转页面,校验登录状态
+	href(url, isVerify) {
+		if (isVerify && !http.isLogin()) {
+			uni.navigateTo({
+				url: '/pages/common/login/login'
+			})
+		} else {
+			uni.navigateTo({
+				url: url
+			});
+		}
+	},
+	//上一页
+	prePage() {
+		let pages = getCurrentPages();
+		let prePage = pages[pages.length - 2];
+		// #ifdef H5
+		return prePage;
+		// #endif
+		return prePage.$vm;
+	},
+}
+
+export default http

+ 10 - 0
common.md

@@ -0,0 +1,10 @@
+
+小程序appid 目前没有
+
+接口:(2021.12.4)
+1. 授权登录有个 邀请码(目前是空)
+2. 手机号绑定接口 没有
+ 
+57ef20543885ac7d9fd9a240ee0a3643
+ 
+wx00d3d08bf67e853e

+ 229 - 0
common/othCom/liudx-pickerAddress/index.vue

@@ -0,0 +1,229 @@
+<template>
+	<u-popup :maskCloseAble="maskCloseAble" mode="bottom" :popup="false" v-model="value" length="auto" :safeAreaInsetBottom="safeAreaInsetBottom" @close="close" z-index="999">
+		<view class="u-picker-header dfsb" @touchmove.stop.prevent="stop" catchtouchmove="stop">
+			<view class="u-btn-picker u-btn-picker--tips" hover-class="u-opacity" :hover-stay-time="150" @tap="getResult('cancel')">取消</view>
+			<view class="u-btn-picker headtit">选择地址</view>
+			<view class="u-btn-picker u-btn-picker--primary" hover-class="u-opacity" :hover-stay-time="150" @touchmove.stop="" @tap.stop="getResult('confirm')">确定</view>
+		</view>
+		<view class="u-picker-body">
+			<picker-view :value="pickVal" @change="bindChange" class="u-picker-view">
+				<picker-view-column>
+					<view class="u-column-item" v-for="(item, index) in districtsObj.provinces" :key="index">
+						<view class="u-line-1">{{ item.name }}</view>
+					</view>
+				</picker-view-column>
+				<picker-view-column>
+					<view class="u-column-item" v-for="(item, index) in districtsObj.cities" :key="index">
+						<view class="u-line-1">{{ item.name }}</view>
+					</view>
+				</picker-view-column>
+				<picker-view-column>
+					<view class="u-column-item" v-for="(item, index) in districtsObj.areas" :key="index">
+						<view class="u-line-1">{{ item.name }}</view>
+					</view>
+				</picker-view-column>
+			</picker-view>
+		</view>
+	</u-popup>
+</template>
+
+<script>
+import uPopup from './u-popup';
+export default {
+	props: {
+		safeAreaInsetBottom: {
+			type: Boolean,
+			default: false
+		},
+		// 是否允许通过点击遮罩关闭Picker
+		maskCloseAble: {
+			type: Boolean,
+			default: true
+		},
+		// 通过双向绑定控制组件的弹出与收起
+		value: {
+			type: Boolean,
+			default: false
+		}
+	},
+	data() {
+		return {
+			pickVal: [0, 0, 0],
+			districtsObj: {
+				provinces: [],
+				cities: [],
+				areas: []
+			},
+			province: 0,
+			city: 0,
+			area: 0
+		};
+	},
+	watch: {
+		// 如果地区发生变化,为了让picker联动起来,必须重置this.citys和this.areas
+		province(val) {
+			this.loadCities(this.districtsObj.provinces[this.province].id);
+		},
+		city(val) {
+			this.loadAreas(this.districtsObj.cities[this.city].id);
+		}
+	},
+	mounted() {
+		this.loadDistrict();
+	},
+	methods: {
+		close() {
+			this.$emit('input', false);
+		},
+		async loadDistrict() {
+			this.loadProvinces();
+		},
+		loadProvinces() {
+			// 加载省份 
+				this.$api
+					.request('common/getAreaLinkage' )
+					.then(data => {
+						if (data.code == 200) {
+							this.districtsObj.provinces = data.data;
+							this.loadCities(data.data[0].id);
+						} else {
+							this.$api.toast(data.msg);
+						}
+					})
+					.catch(function(error) {
+						console.log(error);
+					}); 
+		},
+		loadCities(AreaId) {
+			this.$api
+				.request('common/getAreaLinkage',{
+					pid:AreaId
+				} )
+				.then(data => {
+					if (data.code == 200) {
+						this.districtsObj.cities = data.data;
+						this.loadAreas(data.data[0].id);
+					} else {
+						this.$api.toast(data.msg);
+					}
+				})
+				.catch(function(error) {
+					console.log(error);
+				}); 
+		},
+		loadAreas(AreaId) {
+			this.$api
+				.request('common/getAreaLinkage',{
+					pid:AreaId
+				} )
+				.then(data => {
+					if (data.code == 200) {
+						this.districtsObj.areas = data.data;
+					} else {
+						this.$api.toast(data.msg);
+					}
+				})
+				.catch(function(error) {
+					console.log(error);
+				}); 
+		},
+		bindChange(event) { 
+			this.pickVal = event.detail.value;
+			let i = 0;
+			this.province = this.pickVal[i++];
+			this.city = this.pickVal[i++];
+			this.area = this.pickVal[i++];
+		},
+		getResult(event = null) {
+			let result = {
+				province: this.districtsObj.provinces[this.province],
+				city: this.districtsObj.cities[this.city],
+				area: this.districtsObj.areas[this.area]
+			};
+			if (event) this.$emit(event, result);
+			this.close();
+		}
+	},
+	components: {
+		uPopup
+	}
+};
+</script>
+<style lang="scss" scoped>
+.u-datetime-picker {
+	position: relative;
+	z-index: 999;
+}
+.headtit {
+	font-size: 36rpx;
+}
+.u-picker-view {
+	height: 100%;
+	box-sizing: border-box;
+}
+
+.u-picker-header {
+	width: 100%;
+	height: 90rpx;
+	padding: 0 40rpx;
+	display: flex;
+	flex-direction: row;
+	justify-content: space-between;
+	align-items: center;
+	box-sizing: border-box;
+	font-size: 32rpx;
+	background: $promain;
+	border-bottom: 1px solid $bordermain;
+	position: relative;
+}
+
+.u-picker-header::after {
+	content: '';
+	position: absolute;
+	border-bottom: 1rpx solid #eaeef1;
+	-webkit-transform: scaleY(0.5);
+	transform: scaleY(0.5);
+	bottom: 0;
+	right: 0;
+	left: 0;
+}
+
+.u-picker-body {
+	width: 100%;
+	height: 500rpx;
+	overflow: hidden;
+	background-color: #fff;
+}
+
+.u-column-item {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	flex-direction: row;
+	font-size: 32rpx;
+	padding: 0 8rpx;
+}
+
+.u-text {
+	font-size: 24rpx;
+	padding-left: 8rpx;
+}
+
+.u-btn-picker {
+	color: #fff;
+	padding: 16rpx;
+	box-sizing: border-box;
+	text-align: center;
+	text-decoration: none;
+}
+
+.u-opacity {
+	opacity: 0.5;
+}
+
+.u-btn-picker--primary {
+}
+
+.u-btn-picker--tips {
+}
+</style>

+ 99 - 0
common/othCom/liudx-pickerAddress/u-mask.vue

@@ -0,0 +1,99 @@
+<template>
+	<view class="u-mask" :style="[maskStyle]" :class="[show ? 'u-mask-show' : '']" @tap="click" @touchmove.stop.prevent>
+		<slot />
+	</view>
+</template>
+
+<script>
+	/**
+	 * mask 遮罩
+	 * @description 创建一个遮罩层,用于强调特定的页面元素,并阻止用户对遮罩下层的内容进行操作,一般用于弹窗场景
+	 * @tutorial https://www.uviewui.com/components/mask.html
+	 * @property {Boolean} show 是否显示遮罩(默认false)
+	 * @property {String Number} z-index z-index 层级(默认1070)
+	 * @property {Object} custom-style 自定义样式对象,见上方说明
+	 * @property {String Number} duration 动画时长,单位毫秒(默认300)
+	 * @property {Boolean} zoom 是否使用scale对这招进行缩放(默认true)
+	 * @property {Boolean} mask-click-able 遮罩是否可点击,为false时点击不会发送click事件(默认true)
+	 * @event {Function} click mask-click-able为true时,点击遮罩发送此事件
+	 * @example <u-mask :show="show" @click="show = false"></u-mask>
+	 */
+	export default {
+		name: "u-mask",
+		props: {
+			// 是否显示遮罩
+			show: {
+				type: Boolean,
+				default: false
+			},
+			// 层级z-index
+			zIndex: {
+				type: [Number, String],
+				default: '1'
+			},
+			// 用户自定义样式
+			customStyle: {
+				type: Object,
+				default () {
+					return {}
+				}
+			},
+			// 遮罩的动画样式, 是否使用使用zoom进行scale进行缩放
+			zoom: {
+				type: Boolean,
+				default: true
+			},
+			// 遮罩的过渡时间,单位为ms
+			duration: {
+				type: [Number, String],
+				default: 300
+			},
+			// 是否可以通过点击遮罩进行关闭
+			maskClickAble: {
+				type: Boolean,
+				default: true
+			}
+		},
+		computed: {
+			maskStyle() {
+				let style = {};
+				style.backgroundColor = "rgba(0, 0, 0, 0.6)";
+				style.zIndex = this.zIndex ? this.zIndex : this.$u.zIndex.mask;
+				style.transition = `all ${this.duration / 1000}s ease-in-out`;
+				// 缩放
+				if (this.zoom == true) style.transform = 'scale(1.2, 1.2)';
+				// 判断用户传递的对象是否为空
+				if (Object.keys(this.customStyle).length) style = { ...style,
+					...this.customStyle
+				};
+				// 合并自定义的样式
+				//Object.assign(style, customStyle);
+				return style;
+			}
+		},
+		methods: {
+			click() {
+				if (!this.maskClickAble) return;
+				this.$emit('click');
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.u-mask {
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		opacity: 0;
+		visibility: hidden;
+	}
+
+	.u-mask-show {
+		opacity: 1;
+		visibility: visible;
+		transform: scale(1);
+	}
+</style>

+ 347 - 0
common/othCom/liudx-pickerAddress/u-popup.vue

@@ -0,0 +1,347 @@
+<template>
+	<view v-if="visibleSync" :style="[customStyle]" :class="{ 'u-drawer-visible': showDrawer }" class="u-drawer">
+		<!-- <u-overlay :maskClickAble="maskCloseAble" :show="showDrawer && mask" @click="maskClick"></u-overlay> -->
+		<view class="u-drawer-content" @tap="modeCenterClose(mode)" :class="[
+				safeAreaInsetBottom ? 'safe-area-inset-bottom' : '',
+				'u-drawer-' + mode,
+				showDrawer ? 'u-drawer-content-visible' : '',
+				zoom && mode == 'center' ? 'u-animation-zoom' : ''
+			]"
+		 @touchmove.stop.prevent @tap.stop.prevent :style="[style]">
+			<view class="u-mode-center-box" @tap.stop.prevent  @touchmove.stop.prevent v-if="mode == 'center'" :style="[centerStyle]">
+				<slot />
+			</view>
+			<block v-else>
+				<slot />
+			</block>
+		</view>
+	</view>
+</template>
+
+<script>
+	/**
+	 * popup 弹窗
+	 * @description 弹出层容器,用于展示弹窗、信息提示等内容,支持上、下、左、右和中部弹出。组件只提供容器,内部内容由用户自定义
+	 * @tutorial https://www.uviewui.com/components/popup.html
+	 * @property {String} mode 弹出方向(默认left)
+	 * @property {Boolean} mask 是否显示遮罩(默认true)
+	 * @property {String Number} length mode=left | 见官网说明(默认auto)
+	 * @property {Boolean} zoom 是否开启缩放动画,只在mode为center时有效(默认true)
+	 * @property {Boolean} safe-area-inset-bottom 是否开启底部安全区适配(默认false)
+	 * @property {Boolean} mask-close-able 点击遮罩是否可以关闭弹出层(默认true)
+	 * @property {Object} custom-style 用户自定义样式
+	 * @property {Number String} border-radius 弹窗圆角值(默认0)
+	 * @property {Number String} z-index 弹出内容的z-index值(默认1075)
+	 * @event {Function} open 弹出层打开
+	 * @event {Function} close 弹出层收起
+	 * @example <u-popup v-model="show"><view>出淤泥而不染,濯清涟而不妖</view></u-popup>
+	 */
+	// import uMask from './u-mask.vue'
+	export default {
+		name: 'u-popup',
+		props: {
+			/**
+			 * 显示状态
+			 */
+			show: {
+				type: Boolean,
+				default: false
+			},
+			/**
+			 * 弹出方向,left|right|top|bottom|center
+			 */
+			mode: {
+				type: String,
+				default: 'left'
+			},
+			/**
+			 * 是否显示遮罩
+			 */
+			mask: {
+				type: Boolean,
+				default: true
+			},
+			// 抽屉的宽度(mode=left|right),或者高度(mode=top|bottom),单位rpx,或者"auto"
+			// 或者百分比"50%",表示由内容撑开高度或者宽度
+			length: {
+				type: [Number, String],
+				default: 'auto'
+			},
+			// 是否开启缩放动画,只在mode=center时有效
+			zoom: {
+				type: Boolean,
+				default: true
+			},
+			// 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距
+			safeAreaInsetBottom: {
+				type: Boolean,
+				default: false
+			},
+			// 是否可以通过点击遮罩进行关闭
+			maskCloseAble: {
+				type: Boolean,
+				default: true
+			},
+			// 用户自定义样式
+			customStyle: {
+				type: Object,
+				default () {
+					return {};
+				}
+			},
+			value: {
+				type: Boolean,
+				default: false
+			},
+			// 此为内部参数,不在文档对外使用,为了解决Picker和keyboard等融合了弹窗的组件
+			// 对v-model双向绑定多层调用造成报错不能修改props值的问题
+			popup: {
+				type: Boolean,
+				default: true
+			},
+			// 显示显示弹窗的圆角,单位rpx
+			borderRadius: {
+				type: [Number, String],
+				default: 0
+			},
+			zIndex: {
+				type: [Number, String],
+				default: '100'
+			}
+		},
+		data() {
+			return {
+				visibleSync: false,
+				showDrawer: false,
+				timer: null,
+				style1: {}
+			};
+		},
+		computed: {
+			// 根据mode的位置,设定其弹窗的宽度(mode = left|right),或者高度(mode = top|bottom)
+			style() {
+				let style = {};
+				let translate = '100%';
+				// 判断是否是否百分比或者auto值,是的话,直接使用该值,否则默认为rpx单位的数值
+				let length = (/%$/.test(this.length) || this.length == 'auto') ? this.length : uni.upx2px(this.length) + 'px';
+				// 如果是左边或者上边弹出时,需要给translate设置为负值,用于隐藏
+				if (this.mode == 'left' || this.mode == 'top') translate = length == 'auto' ? '-100%' : '-' + length;
+				if (this.mode == 'left' || this.mode == 'right') {
+					style = {
+						width: length,
+						height: '100%',
+						transform: `translate3D(${translate},0px,0px)`
+					};
+				} else if (this.mode == 'top' || this.mode == 'bottom') {
+					style = {
+						width: '100%',
+						height: length,
+						transform: `translate3D(0px,${translate},0px)`
+					};
+				}
+				style.zIndex = this.zIndex ? this.zIndex : this.$u.zIndex.popup;
+				// 如果用户设置了borderRadius值,添加弹窗的圆角
+				if (this.borderRadius) {
+					switch (this.mode) {
+						case 'left':
+							style.borderRadius = `0 ${this.borderRadius}rpx ${this.borderRadius}rpx 0`;
+							break;
+						case 'top':
+							style.borderRadius = `0 0 ${this.borderRadius}rpx ${this.borderRadius}rpx`;
+							break;
+						case 'right':
+							style.borderRadius = `${this.borderRadius}rpx 0 0 ${this.borderRadius}rpx`;
+							break;
+						case 'bottom':
+							style.borderRadius = `${this.borderRadius}rpx ${this.borderRadius}rpx 0 0`;
+							break;
+						default:
+							;
+					}
+					// 不加可能圆角无效
+					style.overflow = 'hidden';
+				}
+				return style;
+			},
+			// 中部弹窗的特有样式
+			centerStyle() {
+				let style = {};
+				let length = (/%$/.test(this.length) || this.length == 'auto') ? this.length : uni.upx2px(this.length) + 'px';
+				style.width = length;
+				style.zIndex = this.zIndex ? this.zIndex : this.$u.zIndex.popup;
+				if (this.borderRadius) {
+					style.borderRadius = `${this.borderRadius}rpx`;
+					// 不加可能圆角无效
+					style.overflow = 'hidden';
+				}
+				return style;
+			}
+		},
+		watch: {
+			value(val) {
+				if (val) {
+					this.open();
+				} else {
+					this.close();
+				}
+			}
+		},
+		created() {
+			// 先让弹窗组件渲染,再改变遮罩和抽屉元素的样式,让其动画其起作用(必须要有延时,才会有效果)
+			this.visibleSync = this.value;
+			setTimeout(() => {
+				this.showDrawer = this.value;
+			}, 30);
+		},
+		methods: {
+			// 遮罩被点击
+			maskClick() {
+				this.close();
+			},
+			close() {
+				this.change('showDrawer', 'visibleSync', false);
+			},
+			// 中部弹出时,需要.u-drawer-content将居中内容,此元素会铺满屏幕,点击需要关闭弹窗
+			// 让其只在mode=center时起作用
+			modeCenterClose(mode) {
+				if (mode != 'center' || !this.maskCloseAble) return;
+				this.close();
+			},
+			open() {
+				this.change('visibleSync', 'showDrawer', true);
+			},
+			// 此处的原理是,关闭时先通过动画隐藏弹窗和遮罩,再移除整个组件
+			// 打开时,先渲染组件,延时一定时间再让遮罩和弹窗的动画起作用
+			change(param1, param2, status) {
+				// 如果this.popup为false,以为着为picker,actionsheet等组件调用了popup组件
+				if (this.popup == true) this.$emit('input', status);
+				this[param1] = status;
+				if (this.timer) {
+					clearTimeout(this.timer);
+				}
+				this.timer = setTimeout(
+					() => {
+						this[param2] = status;
+						this.$emit(status ? 'open' : 'close');
+					},
+					status ? 30 : 300
+				);
+			}
+		},
+		// components:{
+		// 	uMask
+		// }
+	};
+</script>
+
+<style scoped lang="scss">
+	.u-drawer {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		overflow: hidden;
+		z-index: 999;
+		background-color: rgba(0, 0, 0, 0.4);
+	}
+
+	.u-drawer-content {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		position: absolute;
+		z-index: 1003;
+		transition: all 0.25s linear;
+	}
+
+	.u-drawer-left {
+		top: 0;
+		bottom: 0;
+		left: 0;
+		background-color: #ffffff;
+	}
+
+	.u-drawer-right {
+		right: 0;
+		top: 0;
+		bottom: 0;
+		background-color: #ffffff;
+	}
+
+	.u-drawer-top {
+		top: 0;
+		left: 0;
+		right: 0;
+		background-color: #ffffff;
+	}
+
+	.u-drawer-bottom {
+		bottom: 0;
+		left: 0;
+		right: 0;
+		background-color: #ffffff;
+	}
+
+	.u-drawer-center {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		flex-direction: column;
+		/* #endif */
+		bottom: 0;
+		left: 0;
+		right: 0;
+		top: 0;
+		justify-content: center;
+		align-items: center;
+		opacity: 0;
+		z-index: 99999;
+	}
+
+	.u-mode-center-box {
+		min-width: 100rpx;
+		min-height: 100rpx;
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		position: relative;
+		background-color: #ffffff;
+	}
+
+	.u-drawer-content-visible.u-drawer-center {
+		transform: scale(1);
+		opacity: 1;
+	}
+
+	.u-animation-zoom {
+		transform: scale(1.15);
+	}
+
+	.u-drawer-content-visible {
+		transform: translate3D(0px, 0px, 0px) !important;
+	}
+
+	.u-drawer-mask {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		opacity: 0;
+		position: absolute;
+		top: 0;
+		left: 0;
+		bottom: 0;
+		right: 0;
+		background-color: rgba(0, 0, 0, 0.4);
+		transition: opacity 0.25s;
+	}
+
+	.u-drawer-mask-visible {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		opacity: 1;
+	}
+</style>

+ 33 - 0
common/othCom/xb-copy/uni-copy.js

@@ -0,0 +1,33 @@
+export default function uniCopy(content) {
+	/**
+	 * 小程序端 和 app端的复制逻辑
+	 */
+	//#ifndef H5
+	uni.setClipboardData({
+		data: content,
+		success: function() {
+			console.log('success');
+			return true
+		}
+	});
+	//#endif
+	
+	/**
+	 * H5端的复制逻辑
+	 */
+	// #ifdef H5
+	if (!document.queryCommandSupported('copy')) { //为了兼容有些浏览器 queryCommandSupported 的判断
+		// 不支持
+		return false
+	}
+	let textarea = document.createElement("textarea")
+	textarea.value = content
+	textarea.readOnly = "readOnly"
+	document.body.appendChild(textarea)
+	textarea.select() // 选择对象
+	textarea.setSelectionRange(0, content.length) //核心
+	let result = document.execCommand("copy") // 执行浏览器复制命令
+	textarea.remove()
+	return result
+	// #endif
+}

+ 76 - 0
common/tool/comJs.js

@@ -0,0 +1,76 @@
+
+const common = {
+	a: 123,
+	//简单时间格式化
+	//使用方法 供新手参考 :
+	// 在vue文件中 import { dateFormat } from '@/js_sdk/common.js'
+	//let date = new Date();
+	// dateFormat("YYYY-mm-dd HH:mm",date)
+	fmt: (fmt, date) => {
+		let ret;
+		const opt = {
+			"Y+": date.getFullYear().toString(), // 年
+			"m+": (date.getMonth() + 1).toString(), // 月
+			"d+": date.getDate().toString(), // 日
+			"H+": date.getHours().toString(), // 时
+			"M+": date.getMinutes().toString(), // 分
+			"S+": date.getSeconds().toString() // 秒
+			// 有其他格式化字符需求可以继续添加,必须转化成字符串
+		};
+		for (let k in opt) {
+			ret = new RegExp("(" + k + ")").exec(fmt);
+			if (ret) {
+				fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
+			};
+		};
+		return fmt;
+	},
+	//datetime 格式为2019-11-22 12:23:59样式
+	timeago: (datetime) => { //dateTimeStamp是一个时间毫秒,注意时间戳是秒的形式,在这个毫秒的基础上除以1000,就是十位数的时间戳。13位数的都是时间毫秒。
+		var dateTimeStamp = new Date(datetime.replace(/ /, 'T')).getTime() - 8 * 60 * 60 * 1000; //这里要减去中国的时区8小时
+		var minute = 1000 * 60; //把分,时,天,周,半个月,一个月用毫秒表示
+		var hour = minute * 60;
+		var day = hour * 24;
+		var week = day * 7;
+		var halfamonth = day * 15;
+		var month = day * 30;
+		var now = new Date().getTime(); //获取当前时间毫秒
+		var diffValue = now - dateTimeStamp; //时间差
+
+		if (diffValue < 0) {
+			console.log("diffValue<0", datetime, dateTimeStamp, now, diffValue);
+			return '刚刚';
+		}
+		var minC = diffValue / minute; //计算时间差的分,时,天,周,月
+		var hourC = diffValue / hour;
+		var dayC = diffValue / day;
+		var weekC = diffValue / week;
+		var monthC = diffValue / month;
+		var result = "2";
+		if (monthC >= 1 && monthC <= 3) {
+			result = " " + parseInt(monthC) + "月前"
+		} else if (weekC >= 1 && weekC <= 3) {
+			result = " " + parseInt(weekC) + "周前"
+		} else if (dayC >= 1 && dayC <= 6) {
+			result = " " + parseInt(dayC) + "天前"
+		} else if (hourC >= 1 && hourC <= 23) {
+			result = " " + parseInt(hourC) + "小时前"
+		} else if (minC >= 1 && minC <= 59) {
+			result = " " + parseInt(minC) + "分钟前"
+		} else if (diffValue >= 0 && diffValue <= minute) {
+			result = "刚刚"
+		} else {
+			var datetime = new Date();
+			datetime.setTime(dateTimeStamp);
+			var Nyear = datetime.getFullYear(); {}
+			var Nmonth = datetime.getMonth() + 1 < 10 ? "0" + (datetime.getMonth() + 1) : datetime.getMonth() + 1;
+			var Ndate = datetime.getDate() < 10 ? "0" + datetime.getDate() : datetime.getDate();
+			var Nhour = datetime.getHours() < 10 ? "0" + datetime.getHours() : datetime.getHours();
+			var Nminute = datetime.getMinutes() < 10 ? "0" + datetime.getMinutes() : datetime.getMinutes();
+			var Nsecond = datetime.getSeconds() < 10 ? "0" + datetime.getSeconds() : datetime.getSeconds();
+			result = Nyear + "-" + Nmonth + "-" + Ndate
+		}
+		return result;
+	},
+}
+export default common

+ 147 - 0
common/tool/pathToBase64.js

@@ -0,0 +1,147 @@
+function getLocalFilePath(path) {
+    if (path.indexOf('_www') === 0 || path.indexOf('_doc') === 0 || path.indexOf('_documents') === 0 || path.indexOf('_downloads') === 0) {
+        return path
+    }
+    if (path.indexOf('file://') === 0) {
+        return path
+    }
+    if (path.indexOf('/storage/emulated/0/') === 0) {
+        return path
+    }
+    if (path.indexOf('/') === 0) {
+        var localFilePath = plus.io.convertAbsoluteFileSystem(path)
+        if (localFilePath !== path) {
+            return localFilePath
+        } else {
+            path = path.substr(1)
+        }
+    }
+    return '_www/' + path
+}
+
+export function pathToBase64(path) {
+    return new Promise(function(resolve, reject) {
+        if (typeof window === 'object' && 'document' in window) {
+            if (typeof FileReader === 'function') {
+                var xhr = new XMLHttpRequest()
+                xhr.open('GET', path, true)
+                xhr.responseType = 'blob'
+                xhr.onload = function() {
+                    if (this.status === 200) {
+                        let fileReader = new FileReader()
+                        fileReader.onload = function(e) {
+                            resolve(e.target.result)
+                        }
+                        fileReader.onerror = reject
+                        fileReader.readAsDataURL(this.response)
+                    }
+                }
+                xhr.onerror = reject
+                xhr.send()
+                return
+            }
+            var canvas = document.createElement('canvas')
+            var c2x = canvas.getContext('2d')
+            var img = new Image
+            img.onload = function() {
+                canvas.width = img.width
+                canvas.height = img.height
+                c2x.drawImage(img, 0, 0)
+                resolve(canvas.toDataURL())
+                canvas.height = canvas.width = 0
+            }
+            img.onerror = reject
+            img.src = path
+            return
+        }
+        if (typeof plus === 'object') {
+            plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) {
+                entry.file(function(file) {
+                    var fileReader = new plus.io.FileReader()
+                    fileReader.onload = function(data) {
+                        resolve(data.target.result)
+                    }
+                    fileReader.onerror = function(error) {
+                        reject(error)
+                    }
+                    fileReader.readAsDataURL(file)
+                }, function(error) {
+                    reject(error)
+                })
+            }, function(error) {
+                reject(error)
+            })
+            return
+        }
+        if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
+            wx.getFileSystemManager().readFile({
+                filePath: path,
+                encoding: 'base64',
+                success: function(res) {
+                    resolve('data:image/png;base64,' + res.data)
+                },
+                fail: function(error) {
+                    reject(error)
+                }
+            })
+            return
+        }
+        reject(new Error('not support'))
+    })
+}
+
+export function base64ToPath(base64) {
+    return new Promise(function(resolve, reject) {
+        if (typeof window === 'object' && 'document' in window) {
+            base64 = base64.split(',')
+            var type = base64[0].match(/:(.*?);/)[1]
+            var str = atob(base64[1])
+            var n = str.length
+            var array = new Uint8Array(n)
+            while (n--) {
+                array[n] = str.charCodeAt(n)
+            }
+            return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([array], { type: type })))
+        }
+        var extName = base64.match(/data\:\S+\/(\S+);/)
+        if (extName) {
+            extName = extName[1]
+        } else {
+            reject(new Error('base64 error'))
+        }
+        var fileName = Date.now() + '.' + extName
+        if (typeof plus === 'object') {
+            var bitmap = new plus.nativeObj.Bitmap('bitmap' + Date.now())
+            bitmap.loadBase64Data(base64, function() {
+                var filePath = '_doc/uniapp_temp/' + fileName
+                bitmap.save(filePath, {}, function() {
+                    bitmap.clear()
+                    resolve(filePath)
+                }, function(error) {
+                    bitmap.clear()
+                    reject(error)
+                })
+            }, function(error) {
+                bitmap.clear()
+                reject(error)
+            })
+            return
+        }
+        if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
+            var filePath = wx.env.USER_DATA_PATH + '/' + fileName
+            wx.getFileSystemManager().writeFile({
+                filePath: filePath,
+                data: base64.replace(/^data:\S+\/\S+;base64,/, ''),
+                encoding: 'base64',
+                success: function() {
+                    resolve(filePath)
+                },
+                fail: function(error) {
+                    reject(error)
+                }
+            })
+            return
+        }
+        reject(new Error('not support'))
+    })
+}

+ 146 - 0
common/tool/tools.js

@@ -0,0 +1,146 @@
+export default {
+	/**
+	 * @param {Array}  rows
+	 * @param {Object} filter
+	 */
+	find_rows(rows, filter, return_index = true) {
+		for (let i = 0; i < rows.length; i ++) {
+			let res = true
+			let item = rows[i]
+			for (let key in filter) {
+				if (item[key] != filter[key]) res = false
+			}
+			if (res) return return_index ? index : item
+		}
+		return return_index ? -1 : null
+	},
+	
+	//设置cookie
+	setCookie: function (cname, cvalue, exdays) {
+		var d = new Date();
+		d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
+		var expires = "expires=" + d.toUTCString();
+		document.cookie = cname + "=" + cvalue + "; " + expires;
+		console.info(document.cookie);
+	},
+	//获取cookie
+	getCookie: function (cname) {
+		var name = cname + "=";
+		var ca = document.cookie.split(';');
+		for (var i = 0; i < ca.length; i++) {
+			var c = ca[i];
+			while (c.charAt(0) == ' ') c = c.substring(1);
+			if (c.indexOf(name) != -1) return c.substring(name.length, c.length);
+		}
+		return "";
+	},
+	//清除cookie
+	clearCookie: function (cname) {
+		this.setCookie(cname, "", -1);
+	},
+	getPlatform: function() {
+		let platform = uni.getSystemInfoSync().platform;
+		
+		// #ifdef H5 
+		if (window.navigator && window.navigator.userAgent) {
+			const ua = window.navigator.userAgent.toLowerCase()
+			if (ua.match(/MicroMessenger/i) == 'micromessenger') {
+				platform = 'WX-H5'
+			} else platform = 'H5'
+		}
+		// #endif
+		// #ifdef MP-WEIXIN
+		platform = 'MP-WEIXIN'
+		// #endif
+		// #ifdef MP-ALIPAY
+		platform = 'MP-ALIPAY'
+		// #endif
+		// #ifdef MP-BAIDU
+		platform = 'MP-BAIDU'
+		// #endif
+		return platform
+	},
+	has_addon(name) {
+		let appInfo = uni.getStorageSync('appInfo')
+		if (!appInfo) return false
+		if (!appInfo.plugins) return false
+		if (appInfo.plugins.indexOf(name) != -1) return true
+		return false
+	},
+	queryStringify(obj) {
+		let res = []
+		for (let k in obj) {
+			res.push(`${k}=${obj[k]}`)
+		}
+		return res.join('&')
+	},
+	// #ifdef H5
+	//获取指定form中的所有的<input>对象  
+	getElements(formId) {  
+	  var form = document.getElementById(formId);  
+	  var elements = new Array();  
+	  var tagElements = form.getElementsByTagName('input');  
+	  for (var j = 0; j < tagElements.length; j++){ 
+	     elements.push(tagElements[j]); 
+	  
+	  } 
+	  return elements;  
+	},
+	  
+	//获取单个input中的【name,value】数组 
+	inputSelector(element) {  
+	 if (element.checked)  
+	   return [element.name, element.value];  
+	},
+	    
+	input(element) {  
+	  switch (element.type.toLowerCase()) {  
+	   case 'submit':  
+	   case 'hidden':  
+	   case 'password':  
+	   case 'text':  
+	    return [element.name, element.value];  
+	   case 'checkbox':  
+	   case 'radio':  
+	    return this.inputSelector(element);  
+	  }  
+	  return false;  
+	},
+	  
+	//组合URL 
+	serializeElement(element) {  
+	  var method = element.tagName.toLowerCase();  
+	  var parameter = this.input(element);  
+	   
+	  if (parameter) {  
+	   var key = encodeURIComponent(parameter[0]);  
+	   if (key.length == 0) return;  
+	   
+	   if (parameter[1].constructor != Array)  
+	    parameter[1] = [parameter[1]];  
+	      
+	   var values = parameter[1];  
+	   var results = [];  
+	   for (var i=0; i<values.length; i++) {  
+	    results.push(key + '=' + encodeURIComponent(values[i]));  
+	   }  
+	   return results.join('&');  
+	  }  
+	 },
+	  
+	//调用方法   
+	serializeForm(formId) {
+		console.log(123123);
+	  var elements = this.getElements(formId);  
+	  var queryComponents = new Array();  
+	   
+	  for (var i = 0; i < elements.length; i++) {  
+	   var queryComponent = this.serializeElement(elements[i]);  
+	   if (queryComponent)  
+	    queryComponents.push(queryComponent);  
+	  }
+	   
+	  return queryComponents.join('&'); 
+	},
+	// #endif
+}

+ 362 - 0
common/tool/util.js

@@ -0,0 +1,362 @@
+function formatTime(time) {
+	if (typeof time !== 'number' || time < 0) {
+		return time
+	}
+
+	var hour = parseInt(time / 3600)
+	time = time % 3600
+	var minute = parseInt(time / 60)
+	time = time % 60
+	var second = time
+
+	return ([hour, minute, second]).map(function(n) {
+		n = n.toString()
+		return n[1] ? n : '0' + n
+	}).join(':')
+}
+
+function formatLocation(longitude, latitude) {
+	if (typeof longitude === 'string' && typeof latitude === 'string') {
+		longitude = parseFloat(longitude)
+		latitude = parseFloat(latitude)
+	}
+
+	longitude = longitude.toFixed(2)
+	latitude = latitude.toFixed(2)
+
+	return {
+		longitude: longitude.toString().split('.'),
+		latitude: latitude.toString().split('.')
+	}
+}
+
+function distanceByLnglat(lat1, lng1, lat2, lng2) {
+	var radLat1 = lat1 * Math.PI / 180.0;
+	var radLat2 = lat2 * Math.PI / 180.0;
+	var a = radLat1 - radLat2;
+	var b = lng1 * Math.PI / 180.0 - lng2 * Math.PI / 180.0;
+	var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math
+		.sin(b / 2), 2)));
+	s = s * 6378.137;
+	s = Math.round(s * 10000) / 10000;
+	return s
+};
+
+var dateUtils = {
+	UNITS: {
+		'年': 31557600000,
+		'月': 2629800000,
+		'天': 86400000,
+		'小时': 3600000,
+		'分钟': 60000,
+		'秒': 1000
+	},
+	humanize: function(milliseconds) {
+		var humanize = '';
+		for (var key in this.UNITS) {
+			if (milliseconds >= this.UNITS[key]) {
+				humanize = Math.floor(milliseconds / this.UNITS[key]) + key + '前';
+				break;
+			}
+		}
+		return humanize || '刚刚';
+	},
+
+	format: function(dateStr) {
+		// var date = this.parse(dateStr)
+		var date = dateStr;
+		var diff = Date.now() - date.getTime();
+		if (diff < this.UNITS['天']) {
+			return this.humanize(diff);
+		}
+		var _format = function(number) {
+			return (number < 10 ? ('0' + number) : number);
+		};
+		return date.getFullYear() + '/' + _format(date.getMonth() + 1) + '/' + _format(date.getDay()) + '-' +
+			_format(date.getHours()) + ':' + _format(date.getMinutes());
+	},
+
+	parse: function(str) { //将"yyyy-mm-dd HH:MM:ss"格式的字符串,转化为一个Date对象
+		var a = str.split(/[^0-9]/);
+		return new Date(a[0], a[1] - 1, a[2], a[3], a[4], a[5]);
+	}
+};
+
+var currentFormatDate = {
+	formatDate: function(nows, type) {
+		var now = new Date(nows * 1000);
+		var year = now.getFullYear(); //取得4位数的年份
+		var month = now.getMonth() + 1; //取得日期中的月份,其中0表示1月,11表示12月
+		var date = now.getDate(); //返回日期月份中的天数(1到31)
+		var hour = now.getHours(); //返回日期中的小时数(0到23)
+		var minute = now.getMinutes(); //返回日期中的分钟数(0到59)
+		var second = now.getSeconds(); //返回日期中的秒数(0到59)
+		// return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
+		if (type == 1) {
+			return year + "-" + this._format(month) + "-" + this._format(date);
+		} else {
+			return year + "-" + this._format(month) + "-" + this._format(date) + " " + this._format(hour) +
+				":" + this._format(
+					minute);
+		}
+	},
+
+	_format: function(number) {
+		return (number < 10 ? ('0' + number) : number);
+	},
+}
+
+var formatDates = {
+	formatDate: function(nows) {
+		var now = new Date(nows * 1000);
+		var year = now.getFullYear(); //取得4位数的年份
+		var month = now.getMonth() + 1; //取得日期中的月份,其中0表示1月,11表示12月
+		var date = now.getDate(); //返回日期月份中的天数(1到31)
+		var hour = now.getHours(); //返回日期中的小时数(0到23)
+		var minute = now.getMinutes(); //返回日期中的分钟数(0到59)
+		var second = now.getSeconds(); //返回日期中的秒数(0到59)
+		// return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
+		// return year + "-" + this._format(month) + "-" + this._format(date) + " " + this._format(hour) + ":" + this._format(
+		// 	minute);
+
+		return this._format(month) + "/" + this._format(date) + " " + this._format(hour) + ":" + this._format(
+			minute);
+	},
+
+	_format: function(number) {
+		return (number < 10 ? ('0' + number) : number);
+	},
+}
+
+function getNumber(num, total) {
+	var num = parseFloat(num);
+	var total = parseFloat(total);
+	if (isNaN(num) || isNaN(total)) {
+		return;
+	}
+	return (Math.round((total - num) / total * 100))
+}
+
+var getUrlArgs = function() {
+	// var argStr = window.location.href ? window.location.href.substring(1) : "";
+	var argStr = window.location.search ? window.location.search.substring(1) : "";
+	var argObj = {},
+		item = null,
+		value = null,
+		key = null,
+		argArr = argStr.length > 0 ? argStr.split("&") : [];
+	for (var i = 0, len = argArr.length; i < len; i++) {
+		item = argArr[i].split("=");
+		key = item[0];
+		value = item[1];
+		argObj[key] = value;
+	}
+	return argObj;
+}
+
+let _debounceTimeout = null,
+	_throttleRunning = false
+
+/**
+ * 防抖
+ * @param {Function} 执行函数
+ * @param {Number} delay 延时ms   
+ */
+export const debounce = (fn, delay = 500) => {
+	clearTimeout(_debounceTimeout);
+	_debounceTimeout = setTimeout(() => {
+		fn();
+	}, delay);
+}
+
+/**
+ * 节流
+ * @param {Function} 执行函数
+ * @param {Number} delay 延时ms  
+ */
+const throttle = (fn, delay = 500) => {
+	if (_throttleRunning) {
+		return;
+	}
+	_throttleRunning = true;
+	fn();
+	setTimeout(() => {
+		_throttleRunning = false;
+	}, delay);
+}
+
+/**
+ * 检查登录
+ * @return {Boolean}
+ */
+export const isLogin = (options = {}) => {
+	const token = uni.getStorageSync('token');
+	if (token) {
+		return true;
+	}
+	if (options.nav !== false) {
+		uni.navigateTo({
+			url: '/pages/auth/login'
+		})
+	}
+	return false;
+}
+
+/**
+ * 获取页面栈
+ * @param {Number} preIndex为1时获取上一页
+ * @return {Object} 
+ */
+const prePage = (preIndex = 1) => {
+	const pages = getCurrentPages();
+	const prePage = pages[pages.length - (preIndex + 1)];
+
+	return prePage.$vm;
+}
+
+/**
+ * 格式化时间戳 Y-m-d H:i:s
+ * @param {String} format Y-m-d H:i:s
+ * @param {Number} timestamp 时间戳   
+ * @return {String}
+ */
+export const date = (format, timeStamp) => {
+	if ('' + timeStamp.length <= 10) {
+		timeStamp = +timeStamp * 1000;
+	} else {
+		timeStamp = +timeStamp;
+	}
+	let _date = new Date(timeStamp),
+		Y = _date.getFullYear(),
+		m = _date.getMonth() + 1,
+		d = _date.getDate(),
+		H = _date.getHours(),
+		i = _date.getMinutes(),
+		s = _date.getSeconds();
+
+	m = m < 10 ? '0' + m : m;
+	d = d < 10 ? '0' + d : d;
+	H = H < 10 ? '0' + H : H;
+	i = i < 10 ? '0' + i : i;
+	s = s < 10 ? '0' + s : s;
+
+	return format.replace(/[YmdHis]/g, key => {
+		return {
+			Y,
+			m,
+			d,
+			H,
+			i,
+			s
+		} [key];
+	});
+}
+
+//二维数组去重
+export const getUnique = array => {
+	let obj = {}
+	return array.filter((item, index) => {
+		let newItem = item + JSON.stringify(item)
+		return obj.hasOwnProperty(newItem) ? false : obj[newItem] = true
+	})
+}
+
+// 判断类型集合
+const checkStr = (str, type) => {
+	switch (type) {
+		case 'mobile': //手机号码
+			return /^1[3|4|5|6|7|8|9][0-9]{9}$/.test(str);
+		case 'tel': //座机
+			return /^(0\d{2,3}-\d{7,8})(-\d{1,4})?$/.test(str);
+		case 'card': //身份证
+			return /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(str);
+		case 'mobileCode': //6位数字验证码
+			return /^[0-9]{6}$/.test(str)
+		case 'pwd': //密码以字母开头,长度在6~18之间,只能包含字母、数字和下划线
+			return /^([a-zA-Z0-9_]){6,18}$/.test(str)
+		case 'payPwd': //支付密码 6位纯数字
+			return /^[0-9]{6}$/.test(str)
+		case 'postal': //邮政编码
+			return /[1-9]\d{5}(?!\d)/.test(str);
+		case 'QQ': //QQ号
+			return /^[1-9][0-9]{4,9}$/.test(str);
+		case 'email': //邮箱
+			return /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(str);
+		case 'money': //金额(小数点2位)
+			return /^\d*(?:\.\d{0,2})?$/.test(str);
+		case 'URL': //网址
+			return /(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/.test(str)
+		case 'IP': //IP
+			return /((?:(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d))/.test(str);
+		case 'date': //日期时间
+			return /^(\d{4})\-(\d{2})\-(\d{2}) (\d{2})(?:\:\d{2}|:(\d{2}):(\d{2}))$/.test(str) ||
+				/^(\d{4})\-(\d{2})\-(\d{2})$/
+				.test(str)
+		case 'number': //数字
+			return /^[0-9]$/.test(str);
+		case 'english': //英文
+			return /^[a-zA-Z]+$/.test(str);
+		case 'chinese': //中文
+			return /^[\\u4E00-\\u9FA5]+$/.test(str);
+		case 'lower': //小写
+			return /^[a-z]+$/.test(str);
+		case 'upper': //大写
+			return /^[A-Z]+$/.test(str);
+		case 'HTML': //HTML标记
+			return /<("[^"]*"|'[^']*'|[^'">])*>/.test(str);
+		default:
+			return true;
+	}
+}
+
+/**
+ * toast
+ */
+export const msg = (title = '', param = {}) => {
+	if (!title) return;
+	uni.showToast({
+		title,
+		duration: param.duration || 1500,
+		mask: param.mask || false,
+		icon: param.icon || 'none'
+	});
+}
+
+/**
+ * getDate
+ */
+export const getDate = (type) => {
+	const date = new Date();
+
+	let year = date.getFullYear();
+	let month = date.getMonth() + 1;
+	let day = date.getDate();
+
+	if (type === 'start') {
+		year = year - 10;
+	} else if (type === 'end') {
+		year = year + 10;
+	}
+	month = month > 9 ? month : '0' + month;;
+	day = day > 9 ? day : '0' + day;
+
+	return `${year}-${month}-${day}`;
+}
+
+module.exports = {
+	formatTime: formatTime,
+	formatLocation: formatLocation,
+	distanceByLnglat: distanceByLnglat,
+	dateUtils: dateUtils,
+	getNumber: getNumber,
+	currentFormatDate: currentFormatDate,
+	getUrlArgs: getUrlArgs,
+	checkStr: checkStr,
+	throttle: throttle,
+	isLogin: isLogin,
+	debounce: debounce,
+	prePage: prePage,
+	date: date,
+	msg: msg,
+	getDate: getDate
+}

+ 133 - 0
common/tool/validate.js

@@ -0,0 +1,133 @@
+/**
+数据验证(表单验证)
+
+1. string
+功能 : 字符串及长度检查
+规则 : 最小长度,最大长度 如 1,3 或 2, 2,代表只检查最短
+2. int
+功能 : 整数及长度检查
+规则 : 最小长度,最大长度 如 1,3
+3. between
+功能 : 数值区间检查
+规则 : 最小值,最大值 如 1,3 或 2.5,1000
+4. betweenD
+功能 : 数值区间检查【整数】
+规则 : 最小值,最大值 如 1,3 或 2,1000
+5. same
+功能 : 等值检查
+规则 : 对应的值
+6. notsame
+功能 : 不等值检查
+规则 : 对应的值
+7. email
+功能 : 邮箱检查
+规则 : 无需设置
+8. phoneno
+功能 : 11位手机号检查
+规则 : 无需设置
+9. zipcode
+功能 : 6位邮编检查
+规则 : 无需设置
+10. reg
+功能 : 正则表达式检查
+规则 : 正则表达式内容 如 "^[0-9]{1,2}$"
+11. in
+功能 : 包含某个字符串的检查
+规则 : 字符串集,如:"北京,上海"
+12. notnull
+功能 : 不为空检查【null 或者 空数组】
+规则 : 无需设置
+*/
+module.exports = {
+	error:'',
+	check : function (data, rule){
+		for(var i = 0; i < rule.length; i++){
+			if (!rule[i].checkType){return true;}
+			if (!rule[i].name) {return true;}
+			if (!rule[i].errorMsg) {return true;}
+			if (!data[rule[i].name]) {this.error = rule[i].errorMsg; return false;}
+			switch (rule[i].checkType){
+				case 'string':
+					var reg = new RegExp('^.{' + rule[i].checkRule + '}$');
+					if(!reg.test(data[rule[i].name])) {this.error = rule[i].errorMsg; return false;}
+				break;
+				case 'int':
+					var reg = new RegExp('^(-[1-9]|[1-9])[0-9]{' + rule[i].checkRule + '}$');
+					if(!reg.test(data[rule[i].name])) {this.error = rule[i].errorMsg; return false;}
+					break;
+				break;
+				case 'between':
+					if (!this.isNumber(data[rule[i].name])){
+						this.error = rule[i].errorMsg;
+						return false;
+					}
+					var minMax = rule[i].checkRule.split(',');
+					minMax[0] = Number(minMax[0]);
+					minMax[1] = Number(minMax[1]);
+					if (data[rule[i].name] > minMax[1] || data[rule[i].name] < minMax[0]) {
+						this.error = rule[i].errorMsg;
+						return false;
+					}
+				break;
+				case 'betweenD':
+					var reg = /^-?[1-9][0-9]?$/;
+					if (!reg.test(data[rule[i].name])) { this.error = rule[i].errorMsg; return false; }
+					var minMax = rule[i].checkRule.split(',');
+					minMax[0] = Number(minMax[0]);
+					minMax[1] = Number(minMax[1]);
+					if (data[rule[i].name] > minMax[1] || data[rule[i].name] < minMax[0]) {
+						this.error = rule[i].errorMsg;
+						return false;
+					}
+				break;
+				case 'betweenF': 
+					var reg = /^-?[0-9][0-9]?.+[0-9]+$/;
+					if (!reg.test(data[rule[i].name])){this.error = rule[i].errorMsg; return false;}
+					var minMax = rule[i].checkRule.split(',');
+					minMax[0] = Number(minMax[0]);
+					minMax[1] = Number(minMax[1]);
+					if (data[rule[i].name] > minMax[1] || data[rule[i].name] < minMax[0]) {
+						this.error = rule[i].errorMsg;
+						return false;
+					}
+				break;
+				case 'same':
+					if (data[rule[i].name] != rule[i].checkRule) { this.error = rule[i].errorMsg; return false;}
+				break;
+				case 'notsame':
+					if (data[rule[i].name] == rule[i].checkRule) { this.error = rule[i].errorMsg; return false; }
+				break;
+				case 'email':
+					var reg = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
+					if (!reg.test(data[rule[i].name])) { this.error = rule[i].errorMsg; return false; }
+				break;
+				case 'phoneno':
+					var reg = /^1[0-9]{10,10}$/;
+					if (!reg.test(data[rule[i].name])) { this.error = rule[i].errorMsg; return false; }
+				break;
+				case 'zipcode':
+					var reg = /^[0-9]{6}$/;
+					if (!reg.test(data[rule[i].name])) { this.error = rule[i].errorMsg; return false; }
+				break;
+				case 'reg':
+					var reg = new RegExp(rule[i].checkRule);
+					if (!reg.test(data[rule[i].name])) { this.error = rule[i].errorMsg; return false; }
+				break;
+				case 'in':
+					if(rule[i].checkRule.indexOf(data[rule[i].name]) == -1){
+						this.error = rule[i].errorMsg; return false;
+					}
+				break;
+				case 'notnull':
+					if(data[rule[i].name] == null || data[rule[i].name].length < 1){this.error = rule[i].errorMsg; return false;}
+				break;
+			}
+		}
+		return true;
+	},
+	isNumber : function (checkVal){
+		checkVal = Number(checkVal);
+		if(checkVal == NaN){return false;}
+		return true;
+	}
+}

+ 122 - 0
common/tool/wxApi.js

@@ -0,0 +1,122 @@
+// #ifdef H5
+import wx from 'weixin-js-sdk'
+const wxApi = {
+	/*
+	 * [isweixin 判断是否微信浏览器]
+	 */
+	isweixin() {
+		const ua = window.navigator.userAgent.toLowerCase()
+		if (ua.match(/MicroMessenger/i) == 'micromessenger') {
+			return true
+		} else {
+			return false
+		}
+	},
+
+	/*
+	 * getConfigRes: 获取config微信配置
+	 */
+	getConfigRes(title, imgUrl, desc) {
+		// TODO:
+		let that = this;
+		let url = window.location.href.split('#')[0] + '?#' + window.location.href.split('#')[1];
+		// jssdkConfig(window.location.href.split('#')[0]).then(res => {
+		// 	if (res) {
+		// 		let wechatConfig = res.config;
+		// 		that.wxRegister(wechatConfig, title, imgUrl, desc);
+		// 	}
+		// })
+	},
+
+	/*
+	 * [wxRegister 微信Api初始化]
+	 * @param  {Function} callback [ready回调函数]
+	 */
+	wxRegister(config, title, imgUrl, desc, url, callback) {		
+		wx.config({
+			debug: false, // 开启调试模式
+			appId: config.app_id, // 必填,公众号的唯一标识
+			timestamp: config.timestamp, // 必填,生成签名的时间戳
+			nonceStr: config.nonceStr, // 必填,生成签名的随机串
+			signature: config.signature, // 必填,签名,见附录1
+			jsApiList: [
+				'onMenuShareTimeline', // 获取“分享到朋友圈”按钮点击状态及自定义分享内容接口
+				'onMenuShareAppMessage', // 获取“分享给朋友”按钮点击状态及自定义分享内容接口
+				'onMenuShareQQ', // 获取“分享到QQ”按钮点击状态及自定义分享内容接口
+				'onMenuShareWeibo' // 获取“分享到微博”按钮点击状态及自定义分享内容接口
+			] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
+		})
+
+		wx.ready(function () {						
+			imgUrl = imgUrl ? imgUrl : '';
+			let link = url
+			desc = desc ? desc : '暂无描述';
+			wx.onMenuShareAppMessage({
+				title: title, // 分享标题
+				imgUrl: imgUrl, // 分享图标
+				desc: desc, // 分享描述
+				link: link,
+				success: function(e) {
+				},
+				cancel: function(e) {
+				},
+				error: function (e) {
+				}
+			})
+
+			wx.onMenuShareTimeline({
+				title: title, // 分享标题
+				link: link, // 分享链接
+				imgUrl: imgUrl, // 分享图标
+				success(e) {
+					// 用户成功分享后执行的回调函数
+				},
+				cancel(e) {
+					// 用户取消分享后执行的回调函数
+				},
+				error(e) {
+				}
+			})
+
+			wx.onMenuShareQQ({
+				title: title, // 分享标题
+				link: link, // 分享链接
+				imgUrl: imgUrl, // 分享图标
+				desc: desc,
+				success() {
+					// 用户成功分享后执行的回调函数
+				},
+				cancel() {
+					// 用户取消分享后执行的回调函数
+				}
+			})
+
+			wx.onMenuShareWeibo({
+				title: title, // 分享标题
+				link: link, // 分享链接
+				imgUrl: imgUrl, // 分享图标
+				success() {
+					// 用户成功分享后执行的回调函数
+				},
+				cancel() {
+					// 用户取消分享后执行的回调函数
+				}
+			})
+		});
+
+		wx.error(res => {
+			// alert('验证失败的信息:' + res.errMsg);
+			console.log(res, 'error');
+		});
+	},
+	redirectUrl(url) {
+		return location.origin + location.pathname + encodeURIComponent(url);
+	}
+}
+
+export default wxApi
+// #endif
+
+// #ifndef H5
+export default {}
+// #endif

File diff suppressed because it is too large
+ 9 - 0
components/number-keyboard/number-keyboard.vue


+ 84 - 0
components/pay-password-keyboard/pay-password-keyboard.vue

@@ -0,0 +1,84 @@
+<template>
+	<u-popup :show="showPass" round borderRadius="12" :closeOnClickOverlay='true' @close="close" mode="center">
+		<view class="payBox dffd">
+			<view class="title">请输入支付密码</view>
+			<!-- <view class="bold prosecond">333学豆</view> -->
+			<view class="bb dffs type">
+				<image src="/static/img/pro/payxd.png" mode=""></image>
+				<text class="fontbase textgrey">学豆支付</text>
+			</view>
+			<view class="payText">
+				<u-code-input :space="0" v-model='value' @finish="finish" dot hairline focus></u-code-input>
+			</view>
+			<navigator url="/pages/user/mine/userInfo" class="blue">忘记密码</navigator>
+		</view>
+	</u-popup>
+</template>
+
+<script>
+export default {
+	props: {
+		money: {
+			type: Number,
+			default: 0 //支付钱
+		},
+		showPass: {
+			type: Boolean,
+			default: false //显示支付
+		}
+	},
+	data() {
+		return { 
+			value: '',
+			payType: 1 //显示支付
+		};
+	},
+	methods: { 
+		finish(e) {
+			console.log('输入结束,当前值为:' + e);
+			this.$emit('getPass', this.value); //this.value为向父组件传递的数据
+			this.value='';
+		},
+		close() {
+			console.log(1);
+			this.$emit('close');
+		}, 
+	}
+};
+</script>
+
+<style lang="scss">
+.payPop {
+}
+.payBox {
+	width: 559rpx;
+	// min-height: 65vh;
+	justify-content: flex-start;
+	align-items: center;
+	padding: 30rpx;
+	.title {
+		width: 100%;
+		text-align: center;
+		font-size: 30rpx; 
+	}
+	.prosecond {
+		font-size: 42rpx;
+		margin: 30rpx 0 40rpx;
+	}
+	.type {
+		width: 100%;
+		padding: 18rpx 23rpx;
+		image {
+			width: 41rpx;
+			height: 41rpx;
+			margin-right: 16rpx;
+		}
+	}
+	.payText {
+		margin: 30rpx 0;
+	}
+	.blue {
+		color: #188be2;
+	}
+}
+</style>

+ 85 - 0
components/shopList.vue

@@ -0,0 +1,85 @@
+<template>
+	<view class="box">
+		<view v-if="flag == 1" class="dffs boxlist">
+			<view @click="nextTo(item)" class="vidLi" v-for="(item, ind) in list" :key="ind">
+				<image :src="item.goods_img" mode=""></image>
+				<view class="title elli">{{ item.goods_name }}</view>
+				<view class="tips dfsb">
+					<view class="priceDan">{{ item.goods_price }}</view>
+					<view class="fontssm textgrey ">{{ item.sale_num }}人付款</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {};
+	},
+	props: {
+		list: {
+			type: Array,
+			default: []
+		},
+		flag: {
+			type: [String, Number],
+			default: 1
+		}
+	},
+	methods: {
+		nextTo(item) {
+			uni.navigateTo({
+				url: '/pagesA/mall/info?flag=1&id='+item.goods_id
+			});
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.boxlist {
+	align-items: flex-start;
+	flex-wrap: wrap;
+	.vidLi {
+		margin-right: 24rpx;
+		margin-bottom: 30rpx;
+		width: 333rpx;
+		
+		&:nth-of-type(2n) {
+			margin-right: 0;
+		}
+		image {
+			width: 333rpx;
+			height: 320rpx;
+			border-radius: 10rpx;
+		}
+		.title {
+			margin: 7rpx 0 20rpx;
+			font-size: 26rpx;
+			font-family: PingFangSC-Medium, PingFang SC;
+			font-weight: 500;
+			line-height: 40rpx;
+			height: 80rpx;
+		}
+		.priceDan{
+			display:table-cell; 
+			vertical-align:bottom;
+			// line-height: none;
+			&::after{
+				content:"起";
+				font-size: 24rpx;
+				position: relative;
+				top:-2rpx;
+			}
+			&::before{
+				content:"¥";
+				font-size: 24rpx;
+				position: relative;
+				top:-2rpx;
+			}
+		}
+	}
+}
+</style>

+ 46 - 0
components/uBotton/uBotton.vue

@@ -0,0 +1,46 @@
+<template>
+	<view>
+		<u-button :shape="shape" :custom-style="customStyle" class="clickbtn" @click="submitClickEvent">认证</u-button>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		props:{
+			shape:{
+				type:String,
+				default:'circle'
+			},
+			customStyle:{
+				type:Object,
+				default:{ 
+				}
+			}
+		}, 
+		methods:{
+			submitClickEvent(){
+				this.$emit('confirm')
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+.clickbtn {
+	width: 690rpx;
+	height: 90rpx;
+	line-height: 90rpx;
+	background: #00952e;
+	font-size: 32rpx;
+	text-align: center;
+	margin: 40rpx auto 20rpx;
+	letter-spacing: 2rpx;
+	color: #fff;
+	border-radius: 45rpx;
+}
+</style>

+ 86 - 0
components/videoList.vue

@@ -0,0 +1,86 @@
+<template>
+	<view class="box">
+		<view v-if="flag == 1" class="dffs boxlist">
+			<view @click="nextTo(item)" class="vidLi" v-for="(item, ind) in list" :key="ind">
+				<view class="imgbox">
+					<image :src="item.img" mode=""></image>
+					<view class="look">{{ item.see_num }}人观看</view>
+				</view>
+				<view class="title oneelli ">{{ item.title }}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {};
+	},
+	props: {
+		list: {
+			type: Array,
+			default: []
+		},
+		flag: {
+			type: [String, Number],
+			default: 1
+		}
+	},
+	methods: {
+		nextTo(item) {
+			uni.navigateTo({
+				url: '/pages/index/video/videoInfo?id=' + item.id
+			});
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.boxlist {
+	align-items: flex-start;
+	width: auto;
+	overflow-x: auto;
+	&::-webkit-scrollbar {
+		display: none;
+	}
+	.vidLi {
+		background: #ffffff;
+		box-shadow: 0px 0px 20rpx 0px rgba(0, 0, 0, 0.07);
+		border-radius: 0px 0px 10rpx 10rpx;
+		margin-right: 20rpx;
+		width: 200rpx;
+		.imgbox {
+			width: 200rpx;
+			height: 200rpx;
+			position: relative;
+			image {
+				width: 200rpx;
+				height: 200rpx;
+				border-radius: 10rpx;
+			}
+			.look {
+				position: absolute;
+				bottom: 15rpx;
+				left: 19rpx;
+				background: rgba(#000, 0.3);
+				border-radius: 18rpx;
+				font-size: 20rpx;
+				line-height: 28rpx;
+				padding: 5rpx 14rpx;
+				color: #ffffff;
+				display: inline-block;
+			}
+		}
+		.title {
+			margin: 18rpx 12rpx;
+			font-size: 28rpx;
+			font-family: PingFangSC-Medium, PingFang SC;
+			font-weight: 500;
+			line-height: 40rpx;
+			height: 40rpx;
+		}
+	}
+}
+</style>

+ 98 - 0
components/y-action-sheet/y-action-sheet.vue

@@ -0,0 +1,98 @@
+<template>
+	<u-popup ref="popup" :show="show" closeable type="bottom">
+		<view class="content">
+			<view v-if="data.title" class="cell bold center title">
+				<text>{{ data.title }}</text>
+			</view>
+			<view class="cell list dfsb" @click="change(item, index)" v-for="(item, index) in data.list" :key="index">
+				<text class="flex1">{{ item.text }}</text>
+				<image v-if="sel != index" class="icon" src="/static/img/pro/wxz.png" mode=""></image>
+				<image v-if="sel == index" class="icon" src="/static/img/pro/xuanzhong.png" mode=""></image>
+			</view>
+			<view class="cell center cancel-btn" @click="confirm"><text>确定</text></view>
+		</view>
+	</u-popup>
+</template>
+
+<script>
+/**
+ * 底部选择菜单
+ */
+export default {
+	data() {
+		return {
+			show: false,
+			sel: 0,
+			selItem: 0,
+			data: {}
+		};
+	},
+	methods: {
+		change(item, ind) {
+			this.sel = ind;
+			this.selItem = item;
+		},
+		//选择回调
+		confirm() {
+			this.$util.throttle(() => {
+				this.$emit('onConfirm', this.selItem);
+			});
+			this.close();
+		},
+		open(data) {
+			this.data = data;
+			this.show = true;
+		},
+		close() {
+			this.show = false;
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.content {
+	background-color: #fff;
+	border-radius: 16rpx 16rpx 0 0;
+	overflow: hidden;
+}
+.list {
+	padding: 0 30rpx;
+}
+.cell {
+	min-height: 88rpx;
+	font-size: 32rpx;
+	color: #333;
+	position: relative;
+	width: 100%;
+
+	&:after {
+		position: absolute;
+		z-index: 3;
+		left: 0;
+		top: auto;
+		bottom: 0;
+		right: 0;
+		height: 0;
+		content: '';
+		transform: scaleY(0.5);
+	}
+	&:last-child {
+		color: #fff;
+		width: 750rpx;
+		height: 100rpx;
+		background: linear-gradient(90deg, #ffac4c 0%, #ff8a00 100%);
+		line-height: 100rpx;
+		border-top: 12rpx solid #f7f7f7;
+	}
+	&.title {
+		height: 100rpx;
+		line-height: 100rpx;
+		font-size: 36rpx;
+	}
+	.icon {
+		width: 36rpx;
+		height: 36rpx;
+	}
+}
+</style>

+ 114 - 0
components/y-modal/y-modal.vue

@@ -0,0 +1,114 @@
+<template>
+	<u-popup ref="popup" mode="center" :show= "show" border-radius='16'>
+		<view class="pop-content">
+			<text class="title">{{ title }}</text>
+			<view class="con center">
+				<text class="text">{{ text }}</text>
+			</view>
+			<view class="btn-group dfsb ">
+				<view class="btn center" @click="close">
+					<text>{{ cancelText }}</text>
+				</view>
+				<view class="btn center " @click="confirm">
+					<text class="txt">{{ confirmText }}</text>
+				</view>
+			</view>
+		</view>
+	</u-popup>
+</template>
+
+<script>
+/**
+ * 确认对话框
+ * @prop title 标题
+ * @prop text 提示内容
+ * @prop cancelText 取消按钮文字
+ * @prop confirmText 确认按钮文字
+ * @event onConfirm 确认按钮点击时触发
+ */
+export default {
+	data() {
+		return {
+			show:false,
+		};
+	},
+	props: {
+		title: String,
+		text: String,
+		cancelText: {
+			type: String,
+			default: '取消'
+		},
+		confirmText: {
+			type: String,
+			default: '确定'
+		}
+	},
+	methods: {
+		confirm() {
+			this.$emit('onConfirm');
+			this.close();
+		},
+		open() {
+			this.show=true;
+		},
+		close() {
+			this.show=false;
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.pop-content {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+	width: 616rpx;
+	padding-top: 36rpx;
+	background-color: #fff; 
+	overflow: hidden;
+	margin: 0 auto;
+
+	.title {
+		font-size: 32rpx;
+		color: #333;
+		line-height: 48rpx;
+		font-weight: 700;
+	}
+	.con {
+		padding: 36rpx 40rpx 54rpx;
+	}
+	.text {
+		width: 460rpx;
+		font-size: 26rpx;
+		color: #333;
+		line-height: 40rpx;
+		text-align: center;
+	}
+
+	.btn-group {
+		width: 100%;
+	}
+	.center {
+		text-align: center;
+	}
+
+	.btn {
+		flex: 1;
+		height: 88rpx;
+		line-height: 88rpx;
+		font-size: 32rpx;
+		color: #333;
+		background: #f6f6f6;
+
+		&:last-of-type {
+			background-color: $promain;
+			.txt {
+				color: #ffffff;
+			}
+		}
+	}
+}
+</style>

+ 82 - 0
components/y-verif/verif.vue

@@ -0,0 +1,82 @@
+<template>
+	<view>
+		<u-code ref="uCode" @change="codeChange"></u-code>
+		<view class="tips" @tap="getCode">{{ tips }}</view>
+	</view>
+</template>
+
+<script>
+export default {
+	props: { 
+		phone:{
+			type: [String,Number],
+			default: ''
+		},
+		flag:{
+			type: [String,Number],
+			default: 1
+		}
+	},
+	data() {
+		return {
+			tips:'获取验证码'
+		};
+	},
+	methods: {
+		codeChange(text) { 
+			this.tips = text;
+		},
+		getCode() {
+			console.log(Boolean(this.phone)) 
+			let phoneReg = /^(1[3-9])\d{9}$/;
+			if (!phoneReg.test(this.phone)) {
+				return this.$api.toast('手机号码不合法!');
+			}
+			if (!this.phone) {
+				return this.$api.toast('请输入手机号');
+			}
+			if (this.$refs.uCode.canGetCode) {
+				// 模拟向后端请求验证码
+				uni.showLoading({
+					title: '正在获取验证码'
+				});
+				this.$api
+					.request('common/sendSms', {
+						phone: this.phone,
+						flag: 3  ,// 1 
+					})
+					.then(data => {
+						if (data.code == '200') {
+							uni.hideLoading();
+							// 这里此提示会被this.start()方法中的提示覆盖
+							// this.$u.toast('验证码已发送');
+							// 通知验证码组件内部开始倒计时
+							this.$refs.uCode.start();
+						} else if (data.code == '204') {
+							this.$api.toast(data.msg);
+						}
+					})
+					.catch(function(error) {
+						this.$api.toast(error);
+					});
+			} else {
+				this.$u.toast('倒计时结束后再发送');
+			}
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+//yanzhengma
+.u-hairline-border[data-v-3bf2dba7]:after {
+	border: 0;
+}
+.tips {
+	padding: 0;
+	color: #0BB291;
+	font-size: 28rpx;
+	line-height: 40rpx;
+	height: 40rpx; 
+} 
+</style>

+ 14 - 0
index.html

@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
+    <title></title>
+    <!--preload-links-->
+    <!--app-context-->
+  </head>
+  <body>
+    <div id="app"><!--app-html--></div>
+    <script type="module" src="/main.js"></script>
+  </body>
+</html>

+ 37 - 0
main.js

@@ -0,0 +1,37 @@
+import App from './App'
+import store from 'store/index.js'
+
+// main.js
+import uView from '@/uni_modules/uview-ui'
+Vue.use(uView)
+
+// #ifndef VUE3
+import Vue from 'vue'
+Vue.config.productionTip = false
+App.mpType = 'app'
+const app = new Vue({
+    ...App,
+	store
+})
+app.$mount()
+// #endif
+
+
+import http from './api/httpRequest.js' 
+Vue.prototype.$api = http;
+
+import util from './common/tool/util.js' 
+Vue.prototype.$util = util;
+
+
+Vue.prototype.$store = store
+
+// #ifdef VUE3
+import { createSSRApp } from 'vue'
+export function createApp() {
+  const app = createSSRApp(App)
+  return {
+    app,store
+  }
+}
+// #endif

+ 80 - 0
manifest.json

@@ -0,0 +1,80 @@
+{
+    "name" : "教育",
+    "appid" : "__UNI__1CC2581",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
+    /* 5+App特有相关 */
+    "app-plus" : {
+        "usingComponents" : true,
+        "nvueStyleCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        /* 模块配置 */
+        "modules" : {},
+        /* 应用发布信息 */
+        "distribute" : {
+            /* android打包配置 */
+            "android" : {
+                "permissions" : [
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ]
+            },
+            /* ios打包配置 */
+            "ios" : {},
+            /* SDK配置 */
+            "sdkConfigs" : {}
+        }
+    },
+    /* 快应用特有相关 */
+    "quickapp" : {},
+    /* 小程序特有相关 */
+    "mp-weixin" : {
+        "appid" : "wx00d3d08bf67e853e",
+        "setting" : {
+            "urlCheck" : false,
+            "postcss" : true,
+            "es6" : false,
+            "minified" : true
+        },
+        "usingComponents" : true,
+        "plugins" : {}
+    },
+    // "live-player-plugin": {
+    //     "version": "1.3.2", 
+    //     "provider": "wx2b03c6e691cd7370"  
+    // }
+    "mp-alipay" : {
+        "usingComponents" : true
+    },
+    "mp-baidu" : {
+        "usingComponents" : true
+    },
+    "mp-toutiao" : {
+        "usingComponents" : true
+    },
+    "uniStatistics" : {
+        "enable" : false
+    },
+    "vueVersion" : "2"
+}

+ 448 - 0
pages.json

@@ -0,0 +1,448 @@
+{
+	"easycom": {
+		"^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue"
+	},
+	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+		{
+			"path": "pages/index/index",
+			"style": {
+				"navigationBarTitleText": "郑州新明一中学生资料库",
+				"enablePullDownRefresh": true
+			}
+		}, {
+			"path": "pages/index/search",
+			"style": {
+				"navigationBarTitleText": "搜索"
+			}
+		}, {
+			"path": "pages/user/user",
+			"style": {
+				"navigationBarTitleText": "个人中心"
+			}
+
+		}, {
+			"path": "pages/index/knowledgeList",
+			"style": {
+				"navigationBarTitleText": "知识过关",
+				"enablePullDownRefresh": true
+			}
+
+		}, {
+			"path": "pages/index/screenList",
+			"style": {
+				"navigationBarTitleText": "筛选",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/index/indHot",
+			"style": {
+				"navigationStyle": "custom"
+			}
+
+		}, {
+			"path": "pages/index/navInfo",
+			"style": {
+				"navigationBarTitleText": "专题详情"
+			}
+
+		}, {
+			"path": "pages/index/navDet",
+			"style": {
+				"navigationBarTitleText": "资料详情"
+			}
+
+		}, {
+			"path": "pages/pay/pay",
+			"style": {
+				"navigationBarTitleText": "文档下载",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/user/coupon/coupon",
+			"style": {
+				"navigationBarTitleText": "优惠券",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/index/school/school",
+			"style": {
+				"navigationBarTitleText": "学校列表",
+				"enablePullDownRefresh": true
+			}
+
+		}, {
+			"path": "pages/index/school/schoolInfo",
+			"style": {
+				"navigationBarTitleText": "学校简介"
+			}
+		}, {
+			"path": "pages/index/video/video",
+			"style": {
+				"navigationBarTitleText": "教学视频",
+				"enablePullDownRefresh": true
+			}
+		}, {
+			"path": "pages/user/funManage/funManage",
+			"style": {
+				"navigationBarTitleText": "我的账号",
+				"enablePullDownRefresh": true
+			}
+			// }, {
+			// 	"path": "pages/user/funManage/addCash",
+			// 	"style": {
+			// 		"navigationBarTitleText": "绑定账号"
+			// 	}
+		}, {
+			"path": "pages/user/funManage/bindMethods",
+			"style": {
+				"navigationBarTitleText": "绑定账号"
+			}
+		}, {
+			"path": "pages/user/funManage/fundCash",
+			"style": {
+				"navigationBarTitleText": "提现"
+			}
+		}, {
+			"path": "pages/user/funManage/list",
+			"style": {
+				"navigationBarTitleText": "提现记录"
+			}
+		}, {
+			"path": "pages/user/funManage/recharge",
+			"style": {
+				"navigationBarTitleText": "充值学豆"
+			}
+		}, {
+			"path": "pages/user/mine/mineBean",
+			"style": {
+				"navigationBarTitleText": "我的学豆",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/user/mine/collect",
+			"style": {
+				"navigationBarTitleText": "我的收藏",
+				"enablePullDownRefresh": true
+			}
+
+		}, {
+			"path": "pages/user/mine/member",
+			"style": {
+				"navigationBarTitleText": "开通会员"
+			}
+
+		}, {
+			"path": "pages/user/mine/userInfo",
+			"style": {
+				"navigationBarTitleText": "个人信息",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/user/set/set",
+			"style": {
+				"navigationBarTitleText": "设置",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/user/set/setImg",
+			"style": {
+				"navigationBarTitleText": "设置头像",
+				"enablePullDownRefresh": false
+			}
+		}, {
+			"path": "pages/user/address/address",
+			"style": {
+				"navigationBarTitleText": "收货地址",
+				"enablePullDownRefresh": false
+			}
+		}, {
+			"path": "pages/user/address/editAddres",
+			"style": {
+				"navigationBarTitleText": "添加收货地址",
+				"enablePullDownRefresh": false
+			}
+		}, {
+			"path": "pages/user/other/other",
+			"style": {
+				"navigationBarTitleText": "留言板",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/user/mine/feedBack",
+			"style": {
+				"navigationBarTitleText": "意见反馈",
+				"enablePullDownRefresh": false
+			}
+		}, {
+			"path": "pages/news/notice",
+			"style": {
+				"navigationBarTitleText": "公告",
+				"enablePullDownRefresh": false
+			}
+		}, {
+			"path": "pages/news/newsInfo",
+			"style": {
+				"navigationBarTitleText": "公告详情",
+				"enablePullDownRefresh": false
+			}
+		}, {
+			"path": "pages/user/mine/poster",
+			"style": {
+				"navigationBarTitleText": "我的海报"
+			}
+		}, {
+			"path": "pages/tabbar/class",
+			"style": {
+				"navigationBarTitleText": "分类",
+				"enablePullDownRefresh": true
+			}
+
+		}, {
+			"path": "pages/tabbar/broadcast",
+			"style": {
+				"navigationBarTitleText": "直播",
+				"enablePullDownRefresh": true
+			}
+
+		}, {
+			"path": "pages/login/login",
+			"style": {
+				"navigationBarTitleText": "登录",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/index/video/videoInfo",
+			"style": {
+				"navigationBarTitleText": "视频详情",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/index/classList",
+			"style": {
+				"navigationBarTitleText": "知识过关",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/index/dlClassList",
+			"style": {
+				"navigationBarTitleText": "知识过关",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/user/coupon/myCoup",
+			"style": {
+				"navigationBarTitleText": "我的优惠券",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/user/mine/team",
+			"style": {
+				"navigationBarTitleText": "我的推荐",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/user/mine/down",
+			"style": {
+				"navigationBarTitleText": "我的下载",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/pay/payVid",
+			"style": {
+				"navigationBarTitleText": "视频购买",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/user/mine/buy",
+			"style": {
+				"navigationBarTitleText": "我的购买",
+				"enablePullDownRefresh": false
+			}
+
+		}
+	],
+	"subPackages": [{
+		"root": "pagesA",
+		"pages": [{
+			"path": "mall/mall",
+			"style": {
+				"navigationBarTitleText": "拼团",
+				"enablePullDownRefresh": true
+			}
+
+		}, {
+			"path": "mall/info",
+			"style": {
+				"navigationBarTitleText": "商品详情"
+			}
+
+		}, {
+			"path": "mall/orderInfo",
+			"style": {
+				"navigationBarTitleText": "订单详情"
+			}
+
+		}, {
+			"path": "mall/logisticsInfo",
+			"style": {
+				"navigationBarTitleText": "物流详情"
+			}
+
+		}, {
+			"path": "mall/order",
+			"style": {
+				"navigationBarTitleText": "我的订单",
+				"enablePullDownRefresh": true
+			}
+
+		}, {
+			"path": "mall/ordReturn",
+			"style": {
+				"navigationBarTitleText": "退款",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "mall/ordRetInfo",
+			"style": {
+				"navigationBarTitleText": "退款",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "mall/class",
+			"style": {
+				"navigationBarTitleText": "分类",
+				"enablePullDownRefresh": true
+			}
+
+		}, {
+			"path": "mall/creatOrd",
+			"style": {
+				"navigationBarTitleText": "创建订单",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "mall/collInfo",
+			"style": {
+				"navigationBarTitleText": "商品详情",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "mall/skillInfo",
+			"style": {
+				"navigationBarTitleText": "商品详情",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "broadcast/bdInfo",
+			"style": {
+				"navigationBarTitleText": "直播详情",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "broadcast/blist",
+			"style": {
+				"navigationBarTitleText": "回放列表",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "broadcast/bdLook",
+			"style": {
+				"navigationBarTitleText": "观看直播",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "catList/catList",
+			"style": {
+				"navigationBarTitleText": "分类",
+				"enablePullDownRefresh": false
+			}
+
+		},{
+			"path": "catList/downlist",
+			"style": {
+				"navigationBarTitleText": "下载文档",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "catList/catli",
+			"style": {
+				"navigationBarTitleText": "详情",
+				"enablePullDownRefresh": true
+			}
+
+		}]
+	}],
+	"preloadRule": {
+		"pagesA/mall/mall": {
+			"network": "all",
+			"packages": ["__APP__"]
+		}
+	},
+	"tabBar": {
+		"color": "#626262",
+		"selectedColor": "#005C58",
+		"borderStyle": "black",
+		"backgroundColor": "#ffffff",
+		"list": [{
+			"pagePath": "pages/index/index",
+			"iconPath": "static/img/tabbar/tab1.png",
+			"selectedIconPath": "static/img/tabbar/tabsel1.png",
+			"text": "首页"
+		}, {
+			"pagePath": "pages/tabbar/broadcast",
+			"iconPath": "static/img/tabbar/tab2.png",
+			"selectedIconPath": "static/img/tabbar/tabsel2.png",
+			"text": "直播"
+		}, {
+			"pagePath": "pages/tabbar/class",
+			"iconPath": "static/img/tabbar/tab3.png",
+			"selectedIconPath": "static/img/tabbar/tabsel3.png",
+			"text": "分类"
+		}, {
+			"pagePath": "pages/user/user",
+			"iconPath": "static/img/tabbar/tab4.png",
+			"selectedIconPath": "static/img/tabbar/tabsel4.png",
+			"text": "我的"
+		}]
+	},
+	"globalStyle": {
+		"navigationBarTextStyle": "black",
+		"navigationBarTitleText": "uni-app",
+		"navigationBarBackgroundColor": "#fff",
+		"backgroundColor": "#fff"
+	},
+	"condition" : { //模式配置,仅开发期间生效
+		"current": 0, //当前激活的模式(list 的索引项)
+		"list": [
+			{
+				"name": "", //模式名称
+				"path": "", //启动页面,必选
+				"query": "" //启动参数,在页面的onLoad函数里面得到
+			}
+		]
+	}
+}

+ 171 - 0
pages/index/classList.vue

@@ -0,0 +1,171 @@
+<template>
+	<view class="content">
+		<view class="top-input dfsb">
+			<navigator url="/pages/index/screenList" class="sel dffs">
+				条件筛选
+				<u-icon name="arrow-right" color="#F89638" size="10"></u-icon>
+			</navigator>
+			<u-search :showAction="false" placeholder="输入关键词搜索课程" @input="search()" v-model="keyword"></u-search>
+		</view>
+		<view class="swiper"><u-swiper :autoplay="false" :list="banner" keyName="img" height="120" border-radius="20" @click="bannerClick"></u-swiper></view>
+		<view v-if="flag == 1" class="conwarp">
+			<view class="fl-five"><video-list :flag="1" :list="list"></video-list></view>
+		</view>
+		<view v-if="flag == 2" class="conwarp">
+			<view class="fl-five"><course-list :flag="2" :list="list"></course-list></view>
+		</view>
+	</view>
+</template>
+
+<script>
+import courseList from './components/knowVidList.vue';
+import videoList from './video/componets/list.vue';
+export default {
+	components: {
+		courseList,
+		videoList
+	},
+	data() {
+		return {
+			keyword: '',
+			banner: [],
+			flag: '', // 1 视频  2.其他
+			cat_id:0,
+			nav_id: '',
+			subject_id: '',
+			grade_id: '',
+			list: [
+				// { image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
+			],
+			status: 'loadmore',
+			page: 1,
+			pagenum: 6
+		};
+	},
+	onPullDownRefresh() {
+		this.page = 1;
+		this.list = [];
+		this.getInfoList();
+		setTimeout(res => {
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	onReachBottom() {
+		if (this.status == 'nomore') return;
+		this.status = 'loading';
+		this.page = ++this.page;
+		this.getInfoList();
+	},
+	//url: `/pages/index/knowledgeList?flag=${val}&subject_id=${val}&grade_id=${this.grade_id}&title=${item.name}`
+	onLoad(opt) {
+		this.flag = opt.flag || '1'; // 1 视频  2.其他
+		this.keyword = opt.keyword || ''; // 1 视频  2.其他
+		this.subject_id = opt.subject_id || '';
+		this.grade_id = opt.grade_id || '';
+		this.nav_id = opt.nav_id || '';   //导航ID
+		this.cat_id = opt.cat_id || 0;   //二级分类ID
+		uni.setNavigationBarTitle({
+			title:  opt.title 
+		});
+		if (!this.keyword) return this.getInfoList();
+	},
+	methods: {
+		search() {
+			this.page = 1;
+			this.list = [];
+			this.getInfoList();
+		},
+		getInfoList() {
+			this.status = 'loadmore';
+			let url = this.flag == 1 ? 'index/getVideoList' : 'index/getClassList';
+			this.$api
+				.request(url, {
+					keyword: this.keyword || '',
+					is_top: 0,
+					grade_id: this.grade_id || '',
+					cat_id:this.cat_id||0,
+					nav_id:this.nav_id||'',
+					subject_id: this.subject_id || '',
+					year: this.year || '',
+					page: this.page,
+					limit: this.pagenum
+				})
+				.then(data => {
+					console.log(data);
+					if (data.code == 200) {
+						this.banner = data.data.banner;
+						if (this.flag == 1) {
+							this.list = this.list.concat(data.data.video_list);
+							if (data.data.video_list.length < this.pagnum) {
+								this.status = 'nomore';
+							}
+						} else {
+							this.list = this.list.concat(data.data.list);
+							if (data.data.list.length < this.pagnum) {
+								this.status = 'nomore';
+							}
+						}
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		toNext(url) {
+			uni.navigateTo({
+				url: url
+			});
+		},
+		bannerClick(e) {
+			console.log(e);
+			let item = this.banner[e];
+			if (item.goods_id != 0) {
+				if (item.type == 1) {
+					uni.navigateTo({
+						url: '/pages/index/video/videoInfo?id=' + item.goods_id
+					});
+				} else {
+					uni.navigateTo({
+						url: '/pages/index/navInfo?id=' + item.goods_id
+					});
+				}
+			}
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+	.top-input {
+		padding: 20rpx 30rpx;
+		.sel {
+			color: #f89638;
+			padding: 12rpx 20rpx;
+			font-size: $font-sm;
+			background-color: rgba(#f89638, 0.1);
+			border-radius: 30rpx;
+			margin-right: 36rpx;
+		}
+	}
+	.swiper {
+		margin: 20rpx 30rpx;
+	}
+	.conwarp {
+		background-color: #fff;
+		padding: 32rpx 30rpx 30rpx;
+		border-radius: 16rpx;
+		margin-bottom: 20rpx;
+		.gdHead {
+			line-height: 58rpx;
+			margin-bottom: 16rpx;
+			.head {
+				font-size: 34rpx;
+				font-family: PingFangSC-Medium, PingFang SC;
+				font-weight: 600;
+				color: #333333;
+				line-height: 48rpx;
+			}
+		}
+	}
+}
+</style>

+ 153 - 0
pages/index/components/detail-page-header.vue

@@ -0,0 +1,153 @@
+<template>
+	<view 
+		class="ylx-page-header row"
+		:style="{
+			height: navigationBarHeight+statusBarHeight+'px',
+			paddingTop: statusBarHeight+'px',
+			backgroundColor: 'rgba(255,255,255, '+headerOpacity+')'
+		}"
+	>
+		<view class="btn center" @click="navBack">
+			<text class="yticon icon-xiangzuo" :class="{dark: headerOpacity < 0.5}"></text>
+		</view>
+		<view class="cen center">
+			<view 
+				class="cen-item" 
+				:class="{active: index === currentAnchor}"
+				:style="{opacity: headerOpacity}"
+				v-for="(item, index) in anchorList" 
+				:key="index"
+				@click="navToAnchor(index)"
+			>
+				<text>{{ item.name }}</text>
+			</view>
+		</view>
+		<view class="btn"></view>
+	</view>
+</template>
+
+<script>
+	let _disableScroll = false;
+	export default {
+		name: 'ProductPageHeader',
+		data() {
+			return {
+				headerOpacity: 0,
+				currentAnchor: 0,
+				anchorList: [
+					{id: 1, name: '视频讲解', top: 0},
+					{id: 2, name: '解析文档', top: 0},
+					{id: 3, name: '文档下载', top: 0},
+				]
+			};
+		},
+		props: {
+			
+		},
+		computed: {
+			statusBarHeight(){
+				return this.systemInfo.statusBarHeight;
+			},
+			navigationBarHeight(){
+				return this.systemInfo.navigationBarHeight;
+			}
+		},
+		methods: {
+			//转到锚点
+			navToAnchor(index){
+				const {headerOpacity, anchorList, statusBarHeight, navigationBarHeight} = this;
+				if(this.headerOpacity == 0){
+					return;
+				}
+				_disableScroll = true;
+				uni.pageScrollTo({
+					scrollTop: anchorList[index].top - 1,
+					duration: 200
+				})
+				this.currentAnchor = index;
+				setTimeout(()=>{
+					_disableScroll = false;
+				}, 400)
+			},
+			pageScroll(e){
+				//头部渐变
+				this.headerOpacity = e.scrollTop/150;
+				//锚点切换
+				if(_disableScroll){
+					return;
+				}
+				const {currentAnchor, anchorList} = this;
+				const cur = e.scrollTop >= anchorList[2].top ? 2 : e.scrollTop >= anchorList[1].top ? 1:0;
+				if(cur !== currentAnchor){
+					this.currentAnchor = cur;
+				}
+			},
+			navBack(){
+				uni.navigateBack();
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.ylx-page-header{
+		position: fixed;
+		left: 0;
+		top: 100rpx;
+		z-index: 90;
+		justify-content: space-between;
+		width: 100%;
+	}
+	
+	.btn{
+		width: 80rpx;
+	}
+	
+	.icon-xiangzuo{
+		width: 52rpx;
+		height: 52rpx;
+		border-radius: 100rpx;
+		font-size: 36rpx;
+		color: #333;
+		text-align: center;
+		line-height: 52rpx;
+		
+		&.dark{
+			background-color: rgba(0,0,0,.5);
+			color: #fff;
+		}
+	}
+	
+	.cen{
+		flex: 1;
+		height: 100%;
+		position: relative;
+		
+		.cen-item{
+			width: 50px;
+			height: 36px;
+			font-size: 15px;
+			color: #333;
+			text-align: center;
+			line-height: 36px;
+			position: relative;
+		}
+		
+		.active{
+			font-size: 17px;
+			font-weight: 700;
+			
+			&:after{
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				content: '';
+				width: 30px;
+				height: 2px;
+				background-color: $base-color;
+				border-radius: 10rpx;
+			}
+		}
+	}
+</style>

+ 106 - 0
pages/index/components/knowAuthList.vue

@@ -0,0 +1,106 @@
+<template>
+	<view class="box">
+		<view class="boxlist">
+			<view @click="nextTo(item)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
+				<view class="imgbox">
+					<image :src="item.img" mode=""></image>
+					<text class="left-img" v-if="ind < 3">第{{ ind + 1 }}名</text>
+				</view>
+				<view class="dffd flex1">
+					<view class="title elli">{{item.title}}</view>
+					<view class="textgrey fontsm">{{item.tags}}</view>
+					<view v-if="flag==1" class="auth dfsb">
+						<text class="fontssm textgrey">作者:{{item.athour}}</text>
+						<text class="fontssm textgrey">{{item.down_num}}人下载</text>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {};
+	},
+	props: {
+		list: {
+			type: Array,
+			default: []
+		},
+		flag: {
+			type: [String, Number],
+			default: 1  //1文档 2视频
+		}
+	},
+	methods: {
+		nextTo(item){
+			if (this.flag == 1) {
+				uni.navigateTo({
+					url: '/pages/index/navDet?id= ' + item.id
+				});
+			} else {
+				uni.navigateTo({
+					url: '/pages/index/video/videoInfo?id= ' + item.id
+				});
+			} 
+		},
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.boxlist {
+	.vidLi {
+		width: 100%;
+		padding: 27rpx 0;
+		background-color: #fff;
+		&:nth-of-type(2) {
+			.imgbox {
+				.left-img {
+					background: #ea7334;
+				}
+			}
+		}
+		&:nth-of-type(3) {
+			.imgbox {
+				.left-img {
+					background: #f5b344;
+				}
+			}
+		}
+		.imgbox {
+			position: relative;
+			width: 128rpx;
+			height: 180rpx;
+			margin-right: 18rpx;
+			.left-img {
+				position: absolute;
+				top: 0;
+				left: 0;
+				height: 33rpx;
+				line-height: 33rpx;
+				font-size: 18rpx;
+				color: #fff;
+				padding: 0 5rpx;
+				background: #E84325;
+				border-radius: 7rpx;
+			}
+			image {
+				width: 128rpx;
+				height: 180rpx;
+			}
+		}
+		.title {
+			font-size: 28rpx;
+			line-height: 40rpx;
+			margin-bottom: 12rpx;
+		}
+		.auth {
+			margin-top: 15rpx;
+			width: 100%;
+		}
+	}
+}
+</style>

+ 61 - 0
pages/index/components/knowList.vue

@@ -0,0 +1,61 @@
+<template>
+	<view class="box">
+		<view v-if="flag == 1" class="dffs boxlist">
+			<view @click="nextTo()" class="vidLi" v-for="(item, ind) in list" :key="ind">
+				<image :src="item.image" mode=""></image>
+				<view class="title elli">名师揭秘 - 英语领跑多科目强化课名师揭秘 - 英语领跑多科目强化课名师揭秘 - 英语领跑多科目强化课</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {};
+	},
+	props: {
+		list: {
+			type: Array,
+			default: []
+		},
+		flag: {
+			type: [String, Number],
+			default: 1
+		}
+	},
+	methods: {
+		nextTo(){
+			uni.navigateTo({
+				url:'/pages/index/navInfo'
+			})
+		},
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.boxlist {
+	flex-wrap: wrap;
+	.vidLi { 
+		margin-right: 24rpx;
+		margin-bottom: 30rpx;
+		width: 334rpx;
+		background-color: #fff;
+		box-shadow: 0px 0px 20rpx 0px rgba(0, 0, 0, 0.07);
+		border-radius: 0px 0px 10rpx 10rpx;
+		&:nth-of-type(2n) {
+			margin-right: 0;
+		}
+		image {
+			width: 334rpx;
+			height: 240rpx;
+		} 
+		.title {
+			margin: 18rpx 13rpx 14rpx;
+			font-size: 28rpx; 
+			line-height: 40rpx;
+		}
+	}
+}
+</style>

+ 85 - 0
pages/index/components/knowVidList.vue

@@ -0,0 +1,85 @@
+<template>
+	<view class="box">
+		<view class="boxlist"> 
+			<view @click="nextTo(item)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
+				<image class="imgbox" :src="item.img" mode=""></image>
+				<view class="dffd flex1">
+					<view class="title elli">{{ item.title||item.name }}</view>
+					<view class="textgrey fontsm">{{ item.up_name }}</view>
+					<view v-if="flag == 2" class="auth dfsb">
+						<!-- 分类中的文档类 flag=2 -->
+						<text class="fontssm textgrey">作者:{{ item.athour }}</text>
+						<text class="fontssm textgrey">{{ item.down_num || 0 }}人下载</text>
+					</view>
+				</view>
+				<image v-if="flag == 3" class="down" src="/static/img/pro/navdown.png" mode=""></image>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {};
+	},
+	props: {
+		list: {
+			type: Array,
+			default: []
+		},
+		flag: {
+			type: [String, Number],
+			default: 1
+		}
+	},
+	methods: {
+		nextTo(item) {
+			// if (this.flag == 1) {
+			// 	uni.navigateTo({
+			// 		url: '/pages/index/navInfo?id=' + item.id
+			// 	});
+			// } else {
+			// 	uni.navigateTo({
+			// 		url: '/pages/index/navDet?id=' + item.id
+			// 	});
+			// } 
+				uni.navigateTo({
+					url: '/pages/index/navDet?id=' + item.id
+				});
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.boxlist {
+	.vidLi {
+		width: 100%;
+		padding: 27rpx 0;
+		background-color: #fff;
+		&:nth-of-type(2n) {
+			margin-right: 0;
+		}
+		.imgbox {
+			width: 146rpx;
+			height: 146rpx;
+			margin-right: 18rpx;
+		}
+		.title {
+			font-size: 28rpx;
+			line-height: 40rpx;
+			margin-bottom: 12rpx;
+		}
+		.auth {
+			margin-top: 15rpx;
+			width: 100%;
+		}
+		.down {
+			width: 35rpx;
+			height: 30rpx;
+			margin-left: 58rpx;
+		}
+	}
+}
+</style>

+ 191 - 0
pages/index/components/sh-menu.vue

@@ -0,0 +1,191 @@
+<template>
+	<view class="">
+		<!-- 产品分类导航 -->
+		<view class="menu-category-box " v-if="carousel && flag == 0" :style="detail.length <= menu ? `height:150rpx` : `height:300rpx`">
+			<swiper
+				class="menu-swiper-box"
+				:style="detail.length <= menu ? `height:150rpx` : `height:300rpx`"
+				@change="onSwiper"
+				circular
+				:autoplay="false"
+				:interval="3000"
+				:duration="1000"
+			>
+			<swiper-item class="menu-swiper-item" v-for="(itemList, index) in carousel" :key="index" :style="detail.length <= menu ? `height:150rpx` : `height:300rpx`">
+				<view class="menu-tab-box dffs">
+					<!-- :url="item.path + '?id=' + item.id" -->
+					<view @click="navTo(item)" class="tab-list dffd y-f" :style="{ width: 690 / menu + 'rpx' }" v-for="(item, ind) in itemList" :key="ind">
+						<image class="tab-img shopro-selector-circular" :style="{ width: imgW + 'rpx', height: imgW + 'rpx' }" :src="item.logo"></image>
+						<text class="shopro-selector-rect oneelli">{{ item.name }}</text>
+					</view>
+				</view>
+			</swiper-item>
+			
+			</swiper>
+			<view class="menu-category-dots" v-if="carousel.length > 1">
+				<text :class="categoryCurrent === index ? 'category-dot-active' : 'category-dot'" v-for="(dot, index) in carousel.length" :key="index"></text>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	components: {},
+	data() {
+		return {
+			categoryCurrent: 0 ,//分类轮播下标
+		};
+	},
+	props: {
+		detail: {
+			type: Array,
+			default: []
+		},
+		menu: {
+			default: 5
+		},
+		imgW: {
+			type: Number,
+			default: 88
+		},
+		flag: {
+			type: Number,
+			default: 0
+		}
+	},
+	computed: {
+		carousel() {
+			console.log('普通导航: ',this.detail);
+			if (this.detail) {
+				let data = this.sortData(this.detail, this.menu * 2);
+				return data;
+			}
+		},
+	},
+	created() {},
+	methods: {
+		// 数据分层
+		sortData(oArr, length) {
+			let arr = [];
+			let minArr = [];
+			oArr.forEach(c => {
+				if (minArr.length === length) {
+					minArr = [];
+				}
+				if (minArr.length === 0) {
+					arr.push(minArr);
+				}
+				minArr.push(c);
+			});
+
+			return arr;
+		},
+		// 轮播
+		onSwiper(e) {
+			this.categoryCurrent = e.detail.current;
+		},
+		navTo(item) { 
+			//普通导航跳转方式
+			if(item.type == 1)
+			{
+				if (item.url == 'notic') {
+					uni.navigateTo({
+						url: `/pages/news/notice?type=2&title=${item.name}`
+					});
+				} else if (item.url == 'vedio') {
+					uni.navigateTo({
+						url: `/pages/index/video/video?cat=`+item.catid
+					});
+				} else if (item.url == 'vacation') {
+					uni.navigateTo({
+						url: `/pagesA/catList/catList?cat=item.catid&title=${item.name}` 
+					});
+				} else {
+					uni.navigateTo({
+						url: `/pages/index/classList?flag=2&nav_id=${item.id}&title=${item.name}`
+					});
+				}
+			}
+			
+			//独立导航跳转方式
+			if(item.type == 2)
+			{
+				uni.navigateTo({
+					url: `/pages/index/dlClassList?flag=2&nav_id=${item.id}&title=${item.name}`
+				});
+			}
+			
+			
+		},
+		clickthis() {
+			// console.log(12);
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+// 产品分类
+.menu-category-box {
+	width: 100%;
+	padding: 10rpx 0rpx 0 0rpx;
+}
+.menu-category-box,
+.menu-swiper-box {
+	width: 100%;
+	position: relative;
+	.menu-swiper-item {
+		height: 100%;
+		width: 100%;
+	}
+	.menu-tab-box {
+		display: flex;
+		flex-direction: row;
+		flex-wrap: wrap;
+		.tab-list {
+			justify-content: flex-start;
+			align-items: center;
+			width: 20%;
+			font-size: 24rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: rgba(51, 51, 51, 1);
+			padding-bottom: 25rpx;
+			.tab-img {
+				width: 100%;
+				border-radius: 50%;
+				margin-bottom: 10rpx;
+				padding: 10rpx;
+			}
+			text {
+				width: 100%;
+				text-align: center;
+				font-size: 24rpx;
+			}
+		}
+	}
+
+	.menu-category-dots {
+		display: flex;
+		position: absolute;
+		left: 50%;
+		transform: translateX(-50%);
+		bottom: 0rpx;
+
+		.category-dot {
+			width: 25rpx;
+			height: 8rpx;
+			background: #eeeeee;
+			border-radius: 50%;
+		}
+
+		.category-dot-active {
+			width: 25rpx;
+			height: 8rpx;
+			background: $promain;
+			border-radius: 50%;
+		}
+	}
+}
+</style>

+ 174 - 0
pages/index/components/wordlist.vue

@@ -0,0 +1,174 @@
+<template>
+	<view class="box">
+		<view v-if="flag == 2" class="boxlist">
+			<view @click="nextTo(item)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
+				<image class="imgbox" src="/static/img/pro/wodimg.png" mode=""></image>
+				<view class="dffd flex1">
+					<view class="title elli">{{ item.title }}</view>
+					<view class="textgrey fontsm">{{ item.is_buy == 1 ? '已购买' : '未购买' }}</view>
+				</view>
+				<image v-if="flag == 2" class="down" src="../../../static/img/pro/navdown.png" mode=""></image>
+			</view>
+		</view>
+		<view v-if="flag == 1" class="boxlist">
+			<view @click="nextTo(item, 1)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
+				<image class="imgbox" src="/static/img/pro/wodimg.png" mode=""></image>
+				<view class="dffd flex1">
+					<view class="title elli">{{ item.title }}</view>
+					<view class="textgrey fontsm">已购买</view>
+				</view>
+				<image class="down" src="../../../static/img/pro/navdown.png" mode=""></image>
+			</view>
+		</view>
+		<view v-if="flag == 4" class="boxlist">
+			<view @click="nextTo(item, 1)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
+				<image class="imgbox" src="/static/img/pro/wodimg.png" mode=""></image>
+				<view class="dffd flex1">
+					<view class="title elli">{{ item.title }}</view>
+					<!-- <view class="textgrey fontsm">已购买</view> -->
+				</view>
+				<image class="down" src="../../../static/img/pro/navdown.png" mode=""></image>
+			</view>
+		</view><view v-if="flag == 5" class="boxlist">
+			<view @click="nextTo(item, 1)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
+				<!-- <image class="imgbox" src="/static/img/pro/wodimg.png" mode=""></image> -->
+				<view class="dffd flex1">
+					<view class="title elli">{{ item.title }}</view>
+					<!-- <view class="textgrey fontsm">已购买</view> -->
+				</view>
+				<image class="down" src="../../../static/img/pro/navdown.png" mode=""></image>
+			</view>
+		</view>
+		<view v-if="flag == 3" class="boxlist">
+			<view v-if="item.is_buy == 0" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
+				<image class="imgbox" src="/static/img/pro/wodimg.png" mode=""></image>
+				<view class="dffd flex1">
+					<view class="title elli">{{ item.title }}</view>
+					
+					<text v-if="selType == 1&&item.price>0" class="priceDan">{{ item.price }}</text>
+					<text v-if="selType == 1&&item.price==0" class="fontsm prosecond">免费</text>
+					<view v-if="selType == 2" class="textgrey fontsm">{{ item.bean==0?'免费':item.bean+'学豆' }}</view>
+<!-- 					<view v-if="selType == 1" class="textgrey fontsm">{{ item.bean==0?'免费':item.bean+'学豆' }}</view>
+					<text v-if="selType == 2&&item.price>0" class="priceDan">{{ item.price }}</text>
+					<text v-if="selType == 2&&item.price==0" class="fontsm prosecond">免费</text> -->
+				</view>
+				<image @click.stop="hhh(item, ind)" v-if="!item.sel" class="down" src="/static/img/pro/wxz.png" mode=""></image>
+				<image @click.stop="hhh(item, ind)" v-if="item.sel" class="down" src="/static/img/pro/chenggong.png" mode=""></image>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			path: ''
+		};
+	},
+	props: {
+		list: {
+			type: Array,
+			default: []
+		},
+		flag: {
+			type: [String, Number],
+			default: 1
+		},
+		selType: {
+			type: [String, Number],
+			default: 2
+		}
+	},
+	methods: {
+		hhh(item, ind) {
+			console.log('hhh: ',item);
+			// if(item.sel)
+			item.sel = !item.sel;
+			// console.log(111, item.sel);
+			this.$emit('getItem', item.sel, ind);
+		},
+		nextTo(item, val) {
+			let that = this;
+			if ((that.flag == 2 && item.is_buy == 1) || val == 1) {
+				// that.$api.toast('点击下载');
+				let url = item.files;
+				// 下载
+				uni.downloadFile({
+					url: url, //仅为示例,并非真实的资源
+					success: res => {
+						if (res.statusCode === 200) {
+							that.$api.toast('下载成功');
+							that.path = res.tempFilePath;
+							console.log(res, that.path);
+							//保存到本地
+							uni.saveFile({
+								tempFilePath: that.path,
+								success: res1 => {
+									//res.savedFilePath文件的保存路径
+									//保存成功并打开文件
+									uni.openDocument({
+										filePath: res1.savedFilePath,
+										showMenu:true,
+										success: res2 => {
+											that.$api.toast('打开成功');
+										}
+									});
+								},
+								fail: res3 => {
+									console.log(res3);
+									that.$api.toast('保存失败');
+								}
+							});
+						} else {
+							that.$api.toast('下载失败');
+						}
+					},
+					complete: res12 => {
+						console.log(res12);
+						that.$api.toast(res12);
+					},
+					fail: res11 => {
+						console.log(res11);
+						that.$api.toast(res11);
+					}
+				});
+			} else {
+				that.$api.toast('请先购买');
+			}
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.boxlist {
+	.vidLi {
+		width: 100%;
+		padding: 27rpx 0;
+		background-color: #fff;
+		&:nth-of-type(2n) {
+			margin-right: 0;
+		}
+		.imgbox {
+			width: 146rpx;
+			height: 146rpx;
+			margin-right: 18rpx;
+		}
+		.title {
+			font-size: 28rpx;
+			line-height: 40rpx;
+			margin-bottom: 12rpx;
+		}
+		.auth {
+			margin-top: 15rpx;
+			width: 100%;
+		}
+		.down {
+			width: 40rpx;
+			height: 40rpx;
+			margin-right: 30rpx; 
+		}
+	}
+}
+</style>

+ 219 - 0
pages/index/dlClassList.vue

@@ -0,0 +1,219 @@
+<template>
+	<view class="content">
+		<view class="topBox">
+			<u-tabs
+				
+				lineWidth="100"
+				:is-scroll="true" 
+				:list="cate_list"
+				keyName="name"
+				:current="current"
+				:itemStyle="{ fontSize: '28rpx', height: '100rpx'}"
+				:activeStyle="{ color: '#87C477',borderBottom:'2px solid #87C477' }"
+				lineHeight="0" 
+				sticky
+				@click="topHandle"
+			></u-tabs>
+		</view>
+		<view class="top-input dfsb">
+			<u-search :showAction="false" placeholder="输入关键词搜索课程" @input="search()" v-model="keyword"></u-search>
+		</view>
+		<view class="swiper"><u-swiper :autoplay="false" :list="banner" keyName="img" height="120" border-radius="20" @click="bannerClick"></u-swiper></view>
+
+		<view class="conwarp">
+			<view class="fl-five"><course-list :flag="2" :list="list"></course-list></view>
+		</view>
+	</view>
+</template>
+
+<script>
+import courseList from './components/knowVidList.vue';
+import videoList from './video/componets/list.vue';
+export default {
+	components: {
+		courseList,
+		videoList
+	},
+	data() {
+		return {
+			cate_list:[],   //独立分类
+			keyword: '',
+			banner: [],
+			flag: '', // 1 视频  2.其他
+			cat_id:0,
+			nav_id: '',
+			subject_id: '',
+			grade_id: '',
+			list: [
+				// { image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
+			],
+			status: 'loadmore',
+			page: 1,
+			pagenum: 6
+		};
+	},
+	onPullDownRefresh() {
+		this.page = 1;
+		this.list = [];
+		this.getInfoList();
+		setTimeout(res => {
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	onReachBottom() {
+		if (this.status == 'nomore') return;
+		this.status = 'loading';
+		this.page = ++this.page;
+		this.getInfoList();
+	},
+	//url: `/pages/index/knowledgeList?flag=${val}&subject_id=${val}&grade_id=${this.grade_id}&title=${item.name}`
+	onLoad(opt) {
+		// this.flag = opt.flag || '1'; // 1 视频  2.其他
+		this.keyword = opt.keyword || ''; //关键词
+		this.nav_id = opt.nav_id || '';   //独立导航ID
+		uni.setNavigationBarTitle({
+			title:  opt.title 
+		});
+		
+		this.dl_cate();
+		
+		if (!this.keyword) return this.getInfoList();
+	},
+	methods: {
+		
+		// 顶部按钮被点击
+		topHandle(e) {
+			console.log('top: ',e);
+			this.cat_id = e.id;
+			
+			this.page = 1;
+			this.list = [];
+			this.getInfoList();
+			// this.onload();
+		},
+		
+		search() {
+			if(this.keyword)
+			{
+				this.page = 1;
+				this.list = [];
+				this.getInfoList();
+			}
+			
+		},
+		
+		//获取独立分类
+		dl_cate() {
+			
+			this.$api
+				.request('index/getDlCate', {
+					dl_nav_id: this.nav_id || 0,
+				})
+				.then(data => {
+					console.log(data);
+					if (data.code == 200) {
+						this.cate_list = data.data;
+						// this.cat_id = data.data[0].id;
+						console.log(this.cat_id);
+						
+						// this.getInfoList();
+						
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		
+		getInfoList() {
+			this.status = 'loadmore';
+			this.$api
+				.request('index/getDlClassList', {
+					keyword: this.keyword || '',
+					dl_cate:this.cat_id||0,
+					dl_nav:this.nav_id||'',
+					page: this.page,
+					limit: this.pagenum
+				})
+				.then(data => {
+					console.log(data);
+					if (data.code == 200) {
+						this.banner = data.data.banner;
+					
+						this.list = this.list.concat(data.data.list);
+						if (data.data.list.length < this.pagnum) {
+							this.status = 'nomore';
+						}
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		toNext(url) {
+			uni.navigateTo({
+				url: url
+			});
+		},
+		bannerClick(e) {
+			console.log(e);
+			let item = this.banner[e];
+			if (item.goods_id != 0) {
+				if (item.type == 1) {
+					uni.navigateTo({
+						url: '/pages/index/video/videoInfo?id=' + item.goods_id
+					});
+				} else {
+					uni.navigateTo({
+						url: '/pages/index/navInfo?id=' + item.goods_id
+					});
+				}
+			}
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+	
+	.topBox {
+		width: auto;
+		background-color: #fff;
+	}
+	/deep/ .u-tabs{
+		width: 100vw;
+		
+	}
+	
+	.top-input {
+		padding: 20rpx 30rpx;
+		.sel {
+			color: #f89638;
+			padding: 12rpx 20rpx;
+			font-size: $font-sm;
+			background-color: rgba(#f89638, 0.1);
+			border-radius: 30rpx;
+			margin-right: 36rpx;
+		}
+	}
+	.swiper {
+		margin: 20rpx 30rpx;
+	}
+	.conwarp {
+		background-color: #fff;
+		padding: 32rpx 30rpx 30rpx;
+		border-radius: 16rpx;
+		margin-bottom: 20rpx;
+		.gdHead {
+			line-height: 58rpx;
+			margin-bottom: 16rpx;
+			.head {
+				font-size: 34rpx;
+				font-family: PingFangSC-Medium, PingFang SC;
+				font-weight: 600;
+				color: #333333;
+				line-height: 48rpx;
+			}
+		}
+	}
+}
+</style>

+ 149 - 0
pages/index/indHot.vue

@@ -0,0 +1,149 @@
+<template>
+	<view class="pageCon">
+		<navigator open-type="navigateBack" class="iconBox"><u-icon name="arrow-left" color="#333" size="22" class="rightBox"></u-icon></navigator>
+		<view class="top dffd">
+			<view class="topLeft">Top {{ newsInfo.num }}</view>
+			<view class="title blod dffs">
+				{{ newsInfo.name }}
+				<image src="/static/img/pro/ordlist.png" mode=""></image>
+			</view>
+		</view>
+		<view class="conwarp">
+			<view class="gdHead dffs">
+				<image src="/static/img/pro/tips.png" mode=""></image>
+				<view class=" fontssm flex1">已近三天阅读、下载、分享数据为准</view>
+				<view class="textgrey fontssm">共{{ newsInfo.count }}套|每天更新</view>
+			</view>
+			<auth-list :flag="type" :list="newsInfo.data"></auth-list>
+		</view>
+		<image class="imgbg" src="/static/img/pro/hotbgzl.png" mode=""></image>
+	</view>
+</template>
+
+<script>
+import authList from './components/knowAuthList.vue';
+export default {
+	components: {
+		authList
+	},
+	data() {
+		return {
+			id: '',
+			type: 1, //1文档 2视频
+			newsInfo: {
+				data: []
+			}
+		};
+	},
+	onPullDownRefresh() {
+		setTimeout(res => {
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	onLoad(opt) {
+		this.id = opt.id;
+		this.type = opt.type;
+		this.getInfoList();
+	},
+	methods: {
+		getInfoList() {
+			this.$api
+				.request('hotrank/rank_list', {
+					id: this.id
+				})
+				.then(data => {
+					if (data.code == 200) {
+						this.newsInfo = data.data[0];
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		toNext(url) {
+			uni.navigateTo({
+				url: url
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.pageCon {
+	.iconBox {
+		width: 40rpx;
+		height: 40rpx;
+		position: fixed;
+		top: 80rpx;
+		left: 30rpx;
+		z-index: 99999;
+	}
+	.imgbg {
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+	}
+	.top {
+		height: 430rpx;
+		padding: 0 30rpx;
+		position: relative;
+		z-index: 1;
+		justify-content: center;
+		.topLeft {
+			background: linear-gradient(90deg, #fdd597 0%, #eec37a 100%);
+			border-radius: 15rpx;
+			font-size: 18rpx;
+			font-family: PingFangSC-Medium, PingFang SC;
+			font-weight: 500;
+			line-height: 25rpx;
+			padding: 5rpx 12rpx;
+			display: inline-block;
+			margin-bottom: 15rpx;
+		}
+		.title {
+			font-family: PingFangSC-Semibold, PingFang SC;
+			font-weight: 600;
+			font-size: 46rpx;
+			color: #333;
+			line-height: 42rpx;
+			margin: 9rpx 5rpx 10rpx;
+			image {
+				width: 36rpx;
+				height: 40rpx;
+				margin-left: 12rpx;
+			}
+		}
+	}
+	.conwarp {
+		position: relative;
+		z-index: 11;
+		background: #ffffff;
+		box-shadow: 0px 2rpx 4rpx 0px rgba(0, 0, 0, 0.5);
+		border-radius: 30rpx 30rpx 0rpx 0rpx;
+		padding: 39rpx 30rpx 30rpx;
+		border-radius: 16rpx;
+		margin-bottom: 20rpx;
+		.gdHead {
+			line-height: 58rpx;
+			margin-bottom: 16rpx;
+			.head {
+				font-size: 34rpx;
+				font-family: PingFangSC-Medium, PingFang SC;
+				font-weight: 600;
+				color: #333333;
+				line-height: 48rpx;
+			}
+			image {
+				width: 28rpx;
+				height: 28rpx;
+				margin-right: 14rpx;
+			}
+		}
+	}
+	.content {
+		position: relative;
+		z-index: 11;
+	}
+}
+</style>

+ 569 - 0
pages/index/index.vue

@@ -0,0 +1,569 @@
+<template>
+	<view class="content">
+		<view class="top-input"><u-search :showAction="false" placeholder="输入关键词搜索课程" @focus="toNext('/pages/index/search?vedio_status='+ info.vedio_status)" v-model="keyword"></u-search></view>
+		<view class="swiper">
+			<u-swiper :autoplay="true" :list="banner"  keyName="img" height="140" border-radius="20" @click="bannerClick"></u-swiper>
+			<view class="notice bb dffs">
+				<image src="/static/img/pro/indnotice.png" mode=""></image>
+				<swiper class="noswiper flex1" :autoplay="true" :interval="3000" vertical :duration="1000">
+					<swiper-item @click="navTo(item)" v-for="(item, index) in notic" :key="index">
+						<!-- <view class="swiper-item"></view> -->
+						<view class="title fontmid">{{ item.title }}</view>
+					</swiper-item>
+				</swiper>
+				<u-icon name="arrow-right"></u-icon>
+			</view>
+		</view>
+		<!-- 导航列表 -->
+		
+		<view class="nav">
+			<sh-menu class="funliBox" :flag="0" :detail="nav"  menu="5" :imgW="74"></sh-menu>
+		</view>
+		
+		<!-- 导航列表 -->
+		<view class="conwarp">
+			<view class="gdHead dfsb"><view class="head">热门榜单</view></view>
+			<view class="specGod dffs">
+				<view @click="newxtTo(1, item, ite)" v-for="(item, index) in list_one" class="shopsLi" :key="index">
+					<image class="bg" :src="'/static/img/temp/indbg' + (index + 1) + '.png'" mode=""></image>
+					<view class="shopBox">
+						<view class="topLeft">Top {{ item.num }}</view>
+						<view class="title blod fontbase">{{ item.name }}</view>
+						<view class="sub-title">共{{ item.count }}套|每天更新</view>
+						<view class="line-list oneelli">
+							<!-- @click="newxtTo(2, item, ite)" -->
+							<view v-if="ind < 3" v-for="(ite, ind) in item.data" :key="ind" class="li oneelli">{{ ite.rank_num }}、{{ ite.desc }}</view>
+						</view>
+						<view class="all dffs">
+							查看全部{{ item.count }}套
+							<u-icon name="arrow-right" color="#fff" size="10"></u-icon>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="conwarp fl-box">
+			<view class="gdHead dfsb"><view class="head">活动专区</view></view>
+			<view class="fl-two dfsb">
+				<image @click="toNext('/pagesA/mall/mall?type=2')" :src="info.pintuan_img" mode="widthFix"></image>
+				<image @click="toNext('/pagesA/mall/mall?type=3')" :src="info.miaosha_img" mode="widthFix"></image>
+			</view>
+		</view>
+		<!-- -->
+		<view  v-if="info.vedio_status==1" class="conwarp fl-box">
+			<view class="gdHead dfsb">
+				<view class="head">教学视频</view>
+				<view @click="toNext('/pages/index/video/video')" class="fontssm promain dffs">
+					查看更多
+					<u-icon name="arrow-right" color="#025B58" size="10"></u-icon>
+				</view>
+			</view>
+			<view class="fl-thr">
+				<view class="thr-tab scrollx">
+					<navigator :url="'/pages/index/video/video?cat='+item.id" class="li fontssm" :class="ind == 0 ? 'sel' : ''" v-for="(item, ind) in vedio_cats" :key="ind">{{ item.name }}</navigator>
+				</view>
+				<view class="tab-con scrollx dffs"><video-list :flag="1" :list="video_list"></video-list></view>
+			</view>
+		</view>
+		<view class="conwarp fl-box">
+			<view class="gdHead dfsb">
+				<view class="titBox dffs">
+					<view class="head">名校推荐</view>
+					<!-- <view
+						@click="toNext('/pages/index/school/school?type=' + item.id)"
+						v-for="(item, ind) in school_type"
+						:key="ind"
+						:class="[ind == 0 ? 'head' : '', 'textgrey fontmid']"
+					>
+						{{ item.name }}
+					</view> -->
+				</view>
+				<view @click="toNext('/pages/index/school/school?type=' + school_type[0].id)" class="fontssm promain dffs">
+					查看更多
+					<u-icon name="arrow-right" color="#025B58" size="10"></u-icon>
+				</view>
+			</view>
+			<view class="fl-four scrollx dffs">
+				<view @click="toNext('/pages/index/school/schoolInfo?id=' + item.id)" class="schLi dffs" v-for="(item, ind) in school" :key="ind">
+					<image class="bg" :src="item.logo" mode=""></image>
+					<view class="shopBox flex1 dffd">
+						<view class="bold fontmid oneelli">{{ item.name }}</view>
+						<view class="textgrey desc fontssm">{{ item.brief }}</view>
+						<view class="all dffs">
+							查看更多
+							<u-icon name="arrow-right" color="#025B58" size="10"></u-icon>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="conwarp fl-box">
+			<view class="gdHead dfsb">
+				<view class="head">热门资料</view>
+				<!-- <navigator url="/pagesA/mall/class" class="fontssm promain dffs">
+					查看更多
+					<u-icon name="arrow-right" color="#025B58" size="10"></u-icon> -->
+				</navigator>
+			</view>
+			<view class="fl-five"><shop-list :flag="1" :list="newsInfo"></shop-list></view>
+		</view>
+	</view>
+</template>
+
+<script>
+import shMenu from './components/sh-menu.vue';
+import videoList from '@/components/videoList.vue';
+import shopList from '@/components/shopList.vue';
+export default {
+	components: {
+		shMenu,
+		shopList,
+		videoList
+	},
+	data() {
+		return {
+			keyword: '',
+			banner: [],
+			notic: [],  
+			info:{},
+			list_one: {},
+			nav: [],
+			dl_nav:[],    //独立导航列表
+			school: [],
+			vedio_cats: [],
+			school_type: '', //教学视频 选中
+			video_list: [],
+			newsInfo: [],
+			page: 1,
+			limit: 6
+		};
+	},
+	onPullDownRefresh() {
+		setTimeout(res => {
+			uni.stopPullDownRefresh();
+		}, 1000);
+		this.newsInfo = [];
+		this.page = 1;
+		this.status = 'loadmore';
+		// this.getInfoList();
+		this.getInfoOne();
+		this.getInfotwo();
+		this.getInfothree();
+	},
+	onReachBottom() {
+		if (this.status == 'nomore') return;
+		this.status = 'loading';
+		this.page = ++this.page;
+		// this.getInfoList();
+		this.getInfothree();
+	},
+	onLoad(opt) {
+		var yqm = '';
+		let scene = decodeURIComponent(opt.scene);
+		if(scene)
+		{
+			let scene_arr = scene.split('=');
+			
+			var yqm = scene_arr[1];
+			console.log(yqm);
+		}
+		
+		// let yqm = opt.yqm || '';
+		if(yqm)
+		{
+			uni.setStorageSync('yqm', yqm);
+		}
+		
+		this.getInfoOne();
+		this.getInfotwo();
+		this.getInfothree();
+		// this.getInfoList();
+	},
+	onShareAppMessage() {
+		let that = this;
+		return {
+			title: that.goodInfo.info.name,
+			path: ""
+		};
+	},
+	methods: {
+		// 轮播
+		bannerClick(e) {
+			console.log('bannerClick:',e);
+			let item = this.banner[e];
+			console.log('item:',item);
+			if (item.goods_id != 0) {
+				
+				switch(item.type)
+				{
+					case 1:
+						uni.navigateTo({
+							url: '/pages/index/navDet?id= ' + item.goods_id
+							// url: '/pages/index/navInfo?id=' + item.goods_id
+						});
+						break;
+					case 2:
+						uni.navigateTo({
+							url: '/pages/index/video/videoInfo?id=' + item.goods_id
+						});
+						break;
+					case 3:
+						uni.navigateTo({
+							url: '/pages/news/newsInfo?type=2&id=' + item.goods_id
+						});
+						break;
+					case 4:
+						uni.navigateTo({
+							url: '/pages/news/newsInfo?type=2&id=' + item.goods_id
+						});
+						break;
+				}
+				
+			}
+		},
+		// 热门榜单 val 1列表 2.详情  type 1 文档 2 视频
+		newxtTo(val, item, ite) {
+			if (val == 1) {
+				// /pages/index/classList?flag=2&subject_id=2&grade_id=1&title=资源类
+				uni.navigateTo({
+					url: `/pages/index/indHot?id=${item.id}&type=${item.type}`
+				});
+				return;
+			}
+			if (item.type == 1) {
+				uni.navigateTo({
+					url: '/pages/index/navDet?id=' + ite.id
+				});
+			} else {
+				console.log(ite);
+				uni.navigateTo({
+					url: '/pages/index/video/videoInfo?id=' + ite.id
+				});
+			}
+		},
+		// 公告
+		navTo(item) {
+			console.log('navTo:',item);
+			uni.navigateTo({
+				url: '/pages/news/newsInfo?type=2&id=' + item.id
+			});
+		},
+		
+		
+		//首页第一块 (轮播图 +  公告 + 导航)
+		getInfoOne() {
+			this.$api
+				.request('index/index_one', {
+					
+				})
+				.then(data => {
+					if (data.code == 200) {
+						let dl_nav 	= data.data.dl_nav;
+						let nav 	= data.data.nav;
+						let hb = dl_nav.concat(nav);
+						this.nav = hb;
+
+						uni.setStorageSync('showVideo',data.data.vedio_status)
+						this.info = data.data;
+						this.banner = data.data.banner;
+						this.notic = data.data.notic;
+
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		
+		
+		//首页第二块 (榜单 +  配置 + 视频  + 名校)
+		getInfotwo() {
+			this.$api
+				.request('index/index_two', {
+					
+				})
+				.then(data => {
+					if (data.code == 200) {
+						this.school_type = data.data.school_type;
+						this.vedio_cats = data.data.vedio_cats;
+						this.list_one = data.data.list_one;
+						// this.nav = data.data.nav;
+						this.school = data.data.school;
+						this.video_list = data.data.video_list;
+
+		
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		
+		
+		//首页第三块 (商品)
+		getInfothree() {
+			this.$api
+				.request('index/index_three', {
+					
+				})
+				.then(data => {
+					if (data.code == 200) {
+						this.newsInfo = this.newsInfo.concat(data.data.goods);
+						console.log(this.newsInfo);
+						if (data.data.goods.length < this.limit) {
+							this.status = 'nomore';
+						}
+		
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		
+		
+		getInfoList() {
+			this.$api
+				.request('index/index', {
+					school_type: this.school_type || '',
+					video_cat: this.vedio_cats || '',
+					page: this.page,
+					limit: this.limit
+				})
+				.then(data => {
+					console.log("热门资料",data);
+					if (data.code == 200) {
+						let dl_nav 	= data.data.dl_nav;
+						let nav 	= data.data.nav;
+						
+						let hb = dl_nav.concat(nav);
+						
+						this.nav = hb;
+						console.log('合并数组: ',hb);
+						
+						uni.setStorageSync('showVideo',data.data.vedio_status)
+						this.info =data.data;
+						this.school_type = data.data.school_type;
+						this.vedio_cats = data.data.vedio_cats;
+						this.list_one = data.data.list_one;
+						// this.nav = data.data.nav;
+						this.school = data.data.school;
+						this.banner = data.data.banner;
+						this.notic = data.data.notic;
+						this.video_list = data.data.video_list;
+						this.newsInfo = this.newsInfo.concat(data.data.goods);
+						console.log(this.newsInfo);
+						if (data.data.goods.length < this.limit) {
+							this.status = 'nomore';
+						}
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		toNext(url) {
+			console.log(11);
+			uni.navigateTo({
+				url: url
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+	.top-input {
+		padding: 20rpx 30rpx;
+	}
+	.swiper {
+		margin: 0 30rpx;
+	}
+	.notice {
+		padding: 35rpx 0 33rpx;
+		image {
+			width: 66rpx;
+			height: 31rpx;
+			margin-right: 28rpx;
+		}
+		.title {
+			border-left: 1rpx solid #bfbfbf;
+			flex: 1;
+			padding: 0 26rpx;
+		}
+		.noswiper {
+			height: 50rpx;
+		}
+	}
+	.nav {
+		margin: 25rpx 30rpx 0;
+	}
+	.conwarp {
+		margin-left: 32rpx;
+		border-radius: 16rpx;
+		.gdHead {
+			line-height: 58rpx;
+			margin-bottom: 16rpx;
+			.head {
+				font-size: 34rpx;
+				font-family: PingFangSC-Medium, PingFang SC;
+				font-weight: 600;
+				color: #333333;
+				line-height: 48rpx;
+			}
+			.fontmid {
+				margin-right: 10rpx;
+			}
+		}
+		.specGod { 
+			padding: 5rpx 5rpx 10rpx;
+			// flex-wrap: wrap;
+			display: -webkit-box;
+			overflow-x: auto;
+			&::-webkit-scrollbar {
+				display: none;
+			}
+
+			.shopsLi {
+				margin-right: 30rpx;
+				width: 286rpx;
+				height: 331rpx;
+				border-radius: 16rpx;
+				overflow: hidden;
+				position: relative;
+				.bg {
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 286rpx;
+					height: 431rpx;
+				}
+				.shopBox {
+					width: 100%;
+					position: absolute;
+					top: 0;
+					left: 0;
+					z-index: 2;
+					padding: 22rpx 18rpx 20rpx;
+					.topLeft {
+						background: linear-gradient(90deg, #fdd597 0%, #eec37a 100%);
+						border-radius: 15rpx;
+						font-size: 18rpx;
+						font-family: PingFangSC-Medium, PingFang SC;
+						font-weight: 500;
+						line-height: 25rpx;
+						padding: 5rpx 12rpx;
+						width: 120rpx;
+					}
+					.title {
+						font-family: PingFangSC-Semibold, PingFang SC;
+						font-weight: 600;
+						color: #ffffff;
+						line-height: 42rpx;
+						margin: 9rpx 5rpx 10rpx;
+					}
+					.sub-title {
+						font-size: 18rpx;
+						font-family: PingFangSC-Light, PingFang SC;
+						font-weight: 300;
+						color: #ffffff;
+						line-height: 25rpx;
+					}
+					.line-list {
+						margin-top: 27rpx;
+						.li {
+							width: 100%;
+							font-size: 20rpx;
+							color: #ffffff;
+							line-height: 28rpx;
+							margin-bottom: 13rpx;
+						}
+					}
+					.all {
+						font-size: 16rpx;
+						font-family: PingFangSC-Light, PingFang SC;
+						font-weight: 300;
+						color: #ffffff;
+						line-height: 22rpx;
+						justify-content: center;
+						align-items: center;
+					}
+				}
+			}
+		}
+	}
+	.fl-box {
+		margin: 30rpx 30rpx 0;
+		.fl-two {
+			image {
+				width: 340rpx;
+			}
+		}
+		.fl-thr {
+			.thr-tab {
+				.li {
+					background: #f2f2f2;
+					border-radius: 27rpx;
+					color: #999;
+					padding: 8rpx 15rpx;
+					margin-right: 20rpx;
+				}
+				.sel {
+					color: $promain;
+					font-weight: 500rpx;
+					background: rgba(2, 91, 88, 0.1);
+					border-radius: 27rpx;
+					border: 1px solid #025b58;
+				}
+			}
+			.tab-con {
+				margin-top: 30rpx;
+				// width: 100%;
+			}
+		}
+		.titBox {
+			&:nth-of-type(2) {
+				margin-left: 30rpx;
+			}
+		}
+		.fl-four {
+			margin-top: 21rpx;
+			.schLi {
+				width: 430rpx;
+				background-color: #fff;
+				margin-right: 20rpx;
+				padding: 12rpx 10rpx;
+				.bg {
+					width: 149rpx;
+					height: 149rpx;
+					margin-right: 16rpx;
+				}
+				.shopBox {
+					width: 240rpx;
+					.oneelli {
+						width: 100%;
+					}
+					.desc {
+						margin: 12rpx 0 27rpx;
+						font-family: PingFangSC-Light, PingFang SC;
+						font-weight: 300;
+						line-height: 34rpx;
+						text-overflow: -o-ellipsis-lastline;
+						overflow: hidden;
+						text-overflow: ellipsis;
+						display: -webkit-box;
+						-webkit-line-clamp: 2;
+						line-clamp: 2;
+						-webkit-box-orient: vertical;
+					}
+					.all {
+						padding: 6rpx 18rpx;
+						background: rgba(#025b58, 0.2);
+						border-radius: 21rpx;
+						font-size: 20rpx;
+						color: $promain;
+						align-self: flex-end;
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 491 - 0
pages/index/indexold.vue

@@ -0,0 +1,491 @@
+<template>
+	<view class="content">
+		<view class="top-input"><u-search :showAction="false" placeholder="输入关键词搜索课程" @focus="toNext('/pages/index/search?vedio_status='+ info.vedio_status)" v-model="keyword"></u-search></view>
+		<view class="swiper">
+			<u-swiper :autoplay="true" :list="banner"  keyName="img" height="140" border-radius="20" @click="bannerClick"></u-swiper>
+			<view class="notice bb dffs">
+				<image src="/static/img/pro/indnotice.png" mode=""></image>
+				<swiper class="noswiper flex1" :autoplay="true" :interval="3000" vertical :duration="1000">
+					<swiper-item @click="navTo(item)" v-for="(item, index) in notic" :key="index">
+						<!-- <view class="swiper-item"></view> -->
+						<view class="title fontmid">{{ item.title }}</view>
+					</swiper-item>
+				</swiper>
+				<u-icon name="arrow-right"></u-icon>
+			</view>
+		</view>
+		<navigator url="/pagesA/catList/catList">分类</navigator>
+		<!-- 导航列表 -->
+		
+		<view class="nav">
+			<sh-menu class="funliBox" :flag="0" :detail="nav"  menu="5" :imgW="74"></sh-menu>
+		</view>
+		
+		<!-- 导航列表 -->
+		<view class="conwarp">
+			<view class="gdHead dfsb"><view class="head">热门榜单</view></view>
+			<view class="specGod dffs">
+				<view @click="newxtTo(1, item, ite)" v-for="(item, index) in list_one" class="shopsLi" :key="index">
+					<image class="bg" :src="'/static/img/temp/indbg' + (index + 1) + '.png'" mode=""></image>
+					<view class="shopBox">
+						<view class="topLeft">Top {{ item.num }}</view>
+						<view class="title blod fontbase">{{ item.name }}</view>
+						<view class="sub-title">共{{ item.count }}套|每天更新</view>
+						<view class="line-list oneelli">
+							<!-- @click="newxtTo(2, item, ite)" -->
+							<view v-if="ind < 3" v-for="(ite, ind) in item.data" :key="ind" class="li oneelli">{{ ite.rank_num }}、{{ ite.desc }}</view>
+						</view>
+						<view class="all dffs">
+							查看全部{{ item.count }}套
+							<u-icon name="arrow-right" color="#fff" size="10"></u-icon>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="conwarp fl-box">
+			<view class="gdHead dfsb"><view class="head">活动专区</view></view>
+			<view class="fl-two dfsb">
+				<image @click="toNext('/pagesA/mall/mall?type=2')" :src="info.pintuan_img" mode="widthFix"></image>
+				<image @click="toNext('/pagesA/mall/mall?type=3')" :src="info.miaosha_img" mode="widthFix"></image>
+			</view>
+		</view>
+		<!-- -->
+		<view  v-if="info.vedio_status==1" class="conwarp fl-box">
+			<view class="gdHead dfsb">
+				<view class="head">教学视频</view>
+				<view @click="toNext('/pages/index/video/video')" class="fontssm promain dffs">
+					查看更多
+					<u-icon name="arrow-right" color="#025B58" size="10"></u-icon>
+				</view>
+			</view>
+			<view class="fl-thr">
+				<view class="thr-tab scrollx">
+					<navigator :url="'/pages/index/video/video?cat='+item.id" class="li fontssm" :class="ind == 0 ? 'sel' : ''" v-for="(item, ind) in vedio_cats" :key="ind">{{ item.name }}</navigator>
+				</view>
+				<view class="tab-con scrollx dffs"><video-list :flag="1" :list="video_list"></video-list></view>
+			</view>
+		</view>
+		<view class="conwarp fl-box">
+			<view class="gdHead dfsb">
+				<view class="titBox dffs">
+					<view class="head">名校推荐</view>
+					<!-- <view
+						@click="toNext('/pages/index/school/school?type=' + item.id)"
+						v-for="(item, ind) in school_type"
+						:key="ind"
+						:class="[ind == 0 ? 'head' : '', 'textgrey fontmid']"
+					>
+						{{ item.name }}
+					</view> -->
+				</view>
+				<view @click="toNext('/pages/index/school/school?type=' + school_type[0].id)" class="fontssm promain dffs">
+					查看更多
+					<u-icon name="arrow-right" color="#025B58" size="10"></u-icon>
+				</view>
+			</view>
+			<view class="fl-four scrollx dffs">
+				<view @click="toNext('/pages/index/school/schoolInfo?id=' + item.id)" class="schLi dffs" v-for="(item, ind) in school" :key="ind">
+					<image class="bg" :src="item.logo" mode=""></image>
+					<view class="shopBox flex1 dffd">
+						<view class="bold fontmid oneelli">{{ item.name }}</view>
+						<view class="textgrey desc fontssm">{{ item.brief }}</view>
+						<view class="all dffs">
+							查看更多
+							<u-icon name="arrow-right" color="#025B58" size="10"></u-icon>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="conwarp fl-box">
+			<view class="gdHead dfsb">
+				<view class="head">热门资料</view>
+				<navigator url="/pagesA/mall/class" class="fontssm promain dffs">
+					查看更多
+					<u-icon name="arrow-right" color="#025B58" size="10"></u-icon>
+				</navigator>
+			</view>
+			<view class="fl-five"><shop-list :flag="1" :list="newsInfo"></shop-list></view>
+		</view>
+	</view>
+</template>
+
+<script>
+import shMenu from './components/sh-menu.vue';
+import videoList from '@/components/videoList.vue';
+import shopList from '@/components/shopList.vue';
+export default {
+	components: {
+		shMenu,
+		shopList,
+		videoList
+	},
+	data() {
+		return {
+			keyword: '',
+			banner: [],
+			notic: [],  
+			info:{},
+			list_one: {},
+			nav: [],
+			dl_nav:[],    //独立导航列表
+			school: [],
+			vedio_cats: [],
+			school_type: '', //教学视频 选中
+			video_list: [],
+			newsInfo: [],
+			page: 1,
+			limit: 6
+		};
+	},
+	onPullDownRefresh() {
+		setTimeout(res => {
+			uni.stopPullDownRefresh();
+		}, 1000);
+		this.newsInfo = [];
+		this.page = 1;
+		this.status = 'loadmore';
+		this.getInfoList();
+	},
+	onReachBottom() {
+		if (this.status == 'nomore') return;
+		this.status = 'loading';
+		this.page = ++this.page;
+		this.getInfoList();
+	},
+	onLoad(opt) {
+		var yqm = '';
+		let scene = decodeURIComponent(opt.scene);
+		if(scene)
+		{
+			let scene_arr = scene.split('=');
+			
+			var yqm = scene_arr[1];
+			console.log(yqm);
+		}
+		
+		// let yqm = opt.yqm || '';
+		if(yqm)
+		{
+			uni.setStorageSync('yqm', yqm);
+		}
+		
+		this.getInfoList();
+	},
+	onShareAppMessage() {
+		let that = this;
+		return {
+			title: that.goodInfo.info.name,
+			path: ""
+		};
+	},
+	methods: {
+		// 轮播
+		bannerClick(e) {
+			console.log('bannerClick:',e);
+			let item = this.banner[e];
+			console.log('item:',item);
+			if (item.goods_id != 0) {
+				
+				switch(item.type)
+				{
+					case 1:
+						uni.navigateTo({
+							url: '/pages/index/navDet?id= ' + item.goods_id
+							// url: '/pages/index/navInfo?id=' + item.goods_id
+						});
+						break;
+					case 2:
+						uni.navigateTo({
+							url: '/pages/index/video/videoInfo?id=' + item.goods_id
+						});
+						break;
+					case 3:
+						uni.navigateTo({
+							url: '/pages/news/newsInfo?type=2&id=' + item.goods_id
+						});
+						break;
+					case 4:
+						uni.navigateTo({
+							url: '/pages/news/newsInfo?type=2&id=' + item.goods_id
+						});
+						break;
+				}
+				
+			}
+		},
+		// 热门榜单 val 1列表 2.详情  type 1 文档 2 视频
+		newxtTo(val, item, ite) {
+			if (val == 1) {
+				// /pages/index/classList?flag=2&subject_id=2&grade_id=1&title=资源类
+				uni.navigateTo({
+					url: `/pages/index/indHot?id=${item.id}&type=${item.type}`
+				});
+				return;
+			}
+			if (item.type == 1) {
+				uni.navigateTo({
+					url: '/pages/index/navDet?id=' + ite.id
+				});
+			} else {
+				console.log(ite);
+				uni.navigateTo({
+					url: '/pages/index/video/videoInfo?id=' + ite.id
+				});
+			}
+		},
+		// 公告
+		navTo(item) {
+			console.log('navTo:',item);
+			uni.navigateTo({
+				url: '/pages/news/newsInfo?type=2&id=' + item.id
+			});
+		},
+		getInfoList() {
+			this.$api
+				.request('index/index', {
+					school_type: this.school_type || '',
+					video_cat: this.vedio_cats || '',
+					page: this.page,
+					limit: this.limit
+				})
+				.then(data => {
+					if (data.code == 200) {
+						let dl_nav 	= data.data.dl_nav;
+						let nav 	= data.data.nav;
+						
+						let hb = dl_nav.concat(nav);
+						
+						this.nav = hb;
+						console.log('合并数组: ',hb);
+						
+						uni.setStorageSync('showVideo',data.data.vedio_status)
+						this.info =data.data;
+						this.school_type = data.data.school_type;
+						this.vedio_cats = data.data.vedio_cats;
+						this.list_one = data.data.list_one;
+						// this.nav = data.data.nav;
+						this.school = data.data.school;
+						this.banner = data.data.banner;
+						this.notic = data.data.notic;
+						this.video_list = data.data.video_list;
+						this.newsInfo = this.newsInfo.concat(data.data.goods);
+						console.log(this.newsInfo);
+						if (data.data.goods.length < this.limit) {
+							this.status = 'nomore';
+						}
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		toNext(url) {
+			console.log(11);
+			uni.navigateTo({
+				url: url
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+	.top-input {
+		padding: 20rpx 30rpx;
+	}
+	.swiper {
+		margin: 0 30rpx;
+	}
+	.notice {
+		padding: 35rpx 0 33rpx;
+		image {
+			width: 66rpx;
+			height: 31rpx;
+			margin-right: 28rpx;
+		}
+		.title {
+			border-left: 1rpx solid #bfbfbf;
+			flex: 1;
+			padding: 0 26rpx;
+		}
+		.noswiper {
+			height: 50rpx;
+		}
+	}
+	.nav {
+		margin: 25rpx 30rpx 0;
+	}
+	.conwarp {
+		margin-left: 32rpx;
+		border-radius: 16rpx;
+		.gdHead {
+			line-height: 58rpx;
+			margin-bottom: 16rpx;
+			.head {
+				font-size: 34rpx;
+				font-family: PingFangSC-Medium, PingFang SC;
+				font-weight: 600;
+				color: #333333;
+				line-height: 48rpx;
+			}
+			.fontmid {
+				margin-right: 10rpx;
+			}
+		}
+		.specGod { 
+			padding: 5rpx 5rpx 10rpx;
+			// flex-wrap: wrap;
+			display: -webkit-box;
+			overflow-x: auto;
+			&::-webkit-scrollbar {
+				display: none;
+			}
+
+			.shopsLi {
+				margin-right: 30rpx;
+				width: 286rpx;
+				height: 331rpx;
+				border-radius: 16rpx;
+				overflow: hidden;
+				position: relative;
+				.bg {
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 286rpx;
+					height: 431rpx;
+				}
+				.shopBox {
+					width: 100%;
+					position: absolute;
+					top: 0;
+					left: 0;
+					z-index: 2;
+					padding: 22rpx 18rpx 20rpx;
+					.topLeft {
+						background: linear-gradient(90deg, #fdd597 0%, #eec37a 100%);
+						border-radius: 15rpx;
+						font-size: 18rpx;
+						font-family: PingFangSC-Medium, PingFang SC;
+						font-weight: 500;
+						line-height: 25rpx;
+						padding: 5rpx 12rpx;
+						width: 120rpx;
+					}
+					.title {
+						font-family: PingFangSC-Semibold, PingFang SC;
+						font-weight: 600;
+						color: #ffffff;
+						line-height: 42rpx;
+						margin: 9rpx 5rpx 10rpx;
+					}
+					.sub-title {
+						font-size: 18rpx;
+						font-family: PingFangSC-Light, PingFang SC;
+						font-weight: 300;
+						color: #ffffff;
+						line-height: 25rpx;
+					}
+					.line-list {
+						margin-top: 27rpx;
+						.li {
+							width: 100%;
+							font-size: 20rpx;
+							color: #ffffff;
+							line-height: 28rpx;
+							margin-bottom: 13rpx;
+						}
+					}
+					.all {
+						font-size: 16rpx;
+						font-family: PingFangSC-Light, PingFang SC;
+						font-weight: 300;
+						color: #ffffff;
+						line-height: 22rpx;
+						justify-content: center;
+						align-items: center;
+					}
+				}
+			}
+		}
+	}
+	.fl-box {
+		margin: 30rpx 30rpx 0;
+		.fl-two {
+			image {
+				width: 340rpx;
+			}
+		}
+		.fl-thr {
+			.thr-tab {
+				.li {
+					background: #f2f2f2;
+					border-radius: 27rpx;
+					color: #999;
+					padding: 8rpx 15rpx;
+					margin-right: 20rpx;
+				}
+				.sel {
+					color: $promain;
+					font-weight: 500rpx;
+					background: rgba(2, 91, 88, 0.1);
+					border-radius: 27rpx;
+					border: 1px solid #025b58;
+				}
+			}
+			.tab-con {
+				margin-top: 30rpx;
+				// width: 100%;
+			}
+		}
+		.titBox {
+			&:nth-of-type(2) {
+				margin-left: 30rpx;
+			}
+		}
+		.fl-four {
+			margin-top: 21rpx;
+			.schLi {
+				width: 430rpx;
+				background-color: #fff;
+				margin-right: 20rpx;
+				padding: 12rpx 10rpx;
+				.bg {
+					width: 149rpx;
+					height: 149rpx;
+					margin-right: 16rpx;
+				}
+				.shopBox {
+					width: 240rpx;
+					.oneelli {
+						width: 100%;
+					}
+					.desc {
+						margin: 12rpx 0 27rpx;
+						font-family: PingFangSC-Light, PingFang SC;
+						font-weight: 300;
+						line-height: 34rpx;
+						text-overflow: -o-ellipsis-lastline;
+						overflow: hidden;
+						text-overflow: ellipsis;
+						display: -webkit-box;
+						-webkit-line-clamp: 2;
+						line-clamp: 2;
+						-webkit-box-orient: vertical;
+					}
+					.all {
+						padding: 6rpx 18rpx;
+						background: rgba(#025b58, 0.2);
+						border-radius: 21rpx;
+						font-size: 20rpx;
+						color: $promain;
+						align-self: flex-end;
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 122 - 0
pages/index/knowledgeList.vue

@@ -0,0 +1,122 @@
+<template>
+	<view class="content">
+		<view class="top-input dfsb">
+			<navigator url="/pages/index/screenList" class="sel dffs">
+				条件筛选
+				<u-icon name="arrow-right" color="#F89638" size="10"></u-icon>
+			</navigator>
+			<u-search :showAction="false" placeholder="输入关键词搜索课程" @focus="toNext('/pages/index/search')" v-model="keyword"></u-search>
+		</view>
+		<view class="swiper"><u-swiper :autoplay="false" :list="banner" height="120" border-radius="20" @click="bannerClick"></u-swiper></view>
+		<view class="conwarp">
+			<view class="gdHead dfsb">
+				<view class="head">基础知识过关</view>
+				<view class="fontssm textgrey dffs">
+					查看更多
+					<u-icon name="arrow-right" color="#999" size="10"></u-icon>
+				</view>
+			</view>
+			<view class="fl-five"><course-list :flag="1" :list="baosList"></course-list></view>
+		</view>
+		<view class="conwarp">
+			<view class="gdHead dfsb">
+				<view class="head">基础知识过关</view>
+				<view class="fontssm textgrey dffs">
+					查看更多
+					<u-icon name="arrow-right" color="#999" size="10"></u-icon>
+				</view>
+			</view>
+			<view class="fl-five"><course-list :flag="1" :list="baosList"></course-list></view>
+		</view>
+		<view class="conwarp">
+			<view class="gdHead dfsb">
+				<view class="head">基础知识过关</view>
+				<view class="fontssm textgrey dffs">
+					查看更多
+					<u-icon name="arrow-right" color="#999" size="10"></u-icon>
+				</view>
+			</view>
+			<view class="fl-five"><video-list :flag="1" :list="baosList"></video-list></view>
+		</view>
+	</view>
+</template>
+
+<script>
+import courseList from './components/knowList.vue';
+import videoList from './components/knowVidList.vue';
+export default {
+	components: {
+		courseList,
+		videoList
+	},
+	data() {
+		return {
+			keyword: '',
+			banner: [],
+			baosList: [
+				{ image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
+				{ image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
+				{ image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
+				{ image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
+				{ image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' }
+			]
+		};
+	},
+	onPullDownRefresh() {
+		setTimeout(res => {
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	//url: `/pages/index/knowledgeList?flag=${val}&subject_id=${val}&grade_id=${this.grade_id}&title=${item.name}`
+	onLoad(opt) {
+		this.nav_id = opt.nav_id || '';
+		this.cat = opt.cat || '';
+		this.getInfoList();
+		this.getInfoList();
+	},
+	methods: {
+		getInfoList() {},
+		toNext(url) {
+			uni.navigateTo({
+				url: url
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+	.top-input {
+		padding: 20rpx 30rpx;
+		.sel {
+			color: #f89638;
+			padding: 12rpx 20rpx;
+			font-size: $font-sm;
+			background-color: rgba(#f89638, 0.1);
+			border-radius: 30rpx;
+			margin-right: 36rpx;
+		}
+	}
+	.swiper {
+		margin: 20rpx 30rpx;
+	}
+	.conwarp {
+		background-color: #fff;
+		padding: 32rpx 30rpx 30rpx;
+		border-radius: 16rpx;
+		margin-bottom: 20rpx;
+		.gdHead {
+			line-height: 58rpx;
+			margin-bottom: 16rpx;
+			.head {
+				font-size: 34rpx;
+				font-family: PingFangSC-Medium, PingFang SC;
+				font-weight: 600;
+				color: #333333;
+				line-height: 48rpx;
+			}
+		}
+	}
+}
+</style>

+ 342 - 0
pages/index/navDet.vue

@@ -0,0 +1,342 @@
+<template>
+	<view class="container">
+		<view class="conwarp">
+			<view class="gdHead dffs">
+				<view class="head flex1">{{ goodInfo.info.name }}</view>
+				<text v-for="(item, index) in goodInfo.info.tags.split('|')" class="desc">{{ item }}</text>
+			</view>
+			<view class="subtit textgrey fontssm">{{ goodInfo.info.desc }}</view>
+			
+			<block v-if="goodInfo.class_vedio_status == 1">
+				<view v-if="goodInfo.info.vedio" class="cl-one">
+					<video class="vidBox" :src="goodInfo.info.vedio" controls></video>
+				</view>
+			</block>
+		</view>
+		<view class="conwarp">
+			<view class="gdHead"><view class="head">解析文档</view></view>
+			<view class="cl-one">
+				<view class="xqcont">
+					<u-parse :content="goodInfo.info.content"></u-parse>
+					<!-- <view class="xqleft dffd">
+						<image
+							@click="cliCot(1)"
+							class="small"
+							:src="goodInfo.info.is_collection == 1 ? '/static/img/pro/navcolsel.png' : '/static/img/pro/navcol.png'"
+							mode=""
+						></image>
+						<view class="word">收藏</view>
+						<image @click="cliCot(2)" class="big" :src="goodInfo.info.is_give == 1 ? '/static/img/pro/navgodsel.png' : '/static/img/pro/navgod.png'" mode=""></image>
+						<view class="word">{{ goodInfo.info.like_num || 0 }}</view>
+						<button open-type="share" class=" shareBtn " type="default">
+							<image class="small" src="/static/img/pro/navshare.png" mode=""></image>
+							<view class="word">分享</view>
+						</button>
+					</view> -->
+					<view class="btnsBox dffd">
+						<image @click="cliCot(2)" class="small" :src="goodInfo.info.is_give == 1 ? '/static/img/pro/navgodsel.png' : '/static/img/pro/navgod.png'" mode=""></image>
+						<view class="fontssm textgrey">{{ goodInfo.info.like_num || 0 }}人喜欢</view>
+						<view class="dfsb">
+							<view @click="cliCot(1)" class="btns dfsb">
+								<image class="icon" :src="goodInfo.info.is_collection == 1 ? '/static/img/pro/navcolsel.png' : '/static/img/pro/navcol.png'" mode=""></image>
+								<view class="word">收藏</view>
+							</view>
+							<button open-type="share" class="btns shareBtn dfsb">
+								<image class="icon" src="/static/img/pro/navshare1.png" mode=""></image>
+								<view class="word">分享</view>
+							</button>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="conwarp">
+			<view class="gdHead"><view class="head">文档下载</view></view>
+			<view class="cl-one"><video-list :flag="2" :list="goodInfo.files"></video-list></view>
+		</view>
+		<view class="fixBox dfsb">
+			<view @tap="toPay()" class="li flex1 dffs">
+				<image src="/static/img/pro/navlidown.png" mode=""></image>
+				普通下载
+			</view>
+			<view class="line"></view>
+			<view @tap="toPay()" class="li flex1 dffs">
+				<image src="/static/img/pro/navlivdown.png" mode=""></image>
+				会员下载
+			</view>
+			<!-- <navigator :url="'/pages/pay/pay?id=' + id" class="li flex1 dffs">
+				<image src="/static/img/pro/navlidown.png" mode=""></image>
+				普通下载
+			</navigator>
+			<view class="line"></view>
+			<navigator :url="'/pages/pay/pay?id=' + id" class="li flex1 dffs">
+				<image src="/static/img/pro/navlivdown.png" mode=""></image>
+				会员下载
+			</navigator> -->
+		</view>
+	</view>
+</template>
+<script>
+import videoList from './components/wordlist.vue';
+
+export default {
+	components: {
+		videoList
+	},
+
+	data() {
+		return {
+			id: 0, //商品id
+			goodInfo: { tags: '', info: '' }
+		};
+	},
+
+	onLoad(option) {
+		console.log(option);
+		if (option.scene) {
+			let scene = decodeURIComponent(option.scene);
+			let id =scene.split('=')[1]
+			console.log(scene);
+			this.id = id;
+		} else {
+			this.id = option.id;
+		}
+		this.loadData();
+		this.$store.dispatch('getUserInfo');
+	},
+	onShareAppMessage() {
+		let that = this;
+		return {
+			title: that.goodInfo.info.name,
+			path: `/pages/index/navDet?id=${this.id}&invite_id=${this.token()}`
+		};
+	},
+
+	methods: {
+		// val  1收藏 2点赞
+		cliCot(val) {
+			let url = val == 1 ? 'collection/setCollection' : 'give/setGive';
+			// type	2 类型:  1=商品 2=文档  3=视频
+			// coll_id 收藏ID  (分为:  商品ID  ,  文档ID  ,  视频ID)
+			this.$api
+				.request(url, {
+					coll_id: this.goodInfo.info.id || '',
+					r_id: this.goodInfo.info.id || '',
+					type: 2
+				})
+				.then(res => {
+					this.$api.toast(res.msg);
+					if (res.code == '200') {
+						setTimeout(res => {
+							this.loadData();
+						}, 600);
+					}
+				});
+		},
+		/**
+		 * 请求数据只是为了代码不那么乱
+		 * 分次请求未作整合
+		 */
+		async loadData() {
+			let url = 'index/getClassInfo';
+			this.$api
+				.request(url, {
+					id: this.id
+				})
+				.then(res => {
+					if (res.code == '200') {
+						let data = res.data;
+						this.goodInfo = data;
+					}
+				});
+		},
+
+		showPopup(key, type) {
+			this.$refs[key].open(type);
+		},
+		
+		toPay()
+		{
+			if(this.goodInfo.info.level_time == 0)
+			{
+				uni.showToast({
+					icon:'none',
+				    title: '普通会员无法下载!',
+				    duration: 2000,
+				});
+				
+				setTimeout(res => {
+					uni.navigateTo({
+						url: '/pages/user/mine/member'
+					});
+				}, 2000);
+				
+				return;
+			}
+			
+			uni.navigateTo({
+			    url: '/pages/pay/pay?id=' + this.id
+			});
+			
+		},
+
+		//立即购买
+		buyNow(data) {
+			
+			
+			
+			const parms = this.getConfirmData(data);
+			console.log(parms);
+			if (!parms) {
+				return;
+			}
+			// parms.id = parms.gid;
+			this.hidePopup('skuPopup');
+			this.navTo('/pages/order/createOrder?data=' + JSON.stringify(parms), 'post', {
+				login: true
+			});
+		}
+		// ,
+		//立即购买
+		// async buyNow(data) {
+		// 	this.getConfirmData(data);
+		// 	this.$request('/api/cart/addCart', {
+		// 			goods_id: this.id,
+		// 			nums: 1,
+		// 			nums_type: 2
+		// 		})
+		// 		.then(res => {
+		// 			if (res.code == '200') {
+		// 				this.navTo('/pages/order/createOrder?type=buyNow&ids=' + res.data, {
+		// 					login: true
+		// 				})
+		// 			} else {
+		// 				this.$util.msg(res.msg);
+		// 			}
+		// 		});
+		// }
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.container {
+	padding-bottom: 120rpx;
+	.conwarp {
+		background-color: #fff;
+		padding: 26rpx 30rpx 39rpx;
+		border-radius: 16rpx;
+		margin-bottom: 20rpx;
+		.gdHead {
+			line-height: 58rpx;
+			margin-bottom: 16rpx;
+			.head {
+				font-size: 34rpx;
+				font-family: PingFangSC-Medium, PingFang SC;
+				font-weight: 600;
+				color: #333333;
+				line-height: 48rpx;
+			}
+			.desc {
+				background: #f89638;
+				border-radius: 5rpx;
+				font-size: 18rpx;
+				height: 32rpx;
+				line-height: 32rpx;
+				padding: 0rpx 8rpx;
+				display: inline-block;
+				color: #fff;
+				margin-left: 10rpx;
+				&:nth-of-type(2) {
+					background: #7fc06e;
+				}
+				&:nth-of-type(3) {
+					background: #75b2c4;
+				}
+				&:nth-of-type(4) {
+					background: #8875c0;
+				}
+			}
+		}
+		.subtit {
+			margin-top: 10rpx;
+		}
+		.cl-one {
+			.vidBox {
+				margin-top: 30rpx;
+				width: 690rpx;
+				height: 335rpx;
+			}
+			.xqcont {
+				min-height: 800rpx;
+				width: 100%;
+				align-items: center;
+				.xqleft {
+					position: fixed;
+					top: 50%;
+					right: 0;
+					align-items: center;
+					justify-content: center;
+					.small {
+						width: 54rpx;
+						height: 54rpx;
+					}
+					.big {
+						width: 108rpx;
+						height: 108rpx;
+					}
+					.word {
+						margin: 8rpx 0 48rpx;
+						font-size: 20rpx;
+						color: #999;
+					}
+				}
+				.btnsBox {
+					align-items: center;
+					.small {
+						width: 90rpx;
+						height: 90rpx;
+						margin: 60rpx 0 16rpx;
+						opacity: 0.8;
+					}
+					.btns {
+						margin: 70rpx 60rpx 0;
+						width: 154rpx;
+						height: 54rpx;
+						background: #f6f6f6;
+						border-radius: 31px;
+						align-items: center;
+						padding: 0 15rpx;
+						justify-content: space-around;
+						.icon {
+							width: 35rpx;
+							height: 31rpx;
+						}
+						.word {
+							font-size: 22rpx;
+							color: #666;
+						}
+					}
+				}
+			}
+		}
+	}
+	.fixBox {
+		padding: 34rpx;
+		.line {
+			width: 1rpx;
+			height: 20rpx;
+			background: #b7b7bd;
+		}
+		.li {
+			justify-content: center;
+			color: #7fc06e;
+			image {
+				width: 42rpx;
+				height: 32rpx;
+				margin-right: 20rpx;
+			}
+		}
+	}
+}
+</style>

+ 152 - 0
pages/index/navInfo.vue

@@ -0,0 +1,152 @@
+<template>
+	<view class="content">
+		<view class=" vidLi dfsb">
+			<view class="imgbox"><image src="../../static/img/pro/ordlist.png" mode=""></image></view>
+			<view class="dffd flex1">
+				<view class="title elli">名师揭秘 - 英语领跑多科目强化课名师揭秘 - 英语领跑多科目强化课名师揭秘 - 英语领跑多科目强化课</view>
+				<view class="textgrey fontsm">八年级|物理|视频课</view>
+				<view class="auth">
+					<view :style="{ height: height }" class="tit fontssm textgrey">
+						简介:中考政策在近两年不会改变,初中20中考政策在近两年不会改变,初中20中考政策在近两年不会改变,初中20中考政策在近两年不会改变,初中20中考政策在近两年不会改变,初中20中考政策在近两年不会改变,初中20中考政策在近两年不会改变,初中20中考政策在近两年不会改变,初中20中考政策在近两年不会改变,初中20中考政策在近两年不会改变,初中20中考政策在近两年不会改变,初中20中考政策在近两年不会改变,初中20
+					</view>
+					<text @click="changHeight()" class="fontssm show green">展开</text>
+				</view>
+			</view>
+		</view>
+		<view class="conwarp">
+			<view class="gdHead dfsb">
+				<view class="head">基础知识过关</view>
+				<view class="fontssm textgrey dffs">
+					查看更多
+					<u-icon name="arrow-right" color="#999" size="10"></u-icon>
+				</view>
+			</view>
+			<view class="fl-five"><video-list :flag="2" :list="baosList"></video-list></view>
+		</view>
+	</view>
+</template>
+
+<script>
+import videoList from './components/wordlist.vue';
+export default {
+	components: {
+		videoList
+	},
+	data() {
+		return {
+			height: '64rpx',
+			baosList: [
+				{ image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
+				{ image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
+				{ image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
+				{ image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
+				{ image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' }
+			]
+		};
+	},
+	onPullDownRefresh() {
+		setTimeout(res => {
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	onLoad() {
+		this.getInfoList();
+	},
+	methods: {
+		// 修改高度
+		changHeight() {
+			console.log(this.height == 'auto');
+			if (this.height == '100%') {
+				this.height = '64rpx';
+			} else {
+				this.height = '100%';
+			}
+		},
+		getInfoList() {
+			let url = 'index/getClassInfo';
+			this.$api
+				.request(url, {
+					id: this.id
+				})
+				.then(res => {
+					if (res.code == '200') {
+						let data = res.data;
+						this.goodInfo = data;
+					}
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+	.vidLi {
+		width: 100%;
+		padding: 55rpx 35rpx 30rpx;
+		margin-bottom: 20rpx;
+		background-color: #fff;
+		align-items: flex-start;
+		.imgbox {
+			position: relative;
+			width: 176rpx;
+			height: 244rpx;
+			margin-right: 27rpx;
+			.left-img {
+				position: absolute;
+				top: 0;
+				left: 0;
+				height: 33rpx;
+				line-height: 33rpx;
+				font-size: 18rpx;
+				color: #fff;
+				padding: 0 5rpx;
+				background: #e84325;
+				border-radius: 7rpx;
+			}
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+		.title {
+			overflow: hidden;
+			font-size: 28rpx;
+			line-height: 40rpx;
+			margin-bottom: 12rpx;
+		}
+		.auth {
+			margin-top: 15rpx;
+			width: 100%;
+			position: relative;
+			.tit {
+				overflow: hidden;
+			}
+			.show {
+				height: 32rpx;
+				position: absolute;
+				background-color: #fff;
+				bottom: 0;
+				right: 0;
+			}
+		}
+	}
+	.conwarp {
+		background-color: #fff;
+		padding: 32rpx 30rpx 30rpx;
+		border-radius: 16rpx;
+		margin-bottom: 20rpx;
+		.gdHead {
+			line-height: 58rpx;
+			margin-bottom: 16rpx;
+			.head {
+				font-size: 34rpx;
+				font-family: PingFangSC-Medium, PingFang SC;
+				font-weight: 600;
+				color: #333333;
+				line-height: 48rpx;
+			}
+		}
+	}
+}
+</style>

+ 70 - 0
pages/index/school/componets/list.vue

@@ -0,0 +1,70 @@
+<template>
+	<view class="box">
+		<view v-if="flag == 1" class="boxlist">
+			<view @click="nextTo(item)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
+				<view class="imgbox">
+					<image :src="item.logo" mode=""></image>
+				</view>
+				<view class="dffd flex1">
+					<view class="title elli">{{item.name}}</view>
+					<view class="textgrey fontsm">{{item.up_name}}</view>
+				</view>
+			</view> 
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {};
+	},
+	props: {
+		list: {
+			type: Array,
+			default: []
+		},
+		flag: {
+			type: [String, Number],
+			default: 1
+		}
+	},
+	methods: {
+		nextTo(item){
+			uni.navigateTo({
+				url:'/pages/index/school/schoolInfo?id='+item.id
+			})
+		},
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.boxlist {
+	.vidLi {
+		width: 100%;
+		padding: 27rpx 0;
+		background-color: #fff; 
+		.imgbox { 
+			width: 120rpx;
+			height: 120rpx;
+			margin-right: 33rpx; 
+			border-radius: 10rpx;
+			image {
+				width: 100%;
+				height: 100%;
+				border-radius: 50%;
+			}
+		}
+		.title {
+			font-size: 28rpx;
+			line-height: 40rpx;
+			margin-bottom: 43rpx;
+		}
+		.auth {
+			margin-top: 15rpx;
+			width: 100%;
+		}
+	}
+}
+</style>

+ 110 - 0
pages/index/school/school.vue

@@ -0,0 +1,110 @@
+<template>
+	<view class="pageCon">
+		<view class="top dfsb">
+			<view @click="sectionChange(item.id)" :class="[type == item.id ? 'sel' : '', 'li']" v-for="(item, index) in school_type" :key="index">{{ item.name }}</view>
+		</view>
+		<view class="conwarp"><list :flag="1" :list="schoolList"></list></view>
+	</view>
+</template>
+
+<script>
+import list from './componets/list.vue';
+export default {
+	components: {
+		list
+	},
+	data() {
+		return {
+			school_type: [],
+			type: 0,
+			schoolList: [
+				// { image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
+			],
+			page: 1,
+			pagnum: 6
+		};
+	},
+	onPullDownRefresh() {
+		this.page = 1;
+		this.schoolList = [];
+		setTimeout(res => {
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	onLoad(opt) {
+		this.type = opt.type || '';
+		this.getInfoList();
+	},
+	onReachBottom() {
+		if (this.status == 'nomore') return;
+		this.status = 'loading';
+		this.page = ++this.page;
+		this.getInfoList();
+	},
+	methods: {
+		sectionChange(index) {
+			this.type = index;
+			this.page = 1;
+			this.schoolList = [];
+			this.getInfoList();
+		},
+		getInfoList() {
+			this.status = 'loadmore';
+			this.$api
+				.request('index/getSchoolList', {
+					type: this.type,
+					page: this.page,
+					limit: this.pagnum
+				})
+				.then(data => {
+					console.log(data);
+					if (data.code == 200) {
+						this.school_type = data.data.school_type;
+						this.schoolList = this.schoolList.concat(data.data.list);
+						if (data.data.list.length < this.pagnum) {
+							this.status = 'nomore';
+						}
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		toNext(url) {
+			uni.navigateTo({
+				url: url
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.pageCon {
+	.top {
+		padding: 22rpx 0;
+		background-color: #fff;
+		justify-content: center;
+		.li {
+			padding: 11rpx 18rpx;
+			border: 1px solid #666666;
+			margin-left: -1rpx;
+			&:first-of-type {
+				border-radius: 8rpx 0 0 8rpx;
+			}
+			&:last-of-type {
+				border-radius: 0 8rpx 8rpx 0;
+			}
+		}
+		.sel {
+			border: 1px solid #025b58;
+			background: rgba(2, 91, 88, 0.1);
+			color: #025b58;
+		}
+	}
+	.conwarp {
+		background: #ffffff;
+		margin-top: 20rpx;
+		padding: 0 30rpx;
+	}
+}
+</style>

+ 226 - 0
pages/index/school/schoolInfo.vue

@@ -0,0 +1,226 @@
+<template>
+	<view class="content">
+		<view class="box">
+			<view class="vidLi">
+				<view class="libox dfsb">
+					<view class="imgbox dfsb"><image :src="newsInfo.logo" mode=""></image></view>
+					<view class="dffd flex1">
+						<view class="title">{{ newsInfo.name }}</view>
+						<view class="subtit">
+							<text v-for="(item, ind) in newsInfo.tags" :key="ind" class="fontssm">{{ item }}</text>
+						</view>
+					</view>
+				</view>
+				<view class="vidinfo dfsb">
+					<view class="li dffs fontssm">
+						<image src="/static/img/pro/scadd.png" mode=""></image>
+						{{ newsInfo.type_name }}
+					</view>
+					<view class="li dffs fontssm">
+						<image src="/static/img/pro/scthr.png" mode=""></image>
+						<!-- flag   1 = 公办 2 = 民办 -->
+						{{ newsInfo.flag == 1 ? '公办' : '民办' }}
+					</view>
+					<view class=" li dffs fontssm">
+						<image src="/static/img/pro/scadd.png" mode=""></image>
+						{{ newsInfo.address }}
+					</view>
+				</view> 
+			</view>
+		</view>
+		<view class="conwarp">
+			<view class="gdHead bb">学校简介</view>
+			<view class="auth">
+				<view :style="{ height: height1 }" class="tit fontssm textgrey"><u-parse :content="newsInfo.content"></u-parse></view>
+				<text @click="changHeight(1)" class="fontssm show green">{{ height1 == '100%' ? '收起' : '查看全部' }}</text>
+			</view>
+		</view>
+		<view class="conwarp">
+			<view class="gdHead bb">办学优势</view>
+			<view class="auth">
+				<view :style="{ height: height2 }" class="tit fontssm textgrey"><u-parse :content="newsInfo.advantage"></u-parse></view>
+				<text @click="changHeight(2)" class="fontssm show green">{{ height2 == '100%' ? '收起' : '查看全部' }}</text>
+			</view>
+		</view>
+		<view class="conwarp">
+			<view class="gdHead bb">专业设置</view>
+			<view class="auth">
+				<view :style="{ height: height3 }" class="tit fontssm textgrey"><u-parse :content="newsInfo.major"></u-parse></view>
+				<text @click="changHeight(3)" class="fontssm show green">{{ height3 == '100%' ? '收起' : '查看全部' }}</text>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			id: '',
+			height1: '196rpx',
+			height2: '196rpx',
+			height3: '196rpx',
+			newsInfo: {}
+		};
+	},
+	onPullDownRefresh() {
+		setTimeout(res => {
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	onLoad(opt) {
+		this.id = opt.id;
+		this.getInfoList();
+	},
+	methods: {
+		// 修改高度
+		changHeight(val) {
+			if (val == 1) {
+				if (this.height1 == '100%') {
+					this.height1 = '196rpx';
+				} else {
+					this.height1 = '100%';
+				}
+			} else if (val == 2) {
+				if (this.height2 == '100%') {
+					this.height2 = '196rpx';
+				} else {
+					this.height2 = '100%';
+				}
+			} else {
+				if (this.height3 == '100%') {
+					this.height3 = '196rpx';
+				} else {
+					this.height3 = '100%';
+				}
+			}
+		},
+		getInfoList() {
+			this.$api
+				.request('index/getSchoolInfo', {
+					id: this.id
+				})
+				.then(data => {
+					console.log(data);
+					if (data.code == 200) {
+						let tags = data.data.up_name.split('|');
+						this.newsInfo = data.data;
+						this.newsInfo.tags = tags;
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+	.box {
+		width: 750rpx;
+		// height: 386rpx;
+		background: linear-gradient(360deg, rgba(147, 173, 158, 0) 0%, #14ac54 100%);
+		padding: 58rpx 30rpx 0rpx;
+	}
+	.vidLi {
+		width: 100%;
+		padding: 40rpx 38rpx 42rpx;
+		margin-bottom: 32rpx;
+		background-color: #fff;
+		border-radius: 20rpx;
+		.imgbox {
+			width: 95rpx;
+			height: 95rpx;
+			margin-right: 30rpx;
+			image {
+				width: 100%;
+				height: 100%;
+				border-radius: 50%;
+			}
+		}
+		.libox {
+			width: 100%;
+			margin-bottom: 30rpx;
+		}
+		.title {
+			overflow: hidden;
+			font-size: 30rpx;
+			line-height: 42rpx;
+		}
+		.subtit {
+			margin-top: 15rpx;
+			.fontssm {
+				padding: 3rpx 12rpx;
+				color: #14ac54;
+				background: rgba(20, 172, 84, 0.1);
+				border-radius: 6px;
+				border: 1px solid #14ac54;
+				margin-right: 15rpx;
+			}
+		}
+		.vidinfo {
+			padding: 24rpx 0;
+			background: rgba(#14ac54, 0.1);
+			border-radius: 13rpx 13rpx 0 0;
+			flex-wrap: wrap;
+			&:nth-of-type(2) {
+				border-radius: 0 0 13rpx 13rpx;
+			}
+
+			.li { 
+				padding: 0 30rpx;
+				justify-content: center;
+				align-items: center; 
+				image {
+					width: 34rpx;
+					height: 34rpx;
+					margin-right: 11rpx;
+				}
+				&:last-of-type{
+					margin-top: 20rpx;
+				}
+			}
+			.spec{
+				width: 100%;
+				justify-content: flex-start;
+			}
+		}
+	}
+	.conwarp {
+		background-color: #fff;
+		padding: 32rpx 30rpx 30rpx;
+		border-radius: 16rpx;
+		margin-bottom: 20rpx;
+		.gdHead {
+			padding: 15rpx 18rpx;
+			line-height: 58rpx;
+			margin-bottom: 16rpx;
+			font-size: 30rpx;
+			font-family: PingFangSC-Medium, PingFang SC;
+			font-weight: 500;
+			color: #333333;
+			line-height: 42rpx;
+			border-left: 5rpx solid #15ab54;
+		}
+		.auth {
+			margin-top: 15rpx;
+			width: 100%;
+			position: relative;
+			.tit {
+				font-size: 24rpx;
+				line-height: 40rpx;
+				overflow: hidden;
+			}
+			.show {
+				height: 38rpx;
+				line-height: 38rpx;
+				position: absolute;
+				background-color: #fff;
+				bottom: 0;
+				right: 0;
+			}
+		}
+	}
+}
+</style>

+ 141 - 0
pages/index/screenList.vue

@@ -0,0 +1,141 @@
+<template>
+	<view class="pageCon">
+		<view class="list">
+			<view class="title fontbase textgrey">选择科目</view>
+			<view class="libox dffs">
+				<view @click="changHandle(ite, 1)" :class="[ite.is_select ? 'lisel' : '', 'li']" v-for="(ite, ind) in lists.subject">{{ ite.name }}</view>
+			</view>
+		</view>
+		<view class="list">
+			<view class="title fontbase textgrey">选择年级</view>
+			<view class="libox dffs">
+				<view @click="changHandle(ite, 2)" :class="[ite.is_select ? 'lisel' : '', 'li']" v-for="(ite, ind) in lists.grade">{{ ite.name }}</view>
+			</view>
+		</view>
+		<view class="list">
+			<view class="title fontbase textgrey">选择年份</view>
+			<view class="libox dffs">
+				<view @click="changHandle(ite, 3)" :class="[ite.is_select ? 'lisel' : '', 'li']" v-for="(ite, ind) in lists.year">{{ ite.name }}</view>
+			</view>
+		</view>
+		<view class="fixBox btns dfsb">
+			<navigator open-type="navigateBack" class="btn">返回</navigator>
+			<view @click="sure()" class="btn two">确定</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			lists: {},
+			subject_id: '',
+			grade_id: '',
+			year: ''
+		};
+	},
+	onLoad(opt) {
+		this.onload();
+	},
+	methods: {
+		changHandle(ite, val) {
+			if (val == 1) {
+				this.lists.subject.forEach(item => {
+					if (ite.id == item.id) {
+						item.is_select = !item.is_select;
+						this.subject_id = item.is_select ? item.id : '';
+					} else {
+						item.is_select = false;
+					}
+				});
+			} else if (val == 2) {
+				this.lists.grade.forEach(item => {
+					if (ite.id == item.id) {
+						item.is_select = !item.is_select;
+						this.grade_id = item.is_select ? item.id : '';
+					} else {
+						item.is_select = false;
+					}
+				});
+			} else if (val == 3) {
+				this.lists.year.forEach(item => {
+					if (ite.id == item.id) {
+						item.is_select = !item.is_select;
+						this.year = item.is_select ? item.id : '';
+					} else {
+						item.is_select = false;
+					}
+				});
+			}
+		},
+		onload() {
+			this.$api.request('common/getScreen').then(data => {
+				console.log(data);
+				if (data.code == 200) {
+					this.lists = data.data;
+				} else {
+					this.$api.toast(data.msg);
+				}
+			});
+		},
+		sure() {
+			this.$api.prePage().subject_id = this.subject_id;
+			this.$api.prePage().grade_id = this.grade_id;
+			this.$api.prePage().year = this.year;
+			this.$api.prePage().search();
+			uni.navigateBack({
+				delta: 1
+			});
+			console.log(this.$api.prePage());
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.pageCon {
+	background-color: #fff;
+	padding: 30rpx 30rpx 120rpx;
+
+	.list {
+		.title {
+			margin-bottom: 30rpx;
+		}
+		.libox {
+			margin-bottom: 35rpx;
+			flex-wrap: wrap;
+			.li {
+				padding: 0 15rpx;
+				font-size: 26rpx;
+				height: 64rpx;
+				line-height: 64rpx;
+				border-radius: 9rpx;
+				border: 1rpx solid #979797;
+				margin-bottom: 26rpx;
+				margin-right: 42rpx;
+			}
+			.lisel {
+				color: #fff;
+				border: 1rpx solid #e8973e;
+				background-color: #e8973e;
+			}
+		}
+	}
+	.btns {
+		.btn {
+			width: 46%;
+			height: 80rpx;
+			line-height: 80rpx;
+			background: #e8973f;
+			border-radius: 11rpx;
+			text-align: center;
+			color: #fff;
+			font-size: 30rpx;
+		}
+		.two {
+			background: #ed742e;
+		}
+	}
+}
+</style>

+ 204 - 0
pages/index/search.vue

@@ -0,0 +1,204 @@
+<template>
+	<view class="indList">
+		<view class="navTit dffs">
+			<!-- <input type="text" v-model="keyword" placeholder="输入关键词搜索课程" @search="searchThis"/> -->
+			<u-search class="input" bgColor="#FAFAFA" :show-action="false" placeholder="输入关键词搜索课程" v-model="keyword" @search="searchThis" @change="searchThis"></u-search>
+			<view class="search fontsm">搜索</view>
+		</view>
+		<view v-if="newsInfo.length < 1" class="hisPage">
+			<view class="pagebox">
+				<view class="title blod dfsb">
+					历史搜索
+					<u-icon name="trash"></u-icon>
+				</view>
+				<view class="con dffs">
+					<view class="textcon" @click="searchThis(item)" v-for="(item, ind) in hotInfo" :key="ind">{{ item }}</view>
+				</view>
+			</view>
+		</view>
+		<!-- <view v-if="list.length > 1" class="listBox dffs">
+			<text @tap="cliTab(ind)" :class="tabsel == ind ? 'sel' : ''" v-for="(item, ind) in list">{{ item }}</text>
+		</view> -->
+		<view class="newsBox">
+			<view class="title">文档</view>
+			<view class="box">
+				<course-list :list="newsInfo.class_list"></course-list>
+				<navigator :url="'/pages/index/classList?flag=2&keyword='+keyword" class="center textgrey fontsm">
+					查看更多文档>
+				</navigator>
+			</view>
+		</view>
+		<view v-if="vedio_status == 1" class="newsBox">
+			<view class="title">视频</view>
+			<view class="box">
+				<video-list :list="newsInfo.video_list"></video-list>
+				<navigator :url="'/pages/index/video/video?keyword='+keyword" class="center textgrey fontsm">
+					查看更多视频>
+				</navigator>
+			</view>
+		</view>
+		<view class="newsBox">
+			<view class="title">实物</view>
+			<view class="box">
+				<shop-list :list="newsInfo.goods_list"></shop-list>
+				<navigator :url="'/pagesA/mall/mall?type=1&keyword='+keyword" class="center textgrey fontsm">
+					查看更多实物>
+				</navigator>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import courseList from './components/knowVidList.vue';
+import videoList from './video/componets/list.vue';
+import shopList from '@/components/shopList.vue';
+export default {
+	components: {
+		courseList,
+		videoList,
+		shopList
+	},
+	data() {
+		return {
+			vedio_status:0,
+			keyword: '',
+			newsInfo: {},
+			status: 'nomore', //loading / nomore
+			page: 1,
+			pagenum: 6
+		};
+	},
+	onLoad(param) {
+		this.vedio_status = param.vedio_status;
+	},
+	onShow() {
+		// this.loading();
+	},
+	onReachBottom() {
+		// if (this.status == 'nomore') return;
+		// this.status = 'loadmore';
+		// this.page = ++this.page;
+		// this.searchThis();
+	},
+	methods: {
+		cliTab(val) {
+			this.tabsel = val;
+			this.status = 'loadmore';
+			this.page = 1;
+			this.newsInfo = [];
+			this.getList();
+		},
+		//搜索
+		searchThis(val) {
+			this.keyword = val;
+			this.page = 1;
+			this.newsInfo = [];
+			this.status = 'loadmore';
+			this.getList();
+		},
+		loading() {
+			this.$api
+				.request('index/getHotSearch')
+				.then(data => {
+					console.log(data);
+					if (data.code == 200) {
+						this.hotInfo = data.data;
+					} else {
+						this.$api.toast(data.msg);
+					}
+				}) 
+		},
+		getList() {
+			this.$api
+				.request('index/searchList', {
+					keyword: this.keyword
+				})
+				.then(data => {
+					console.log(data);
+					if (data.code == 200) { 
+						this.newsInfo = data.data;
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.indList {
+	min-height: 100vh;
+	padding: 96rpx 0 30rpx;
+	.listBox {
+		padding: 30rpx;
+		background-color: #fff;
+		text {
+			margin-right: 30rpx;
+		}
+		.sel {
+			color: $base-color;
+		}
+	}
+	.navTit {
+		position: fixed;
+		width: 691rpx;
+		height: 96rpx;
+		top: 0;
+		/* #ifdef H5 */
+		top: 100rpx;
+		/* #endif */
+		left: 30rpx;
+		height: 68rpx;
+		line-height: 68rpx;
+		border: 2px solid #31c671;
+		border-radius: 40rpx;
+		.search {
+			width: 146rpx;
+			height: 62rpx;
+			line-height: 62rpx;
+			background: #31c671;
+			color: #fff;
+			border-radius: 37rpx;
+			font-size: 26rpx;
+			text-align: center;
+		}
+	}
+	.hisPage {
+		padding: 30rpx 31rpx 0;
+		.pagebox {
+			margin-bottom: 37rpx;
+			.title {
+				font-size: 36rpx;
+				margin-left: 26rpx;
+			}
+			.con {
+				flex-wrap: wrap;
+				margin-top: 22rpx;
+				.textcon {
+					// min-width: 130rpx;
+					text-align: center;
+					padding: 10rpx 30rpx;
+					font-size: 24rpx;
+					background-color: #f5f5f5;
+					border-radius: 27rpx;
+					margin-right: 13rpx;
+					margin-bottom: 15rpx;
+				}
+			}
+		}
+	}
+	.newsBox {
+		margin-bottom: 30rpx;
+		padding: 30rpx;
+		background-color: #fff;
+		.box{
+			.center{
+				padding-top: 30rpx;
+				border-top: 1rpx solid #F5F5F5;
+			}
+		}
+	}
+}
+</style>

+ 27 - 0
pages/index/template.vue

@@ -0,0 +1,27 @@
+<template>
+	<view class="pageCon">
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		onLoad(opt) {
+			
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.pageCon{
+	
+}
+</style>

+ 76 - 0
pages/index/video/componets/list.vue

@@ -0,0 +1,76 @@
+<template>
+	<view class="box">
+		<view class="boxlist">
+			<view @click="nextTo(item)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
+				<image class="imgbox" :src="item.img" mode=""></image>
+				<view class="dffd flex1">
+					<view class="title elli">{{ item.title }}</view>
+					<view class="textgrey fontsm">{{ item.up_name }}</view>
+					<view v-if="flag == 2" class="auth dfsb">
+						<text class="fontssm textgrey">作者:{{ item.up_name }}</text>
+						<text class="fontssm textgrey">{{ item.see_num }}人下载</text>
+					</view>
+				</view>
+				<image v-if="flag == 3" class="down" src="/static/img/pro/navdown.png" mode=""></image>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {};
+	},
+	props: {
+		list: {
+			type: Array,
+			default: []
+		},
+		flag: {
+			type: [String, Number],
+			default: 1
+		}
+	},
+	methods: {
+		nextTo(item) {
+			uni.navigateTo({
+				url: '/pages/index/video/videoInfo?id='+item.id
+			});
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.boxlist {
+	.vidLi {
+		width: 100%;
+		padding: 27rpx 0;
+		background-color: #fff;
+		&:nth-of-type(2n) {
+			margin-right: 0;
+		}
+		.imgbox {
+			width: 146rpx;
+			height: 146rpx;
+			margin-right: 18rpx;
+			border-radius: 10rpx;
+		}
+		.title {
+			font-size: 28rpx;
+			line-height: 40rpx;
+			margin-bottom: 12rpx;
+		}
+		.auth {
+			margin-top: 15rpx;
+			width: 100%;
+		}
+		.down {
+			width: 35rpx;
+			height: 30rpx;
+			margin-left: 58rpx;
+		}
+	}
+}
+</style>

+ 171 - 0
pages/index/video/video.vue

@@ -0,0 +1,171 @@
+<template>
+	<view class="pageCon">
+		<view class="top bb scrollx ">
+			<view @click="sectionChange(item, 1)" :class="[cat == item.id ? 'sel' : '', 'li']"
+				v-for="(item, index) in vedio_cats" :key="index">{{ item.name }}</view>
+		</view>
+		<view class="top scrollx ">
+			<view @click="sectionChange(item, 2)" :class="[two_cat == item.id ? 'sel' : '', 'li']"
+				v-for="(item, index) in vedio_two_cats" :key="index">{{ item.name }}</view>
+		</view>
+		<view class="conwarp">
+			<list :flag="1" :list="video_list"></list>
+		</view>
+	</view>
+</template>
+
+<script>
+	import list from './componets/list.vue';
+	export default {
+		components: {
+			list
+		},
+		data() {
+			return {
+				cat: '',
+				two_cat: 0, //二级分类
+				keyword: '',
+				nav_id: 0,
+				vedio_cats: [],
+				vedio_two_cats: [],
+				video_list: [
+					// { image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
+				],
+				page: 1,
+				pagnum: 10
+			};
+		},
+		onPullDownRefresh() {
+			this.page = 1;
+			this.video_list = [];
+			this.getInfoList();
+			setTimeout(res => {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		onReachBottom() {
+			if (this.status == 'nomore') return;
+			this.status = 'loading';
+			this.page = ++this.page;
+			this.getInfoList();
+		},
+		onLoad(opt) {
+			this.nav_id = opt.nav_id || '';
+			this.keyword = opt.keyword || '';
+			this.cat = opt.cat || '';
+			this.getInfoList();
+		},
+		methods: {
+			sectionChange(item, key) {
+				if (key == 2) {
+					this.two_cat = item.id;
+					this.page = 1;
+					this.video_list = [];
+					this.getInfoList();
+				} else if (key == 1) {
+					this.two_cat = 0;
+					this.cat = item.id;
+					this.page = 1;
+					this.video_list = [];
+					this.getInfoList();
+					uni.setNavigationBarTitle({
+						title: item.name
+					});
+				}
+			},
+			getInfoList() {
+				this.status = 'loadmore';
+				this.$api
+					.request('index/getVideoList', {
+						is_top: 0,
+						keyword: this.keyword || '',
+						nav_id: this.nav_id,
+						cat: this.cat,
+						two_cat: this.two_cat || '',
+						page: this.page,
+						limit: this.pagnum
+					})
+					.then(data => {
+						console.log(data);
+						if (data.code == 200) {
+							this.vedio_cats = data.data.vedio_cats;
+							if (!this.cat) {
+								this.cat = this.vedio_cats[0].id;
+								uni.setNavigationBarTitle({
+									title: this.vedio_cats[0].name
+								});
+							} 
+							// 没有二级分类 调取
+							// if (!this.two_cat) {
+							// 	return;
+							// }
+							this.getTwoList();
+							this.video_list = this.video_list.concat(data.data.video_list);
+							if (data.data.video_list.length < this.pagnum) {
+								this.status = 'nomore';
+							}
+						} else {
+							this.$api.toast(data.msg);
+						}
+					});
+			},
+			getTwoList() {
+				this.$api
+					.request('index/getTwoCate', {
+						id: this.cat
+					})
+					.then(data => {
+						console.log(data);
+						if (data.code == 200) {
+							this.vedio_two_cats = data.data;
+							console.log(this.vedio_two_cats, data.data);
+							if (!this.two_cat) {
+								this.two_cat = this.vedio_two_cats[0].id || '0';
+							}
+							// 调取列表
+							// this.page = 1;
+							// this.video_list = [];
+							// this.getInfoList();
+						} else {
+							this.$api.toast(data.msg);
+						}
+					});
+			},
+			toNext(url) {
+				uni.navigateTo({
+					url: url
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.pageCon {
+		.top {
+			padding: 22rpx 10rpx 20rpx;
+			background-color: #fff;
+
+			.li {
+				padding: 8rpx 15rpx;
+				background-color: #f2f2f2;
+				margin-right: 20rpx;
+				color: #999;
+				border-radius: 20rpx;
+				font-size: 22rpx;
+			}
+
+			.sel {
+				border: 1px solid #025b58;
+				background: rgba(2, 91, 88, 0.1);
+				color: #025b58;
+			}
+		}
+
+		.conwarp {
+			background: #ffffff;
+			margin-top: 20rpx;
+			padding: 0 30rpx;
+		}
+	}
+</style>

+ 261 - 0
pages/index/video/videoInfo.vue

@@ -0,0 +1,261 @@
+<template>
+	<view class="container">
+		<view class="conwarp">
+			<view class="gdHead dffs">
+				<view class="head flex1">{{ goodInfo.title }}</view>
+				<text v-for="(item, index) in goodInfo.tags.split('|')" class="desc">{{ item }}</text>
+			</view>
+			<view class="subtit textgrey fontssm">{{ goodInfo.desc }}</view>
+			<!-- -->
+			<view class="cl-one"><video id='myVideo' class="vidBox" @timeupdate="timeupdate" @play="play"
+					:initial-time="0" :src="goodInfo.files" controls></video></view>
+		</view>
+		<view class="conwarp">
+			<view class="gdHead">
+				<view class="head">课程简介</view>
+			</view>
+			<view class="cl-one">
+				<view class="xqcont">
+					<u-parse :content="goodInfo.content"></u-parse>
+				</view>
+			</view>
+		</view>
+		<view v-if="goodInfo.is_pay != 0 && goodInfo.my_is_pay == 0" class="fixBox dfsb">
+			<view @tap="toPay()" class="li flex1 dffs">
+				<image src="/static/img/pro/navlidown.png" mode=""></image>
+				普通购买
+			</view>
+			<block v-if="goodInfo.is_vip == 1">
+				<view class="line"></view>
+				<view @tap="toPay()" class="li flex1 dffs">
+					<image src="/static/img/pro/navlivdown.png" mode=""></image>
+					会员购买
+				</view>
+			</block>
+		</view>
+	</view>
+</template>
+<script>
+	export default {
+		data() {
+			return {
+				id: 0, //商品id
+				type: '',
+				goodInfo: {
+					tags: ''
+				}
+			};
+		},
+
+		onLoad(option) {
+			this.id = option.id || '';
+			this.type = option.type || '';
+			this.loadData();
+		},
+
+		onReady: function(res) {
+			this.videoContext = uni.createVideoContext('myVideo')
+		},
+
+		methods: {
+			timeupdate(e) {
+				console.log(parseInt(e.detail.currentTime));
+				// is_pay  0 免费  1 付费  my_is_pay 0 未购买  1 已购买
+				if (this.goodInfo.is_pay != 0 && this.goodInfo.my_is_pay != 1) {
+					console.log(11);
+					// is_vip/是否是会员:  0=否  1=是   see_time 可试看时长:  秒
+					if (parseInt(e.detail.currentTime) >= parseInt(this.goodInfo.see_time)) {
+						// e.detail.currentTime = 0;
+						this.$api.toast('请购买后观看完整视频');
+						setTimeout(res => {
+							this.videoContext.pause()
+							this.videoContext.seek(0);
+						}, 800);
+					}
+				}
+			},
+			play(e) {
+				let url = 'index/setSee';
+				this.$api
+					.request(url, {
+						id: this.id
+					})
+					.then(res => {
+						if (res.code != '200') {
+							this.$api.toast(res.msg);
+						}
+					});
+			},
+			/**
+			 * 请求数据只是为了代码不那么乱
+			 * 分次请求未作整合
+			 */
+			async loadData() {
+				let url = 'index/getVideoInfo';
+				this.$api
+					.request(url, {
+						id: this.id
+					})
+					.then(res => {
+						if (res.code == '200') {
+							let data = res.data;
+							this.goodInfo = data;
+						} else {
+							this.$api.toast(res.msg);
+						}
+					});
+			},
+
+			//去支付购买
+			toPay() {
+				uni.navigateTo({
+					url: '/pages/pay/payVid?item=' + JSON.stringify(this.goodInfo)
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.container {
+		.conwarp {
+			background-color: #fff;
+			padding: 26rpx 30rpx 39rpx;
+			border-radius: 16rpx;
+			margin-bottom: 20rpx;
+
+			.gdHead {
+				line-height: 58rpx;
+				margin-bottom: 16rpx;
+
+				.head {
+					font-size: 34rpx;
+					font-family: PingFangSC-Medium, PingFang SC;
+					font-weight: 600;
+					color: #333333;
+					line-height: 48rpx;
+				}
+
+				.desc {
+					background: #f89638;
+					border-radius: 5rpx;
+					font-size: 18rpx;
+					height: 32rpx;
+					line-height: 32rpx;
+					padding: 0rpx 8rpx;
+					display: inline-block;
+					color: #fff;
+					margin-left: 10rpx;
+
+					&:nth-of-type(2) {
+						background: #7fc06e;
+					}
+
+					&:nth-of-type(3) {
+						background: #75b2c4;
+					}
+
+					&:nth-of-type(4) {
+						background: #8875c0;
+					}
+				}
+			}
+
+			.subtit {
+				margin-top: 10rpx;
+			}
+
+			.cl-one {
+				.vidBox {
+					margin-top: 30rpx;
+					width: 690rpx;
+					height: 335rpx;
+				}
+
+				.xqcont {
+					min-height: 800rpx;
+					width: 100%;
+					align-items: center;
+					position: relative;
+
+					.xqleft {
+						position: absolute;
+						top: 100rpx;
+						right: 0;
+						align-items: center;
+						justify-content: center;
+
+						.small {
+							width: 54rpx;
+							height: 54rpx;
+						}
+
+						.big {
+							width: 108rpx;
+							height: 108rpx;
+						}
+
+						.word {
+							margin: 8rpx 0 48rpx;
+							font-size: 20rpx;
+							color: #999;
+						}
+					}
+
+					.btnsBox {
+						align-items: center;
+
+						.small {
+							width: 90rpx;
+							height: 90rpx;
+							margin: 60rpx 0 16rpx;
+							opacity: 0.8;
+						}
+
+						.btns {
+							margin: 70rpx 60rpx 0;
+							width: 154rpx;
+							height: 54rpx;
+							background: #f6f6f6;
+							border-radius: 31px;
+							align-items: center;
+							padding: 0 15rpx;
+							justify-content: space-around;
+
+							.icon {
+								width: 35rpx;
+								height: 31rpx;
+							}
+
+							.word {
+								font-size: 22rpx;
+								color: #666;
+						}
+							}
+					}
+				}
+			}
+		}
+
+		.fixBox {
+			padding: 34rpx;
+
+			.line {
+				width: 1rpx;
+				height: 20rpx;
+				background: #b7b7bd;
+			}
+
+			.li {
+				justify-content: center;
+				color: #7fc06e;
+
+				image {
+					width: 42rpx;
+					height: 32rpx;
+					margin-right: 20rpx;
+				}
+			}
+		}
+	}
+</style>

+ 169 - 0
pages/login/login.vue

@@ -0,0 +1,169 @@
+<template>
+	<view class="login">
+		<view>
+			<view>
+				<view class="header">
+					<image src="/static/img/tabbar/logo.jpg"></image>
+					<text>郑州新明一中学生资料库</text>
+				</view>
+				<view class="content">
+					<view>申请获取以下权限</view>
+					<text>获得你的公开信息(手机号,昵称,头像等)</text>
+				</view>
+
+				<!-- <button class='bottom' type='primary' open-type="getUserInfo" lang="zh_CN" @getuserinfo="getUserInfo">
+		                    授权登录
+		                </button> -->
+				<u-button v-if="!show" class="bottom" type="success" open-type="getUserInfo" @click="getUserProfile">授权登录</u-button>
+				<u-button v-if="show" class="bottom" type="success" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">手机号绑定</u-button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+// import store from '@/store/index.js'
+export default {
+	data() {
+		return {
+			// SessionKey: '',
+			// OpenId: '',
+			// nickName: null,
+			// avatarUrl: null,
+			userInfo: {},
+			// 手机号授权
+			show: false,
+			info: {}
+		};
+	},
+	onLoad() {},
+	onShow() {},
+	computed: {},
+	methods: {
+		getPhoneNumber(e) {
+			if (e.detail.errMsg == 'getPhoneNumber:fail user deny') {
+				this.$api.toast('您已拒绝提供手机号');
+			} else {
+				let that = this;
+				uni.login({
+					provider: 'weixin',
+					success: res2 => {
+						// console.log(this.userInfo)
+						let params = {
+							token: that.info.token,
+							code: res2.code,
+							iv: e.detail.iv,
+							encryptedData: e.detail.encryptedData
+						};
+						that.$api.request('user/bindPhone', params).then(res => {
+							console.log("手机号登录授权",res);
+							if (res.code == 200) {
+								that.$api.toast('手机号绑定成功!');
+								uni.setStorageSync('us_token', res.data.token);
+								this.$store.dispatch('getUserInfo');
+								uni.reLaunch({
+									url: '/pages/index/index'
+								});
+							} else {
+								that.$api.toast(res.msg);
+							}
+						});
+					},
+					fail: () => {
+						uni.showToast({
+							title: '微信登录授权失败',
+							icon: 'none'
+						});
+					}
+				});
+			}
+		},
+
+		// 获取用户信息
+		getUserProfile() {
+			let that = this;
+			wx.getUserProfile({
+				desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
+				success: res => {
+					console.log(res);
+					// 用户信息
+					that.userInfo = res.userInfo;
+					// 获取code
+					uni.login({
+						provider: 'weixin',
+						success: res2 => {
+							that.$api
+								.request('login/toLogin', {
+									code: res2.code,
+									avatar: that.userInfo.avatarUrl,
+									nickname: that.userInfo.nickName,
+									yqm: uni.getStorageSync('yqm')||'',
+								})
+								.then(res3 => {
+									console.log("单纯授权",res3);
+									//是否绑定手机号: 0= 否  1=是
+									if (res3.data.is_bind_phone == 0) {
+										that.$api.toast('请绑定手机号');
+										that.show = true;
+										that.info = res3.data;
+									} else {
+										uni.setStorageSync('us_token', res3.data.token);
+										uni.reLaunch({
+											url: '/pages/index/index'
+										});
+										this.$store.dispatch('getUserInfo');
+									}
+								});
+						},
+						fail: () => {
+							uni.showToast({
+								title: '微信登录授权失败',
+								icon: 'none'
+							});
+						}
+					});
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.header {
+	margin: 90rpx 0 90rpx 50rpx;
+	border-bottom: 2rpx solid #ccc;
+	text-align: center;
+	width: 650rpx;
+	height: 300rpx;
+	// line-height: 450rpx;
+}
+
+.header image {
+	width: 200rpx;
+	height: 200rpx;
+	margin: 0 auto;
+}
+
+.header text{
+	margin-top: 25rpx;
+}
+
+
+.content {
+	margin-left: 50rpx;
+	margin-bottom: 90rpx;
+}
+
+.content text {
+	display: block;
+	color: #9d9d9d;
+	margin-top: 40rpx;
+}
+
+.bottom {
+	border-radius: 80rpx;
+	margin: 70rpx 50rpx;
+	font-size: 35rpx;
+}
+</style>

+ 304 - 0
pages/news/news.vue

@@ -0,0 +1,304 @@
+<template>
+	<view id="index">
+		<view class="malNotBox">
+			<view class="notList dfsb">
+				<view class="gogo">
+					<view v-for="(val, index) in headList" :key="index" @tap="goList(val.id)" :class="[headSel == val.id ? 'select' : '', 'headli']">{{ val.name }}</view>
+				</view>
+				<view class="selmore"><uicon color="#666" size="12" @tap="showSel = !showSel" :type="!showSel ? 'iconzixunfenleix' : 'iconzixunshouqix'"></uicon></view>
+			</view>
+			<view v-if="showSel" class="selLists">
+				<view @tap="goList(item.id)" :class="['selList', headSel == item.id ? 'selbtn' : '']" v-for="(item, index) in headList" :key="index">{{ item.name }}</view>
+				<view @tap="showSel = false" class="btn">关闭</view>
+			</view>
+		</view>
+		<view class="notCon">
+			<newsBox :newsInfo="pageList"></newsBox>
+			<view class="nodata" v-if="pageList.length < 1"><u-empty icon-size="200" text="还没有新闻哦" mode="news"></u-empty></view>
+			<view class="moredata" v-if="pageList.length > 0"><u-loadmore bg-color="#fff" :status="status" /></view>
+		</view>
+	</view>
+</template>
+<script>
+import newsBox from 'components/ycommon/newsPage.vue';
+export default {
+	components: {
+		newsBox
+	},
+	data() {
+		return {
+			showSel: false, //展示更多选择
+			headSel: 0, //tab选择项
+			headList: [],
+			pageList: [
+				// {
+				// 	title: '测试标题要长一点哦再来点 随便写点吧',
+				// 	name: '我哦',
+				// 	hits: 456,
+				// 	img: '../../static/images/common/buy-z.png'
+				// }
+			],
+			banner: '',
+			page: 1,
+			pagenum:6,
+			status: 'loadmore'
+		};
+	},
+	onShow() { 
+		this.page = 1;
+		this.pageList = [];
+		this.getCat();
+	},
+	onReachBottom() {
+		if (this.status == 'nomore') return;
+		this.status = 'loadmore';
+		this.page = ++this.page;
+		this.loading();
+	},
+	methods: {
+		//小说 跳转
+		toLink(id) {
+			uni.navigateTo({
+				url: './newsInfo?flag=2&id=' + id
+			});
+		},
+		getCat(){
+			this.$api
+				.request('index/getNewsCate', { 
+				},'get')
+				.then(data => {
+					console.log(data);
+					if (data.code == '200') {
+						this.headList = data.data; 
+						this.headSel=data.data[0].id
+						this.loading();
+					} else {
+						this.$api.toast(data.msg);
+					}
+				})
+				.catch(function(error) {
+					console.log(error);
+				});
+		},
+		loading() {
+			this.$api
+				.request('news/getNews', {
+					nc_id: this.headSel, 
+					page: this.page,  
+					limit: this.pagenum, 
+				},'get')
+				.then(data => {
+					console.log(data);
+					if (data.code == '200') { 
+						this.pageList = this.pageList.concat(data.data.list);
+						// 数据全部加载完成
+						if (data.data.list.length < this.pagenum) {
+							  this.status = 'nomore'  
+						}
+					} else {
+						this.$api.toast(data.msg);
+					}
+				})
+				.catch(function(error) {
+					console.log(error);
+				});
+		},
+		//子分类下
+		goList(id) {
+			this.headSel = id;
+			this.showSel = false;
+			this.page = 1;
+			this.pageList = [];
+			this.loading();
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+#index {
+	padding-top: 80rpx;
+	min-height: 100vh;
+	background-color: #fff;
+	.malNotBox {
+		background-color: #fff;
+		position: fixed;
+		top: 0;
+		//#ifdef H5
+		top: 44px;
+		//#endif
+		left: 0;
+		width: 100%;
+		z-index: 80;
+		.notList {
+			width: 100%;
+			padding: 0 30rpx;
+			border-bottom: 1rpx solid #eee;
+			.selmore {
+				height: 60rpx;
+				padding-left: 20rpx;
+			}
+			.gogo {
+				flex: 1;
+				white-space: nowrap; /*文本不会换行,文本会在在同一行上继续*/
+				display: -webkit-box;
+				overflow-x: auto;
+				/*适应苹果*/
+				-webkit-overflow-scrolling: touch;
+				//父盒子隐藏滚动条
+				&::-webkit-scrollbar {
+					display: none;
+				} 
+				.headli {
+					font-family: PingFangSC-Medium;
+					height: 60rpx;
+					font-size: 28rpx;
+					text-align: center;
+					margin-right: 60rpx;
+					color: #666;
+				}
+				.select {
+					border-radius: 4rpx;
+					font-size: 32rpx;
+					color: #ae7a58;
+					border-bottom: 3px solid #ae7a58;
+					font-family: PingFangSC-Semibold, PingFang SC;
+					font-weight: 500;
+				}
+			}
+		}
+		.selLists {
+			position: relative;
+			padding: 42rpx 40rpx 400rpx;
+			width: 100%;
+			height: 100vh;
+			background-color: #fff;
+			overflow: scroll;
+			// box-shadow: 0rpx 2rpx 0rpx 2rpx rgba(0, 0, 0, 0.1);
+			.selList {
+				float: left;
+				min-width: 112rpx;
+				padding: 0 30rpx;
+				margin: 0 20rpx 40rpx;
+				line-height: 50rpx;
+				border-radius: 32rpx;
+				text-align: center;
+				font-size: 28rpx;
+				border: 1px solid $prosecond;
+				color: $prosecond;
+			}
+			.selbtn {
+				background-color: $prosecond;
+				color: #fff;
+			}
+			.btn {
+				position: fixed;
+				bottom: 110rpx;
+				left: 50%;
+				margin-left: -348rpx;
+				width: 690rpx;
+				text-align: center;
+				height: 88rpx;
+				line-height: 88rpx;
+				border-radius: 44rpx;
+				border: 1rpx solid $prosecond;
+				font-size: 36rpx;
+				color: $prosecond;
+				background-color: #fff;
+			}
+		}
+	}
+	//#ifndef H5
+	.malNotBox {
+		top: 0rpx;
+		.selLists {
+			padding: 42rpx 40rpx 200rpx;
+		}
+		.btn {
+			position: fixed;
+			bottom: 10rpx;
+		}
+		.selmore {
+			// position: fixed;
+			// top: 12rpx;
+		}
+	}
+	//#endif
+	.notBgc {
+		margin: 0 auto;
+		width: 690rpx;
+		height: 314rpx;
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.notCon {
+		position: relative;
+		top: 0rpx;
+		margin: 0rpx 30rpx 0rpx;
+		z-index: 69;
+		background-color: #fff;
+		border-radius: 30rpx 30rpx 0 0;
+		.van-cell {
+			padding: 0;
+		}
+		.notConPic {
+			height: 314rpx;
+			width: 100%;
+			background-color: #f5f5f5;
+			border-radius: 30rpx;
+		}
+		.van-swipe {
+			height: 314rpx;
+			width: 100%;
+			background-color: #f5f5f5;
+			border-radius: 16rpx;
+			img {
+				width: 100%;
+				height: 100%;
+			}
+		}
+		.notConArt {
+			border-bottom: 1px solid #ececec;
+			padding: 32rpx 0;
+			.artTit {
+				width: 432rpx;
+				.elli {
+					width: 432rpx;
+					font-size: 32rpx;
+					font-weight: 400;
+					height: 88rpx;
+					line-height: 44rpx;
+					text-overflow: -o-ellipsis-lastline;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					display: -webkit-box;
+					-webkit-line-clamp: 2;
+					line-clamp: 2;
+					-webkit-box-orient: vertical;
+					margin-bottom: 20rpx;
+				}
+				.user {
+					.graytext {
+						line-height: 40rpx;
+					}
+					image {
+						width: 25rpx;
+						height: 20rpx;
+						margin: 0 10rpx 0 30rpx;
+					}
+				}
+			}
+			.artImg {
+				width: 228rpx;
+				height: 148rpx;
+				border-radius: 16rpx;
+				background-color: #e5e5e5;
+			}
+		}
+	}
+	.dataok {
+		margin-top: 40rpx;
+	}
+}
+</style>

+ 194 - 0
pages/news/newsInfo.vue

@@ -0,0 +1,194 @@
+<template>
+	<view class="content">
+		<view class="newshead">{{ newsInfo.title }}</view>
+		<text class="time textgrey">{{ newsInfo.create_time }}</text>
+		<view v-if="type == 20" class="u-content">
+			<view @click="down(item)" class="dffd" v-for="(item, ind) in newsInfo.files_url" :key="ind">{{ item }}</view>
+			<image :src="newsInfo.img" mode="widthFix"></image>
+		</view> 
+		<view class="newsCon"><u-parse :content="newsInfo.content"></u-parse></view>
+		<view v-if="type == 10" class="u-content"><u-parse :content="newsInfo.hide"></u-parse></view>
+		<view v-if="type == 11" class="u-content"><u-parse :content="newsInfo.service"></u-parse></view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			id: '',
+			type: '', //
+			newsInfo: {},
+			talkList: [], //图文分享老师点评
+			fbText: ''
+		};
+	},
+	onLoad(opt) {
+		this.id = opt.id;
+		this.type = opt.type; // 10.隐私,11服务协议 1=新闻信息 2公告详情  20联盟课件 30图文分享
+		if (this.type == 10) {
+			uni.setNavigationBarTitle({
+				title: '隐私协议'
+			});
+		} else if (this.type == 11) {
+			uni.setNavigationBarTitle({
+				title: '服务政策'
+			});
+		} else if (this.type == 2) {
+			uni.setNavigationBarTitle({
+				title: '公告详情'
+			});
+		} else if (this.type == 20) {
+			uni.setNavigationBarTitle({
+				title: '课件详情'
+			});
+		} else if (this.type == 30) {
+			uni.setNavigationBarTitle({
+				title: '图文分享详情'
+			});
+		}
+		this.loading(this.id);
+	},
+	onShow() {},
+	methods: {
+		toFuba() {
+			if (!this.fbText) return this.$api.toast('请输入发布内容');
+			this.$api
+				.request('study/evaluate', {
+					login_token: this.token(),
+					id: this.id,
+					content: this.fbText
+				})
+				.then(data => {
+					this.fbText = '';
+					if (data.code == 200) {
+						this.$api.toast(data.msg);
+						setTimeout(res => {
+							this.loading();
+						}, 600);
+					} else {
+						this.$api.toast(data.msg);
+					}
+				})
+		},
+		loading() {
+			let url = '';
+			let data = {};
+			if (this.type == 10 || this.type == 11) {
+				url = 'common/getAgreement';
+			} else if (this.type == 1) {
+				url = 'news/getNewsInfo';
+				data = { 
+					id: this.id
+				};
+			} else if (this.type == 2) {
+				url = 'index/noticeInfo';
+				data = { 
+					id: this.id
+				};
+			}
+			this.$api
+				.request(url, data )
+				.then(data => {
+					if (data.code == 200) {
+						// if (this.type == 1||this.type == 2) {
+						// 	let content = data.data.content.replace(/<img [^>]*src=['"]/g, '<img style="width:100%;height:auto;max-width:750rpx;border-radius: 6rpx" src="' + this.$api.imgurl());
+						// 	data.data.content = content;
+						// }
+						this.newsInfo = data.data;
+					} else {
+						this.$api.toast(data.msg);
+					}
+				})
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.content {
+	min-height: 100vh;
+	padding: 32rpx 30rpx 120rpx;
+	background-color: #fff;
+	.newshead {
+		font-size: 36rpx;
+		font-family: PingFangSC-Medium, PingFang SC;
+		font-weight: 600;
+		line-height: 58rpx;
+		margin-bottom: 8rpx;
+	}
+	.time {
+		line-height: 40rpx;
+	}
+	.newsCon {
+		margin-top: 30rpx;
+		line-height: 42rpx;
+		font-size: 30rpx;
+	}
+	.talkBox {
+		border-top: 1rpx solid #ececec;
+		margin-top: 30rpx;
+		padding: 30rpx 0 0;
+		.title {
+			font-size: 28rpx;
+		}
+		.leRiBox {
+			.left {
+				width: 76rpx;
+				height: 76rpx;
+				margin-right: 24rpx;
+				border-radius: 50%;
+			}
+			.right {
+				padding: 30rpx 0;
+				flex: 1;
+				.tigTop {
+					font-family: PingFangSC-Semibold, PingFang SC;
+					font-weight: 600;
+					line-height: 44rpx;
+					text {
+						font-size: 26rpx;
+						color: #999999;
+						line-height: 36rpx;
+						flex: 1;
+						font-weight: 400;
+						margin: 0 20rpx;
+					}
+					image {
+						width: 44rpx;
+						height: 44rpx;
+					}
+				}
+				.cont {
+					margin-top: 12rpx;
+					font-size: 28rpx;
+					color: #333333;
+					line-height: 40rpx;
+				}
+			}
+		}
+	}
+	.fixBox {
+		.editicon {
+			position: absolute;
+			left: 60rpx;
+			width: 40rpx;
+			height: 40rpx;
+			padding: 3rpx;
+		}
+		input {
+			flex: 1;
+			font-size: 28rpx;
+			height: 76rpx;
+			background: #f6f6f6;
+			border-radius: 38rpx;
+			padding: 0 30rpx 0 78rpx;
+		}
+		.share {
+			margin-left: 30rpx;
+			width: 40rpx;
+			height: 40rpx;
+		}
+	}
+}
+</style>

+ 203 - 0
pages/news/notice.vue

@@ -0,0 +1,203 @@
+<template>
+	<view class="content">
+		
+		<view @click="navTo(item)" v-for="item in newsInfo" :key="item.id" class="newsBox dffd">
+			<view class="one">
+				<view class="one_img">
+					<image  :src="item.image" mode=""></image>
+				</view>
+				
+				<view class="title">
+					<view class="title_one">{{item.title}} </view>
+					<view class="title_time">{{item.create_time}}</view>
+				</view>
+				
+			</view>
+		</view> 
+		
+	<!-- 	<view @click="navTo(item)" v-for="item in newsInfo" :key="item.id" class="newsBox dffd">
+			<image src="/static/img/pro/del.png" class="sel" mode=""></image>
+			<text class="time">{{item.create_time}}</text>
+			<view class="newsCon">
+				<view class="newshead dfsb">
+					{{item.title}} 
+					<text :class="item.is_select?'promain':'textgrey'">{{item.is_select?'已读':'未读'}}</text>
+				</view>
+				<view class="shopshead dfsb">
+					{{item.desc}}
+				</view>
+			</view>
+		</view> -->
+	</view>
+</template>
+
+<script>  
+export default {
+	data() {
+		return {
+			type:1,
+			newsInfo: [
+				// {
+				// 	create_time:'2021.03.12 12:00 ',
+				// 	title:'fdsiaodi测试测试',
+				// 	read: true,
+				// }
+			],
+			status: 'loadmore',
+			page: 1,
+			pagenum:20,
+		};
+	},
+	onLoad(opt) { 
+		console.log('opt:',opt);
+		if(opt.title)
+		{
+			uni.setNavigationBarTitle({
+				title:  opt.title 
+			});
+		}
+		
+		this.type=opt.type||1;
+		// this.newsInfo=[];
+		// this.page=1; 
+		this.loading();
+	},
+	onReachBottom() {
+		if (this.status == 'nomore') return;
+		this.status = 'loading';
+		this.page = ++this.page;
+		this.loading();
+	}, 
+	methods: {
+		navTo(item){
+			uni.navigateTo({
+				url:'./newsInfo?id=' + item.id+'&type=2'
+			})
+		},
+		loading() { 
+			this.$api
+				.request('index/getNotice', { 
+					type:this.type||1,
+					page: this.page,
+					limit: this.pagenum
+				})
+				.then(data => {
+					if (data.code == 200) {  
+						this.newsInfo = this.newsInfo.concat(data.data);
+						if (data.data.length < this.pagenum) {
+							this.status = 'nomore';
+						}
+					} else {
+						this.$api.toast(data.msg);
+					}
+				}) 
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+	page{
+		background-color: #F8F9FE;
+	}
+.content {
+	
+	min-height: 100vh;
+	// padding: 0 30rpx;
+	
+	.one{
+		background-color: #FFFFFF;
+		padding: 30rpx;
+		width: 100%;
+		height:220rpx;
+		display: flex;
+		justify-content: flex-start;
+		flex-direction: row;
+		align-items: center;
+		.one_img{
+			width: 210rpx;
+			height: 160rpx;
+			
+			/deep/ image{
+				width:100%;
+				height:100%;
+			}
+		}
+		.title{
+			margin-left: 16rpx;
+			width: 465rpx;
+			.title_one{
+				height: 105rpx;
+				font-size: 36rpx;
+				font-family: PingFangSC-Medium, PingFang SC;
+				font-weight: 600;
+				 text-overflow: -o-ellipsis-lastline;
+				  overflow: hidden;
+				  text-overflow: ellipsis;
+				  display: -webkit-box;
+				  -webkit-line-clamp: 2;
+				  line-clamp: 2;
+				  -webkit-box-orient: vertical;
+			}
+			.title_time{
+				font-size: 30rpx;
+				display: flex;
+				justify-content: flex-end;
+			}
+		}
+		
+	}
+	
+	.newsBox {
+		
+		width: 100%;
+		padding: 32rpx 0 0;
+		align-items: center;
+		position: relative;
+		.sel{
+			position: absolute;
+			top: -68rpx;
+			left: 50%;
+			width: 100rpx;
+			height: 68rpx;
+		}
+	}
+	.time {
+		font-size: 22rpx;
+		color: #fff;
+		padding: 6rpx 12rpx;
+		line-height: 52rpx; 
+		background: rgba(214, 214, 214, 1);
+		border-radius: 12rpx;
+		margin-bottom: 32rpx;
+	}
+	.newsCon { 
+		width: 100%;
+		padding: 32rpx;
+		border-radius: 8rpx;
+		background-color: #fff;
+	}
+	.newshead {
+		margin-bottom: 16rpx; 
+				font-size: 30rpx;
+			 
+	}
+	.shopshead {
+		// background-color: #f5f5f5;
+		image {
+			width: 124rpx;
+			height: 124rpx;
+			margin-right: 10rpx;
+		}
+		.elli {
+			flex: 1;
+			font-size: 26rpx;
+			height: 80rpx;
+			line-height: 42rpx;
+			/deep/ image{
+				width: 100%;
+			}
+		}
+	}
+}
+</style>

+ 322 - 0
pages/pay/pay.vue

@@ -0,0 +1,322 @@
+<template>
+	<view class="pagecon">
+		<view class="conwarp">
+			<view class="gdHead"><view class="head textgrey">选择文档</view></view>
+			<view class="cl-one"><video-list :selType="pay_type" @getItem="getItem" :flag="3" :list="goodInfo.files"></video-list></view>
+		</view>
+		<view v-if="!hidePay" class="conwarp">
+			<view class="gdHead"><view class="head textgrey">选择支付方式</view></view>
+			<view class="monBox">
+				<view @click="selHandle(1)" class="payInfo bb dfsb">
+					<image class="payicon" src="/static/img/pro/paywx.png" mode=""></image>
+					<view class="flex1"><text class="blank fontmid">微信支付</text></view>
+					<image class="payselicon" :src="pay_type == 1 ? '/static/img/pro/chenggong.png' : '/static/img/pro/wxz.png'" mode=""></image>
+				</view>
+				<view @click="selHandle(2)" class="payInfo bb dfsb">
+					<image class="payicon" src="/static/img/pro/payxd.png" mode=""></image>
+					<view class="dffd flex1">
+						<text class="blank fontmid">学豆支付</text>
+						<view class="textgrey fontssm">
+							剩余学豆:
+							<text class="prosecond fontssm">{{ userInfo.userInfo.bean || 0 }}</text>
+						</view>
+					</view>
+					<image class="payselicon" :src="pay_type == 2 ? '/static/img/pro/chenggong.png' : '/static/img/pro/wxz.png'" mode=""></image>
+				</view>
+				<view class="payInfo bb dfsb">
+					<image class="payicon" src="/static/img/pro/payyh.png" mode=""></image>
+					<view class="dffd flex1">
+						<text class="blank fontmid">使用优惠券 -{{ coupon.reduce || 0 }}</text>
+						<view @click.stop="nextTo" class="textgrey fontssm dffs">
+							查看当前可使用的优惠券
+							<u-icon name="arrow-down" color="#999" size="14"></u-icon>
+						</view>
+					</view>
+					<!-- <image class="payselicon" :src="pay_type == 3 ? '/static/img/pro/chenggong.png' : '/static/img/pro/wxz.png'" mode=""></image> -->
+				</view>
+			</view>
+		</view>
+		<view class="fixBox dffs">
+			<view class="fontbase">应付:</view>
+			<text class=" prosecond">{{ pay_type == 1 ? money : bean }}</text>
+			<text class="fontsm flex1">会员折扣{{ userInfo.userInfo.jing_discount || 0 }}折</text>
+
+			<view @click="creatOrd()" class="clickbtn fontmid">{{ hidePay ? '免费下载': '确定下载' }}</view>
+		</view>
+		<pay-password-keyboard :showPass="payShow" @close="payShow = false" @getPass="balancePay"></pay-password-keyboard>
+	</view>
+</template>
+
+<script>
+import videoList from '@/pages/index/components/wordlist.vue';
+import payPasswordKeyboard from '@/components/pay-password-keyboard/pay-password-keyboard.vue';
+import { mapState } from 'vuex';
+export default {
+	components: {
+		videoList,
+		payPasswordKeyboard
+	},
+	data() {
+		return {
+			hidePay: false, //如果选择下载并且 价格为0  隐藏支付方式
+			id: '',
+			goodInfo: { tags: '' },
+			// pay_type: 1, //2微信  1 学豆
+			pay_type: 1, //1=微信  2=学豆
+			money: 0, //应付
+			bean: 0, //应付
+			payShow: false, //支付密码
+			coupon: { reduce: 0 },
+			ids: '',
+			ordId: ''
+		};
+	},
+	computed: {
+		...mapState({ userInfo: state => state.userInfo })
+	},
+	async onLoad(opt) {
+		this.id = opt.id;
+		await this.$store.dispatch('getUserInfo');
+		await this.loadData();
+	},
+	methods: {
+		selHandle(val) {
+			console.log(val);
+			if (val == 2 && this.userInfo.userInfo.level_time == 0) {
+				this.$api.toast('请先开通会员');
+				setTimeout(res => {
+					uni.navigateTo({
+						url: '/pages/user/mine/member'
+					});
+				}, 600);
+			} else {
+				this.pay_type = val;
+			}
+		},
+		/**
+		 * 请求数据只是为了代码不那么乱
+		 * 分次请求未作整合
+		 */
+		async loadData() {
+			let url = 'index/getClassInfo';
+			this.$api
+				.request(url, {
+					id: this.id
+				})
+				.then(res => {
+					if (res.code == '200') {
+						let data = res.data;
+						data.files.forEach(item => {
+							item.sel = false;
+						});
+						this.goodInfo = data;
+					}
+				});
+		},
+		// 选择优惠券
+		nextTo() {
+			if (this.pay_type == 1) return this.$api.toast('余额支付不能使用优惠券');
+			uni.navigateTo({
+				url: '/pages/user/coupon/myCoup?money=' + this.money
+			});
+		},
+		// 点击
+		getItem(sel, index) {
+			this.goodInfo.files[index].sel = sel;
+			let arr = this.goodInfo.files;
+			let mon = 0;
+			let beans = 0;
+			let id = [];
+			arr.forEach(res => {
+				if (res.sel) {
+					mon = parseFloat(mon) + parseFloat(res.price);
+					beans = parseFloat(beans) + parseFloat(res.bean);
+					id.push(res.id);
+				}
+			});
+			let total =
+				this.userInfo.userInfo.jing_discount == 0
+					? parseFloat(mon - this.coupon.reduce).toFixed(2)
+					: parseFloat((mon * this.userInfo.userInfo.jing_discount) / 10 - this.coupon.reduce).toFixed(2);
+			this.money = total;
+			this.bean = parseFloat(beans).toFixed(2) || '';
+			this.ids = id.toString();
+			// console.log('bean: ',this.bean);
+			if ((this.money == 0 && this.ids) || (this.bean == 0 && this.ids)) {
+				this.hidePay = true;
+			} else {
+				this.hidePay = false;
+			}
+		},
+		// 学豆支付
+		balancePay(val) {
+			this.payShow = false;
+			console.log(val);
+			this.$api
+				.request('user/checkMd', {
+					pay_pass: val
+				})
+				.then(data => {
+					if (data.code == 200) {
+						this.emitHandle();
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		// 点击支付
+		creatOrd() {
+			// return;
+			let url = 'files_order/create'; 
+			let money = parseFloat(this.money) * parseFloat(this.userInfo.userInfo.jing_discount / 10) - parseFloat(this.coupon.reduce);
+			if ((this.hidePay && this.pay_type == 2) || money <= 0) {
+				this.pay_type = 3;
+			}
+			this.$api
+				.request(url, {
+					ids: this.ids,
+					coupon_id: this.coupon.id || '',
+					pay_type: this.pay_type
+				})
+				.then(data => {
+					if (data.code == 200) {
+						this.ordId = data.data;
+						if (this.pay_type == 1) {
+							this.emitHandle();
+						} else if (this.pay_type == 2) {
+							this.payShow = true;
+						} else {
+							this.emitHandle();
+						}
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		// 点击支付
+		emitHandle() {
+			// return;
+			let url = 'payment/filePay';
+			this.$api
+				.request(url, {
+					order_id: this.ordId || '',
+					pay_type: this.pay_type 
+				})
+				.then(data => {
+
+					if (this.pay_type != 1) {
+						this.$api.toast(data.msg);
+						if (data.code == 200) {
+							setTimeout(res => {
+								uni.navigateTo({
+									url: '/pages/user/mine/down'
+								});
+							}, 600);
+						}
+					} else {
+						if (data.code && data.code != 200) {
+							this.$api.toast(data.msg || '获取支付信息失败');
+							return;
+						}
+						console.log(data);
+						const orderInfo = data;
+						const { timeStamp, nonceStr, paySign } = orderInfo;
+						const payParams = {
+							provider: 'wxpay',
+							orderInfo: data,
+							timeStamp,
+							nonceStr,
+							package: orderInfo.package,
+							signType: 'MD5',
+							paySign,
+							success: e => {
+								this.$api.toast('支付成功');
+								setTimeout(res => {
+									uni.navigateTo({
+										url: '/pages/user/mine/down'
+									});
+								}, 600);
+							},
+							fail: err => {
+								if (err.errMsg.indexOf('取消') > -1 || err.errMsg.indexOf('cancel') > 1 || err.errMsg.indexOf('-2') > -1) {
+									this.$api.toast('取消支付');
+								} else {
+									this.$api.toast('支付遇到错误,请稍候重试');
+									console.log(err);
+								}
+							}
+						};
+						uni.requestPayment(payParams);
+					}
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.pagecon {
+	padding-bottom: 100rpx;
+	.conwarp {
+		background-color: #fff;
+		padding: 26rpx 30rpx 39rpx;
+		border-radius: 16rpx;
+		margin-bottom: 20rpx;
+		.gdHead {
+			line-height: 58rpx;
+			margin-bottom: 16rpx;
+			.head {
+				font-size: 34rpx;
+				font-family: PingFangSC-Medium, PingFang SC;
+				font-weight: 600;
+				line-height: 48rpx;
+			}
+		}
+	}
+	.monBox {
+		margin-top: 20rpx;
+		background-color: #fff;
+		.payInfo {
+			padding: 35rpx 0;
+			.payicon {
+				width: 68rpx;
+				height: 68rpx;
+			}
+			.flex1 {
+				margin: 0 15rpx;
+			}
+			.fontmid {
+				flex: 1;
+			}
+			.payselicon {
+				width: 32rpx;
+				height: 32rpx;
+			}
+		}
+	}
+	.fixBox {
+		justify-content: flex-end;
+		font-size: 32rpx;
+		padding: 0 30rpx;
+		.prosecond {
+			// text-align: right;
+			// flex: 1;
+			text {
+				font-size: 28rpx;
+				color: $prosecond;
+			}
+			font-size: 42rpx;
+			font-family: DIN-Regular, DIN;
+			font-weight: 400;
+		}
+		.clickbtn {
+			margin: 0 0 0 20rpx;
+			width: 214rpx;
+			height: 80rpx;
+			line-height: 80rpx;
+			background: #ed742f;
+			border-radius: 40rpx;
+		}
+	}
+}
+</style>

+ 313 - 0
pages/pay/payVid.vue

@@ -0,0 +1,313 @@
+<template>
+	<view class="pagecon">
+		<view class="conwarp">
+			<view class="gdHead dffs">
+				<view class="head flex1">{{ goodInfo.title }}</view>
+				<text v-for="(item, index) in goodInfo.tags.split('|')" class="desc">{{ item }}</text>
+			</view>
+			<view class="subtit textgrey fontssm">{{ goodInfo.desc }}</view>
+		</view>
+		<view v-if="!hidePay" class="conwarp">
+			<view class="gdHead"><view class="head textgrey">选择支付方式</view></view>
+			<view class="monBox">
+				<view @click="selHandle(1)" class="payInfo bb dfsb">
+					<image class="payicon" src="/static/img/pro/paywx.png" mode=""></image>
+					<view class="flex1"><text class="blank fontmid">微信支付</text></view>
+					<image class="payselicon" :src="pay_type == 1 ? '/static/img/pro/chenggong.png' : '/static/img/pro/wxz.png'" mode=""></image>
+				</view>
+				<view @click="selHandle(2)" class="payInfo bb dfsb">
+					<image class="payicon" src="/static/img/pro/payxd.png" mode=""></image>
+					<view class="dffd flex1">
+						<text class="blank fontmid">学豆支付</text>
+						<view class="textgrey fontssm">
+							剩余学豆:
+							<text class="prosecond fontssm">{{ userInfo.userInfo.bean || 0 }}</text>
+						</view>
+					</view>
+					<image class="payselicon" :src="pay_type == 2 ? '/static/img/pro/chenggong.png' : '/static/img/pro/wxz.png'" mode=""></image>
+				</view>
+				<!-- <view class="payInfo bb dfsb">
+					<image class="payicon" src="/static/img/pro/payyh.png" mode=""></image>
+					<view class="dffd flex1">
+						<text class="blank fontmid">使用优惠券 -{{ coupon.reduce || 0 }}</text>
+						<view @click.stop="nextTo" class="textgrey fontssm dffs">
+							查看当前可使用的优惠券
+							<u-icon name="arrow-down" color="#999" size="14"></u-icon>
+						</view>
+					</view>
+				</view> -->
+			</view>
+		</view>
+		<view class="fixBox dffs">
+			<view class="fontbase">应付:</view>
+			<text class=" prosecond">{{ ordInfo.order_amount }} </text>
+			<text class="fontsm flex1"> 会员折扣{{ userInfo.userInfo.jing_discount || 0 }}折</text>
+
+			<view @click="creatOrd()" class="clickbtn fontmid"> 确定购买 </view>
+		</view>
+		<pay-password-keyboard :showPass="payShow" @close="payShow = false" @getPass="balancePay"></pay-password-keyboard>
+	</view>
+</template>
+
+<script>
+import videoList from '@/pages/index/components/wordlist.vue';
+import payPasswordKeyboard from '@/components/pay-password-keyboard/pay-password-keyboard.vue';
+import { mapState } from 'vuex';
+export default {
+	components: {
+		videoList,
+		payPasswordKeyboard
+	},
+	data() {
+		return {
+			hidePay: false, //如果选择下载并且 价格为0  隐藏支付方式
+			id: '',
+			goodInfo: { tags: '' },
+			// pay_type: 1, //2微信  1 学豆
+			pay_type: 1, //1=微信  2=学豆 
+			payShow: false, //支付密码
+			coupon: { reduce: 0 }, 
+			ordInfo:'',
+			ordId: ''
+		};
+	},
+	computed: {
+		...mapState({ userInfo: state => state.userInfo })
+	},
+	async onLoad(opt) {
+		this.goodInfo = JSON.parse(opt.item);
+		console.log(this.goodInfo);
+		await this.$store.dispatch('getUserInfo');
+		await this.getInfo(); 
+	},
+	methods: {
+		selHandle(val) {
+			console.log(val);
+			if (val == 2 && this.userInfo.userInfo.level_time == 0) {
+				this.$api.toast('请先开通会员');
+				setTimeout(res => {
+					uni.navigateTo({
+						url: '/pages/user/mine/member'
+					});
+				}, 600);
+			} else {
+				this.pay_type = val;
+				this.getInfo();
+			}
+			
+		},
+		/**
+		 * 请求数据只是为了代码不那么乱
+		 * 分次请求未作整合
+		 */
+		async getInfo() {
+			let url = 'video_order/outInfo';
+			this.$api
+				.request(url, {
+					video_id: this.goodInfo.id,
+					pay_type: this.pay_type,
+				})
+				.then(res => {
+					if (res.code == '200') { 
+						this.ordInfo = res.data;
+					}
+				});
+		},
+		// 选择优惠券
+		nextTo() {
+			if (this.pay_type == 1) return this.$api.toast('余额支付不能使用优惠券');
+			uni.navigateTo({
+				url: '/pages/user/coupon/myCoup?money=' + this.money
+			});
+		}, 
+		// 学豆支付
+		balancePay(val) {
+			this.payShow = false;
+			console.log(val);
+			this.$api
+				.request('user/checkMd', {
+					pay_pass: val
+				})
+				.then(data => {
+					if (data.code == 200) {
+						this.emitHandle();
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		// 点击支付
+		creatOrd() {
+			// return;
+			let url = 'video_order/create'; 
+			if ( this.ordInfo.order_amount <= 0) {
+				this.pay_type = 3;
+			}
+			this.$api
+				.request(url, {
+					video_id: this.goodInfo.id,
+					coupon_id: this.coupon.id || '',
+					pay_type: this.pay_type
+				})
+				.then(data => {
+					if (data.code == 200) {
+						this.ordId = data.data;
+						if (this.pay_type == 1) {
+							this.emitHandle();
+						} else if (this.pay_type == 2) {
+							this.payShow = true;
+						} else {
+							this.emitHandle();
+						}
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		// 点击支付
+		emitHandle() {
+			// return;
+			let url = 'payment/videoPay';
+			this.$api
+				.request(url, {
+					order_id: this.ordId || '',
+					pay_type: this.pay_type 
+				})
+				.then(data => { 
+					if (this.pay_type != 1) {
+						this.$api.toast(data.msg);
+						if (data.code == 200) {
+							setTimeout(res => {
+								uni.navigateTo({
+									url: '/pages/user/mine/buy'
+								});
+							}, 600);
+						}
+					} else {
+						if (data.code && data.code != 200) {
+							this.$api.toast(data.msg || '获取支付信息失败');
+							return;
+						}
+						console.log(data);
+						const orderInfo = data;
+						const { timeStamp, nonceStr, paySign } = orderInfo;
+						const payParams = {
+							provider: 'wxpay',
+							orderInfo: data,
+							timeStamp,
+							nonceStr,
+							package: orderInfo.package,
+							signType: 'MD5',
+							paySign,
+							success: e => {
+								this.$api.toast('支付成功');
+								setTimeout(res => {
+									uni.navigateTo({
+										url: '/pages/user/mine/buy'
+									});
+								}, 600);
+							},
+							fail: err => {
+								if (err.errMsg.indexOf('取消') > -1 || err.errMsg.indexOf('cancel') > 1 || err.errMsg.indexOf('-2') > -1) {
+									this.$api.toast('取消支付');
+								} else {
+									this.$api.toast('支付遇到错误,请稍候重试');
+									console.log(err);
+								}
+							}
+						};
+						uni.requestPayment(payParams);
+					}
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.pagecon {
+	padding-bottom: 100rpx;
+	.conwarp {
+		background-color: #fff;
+		padding: 26rpx 30rpx 39rpx;
+		border-radius: 16rpx;
+		margin-bottom: 20rpx;
+		.gdHead {
+			line-height: 58rpx;
+			margin-bottom: 16rpx;
+			.head {
+				font-size: 34rpx;
+				font-family: PingFangSC-Medium, PingFang SC;
+				font-weight: 600;
+				color: #333333;
+				line-height: 48rpx;
+			}
+			.desc {
+				background: #f89638;
+				border-radius: 5rpx;
+				font-size: 18rpx;
+				height: 32rpx;
+				line-height: 32rpx;
+				padding: 0rpx 8rpx;
+				display: inline-block;
+				color: #fff;
+				margin-left: 10rpx;
+				&:nth-of-type(2) {
+					background: #7fc06e;
+				}
+				&:nth-of-type(3) {
+					background: #75b2c4;
+				}
+				&:nth-of-type(4) {
+					background: #8875c0;
+				}
+			}
+		}
+	}
+	.monBox {
+		margin-top: 20rpx;
+		background-color: #fff;
+		.payInfo {
+			padding: 35rpx 0;
+			.payicon {
+				width: 68rpx;
+				height: 68rpx;
+			}
+			.flex1 {
+				margin: 0 15rpx;
+			}
+			.fontmid {
+				flex: 1;
+			}
+			.payselicon {
+				width: 32rpx;
+				height: 32rpx;
+			}
+		}
+	}
+	.fixBox {
+		justify-content: flex-end;
+		font-size: 32rpx;
+		padding: 0 30rpx;
+		.prosecond {
+			// text-align: right;
+			// flex: 1;
+			text {
+				font-size: 28rpx;
+				color: $prosecond;
+			}
+			font-size: 42rpx;
+			font-family: DIN-Regular, DIN;
+			font-weight: 400;
+		}
+		.clickbtn {
+			margin: 0 0 0 20rpx;
+			width: 214rpx;
+			height: 80rpx;
+			line-height: 80rpx;
+			background: #ed742f;
+			border-radius: 40rpx;
+		}
+	}
+}
+</style>

+ 101 - 0
pages/tabbar/broadcast.vue

@@ -0,0 +1,101 @@
+<template>
+	<view class="content">
+		
+		<!-- 内容为空 -->
+		
+			<u-empty mode="history" text="尽情期待" icon="http://cdn.uviewui.com/uview/empty/history.png"></u-empty>
+		
+		<!-- 内容为空 -->
+		
+	<!-- 	<view class="conwarp">
+			<view class="gdHead dfsb"><view class="head">直播列表</view></view>
+			<view class="floor">
+				<view class="fl-five"><video-list :flag="1" :list="zbList"></video-list></view>
+			</view>
+		</view>
+		<view class="conwarp">
+			<view class="gdHead dfsb"><view class="head">回放列表</view></view>
+			<view class="floor">
+				<view class="fl-five"><video-list :flag="2" :list="zbList"></video-list></view>
+			</view>
+		</view> -->
+	</view>
+</template>
+
+<script>
+import videoList from './components/list.vue';
+export default {
+	components: {
+		videoList
+	},
+	data() {
+		return {
+			zbList: {}
+		};
+	},
+	onPullDownRefresh() {
+		this.getInfoList();
+		setTimeout(res => {
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	async onLoad() {
+		await this.getInfoList();
+	},
+	methods: {
+		getInfoList() {
+			this.$api.request('live/live_list').then(data => {
+				if (data.code == 200) {
+					this.zbList = data.data.room_info;
+				} else {
+					this.$api.toast(data.msg);
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+	background-color: #fff;
+	.top-input {
+		padding: 20rpx 30rpx;
+		.sel {
+			color: #f89638;
+			padding: 12rpx 20rpx;
+			font-size: $font-sm;
+			background-color: rgba(#f89638, 0.1);
+			border-radius: 30rpx;
+			margin-right: 36rpx;
+		}
+	}
+	.swiper {
+		margin: 0 30rpx;
+	}
+	.conwarp {
+		background-color: #fff;
+		padding: 32rpx 30rpx 30rpx;
+		border-radius: 16rpx;
+		margin-bottom: 20rpx;
+		.gdHead {
+			line-height: 58rpx;
+			margin-bottom: 16rpx;
+			.head {
+				font-size: 34rpx;
+				font-family: PingFangSC-Medium, PingFang SC;
+				font-weight: 600;
+				color: #333333;
+				line-height: 48rpx;
+			}
+		}
+		.floor {
+			border-radius: 15rpx;
+			.box {
+				border: 1px solid #ececec;
+				padding: 23rpx 25rpx;
+			}
+		}
+	}
+}
+</style>

+ 420 - 0
pages/tabbar/class.vue

@@ -0,0 +1,420 @@
+<template>
+	<view class="root">
+		<view class="topBox dffs">
+			<u-tabs
+				:list="dataList.grade"
+				keyName="name"
+				:current="current"
+				:itemStyle="{ fontSize: '28rpx', height: '100rpx' }"
+				:activeStyle="{ color: '#87C477',borderBottom:'2px solid #87C477' }"
+				lineHeight="0" 
+				sticky
+				@click="topHandle"
+			></u-tabs>
+		</view>
+		<view class="content dfsb">
+			<view class="secTop">
+				<scroll-view :scroll-top="0" scroll-y="true" class="scroll-Y">
+					<view @tap="choose(item.id)" :class="['topLi', leftSel == item.id ? 'topsel' : '']" v-for="(item, index) in dataList.subject" :key="index">
+						{{ item.name }}
+					</view>
+				</scroll-view>
+			</view>
+			<view class="topInfo">
+				<view class="topCInfo">
+					<scroll-view :scroll-top="0" scroll-y="true" class="scroll-Y" @scrolltolower="lower">
+						<view class="box">
+							<view class="swipe">
+								<u-swiper :autoplay="false" :list="banner" keyName="img" height="84" border-radius="20" @click="bannerClick"></u-swiper>
+							</view>
+							<!-- -->
+							<view v-if="showVideo==1" class="goodLi dffd">
+								<view class="fontsm textgrey">{{ '视频类' }}</view>
+								<view class="son dffs"> 
+									<navigator
+										:url="'/pages/index/video/video?cat=' + item.id"
+										class="li fontmid"
+										:class="ind == 0 ? 'sel' : ''"
+										v-for="(item, ind) in vedio_cats"
+										:key="ind"
+									>
+										{{ item.name }}
+									</navigator>
+								</view>
+							</view>
+							<view class="goodLi dffd" v-for="(item, index) in classList" :key="index">
+								<view class="fontsm textgrey">{{ item.name || '商品名称' }}</view>
+								<view class="son dffs">
+									<view @click="toNext(2, ite)" class="fontmid" v-for="(ite, ind) in item.children" :key="ind">{{ ite.name || '商品名称' }}</view>
+								</view>
+							</view>
+						</view>
+					</scroll-view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			showVideo: uni.getStorageSync('showVideo') || '0',
+			current: 0,
+			vedio_cats: [], // 视频列表
+			banner:[],
+			dataList: {}, //一层
+			classList: [
+				// { name: '姓名', goods_img: '/static/img/pro/hotbgzj.png' },
+			], //商品
+			leftSel: 0, //一层分类选中
+			status: 'loadmore',
+			page: 1,
+			pagnum: 15
+		};
+	},
+	async onLoad(opt) {
+		await this.onload();
+		await this.getVidList();
+	},
+	onPullDownRefresh() {
+		this.page = 1;
+		this.leftSel = 0;
+		this.current = 0;
+		this.dataList = {};
+		this.classList = [];
+		this.onload();
+		setTimeout(function() {
+			uni.stopPullDownRefresh();
+		}, 800);
+	},
+	// onReachBottom() {
+	// 	if (this.status == 'nomore') return;
+	// 	this.status = 'loadmore';
+	// 	this.page = ++this.page;
+	// 	this.onload();
+	// },
+
+	onShow() {},
+	methods: {
+		
+		getBanner() {
+			this.$api
+				.request('index/getBanner', {
+					field: 'tabbar_cate_banner',
+					cate_type: 1,
+					cat_id: this.current,
+					two_cat_id: this.leftSel,
+				})
+				.then(data => {
+					console.log("getBanner",data)
+					if (data.code == 200) {
+						this.banner = data.data;
+						
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		
+		getVidList() {
+			this.$api
+				.request('index/index', {
+					school_type: '',
+					video_cat: '',
+					page: 1,
+					limit: 6
+				})
+				.then(data => {
+					console.log("index",data)
+					if (data.code == 200) {
+						this.showVideo = data.data.vedio_status;
+						uni.setStorageSync('showVideo', data.data.vedio_status);
+						this.vedio_cats = data.data.vedio_cats;
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		// 轮播
+		bannerClick(e) {
+			console.log(e);
+			let item = this.dataList.banner[e];
+			if (item.goods_id != 0) {
+				if (item.type == 1) {
+					uni.navigateTo({
+						url: '/pages/index/video/videoInfo?id=' + item.goods_id
+					});
+				} else {
+					uni.navigateTo({
+						url: '/pages/index/navInfo?id=' + item.goods_id
+					});
+				}
+			}
+		},
+		// 顶部按钮被点击
+		topHandle(e) {
+			console.log('top: ',e);
+			this.current = e.id;
+			// this.onload();
+			this.getBanner();
+		},
+		toNext(val, item) {
+			console.log(item);
+			if (val == 1) {
+				uni.navigateTo({
+					url: '/pages/index/video/video'
+				});
+				return;
+			}
+			
+			// console.log('跳转时:',item.id);
+			uni.navigateTo({ 
+				// url: `/pages/index/classList?flag=${val}&subject_id=${val}&grade_id=${this.current}&title=${ item.name }`
+				url: `/pages/index/classList?flag=${val}&cat_id=${item.id}&subject_id=${this.leftSel}&grade_id=${this.current}&title=${ item.name }`
+			});
+		},
+		choose(index) {
+			console.log('leftSel: ',index);
+			this.leftSel = index;
+			console.log('this.leftSel',this.leftSel);
+			// this.onload();
+			this.getBanner();
+		},
+		onload() {
+			this.status = 'loadmore';
+			this.$api
+				.request('index/getCateList', {
+					grade_id: this.current,
+					subject_id: this.leftSel
+				})
+				.then(data => {
+					console.log(data);
+					if (data.code == 200) {
+						this.current = data.data.grade[0].id;
+						this.leftSel = data.data.subject[0].id;
+						this.dataList = data.data;
+						this.classList = data.data.class_cate;
+						
+						this.getBanner();
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+page {
+	height: 100vh;
+}
+.content {
+	background-color: #fff;
+	align-items: flex-start;
+	.topBox {
+		background-color: #fff;
+	}
+	.secTop {
+		.scroll-Y {
+			height: calc(100vh - 120rpx);
+			flex-wrap: wrap;
+		}
+		.topLi {
+			font-size: 26rpx;
+			width: 168rpx;
+			padding: 26rpx 0;
+			line-height: 37rpx;
+			text-align: center;
+			background: #f4f4f4;
+			color: #666;
+		}
+		.topsel {
+			font-size: 28rpx;
+			box-sizing: border-box;
+			background-color: #fff;
+			color: $promain;
+			font-weight: 600;
+		}
+	}
+	.topInfo {
+		width: 582rpx;
+		padding-right: 30rpx;
+		padding-left: 12rpx;
+		background-color: #f5f5f5;
+		// background-color: #fff;
+		.swipe {
+			width: 540rpx;
+			height: 166rpx;
+			margin: 20rpx 0;
+		}
+		.topClass {
+			position: fixed;
+			z-index: 1;
+			background-color: #fff;
+			padding-left: 12rpx;
+			width: 556rpx;
+			.topClaBox {
+				flex: 1;
+				height: 98rpx;
+				line-height: 98rpx;
+				display: -webkit-box;
+				overflow-x: auto;
+				/*适应苹果*/
+				-webkit-overflow-scrolling: touch;
+				//父盒子隐藏滚动条
+				&::-webkit-scrollbar {
+					display: none;
+				}
+				.topClasLi {
+					font-size: 28rpx;
+					padding: 0 15rpx;
+				}
+				.topClasel {
+					color: $promain;
+				}
+			}
+			.classDown {
+				height: 98rpx;
+				width: 70rpx;
+				box-shadow: -2rpx -5rpx 2rpx 5rpx rgba($color: #000000, $alpha: 0.05);
+				background-color: #fff;
+				.xuanz {
+					transform: translate(180deg);
+				}
+			}
+		}
+		.topCInfo {
+			flex: 1;
+			height: calc(100vh - 120rpx);
+			.maskbg {
+				position: fixed;
+				top: 170rpx;
+				left: 200rpx;
+				width: calc(100% - 200rpx);
+				height: calc(100% - 100rpx);
+				background-color: rgba(0, 0, 0, 0.65);
+				z-index: 2;
+			}
+			/* #ifdef MP */
+			.maskbg {
+				position: fixed;
+				top: 70rpx;
+			}
+			/* #endif */
+			.scroll-Y {
+				height: calc(100vh - 120rpx);
+			}
+			.box {
+				width: 100%;
+				flex-wrap: wrap;
+			}
+			.goodLi {
+				width: 100%;
+				margin-top: 20rpx;
+				padding: 20rpx;
+				background-color: #fff;
+				border-radius: 10rpx;
+				.gdImg {
+					width: 100%;
+					height: 120rpx;
+					background-color: #fbf9fa;
+					margin-bottom: 36rpx;
+				}
+				.oneelli {
+					text-align: center;
+					font-size: 24rpx;
+				}
+				.son {
+					
+					margin-top: 10rpx;
+					margin-left: 30rpx;
+					flex-wrap: wrap;
+					.fontmid {
+						margin-right: 30rpx;
+						margin-bottom: 20rpx;
+						font-size: 24rpx !important;
+					}
+				}
+			}
+		}
+	}
+}
+.cartBox {
+	width: 710rpx;
+	position: fixed;
+	bottom: 10rpx;
+	/* #ifdef H5 */
+	bottom: 128rpx;
+	/* #endif */
+	left: 0;
+	z-index: 999;
+	margin: 0 20rpx;
+	.leftbox {
+		height: 100rpx;
+		flex: 1;
+		background: #000000;
+		border-radius: 200rpx 0px 0px 200rpx;
+		padding-left: 30rpx;
+		.imgBox {
+			position: relative;
+			image {
+				width: 90rpx;
+				height: 82rpx;
+			}
+		}
+		.priceInfo {
+			position: relative;
+			margin-left: 60rpx;
+			.price {
+				color: #fff;
+			}
+		}
+	}
+	.rightbox {
+		height: 100rpx;
+		line-height: 100rpx;
+		text-align: center;
+		color: #fff;
+		background: #d8d8d8 linear-gradient(90deg, #6fd237 0%, #57c32a 100%);
+		border-radius: 0px 200rpx 200rpx 0px;
+		width: 194rpx;
+	}
+	.ordbox {
+		font-size: 24rpx;
+		text-align: center;
+		margin-bottom: 10rpx;
+		text {
+			font-size: 30rpx;
+		}
+		// height: 100rpx;
+		// line-height: 100rpx;
+		// text-align: center;
+		// color: #fff;
+		// background: linear-gradient(90deg, #6fd237 0%, #57c32a 100%);
+		// border-radius: 200rpx ;
+		// margin-right: 15rpx;
+		// padding: 0 20rpx;
+	}
+	.rightBlack {
+		background: #000;
+		color: #999;
+	}
+}
+.ordbtn {
+	position: fixed;
+	bottom: 130rpx;
+	right: 0;
+	z-index: 999;
+	width: 150rpx;
+	height: 150rpx;
+	line-height: 150rpx;
+	border-radius: 50%;
+	color: #fff;
+	text-align: center;
+	vertical-align: middle;
+	font-size: 30rpx;
+	background: radial-gradient(#68e670 0%, #5dce2c 100%);
+}
+</style>

+ 394 - 0
pages/tabbar/classold.vue

@@ -0,0 +1,394 @@
+<template>
+	<view class="root">
+		<view class="topBox dffs">
+			<u-tabs
+				:list="dataList.grade"
+				keyName="name"
+				:current="current"
+				:itemStyle="{ fontSize: '28rpx', height: '100rpx' }"
+				:activeStyle="{ color: '#87C477',borderBottom:'2px solid #87C477' }"
+				lineHeight="0" 
+				sticky
+				@click="topHandle"
+			></u-tabs>
+		</view>
+		<view class="content dfsb">
+			<view class="secTop">
+				<scroll-view :scroll-top="0" scroll-y="true" class="scroll-Y">
+					<view @tap="choose(item.id)" :class="['topLi', leftSel == item.id ? 'topsel' : '']" v-for="(item, index) in dataList.subject" :key="index">
+						{{ item.name }}
+					</view>
+				</scroll-view>
+			</view>
+			<view class="topInfo">
+				<view class="topCInfo">
+					<scroll-view :scroll-top="0" scroll-y="true" class="scroll-Y" @scrolltolower="lower">
+						<view class="box">
+							<view class="swipe">
+								<u-swiper :autoplay="false" :list="dataList.banner" keyName="img" height="84" border-radius="20" @click="bannerClick"></u-swiper>
+							</view>
+							<!-- -->
+							<view v-if="showVideo==1" class="goodLi dffd">
+								<view class="fontsm textgrey">{{ '视频类' }}</view>
+								<view class="son dffs"> 
+									<navigator
+										:url="'/pages/index/video/video?cat=' + item.id"
+										class="li fontmid"
+										:class="ind == 0 ? 'sel' : ''"
+										v-for="(item, ind) in vedio_cats"
+										:key="ind"
+									>
+										{{ item.name }}
+									</navigator>
+								</view>
+							</view>
+							<view class="goodLi dffd" v-for="(item, index) in classList" :key="index">
+								<view class="fontsm textgrey">{{ item.name || '商品名称' }}</view>
+								<view class="son dffs">
+									<view @click="toNext(2, ite)" class="fontmid" v-for="(ite, ind) in item.children" :key="ind">{{ ite.name || '商品名称' }}</view>
+								</view>
+							</view>
+						</view>
+					</scroll-view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			showVideo: uni.getStorageSync('showVideo') || '0',
+			current: 0,
+			vedio_cats: [], // 视频列表
+			dataList: {}, //一层
+			classList: [
+				// { name: '姓名', goods_img: '/static/img/pro/hotbgzj.png' },
+			], //商品
+			leftSel: 0, //一层分类选中
+			status: 'loadmore',
+			page: 1,
+			pagnum: 6
+		};
+	},
+	async onLoad(opt) {
+		await this.onload();
+		await this.getVidList();
+	},
+	onPullDownRefresh() {
+		this.page = 1;
+		this.leftSel = 0;
+		this.current = 0;
+		this.dataList = {};
+		this.classList = [];
+		this.onload();
+		setTimeout(function() {
+			uni.stopPullDownRefresh();
+		}, 800);
+	},
+	// onReachBottom() {
+	// 	if (this.status == 'nomore') return;
+	// 	this.status = 'loadmore';
+	// 	this.page = ++this.page;
+	// 	this.onload();
+	// },
+
+	onShow() {},
+	methods: {
+		getVidList() {
+			this.$api
+				.request('index/index', {
+					school_type: '',
+					video_cat: '',
+					page: 1,
+					limit:this.pagnum
+				})
+				.then(data => {
+					if (data.code == 200) {
+						this.showVideo = data.data.vedio_status;
+						uni.setStorageSync('showVideo', data.data.vedio_status);
+						this.vedio_cats = data.data.vedio_cats;
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		// 轮播
+		bannerClick(e) {
+			console.log(e);
+			let item = this.dataList.banner[e];
+			if (item.goods_id != 0) {
+				if (item.type == 1) {
+					uni.navigateTo({
+						url: '/pages/index/video/videoInfo?id=' + item.goods_id
+					});
+				} else {
+					uni.navigateTo({
+						url: '/pages/index/navInfo?id=' + item.goods_id
+					});
+				}
+			}
+		},
+		// 顶部按钮被点击
+		topHandle(e) {
+			console.log('top: ',e);
+			this.current = e.id;
+			// this.onload();
+		},
+		toNext(val, item) {
+			console.log(item);
+			if (val == 1) {
+				uni.navigateTo({
+					url: '/pages/index/video/video'
+				});
+				return;
+			}
+			
+			// console.log('跳转时:',item.id);
+			uni.navigateTo({ 
+				// url: `/pages/index/classList?flag=${val}&subject_id=${val}&grade_id=${this.current}&title=${ item.name }`
+				url: `/pages/index/classList?flag=${val}&cat_id=${item.id}&subject_id=${this.leftSel}&grade_id=${this.current}&title=${ item.name }`
+			});
+		},
+		choose(index) {
+			console.log('leftSel: ',index);
+			this.leftSel = index;
+			console.log('this.leftSel',this.leftSel);
+			// this.onload();
+		},
+		onload() {
+			this.status = 'loadmore';
+			this.$api
+				.request('index/getCateList', {
+					grade_id: this.current,
+					subject_id: this.leftSel
+				})
+				.then(data => {
+					console.log(data);
+					if (data.code == 200) {
+						this.current = data.data.grade[0].id;
+						this.leftSel = data.data.subject[0].id;
+						this.dataList = data.data;
+						this.classList = data.data.class_cate;
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+page {
+	height: 100vh;
+}
+.content {
+	background-color: #fff;
+	align-items: flex-start;
+	.topBox {
+		background-color: #fff;
+	}
+	.secTop {
+		.scroll-Y {
+			height: calc(100vh - 120rpx);
+			flex-wrap: wrap;
+		}
+		.topLi {
+			font-size: 26rpx;
+			width: 168rpx;
+			padding: 26rpx 0;
+			line-height: 37rpx;
+			text-align: center;
+			background: #f4f4f4;
+			color: #666;
+		}
+		.topsel {
+			font-size: 28rpx;
+			box-sizing: border-box;
+			background-color: #fff;
+			color: $promain;
+			font-weight: 600;
+		}
+	}
+	.topInfo {
+		width: 582rpx;
+		padding-right: 30rpx;
+		padding-left: 12rpx;
+		background-color: #f5f5f5;
+		// background-color: #fff;
+		.swipe {
+			width: 540rpx;
+			height: 166rpx;
+			margin: 20rpx 0;
+		}
+		.topClass {
+			position: fixed;
+			z-index: 1;
+			background-color: #fff;
+			padding-left: 12rpx;
+			width: 556rpx;
+			.topClaBox {
+				flex: 1;
+				height: 98rpx;
+				line-height: 98rpx;
+				display: -webkit-box;
+				overflow-x: auto;
+				/*适应苹果*/
+				-webkit-overflow-scrolling: touch;
+				//父盒子隐藏滚动条
+				&::-webkit-scrollbar {
+					display: none;
+				}
+				.topClasLi {
+					font-size: 28rpx;
+					padding: 0 15rpx;
+				}
+				.topClasel {
+					color: $promain;
+				}
+			}
+			.classDown {
+				height: 98rpx;
+				width: 70rpx;
+				box-shadow: -2rpx -5rpx 2rpx 5rpx rgba($color: #000000, $alpha: 0.05);
+				background-color: #fff;
+				.xuanz {
+					transform: translate(180deg);
+				}
+			}
+		}
+		.topCInfo {
+			flex: 1;
+			height: calc(100vh - 120rpx);
+			.maskbg {
+				position: fixed;
+				top: 170rpx;
+				left: 200rpx;
+				width: calc(100% - 200rpx);
+				height: calc(100% - 100rpx);
+				background-color: rgba(0, 0, 0, 0.65);
+				z-index: 2;
+			}
+			/* #ifdef MP */
+			.maskbg {
+				position: fixed;
+				top: 70rpx;
+			}
+			/* #endif */
+			.scroll-Y {
+				height: calc(100vh - 120rpx);
+			}
+			.box {
+				width: 100%;
+				flex-wrap: wrap;
+			}
+			.goodLi {
+				width: 100%;
+				margin-top: 20rpx;
+				padding: 20rpx;
+				background-color: #fff;
+				border-radius: 10rpx;
+				.gdImg {
+					width: 100%;
+					height: 120rpx;
+					background-color: #fbf9fa;
+					margin-bottom: 36rpx;
+				}
+				.oneelli {
+					text-align: center;
+					font-size: 24rpx;
+				}
+				.son {
+					
+					margin-top: 10rpx;
+					margin-left: 30rpx;
+					flex-wrap: wrap;
+					.fontmid {
+						margin-right: 30rpx;
+						margin-bottom: 20rpx;
+						font-size: 24rpx !important;
+					}
+				}
+			}
+		}
+	}
+}
+.cartBox {
+	width: 710rpx;
+	position: fixed;
+	bottom: 10rpx;
+	/* #ifdef H5 */
+	bottom: 128rpx;
+	/* #endif */
+	left: 0;
+	z-index: 999;
+	margin: 0 20rpx;
+	.leftbox {
+		height: 100rpx;
+		flex: 1;
+		background: #000000;
+		border-radius: 200rpx 0px 0px 200rpx;
+		padding-left: 30rpx;
+		.imgBox {
+			position: relative;
+			image {
+				width: 90rpx;
+				height: 82rpx;
+			}
+		}
+		.priceInfo {
+			position: relative;
+			margin-left: 60rpx;
+			.price {
+				color: #fff;
+			}
+		}
+	}
+	.rightbox {
+		height: 100rpx;
+		line-height: 100rpx;
+		text-align: center;
+		color: #fff;
+		background: #d8d8d8 linear-gradient(90deg, #6fd237 0%, #57c32a 100%);
+		border-radius: 0px 200rpx 200rpx 0px;
+		width: 194rpx;
+	}
+	.ordbox {
+		font-size: 24rpx;
+		text-align: center;
+		margin-bottom: 10rpx;
+		text {
+			font-size: 30rpx;
+		}
+		// height: 100rpx;
+		// line-height: 100rpx;
+		// text-align: center;
+		// color: #fff;
+		// background: linear-gradient(90deg, #6fd237 0%, #57c32a 100%);
+		// border-radius: 200rpx ;
+		// margin-right: 15rpx;
+		// padding: 0 20rpx;
+	}
+	.rightBlack {
+		background: #000;
+		color: #999;
+	}
+}
+.ordbtn {
+	position: fixed;
+	bottom: 130rpx;
+	right: 0;
+	z-index: 999;
+	width: 150rpx;
+	height: 150rpx;
+	line-height: 150rpx;
+	border-radius: 50%;
+	color: #fff;
+	text-align: center;
+	vertical-align: middle;
+	font-size: 30rpx;
+	background: radial-gradient(#68e670 0%, #5dce2c 100%);
+}
+</style>

+ 111 - 0
pages/tabbar/components/list.vue

@@ -0,0 +1,111 @@
+<template>
+	<view class="box">
+		<!-- 1 回放  2.直播列表 -->
+		<view v-if="flag == 1" class="boxlist">
+			<view  v-if="item.live_status=='101'" @click="nextTo(item,ind, 1)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
+				<image class="imgbox" :src="item.share_img" mode=""></image>
+				<view class="dffd flex1">
+					<view class="title elli">{{ item.name }}</view>
+					<view class="textgrey fontsm">{{ item.up_name }}</view>
+					<view class="auth dfsb">
+						<text class="fontssm textgrey">作者:{{ item.anchor_name }}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- <navigator url="plugin-private://wx00d3d08bf67e853e/pages/live-player-plugin?room_id=6&custom_params=''">
+			gogoogogog
+		</navigator> -->
+		<view v-if="flag == 2" class="boxlist">
+			<view v-if="item.live_status !='101'" @click="nextTo(item,ind, 2)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
+				<image class="imgbox" :src="item.share_img" mode=""></image>
+				<view class="dffd flex1">
+					<view class="title elli">{{ item.name }}</view>
+					<!-- 101:直播中,102:未开始,103已结束,104禁播,105:暂停,106:异常,107:已过期 -->
+					<view class="textgrey fontsm">{{ item.live_status=='101'?'直播中':item.live_status=='102'?'未开始':item.live_status=='103'?'已结束,观看回放':'暂未开始' }}</view>
+					<view class="auth dfsb">
+						<text class="fontssm textgrey">作者:{{ item.anchor_name }}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {};
+	},
+	props: {
+		list: {
+			type: Array,
+			default: []
+		},
+		flag: {
+			type: [String, Number],
+			default: 1 //1 回放  2.直播列表
+		}
+	},
+	methods: {
+		nextTo(item,ind, val) {
+			if (val == 1) {  
+				let roomId = item.roomid; // 填写具体的房间号,可通过下面【获取直播房间列表】 API 获取
+				let customParams = '' // 开发者在直播间页面路径上携带自定义参数(如示例中的path和pid参数),后续可以在分享卡片链接和跳转至商详页时获取,详见【获取自定义参数】、【直播间到商详页面携带参数】章节(上限600个字符,超过部分会被截断)
+				uni.navigateTo({
+				    url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${roomId}&custom_params=${customParams}`
+				})
+			}else{
+				// uni.navigateTo({
+				// 	url:'/pagesA/broadcast/blist?item='+JSON.stringify(item)
+				// }); 
+					this.$api.request('live/get_replay', { roomid: item.roomid }).then(data => {
+						if (data.code == 200) {
+							let  media_url= data.data.live_replay[0].media_url;
+							uni.navigateTo({
+								url: '/pagesA/broadcast/bdInfo?media_url=' + JSON.stringify(media_url)
+							}); 
+							
+							console.log(media_url);
+						} else {
+							this.$api.toast(data.msg);
+						}
+					}); 
+			} 
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.boxlist {
+	.vidLi {
+		width: 100%;
+		padding: 27rpx 0;
+		background-color: #fff;
+		&:nth-of-type(2n) {
+			margin-right: 0;
+		}
+		.imgbox {
+			width: 146rpx;
+			height: 146rpx;
+			margin-right: 18rpx;
+			border-radius: 10rpx;
+		}
+		.title {
+			font-size: 28rpx;
+			line-height: 40rpx;
+			margin-bottom: 12rpx;
+		}
+		.auth {
+			margin-top: 15rpx;
+			width: 100%;
+		}
+		.down {
+			width: 35rpx;
+			height: 30rpx;
+			margin-left: 58rpx;
+		}
+	}
+}
+</style>

+ 179 - 0
pages/user/address/address.vue

@@ -0,0 +1,179 @@
+<template>
+	<view id="addressList">
+		<view class="addresBox" v-for="item in newsInfo" :key="item.id">
+			<!-- <image src="../../../static/img/common/addresList.svg" mode=""></image> -->
+			<view @click="getItem(item)" class="adresInfo bb">
+				<view class="adresName">
+					{{ item.name }}
+					<text class="textgrey">{{ item.phone }}</text>
+				</view>
+				<view class="adresDet">
+					<text v-if="item.is_check == 1" class="promain">默认</text>
+					{{ item.mergename }}{{ item.detail }}
+				</view>
+			</view>
+			<!-- "is_default": 1, //是否默认   1=默认   0=不默认 -->
+			<view class="adresDo dfsb">
+				<view @click="showDefault(1, item)" class="flex1 dffs">
+					<image class="icon" v-if="item.is_default == 1" src="/static/img/pro/chenggong.png" mode=""></image>
+					<image class="icon" v-if="item.is_default == 0" src="/static/img/pro/wxz.png" mode=""></image>
+					设为默认
+				</view>
+				<text @click="showDefault(2, item)" class="textgrey fontsm">删除</text>
+				<text @click="showDefault(3, item)" class="textgrey fontsm">修改</text>
+			</view>
+		</view>
+		<u-empty v-if="newsInfo.length < 1" icon-size="200" text="还没有收货地址哦,快去添加吧!" mode="list"></u-empty>
+		<!-- #ifdef MP -->
+		<!-- #endif -->
+		<view @tap="doAddres('add')" class="fixBox"><view class="clickbtn">添加新地址</view></view>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'addressList',
+	data() {
+		return {
+			newsInfo: [],
+			page: 1,
+			limit: 10,
+			status: 'more'
+		};
+	},
+	onNavigationBarButtonTap(e) {
+		uni.navigateTo({
+			url: './editAddres?type=add'
+		});
+	},
+	onReachBottom() {
+		if (this.status == 'nomore') return;
+		this.page = ++this.page;
+		this.getAddList();
+	},
+	onLoad(opt) {
+		// this.selType = opt.type || '';
+	},
+	onShow() {
+		// this.selType = opt.type || '';
+		this.status = 'loadmore';
+		this.page = 1;
+		this.getAddList();
+	},
+	methods: {
+		doAddres(type, val) {
+			console.log(2);
+			uni.navigateTo({
+				url: './editAddres?type=' + type
+			});
+		},
+		getItem(item) {
+			let address = { shou_name: item.name, shou_phone: item.phone, address_id: item.id, shou_address: item.mergename + item.detail };
+			// console.log(this.$api.prePage().$data.addressInfo); 
+			this.$api.prePage().addressInfo = address;
+			uni.navigateBack({
+				delta: 1
+			});
+		},
+		getAddList() {
+			this.$api
+				.request('user_address/addressList', {
+					page: this.page,
+					limit: this.limit
+				})
+				.then(data => {
+					if (data.code == 200) {
+						this.newsInfo = data.data.list;
+						if (data.data.list.length < this.limit) {
+							this.status = 'nomore';
+						}
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		// 设为默认
+		showDefault(val, item) {
+			if (val == 3) {
+				uni.navigateTo({
+					url: '/pages/user/address/editAddres?type=edit' + '&id=' + item.id
+				});
+				return;
+			}
+			let url = val == 1 ? 'user_address/setDefault' : 'user_address/addressDel';
+			this.$api
+				.request(url, {
+					id: item.id
+				})
+				.then(data => {
+					this.$api.toast(data.msg);
+					if (data.code == 200) {
+						setTimeout(res => {
+							this.getAddList();
+						}, 800);
+					}
+				});
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+#addressList {
+	padding: 30rpx 30rpx 120rpx;
+	.addresBox {
+		background: rgba(255, 255, 255, 1);
+		border-radius: 16rpx;
+		padding: 0 30rpx;
+		margin-bottom: 30rpx;
+		image {
+			width: 72rpx;
+			height: 72rpx;
+		}
+		.adresInfo {
+			flex: 1;
+			padding: 20rpx 0;
+			.adresName {
+				font-size: 30rpx;
+				line-height: 44rpx;
+				text {
+					font-size: 30rpx;
+					margin-left: 8rpx;
+				}
+			}
+			.adresDet {
+				line-height: 40rpx;
+				font-size: 30rpx;
+				.promain {
+					font-size: 24rpx;
+					min-width: 80rpx;
+					padding: 0 16rpx;
+					height: 40rpx;
+					line-height: 40rpx;
+					background: rgba(224, 40, 40, 0.1);
+					border-radius: 4rpx;
+					margin-right: 8rpx;
+				}
+			}
+		}
+		.adresDo {
+			padding: 17rpx 0 29rpx;
+			color: #999;
+			.icon {
+				width: 30rpx;
+				height: 30rpx;
+				margin-right: 12rpx;
+			}
+			.flex1 {
+				font-size: 26rpx;
+			}
+			.textgrey {
+				margin-left: 65rpx;
+			}
+		}
+	}
+	.clickbtn {
+		margin: 0 auto;
+		border-radius: 11rpx;
+	}
+}
+</style>

+ 216 - 0
pages/user/address/editAddres.vue

@@ -0,0 +1,216 @@
+<template>
+	<view id="editAddres">
+		<view class="editBox">
+			<view class="inBox dfsb">
+				<text>收货人</text>
+				<input focus type="text" v-model="newsInfo.name" placeholder="请填写收货人姓名" />
+			</view>
+			<view class="inBox dfsb">
+				<text>手机号码</text>
+				<input type="text" v-model="newsInfo.phone" placeholder="请填写收货人手机号码" />
+			</view>
+			<view @tap="addressShow = true" class="inBox dfsb">
+				<text>所在地区</text>
+				<input disabled type="text" v-model="newsInfo.address" placeholder="省市区、乡镇" />
+				<pickerAddress v-model="addressShow" @confirm="addresspick" />
+				<u-icon size="16" name="arrow-right"></u-icon>
+			</view>
+			<view class="inBox spec dffd">
+				<text class="specbot">详细地址</text>
+				<input type="text" v-model="newsInfo.detail" placeholder="街道、、小区、楼牌号、单元室等" />
+			</view>
+		</view>
+		<view @tap="newsInfo.is_check = !newsInfo.is_check" class="editBox dfsb specbox">
+			<text>设为默认</text>
+			<u-switch activeColor="#5FB25A" v-model="value"></u-switch>
+			<!-- <image :src="newsInfo.is_check == 1 ? require('@/static/img/common/mraddsel.svg') : require('@/static/img/common/mradd.svg')" mode=""></image> -->
+		</view>
+		<!-- #ifdef MP -->
+		<view v-if="state" @click="delAdd" class="clickbtn delbtn promain ">删除收货地址</view>
+		<view @click="saveAdd" class="clickbtn">保存</view>
+		<!-- #endif -->
+		<!-- #ifndef MP -->
+		<view v-if="state" @click="delAdd" class="delbtn promain">删除收货地址</view>
+		<view @click="saveAdd" class="clickbtn">保存</view>
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+import pickerAddress from '@/common/othCom/liudx-pickerAddress/index.vue';
+export default {
+	data() {
+		return {
+			newsInfo: {
+				name: '',
+				phone: '',
+				address: '',
+				detail: '',
+				//选中地址
+				is_check: false // true选中 false 未选中
+			},
+			value: '',
+			//添加还是编辑
+			state: true, //false 添加  true编辑
+			//三级联动
+			addressShow: false,
+			form: {
+				province: '',
+				city: '',
+				area: ''
+			}
+		};
+	},
+	onNavigationBarButtonTap() {
+		this.saveAdd();
+	},
+	onLoad(opt) {
+		console.log(opt);
+		if (opt.type == 'edit') {
+			this.state = true;
+			uni.setNavigationBarTitle({
+				title: '编辑地址'
+			});
+			this.id = opt.id;
+			this.onload();
+		} else {
+			this.state = false;
+			uni.setNavigationBarTitle({
+				title: '添加地址'
+			});
+		}
+	},
+	methods: {
+		// /、选择地址
+		addresspick(obj) {
+			let arr = ['province', 'city', 'area'];
+			let place = '';
+			arr.map(key => {
+				this.form[key] = obj[key].id;
+				place += obj[key].name;
+			});
+			this.newsInfo.address = place;
+		},
+		saveAdd() {
+			let url = '';
+			if (!this.newsInfo.name) return this.$api.toast('请输入姓名');
+			if (!this.newsInfo.phone) return this.$api.toast('请输入手机号');
+			if (!this.form) return this.$api.toast('请选择地址');
+			if (!this.newsInfo.detail) return this.$api.toast('请输入详细地址');
+
+			this.$api
+				.request('user_address/setAddress', {
+					name: this.newsInfo.name,
+					phone: this.newsInfo.phone,
+					province_id: this.form.province,
+					city_id: this.form.city,
+					area_id: this.form.area,
+					detail: this.newsInfo.detail,
+					is_default: this.newsInfo.is_check ? 1 : 0, //1 默认 2 不默认
+					id: this.id || ''
+				})
+				.then(data => {
+					if (data.code == 200) {
+						// this.newsInfo=data.data.address;
+						this.$api.toast(data.msg);
+						setTimeout(res=>{
+							uni.navigateBack({
+								delta: 1
+							});
+						},600)
+					} else {
+						this.$api.toast(data.msg);
+					}
+				})
+		},
+		delAdd() {
+			this.$api
+				.request('user_address/addressDel', {
+					id: this.id
+				})
+				.then(data => {
+					this.$api.toast(data.msg);
+					if (data.code == 200) {
+						setTimeout(res => {
+							uni.navigateBack({
+								delta: 1
+							});
+						}, 800);
+					}
+				})
+		},
+		onload() {
+			this.$api
+				.request('user_address/addressInfo', {
+					id: this.id
+				})
+				.then(data => {
+					if (data.code == 200) {
+						this.newsInfo.name = data.data.name;
+						this.newsInfo.phone = data.data.phone;
+						this.form.province = data.data.province_id;
+						this.form.city = data.data.city_id;
+						this.form.area = data.data.area_id;
+						this.newsInfo.address = data.data.mergename;
+						this.newsInfo.detail = data.data.detail;
+						this.newsInfo.is_check = data.data.is_default == 1 ? true : false;
+					} else {
+						this.$api.toast(data.msg);
+					}
+				})
+		}
+	},
+	components: {
+		pickerAddress
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+#editAddres {
+	padding: 30rpx 0rpx;
+	.editBox {
+		background-color: #fff;
+		padding: 0 30rpx;
+		.inBox {
+			padding: 30rpx 0;
+			border-bottom: 1px solid $bordermain;
+			text {
+				min-width: 140rpx;
+				font-size: 30rpx;
+			}
+			input {
+				width: 100%;
+				flex: 1;
+				font-size: 30rpx;
+				text-align: right;
+			}
+			.specbot {
+				margin-bottom: 30rpx;
+			}
+		}
+		.spec {
+			input {
+				text-align: left;
+			}
+		}
+	}
+	.specbox {
+		margin: 30rpx 0;
+		padding: 30rpx;
+		image {
+			width: 90rpx;
+			height: 40rpx;
+		}
+	}
+	.clickbtn {
+		width: 690rpx;
+		margin: 30rpx 32rpx;
+		border-radius: 11rpx;
+	}
+	.delbtn {
+		background: #fff;
+		padding: 30rpx;
+	}
+}
+</style>

+ 137 - 0
pages/user/coupon/coupon.vue

@@ -0,0 +1,137 @@
+<template>
+	<view class="pageCon">
+		<view class="list dfsb" v-for="(item, ind) in list" :key="ind">
+			<view class="left">
+				<view class="num">
+					{{ item.reduce }}
+					<text class="red fontssm">元</text>
+				</view>
+				<text class="textgrey fontssm">{{ item.satisfy }}元以上使用</text>
+			</view>
+			<view class="center flex1 dffd">
+				<text class="bold fontbase">{{ item.names }}</text>
+				<view class="red fontsm">{{ item.content }}</view>
+				<text class="textgrey fontsm">有效期至{{ item.end_time }}</text>
+			</view>
+			<view @click="getHand(item)" class="right red fontssm">立即领取</view>
+		</view>
+		<u-empty v-if="list.length<1" text="还没有优惠券" mode="coupon"></u-empty>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			list: [
+				// {
+				// 	money: 5,
+				// 	name: '资源通用下载券',
+				// 	content: '用于下载5元以内资源1次',
+				// 	time: '有效期至2021.11.03'
+				// },
+			],
+			status: 'loading',
+			page: 1,
+			pagenum: 10
+		};
+	},
+	onPullDownRefresh() {
+		this.page = 1;
+		this.list = [];
+		this.onload();
+		setTimeout(res => {
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	onReachBottom() {
+		if (this.status == 'nomore') return;
+		this.status = 'loading';
+		this.page = ++this.page;
+		this.onload();
+	},
+	onLoad(opt) {
+		this.onload();
+	},
+	methods: {
+		getHand(item) {
+			this.$api
+				.request('coupon/userReceive', {
+					coupon_id: item.id
+				})
+				.then(data => {
+					this.$api.toast(data.msg);
+					if (data.code == '200') {
+						setTimeout(res => {
+							this.page = 1;
+							this.list = [];
+							this.onload();
+						}, 600);
+					}
+				});
+		},
+		onload() {
+			this.$api
+				.request('coupon/getCouponList', {
+					flag: 0,
+					page: this.page,
+					limit: this.pagenum
+				})
+				.then(data => {
+					if (data.code == '200') {
+						this.list = this.list.concat(data.data);
+						if (data.data.length < this.pagnum) {
+							this.status = 'nomore';
+						}
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.pageCon {
+	padding: 20rpx 30rpx;
+	.list {
+		background: #ffffff;
+		border-radius: 24rpx;
+		padding: 32rpx 30rpx;
+		margin-bottom: 20rpx;
+		.left {
+			padding-right: 29rpx;
+			border-right: 1rpx solid #dedede;
+			.num {
+				font-size: 80rpx;
+				font-family: PingFangSC-Semibold, PingFang SC;
+				font-weight: 600;
+				color: #f03a2f;
+				line-height: 112rpx;
+			}
+		}
+		.center {
+			justify-content: space-between;
+			margin: 0 30rpx;
+			align-items: flex-start;
+			.red {
+				margin: 20rpx 0;
+			}
+		}
+		.right {
+			padding: 10rpx 20rpx;
+			border-radius: 28rpx;
+			border: 1px solid #e93837;
+		}
+	}
+	.tips {
+		margin-top: 70rpx;
+		font-size: 26rpx;
+		justify-content: center;
+		.prosecond {
+			font-size: 26rpx;
+		}
+	}
+}
+</style>

+ 143 - 0
pages/user/coupon/myCoup.vue

@@ -0,0 +1,143 @@
+<template>
+	<view class="pageCon">
+		<view class="list dfsb" v-for="(item, ind) in list" :key="ind">
+			<view class="left">
+				<view class="num">
+					{{item.reduce}}
+					<text class="red fontssm">元</text>
+				</view>
+				<text class="textgrey fontssm">{{item.satisfy}}元以上使用</text>
+			</view>
+			<view class="center flex1 dffd">
+				<text class="bold fontbase">{{ item.names }}</text>
+				<view class="red fontsm">{{ item.content }}</view>
+				<text class="textgrey fontsm">有效期至{{item.end_time}}</text>
+			</view>
+			<view @click="useHandle(item)" class="right red fontssm">立即使用</view>
+		</view>
+		<u-empty v-if="list.length<1" text="还没有优惠券" mode="coupon"></u-empty>
+		<navigator url="/pages/user/coupon/coupon" class="tips textgrey dffs">
+			去领取更多
+			<view class="prosecond dffs">
+				优惠券
+				<u-icon size="14" color="#ED742E" name="arrow-right"></u-icon>
+			</view>
+		</navigator>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			money:'',   //文档  商品使用优惠券时带来的价格
+			list: [
+				// {
+				// 	money: 5,
+				// 	name: '资源通用下载券',
+				// 	content: '用于下载5元以内资源1次',
+				// 	time: '有效期至2021.11.03'
+				// },
+			],
+			status: 'loading',
+			page: 1,
+			pagenum: 10
+		};
+	},
+	onPullDownRefresh() {
+		this.page = 1;
+		this.list = [];
+		this.onload();
+		setTimeout(res => {
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	onReachBottom() {
+		if (this.status == 'nomore') return;
+		this.status = 'loading';
+		this.page = ++this.page;
+		this.onload();
+	},
+	onLoad(opt) {
+		this.money=opt.money||0;
+		this.onload();
+	},
+	methods: {
+		// 立即使用
+		useHandle(item){
+			if(this.money){
+				if(Number(this.money)<Number(item.satisfy)) return this.$api.toast('满'+item.satisfy+'元使用')
+				this.$api.prePage().coupon=item;
+				uni.navigateBack({
+					delta:1
+				})
+			}else{
+				uni.redirectTo({
+					url:'/pages/index/index'
+				})
+			}
+		},
+		onload() {
+			this.$api
+				.request('coupon/userCoupon', {
+					page: this.page,
+					limit: this.pagenum
+				})
+				.then(data => {
+					if (data.code == '200') {
+						this.list = this.list.concat(data.data);
+						if (data.data.length < this.pagnum) {
+							this.status = 'nomore';
+						}
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.pageCon {
+	padding: 20rpx 30rpx;
+	.list {
+		background: #ffffff;
+		border-radius: 24rpx;
+		padding: 32rpx 30rpx;
+		margin-bottom: 20rpx;
+		.left {
+			padding-right: 29rpx;
+			border-right: 1rpx solid #dedede;
+			.num {
+				font-size: 80rpx;
+				font-family: PingFangSC-Semibold, PingFang SC;
+				font-weight: 600;
+				color: #f03a2f;
+				line-height: 112rpx;
+			}
+		}
+		.center {
+			justify-content: space-between;
+			margin: 0 30rpx;
+			align-items: flex-start;
+			.red {
+				margin: 20rpx 0;
+			}
+		}
+		.right {
+			padding: 10rpx 20rpx;
+			border-radius: 28rpx;
+			border: 1px solid #e93837;
+		}
+	}
+	.tips {
+		margin-top: 70rpx;
+		font-size: 26rpx;
+		justify-content: center;
+		.prosecond {
+			font-size: 26rpx;
+		}
+	}
+}
+</style>

+ 275 - 0
pages/user/funManage/addCash.vue

@@ -0,0 +1,275 @@
+<template>
+	<view class="home">
+		<view class="putWarp dffd">
+			<block v-if="type == 1">
+				<view class="title">{{ edit ? '编辑支付宝' : '添加支付宝' }}</view>
+				<view class="subtit fontmid textgrey">请绑定本人的支付宝账号</view>
+				<view class="putin dffs bb">
+					<text class="fontmid">实名姓名</text>
+					<input @confirm="clickHandle" type="text" v-model="name" placeholder="" />
+				</view>
+				<view class="putin dffs bb">
+					<text class="fontmid">支付宝账号</text>
+					<input @confirm="clickHandle" type="text" v-model="num" placeholder="" />
+				</view>
+			</block>
+			<block v-if="type == 2">
+				<view class="title">添加银行卡</view>
+				<view class="subtit fontmid textgrey">请绑定本人的银行卡账号</view>
+				<view class="putin dffs bb">
+					<text class="fontmid">持卡人</text>
+					<input @confirm="clickHandle" type="text" v-model="idname" placeholder="" />
+				</view>
+				<view class="putin dffs bb">
+					<text class="fontmid">卡号</text>
+					<input @confirm="clickHandle" type="text" v-model="idcode" placeholder="" />
+				</view>
+				<view class="putin dffs bb">
+					<text class="fontmid">所属银行</text>
+					<input @confirm="clickHandle" type="text" v-model="bank" placeholder="" />
+				</view>
+			</block>
+			<view class="putin dffs bb">
+				<text class="fontmid">绑定手机号</text>
+				<input @confirm="clickHandle" type="text" v-model="phone" placeholder="" />
+			</view>
+			<view class="putin dffs bb">
+				<text class="fontmid">验证码</text>
+				<view class="dfsb">
+					<input type="text" v-model="code" placeholder="" />
+					<verif class="yzBox" :flag="3" :phone="phone"></verif>
+				</view>
+			</view>
+			<block v-if="type == 1">
+				<view @tap="choose" class="putin spec dffd">
+					<view class="fontmid">收款码</view>
+					<view v-if="img" class="pre-item dffs"><image class="pre-item-image" :src="img_name" mode="widthFix"></image></view>
+					<view v-if="!img" class="imgBox dffd"><u-icon name="camera-fill" size="84" color="#999"></u-icon></view>
+				</view>
+			</block>
+			<view @tap="clickHandle" class="clickbtn">{{ edit ? '确认修改' : '确认添加' }}</view>
+			<view class="fontsm textgrey dffs">
+				点击确认即视为同意
+				<navigator url="/pages/user/mine/service?type=2" class="fontsm prosecond">《用户隐私协议》</navigator>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { pathToBase64 } from '@/common/tool/pathToBase64.js';
+var _this;
+import verif from '@/components/comPage/verif.vue';
+export default {
+	components: {
+		verif
+	},
+	data() {
+		return {
+			edit: false, //支付宝已经存在 为true
+			type: '', //1支付宝 2 银行卡
+			name: '',
+			num: '',
+			phone: '',
+			img: '',
+			img_name: '',
+			idname: '',
+			idcode: '',
+			bank: '',
+			code: ''
+		};
+	},
+	onLoad(opt) {
+		this.type = opt.type || '1';
+		if (this.type == 1) {
+			this.getList();
+		}
+	},
+	methods: {
+		getList() {
+			this.$api.request('bank/withdrawAccount', { identify: 1 }).then(data => {
+				if (data.code == 200) {
+					let arr = data.data;
+					if (arr.length > 0) {
+						arr.forEach(item => {
+							if (item.type == 2&&item.account) {
+								this.name = item.name;
+								this.num = item.account;
+								this.edit = true;
+							}
+						});
+					}
+				} else {
+					this.$api.toast(data.msg);
+				}
+			});
+		},
+		choose() {
+			let that = this;
+			uni.chooseImage({
+				count: 1, //默认9
+				sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+				success: function(res) {
+					var imageSrc = res.tempFilePaths[0];
+					pathToBase64(imageSrc).then(base64 => {
+						that.$api
+							.request('common/doupload', {
+								imgdata: base64
+							})
+							.then(res => {
+								that.img_name = res.data.imgurl;
+								that.img = res.data.img_id;
+							});
+					});
+				} 
+			});
+		},
+		clickHandle() {
+			if (this.type == 1) {
+				if (!this.name) {
+					return this.$api.toast('请输入用户名');
+				}
+				if (!this.num) {
+					return this.$api.toast('请输入账号');
+				}
+				if (!this.img) {
+					return this.$api.toast('请上传收款码');
+				}
+			} else {
+				if (!this.idname) {
+					return this.$api.toast('请输入持卡人');
+				}
+				if (!this.idcode) {
+					return this.$api.toast('请输入卡号');
+				}
+				if (!this.bank) {
+					return this.$api.toast('请输入银行名称');
+				}
+			}
+			let phoneReg = /^(1[3-9])\d{9}$/;
+			if (!phoneReg.test(this.phone)) {
+				return this.$api.toast('手机号码不合法!');
+			}
+			if (!this.code) {
+				return this.$api.toast('请输入验证码');
+			}
+			let url = this.type == 1 ? (this.edit ? 'bank/changeAccount' : 'bank/account') : 'bank/add';
+			this.$api
+				.request(url, {
+					name: this.type == 1 ? this.name : this.idname,
+					account: this.num,
+					mobile: this.phone,
+					code: this.code,
+					img: this.img,
+					bank_name: this.bank,
+					bank_number: this.idcode,
+					type: 1
+				})
+				.then(data => {
+					console.log(data);
+					if (data.code == 200) {
+						this.$api.toast(data.msg);
+						setTimeout(res => {
+							uni.navigateBack({
+								delta: 1
+							});
+						}, 800);
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.home {
+	min-height: 100vh;
+	background-color: #fff;
+	.pageImg {
+		image {
+			margin: 80rpx auto 80rpx;
+			width: 160rpx;
+			height: 160rpx;
+		}
+	}
+	.putWarp {
+		background-color: #fff;
+		padding: 61rpx 0rpx 0;
+		align-items: center;
+		.title {
+			margin-bottom: 21rpx;
+			font-size: 42rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			line-height: 59rpx;
+			color: #333333;
+		}
+		.putin {
+			width: 100%;
+			font-size: 32rpx;
+			padding: 7rpx 43rpx 0rpx;
+			border-radius: 8rpx;
+			border-bottom: 1rpx solid #f5f5f5;
+			input {
+				border-radius: 8rpx;
+				flex: 1;
+				height: 110rpx;
+				font-size: $font-mid;
+			}
+			.fontmid {
+				width: 210rpx;
+			}
+		}
+		.spec {
+			padding: 30rpx 43rpx;
+			.fontmid {
+				margin-bottom: 30rpx;
+			}
+			.imgBox {
+				border: 1px solid #f3f3f3;
+				justify-content: center;
+				align-items: center;
+				width: 400rpx;
+				height: 240rpx;
+				padding: 40rpx;
+				margin: 0 auto;
+			}
+			.pre-item {
+				margin: 0 auto;
+				width: 420rpx;
+				// height: 420rpx;
+				position: relative;
+			}
+			.pre-item-image {
+				width: 100%;
+			}
+
+			.u-delete-icon {
+				position: absolute;
+				top: -10rpx;
+				right: -10rpx;
+				z-index: 10;
+				background-color: #333;
+				border-radius: 100rpx;
+				width: 40rpx;
+				height: 40rpx; 
+			}
+		}
+		.yzBox {
+			margin-left: 30rpx;
+			border-radius: 8rpx;
+		}
+		.xyTips {
+			width: 100%;
+			font-size: 28rpx;
+			color: #999;
+		}
+	}
+	.clickbtn {
+		margin-top: 106rpx;
+		border-radius: 45rpx;
+	}
+}
+</style>

+ 280 - 0
pages/user/funManage/bindMethods.vue

@@ -0,0 +1,280 @@
+<template>
+	<view class="container" :class="{ show: loaded }">
+		<view class="tabs dfsb">
+			<view class="tab-item" :class="type == 'alipay' ? 'on' : ''" @click="setTabEvent('alipay')">支付宝</view>
+			<!-- <view class="tab-item" :class="type == 'wechat' ? 'on' : ''" @click="setTabEvent('wechat')">微信</view> -->
+			<view class="tab-item" :class="type == 'bank' ? 'on' : ''" @click="setTabEvent('bank')">银行卡</view>
+		</view>
+		<!-- 支付宝绑定 -->
+		<view class="item" v-if="type == 'alipay'">
+			<view class="input-item">
+				<text class="input-item-title">实名姓名</text>
+				<input type="text" v-model="reqData.alipay_name" placeholder="请输入收款人姓名" />
+			</view>
+			<view class="input-item">
+				<text class="input-item-title">支付宝账号</text>
+				<input type="text" v-model="reqData.alipay_num" placeholder="请输入支付宝账号" />
+			</view>
+		</view>
+		<!-- 		<view v-if="type == 'alipay'" class="upload-box">
+			<text class="upload-box-title">支付宝收款码</text>
+			<view class="img-box" @click="choose_img_upload">
+				<image :src="reqData.alipay_num.alipay_img_url || '../../static/bg/upload-icon.png'" mode="aspectFit">
+				</image>
+			</view>
+		</view> -->
+
+		<!-- 微信绑定 -->
+		<!-- <view class="item" v-if="type == 'wechat'">
+						<view class="input-item">
+				<text class="input-item-title">收款人姓名</text>
+				<input type="text" v-model="reqData.wechat_num.wechat_num1" placeholder="请输入收款人姓名" />
+			</view>
+			<view class="input-item">
+				<text class="input-item-title">微信账号</text>
+				<input type="text" v-model="reqData.wechat_num.wechat_num" placeholder="请输入微信账号" />
+			</view>
+		</view>
+		<view v-if="type == 'wechat'" class="upload-box">
+			<text class="upload-box-title">微信收款码</text>
+			<view class="img-box" @click="choose_img_upload"><image :src="reqData.wechat_num.wechat_img_url || '../../static/bg/upload-icon.png'" mode="aspectFit"></image></view>
+		</view> -->
+
+		<!-- 银行卡绑定 -->
+		<view class="item" v-if="type == 'bank'">
+			<view class="input-item">
+				<text class="input-item-title">姓名</text>
+				<input type="text" v-model="reqData.bank_name" placeholder="请输入姓名" />
+			</view>
+			<view class="input-item">
+				<text class="input-item-title">银行名称</text>
+				<input type="text" v-model="reqData.bank_name" placeholder="例:中国工商银行" />
+			</view>
+			<view class="input-item">
+				<text class="input-item-title">开户支行</text>
+				<input type="text" v-model="reqData.open_bank" placeholder="请输入开户支行" />
+			</view>
+			<view class="input-item">
+				<text class="input-item-title">银行卡号</text>
+				<input type="number" v-model="reqData.bank_num" placeholder="请输入银行卡号" />
+			</view>
+		</view>
+		<view class="btn-box"><u-button color="#ED742F" ref="confirmBtn" text="确认" @click="submitClickEvent"></u-button></view>
+	</view>
+</template>
+<script>
+export default {
+	data() {
+		return {
+			flag:'-1',
+			type: 'alipay',
+			loaded: false,
+			reqData: {}
+		};
+	},
+
+	onLoad(options) {
+		this.flag=options.flag||'-1';
+		this.loadData();
+		this.loaded = true;
+	},
+
+	methods: {
+		/**
+		 * 请求数据只是为了代码不那么乱
+		 * 分次请求未作整合
+		 */
+		async loadData() {
+			// type 类型:  1=支付宝 2=银行卡
+			const res = await this.$api.request('/user_pay/payInfo',{
+				type: this.type=='alipay'?1:2
+			});
+			if (res.code == '200') {
+				this.loaded = true;
+				let data = res.data;
+				this.reqData = data;
+			} else {
+				this.$api.toast(res.msg);
+			}
+		},
+
+		setTabEvent(type) {
+			this.type = type;
+			this.loadData();
+		},
+
+		submitClickEvent() {
+			console.log(11,this.type == 'alipay');
+			if (this.type == 'alipay') {
+				this.saveAli();
+			} else if (this.type == 'wechat') {
+				this.saveWx();
+			} else {
+				this.saveBank();
+			}
+		},
+
+		saveAli() {
+			if (!this.reqData.alipay_name) {
+				this.$api.toast('请输入姓名');
+				return;
+			}
+			if (!this.reqData.alipay_num) {
+				this.$api.toast('请输入支付宝账号');
+				return;
+			}
+			this.setColletMoneyEvent(this.reqData);
+		},
+
+		saveWx() {
+			let _this = this;
+			if (!_this.reqData.wechat_num.wechat_num) {
+				_this.$api.toast('请输入微信账号');
+				return;
+			}
+			_this.setColletMoneyEvent(_this.reqData.wechat_num);
+		},
+
+		saveBank() {
+			if (!this.reqData.bank_num) {
+				this.$api.toast('请输入银行卡号');
+				return;
+			} else if (!this.reqData.open_bank) {
+				this.$api.toast('请输入开户行名称');
+				return;
+			} else if (!this.reqData.bank_name) {
+				this.$api.toast('请输入姓名');	
+			// 	return;	
+			// }else if (!this.reqData.bank_sub) {	
+			// 	this.$api.toast('请输入支行名称');
+				return;
+			}
+			this.setColletMoneyEvent(this.reqData);
+		},
+
+		async setColletMoneyEvent(data) {
+			let num = this.type == 'alipay' ? 1 : 2; // 2:银行卡 1:支付宝
+			const res = await this.$api.request('/user_pay/setPay', {
+				type: num,
+				...data
+			});
+			if (res.code == '200') {
+				this.$api.toast(res.msg);
+				setTimeout(() => {
+					uni.navigateBack();
+				}, 800);
+			} else {
+				this.$api.toast(res.msg);
+			}
+		}, 
+	}
+};
+</script>
+<style>
+page {
+	background-color: #f5f5f5;
+}
+</style>
+<style lang="scss" scoped>
+.container {
+	width: 100%;
+	height: auto;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	padding-top: 20rpx;
+	opacity: 0;
+	transition: opacity 0.2s;
+
+	&.show {
+		opacity: 1;
+	}
+
+	.tabs {
+		width: 100%;
+		height: 100rpx;
+		
+		background-color: #ffffff;
+
+		.tab-item {
+			flex: 1;
+			height: 100rpx;
+			font-size: 32rpx;
+			color: #333;
+			border-bottom: 1rpx solid #fff;
+
+			&.on {
+				border-bottom: 1rpx solid #ff2200;
+				color: #ff2200;
+			}
+		}
+	}
+
+	.item {
+		width: 100%;
+		height: auto;
+		padding: 30rpx 30rpx 0;
+		background-color: #ffffff;
+
+		.input-item {
+			width: 100%;
+			height: 100rpx;
+			display: flex;
+			align-items: center;
+			border-bottom: 1px solid #eeeeee;
+
+			&:last-child {
+				border-bottom: none;
+			}
+
+			.input-item-title {
+				font-size: 32rpx;
+				color: #333;
+			}
+
+			input {
+				text-align: right;
+				flex: 1;
+				font-size: 32rpx;
+				color: #333;
+			}
+		}
+	}
+}
+
+.upload-box {
+	width: 750rpx;
+	height: 414rpx;
+	background-color: #ffffff;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+
+	.upload-box-title {
+		width: 100%;
+		padding: 30rpx;
+		font-size: 32rpx;
+		color: #333;
+	}
+
+	.img-box {
+		width: 430rpx;
+		height: 270rpx;
+		background-color: #d8d8d8;
+		border-radius: 4rpx;
+		margin-top: 10rpx;
+
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
+
+.btn-box {
+	margin-top: 60rpx;
+	width: 100%;
+	height: auto;
+	padding: 0 30rpx;
+}
+</style>

+ 193 - 0
pages/user/funManage/funManage.vue

@@ -0,0 +1,193 @@
+<template>
+	<view class="content">
+		<view class="order-item">
+			<view class="head dffd">
+				<view class="top dfsb">
+					<text class="white fontmid">账户余额(元)</text>
+					<navigator url="/pages/user/funManage/fundCash" class="btn">提现</navigator>
+				</view>
+				<view class="mon">{{ topInfo.money }}</view>
+				<view class="bot dfsb">
+					<view class="monBox flex1 dffd">
+						<text class="fontmid white">推荐奖励(元)</text>
+						<text class="fontmid white">{{ topInfo.recom_money || 0.0 }}</text>
+					</view>
+					<view class="monBox flex1 dffd">
+						<text class="fontmid white">邀请总人数(人)</text>
+						<text class="fontmid white">{{ topInfo.pepo_num || 0.0 }}</text>
+					</view>
+				</view>
+			</view>
+			<view class="pageCon">
+				<view class="pgConTitle">收支明细</view>
+				<view class="listBox">
+					<view v-for="(item, ind) in list" :key="ind" class="pgConBox bb">
+						<view class="pgConTop dfsb">
+							<text class="elli">{{ item.content }}</text>
+							<text :class="[item.check == 1 ? 'red' : 'green', 'mon']">{{ item.money }}</text>
+						</view>
+						<view class="pgConBot dfsb">
+							<text>{{ item.create_time }}</text>
+							<text class="">余额: {{ item.after_money }}</text>
+						</view>
+					</view>
+				</view>
+				<view class="nodata" v-if="list.length < 1"><u-empty icon-size="200" text="还没有记录哦" mode="list"></u-empty></view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			topInfo: {},
+			list: [],
+			status: 'more',
+			page: 1,
+			pagenum: 10
+		};
+	},
+
+	async onLoad(options) {
+		await this.loadData();
+		await this.getMon();
+	},
+	onReachBottom() {
+		if (this.status == 'nomore') return;
+		this.page = ++this.page;
+		this.loadData();
+	},
+	methods: {
+		getMon() {
+			this.$api.request('user/getTj').then(data => {
+				if (data.code == 200) {
+					this.topInfo = data.data;
+				} else {
+					this.$api.toast(data.msg);
+				}
+			});
+		},
+		//获取订单列表
+		loadData() {
+			// flag Number 类型: 1=余额   2=学豆
+			this.$api
+				.request('user/getMoneyLog', {
+					flag: 1,
+					page: this.page,
+					limit: this.pagenum
+				})
+				.then(data => {
+					if (data.code == 200) {
+						this.list = this.list.concat(data.data.list);
+						this.status = 'more';
+
+						if (data.data.list.length < this.limit) {
+							this.status = 'nomore';
+						}
+					} else {
+						this.$api.toast(data.msg);
+					}
+				})
+				.catch(function(error) {
+					console.log(error);
+				});
+		},
+
+		//提现
+		tocash(url) {
+			uni.navigateTo({
+				url: url
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.content {
+	background: #fff;
+	min-height: 100vh;
+	padding: 20rpx 30rpx;
+}
+
+.order-item {
+	background: #fff;
+	margin: 0rpx 6rpx;
+	.head {
+		background: linear-gradient(120deg, #fba54a 0%, #fbc948 100%);
+		border-radius: 23rpx 23rpx 0rpx 0rpx;
+		height: 296rpx;
+		padding: 33rpx 30rpx;
+		.top {
+			width: 100%;
+		}
+		.mon {
+			font-size: 62rpx;
+			font-family: PingFangSC-Semibold, PingFang SC;
+			font-weight: 600;
+			color: #ffffff;
+			line-height: 87rpx;
+		}
+		.bot {
+			width: 100%;
+			margin-top: 20rpx;
+		}
+		.btn {
+			width: 105rpx;
+			height: 46rpx;
+			line-height: 46rpx;
+			text-align: center;
+			border-radius: 42rpx;
+			color: #ed742e;
+			background-color: rgba(255, 255, 255, 1);
+			font-size: 24rpx;
+			color: $prosecond;
+			margin: 0 10rpx;
+		}
+		.fundMon {
+			justify-content: center;
+		}
+	}
+
+	.pageCon {
+		margin-top: 45rpx;
+		.pgConTitle {
+			font-size: 36rpx;
+			line-height: 44rpx;
+			font-family: PingFangSC-Medium, PingFang SC;
+			font-weight: 500;
+			color: #333333;
+		}
+		.listBox {
+			.pgConBox {
+				padding: 30rpx 0;
+				.pgConTop {
+					align-items: flex-start;
+					.elli {
+						margin-right: 5rpx;
+						flex: 1;
+					}
+					text {
+						font-size: 30rpx;
+					}
+					.mon {
+						font-size: 36rpx;
+						font-family: DIN-Medium, DIN;
+						font-weight: 500;
+					}
+				}
+				.pgConBot {
+					margin-top: 20rpx;
+					text {
+						color: $textgrey;
+						font-size: 26rpx;
+						line-height: 36rpx;
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 284 - 0
pages/user/funManage/fundCash.vue

@@ -0,0 +1,284 @@
+<template>
+	<view class="container">
+		<picker @change="bindPickerChange" v-if="!rspData.state" :value="payIndex" :range="payList">
+			<view class="header">
+				<template v-if="payName">
+					<image src="/static/img/pro/usme1.png" />
+					<view class="header-info">
+						<view class="type">{{ payName }}</view>
+						<view class="acount">账号为{{ payName == '支付宝' ? zfb.alipay_num : bank.bank_num }}</view>
+					</view>
+				</template>
+				<view class="header-info" v-if="!payName"><view class="type">请选择提现方式</view></view>
+				<view class="yticon icon-you"></view>
+			</view>
+		</picker>
+		<navigator url="/pages/user/funManage/bindMethods" class="header" v-if="rspData.state">
+			<view class="header-info"><view class="type">请先绑定收款信息</view></view>
+			<view class="yticon icon-you"></view>
+		</navigator>
+		<view class="centers">
+			<view class="center-title">提现金额</view>
+			<view class="center-input">
+				<view class="center-icon">¥</view>
+				<input type="number" placeholder-style="font-size:32rpx" v-model="num" placeholder="请输入提现金额" />
+				<text @click="num = userInfo.userInfo.money" class="prosecond fontmid">全部提现</text>
+			</view>
+			<view class="tips">账户余额{{ userInfo.userInfo.money || '0.00' }}元,</view>
+		</view>
+		<view class="mt30 fontmid red">你将提现的金额为:</view>
+		<view class="fontmid red">提现24小时内到账,公司会在9:00-17:00集中处理提现, 申请后请耐心等待</view>
+		<navigator url="/pages/user/funManage/list?type=1" class="mt30 fontmid prosecond">提现记录></navigator>
+		<u-button color="#ED742F" shape="circle" class="custom-style" @click="submitClickEvent">提现</u-button>
+		<!-- <payPassWord ref="pwdKeyboard" @onConfirm="confirmEvent"></payPassWord>
+		<ylx-modal ref="ylxModel" title="提示" @onConfirm="navTo('/pages/wallet/bind-colletMoney')" text="请先设置收款信息"></ylx-modal> -->
+	</view>
+</template>
+
+<script>
+import payPassWord from '@/components/pay-password-keyboard/pay-password-keyboard.vue';
+import { mapState, mapActions } from 'vuex';
+export default {
+	computed: {
+		...mapState({ userInfo: state => state.userInfo })
+	},
+	components: {
+		payPassWord
+	},
+	data() {
+		return {
+			id: 0,
+			total: '0.00',
+			num: '',
+			selCash: {},
+			rspData: {},
+			payList: [],
+			payIndex: '',
+			zfb: {},
+			bank: {},
+			payName: ''
+		};
+	},
+	onLoad(opt) {
+		this.total = opt.total || 0.0;
+	},
+
+	onShow() {
+		console.log(this.selCash);
+		this.getList();
+	},
+
+	methods: {
+		getList() {
+			this.$api.request(`/user_pay/payList`).then(res => {
+				if (res.code == '200') {
+					this.rspData.list = res.data;
+					let arr = res.data;
+					this.payList = [];
+					arr.forEach(item => {
+						if (item.alipay_num) {
+							this.payList.push('支付宝');
+							this.zfb = item;
+						} else {
+							this.payList.push('银行卡');
+							this.bank = item;
+						}
+					});
+					this.rspData.state = false;
+					if (res.data.length < 1) {
+						this.rspData.state = true;
+					}
+					console.log(this.rspData.state);
+				}
+			});
+		},
+		bindPickerChange(e) {
+			let index = e.target.value;
+			this.payIndex = index;
+			this.payName = this.payList[index];
+		},
+		submitClickEvent() {
+			console.log(12);
+			if (this.num <= 0) {
+				this.$api.toast('请输入提现金额!');
+				return;
+			} else if (Number(this.userInfo.userInfo.money) < Number(this.num)) {
+				this.$api.toast('可提现金额不足!');
+				return;
+			}
+			if (!this.payName) return this.$api.toast('请选择提现方式!');
+
+			this.confirmEvent();
+			// this.$refs['pwdKeyboard'].open();
+		},
+
+		async confirmEvent(psd) {
+			console.log(1);
+			// let psdword = await this.$api.request(`/api/users/checkMd`, {
+			// 	passmd: psd
+			// });
+			// if (psdword.code == 200) {
+			this.$api
+				.request(`/withdrawal/cashUp`, {
+					pay_id: this.payName == '支付宝' ? this.zfb.id : this.bank.id,
+					money: this.num
+				})
+				.then(res => {
+					// this.$refs.pwdKeyboard.pwd = '';
+					// this.$refs['pwdKeyboard'].close();
+					this.$api.toast(res.msg);
+					if (res.code == '200') {
+						setTimeout(res => {
+							uni.navigateTo({
+								url: '/pages/user/funManage/list?type=1'
+							});
+						}, 800);
+					}
+				});
+			// } else {
+			// 	this.$refs.pwdKeyboard.pwd = '';
+			// 	this.$api.toast(psdword.msg);
+			// }
+		}
+	}
+};
+</script>
+<style lang="scss">
+page {
+	background-color: #fff;
+}
+</style>
+<style lang="scss" scoped>
+page {
+	background-color: #f7f7f7;
+}
+.custom-style {
+	background: #ed742e;
+	width: 690rpx;
+	margintop: 600rpx;
+	color: #fff;
+	margin-top: 40rpx;
+}
+.container {
+	background-color: #f7f7f7;
+	padding: 20rpx 30rpx;
+	// width: 100%;
+	// height: auto;
+	// display: flex;
+	// flex-direction: column;
+	// align-items: center;
+}
+
+.header {
+	height: auto;
+	background-color: #ffffff;
+	padding: 30rpx 30rpx;
+	display: flex;
+	flex-direction: row;
+	align-items: center;
+	justify-content: space-between;
+	border-radius: 16rpx;
+	image {
+		width: 72rpx;
+		height: 72rpx;
+		margin-right: 30rpx;
+	}
+
+	.header-info {
+		margin: 0 80rpx;
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+
+		.type {
+			font-size: 32rpx;
+			color: #333333;
+		}
+
+		.acount {
+			margin-top: 10rpx;
+			font-size: 28rpx;
+			color: #999999;
+		}
+
+		.mui-icon-arrowright {
+			color: #999999;
+		}
+	}
+
+	.icon-you {
+		color: #999999;
+	}
+}
+
+.centers {
+	height: auto;
+	background-color: #ffffff;
+	padding: 30rpx;
+	margin-top: 20rpx;
+	border-radius: 16rpx;
+
+	.center-title {
+		font-size: 28rpx;
+	}
+
+	.center-input {
+		width: 100%;
+		height: auto;
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		margin: 20rpx 0;
+
+		.center-icon {
+			font-size: 68rpx;
+			font-weight: 600;
+			margin-right: 10rpx;
+		}
+
+		input {
+			font-size: 64rpx;
+			font-weight: 600;
+			flex: 1;
+		}
+	}
+
+	.tips {
+		font-size: 28rpx;
+		color: #9d9d9d;
+		margin-top: 20rpx;
+	}
+}
+
+.code-item {
+	width: 100%;
+	height: auto;
+	background-color: #ffffff;
+	padding: 30rpx;
+	margin-top: 20rpx;
+	display: flex;
+	flex-direction: row;
+	align-items: center;
+
+	input {
+		font-size: 32rpx;
+		flex: 1;
+	}
+
+	.code-btn {
+		font-size: 28rpx;
+		color: #c82226;
+	}
+
+	.left {
+		font-size: 28rpx;
+		color: #333333;
+		flex: 1;
+	}
+
+	.right {
+		font-size: 28rpx;
+		color: #333333;
+	}
+}
+</style>

+ 138 - 0
pages/user/funManage/list.vue

@@ -0,0 +1,138 @@
+<template>
+	<view class="content">
+		<view class="warp">
+			<block v-if="type==3">
+				<view v-for="item in newsInfo" :key="item.id" class="pgConBox bb">
+					<view class="pgConTop dfsb">
+						 充值 : <text class="elli red"> {{ item.money }}</text>
+					</view> 
+					<view class="pgConBot dfsb">
+						<text>{{type==3?'充值时间:':''}}{{ item.pay_time }}</text> 
+					</view>
+				</view>
+			</block> 
+			<block v-if="type==1">
+				<view v-for="item in newsInfo" :key="item.id" class="pgConBox bb">
+					<view class="pgConTop dfsb">
+						<text class="elli">提现:<text class="red"> {{ item.money }}</text>手续费{{item.sxf}},实际到账{{item.actual}}</text>
+						<text :class="['mon', item.status==0?'yellow':item.status==1?'green':item.status==2?'red':'' ]">-{{ item.money }}</text>
+					</view> 
+					<view class="pgConBot dfsb">
+						<text class="textgrey">{{ item.create_time }}</text> 
+						<text :class="['mon', item.status==0?'yellow':item.status==1?'green':item.status==2?'red':'' ]">{{ item.status==0?'待审核':item.status==1?'已结算':item.status==2?'已驳回':'' }}</text>
+					</view>
+				</view>
+			</block>
+		</view>
+		<u-empty v-if="newsInfo.length < 1" icon-size="200" text="还没有记录哦" mode="list"></u-empty>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			type: '', //1.2 提现   3 充值  
+			newsInfo: [
+				// {
+				// 	content: '编译成功。前端运行日志,请另行在小程序开发工具的控制台查',
+				// 	money: 566,
+				// 	create_time: '09:57:41'
+				// }
+			],
+			status: 'loadmore',
+			limit:20,
+			page: 1
+		};
+	},
+
+	onReachBottom() {
+		if (this.status == 'nomore') return;
+		this.status = 'loading';
+		this.page = ++this.page;
+		this.loading();
+	},
+	onLoad(opt) {
+		this.type = opt.type;
+		if (this.type == 1 ) {
+			uni.setNavigationBarTitle({
+				title: '提现记录'
+			});
+		} else if (this.type == 3) {
+			uni.setNavigationBarTitle({
+				title: '充值记录'
+			});
+		} 
+		this.loading();
+	},
+
+	methods: {
+		loading() {
+			console.log(1212);
+			let url = '';
+			if (this.type == 1) {
+				uni.setNavigationBarTitle({
+					title: '提现记录'
+				});
+				url = 'withdrawal/cashList';
+			} else if (this.type == 3) {
+				uni.setNavigationBarTitle({
+					title: '充值记录'
+				});
+				url = 'user/beanRechargeList';
+			} 
+			this.$api
+				.request(url, {  
+					page: this.page,
+					limit: this.limit
+				})
+				.then(data => {
+					if (data.code == 200) {
+						this.newsInfo = this.newsInfo.concat(data.data.list);
+						console.log(this.newsInfo);
+						if (data.data.list.length < this.limit) {
+							this.status = 'nomore';
+						}
+					} else {
+						this.$api.toast(data.msg);
+					}
+				}) 
+		}
+	}
+};
+</script>
+<style lang="scss">
+.content {
+	padding-top: 20rpx;
+	.warp {
+		min-height: 100vh; 
+	}
+	.pgConBox {
+		margin-bottom: 20rpx;
+		background-color: #fff;
+		padding: 30rpx;
+		.pgConTop {
+			align-items: flex-start;
+			.elli {
+				flex: 1;
+			}
+			text {
+				font-size: 30rpx;
+			}
+			.mon {
+				font-size: 36rpx;
+				font-family: DIN-Medium, DIN;
+				font-weight: 500;
+				margin-left: 20rpx;
+			}
+		}
+		.pgConBot {
+			margin-top: 20rpx;
+			text { 
+				font-size: 26rpx;
+				line-height: 36rpx;
+			}
+		}
+	}
+}
+</style>

+ 266 - 0
pages/user/funManage/recharge.vue

@@ -0,0 +1,266 @@
+<template>
+	<view class="container">
+		<view class="box">充值金额</view>
+		<view class="list dffs">
+			<view class="button_money" @click="selItem(item, index)" v-for="(item, index) in rspData" :key="index" :class="[item.id == money ? 'sel' : '', 'li']">
+				<view style="color: #0bb291;">{{ item.money }}元</view>
+				<view style="font-size: 26rpx;font-weight: normal;color: #0bb291;">{{ item.bean }}学豆</view>
+			</view>
+			<!-- <input v-if="active == 5" type="number" placeholder-style="font-size:32rpx" v-model="money" placeholder="请输入自定义金额" /> -->
+		</view>
+		<view class="cen">
+			<view class="cen-title textgrey">支付方式</view>
+			<!-- //开启的支付方式 1:微信+支付宝  2:支付宝 3:微信 -->
+			<view class="pay-item bb dffs">
+				<image class="left-icon" src="/static/img/pro/paywx.png"></image>
+				<text class="pay-til">微信</text>
+				<image class="right-icon" src="/static/img/pro/paysel.png"></image>
+			</view>
+		</view>
+		<navigator url="/pages/user/funManage/list?type=3" class="mt30 fontmid prosecond">充值记录></navigator>
+		<u-button color="#00952E" shape="circle" class="custom-style" @click="submitClickEvent">立即支付</u-button>
+	</view>
+</template>
+
+<script>
+import payPassWord from '@/components/pay-password-keyboard/pay-password-keyboard.vue';
+export default {
+	components: {
+		payPassWord
+	},
+	data() {
+		return {
+			cv_bean:0,    //比例
+			active: 0,
+			total: '',
+			payType: 2,
+			money: '',
+			rspData: [],
+			// rspData: ['50', '100', '200', '500', '1000', '自定义'],
+			customStyle: {
+				background: '#00952E',
+				width: '690rpx',
+				marginTop: '40rpx'
+			}
+		};
+	},
+
+	onLoad(opt) {
+		
+		this.getBean(); 
+		// this.money=this.rspData[0];  
+		// this.loadData();
+	},
+
+	methods: {
+		// 选中
+		selItem(item, index) {
+			// if (index != 5) {
+			// 	this.active = index;
+				this.money = item.id;
+			// } else {
+			// 	this.active = 5;
+			// 	this.money = '';
+			// }
+		},
+		
+		//组合充值金额
+		moneyArray() {
+			var cv_bean = this.cv_bean;
+			
+			var new_array = [];
+			
+			var array = ['50', '100', '200', '500', '1000', '自定义'];
+			
+			array.forEach(function(v,k)
+			{
+				let item    = {};
+				if(v != '自定义')
+				{
+					item.money  = v + '元';
+					item.s_bean = (parseInt(v) * parseInt(cv_bean)) + '学豆';
+					
+				}else{
+					item.money  = v;
+					item.s_bean = '';
+				}
+				
+				new_array.push(item);
+				
+			})
+			this.rspData = new_array;
+			// console.log('新: ',new_array);
+		},
+		
+		//获取学豆比例配置
+		getBean(){
+			this.$api
+				.request(`index/getRecharge`)
+				.then(res => {
+					if (res.code == 200) {
+						// let cv_bean = res.data.cv_bean || 0;
+						// this.cv_bean = cv_bean;
+						
+						// this.moneyArray();
+						this.rspData=res.data;
+						this.money = res.data[0].id;
+					}
+				});
+		},
+
+		submitClickEvent() {
+			if (!this.money) {
+				this.$api.toast('请输入或选择充值金额!');
+				return;
+			}
+			this.$api
+				.request(`payment/beanPay`, {
+					id: this.money
+				})
+				.then(res => {
+					if (res.code && res.code != 200) {
+						// this.$refs.confirmBtn.stop();
+						this.$api.toast(res.msg || '获取支付信息失败');
+						return;
+					}
+					console.log(res);
+					console.log(res, this.payType);
+					const orderInfo = res;
+					const { timeStamp, nonceStr, paySign } = orderInfo;
+					const payParams = {
+						provider: 'wxpay',
+						orderInfo: res,
+						timeStamp,
+						nonceStr,
+						package: orderInfo.package,
+						signType: 'MD5',
+						paySign,
+						success: e => {
+							this.$api.toast('支付成功');
+						},
+						fail: err => {
+							if (err.errMsg.indexOf('取消') > -1 || err.errMsg.indexOf('cancel') > 1 || err.errMsg.indexOf('-2') > -1) {
+								this.$api.toast('取消支付');
+							} else {
+								this.$api.toast('支付遇到错误,请稍候重试');
+								console.log(err);
+							}
+							console.log(err);
+						}
+					};
+					uni.requestPayment(payParams);
+				});
+		},
+		// async loadData() {
+		// 	this.$api.request(`recharge/getConfig`).then(res => {
+		// 		if (res.code == '200') {
+		// 			let data = res.data;
+		// 			this.money = data[0];
+		// 			this.rspData = data;
+		// 		} else {
+		// 			this.$api.toast(res.msg);
+		// 			this.rspData = false;
+		// 		}
+		// 	});
+		// }
+	}
+};
+</script>
+<style lang="scss">
+page {
+	background-color: #f5f5f5;
+}
+</style>
+<style lang="scss" scoped>
+.container {
+	padding: 45rpx 30rpx;
+	background-color: #fff;
+	
+	.button_money{
+		display: flex;
+		flex-direction:column;
+		align-items: center;
+		justify-content: center;
+	}
+	
+	.box {
+		font-size: 36rpx;
+		font-family: PingFangSC-Semibold, PingFang SC;
+		font-weight: 600;
+	}
+	.custom-style {
+		background: #ed742e;
+		width: 690rpx;
+		margintop: 600rpx;
+		color: #fff;
+		margin-top: 40rpx;
+	}
+	.list {
+		padding: 40rpx 0rpx 120rpx;
+		flex-wrap: wrap;
+		&:nth-of-type(3) {
+			margin-right: 0;
+		}
+		.li {
+			width: 218rpx;
+			height: 110rpx;
+			// line-height: 110rpx;
+			background: #ffffff;
+			// text-align: center;
+			border-radius: 9rpx;
+			color: #0bb291;
+			font-size: 38rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			margin-right: 18rpx;
+			margin-bottom: 22rpx;
+			border: 1px solid #0bb291;
+			&:nth-of-type(3n) {
+				margin-right: 0;
+			}
+		}
+		.sel {
+			background: rgba(11, 178, 145, 0.1);
+			border: 1px solid #0bb291;
+		}
+		input {
+			margin-top: 42rpx;
+			width: 690rpx;
+			height: 86rpx;
+			line-height: 86rpx;
+			padding: 0 30rpx;
+			border: 1px solid #dfdfdf;
+		}
+	}
+	.cen {
+		margin-bottom: 40rpx;
+		.pay-item {
+			background: #ffffff;
+			width: 100%;
+			margin-top: 20rpx;
+			padding: 30rpx 0;
+			.left-icon {
+				width: 68rpx;
+				height: 68rpx;
+			}
+
+			.pay-til {
+				font-size: 32rpx;
+				color: #333333;
+				margin-left: 18rpx;
+				flex: 1;
+			}
+
+			.right-icon {
+				width: 36rpx;
+				height: 36rpx;
+			}
+		}
+	}
+	.tips {
+		width: 100%;
+		padding: 26rpx 30rpx;
+		text-align: left;
+	}
+}
+</style>

+ 240 - 0
pages/user/mine/buy.vue

@@ -0,0 +1,240 @@
+<template>
+	<view>
+		<u-sticky>
+		<view class="top dfsb">
+			<view @click="sectionChange(item.type)" :class="[type == item.type ? 'sel' : '', 'li']"
+				v-for="(item, index) in video_type" :key="index">{{ item.name }}</view>
+		</view></u-sticky>
+		<view v-if="type==1" class="cl-one dffs">
+			<view @click="nextTo(item)" class="vidLi" v-for="(item, ind) in list" :key="ind">
+				<view class="imgbox">
+					<image :src="item.img" mode=""></image>
+					<view class="look">{{ item.time_length }} </view>
+				</view>
+				<view class="title elli">{{ item.title }}</view> 
+			</view>
+		</view> 
+		<!-- -->
+		<view v-if="type==2" class="twobox">
+			<view class="goodLi dfsb dfsb" v-for="(item, index) in list" :key="index">
+				<view @click="navTo(item)" class="boxli dffd">
+					<view class="textmain">
+						{{item.name||''}}
+					</view>
+					<view class="monli dfsb">
+						<text class="textgrey fontmid">SHIPIN</text> 
+					</view>
+					<view class="monli dfsb">
+						<text class="promain">结束时间:{{item.end_time }} </text>
+					</view>
+				</view> 
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import videoList from '@/components/videoList.vue';
+
+	export default {
+		components: {
+			videoList
+		},
+		data() {
+			return {
+				type: 1,
+				video_type: [{
+					type: 1,
+					name: '单视频'
+				}, {
+					type: 2,
+					name: '多视频'
+				}],
+				list: [],
+				status: 'loadmore',
+				page: 1,
+				pagenum: 10,
+
+			};
+		},
+		onPullDownRefresh() {
+			this.page = 1;
+			this.list = [];
+			this.getInfoList();
+			setTimeout(res => {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+
+		onReachBottom() {
+			if (this.status == 'nomore') return;
+			this.status = 'loadmore';
+			this.page = ++this.page;
+			this.getInfoList();
+		},
+		onLoad() {
+			this.getInfoList();
+		},
+		methods: {
+			// 单视频
+			nextTo(item) {
+				uni.navigateTo({
+					url: '/pages/index/video/videoInfo?id=' + item.id
+				});
+			},
+			sectionChange(key) { 
+				this.page = 1;
+				this.list = [];
+				this.type = key;
+				this.getInfoList();
+			},
+			getInfoList() {
+				let url = 'user/myVideoList';
+				this.$api
+					.request(url, {
+						type: this.type,
+						page: this.page,
+						limit: this.pagenum
+					})
+					.then(data => {
+						if (data.code == '200') {
+							this.list = this.list.concat(data.data);
+							if (data.data.length < this.pagnum) {
+								this.status = 'nomore';
+							}
+						} else {
+							this.$api.toast(data.msg);
+						}
+					});
+			},
+			navTo(item) {
+				uni.navigateTo({
+					url: `/pagesA/catList/catli?cat_id=${item.cate_id}`
+				});
+			},
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.top { 
+		margin: 20rpx 0;
+		background-color: #fff;
+		// justify-content: center;
+		justify-content: space-around;
+
+		.li { 
+			border-bottom: 5rpx solid transparent;
+			padding: 20rpx 0;
+		}
+
+		.sel { 
+			color: #025b58;
+			border-bottom: 5rpx solid #025b58;
+		}
+	}
+
+	.cl-one { 
+		padding: 0 30rpx; 
+			align-items: flex-start; 
+			flex-wrap: wrap;
+			.vidLi {
+				background: #ffffff;
+				box-shadow: 0px 0px 20rpx 0px rgba(0, 0, 0, 0.07);
+				border-radius: 0px 0px 10rpx 10rpx;
+				width: 330rpx;
+				margin-right: 30rpx;
+				margin-bottom: 30rpx;
+				&:nth-of-type(2n){
+					margin-right: 0;
+				}
+				.imgbox {
+					width: 330rpx;
+					height: 238rpx;
+					position: relative;
+					image {
+					width: 330rpx;
+					height: 238rpx;
+						border-radius: 10rpx;
+					}
+					.look {
+						position: absolute;
+						bottom: 15rpx;
+						right: 19rpx;
+						background: rgba(#000, 0.3);
+						border-radius: 18rpx;
+						font-size: 20rpx;
+						line-height: 28rpx;
+						padding: 5rpx 14rpx;
+						color: #ffffff;
+						display: inline-block;
+					}
+				}
+				.title {
+					margin: 18rpx 12rpx;
+					font-size: 28rpx;
+					font-family: PingFangSC-Medium, PingFang SC;
+					font-weight: 500; 
+				}
+			}
+	}
+	.twobox{
+		padding: 0 30rpx;
+		.goodLi {
+				width: 100%;
+				margin-top: 40rpx;
+		
+				.boxli {
+					flex: 1;
+					margin-right: 20rpx;
+					padding: 20rpx 20rpx 10rpx 28rpx;
+		 
+					.monli {
+						width: 100%;
+						margin-top: 15rpx; 
+					}
+		
+				}
+		
+		
+				&:nth-of-type(3n-2) {
+					.boxli {
+						background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXIAAACGCAMAAAD3jvGAAAAAAXNSR0IArs4c6QAAAYlQTFRFAAAA////////////3///6Oj/6+v/7u7/4fD/////5OT/////6Oj/////3+r/4uv/5OT/5ub/9/f/4Oj34un44+P45eX4+Pj/4ef54uj54+P55OT6+vr/4eb64uf64+P64OT79vb/4eX74ub74+P34OT34eX3+Pj/4ub44+P44OT44eX49fX/4uX54OP54eT54eT54uX54OP54eT64eT64uX34OX34eP34uT44uX44OX44eP44uT44OT44OX44eP54uT54OT54eX54eP34uT34OT34eX34eP44uP44OT44eT44eP44OP44eT44eT44eP44OP54eT54eT34eP34OP34eT34eT44OP44OP44eT44eT44OP44eP44eT44eT44OT44eP34eT34eT34OT34eP34eP34OT44OT44eP44eP44OT49Pb+9vf/9vf/6+769vf/8/X+9fb/8vP+9fb/4OP45+j64OT49vf/4eT44OP44OP49vf/4eT44eT44eT45Of55un67vD99vf/Yx4bvgAAAH50Uk5TAAIEBggLDQ8RERMUFhcYGhwfHyEjJScnKiwuMDAzNTc5Ojs+QEJERUdJS01OT1JUVlhbXV9hY2ZoamxvcXN1d3p8foCDhYeJi46QkpSXmZudn6Kkpqirra+xs7a4ury/wcPFx8rMztDT1dfY2Nne4OTo7u7w8fLz9Pf5+fv96tGGfAAAAWdJREFUeNrt17FKQmEcxmGP6BByME/oWVycXLoR9ygIomjxLrwT76oLaXHVBheJTiD0vYk8v/XbHv68eqpNT3/e53bX/djnU6C79Q3ycLe/mCMvU/NeIw/XvtXIw01fa+ThZh3myEuaN8jT5i8N8vT/85/MkcfNkcfNkRc3b5GnzZ9b5OEm38yRx82RR8znyNPmT3Pk4cYn5sjj5sjj5shz5gvkafPHBfJwo6M58rg58qz5Enna/OG+N8BQoH3V9TJcfSAv0eHQ/WRY0vWRI7/6KuTIDYtcOXKdb44cOXIhRy7kyIX8/7/4kSNHLluOXMhtuVw5cuSy5a5cyJHLlrtyIUduy+XKkQs5cvn5dOXIhdyWy5UjF3LkQo4cuZAjF3LkQo4cuZAjF3LkQo5cyJEjF3LkQo5cyJEjF3LkQo5cyJELOXLkQo5cyJELOXLkQo5cyJELOXIhR45cyJELOXIhvyRyBPG+ACG3FwEV1LKsAAAAAElFTkSuQmCC) no-repeat;
+						background-size: 100% 100%;
+					}
+				}
+		
+				&:nth-of-type(3n-1) {
+					.boxli {
+						background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXIAAACGCAMAAAD3jvGAAAAAAXNSR0IArs4c6QAAAYxQTFRFAAAA///////////U///////f///R///q///Y///M///S///w///X///R///0//TU//XO//bR//fO///v//fR//jM//jP//jR///r//nO//nR//TN//TP///v//XN//XP//bM//bO//vt//bP//fO//fP//fN//fO//vt//TN//XO//XM//XN//XP//zs//bN//bO//bN//bO//fN//TO//TM//TN//XO//XN//XO//XM//bN//bM//bN//bM//TN//TO//XN//XO//XM//XN//vt//XM//XN//bM//bN//TN//TN//TN//XM//XN//XM//XN//XM//XN//XN//TN//TN//TM//TN//XM//XN//XM//XN//XN//XN//XN//TM//vs//TN//TM//TN//XM//XM//XN//vs//XN//XN//XN//XM//rr//XN//TM//TN//TM//rs//rs//vr//TN//rn//vs//TM//TM//vr//XN//XM//vr//XN//XM//vs//XN//XN//nm//vsfHMuigAAAIF0Uk5TAAIEBgcICwwNDxERExYXGBocHx8hIyUnJyosLjAwMzU3OTo7PkBCREVHSUtNT1FSVFZYW11fYWNmaGpsb3FzdXd6fH6AgYOFh4mLjpCSlJeZm52foqSmqKutr7Gztri6ury/wcPExcXHyszOz9DT1dfY4Oju7u7w8vP09/j5+/v9EeGL8AAAAX9JREFUeNrt2k9KAnEcxuH8AwOJYrlIMDe6mZV3EQSJghJP4l28h3foBC26grvAllE4u/m9EDyf7eweXr6zmOkcbtR6nx+nr8aHfT4FehzPjo3mXT4lGi5fKuThlm8V8vRxaTJHXtB8gDxtvhsgD/dw1Rx5WfMR8rT5foQ83P1+gjxt/jpBHu7urznygPkUedr8eYo83PiXOfKM+Rx52vxpjjzc8Mccecx8gTxtvl0gD3e7rZGnzTc18nDVpkYeN18hT5uvV34dCtdfIy/T5dL05PzusITrueXpOsjTdZFbuZXLyq1cVv4PzJEjR67W35/IrdzKZeXI5bBYuazcypELuVsuK0cu5G65rBw5crnlVi7kyOWWWzlyIUcur08rF3LkQu71aeVCjlzIkQs5cuRCjlzIkQs5ciFHjlzIkQs5cl3PF34rRy7kyIUcuZAjRy7kyIUcuZAjF3LkyIUcuZAjF3LkyJXI31pWjlzI3XIhd1iEHLlbLitHrhbIEcT7Bji0GCzVYAigAAAAAElFTkSuQmCC) no-repeat;
+						background-size: 100% 100%;
+					}
+				}
+		
+				&:nth-of-type(3n) {
+					.boxli {
+						background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXIAAACGCAMAAAD3jvGAAAAAAXNSR0IArs4c6QAAAYlQTFRFAAAA/////////////////+jo/+vr/+7u//Dw//////Lk//////Po///0/+rq/+vr/+3t/+/m//f3//Do/+np/+rq/+vl//j4/+3n/+7o/+np/+rq//r0/+vm/+zn/+zo/+3p//b2/+nl/+rm/+vn/+zo/+zl//j0/+nm/+rn/+vn/+vo//Xy/+zl/+nm/+rn/+rn/+vl/+vm/+nm/+rn/+rn/+rl/+vm/+nm/+nn/+rl/+rm/+vm/+vn/+nn/+rl/+rm/+rm/+vn/+nl/+rm/+rm/+rm/+vl/+nl/+nm/+rm/+rn/+rl/+nm/+nm/+rm/+rl/+rl/+nm/+nm/+nm/+rl/+rm/+rm/+nm/+nl/+rl/+rm/+rm/+nm/+nl/+rm/+rm/+rm/+nl/+nl/+rm/+rm/+rl/+rl/+nm/+nm/+rm//T0//b0//b0//Du//b1//T0//X0//Pz//X0/+rl/+3q/+rm//b1/+nm/+nl/+nl//b1/+rm/+rm/+rm/+zp/+3q//Hw//b1aTKk/wAAAH50Uk5TAAIEBggLDQ8RERMUFhcYGhwfHyEjJScnKiwuMDAzNTc5Ojs+QEJERUdJS01OT1JUVlhbXV9hY2ZoamxvcXN1d3p8foCDhYeJi46QkpSXmZudn6Kkpqirra+xs7a4ury/wcPFx8rMztDT1dfY2Nne4OTo7u7w8fLz9Pf5+fv96tGGfAAAAWdJREFUeNrt17FKQmEcxmGP6BByME/oWVycXLoR9ygIomjxLrwT76oLaXHVBheJTiD0vYk8v/XbHv68eqpNT3/e53bX/djnU6C79Q3ycLe/mCMvU/NeIw/XvtXIw01fa+ThZh3myEuaN8jT5i8N8vT/85/MkcfNkcfNkRc3b5GnzZ9b5OEm38yRx82RR8znyNPmT3Pk4cYn5sjj5sjj5shz5gvkafPHBfJwo6M58rg58qz5Enna/OG+N8BQoH3V9TJcfSAv0eHQ/WRY0vWRI7/6KuTIDYtcOXKdb44cOXIhRy7kyIX8/7/4kSNHLluOXMhtuVw5cuSy5a5cyJHLlrtyIUduy+XKkQs5cvn5dOXIhdyWy5UjF3LkQo4cuZAjF3LkQo4cuZAjF3LkQo5cyJEjF3LkQo5cyJEjF3LkQo5cyJELOXLkQo5cyJELOXLkQo5cyJELOXIhR45cyJELOXIhvyRyBPG+ACG3FwEV1LKsAAAAAElFTkSuQmCC) no-repeat;
+						background-size: 100% 100%;
+					}
+				}
+		
+				.libuy {
+					width: 147rpx;
+					height: 64rpx;
+					text-align: center;
+					line-height: 64rpx;
+					background: rgba(205, 222, 222, 0.39);
+					color: #26565A;
+					font-size: 26rpx;
+					border-radius: 34rpx;
+				}
+		
+				.libuyOK {
+					background: #f5f5f5;
+					color: #999;
+				}
+		
+			}
+		
+	}
+</style>

+ 96 - 0
pages/user/mine/collect.vue

@@ -0,0 +1,96 @@
+<template>
+	<view class="content">
+		<view v-if="curTab == 2" class="pageCon"><course-list :flag="1" :list="list"></course-list></view>
+		<!-- <view v-if="curTab == 2" class="pageCon"><goods :flag="1" :list="list"></goods></view> -->
+		<view v-if="curTab == 3" class="pageThr"><hotgods :flag="1" :list="list"></hotgods></view>
+	</view>
+</template>
+
+<script>
+import courseList from '../../index/components/knowVidList.vue';
+import hotgods from '../../../pagesA/mall/componets/hotgodlist.vue';
+export default {
+	components: {
+		courseList,
+		hotgods
+	},
+	data() {
+		return {
+			type:1,  // 1=收藏 2下载 3.点赞
+			curTab:2 ,//  1=商品  2=文档  3=视频
+			list: [
+				// { image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
+				// { image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
+				// { image: '/static/img/pro/indnotice.png', name: '知识过关', path: '/pages/knowledge/knowledge' },
+			],
+			status:'loadmore',
+			page:1,
+			pagenum:10,
+		};
+	},
+	onPullDownRefresh() {
+		setTimeout(res => {
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+
+	onReachBottom() {
+		if (this.status == 'nomore') return;
+		this.status = 'loadmore';
+		this.page = ++this.page;
+		this.getInfoList();
+	},
+	onLoad(opt) {
+		this.type=opt.type||1; 
+		if(this.type==1){
+			uni.setNavigationBarTitle({
+				title:'我的收藏'
+			})
+		}else if(this.type==2){
+			uni.setNavigationBarTitle({
+				title:'我的下载'
+			})
+		}else if(this.type==3){
+			uni.setNavigationBarTitle({
+				title:'我的点赞'
+			})
+		} 
+		this.getInfoList();
+	},
+	methods: {
+		getInfoList() {
+			let url=this.type==1?'collection/getCollectionList':this.type==2?'user/myDownList':'user/getTeamList';
+			this.$api
+				.request(url, {
+					type:this.curTab,
+					page: this.page,
+					limit: this.pagenum
+				})
+				.then(data => {
+					if (data.code == '200') {
+						this.list = this.list.concat(data.data);
+						if (data.data.length < this.pagnum) {
+							this.status = 'nomore';
+						}
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		toNext(url) {
+			uni.navigateTo({
+				url: url
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.pageCon {
+	padding: 20rpx 30rpx;
+}
+.pageThr {
+	padding: 20rpx 0;
+}
+</style>

+ 71 - 0
pages/user/mine/down.vue

@@ -0,0 +1,71 @@
+<template>
+	<view>
+		<view class="cl-one">
+			<video-list :flag="1" :list="list"></video-list>
+		</view>
+	</view>
+</template>
+
+<script>
+import videoList from '../../index/components/wordlist.vue';
+
+export default {
+	components: {
+		videoList
+	},
+	data() {
+		return {
+			list: [],
+			status:'loadmore',
+			page:1,
+			pagenum:10,
+			
+		};
+	},
+	onPullDownRefresh() {
+		this.page=1;
+		this.list=[];
+		this.getInfoList();
+		setTimeout(res => {
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	
+	onReachBottom() {
+		if (this.status == 'nomore') return;
+		this.status = 'loadmore';
+		this.page = ++this.page;
+		this.getInfoList();
+	},
+	onLoad() {
+		this.getInfoList();
+	},
+	methods: {
+		getInfoList() {
+			let url = 'user/myDownList';
+			this.$api
+				.request(url, {
+					page: this.page,
+					limit: this.pagenum
+				})
+				.then(data => {
+					if (data.code == '200') {
+						this.list = this.list.concat(data.data);
+						if (data.data.length < this.pagnum) {
+							this.status = 'nomore';
+						}
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		}, 
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+	.cl-one{
+		background-color: #fff;
+		padding: 0 30rpx;
+	}
+</style>

+ 247 - 0
pages/user/mine/feedBack.vue

@@ -0,0 +1,247 @@
+<template>
+	<view class="home">
+		<view class="putWarp dffd">
+			<view @click="showfeadAction" class="putin dfsb">
+				<text class="fontbase flex1">请选择反馈类型</text>
+				<text class="textgrey fontssm">{{ title.text }}</text>
+				<u-icon name="arrow-right"></u-icon>
+			</view>
+		</view>
+		<view class="putWarp dffd">
+			<view class="putin spec ">
+				<text class="fontbase flex1">请描述你要反馈的问题</text>
+				<textarea
+					class="lyCon"
+					maxlength="-1"
+					v-model="content"
+					placeholder="如:对我们的商品或者服务有那些意见?你希望我们在哪些地方进行完善,你有哪些好的建议请及时的进行反馈,我们会及时进行处理的..."
+				/>
+			</view>
+		</view>
+		<view class="putWarp dffd">
+			<view class="putin spec">
+				<text class="fontbase flex1">请上传图片、问题截图等文件 (选填)</text>
+				<view class="imgWarp dffs">
+					<view class="pre-box dffs">
+						<view class="pre-item dffs" v-for="(item, index) in uUpload" :key="index">
+							<image class="pre-item-image" :src="item.lists" mode="widthFix"></image>
+							<view class="u-delete-icon dfsb" @tap.stop="deleteItem(item.id)"><u-icon name="close" size="16" color="#ffffff"></u-icon></view>
+						</view>
+					</view>
+					<view @tap="choose" class="imgBox dfsb"><u-icon name="plus" size="30" color="#DEDEDE"></u-icon></view>
+				</view>
+			</view>
+			<!-- <view class="imgBox dffs">
+				<view class="pre-box">
+					<view class="pre-item dffs" v-for="(item, index) in newsInfo.img" :key="index">
+						<image @click="preview(newsInfo.img, index)" class="pre-item-image" :src="item" mode="aspectFill"></image>
+					</view>
+				</view>
+			</view> -->
+		</view>
+		<view class="putWarp dffd">
+			<view class="putin spec ">
+				<text class="fontbase flex1">联系方式(选填,便于我们与你联系)</text>
+				<input class="mt20" type="number" v-model="phone" placeholder="请输入手机号码" />
+			</view>
+		</view>
+		<u-button color="#ED742F" @click="clickHandle" throttleTime="2000" class="custom-style" text="提交"></u-button>
+		<y-action-sheet ref="yActionSheet" @onConfirm="refund"></y-action-sheet>
+	</view>
+</template>
+
+<script>
+import { pathToBase64 } from '@/common/tool/pathToBase64.js';
+export default {
+	data() {
+		return {
+			title: '',
+			content: '',
+			phone: '',
+			uUpload: [] // 组件实例
+		};
+	},
+	onLoad(opt) {},
+	onShow() {},
+	methods: {
+		//申请退款选择原因
+		showfeadAction(data) {
+			this.$refs.yActionSheet.open({
+				title: '反馈类型',
+				list: [
+					{
+						text: '型号拍错'
+					},
+					{
+						text: '买多了'
+					},
+					{
+						text: '不想要了'
+					},
+					{
+						text: '数量选择错误'
+					},
+					{
+						text: '其他'
+					}
+				]
+			});
+		},
+		//申请退款提交
+		async refund(reason) {
+			this.title = reason;
+		},
+
+		clickHandle() {
+			if (!this.title.text) {
+				return this.$api.toast('请选择反馈类型', 1000);
+			}
+			if (!this.content) {
+				return this.$api.toast('请输入反馈内容', 1000);
+			}
+			let arr = [];
+			this.uUpload.forEach(item => {
+				arr.push(item.id);
+			});
+			this.$api
+				.request('user/setFeedback', {
+					title: this.title.text,
+					content: this.content,
+					phone: this.phone || '',
+					image: arr.toString() || ''
+				})
+				.then(data => {
+					if (data.code == '200') {
+						this.$api.toast(data.msg);
+						setTimeout(res => {
+							uni.navigateBack({
+								delta: 1
+							});
+						}, 300);
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		deleteItem(id) {
+			this.uUpload.forEach((item, ind) => {
+				console.log(item);
+				if (item.id == id) {
+					this.uUpload.splice(ind, 1);
+				}
+			});
+		},
+		choose() {
+			let that = this;
+			uni.chooseImage({
+				count: 1, //默认9
+				sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+				success: function(res) {
+					console.log(res);
+					var imageSrc = res.tempFilePaths[0];
+					pathToBase64(imageSrc).then(base64 => {
+						that.$api
+							.request('common/doupload', {
+								imgdata: base64
+							})
+							.then(res => {
+								that.uUpload.push({ lists: res.data.imgurl, id: res.data.img_id });
+							})
+							.catch(res => {});
+					});
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.home {
+	padding: 20rpx 0rpx 0;
+
+	//yanzhengma
+	.u-hairline-border[data-v-3bf2dba7]:after {
+		border: 0;
+	}
+	.tips {
+		padding: 0;
+		color: $promain;
+		font-size: 28rpx;
+		line-height: 40rpx;
+		height: 40rpx;
+	}
+	.putWarp {
+		background-color: #fff;
+		padding: 0rpx 32rpx;
+		align-items: center;
+		margin-bottom: 20rpx;
+		.priceDan {
+			color: #333;
+		}
+		.putin {
+			width: 100%;
+			padding: 30rpx 0;
+		}
+		.spec {
+			.lyCon {
+				width: 100%;
+				height: 80rpx;
+				padding: 24rpx 0;
+				font-size: 24rpx;
+			}
+		}
+	}
+	.custom-style {
+		background: linear-gradient(90deg, #ffac4c 0%, #ff8a00 100%);
+		color: #fff;
+		width: 690rpx;
+		margin-top: 200rpx;
+		border-radius: 11rpx;
+	}
+
+	.imgWarp {
+		width: 100%;
+		margin-top: 30rpx;
+		flex-wrap: wrap;
+		.imgBox {
+			background-color: #fff;
+			border: 1px solid #f3f3f3;
+			justify-content: center;
+			width: 120rpx;
+			height: 120rpx;
+		}
+
+		.pre-box {
+			flex-wrap: wrap;
+		}
+
+		.pre-item {
+			margin-right: 60rpx;
+			margin-bottom: 20rpx;
+			width: 120rpx;
+			position: relative;
+			flex-wrap: wrap;
+			&:nth-of-type(4n) {
+				margin-right: 0;
+			}
+		}
+
+		.pre-item-image {
+			width: 120rpx;
+			height: auto;
+		}
+
+		.u-delete-icon {
+			position: absolute;
+			top: -10rpx;
+			right: -10rpx;
+			z-index: 10;
+			background-color: #333;
+			border-radius: 100rpx;
+			width: 30rpx;
+			height: 30rpx; 
+		}
+	}
+}
+</style>

File diff suppressed because it is too large
+ 189 - 0
pages/user/mine/member.vue


File diff suppressed because it is too large
+ 96 - 0
pages/user/mine/mineBean.vue


+ 67 - 0
pages/user/mine/poster.vue

@@ -0,0 +1,67 @@
+<template>
+	<view class="pageCon">
+		<image class="bg" :src="newsInfo.share_img" mode=""></image>
+		<view class="imgbox">
+			<image class="shareimg" :src="newsInfo.poster" mode="widthFix"></image>
+		</view>
+		<!-- <view class="fixBox">
+			<u-button @click="clickHandle" throttleTime="2000" class="custom-style" text="提交"></u-button>
+		</view> -->
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				newsInfo:{},
+			}
+		},
+		onLoad(options) {
+			 this.loadData(); 
+		}, 
+		methods: {
+			loadData() {
+				this.$api.request('user/getPoster').then(data => {
+					if (data.code == 200) {
+						this.newsInfo = data.data;
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.pageCon{
+	padding-bottom: 120rpx; 
+	image{
+		width: 100%;
+	}
+	.bg{
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100vw;
+		height: 100vh;
+	}
+	.custom-style {
+		background : #0BB291;
+		color: #fff;
+		width: 690rpx;
+		margin-top: 20rpx;
+		border-radius: 45rpx;
+	}
+	.imgbox{
+		position: fixed;
+		width: 300rpx;
+		bottom: 5%;
+		left: 10%; 
+		.shareimg{
+			width: 100%;
+		}
+	}
+}
+</style>

+ 160 - 0
pages/user/mine/team.vue

@@ -0,0 +1,160 @@
+<template>
+	<view class="content">
+		<!-- <view class="userHead dfsb">
+			<view class="uHeader dffd">
+				<text class="uinfoPho">直推人数</text>
+				<text>{{ teamNum.parent_num || 0 }}</text>
+			</view>
+			<view class="uHeader dffd">
+				<text class="uinfoPho">团队人数</text>
+				<text>{{ teamNum.team_num || 0 }}</text>
+			</view>
+		</view>
+		<view class="teamTab dfsa">
+			<text @tap="change(1)" :class="tabsel == 1 ? 'tabli' : ''">直推</text>
+			<text @tap="change(2)" :class="tabsel == 2 ? 'tabli' : ''">团队</text>
+		</view> -->
+		<view class="userCenter">
+			<view class="order">
+				<view v-for="(item, ind) in teamList" :key="ind" class="ordtype dfsb">
+					<image :src=" item.avatar" />
+					<view class="dffd">
+						<text class="name">
+							{{ item.nickname }}
+							<text class="textgrey">{{ item.phone }}</text> 
+						</text>
+						<view class="bot dfsb">
+							<text class="time">{{ item.create_time }}</text>
+						</view>
+					</view>
+					<!-- <text>{{item.level}}</text> -->
+				</view>
+				<view v-if="teamList.length < 1" class="moredata"><u-empty text="还没有队友哦" mode="list"></u-empty></view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			tabsel: 1,
+			status: 'loadmore',
+			teamNum: {},
+			teamList: [
+				// {
+				// 	username: '好设计师',
+				// 	create_time: '2020-09-18',
+				// 	level: 1
+				// }
+			],
+			page: 1,
+			pagenum: 10
+		};
+	},
+	onLoad() {
+		this.onload();
+	},
+	onReachBottom() {
+		if (this.status == 'nomore') return;
+		this.status = 'loading';
+		this.page = ++this.page;
+		this.onload();
+	},
+	methods: { 
+		onload() {
+			this.$api
+				.request('user/getTeamList', {
+					page: this.page,
+					limit: this.pagenum
+				})
+				.then(data => {
+					if (data.code == 200) {
+						this.teamList = data.data; 
+						this.status = 'loadmore';
+						if (data.data.length < this.pagenum) {
+							this.status = 'nomore';
+						}
+					} else {
+						this.$api.toast(data.msg);
+						setTimeout(res => {
+							uni.navigateBack({
+								delta: 1
+							});
+						}, 1000);
+					}
+				}) 
+		}
+	}
+};
+</script>
+<style lang="scss">
+.content {
+	min-height: 100vh;
+	background-color: #f5f5f5;
+	.teamTab {
+		background-color: #fff;
+		justify-content: center;
+		margin-top: 20rpx;
+		padding: 32rpx 20rpx 0;
+		text {
+			margin: 0 40rpx;
+			font-size: 36rpx;
+			color: #666666;
+		}
+		.tabli {
+			width: 96rpx;
+			text-align: center;
+			height: 48rpx;
+			line-height: 48rpx;
+			border-radius: 30rpx;
+			border: 1px solid #ae7a58;
+			color: #ae7a58;
+			font-size: 28rpx;
+		}
+	} 
+	.userCenter {
+		// margin-top: 20rpx;
+		.order {
+			background-color: #fff;
+			.ordtype {
+				padding: 30rpx;
+				border-bottom: 1px solid #f7f7f7;
+				&:nth-last-of-type(1) {
+					border-bottom: 0;
+				}
+				image {
+					width: 80rpx;
+					height: 80rpx;
+					border-radius: 50%;
+				}
+				.dffd {
+					margin: 0 20rpx;
+					flex: 1;
+					.name {
+						font-size: 34rpx;
+						font-family: PingFangSC-Semibold, PingFang SC;
+						font-weight: 600;
+						color: rgba(51, 51, 51, 1);
+						line-height: 50rpx;
+						margin-bottom: 5rpx;
+						.fontbase {
+							margin-left: 15rpx;
+							font-size: 30rpx;
+							color: #999;
+						}
+					}
+				}
+				.bot {
+					width: 100%;
+				}
+				.time {
+					color: #999;
+					line-height: 30rpx;
+				}
+			}
+		}
+	}
+}
+</style>

+ 110 - 0
pages/user/mine/userInfo.vue

@@ -0,0 +1,110 @@
+<template>
+	<view class="content">
+		<view class=" topBox">
+			<navigator url="/pages/user/set/setImg" class="headbox bb dfsb">
+				<image :src="userInfo.userInfo.avatar" mode=""></image>
+				<text class="fontbase flex1">修改头像</text>
+				<u-icon size="10" color="#999" name="arrow-right"></u-icon>
+			</navigator>
+			<navigator url="/pages/user/set/set?type=1" class="ordtype pd30 bb dffs">
+				<text class="oneTe fontbase">手机号</text>
+				<text class="textgrey fontbase flex1">{{ userInfo.userInfo.phone || '手机号' }}</text>
+				<u-icon size="10" color="#999" name="arrow-right"></u-icon>
+			</navigator>
+		</view>
+		<view class="userCenter">
+			<view class="order">
+				<navigator url="/pages/user/set/set?type=2" class="ordtype bb dffs">
+					<text class="oneTe flex1 fontbase">修改昵称</text>
+					<text class="textgrey fontmid">{{ userInfo.userInfo.nickname || '昵称' }}</text>
+					<u-icon size="10" color="#999" name="arrow-right"></u-icon>
+				</navigator>
+				<navigator url="/pages/user/set/set?type=3" class="ordtype bb dffs">
+					<text class="oneTe flex1 fontbase">学校信息</text>
+					<text class="textgrey fontmid">{{ userInfo.userInfo.school || '学校信息' }}</text>
+					<u-icon size="10" color="#999" name="arrow-right"></u-icon>
+				</navigator>
+				<!-- "is_pay_pass": 1, //是否设置支付密码:  0=未设置   1=已设置 -->
+				<view @click="navTo()" class="ordtype bb dffs">
+					<text class="oneTe flex1 fontbase">支付密码</text>
+					<u-icon size="10" color="#999" name="arrow-right"></u-icon>
+				</view>
+				<navigator url="/pages/user/address/address" class="ordtype bb dffs">
+					<text class="oneTe flex1 fontbase">我的收货地址</text>
+					<u-icon size="10" color="#999" name="arrow-right"></u-icon>
+				</navigator>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { mapState, mapActions } from 'vuex';
+import { pathToBase64 } from '@/common/tool/pathToBase64.js';
+export default {
+	data() {
+		return {
+		};
+	},
+	computed: {
+		...mapState({ userInfo: state => state.userInfo })
+	},
+	methods: {
+		  navTo(){
+			  let type = this.userInfo.userInfo.is_pay_pass==1?6:4;
+			  uni.navigateTo({
+			  	url:'/pages/user/set/set?type=' +type
+			  })
+		  },
+	}
+};
+</script>
+<style lang="scss">
+.content {
+	padding-top: 20rpx;
+	.topBox {
+		width: 100%;
+		margin: 20rpx auto;
+		background-color: #fff;
+		.oneTe {
+			margin-right: 109rpx;
+		}
+	}
+	.headbox {
+		padding: 25rpx 30rpx;
+		align-items: center;
+		image {
+			width: 110rpx;
+			height: 110rpx;
+			background-color: #fafafa;
+			border-radius: 50%;
+			margin-right: 35rpx;
+		}
+	}
+}
+.userCenter {
+	.order {
+		margin-bottom: 20rpx;
+		background-color: #fff;
+		.ordtype {
+			padding: 30rpx;
+			align-items: center;
+			.flext {
+				flex: 1;
+				font-size: 30rpx;
+				line-height: 30rpx;
+				color: $textcom;
+			}
+			input,
+			.putin {
+				flex: 1;
+				color: #666;
+				font-size: 30rpx;
+			}
+			.oneTe {
+				width: 30%;
+			}
+		}
+	}
+}
+</style>

+ 135 - 0
pages/user/other/other.vue

@@ -0,0 +1,135 @@
+<template>
+	<view class="home">
+		<view class="putWarp dffd">
+			<view class="putin bb dfsb">
+				<text class="fontmid flex1">姓名</text>
+				<input type="text" v-model="name" placeholder="填写姓名" />
+			</view>
+			<view class="putin bb dfsb">
+				<text class="fontmid flex1">学校</text>
+				<input type="text" v-model="school" placeholder="填写学校" />
+			</view>
+			<view class="putin bb dfsb">
+				<text class="fontmid flex1">电话</text>
+				<input type="number" v-model="phone" placeholder="填写联系方式" />
+			</view>
+			<view class="putin spec ">
+				<text class="fontmid flex1">留言内容</text>
+				<textarea class="lyCon" maxlength="-1" v-model="content" placeholder="填写留言内容" />
+			</view>
+		</view>
+		<u-button color="#ED742F" @click="clickHandle" throttleTime="2000" class="custom-style" text="提交"></u-button>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			name: '',
+			phone: '',
+			school: '',
+			content: ''
+		};
+	},
+	onLoad(opt) {},
+	onShow() {},
+	methods: {
+		clickHandle() {
+			let phoneReg = /^(1[3-9])\d{9}$/;
+			if (!phoneReg.test(this.phone)) {
+				return this.$api.toast('手机号码不合法!');
+			}
+			if (!this.phone) {
+				return this.$api.toast('请输入手机号');
+			}
+			if (!this.name) {
+				return this.$api.toast('请输入姓名');
+			}
+			if (!this.school) {
+				return this.$api.toast('请输入学校');
+			}
+			if (!this.content) {
+				return this.$api.toast('请输入留言内容');
+			}
+			this.$api
+				.request('user/setMessage', { 
+					name: this.name,
+					school: this.school,
+					phone: this.phone,
+					content: this.content, 
+				})
+				.then(data => {
+					if (data.code == '200') {
+						this.$api.toast(data.msg);
+						setTimeout(res => {
+							uni.navigateBack({
+								delta: 1
+							});
+						}, 300);
+					} else {
+						this.$api.toast(data.msg);
+					}
+				}) 
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.home {
+	padding: 20rpx 0rpx 0;
+
+	//yanzhengma
+	.u-hairline-border[data-v-3bf2dba7]:after {
+		border: 0;
+	}
+	.tips {
+		padding: 0;
+		color: $promain;
+		font-size: 28rpx;
+		line-height: 40rpx;
+		height: 40rpx;
+	}
+	.putWarp {
+		background-color: #fff;
+		padding: 0rpx 32rpx;
+		align-items: center;
+		.putin {
+			width: 100%;
+			padding: 30rpx 0;
+			&:nth-last-of-type(1) {
+				border-bottom: 0px;
+			}
+			input {
+				flex: 1;
+				font-size: 28rpx;
+			}
+			.promain {
+				border-left: 1px solid #dbdbdb;
+				padding-left: 30rpx;
+			}
+			input {
+				text-align: right;
+			}
+		}
+		.spec {
+			.lyCon {
+				width: 100%;
+				margin-top: 30rpx;
+				height: 201rpx;
+				padding: 24rpx;
+				font-size: 22rpx;
+				background: #f4f4f4;
+			}
+		}
+	}
+	.custom-style {
+		background-color: #ED742E;
+		color: #fff;
+		width: 690rpx;
+		margin-top: 200rpx;
+		border-radius: 11rpx;
+	}
+}
+</style>

+ 240 - 0
pages/user/set/set.vue

@@ -0,0 +1,240 @@
+<template>
+	<view class="home">
+		<view v-if="show" class="putWarp dffd">
+			<block v-if="type == 1">
+				<view class="putin bb dffs"><input @confirm="clickHandle" type="number" v-model="phone" placeholder="请输入手机号" /></view>
+				<view class="putin bb dffs">
+					<input type="text" v-model="code" placeholder="请输入短信验证码" />
+					<verif :phone="phone"></verif>
+				</view>
+			</block>
+			<block v-if="type == 2">
+				<view class="putin dffs"><input @confirm="clickHandle" type="text" v-model="name" placeholder="请输入昵称" /></view>
+			</block>
+			<block v-if="type == 3">
+				<view class="putin dffs"><input @confirm="clickHandle" type="text" v-model="school" placeholder="填写学校信息" /></view>
+			</block>
+			<block v-if="type == 4">
+				<view class="putin spec bb dfsb">
+					<text class="fontmid flex1">支付密码</text>
+					<input @confirm="clickHandle" type="password" v-model="oldpass" placeholder="设置支付密码" />
+				</view>
+			</block>
+			<block v-if="type == 6">
+				<view class="putin spec bb dfsb">
+					<text class="fontmid flex1">支付密码</text>
+					<text class="fontmid textgrey">已设置</text>
+				</view>
+			</block>
+			<block v-if="type == 5">
+				<view class="putin bb dffs"><input @confirm="clickHandle" disabled="true" type="number" v-model="userInfo.userInfo.phone" placeholder="请输入手机号" /></view>
+				<view class="putin bb dffs">
+					<input type="text" v-model="code" placeholder="请输入短信验证码" />
+					<verif :phone="userInfo.userInfo.phone"></verif>
+				</view>
+				<view class="putin spec bb dfsb">
+					<text class="fontmid flex1">新密码</text>
+					<input @confirm="clickHandle" type="password" v-model="newpass" placeholder="请输入新密码" />
+				</view>
+				<view class="putin spec bb dfsb">
+					<text class="fontmid flex1">确认新密码</text>
+					<input @confirm="clickHandle" type="password" v-model="two_pay_pass" placeholder="请输入确认新密码" />
+				</view>
+			</block>
+		</view>
+		<u-button color="#ED742F" iconColor="#fff" v-if="type != 6" @click="clickHandle" throttleTime="2000" shape="circle" class="custom-style" text="确定修改"></u-button>
+		<u-button color="#ED742F" iconColor="#fff" v-if="type == 6" @click="type = 5" throttleTime="2000" shape="circle" class="custom-style" text="修改支付密码"></u-button>
+	</view>
+</template>
+
+<script>
+import { mapState, mapActions } from 'vuex';
+import verif from '@/components/y-verif/verif.vue';
+export default {
+	data() {
+		return {
+			show: false,
+			type: '1', //1.手机号 2.昵称 3.学校信息 4.支付密码
+			phone: '',
+			code: '',
+			name: '',
+			school: '',
+			oldpass: '',
+			newpass: '',
+			two_pay_pass:'',
+			customStyle: {
+				color: '#fff'
+			}
+		};
+	},
+	computed: {
+		...mapState({ userInfo: state => state.userInfo })
+	},
+	onLoad(opt) {
+		this.type = opt.type || '1'; //1.手机号 2.昵称 3.学校信息 4.支付密码
+		if (this.type == 1) {
+			uni.setNavigationBarTitle({
+				title: '更换手机号'
+			});
+		} else if (this.type == 2) {
+			uni.setNavigationBarTitle({
+				title: '修改昵称'
+			});
+		} else if (this.type == 3) {
+			uni.setNavigationBarTitle({
+				title: '学校信息'
+			});
+		} else if (this.type == 4) {
+			uni.setNavigationBarTitle({
+				title: '支付密码'
+			});
+		} else {
+		}
+		setTimeout(res => {
+			this.show = true;
+		}, 800);
+	},
+	onShow() {},
+	methods: {
+		clickHandle() {
+			let url = '';
+			let data = {};
+			if (this.type == 1) {
+				let phoneReg = /^(1[3-9])\d{9}$/;
+				if (!phoneReg.test(this.phone)) {
+					return this.$api.toast('手机号码不合法!');
+				}
+				if (!this.phone) {
+					return this.$api.toast('请输入手机号', 1000);
+				}
+				if (!this.code) {
+					return this.$api.toast('请输入短信验证码');
+				}
+				url = 'user/setPhone';
+				data = {
+					phone: this.phone,
+					code: this.code
+				};
+			} else if (this.type == 2) {
+				if (!this.name) {
+					return this.$api.toast('请输入昵称');
+				}
+				url = 'user/changeNickname';
+				data = {
+					nickname: this.name
+				};
+			} else if (this.type == 3) {
+				if (!this.school) {
+					return this.$api.toast('请输入学校信息');
+				}
+				(url = 'user/changeSchool'),
+					(data = {
+						school: this.school
+					});
+			} else if (this.type == 4) {
+				if (!this.oldpass) {
+					return this.$api.toast('请输入密码');
+				}
+				url = 'user/setPayPass';
+				data = {
+					pass: this.oldpass
+				};
+			} else if (this.type == 5) {
+				if (!this.userInfo.userInfo.phone) {
+					return this.$api.toast('请输入手机号');
+				}
+				if (!this.code) {
+					return this.$api.toast('请输入验证码');
+				}
+				if (!this.newpass) {
+					return this.$api.toast('请输入新密码');
+				}
+				if (!this.two_pay_pass) {
+					return this.$api.toast('请确认新密码');
+				}if (this.newpass != this.two_pay_pass) {
+					return this.$api.toast(' 新密码不一致');
+				}
+				url = 'user/newSetPassd';
+				data = {
+					phone: this.userInfo.userInfo.phone,
+					code: this.code,
+					pay_pass: this.newpass,
+					two_pay_pass:this.two_pay_pass,
+				};
+			}
+			this.$api
+				.request(url, data)
+				.then(data => {
+					if (data.code == '200') {
+						this.$api.toast(data.msg);
+						setTimeout(res => {
+							this.$store.dispatch('getUserInfo');
+							uni.navigateBack({
+								delta: 1
+							});
+						}, 300);
+					} else {
+						this.$api.toast(data.msg);
+					}
+				})
+				.catch(function(error) {
+					this.$api.toast(error);
+				});
+		}
+	},
+	components: {
+		verif
+	}
+};
+</script>
+
+<style lang="scss">
+.home {
+	padding: 20rpx 0rpx 0;
+
+	//yanzhengma
+	.u-hairline-border[data-v-3bf2dba7]:after {
+		border: 0;
+	}
+	.tips {
+		padding: 0;
+		color: $promain;
+		font-size: 28rpx;
+		line-height: 40rpx;
+		height: 40rpx;
+	}
+	.putWarp {
+		background-color: #fff;
+		padding: 0rpx 32rpx;
+		align-items: center;
+		.putin {
+			width: 100%;
+			padding: 30rpx 0;
+			&:nth-last-of-type(1) {
+				border-bottom: 0px;
+			}
+			input {
+				flex: 1;
+				font-size: 28rpx;
+			}
+			.promain {
+				border-left: 1px solid #dbdbdb;
+				padding-left: 30rpx;
+			}
+		}
+		.spec {
+			input {
+				text-align: right;
+			}
+		}
+	}
+	.custom-style {
+		background-color: #0bb291;
+		width: 690rpx;
+		margin-top: 200rpx;
+		text {
+			color: #fff;
+		}
+	}
+}
+</style>

+ 94 - 0
pages/user/set/setImg.vue

@@ -0,0 +1,94 @@
+<template>
+	<view class="content">
+		<view @click="editImg" class="headbox dffd">
+			<image :src="userInfo.userInfo.avatar" mode=""></image>
+			<text class="promain">更改头像</text>
+		</view>
+	</view>
+</template>
+
+<script>
+import { mapState, mapActions } from 'vuex';
+import { pathToBase64 } from '@/common/tool/pathToBase64.js';
+export default {
+	data() {
+		return {
+			head_img: ''
+		};
+	},
+	computed: {
+		...mapState({ userInfo: state => state.userInfo })
+	},
+	onLoad() {},
+	methods: {
+		//上传头像
+		upload(id) {
+			this.$api
+				.request('user/changeAvatar', {
+					avatar: id || ''
+				})
+				.then(data => {
+					this.$api.toast(data.msg);
+					if (data.code == 200) {
+						setTimeout(res => {
+							this.$store.dispatch('getUserInfo');
+						}, 800);
+					} else {
+					}
+				});
+		},
+		//修改头像
+		editImg() {
+			let that = this;
+			uni.chooseImage({
+				count: 1, //默认9
+				sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+				success: function(res) {
+					console.log(res);
+					var imageSrc = res.tempFilePaths[0];
+					pathToBase64(imageSrc).then(base64 => {
+						that.$api
+							.request('common/doupload', {
+								imgdata: base64
+							})
+							.then(res => {
+								if (res.code == 200) {
+									that.upload(res.data.img_id);
+								} else {
+									that.$api.toast(res.msg);
+								}
+							});
+					});
+				}
+			});
+		}
+	}
+};
+</script>
+<style lang="scss">
+.content {
+	min-height: 100vh;
+	padding-top: 100rpx;
+	background-color: #fff;
+	.headbox {
+		align-items: center;
+		image {
+			width: 421rpx;
+			height: 421rpx;
+			background-color: #fefacb;
+			border-radius: 50%;
+			margin-bottom: 167rpx;
+		}
+		.promain {
+			width: 307rpx;
+			height: 65rpx;
+			line-height: 65rpx;
+			text-align: center;
+			background: #0bb291;
+			border-radius: 33rpx;
+			font-size: 30rpx;
+			color: #fff;
+		}
+	}
+}
+</style>

+ 390 - 0
pages/user/user.vue

@@ -0,0 +1,390 @@
+<template>
+	<view class="pagecon">
+		<view class="userInfo dffs">
+			<image class="headimg" :src="userInfo.userInfo.avatar" mode=""></image>
+			<view class="uinfo">
+				<navigator :url="userInfo.userInfo.user_id ? '' : '/pages/login/login'" class="uinfoPho">
+					{{ userInfo.userInfo.nickname || '欢迎登陆' }}
+					<image v-if="userInfo.userInfo.level_time != 0" :src="userInfo.userInfo.level_logo||'/static/img/pro/usVip.png'" mode=""></image>
+					
+				</navigator> <text  class="fontssm prosecond">{{userInfo.userInfo.rank_name||"普通会员"}}</text> 
+				<!-- <button type="primary" shape="circle" class="loginButton" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">{{ newsInfo.user_phone || '获取手机号' }}</button> -->
+			</view>
+		</view>
+		<view class="usBotList dfsb">
+			<navigator url="/pages/user/mine/mineBean" class="usli dffd">
+				<text class="monnum">{{ userInfo.userInfo.bean || 0 }}</text>
+				<text class="montext">我的学豆</text>
+			</navigator>
+			<navigator url="/pages/user/coupon/myCoup" class="usli dffd">
+				<text class="monnum">{{ userInfo.userInfo.kj_num || 0 }}</text>
+				<text class="montext">我的卡券</text>
+			</navigator>
+			<navigator url="/pages/user/mine/collect?type=1" class="usli dffd">
+				<text class="monnum">{{ userInfo.userInfo.collect_num || 0 }}</text>
+				<text class="montext">收藏</text>
+			</navigator>
+			<navigator v-if="showVideo==1"  url="/pages/user/mine/buy" class="usli dffd">
+				<text class="monnum">{{ userInfo.userInfo.video_num || 0 }}</text>
+				<text class="montext">视频</text>
+			</navigator>
+		</view>
+		<navigator v-if="userInfo.userInfo.level_time == 0" url="/pages/user/mine/member" class="flone">
+			<image class="member" src="/static/img/pro/usUpd.png" mode=""></image>
+		</navigator>
+		<view class="ordBox oneBox">
+			<view class="gdHead">我的订单</view>
+			<view class="userNav dfsa">
+				<navigator url="/pagesA/mall/order?state=0" class="userLi">
+					<image src="/static/img/pro/usordall.png" mode=""></image>
+					<view class="fontssm">全部订单</view>
+				</navigator>
+				<navigator url="/pagesA/mall/order?state=1" class="userLi">
+					<image src="/static/img/pro/usordtwo.png" mode=""></image>
+					<view class="fontssm">待付款</view>
+				</navigator>
+				<navigator url="/pagesA/mall/order?state=2" class="userLi">
+					<image src="/static/img/pro/usordthr.png" mode=""></image>
+					<view class="fontssm">已付款</view>
+				</navigator>
+				<navigator url="/pagesA/mall/order?state=3" class="userLi">
+					<image src="/static/img/pro/usordfour.png" mode=""></image>
+					<view class="fontssm">已发货</view>
+				</navigator>
+			</view>
+		</view>
+		<view class="monwarp dfsb">
+			<image src="/static/img/pro/usmonbg.png" class="monbg" mode=""></image>
+			<view class="monbg textBox dfsb">
+				<view class="left">
+					<text class="white fontsm">资产总金额(元)</text>
+					<view class="leftbot white">
+						{{ show ? userInfo.userInfo.money : '***' }}
+						<image @click="show = !show" :src="show ? '/static/img/pro/usmoneye.png' : '/static/img/pro/usmoneyeno.png'" mode=""></image>
+					</view>
+				</view>
+				<navigator url="/pages/user/funManage/funManage" class="right white fontsm">
+					<image class="rigicon" src="/static/img/pro/usmonicon.png" mode=""></image>
+					查看账单
+				</navigator>
+			</view>
+		</view>
+		<view class="ordBox oneBox">
+			<view class="gdHead">我的信息</view>
+			<view class="userNav dfsa">
+				<navigator url="/pages/user/mine/userInfo" class="userLi">
+					<image src="/static/img/pro/usnav1.png" mode=""></image>
+					<view class="fontssm">个人信息</view>
+				</navigator>
+				<navigator url="/pages/user/mine/member" class="userLi">
+					<image src="/static/img/pro/usnav2.png" mode=""></image>
+					<view class="fontssm">会员</view>
+				</navigator>
+				<navigator url="/pages/user/coupon/myCoup" class="userLi">
+					<image src="/static/img/pro/usnav3.png" mode=""></image>
+					<view class="fontssm">卡券</view>
+				</navigator>
+				<navigator url="/pages/user/funManage/recharge" class="userLi">
+					<image src="/static/img/pro/usnav4.png" mode=""></image>
+					<view class="fontssm">学豆充值</view>
+				</navigator>
+			</view>
+		</view>
+		<view class="ordBox oneBox">
+			<view class="gdHead">我的内容</view>
+			<view class="userNav dfsa">
+				<navigator url="/pages/user/mine/team" class="userLi">
+					<image src="/static/img/pro/usnav5.png" mode=""></image>
+					<view class="fontssm">我的推荐</view>
+				</navigator>
+				<navigator url="/pages/user/mine/down" class="userLi">
+					<image src="/static/img/pro/usnav6.png" mode=""></image>
+					<view class="fontssm">我的下载</view>
+				</navigator>
+				<navigator url="/pages/user/mine/poster" class="userLi">
+					<image src="/static/img/pro/usnav7.png" mode=""></image>
+					<view class="fontssm">我的海报</view>
+				</navigator>
+				<navigator url="/pages/user/mine/collect?type=1" class="userLi">
+					<image src="/static/img/pro/usnav8.png" mode=""></image>
+					<view class="fontssm">我的收藏</view>
+				</navigator>
+			</view>
+		</view>
+		<view class="ordBox oneBox">
+			<view class="gdHead">其他</view>
+			<view class="userNav dfsa">
+				<navigator url="/pages/news/notice" class="userLi">
+					<image src="/static/img/pro/usnav9.png" mode=""></image>
+					<view class="fontssm">公告</view>
+				</navigator>
+				<navigator url="/pages/user/mine/feedBack" class="userLi">
+					<image src="/static/img/pro/usnav10.png" mode=""></image>
+					<view class="fontssm">意见反馈</view>
+				</navigator>
+				<navigator url="/pages/user/other/other" class="userLi">
+					<image src="/static/img/pro/usnav11.png" mode=""></image>
+					<view class="fontssm">留言板</view>
+				</navigator>
+				<!-- <navigator url="/pages/mall/myOrder?state=4">
+					
+				</navigator> -->
+				<button type="default" open-type="contact" class="userLi defaultBtn">
+					<image src="/static/img/pro/usnav12.png" mode=""></image>
+					<view class="fontssm">在线客服</view>
+				</button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { mapState, mapActions } from 'vuex';
+export default {
+	computed: {
+		// ...mapState({ userInfo: state => state.userInfo })
+	},
+	data() {
+		return {
+			showVideo: '0',
+			show: false,
+			userInfo: {
+				userInfo: {},
+				order_nums: {}
+			}
+		};
+	},
+	onShow(opt) {
+		this.onload();
+		this.showVideo = uni.getStorageSync('showVideo')||0;
+		// this.$store.dispatch('getUserInfo');
+	},
+	methods: {
+		xaizai() {
+			uni.downloadFile({
+				url: 'https://ht.xinmingyi.cn/11111.docx', //仅为示例,并非真实的资源
+				success: res => {	
+			 if (res.statusCode === 200) {
+						var filePath1 = res.tempFilePath;
+						// console.log(res.tempFilePath);
+						uni.saveFile({
+							tempFilePath: filePath1,
+							success: function(res2) {
+								console.log('文件:', res2.savedFilePath);
+								uni.showToast({
+									title: 'save成功' + res2.savedFilePath,
+									duration: 2000
+								});
+								uni.openDocument({
+									filePath: filePath1,
+									showMenu: true,
+									success: function(res) {
+										uni.showToast({
+											title: '打开文档成功成功',
+											duration: 2000
+										});
+									}
+								});
+							},
+							fail: res => {
+								uni.showToast({
+									title: 'save失败',
+									duration: 2000
+								});
+							}
+						});
+					}
+				},
+				fail: res => {
+					console.log(res);
+					uni.showToast({
+						title: 'down失败',
+						duration: 2000
+					});
+				}
+			});
+		},
+
+		showPopup(key) {
+			this.$refs[key].open();
+		},
+		async onload() {
+			const res = await this.$api.request('user/userInfo');
+			console.log("我的更新用户信息",res)
+			if (res.code == '200') {
+				this.userInfo = res.data;
+				this.$store.commit('setStateAttr', {
+					key: 'userInfo',
+					val: this.userInfo
+				});
+			} else {
+				this.$api.toast(res.msg);
+			}
+		},
+		navTo() {
+			uni.navigateTo({
+				url: '/pages/user/set/userInfo'
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped> 
+	
+.pagecon {
+	min-height: 100vh;
+	background: #f7f6f9;
+	padding: 0 30rpx 0;
+	.userInfo {
+		padding: 55rpx 0rpx 48rpx;
+		width: 100%;
+		.headimg {
+			width: 100rpx;
+			height: 100rpx;
+			border-radius: 50%;
+			background-color: #f5fcfc;
+			margin-right: 30rpx;
+		}
+		.uinfo {
+			flex: 1;
+			.uinfoPho {
+				font-size: 36rpx;
+				font-family: PingFangSC-Semibold, PingFang SC;
+				font-weight: 600;
+				line-height: 50rpx;
+				margin-bottom: 10rpx;
+				image {
+					width: 35rpx;
+					height: 31rpx;
+					margin : 0 15rpx;
+				}
+			}
+			.prosecond{ 
+				background-color: rgba($prosecond,0.2);
+				padding: 4rpx 12rpx;
+				border-radius: 10rpx;
+			}
+		}
+	}
+	.usBotList {
+		justify-content: space-evenly;
+		.usli {
+			align-items: center;
+			.monnum {
+				text-align: center;
+				font-size: 36rpx;
+				font-family: DIN-Medium, DIN;
+				font-weight: 500;
+				line-height: 46rpx;
+			}
+			.montext {
+				color: #666;
+				margin-top: 4rpx;
+				font-size: 26rpx;
+				line-height: 37rpx;
+			}
+		}
+	}
+	.monwarp {
+		position: relative;
+		overflow: hidden;
+		width: 690rpx;
+		height: 114rpx;
+		.monbg {
+			position: absolute;
+			top: 0;
+			left: 0;
+			width: 100%;
+			height: 100%;
+		}
+		.textBox {
+			padding: 26rpx 0 26rpx 17rpx;
+		}
+		.white {
+			color: #fff;
+		}
+		.left {
+			.leftbot {
+				image {
+					margin-left: 16rpx;
+					width: 30rpx;
+					height: 20rpx;
+				}
+			}
+		}
+		.right {
+			// width: 158rpx;
+			height: 50rpx;
+			line-height: 50rpx;
+			background: rgba(#ffffff, 0.4);
+			border-radius: 100rpx 0rpx 0rpx 100rpx;
+			padding-left: 28rpx;
+			.rigicon {
+				width: 20rpx;
+				height: 22rpx;
+				margin-right: 9rpx;
+			}
+		}
+	}
+	.flone {
+		margin: 54rpx 0rpx 23rpx;
+		.member {
+			width: 691rpx;
+			height: 82rpx;
+		}
+	}
+	.ordBox {
+		margin: 24rpx 0rpx 20rpx;
+		background-color: #fff;
+		border-radius: 16rpx;
+		.gdHead {
+			padding: 27rpx 27rpx 3rpx;
+			font-family: PingFangSC-Medium, PingFang SC;
+			font-weight: 600;
+			font-size: 30rpx;
+			line-height: 42rpx;
+		}
+		.userNav {
+			flex-wrap: wrap;
+			justify-content: space-around;
+			padding: 30rpx 0;
+			.userLi {
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				color: #626262;
+				font-size: 24rpx;
+				line-height: 36rpx;
+				position: relative;
+				image {
+					width: 52rpx;
+					height: 52rpx;
+					// padding: 5rpx;
+					margin: 0 auto 10rpx;
+				}
+			}
+		}
+		.specNav {
+			width: 100%;
+			padding: 0 32rpx;
+			.userLi {
+				padding: 30rpx 0;
+				align-items: center;
+				border-bottom: 1rpx solid #f5f5f5;
+				image {
+					width: 48rpx;
+					height: 48rpx;
+					margin-right: 24rpx;
+				}
+				.litext {
+					flex: 1;
+					font-size: 32rpx;
+					line-height: 30rpx;
+					color: $textcom;
+				}
+			}
+		}
+	}
+}
+</style>

+ 44 - 0
pagesA/broadcast/bdInfo.vue

@@ -0,0 +1,44 @@
+<template>
+	<view class="zb">
+		<!-- <video :media_url="media_url" controls></video> -->
+		<!-- <swiper :current="ind" class="u-swiper__wrapper" vertical>
+			<swiper-item class="u-swiper__wrapper__item" v-for="(item, index) in list" :key="index">
+				 -->
+		<view class="u-swiper__wrapper"><video object-fit='contain' :src="media_url" controls></video></view>
+		<!-- </swiper-item>
+		</swiper> -->
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			ind: '',
+			media_url: ''
+			// list: []
+		};
+	},
+	onPullDownRefresh() {
+		setTimeout(res => {
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	async onLoad(opt) {
+		this.media_url = JSON.parse(opt.media_url) || '';  
+	},
+	methods: {}
+};
+</script>
+
+<style scoped lang="scss">
+.zb {
+	.u-swiper__wrapper {
+		height: 100vh;
+		video {
+			height: 100vh;
+			width: 100vw;
+		}
+	}
+}
+</style>

+ 250 - 0
pagesA/broadcast/bdLook.vue

@@ -0,0 +1,250 @@
+<template>
+	<view class="content">
+		<view class="player-content">
+			<!-- <live-player src="https://domain/pull_stream" mode="RTC" autoplay bindstatechange="statechange" binderror="error" style="width: 300px; height: 225px;" /> -->
+			<!-- #ifdef MP-WEIXIN -->
+			<live-player
+				id="livePlayer"
+				class="live-player"
+				catchtouchmove
+				:src="sourceUrl"
+				autoplay
+				background-mute
+				object-fit="contain"
+				sound-mode="speaker"
+				mode="live"
+				@statechange="statechange"
+				@error="error"
+				@click="handleControlbar"
+			>
+				<view class="player-tool" :style="{ bottom: showControlbar ? '0' : '-60rpx' }">
+					<view class="tools">
+						<view class="full-screen" @tap.stop="handleFullScreen()">
+							<!-- <text class="iconfont">&#xe824;</text>
+							<text class="iconfont" v-else>&#xe67e;</text>
+							 -->
+							<u-icon v-if="!fullScreenFlag" name="setting"></u-icon>
+							<u-icon name="setting-fill"></u-icon>
+						</view>
+						<view class="cruise" @tap.stop="handleCruise()" v-if="streamIndex == 2"><text class="iconfont">&#xe625;</text></view>
+					</view>
+				</view>
+			</live-player>
+			<!-- #endif -->
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			roomid: '', //获取直播间roomid
+			isPlaySource: false, //是否有播放源
+			isVideoLive: false, //是否是直播
+			isAutoplay: true, //是否自动播放
+			videoMsg: '', //video消息
+			sourceUrl: 'https://domain/pull_stream"', //播放路径
+			showControlbar: true,
+			timer: null
+		};
+	},
+	watch: {
+		showControlbar(val, oldVal) {
+			if (val) {
+				this.timer = setTimeout(() => {
+					this.showControlbar = false;
+				}, 5000);
+			} else {
+				clearTimeout(this.timer);
+			}
+		}
+	},
+	onLoad(opt) {
+		let item = JSON.parse(opt.item);
+		this.roomid = item.roomid || '';
+		console.log(JSON.parse(opt.item), item, this.roomid);
+		this.getLiveList(); //视频流列表
+		// #ifdef MP-WEIXIN
+		this.playerCtx = uni.createLivePlayerContext('livePlayer');
+		// #endif
+	},
+	created() {
+		// #ifdef  MP-WEIXIN
+		//自定义控制栏自动隐藏的实现
+		setTimeout(() => {
+			this.showControlbar = false;
+		}, 10000);
+		// #endif
+	},
+	methods: {
+		statechange(e) {
+			console.log('live-player code:', e.detail.code);
+			let code = e.detail.code;
+			if (code === 2001) {
+				this.$api.toast('2001: 已经连接服务器');
+			} else if (code === 2002) {
+				this.$api.toast('2002: 已经连接 RTMP 服务器,开始拉流');
+			} else if (code === 2003) {
+				this.$api.toast('2003: 网络接收到首个视频数据包(IDR)');
+			} else if (code === 2004) {
+				this.$api.toast('2004: 视频播放开始');
+			} else if (code === 2008) {
+				this.$api.toast('解码器启动,如遇不播放或卡顿,请尝试重新播放', 3000);
+			} else if (code === 2009) {
+				console.warn('2009: 视频分辨率改变');
+			} else if (code === 2101) {
+				this.$api.toast('2101: 当前视频帧解码失败');
+			} else if (code === 2102) {
+				this.$api.toast('2102: 当前音频帧解码失败');
+			} else if (code === 2103) {
+				this.$api.toast('2103: 网络断连, 已启动自动重连');
+			} else if (code === 2104) {
+				this.$api.toast('2104: 网络来包不稳:可能是下行带宽不足,或由于主播端出流不均匀');
+			} else if (code === 2105) {
+				this.$api.toast('2105: 当前视频播放出现卡顿');
+			} else if (code === 2106) {
+				this.$api.toast('2106: 硬解启动失败,采用软解');
+			} else if (code === 2107) {
+				this.$api.toast('2107: 当前视频帧不连续,可能丢帧');
+			} else if (code === 2108) {
+				this.$api.toast('2108: 当前流硬解第一个I帧失败,SDK自动切软解');
+			} else if (code === 3001) {
+				this.$api.toast('3001: RTMP -DNS解析失败');
+			} else if (code === 3002) {
+				this.$api.toast('3002: RTMP服务器连接失败');
+			} else if (code === 3003) {
+				this.$api.toast('3003: RTMP服务器握手失败');
+			} else if (code === 3005) {
+				this.$api.toast('3005: RTMP 读/写失败,之后会发起网络重试');
+			} else if (code === -2301) {
+				this.$api.toast('-2301: 网络断连,且经多次重连抢救无效,更多重试请自行重启播放');
+			} else if (code === -2302) {
+				this.$api.toast('-2302: 获取加速拉流地址失败');
+			}
+		},
+		error(e) {
+			console.error('live-player error:', e.detail.errMsg);
+		},
+		handleControlbar() {
+			this.showControlbar = !this.showControlbar;
+		},
+		getLiveList() {
+			console.log(this.roomid);
+			let val = this.roomid;
+			this.$api
+				.request('live/get_url', {
+					roomid: val
+				})
+				.then(data => {
+					console.log(data);
+					console.log(this.roomid);
+					if (data.code == 200) {
+						this.sourceUrl = data.data.pushAddr;
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		},
+		// 巡航
+		handleCruise() {
+			// #ifdef  MP-WEIXIN
+			uni.vibrateShort();
+			// #endif
+		},
+		//全屏功能的实现
+		handleFullScreen() {
+			var that = this;
+			if (!that.fullScreenFlag) {
+				//全屏
+				that.playerCtx.requestFullScreen({
+					success: res => {
+						that.fullScreenFlag = true;
+						console.log('我要执行了');
+					},
+					fail: res => {
+						console.log('fullscreen fail');
+					},
+					direction: 90
+				});
+			} else {
+				//缩小
+				that.playerCtx.exitFullScreen({
+					success: res => {
+						that.fullScreenFlag = false;
+						console.log('我要执行了');
+					},
+					fail: res => {
+						console.log('exit fullscreen success');
+					}
+				});
+			}
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+	width: 100%;
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	.player-content {
+		position: relative;
+		width: 100%;
+		height: 100vh;
+		display: flex;
+		background-size: 100% 100%;
+
+		.live-player {
+			width: 100%;
+			height: 100%;
+			position: relative;
+		}
+	}
+}
+//播放器弹出工具
+.player-tool {
+	width: 100%;
+	height: 60rpx;
+	background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.6), transparent);
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	position: absolute;
+	left: 0;
+	padding: 0 45rpx;
+	transition: all 0.3s;
+	.tools {
+		height: 100%;
+		width: auto;
+		display: flex;
+		align-items: center;
+
+		.full-screen {
+			height: 100%;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+
+			.iconfont {
+				color: #fff;
+				font-weight: bold;
+			}
+		}
+
+		.cruise {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			margin-left: 25rpx;
+
+			.iconfont {
+				color: #e45a3e;
+				font-size: 45rpx;
+			}
+		}
+	}
+}
+</style>

+ 89 - 0
pagesA/broadcast/blist.vue

@@ -0,0 +1,89 @@
+<template>
+	<view class="content">
+		<view class="conwarp">
+			<view class="gdHead dfsb"><view class="head">回放列表</view></view>
+			<view class="floor">
+				<view class="fl-five"><video-list :zbitem='zbitem' :flag="1" :list="zbReplay"></video-list></view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import videoList from './components/list.vue';
+export default {
+	components: {
+		videoList
+	},
+	data() {
+		return {
+			zbitem: {},
+			zbReplay: {},
+		};
+	},
+	onPullDownRefresh() {
+		setTimeout(res => {
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	async onLoad(opt) {
+		this.zbitem = JSON.parse(opt.item);
+		await this.getzbInfo();
+	},
+	methods: {
+		getzbInfo() {
+			this.$api.request('live/get_replay', { roomid: this.zbitem.roomid }).then(data => {
+				if (data.code == 200) {
+					this.zbReplay = data.data.live_replay;
+				} else {
+					this.$api.toast(data.msg);
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+	background-color: #fff;
+	.top-input {
+		padding: 20rpx 30rpx;
+		.sel {
+			color: #f89638;
+			padding: 12rpx 20rpx;
+			font-size: $font-sm;
+			background-color: rgba(#f89638, 0.1);
+			border-radius: 30rpx;
+			margin-right: 36rpx;
+		}
+	}
+	.swiper {
+		margin: 0 30rpx;
+	}
+	.conwarp {
+		background-color: #fff;
+		padding: 32rpx 30rpx 30rpx;
+		border-radius: 16rpx;
+		margin-bottom: 20rpx;
+		.gdHead {
+			line-height: 58rpx;
+			margin-bottom: 16rpx;
+			.head {
+				font-size: 34rpx;
+				font-family: PingFangSC-Medium, PingFang SC;
+				font-weight: 600;
+				color: #333333;
+				line-height: 48rpx;
+			}
+		}
+		.floor {
+			border-radius: 15rpx;
+			.box {
+				border: 1px solid #ececec;
+				padding: 23rpx 25rpx;
+			}
+		}
+	}
+}
+</style>

+ 80 - 0
pagesA/broadcast/components/list.vue

@@ -0,0 +1,80 @@
+<template>
+	<view class="box">
+		<!-- 1 回放  2.直播列表 -->
+		<view v-if="flag == 1" class="boxlist">
+			<view v-if="ind==0" @click="nextTo(item, ind, 1)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
+				<image class="imgbox" :src="zbitem.share_img" mode=""></image>
+				<view class="dffd flex1">
+					<!-- <view class="title elli">{{ item.name }}</view> -->
+					<view class="textgrey fontsm">开始时间:{{ item.create_time }}</view>
+					<view class="auth dfsb">
+						<text class="fontssm textgrey">作者:{{ zbitem.anchor_name }}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {};
+	},
+	props: {
+		zbitem: {
+			type: Object,
+			default: {}
+		},
+		list: {
+			type: Array,
+			default: []
+		},
+		flag: {
+			type: [String, Number],
+			default: 1 //1 回放  2.直播列表
+		}
+	},
+	methods: {
+		nextTo(item, ind, val) {
+			uni.navigateTo({
+				url: '/pagesA/broadcast/bdInfo?list=' + JSON.stringify(this.list) + '&ind=' + ind
+			});
+			
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.boxlist {
+	.vidLi {
+		width: 100%;
+		padding: 27rpx 0;
+		background-color: #fff;
+		&:nth-of-type(2n) {
+			margin-right: 0;
+		}
+		.imgbox {
+			width: 146rpx;
+			height: 146rpx;
+			margin-right: 18rpx;
+			border-radius: 10rpx;
+		}
+		.title {
+			font-size: 28rpx;
+			line-height: 40rpx;
+			margin-bottom: 12rpx;
+		}
+		.auth {
+			margin-top: 15rpx;
+			width: 100%;
+		}
+		.down {
+			width: 35rpx;
+			height: 30rpx;
+			margin-left: 58rpx;
+		}
+	}
+}
+</style>

+ 432 - 0
pagesA/catList/catList.vue

@@ -0,0 +1,432 @@
+<template>
+	<view class="root">
+		<view class="content dfsb">
+			<view class="secTop">
+				<scroll-view :scroll-top="0" scroll-y="true" class="scroll-Y">
+					<view @tap="choose(item.id)" :class="['topLi', leftSel == item.id ? 'topsel' : '']"
+						v-for="(item, index) in dataList" :key="index">
+						{{ item.name }}
+					</view>
+				</scroll-view>
+			</view>
+			<view class="topInfo">
+				<view class="topCInfo">
+					<scroll-view :scroll-top="0" scroll-y="true" class="scroll-Y" >
+						<view class="box">
+							<view v-if="newsInfo.banner" class="swipe">
+								<u-swiper :autoplay="false" :list="newsInfo.banner" keyName="img" height="84"
+									border-radius="20" @click="bannerClick"></u-swiper>
+							</view>
+							<view class="goodLi dfsb dfsb" v-for="(item, index) in newsInfo.list" :key="index">
+								<view @click="navTo(item)" class="boxli dffd">
+									<view class="textmain">
+										{{item.name||''}}
+									</view>
+									<view class="monli dfsb">
+										<text class="textgrey fontmid">SHIPIN</text>
+										<text class="red">¥{{item.price||''}}</text>
+									</view>
+									<view class="monli dfsb">
+										<text class="promain">共{{item.number||''}}节,{{item.sales||''}}人购买</text>
+										<view class="mempri promain dffs">
+											会员价:
+											<text class="red">¥{{item.vip_price||''}}</text>
+										</view>
+									</view>
+								</view>
+								<view @click="creadOrd(item)" class="libuy" :class="item.my_is_pay==1?'libuyOK':''">
+									{{item.my_is_pay==1?'已购买':'立即购买'}}
+								</view>
+							</view>
+						</view>
+					</scroll-view>
+				</view>
+			</view>
+		</view>
+		<y-modal ref='popup' title="提示" text='您确认付费购买此课程吗' @onConfirm='onConfirm'></y-modal>
+	</view>
+</template>
+
+<script>
+	import { mixin } from './mixin.js'
+	export default {
+		mixins: [mixin],
+		data() {
+			return {
+				dataList: [], //一层
+				newsInfo: {}, //商品
+				leftSel: 0, //一层分类选中
+				// status: 'loadmore',
+				// page: 1,
+				// pagnum: 15
+			};
+		},
+		async onLoad(opt) {
+			uni.setNavigationBarTitle({
+				title:opt.title
+			})
+			await this.loadData();
+		},
+		onPullDownRefresh() {
+			this.page = 1;
+			this.leftSel = 0;
+			this.dataList = [];
+			this.newsInfo = {};
+			this.loadData();
+			setTimeout(function() {
+				uni.stopPullDownRefresh();
+			}, 800);
+		},
+		// onReachBottom() {
+		// 	if (this.status == 'nomore') return;
+		// 	this.status = 'loadmore';
+		// 	this.page = ++this.page;
+		// 	this.loadData();
+		// },
+
+		onShow() {},
+		methods: { 
+			getSecList() {
+				this.$api
+					.request('new_cate/getTwoCate', {
+						id: this.leftSel || '',
+					})
+					.then(data => {
+						if (data.code == 200) {
+							this.newsInfo = data.data;
+						} else {
+							this.$api.toast(data.msg);
+						}
+					});
+			},
+			// 轮播
+			bannerClick(e) {
+				console.log(e);
+				let item = this.dataList.banner[e];
+				if (item.goods_id != 0) {
+					if (item.type == 1) {
+						uni.navigateTo({
+							url: '/pages/index/video/videoInfo?id=' + item.goods_id
+						});
+					} else {
+						uni.navigateTo({
+							url: '/pages/index/navInfo?id=' + item.goods_id
+						});
+					}
+				}
+			},
+			navTo(item) {
+				uni.navigateTo({
+					url: `/pagesA/catList/catli?cat_id=${item.id}`
+				});
+			},
+			choose(index) {
+				console.log('leftSel: ', index);
+				this.leftSel = index;
+				console.log('this.leftSel', this.leftSel);
+				this.getSecList();
+			},
+			loadData() {
+				this.status = 'loadmore';
+				this.$api
+					.request('new_cate/getOneCate')
+					.then(data => {
+						console.log(data);
+						if (data.code == 200) {
+							this.dataList = data.data;
+							this.leftSel = this.dataList[0].id;
+							this.getSecList();
+						} else {
+							this.$api.toast(data.msg);
+						}
+					});
+			}
+		}
+	};
+</script>
+<style lang="scss" scoped>
+	page {
+		height: 100vh;
+	}
+
+	.content {
+		background-color: #fff;
+		align-items: flex-start;
+
+		.topBox {
+			background-color: #fff;
+		}
+
+		.secTop {
+			.scroll-Y {
+				height: calc(100vh - 120rpx);
+				flex-wrap: wrap;
+			}
+
+			.topLi {
+				font-size: 26rpx;
+				width: 168rpx;
+				padding: 26rpx 0;
+				line-height: 37rpx;
+				text-align: center;
+				background: #f4f4f4;
+				color: #666;
+			}
+
+			.topsel {
+				font-size: 28rpx;
+				box-sizing: border-box;
+				background-color: #fff;
+				color: $promain;
+				font-weight: 600;
+			}
+		}
+
+		.topInfo {
+			width: 582rpx;
+			padding-right: 30rpx;
+			padding-left: 12rpx;
+			background-color: #f5f5f5;
+
+			// background-color: #fff;
+			.swipe {
+				width: 540rpx;
+				height: 166rpx;
+				margin: 20rpx 0;
+			}
+
+			.topClass {
+				position: fixed;
+				z-index: 1;
+				background-color: #fff;
+				padding-left: 12rpx;
+				width: 556rpx;
+
+				.topClaBox {
+					flex: 1;
+					height: 98rpx;
+					line-height: 98rpx;
+					display: -webkit-box;
+					overflow-x: auto;
+					/*适应苹果*/
+					-webkit-overflow-scrolling: touch;
+
+					//父盒子隐藏滚动条
+					&::-webkit-scrollbar {
+						display: none;
+					}
+
+					.topClasLi {
+						font-size: 28rpx;
+						padding: 0 15rpx;
+					}
+
+					.topClasel {
+						color: $promain;
+					}
+				}
+
+				.classDown {
+					height: 98rpx;
+					width: 70rpx;
+					box-shadow: -2rpx -5rpx 2rpx 5rpx rgba($color: #000000, $alpha: 0.05);
+					background-color: #fff;
+
+					.xuanz {
+						transform: translate(180deg);
+					}
+				}
+			}
+
+			.topCInfo {
+				flex: 1;
+				height: calc(100vh - 120rpx);
+
+				.maskbg {
+					position: fixed;
+					top: 170rpx;
+					left: 200rpx;
+					width: calc(100% - 200rpx);
+					height: calc(100% - 100rpx);
+					background-color: rgba(0, 0, 0, 0.65);
+					z-index: 2;
+				}
+
+				/* #ifdef MP */
+				.maskbg {
+					position: fixed;
+					top: 70rpx;
+				}
+
+				/* #endif */
+				.scroll-Y {
+					height: calc(100vh - 120rpx);
+				}
+
+				.box {
+					width: 100%;
+					flex-wrap: wrap;
+				}
+
+				.goodLi {
+					width: 100%;
+					margin-top: 40rpx;
+
+					.boxli {
+						flex: 1;
+						margin-right: 20rpx;
+						padding: 20rpx 20rpx 10rpx 28rpx;
+
+						.monli {
+							width: 100%;
+
+							.red {
+								font-size: 20rpx;
+							}
+
+							.promain {
+								font-size: 18rpx;
+							}
+						}
+
+						.monli {
+							width: 100%;
+
+							.red {
+								font-size: 20rpx;
+							}
+						}
+
+					}
+
+
+					&:nth-of-type(3n-2) {
+						.boxli {
+							background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXIAAACGCAMAAAD3jvGAAAAAAXNSR0IArs4c6QAAAYlQTFRFAAAA////////////3///6Oj/6+v/7u7/4fD/////5OT/////6Oj/////3+r/4uv/5OT/5ub/9/f/4Oj34un44+P45eX4+Pj/4ef54uj54+P55OT6+vr/4eb64uf64+P64OT79vb/4eX74ub74+P34OT34eX3+Pj/4ub44+P44OT44eX49fX/4uX54OP54eT54eT54uX54OP54eT64eT64uX34OX34eP34uT44uX44OX44eP44uT44OT44OX44eP54uT54OT54eX54eP34uT34OT34eX34eP44uP44OT44eT44eP44OP44eT44eT44eP44OP54eT54eT34eP34OP34eT34eT44OP44OP44eT44eT44OP44eP44eT44eT44OT44eP34eT34eT34OT34eP34eP34OT44OT44eP44eP44OT49Pb+9vf/9vf/6+769vf/8/X+9fb/8vP+9fb/4OP45+j64OT49vf/4eT44OP44OP49vf/4eT44eT44eT45Of55un67vD99vf/Yx4bvgAAAH50Uk5TAAIEBggLDQ8RERMUFhcYGhwfHyEjJScnKiwuMDAzNTc5Ojs+QEJERUdJS01OT1JUVlhbXV9hY2ZoamxvcXN1d3p8foCDhYeJi46QkpSXmZudn6Kkpqirra+xs7a4ury/wcPFx8rMztDT1dfY2Nne4OTo7u7w8fLz9Pf5+fv96tGGfAAAAWdJREFUeNrt17FKQmEcxmGP6BByME/oWVycXLoR9ygIomjxLrwT76oLaXHVBheJTiD0vYk8v/XbHv68eqpNT3/e53bX/djnU6C79Q3ycLe/mCMvU/NeIw/XvtXIw01fa+ThZh3myEuaN8jT5i8N8vT/85/MkcfNkcfNkRc3b5GnzZ9b5OEm38yRx82RR8znyNPmT3Pk4cYn5sjj5sjj5shz5gvkafPHBfJwo6M58rg58qz5Enna/OG+N8BQoH3V9TJcfSAv0eHQ/WRY0vWRI7/6KuTIDYtcOXKdb44cOXIhRy7kyIX8/7/4kSNHLluOXMhtuVw5cuSy5a5cyJHLlrtyIUduy+XKkQs5cvn5dOXIhdyWy5UjF3LkQo4cuZAjF3LkQo4cuZAjF3LkQo5cyJEjF3LkQo5cyJEjF3LkQo5cyJELOXLkQo5cyJELOXLkQo5cyJELOXIhR45cyJELOXIhvyRyBPG+ACG3FwEV1LKsAAAAAElFTkSuQmCC) no-repeat;
+							background-size: 100% 100%;
+						}
+					}
+
+					&:nth-of-type(3n-1) {
+						.boxli {
+							background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXIAAACGCAMAAAD3jvGAAAAAAXNSR0IArs4c6QAAAYxQTFRFAAAA///////////U///////f///R///q///Y///M///S///w///X///R///0//TU//XO//bR//fO///v//fR//jM//jP//jR///r//nO//nR//TN//TP///v//XN//XP//bM//bO//vt//bP//fO//fP//fN//fO//vt//TN//XO//XM//XN//XP//zs//bN//bO//bN//bO//fN//TO//TM//TN//XO//XN//XO//XM//bN//bM//bN//bM//TN//TO//XN//XO//XM//XN//vt//XM//XN//bM//bN//TN//TN//TN//XM//XN//XM//XN//XM//XN//XN//TN//TN//TM//TN//XM//XN//XM//XN//XN//XN//XN//TM//vs//TN//TM//TN//XM//XM//XN//vs//XN//XN//XN//XM//rr//XN//TM//TN//TM//rs//rs//vr//TN//rn//vs//TM//TM//vr//XN//XM//vr//XN//XM//vs//XN//XN//nm//vsfHMuigAAAIF0Uk5TAAIEBgcICwwNDxERExYXGBocHx8hIyUnJyosLjAwMzU3OTo7PkBCREVHSUtNT1FSVFZYW11fYWNmaGpsb3FzdXd6fH6AgYOFh4mLjpCSlJeZm52foqSmqKutr7Gztri6ury/wcPExcXHyszOz9DT1dfY4Oju7u7w8vP09/j5+/v9EeGL8AAAAX9JREFUeNrt2k9KAnEcxuH8AwOJYrlIMDe6mZV3EQSJghJP4l28h3foBC26grvAllE4u/m9EDyf7eweXr6zmOkcbtR6nx+nr8aHfT4FehzPjo3mXT4lGi5fKuThlm8V8vRxaTJHXtB8gDxtvhsgD/dw1Rx5WfMR8rT5foQ83P1+gjxt/jpBHu7urznygPkUedr8eYo83PiXOfKM+Rx52vxpjjzc8Mccecx8gTxtvl0gD3e7rZGnzTc18nDVpkYeN18hT5uvV34dCtdfIy/T5dL05PzusITrueXpOsjTdZFbuZXLyq1cVv4PzJEjR67W35/IrdzKZeXI5bBYuazcypELuVsuK0cu5G65rBw5crnlVi7kyOWWWzlyIUcur08rF3LkQu71aeVCjlzIkQs5cuRCjlzIkQs5ciFHjlzIkQs5cl3PF34rRy7kyIUcuZAjRy7kyIUcuZAjF3LkyIUcuZAjF3LkyJXI31pWjlzI3XIhd1iEHLlbLitHrhbIEcT7Bji0GCzVYAigAAAAAElFTkSuQmCC) no-repeat;
+							background-size: 100% 100%;
+						}
+					}
+
+					&:nth-of-type(3n) {
+						.boxli {
+							background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXIAAACGCAMAAAD3jvGAAAAAAXNSR0IArs4c6QAAAYlQTFRFAAAA/////////////////+jo/+vr/+7u//Dw//////Lk//////Po///0/+rq/+vr/+3t/+/m//f3//Do/+np/+rq/+vl//j4/+3n/+7o/+np/+rq//r0/+vm/+zn/+zo/+3p//b2/+nl/+rm/+vn/+zo/+zl//j0/+nm/+rn/+vn/+vo//Xy/+zl/+nm/+rn/+rn/+vl/+vm/+nm/+rn/+rn/+rl/+vm/+nm/+nn/+rl/+rm/+vm/+vn/+nn/+rl/+rm/+rm/+vn/+nl/+rm/+rm/+rm/+vl/+nl/+nm/+rm/+rn/+rl/+nm/+nm/+rm/+rl/+rl/+nm/+nm/+nm/+rl/+rm/+rm/+nm/+nl/+rl/+rm/+rm/+nm/+nl/+rm/+rm/+rm/+nl/+nl/+rm/+rm/+rl/+rl/+nm/+nm/+rm//T0//b0//b0//Du//b1//T0//X0//Pz//X0/+rl/+3q/+rm//b1/+nm/+nl/+nl//b1/+rm/+rm/+rm/+zp/+3q//Hw//b1aTKk/wAAAH50Uk5TAAIEBggLDQ8RERMUFhcYGhwfHyEjJScnKiwuMDAzNTc5Ojs+QEJERUdJS01OT1JUVlhbXV9hY2ZoamxvcXN1d3p8foCDhYeJi46QkpSXmZudn6Kkpqirra+xs7a4ury/wcPFx8rMztDT1dfY2Nne4OTo7u7w8fLz9Pf5+fv96tGGfAAAAWdJREFUeNrt17FKQmEcxmGP6BByME/oWVycXLoR9ygIomjxLrwT76oLaXHVBheJTiD0vYk8v/XbHv68eqpNT3/e53bX/djnU6C79Q3ycLe/mCMvU/NeIw/XvtXIw01fa+ThZh3myEuaN8jT5i8N8vT/85/MkcfNkcfNkRc3b5GnzZ9b5OEm38yRx82RR8znyNPmT3Pk4cYn5sjj5sjj5shz5gvkafPHBfJwo6M58rg58qz5Enna/OG+N8BQoH3V9TJcfSAv0eHQ/WRY0vWRI7/6KuTIDYtcOXKdb44cOXIhRy7kyIX8/7/4kSNHLluOXMhtuVw5cuSy5a5cyJHLlrtyIUduy+XKkQs5cvn5dOXIhdyWy5UjF3LkQo4cuZAjF3LkQo4cuZAjF3LkQo5cyJEjF3LkQo5cyJEjF3LkQo5cyJELOXLkQo5cyJELOXLkQo5cyJELOXIhR45cyJELOXIhvyRyBPG+ACG3FwEV1LKsAAAAAElFTkSuQmCC) no-repeat;
+							background-size: 100% 100%;
+						}
+					}
+
+					.libuy {
+						width: 147rpx;
+						height: 64rpx;
+						text-align: center;
+						line-height: 64rpx;
+						background: rgba(205, 222, 222, 0.39);
+						color: #26565A;
+						font-size: 26rpx;
+						border-radius: 34rpx;
+					}
+
+					.libuyOK {
+						background: #f5f5f5;
+						color: #999;
+					}
+
+				}
+			}
+		}
+	}
+
+	.cartBox {
+		width: 710rpx;
+		position: fixed;
+		bottom: 10rpx;
+		/* #ifdef H5 */
+		bottom: 128rpx;
+		/* #endif */
+		left: 0;
+		z-index: 999;
+		margin: 0 20rpx;
+
+		.leftbox {
+			height: 100rpx;
+			flex: 1;
+			background: #000000;
+			border-radius: 200rpx 0px 0px 200rpx;
+			padding-left: 30rpx;
+
+			.imgBox {
+				position: relative;
+
+				image {
+					width: 90rpx;
+					height: 82rpx;
+				}
+			}
+
+			.priceInfo {
+				position: relative;
+				margin-left: 60rpx;
+
+				.price {
+					color: #fff;
+				}
+			}
+		}
+
+		.rightbox {
+			height: 100rpx;
+			line-height: 100rpx;
+			text-align: center;
+			color: #fff;
+			background: #d8d8d8 linear-gradient(90deg, #6fd237 0%, #57c32a 100%);
+			border-radius: 0px 200rpx 200rpx 0px;
+			width: 194rpx;
+		}
+
+		.ordbox {
+			font-size: 24rpx;
+			text-align: center;
+			margin-bottom: 10rpx;
+
+			text {
+				font-size: 30rpx;
+			}
+
+			// height: 100rpx;
+			// line-height: 100rpx;
+			// text-align: center;
+			// color: #fff;
+			// background: linear-gradient(90deg, #6fd237 0%, #57c32a 100%);
+			// border-radius: 200rpx ;
+			// margin-right: 15rpx;
+			// padding: 0 20rpx;
+		}
+
+		.rightBlack {
+			background: #000;
+			color: #999;
+		}
+	}
+
+	.ordbtn {
+		position: fixed;
+		bottom: 130rpx;
+		right: 0;
+		z-index: 999;
+		width: 150rpx;
+		height: 150rpx;
+		line-height: 150rpx;
+		border-radius: 50%;
+		color: #fff;
+		text-align: center;
+		vertical-align: middle;
+		font-size: 30rpx;
+		background: radial-gradient(#68e670 0%, #5dce2c 100%);
+	}
+</style>

+ 363 - 0
pagesA/catList/catli.vue

@@ -0,0 +1,363 @@
+<template>
+	<view class="container">
+		<view class="conwarp">
+			<view class="cl-one"><video id='myVideo' class="vidBox" @timeupdate="timeupdate" @play="play"
+					initial-time="0" :src="selInfo.files" controls></video></view>
+			<view class="dfsb">
+				<view class="gdHead flex1">
+					<view class="head">{{ selInfo.title }}</view>
+					<view class="subtit dfsb textgrey fontssm flex1">{{ selInfo.desc }}
+						<view @click="getSon()" class="promain fontsm dffs">{{showSon?'关闭':"展开更多"}}
+							<u-icon class="icondoen" size="12" name='arrow-right-double'></u-icon>
+						</view>
+					</view>
+				</view>
+				<view @click.stop="downItem(selInfo)" class="down dffs">
+					<u-icon name='download' color="#26565A"></u-icon>
+					下载文档
+				</view>
+			</view>
+			<view v-if="showSon" class="sonlist">
+				<video-list flag="5" :list="sonList"></video-list>
+				<view v-if="status1 !='nomore'" @click="getmore()" class="promain tips fontsm dffs"> 查看更多 <u-icon class="icon"
+						name='arrow-down' size='14'></u-icon>
+				</view>
+			</view>
+		</view>
+		<view class="listBox">
+			<view @click="selItem(item)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
+				<view v-if="item.id!=selInfo.id" class="show">
+				</view>
+				<!-- <image class="imgbox" :src="item.img" mode=""></image> -->
+				<view class="imgbox">
+					<image :src="item.img" mode=""></image>
+					<view class="look">{{ item.fen }} </view>
+				</view>
+				<view class="dffd flex1">
+					<view class="title elli">{{ item.title }}</view>
+					<view class="textgrey oneelli fontsm">{{ item.desc }}</view>
+					<view class="auth dfsb">
+						<text class="fontssm prosecond"> {{ item.is_pay==0?'免费':item.my_is_pay==0?'付费':'已购买' }}</text>
+						<view @click.stop="downItem(item)" class="down dffs">
+							<u-icon name='download' color="#26565A"></u-icon>
+							下载文档
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="fixBox">
+			<view @click="buyTips" v-if="totalInfo.my_is_pay==0" class="clickbtn promain">
+				购买全部视频课程:¥{{totalInfo.is_vip==1?totalInfo.vip_price:totalInfo.price}}
+			</view>
+		</view>
+		<y-modal ref='popup' title="提示" text='您确认付费购买此课程吗' @onConfirm='onConfirm'></y-modal>
+	</view>
+</template>
+<script>
+	import {
+		mixin
+	} from './mixin.js'
+	import videoList from '@/pages/index/components/wordlist.vue';
+
+	export default {
+		components: {
+			videoList
+		},
+		mixins: [mixin],
+		data() {
+			return {
+				cat_id: 0, //二级分类cat_id 
+				list: [], //返回列表
+				selInfo: {}, //选中视频
+				totalInfo: {}, //总数居
+				page: 1,
+				limit: 6,
+				status: 'loadmore',
+				page1: 1,
+				limit1: 6,
+				status1: 'loadmore',
+				showSon: false,
+				sonList: [],
+			};
+		},
+		onPullDownRefresh() {
+			this.page = 1;
+			this.list = [];
+			this.loadData();
+			setTimeout(res => {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		onReachBottom() {
+			if (this.status == 'nomore') return;
+			this.status = 'loading';
+			this.page = ++this.page;
+			this.loadData();
+		},
+		onLoad(option) {
+			this.cat_id = option.cat_id || '';
+			this.loadData();
+		},
+
+		onReady: function(res) {
+			this.videoContext = uni.createVideoContext('myVideo')
+		},
+		methods: {
+			getmore() {
+				this.status1 = 'loading';
+				this.page1 = ++this.page1;
+				this.getsonList();
+			},
+			// 获取文档
+			getSon() {
+				if (this.showSon) {
+					this.showSon = !this.showSon 
+					return
+				}
+				this.showSon = !this.showSon
+				this.page1=1;
+				this.status1='loading'
+				this.sonList=[];
+				this.getsonList()
+			},
+			getsonList() {
+				let url = 'new_cate/getVideoFiles';
+				this.$api
+					.request(url, {
+						video_id: this.selInfo.id,
+						page: this.page1,
+						limit: this.limit1
+					})
+					.then(data => {
+						if (data.code == '200') {
+							this.sonList = this.sonList.concat(data.data);
+							if (data.data.length < this.limit1) {
+								this.status1 = 'nomore';
+							}
+						} else {
+							this.$api.toast(data.msg);
+						}
+					});
+			},
+			// 提示购买
+			buyTips(item) {
+				this.buyId = this.totalInfo.id;
+				this.$refs['popup'].open();
+			},
+			timeupdate(e) {
+				console.log(parseInt(e.detail.currentTime));
+				// is_pay  0 免费  1 付费  my_is_pay 0 未购买  1 已购买
+				if (this.selInfo.is_pay != 0 && this.selInfo.my_is_pay != 1) {
+					// is_vip/是否是会员:  0=否  1=是   see_time 可试看时长:  秒
+					if (parseInt(e.detail.currentTime) >= parseInt(this.selInfo.see_time)) {
+						this.$api.toast('请购买后观看完整视频');
+						setTimeout(res => {
+							// #ifdef MP-WEIXIN
+							this.videoContext.stop();
+							// #endif
+							// #ifndef MP-WEIXIN
+							this.videoContext.pause();
+							// #endif
+							this.videoContext.seek(0);
+						}, 800);
+					}
+				}
+			},
+			play(e) {
+				let url = 'index/setSee';
+				this.$api
+					.request(url, {
+						id: this.selInfo.id
+					})
+					.then(res => {
+						if (res.code != '200') {
+							this.$api.toast(res.msg);
+						}
+					});
+			},
+			// 下载
+			downItem(item) {
+				// "is_pay": 0, //是否免费:  0=是(直接看)  1=付费(没购买的需要判断试看时长停止播放,  购买过得不需要)
+				// "my_is_pay": 1 //是否已购买:  0=否   1=是
+				if (item.is_pay == 1 && item.my_is_pay == 0) {
+					this.$api.toast('请先购买')
+				} else {
+					uni.navigateTo({
+						url: '/pagesA/catList/downlist?video_id=' + item.id
+					})
+				}
+			},
+			//选中
+			selItem(item) {
+				this.showSon = false;
+				this.page1 = 1;
+				this.sonList = [];
+				this.selInfo = item;
+			},
+			async loadData() {
+				let url = 'new_cate/getVideoList';
+				this.$api
+					.request(url, {
+						id: this.cat_id,
+						page: this.page,
+						limit: this.limit
+					})
+					.then(res => {
+						if (res.code == '200') {
+							this.totalInfo = res.data.info;
+							if (!this.selInfo.title) {
+								this.selInfo = res.data.list[0]
+							}
+							console.log(!this.selInfo);
+							this.list = this.list.concat(res.data.list);
+							if (res.data.list.length < this.pagnum) {
+								this.status = 'nomore';
+							}
+						} else {
+							this.$api.toast(res.msg);
+						}
+					});
+			},
+
+			//去支付购买
+			toPay() {
+				uni.navigateTo({
+					url: '/pages/pay/payVid?item=' + JSON.stringify(this.selInfo)
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.container {
+		padding-bottom: 100rpx;
+
+		.conwarp {
+			background-color: #fff;
+			padding: 0rpx 30rpx 10rpx;
+			border-radius: 16rpx;
+			margin-bottom: 20rpx;
+
+			.gdHead {
+				line-height: 58rpx;
+				margin: 16rpx 0;
+
+				.head {
+					font-family: PingFangSC-Medium, PingFang SC;
+					font-weight: 600;
+					color: #333333;
+					line-height: 48rpx;
+				}
+
+				/deep/ .u-icon--right {
+					transform: rotate(90deg);
+				}
+			}
+
+			.cl-one {
+				.vidBox {
+					margin-top: 30rpx;
+					width: 690rpx;
+					height: 335rpx;
+				}
+			}
+		}
+
+		.down {
+			padding: 0 15rpx;
+			// width: 147rpx;
+			height: 64rpx;
+			text-align: center;
+			line-height: 64rpx;
+			background: rgba(205, 222, 222, 0.39);
+			color: #26565A;
+			font-size: 26rpx;
+			border-radius: 34rpx;
+		}
+
+		.vidLi {
+			position: relative;
+			width: 100%;
+			padding: 27rpx;
+			background-color: #fff;
+
+			.show {
+				position: absolute;
+				width: 100%;
+				height: 100%;
+				background-color: #000;
+				opacity: 0.5;
+				z-index: 999;
+			}
+
+			&:nth-of-type(2n) {
+				margin-right: 0;
+			}
+
+			// .imgbox {
+			// 	width: 250rpx;
+			// 	height: 180rpx;
+			// }
+			.imgbox {
+				width: 250rpx;
+				height: 180rpx;
+				margin-right: 18rpx;
+				border-radius: 10rpx;
+				position: relative;
+
+				image {
+					width: 250rpx;
+					height: 180rpx;
+					border-radius: 10rpx;
+				}
+
+				.look {
+					position: absolute;
+					bottom: 15rpx;
+					right: 19rpx;
+					background: rgba(#000, 0.3);
+					border-radius: 18rpx;
+					font-size: 20rpx;
+					line-height: 28rpx;
+					padding: 5rpx 14rpx;
+					color: #ffffff;
+					display: inline-block;
+				}
+			}
+
+			.title {
+				font-size: 28rpx;
+				line-height: 40rpx;
+				margin-bottom: 12rpx;
+			}
+
+			.auth {
+				margin-top: 15rpx;
+				width: 100%;
+			}
+
+		}
+
+		.bgg {
+			background: #ececec;
+		}
+
+		.clickbtn {
+			margin: 0 30rpx;
+			background: rgba(205, 222, 222, 0.39);
+		}
+
+		.sonlist {
+			padding: 10rpx 30rpx;
+			.tips{
+				padding-top: 20rpx;
+				width: 100%;
+				justify-content: center;
+			}
+		}
+
+
+	}
+</style>

+ 73 - 0
pagesA/catList/downlist.vue

@@ -0,0 +1,73 @@
+<template>
+	<view>
+		<view class="cl-one">
+			<video-list flag="4" :list="list"></video-list>
+		</view>
+	</view>
+</template>
+
+<script>
+import videoList from '@/pages/index/components/wordlist.vue';
+
+export default {
+	components: {
+		videoList
+	},
+	data() {
+		return {
+			list: [],
+			status:'loadmore',
+			page:1,
+			pagenum:10,
+			
+		};
+	},
+	onPullDownRefresh() {
+		this.page=1;
+		this.list=[];
+		this.getInfoList();
+		setTimeout(res => {
+			uni.stopPullDownRefresh();
+		}, 1000);
+	},
+	
+	onReachBottom() {
+		if (this.status == 'nomore') return;
+		this.status = 'loadmore';
+		this.page = ++this.page;
+		this.getInfoList();
+	},
+	onLoad(options) {
+		this.video_id=options.video_id;
+		this.getInfoList();
+	},
+	methods: {
+		getInfoList() {
+			let url = 'new_cate/getVideoFiles';
+			this.$api
+				.request(url, {
+					video_id:this.video_id,
+					page: this.page,
+					limit: this.pagenum
+				})
+				.then(data => {
+					if (data.code == '200') {
+						this.list = this.list.concat(data.data);
+						if (data.data.length < this.pagnum) {
+							this.status = 'nomore';
+						}
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		}, 
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+	.cl-one{
+		background-color: #fff;
+		padding: 0 30rpx;
+	}
+</style>

+ 60 - 0
pagesA/catList/mixin.js

@@ -0,0 +1,60 @@
+// 根目录的static下创建js文件夹并创建mixin.js文件   
+export const mixin = { 
+	data() {
+		return {
+			buyId:'',
+		}
+	},
+	methods: {
+		// 购买
+		creadOrd(item){
+			console.log(item);
+			if(item.my_is_pay==1) return this.$api.toast('您已经购买过了')
+			this.buyId= item.id; 
+			this.$refs['popup'].open();
+		},
+		onConfirm(){
+			this.$api
+				.request('payment/newVcPay',{
+					cate_id:this.buyId,
+					pay_type:1,
+				})
+				.then(data => {
+					console.log(data);
+					if (data.code && data.code != 200) {
+						this.$api.toast(data.msg || '获取支付信息失败');
+						return;
+					}
+					console.log(data);
+					const orderInfo = data;
+					const { timeStamp, nonceStr, paySign } = orderInfo;
+					const payParams = {
+						provider: 'wxpay',
+						orderInfo: data,
+						timeStamp,
+						nonceStr,
+						package: orderInfo.package,
+						signType: 'MD5',
+						paySign,
+						success: e => {
+							setTimeout(res => {
+								this.page = 1; 
+								this.list = []; 
+								this.loadData(); 
+							}, 600);
+						},
+						fail: err => {
+							if (err.errMsg.indexOf('取消') > -1 || err.errMsg.indexOf('cancel') > 1 || err.errMsg.indexOf('-2') > -1) {
+								this.$api.toast('取消支付');
+							} else {
+								this.$api.toast('支付遇到错误,请稍候重试');
+								console.log(err);
+							}
+						}
+					};
+					uni.requestPayment(payParams);
+				});
+		},
+		
+ }
+}

+ 109 - 0
pagesA/components/collageMall.vue

@@ -0,0 +1,109 @@
+<template>
+	<view class="box">
+		<view v-if="flag == 1" class="boxlist">
+			<view @click="nextTo(item)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
+				<view class="imgbox">
+					<image :src="item.goods_img" mode=""></image>
+					<!-- <text class="left-img" v-if="ind < 3">第{{ ind + 1 }}名</text> -->
+				</view>
+				<view class="dffd flex1">
+					<view class="title elli">{{item.goods_name}}</view>
+					<view class="price dfsb">
+						<view class="textgrey">单独购买: <text class="del">¥{{item.goods_price}}</text></view>
+						<text class="textgrey">{{item.group_success}}人已拼团成功</text>
+					</view>
+					<view class="auth dfsb">
+						<view class="prosecond">拼团价: <text class="priceDan">{{item.group_price}}</text></view>
+						<text class="btn">去拼团</text>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {};
+	},
+	props: {
+		list: {
+			type: Array,
+			default: []
+		},
+		flag: {
+			type: [String, Number],
+			default: 1
+		}
+	},
+	methods: {
+		nextTo(item) {
+			uni.navigateTo({
+				url: '/pagesA/mall/collInfo?flag=2&id='+item.id
+			});
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.boxlist {
+	.vidLi {
+		width: 100%;
+		padding: 15rpx;
+		background-color: #fff;
+		margin-bottom: 20rpx; 
+		.imgbox {
+			position: relative;
+			width: 200rpx;
+			height: 200rpx;
+			margin-right: 28rpx;
+			// .left-img {
+			// 	position: absolute;
+			// 	top: 0;
+			// 	left: 0;
+			// 	height: 33rpx;
+			// 	line-height: 33rpx;
+			// 	font-size: 18rpx;
+			// 	color: #fff;
+			// 	padding: 0 5rpx;
+			// 	background: #e84325;
+			// 	border-radius: 7rpx;
+			// }
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+		.title {
+			font-size: 26rpx;
+			line-height: 40rpx;
+			margin-bottom: 12rpx;
+		}
+		.price{ 
+			width: 100%;
+			.textgrey,text{
+				font-size: 20rpx;
+			}
+		}
+		.auth {
+			margin-top: 15rpx;
+			width: 100%;
+			.prosecond{
+				font-size: 20rpx;
+			}
+			.btn{
+				width: 120rpx;
+				height: 44rpx;
+				line-height: 44rpx;
+				text-align: center;
+				background: #ED742F;
+				border-radius: 22rpx;
+				color: #fff;
+				font-size: 20rpx;
+			}
+		}
+	}
+}
+</style>

+ 72 - 0
pagesA/components/collagePeoList.vue

@@ -0,0 +1,72 @@
+<template>
+	<view class="box">
+		<view class="boxlist">
+			<view @click="nextTo(item)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
+				<view class="imgbox dffs flex1">
+					<image :src="item.user_img" mode=""></image>
+					<text class="fontsm ">{{item.nickname}}</text>
+				</view>
+				<view class="auth dffs">
+					<view class="fontssm dffs">还差<text class="red">{{item.cha}}</text> 人成团</view>
+					<text class="btn">去拼团</text>
+				</view>
+			</view>
+			<u-empty v-if="list.length<1" text="还没有商品哦" mode="list"></u-empty>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {};
+	},
+	props: {
+		list: {
+			type: Array,
+			default: []
+		},
+		flag: {
+			type: [String, Number],
+			default: 1
+		}
+	},
+	methods: {
+		nextTo(item) {
+			this.$emit('getPid',item.id)
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.boxlist {
+	.vidLi {
+		width: 100%;
+		padding: 30rpx 0;
+		background-color: #fff; 
+		.imgbox { 
+			margin-right:  15rpx; 
+			image {
+				width: 70rpx;
+				height: 70rpx;
+				margin-right: 20rpx;
+				border-radius: 50%;
+			}
+		} 
+		.auth {  
+			.btn {
+				width: 120rpx;
+				height: 44rpx;
+				line-height: 44rpx;
+				text-align: center;
+				background: #FF4944;
+				border-radius: 22rpx;
+				color: #fff;
+				font-size: 20rpx;
+				margin-left: 47rpx;
+			}
+		}
+	}
+}
+</style>

+ 110 - 0
pagesA/components/skillList.vue

@@ -0,0 +1,110 @@
+<template>
+	<view class="box">
+		<view v-if="flag == 1" class="boxlist">
+			<view @click="nextTo(item)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
+				<view class="imgbox">
+					<image :src="item.goods_img" mode=""></image>
+					<!-- <text class="left-img" v-if="ind < 3">第{{ ind + 1 }}名</text> -->
+				</view>
+				<view class="dffd flex1">
+					<view class="title elli">{{item.goods_name}}</view>
+					<view class="price dfsb">
+						<view class="textgrey">单独购买: <text class="del">¥{{item.goods_price}}</text></view>
+						<!-- <text class="textgrey">{{item.count}}人已秒杀成功</text> -->
+					</view>
+					<view class="auth dfsb">
+						<view class="prosecond">秒杀价: <text class="priceDan">{{item.seckill_price}}</text></view>
+						<text class="btn">去秒杀</text>
+					</view>
+				</view>
+			</view>
+			<u-empty v-if="list.length<1" text="还没有商品哦" mode="list"></u-empty>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {};
+	},
+	props: {
+		list: {
+			type: Array,
+			default: []
+		},
+		flag: {
+			type: [String, Number],
+			default: 1
+		}
+	},
+	methods: {
+		nextTo(item) {
+			uni.navigateTo({
+				url: '/pagesA/mall/skillInfo?flag=3&id='+item.id 
+			});
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.boxlist {
+	.vidLi {
+		width: 100%;
+		padding: 15rpx;
+		background-color: #fff;
+		margin-bottom: 20rpx; 
+		.imgbox {
+			position: relative;
+			width: 200rpx;
+			height: 200rpx;
+			margin-right: 28rpx;
+			// .left-img {
+			// 	position: absolute;
+			// 	top: 0;
+			// 	left: 0;
+			// 	height: 33rpx;
+			// 	line-height: 33rpx;
+			// 	font-size: 18rpx;
+			// 	color: #fff;
+			// 	padding: 0 5rpx;
+			// 	background: #e84325;
+			// 	border-radius: 7rpx;
+			// }
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+		.title {
+			font-size: 26rpx;
+			line-height: 40rpx;
+			margin-bottom: 12rpx;
+		}
+		.price{ 
+			width: 100%;
+			.textgrey,text{
+				font-size: 20rpx;
+			}
+		}
+		.auth {
+			margin-top: 15rpx;
+			width: 100%;
+			.prosecond{
+				font-size: 20rpx;
+			}
+			.btn{
+				width: 120rpx;
+				height: 44rpx;
+				line-height: 44rpx;
+				text-align: center;
+				background: #ED742F;
+				border-radius: 22rpx;
+				color: #fff;
+				font-size: 20rpx;
+			}
+		}
+	}
+}
+</style>

+ 277 - 0
pagesA/mall/class.vue

@@ -0,0 +1,277 @@
+<template>
+	<view class="root">
+		<view class="content dfsb">
+			<view class="secTop">
+				<scroll-view :scroll-top="0" scroll-y="true" class="scroll-Y">
+					<view @tap="choose(index)" :class="['topLi', topLiSel == index ? 'topsel' : '']" v-for="(item, index) in topData" :key="index">{{ item.name }}</view>
+				</scroll-view>
+			</view>
+			<view class="topInfo">
+				<view class="topCInfo">
+					<scroll-view :scroll-top="0" scroll-y="true" class="scroll-Y" @scrolltolower="lower">
+						<view class="box dffs">
+							<view @click="toNext(item)" class="goodLi dffd" v-for="(item, index) in classList" :key="index">
+								<image class="gdImg" :src="item.logo" mode="aspectFill"></image>
+								<view class="oneelli">{{ item.name || '商品名称' }}</view>
+							</view>
+						</view>
+						<view v-if="classList.length < 1" class="nodata"><u-empty icon-size="200" text="新品即将上新,敬请期待~" mode="list"></u-empty></view>
+					</scroll-view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			topData: [], //一层
+			classList: [
+				// { name: '姓名', goods_img: '/static/img/pro/hotbgzj.png' },
+			], //商品
+			topLiSel: 0, //一层分类选中
+			status: 'loadmore',
+			page: 1,
+			pagnum: 15
+		};
+	},
+	onLoad(opt) {
+		this.onload();
+	},
+	onPullDownRefresh() {
+		this.page = 1;
+		this.topLiSel = 0;
+		this.topData = [];
+		this.classList = [];
+		this.onload();
+		setTimeout(function() {
+			uni.stopPullDownRefresh();
+		}, 800);
+	},
+	onReachBottom() {
+		if (this.status == 'nomore') return;
+		this.status = 'loadmore';
+		this.page = ++this.page;
+		this.onload();
+	},
+
+	onShow() {},
+	methods: {
+		toNext(item) {
+			uni.navigateTo({
+				url: '/pagesA/mall/mall?flag=2&type=1&id=' + item.id
+			});
+		},
+		choose(index) {
+			this.topLiSel = index;
+			this.classList = this.topData[this.topLiSel].son;
+		},
+		onload() {
+			this.status = 'loadmore';
+			this.$api.request('goods/goods_catlist').then(data => {
+				console.log(data);
+				if (data.code == 200) {
+					this.topData = data.data;
+					this.classList = this.topData[this.topLiSel].son;
+				} else {
+					this.$api.toast(data.msg);
+				}
+			});
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.content {
+	margin-top: 20rpx;
+	// padding: 20rpx 0;
+	background-color: #fff;
+	align-items: flex-start;
+	border-top: 1rpx solid #e8e8e8;
+	.secTop {
+		width: 177rpx;
+		height: calc(100vh - 20rpx);
+		.scroll-Y {
+			height: calc(100vh - 20rpx);
+			flex-wrap: wrap;
+		}
+		.topLi {
+			font-size: 26rpx;
+			width: 177rpx;
+			padding: 26rpx 0;
+			line-height: 37rpx;
+			text-align: center;
+			background: #f4f4f4;
+			color: #666;
+		}
+		.topsel {
+			font-size: 28rpx;
+			box-sizing: border-box;
+			background-color: #fff;
+			color: $promain;
+			font-weight: 600;
+		}
+	}
+	.topInfo {
+		flex: 1;
+		// background-color: #fff;
+		.topClass {
+			position: fixed;
+			z-index: 1;
+			background-color: #fff;
+			padding-left: 15rpx;
+			width: 556rpx;
+			.topClaBox {
+				flex: 1;
+				height: 98rpx;
+				line-height: 98rpx;
+				display: -webkit-box;
+				overflow-x: auto;
+				/*适应苹果*/
+				-webkit-overflow-scrolling: touch;
+				//父盒子隐藏滚动条
+				&::-webkit-scrollbar {
+					display: none;
+				}
+				.topClasLi {
+					font-size: 28rpx;
+					padding: 0 15rpx;
+				}
+				.topClasel {
+					color: $promain;
+				}
+			}
+			.classDown {
+				height: 98rpx;
+				width: 70rpx;
+				box-shadow: -2rpx -5rpx 2rpx 5rpx rgba($color: #000000, $alpha: 0.05);
+				background-color: #fff;
+				.xuanz {
+					transform: translate(180deg);
+				}
+			}
+		}
+		.topCInfo {
+			margin-left: 42rpx;
+			flex: 1;
+			height: calc(100vh - 20rpx);
+			.maskbg {
+				position: fixed;
+				top: 170rpx;
+				left: 200rpx;
+				width: calc(100% - 120rpx);
+				height: calc(100% - 100rpx);
+				background-color: rgba(0, 0, 0, 0.65);
+				z-index: 2;
+			}
+			/* #ifdef MP */
+			.maskbg {
+				position: fixed;
+				top: 70rpx;
+			}
+			/* #endif */
+			.scroll-Y {
+				height: calc(100vh - 20rpx);
+			}
+			.box {
+				width: 100%;
+				flex-wrap: wrap;
+			}
+			.goodLi {
+				width: 120rpx;
+				margin-top: 58rpx;
+				align-items: center;
+				margin-right: 55rpx;
+				.gdImg {
+					width: 100%;
+					height: 120rpx;
+					background-color: #fbf9fa;
+					margin-bottom: 36rpx;
+				}
+				.oneelli {
+					text-align: center;
+					font-size: 24rpx;
+				}
+			}
+		}
+	}
+}
+.cartBox {
+	width: 710rpx;
+	position: fixed;
+	bottom: 10rpx;
+	/* #ifdef H5 */
+	bottom: 128rpx;
+	/* #endif */
+	left: 0;
+	z-index: 999;
+	margin: 0 20rpx;
+	.leftbox {
+		height: 100rpx;
+		flex: 1;
+		background: #000000;
+		border-radius: 200rpx 0px 0px 200rpx;
+		padding-left: 30rpx;
+		.imgBox {
+			position: relative;
+			image {
+				width: 90rpx;
+				height: 82rpx;
+			}
+		}
+		.priceInfo {
+			position: relative;
+			margin-left: 60rpx;
+			.price {
+				color: #fff;
+			}
+		}
+	}
+	.rightbox {
+		height: 100rpx;
+		line-height: 100rpx;
+		text-align: center;
+		color: #fff;
+		background: #d8d8d8 linear-gradient(90deg, #6fd237 0%, #57c32a 100%);
+		border-radius: 0px 200rpx 200rpx 0px;
+		width: 194rpx;
+	}
+	.ordbox {
+		font-size: 24rpx;
+		text-align: center;
+		margin-bottom: 10rpx;
+		text {
+			font-size: 30rpx;
+		}
+		// height: 100rpx;
+		// line-height: 100rpx;
+		// text-align: center;
+		// color: #fff;
+		// background: linear-gradient(90deg, #6fd237 0%, #57c32a 100%);
+		// border-radius: 200rpx ;
+		// margin-right: 15rpx;
+		// padding: 0 20rpx;
+	}
+	.rightBlack {
+		background: #000;
+		color: #999;
+	}
+}
+.ordbtn {
+	position: fixed;
+	bottom: 130rpx;
+	right: 0;
+	z-index: 999;
+	width: 150rpx;
+	height: 150rpx;
+	line-height: 150rpx;
+	border-radius: 50%;
+	color: #fff;
+	text-align: center;
+	vertical-align: middle;
+	font-size: 30rpx;
+	background: radial-gradient(#68e670 0%, #5dce2c 100%);
+}
+</style>

File diff suppressed because it is too large
+ 299 - 0
pagesA/mall/collInfo.vue


+ 91 - 0
pagesA/mall/componets/hotgodlist.vue

@@ -0,0 +1,91 @@
+<template>
+	<view class="box">
+		<view v-if="flag == 1" class="boxlist">
+			<view @click="nextTo(item)" class="bb vidLi dfsb" v-for="(item, ind) in list" :key="ind">
+				<view class="imgbox">
+					<image :src="item.goods_img" mode=""></image>
+					<!-- <text class="left-img" v-if="ind < 3">第{{ ind + 1 }}名</text> -->
+				</view>
+				<view class="dffd flex1">
+					<view class="title elli">{{ item.goods_name }}</view> 
+					<view class="auth dfsb">
+						<text class="priceDan">{{ item.goods_price }}</text>
+						<text class="textgrey">{{ item.sale_num }}人已购买</text>
+					</view>
+				</view>
+			</view>
+			<u-empty v-if="list.length<1" text="还没有商品哦" mode="list"></u-empty>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {};
+	},
+	props: {
+		list: {
+			type: Array,
+			default: []
+		},
+		flag: {
+			type: [String, Number],
+			default: 1
+		}
+	},
+	methods: {
+		nextTo(item) {
+			uni.navigateTo({
+				url: '/pagesA/mall/info?flag=1&id='+item.goods_id
+			});
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.boxlist {
+	.vidLi {
+		width: 100%;
+		padding: 20rpx 30rpx;
+		background-color: #fff;
+		.imgbox {
+			position: relative;
+			width: 180rpx;
+			height: 174rpx;
+			margin-right: 28rpx;
+			// .left-img {
+			// 	position: absolute;
+			// 	top: 0;
+			// 	left: 0;
+			// 	height: 33rpx;
+			// 	line-height: 33rpx;
+			// 	font-size: 18rpx;
+			// 	color: #fff;
+			// 	padding: 0 5rpx;
+			// 	background: #e84325;
+			// 	border-radius: 7rpx;
+			// }
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+		.title {
+			font-size: 26rpx;
+			line-height: 40rpx;
+			margin-bottom: 12rpx;
+		}
+		.auth {
+			margin-top: 52rpx;
+			width: 100%;
+			.prosecond {
+			}
+			.textgrey {
+				font-size: 20rpx;
+			}
+		}
+	}
+}
+</style>

+ 449 - 0
pagesA/mall/creatOrd.vue

@@ -0,0 +1,449 @@
+<template>
+	<view class="content">
+		<navigator url="/pages/user/address/address" class="address dfsb">
+			<image src="/static/img/pro/malladdress.png" mode=""></image>
+			<view v-if="addressInfo.shou_name" class="addInfo">
+				<view class="addInfo-title">
+					<text>{{ addressInfo.shou_name }}</text>
+					<text class="textgrey">{{ addressInfo.shou_phone }}</text>
+				</view>
+				<view class="addInfo-bot">{{ addressInfo.shou_address }}</view>
+			</view>
+			<view v-if="!addressInfo.shou_name" class="addInfo">请选择地址</view>
+			<u-icon name="arrow-right" color="#999" size="12"></u-icon>
+		</navigator>
+		<view class="shopsBox">
+			<block v-if="flag == 1">
+				<view v-for="(item, index) in newsInfo.order_goods.goods" :key="index" class="shopshead dfsb">
+					<image :src="item.imgurl" mode=""></image>
+					<view class="shopsInfo dffd">
+						<view class="elli">{{ item.goods_name }}</view>
+						<view v-if="item.sku_name" class="selAttr">{{ item.sku_name }}</view>
+						<view class="price dfsb">
+							<text v-if="flag == 1" class="promain">¥{{ item.price}}</text>
+							<text class="textgrey">x{{ item.num || 1 }}</text>
+						</view>
+					</view>
+				</view>
+			</block>
+			<block v-if="flag !=1">
+				<view class="shopshead dfsb">
+					<image :src="newsInfo.order.imgurl" mode=""></image>
+					<view class="shopsInfo dffd">
+						<view class="elli">{{ newsInfo.order.goods_name }}</view>
+						<view v-if="newsInfo.order.sku_name" class="selAttr">{{ newsInfo.order.sku_name }}</view>
+						<view class="price dfsb">
+							<text class="promain">¥{{ newsInfo.order.price }}</text> 
+							<text class="textgrey">x{{ newsInfo.order.num || 1 }}</text>
+						</view>
+					</view>
+				</view>
+			</block>
+			<view class="other dfsb">
+				<text>邮费</text>
+				<text>{{ newsInfo.exp_fee || 0 }}元</text>
+			</view>
+			<view class="other dfsb">
+				<text>订单备注</text>
+				<input type="text" v-model="beizhu" placeholder="选填,请先和商家协商一致" />
+			</view>
+		</view>
+		<view v-if="flag == 1" class="payInfo dfsb">
+			<image class="payicon" src="/static/img/pro/payyh.png" mode=""></image>
+			<view class="dffd flex1">
+				<text class="blank fontmid">
+					使用优惠券
+					<text class="prosecond fontmid">-{{ coupon.reduce }}</text>
+				</text>
+				<view @click.stop="nextTo" class="textgrey fontssm dffs">
+					当前有{{ newsInfo.coupon_list.length }}张可使用的优惠券
+					<u-icon name="arrow-down" color="#999" size="14"></u-icon>
+				</view>
+			</view>
+		</view>
+		<view v-if="flag == 1" class="payInfo dffs">
+			<text class="fontsm">共{{ newsInfo.num }}件,合计{{ newsInfo.total }},折扣{{ newsInfo.discount }}折</text>
+		</view>
+		<view class="fixBox dffs">
+			<text class="prosecond fontmid">实际支付{{ newsInfo.payment_price }},</text>
+			<text v-if="flag == 1" class="flex1 fontsm ">优惠-{{ coupon.reduce }}</text>
+			<!-- <text v-if="flag == 1" class="prosecond">¥{{ newsInfo.total }}+{{ newsInfo.point }}积分</text> -->
+			<view @click="handle" class="clickbtn">提交订单</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			flag: 1, //  1普通  2拼团  3秒杀
+			goods: {}, //传来的商品信息
+
+			newsInfo: {
+				coupon_list: [],
+				order_goods: {
+					goods: []
+				},
+				order: {}
+			},
+			addressInfo: {},
+			coupon: { reduce: 0 }, //优惠券
+			beizhu: '',
+
+			showimg: false,
+			noWeiXin: true, //是不是微信中支付宝不嫩显示
+			num: 1,
+			addid: uni.getStorageSync('setAddId'), //收货id
+			showPaytype: false, //展示付款方式
+			paytype: '', // 获取付款方式  3 圆宝积分 4  fyt
+			showPass: '', // 展示密码
+			orderId: '' //订单id
+		};
+	},
+	onLoad(opt) {
+		this.flag = opt.flag || 1;
+		this.goods = JSON.parse(opt.goods);
+		this.onload();
+	},
+	onShow() {},
+	methods: {
+		// 选择优惠券
+		nextTo() {
+			uni.navigateTo({
+				url: '/pages/user/coupon/myCoup?money=' + this.newsInfo.payment_price
+			});
+		},
+		onload() {
+			console.log(this.flag);
+			let url = '';
+			let data = {};
+			if (this.flag == 1) {
+				url = 'orders/order_view';
+				let arrList = [];
+				let arr = {};
+				arr['id'] = this.goods.id;
+				arr['sku_id'] = this.goods.sku_id;
+				arr['num'] = this.goods.num;
+				arrList.push(arr);
+				data = {
+					goods: JSON.stringify(arrList),
+					address_id: ''
+				};
+			} else if (this.flag == 2) {
+				url = 'grouporder/order_view';
+				data = {
+					id: this.goods.id,
+					num: this.goods.num,
+					pid: this.goods.pid,
+					sku_id: this.goods.sku_id,
+					id: this.goods.id,
+					address_id: ''
+				};
+			} else {
+				url = 'seckillorder/order_view';
+				data = {
+					id: this.goods.id,
+					num: this.goods.num, 
+					sku_id: this.goods.sku_id,
+					id: this.goods.id,
+					address_id: ''
+				};
+			}
+			this.$api.request(url, data).then(data => {
+				if (data.code == 200) {
+					if (this.flag == 1) {
+						this.addressInfo = data.data.order_goods.address;
+						this.newsInfo = data.data;
+					} else if (this.flag == 2) {
+						this.addressInfo = data.data.order.address;
+						this.newsInfo = data.data;
+					} else if (this.flag == 3) {
+						this.addressInfo = data.data.order.address;
+						this.newsInfo = data.data;
+					} else {
+					}
+				} else {
+					this.$api.modal('温馨提示', data.msg, true, res => {
+						if (this.$api.prePage() != undefined) {
+							uni.navigateBack({
+								delta: 1
+							});
+							return;
+						}
+						uni.switchTab({
+							url: '/pages/index/index'
+						});
+					});
+				}
+			});
+		},
+		//点击提交
+		handle() {
+			if (!this.addressInfo.address_id) return this.$api.toast('请选择收货地址');
+			let url = '';
+			let data = {};
+			if (this.flag == 1) {
+				url = 'orders/order_create';
+				let arrList = [];
+				let arr = {};
+				arr['id'] = this.goods.id;
+				arr['sku_id'] = this.goods.sku_id;
+				arr['num'] = this.goods.num;
+				arrList.push(arr);
+				data = {
+					goods: JSON.stringify(arrList),
+					content: this.beizhu,
+					coupon_id: this.coupon.id || '',
+					address_id: this.addressInfo.address_id || ''
+				};
+			} else if (this.flag == 2) {
+				url = 'grouporder/order_create';
+				data = {
+					id: this.goods.id,
+					num: this.goods.num,
+					sku_id: this.goods.sku_id,
+					pid: this.goods.pid,
+					content: this.beizhu,
+					address_id: this.addressInfo.address_id || ''
+				};
+			} else if (this.flag == 3) {
+				url = 'seckillorder/toSeckill';
+				data = {
+					id: this.goods.id,
+					goods_id: this.goods.goods_id,
+					num: this.goods.num,
+					sku_id: this.goods.sku_id, 
+					content: this.beizhu,
+					address_id: this.addressInfo.address_id || ''
+				};
+			}
+			this.$api.request(url, data).then(data => {
+				if (data.code == 200) {
+					this.orderId = data.data;
+					this.toPay();
+				} else {
+					this.$api.toast(data.msg);
+				}
+			});
+		},
+		// 支付
+		toPay() {
+			this.$api
+				.request('orders/order_pay', {
+					id: this.orderId,
+					type: this.flag
+				})
+				.then(data => {
+					console.log(data);
+					if (data.code && data.code != 200) {
+						this.$api.toast(data.msg || '获取支付信息失败');
+						return;
+					}
+					console.log(data);
+					const orderInfo = data;
+					const { timeStamp, nonceStr, paySign } = orderInfo;
+					const payParams = {
+						provider: 'wxpay',
+						orderInfo: data,
+						timeStamp,
+						nonceStr,
+						package: orderInfo.package,
+						signType: 'MD5',
+						paySign,
+						success: e => {
+							setTimeout(res => {
+								uni.redirectTo({
+									url: '/pagesA/mall/order?flag=' + this.flag
+								});
+							}, 600);
+						},
+						fail: err => {
+							if (err.errMsg.indexOf('取消') > -1 || err.errMsg.indexOf('cancel') > 1 || err.errMsg.indexOf('-2') > -1) {
+								this.$api.toast('取消支付');
+							} else {
+								this.$api.toast('支付遇到错误,请稍候重试');
+								console.log(err);
+							}
+						}
+					};
+					uni.requestPayment(payParams);
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.content {
+	min-height: 100vh;
+	padding: 30rpx 30rpx 140rpx;
+	.payInfo {
+		margin-top: 30rpx;
+		background-color: #fff;
+		padding: 35rpx 30rpx;
+		.payicon {
+			width: 68rpx;
+			height: 68rpx;
+		}
+		.flex1 {
+			margin: 0 15rpx;
+		}
+		.fontmid {
+			flex: 1;
+		}
+		.payselicon {
+			width: 32rpx;
+			height: 32rpx;
+		}
+	}
+	.warp {
+		background-color: none;
+		align-items: center;
+		.title {
+			width: 434rpx;
+			height: 312rpx;
+		}
+		.box {
+			margin-top: -138rpx;
+			padding: 164rpx 0 0;
+			width: 564rpx;
+			min-height: 502rpx;
+			background: #ffffff;
+			border-radius: 16rpx;
+			border: 2rpx solid #979797;
+			align-items: center;
+			.errtit {
+				padding: 0 40rpx;
+				font-size: 40rpx;
+				color: #080404;
+				line-height: 50rpx;
+				margin: 46rpx 0 30rpx;
+			}
+			.subtit {
+				image {
+					width: 54rpx;
+					height: 54rpx;
+					margin-right: 20rpx;
+				}
+				font-size: 36rpx;
+				color: #ff5302;
+				line-height: 50rpx;
+			}
+			.com {
+				margin: 110rpx 0 30rpx;
+				font-size: 28rpx;
+				font-family: MicrosoftYaHei;
+				color: #666666;
+				line-height: 38rpx;
+			}
+		}
+		.close {
+			width: 64rpx;
+			height: 64rpx;
+			margin-top: 30rpx;
+		}
+	}
+	.address {
+		padding: 30rpx;
+		background-color: #fff;
+		margin: 0rpx 0 22rpx;
+		border-radius: 16rpx;
+		overflow: hidden;
+		image {
+			width: 56rpx;
+			height: 56rpx;
+			margin-right: 30rpx;
+		}
+		.addInfo {
+			flex: 1;
+			&-title {
+				text {
+					font-size: 32rpx;
+				}
+				text:nth-of-type(2) {
+					font-size: 28rpx;
+					margin-left: 12rpx;
+				}
+			}
+			&-bot {
+				margin-top: 10rpx;
+				font-size: 28rpx;
+				line-height: 40rpx;
+			}
+		}
+	}
+	.shopsBox {
+		background-color: #fff;
+		border-radius: 16rpx;
+		padding: 30rpx 20rpx;
+
+		.shopsTit {
+			font-size: 32rpx;
+			line-height: 44rpx;
+			margin-bottom: 30rpx;
+			image {
+				width: 40rpx;
+				height: 40rpx;
+				margin-right: 10rpx;
+			}
+		}
+		.shopshead {
+			padding-bottom: 20rpx;
+			image {
+				width: 180rpx;
+				height: 180rpx;
+				border-radius: 10rpx;
+				margin-right: 20rpx;
+				background-color: #ccc;
+			}
+			.shopsInfo {
+				width: 450rpx;
+				height: 100%;
+				align-items: flex-start;
+				justify-content: space-between;
+				.elli {
+					height: 80rpx;
+					line-height: 40rpx;
+				}
+				.price {
+					width: 100%;
+					text {
+						font-size: 32rpx;
+					}
+					/deep/ .u-number-input {
+						margin: 0;
+					}
+					/deep/ .u-icon-plus,
+					/deep/ .uni-input-input,
+					/deep/ .u-icon-minus {
+						border: 1px solid #ebebeb;
+					}
+				}
+			}
+		}
+		.other {
+			margin: 30rpx 0 0 60rpx;
+			&:nth-of-type(1) {
+				margin-top: 50rpx;
+			}
+			text {
+				margin-right: 30rpx;
+			}
+			input {
+				flex: 1;
+			}
+		}
+	}
+	.fixBox {
+		justify-content: flex-end;
+		font-size: 32rpx;
+		padding-left: 30rpx;
+		.clickbtn {
+			margin: 0 0 0 20rpx;
+			width: 214rpx;
+			border-radius: 0px;
+		}
+	}
+}
+</style>

File diff suppressed because it is too large
+ 347 - 0
pagesA/mall/info.vue


+ 150 - 0
pagesA/mall/logisticsInfo.vue

@@ -0,0 +1,150 @@
+<template>
+	<view class="content">
+		<!-- 商品信息 -->
+		<view class="shopshead dfsb">
+			<image :src="info.shop.goods_img" mode=""></image>
+			<view class="shopsInfo dffd">
+				<view class="elli bold">{{ info.shop.goods_name || '商品名称' }}</view>
+				<view class="subtit fontssm">sdfsfdasgdffdsaf1345565</view>
+				<view class="tips">复制</view>
+			</view>
+		</view>
+		<view class="list">
+			<view v-for="(item, index) in info.list" class="li dfsb">
+				<view :class="[index == 0 ? '' : 'textgrey', 'time']">{{ item.time }}</view>
+				<view :class="[index == 0 ? '' : 'textgrey', 'add']">{{ item.add }}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			exp_id: '',
+			exp_no: '',
+			info: {
+				shop: {
+					goods_name: '商品名称',
+					vip_price: 100,
+					goods_img: '/static/img/pro/hotbgtj.png'
+				},
+				list: [
+					{
+						time: '12:10 07月20日',
+						add: '您的订单开始捡货'
+					},
+					{
+						time: '12:10',
+						add: '包裹交付顺丰速递公司'
+					},
+					{
+						time: '12:10',
+						add: '您的订单已到达【广东黄埔分拣中心】分拣完成'
+					},
+					{
+						time: '12:10',
+						add: '您的订单从【广东黄埔分拣中心】发往【厦门分拨中心】'
+					}
+				]
+			}
+		};
+	},
+
+	onLoad(options) {
+		this.exp_id = options.exp_id || '';
+		this.exp_no = options.exp_no || '';
+		this.loadData();
+	},
+	onShow() {},
+	methods: {
+		loadData() {
+			this.$api
+				.request('common/sel_exp', {
+					exp_no: this.exp_no || '',
+					exp_id: this.exp_id || ''
+				})
+				.then(data => {
+					if (data.code == 200) {
+						this.info = data.data;
+					} else {
+						this.$api.toast(data.msg);
+					}
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background-color: #fff;
+	padding: 20rpx 50rpx;
+}
+.shopshead {
+	height: 216rpx;
+	background: #ffffff;
+	box-shadow: 2rpx 2rpx 30rpx 0rpx rgba(236, 236, 236, 0.5);
+	image {
+		width: 216rpx;
+		height: 216rpx;
+		margin-right: 30rpx;
+	}
+
+	.shopsInfo {
+		padding: 25rpx 0;
+		flex: 1;
+		height: 100%;
+		align-items: flex-start;
+		justify-content: space-between;
+		.elli {
+			// height: 80rpx;
+			line-height: 40rpx;
+		}
+		.subtit {
+			margin: 8rpx 0 53rpx;
+		}
+		.tips {
+			padding: 2rpx 10rpx;
+			text-align: center;
+			border-radius: 19rpx;
+			border: 1px solid #333333;
+			font-size: 20rpx;
+		}
+	}
+}
+.list {
+	padding: 80rpx 0;
+	.li {
+		align-items: flex-start;
+		.time {
+			width: 141rpx;
+			padding: 0rpx 40rpx 45rpx 0;
+			border-right: 1rpx solid #333;
+			font-size: 24rpx;
+			position: relative;
+			&::before {
+				content: '';
+				position: absolute;
+				top: 0;
+				right: -7rpx;
+				width: 14rpx;
+				height: 14rpx;
+				border-radius: 50%;
+				background: #333333;
+			}
+		}
+		.add {
+			flex: 1;
+			margin-left: 55rpx;
+			font-size: 26rpx;
+		}
+		&:nth-last-of-type(1) {
+			.time {
+				border-right: 0 solid #333;
+			}
+		}
+	}
+}
+</style>

Some files were not shown because too many files changed in this diff