cmy 2 years ago
parent
commit
2ffbd41951

+ 18 - 1
api/new.js

@@ -9,11 +9,28 @@ export function setMoney(data) {
 	});
 	});
 }
 }
 
 
-// 用户
+// 用户
 export function setUserMoney(data) {
 export function setUserMoney(data) {
 	return request({
 	return request({
 		url: '/api/user/trade',
 		url: '/api/user/trade',
 		method: 'post',
 		method: 'post',
 		data
 		data
 	});
 	});
+}
+
+// 积分商品
+export function getIn(data) {
+	return request({
+		url: '/api/groom/list/6',
+		method: 'get',
+		data
+	});
+}
+// 买商品送积分
+export function getInGoods(data) {
+	return request({
+		url: '/api/groom/list/5',
+		method: 'get',
+		data
+	});
 }
 }

+ 0 - 57
components/Loading/index.vue

@@ -1,57 +0,0 @@
-<template>
-	<view>
-		<view class="Loads acea-row row-center-wrapper" v-if="loading && !loaded" style="margin-top: .2rem;">
-			<view v-if="loading">
-				<view class="iconfont icon-jiazai loading acea-row row-center-wrapper"></view>
-				正在加载中
-			</view>
-			<view v-else>
-				上拉加载更多
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		name: "Loading",
-		props: {
-			loaded: {
-				type: Boolean,
-				default: false
-			},
-			loading: {
-				type: Boolean,
-				default: false
-			}
-		}
-	};
-</script>
-<style>
-	.Loads {
-	  height: 80upx;
-	  font-size: 25upx;
-	  color: #000;
-	}
-	.Loads .iconfont {
-	  font-size: 30upx;
-	  margin-right: 10upx;
-	  height: 32upx;
-	  line-height: 32upx;
-	}
-	/*加载动画*/
-	@keyframes load {
-	  from {
-	    transform: rotate(0deg);
-	  }
-	  to {
-	    transform: rotate(360deg);
-	  }
-	}
-	.loadingpic {
-	  animation: load 3s linear 1s infinite;
-	}
-	.loading {
-	  animation: load linear 1s infinite;
-	}
-</style>

+ 0 - 120
components/countDown/index.vue

@@ -1,120 +0,0 @@
-<template>
-	<view class="time" :style="justifyLeft">
-		<text class="red" v-if="tipText">{{ tipText }}</text>
-		<text class="styleAll" v-if="isDay === true">{{ day }}</text>
-		<text class="timeTxt red" v-if="dayText">{{ dayText }}</text>
-		<text class="styleAll">{{ hour }}</text>
-		<text class="timeTxt red" v-if="hourText">{{ hourText }}</text>
-		<text class="styleAll">{{ minute }}</text>
-		<text class="timeTxt red" v-if="minuteText">{{ minuteText }}</text>
-		<text class="styleAll">{{ second }}</text>
-		<text class="timeTxt red" v-if="secondText">{{ secondText }}</text>
-	</view>
-</template>
-
-<script>
-	export default {
-		name: "countDown",
-		props: {
-			justifyLeft: {
-				type: String,
-				default: ""
-			},
-			//距离开始提示文字
-			tipText: {
-				type: String,
-				default: "倒计时"
-			},
-			dayText: {
-				type: String,
-				default: "天"
-			},
-			hourText: {
-				type: String,
-				default: "时"
-			},
-			minuteText: {
-				type: String,
-				default: "分"
-			},
-			secondText: {
-				type: String,
-				default: "秒"
-			},
-			datatime: {
-				type: Number,
-				default: 0
-			},
-			isDay: {
-				type: Boolean,
-				default: true
-			}
-		},
-		data: function() {
-			return {
-				day: "00",
-				hour: "00",
-				minute: "00",
-				second: "00"
-			};
-		},
-		created: function() {
-			this.show_time();
-		},
-		mounted: function() {},
-		methods: {
-			show_time: function() {
-				let that = this;
-
-				function runTime() {
-					//时间函数
-					let intDiff = that.datatime - Date.parse(new Date()) / 1000; //获取数据中的时间戳的时间差;
-					let day = 0,
-						hour = 0,
-						minute = 0,
-						second = 0;
-					if (intDiff > 0) {
-						//转换时间
-						if (that.isDay === true) {
-							day = Math.floor(intDiff / (60 * 60 * 24));
-						} else {
-							day = 0;
-						}
-						hour = Math.floor(intDiff / (60 * 60)) - day * 24;
-						minute = Math.floor(intDiff / 60) - day * 24 * 60 - hour * 60;
-						second =
-							Math.floor(intDiff) -
-							day * 24 * 60 * 60 -
-							hour * 60 * 60 -
-							minute * 60;
-						if (hour <= 9) hour = "0" + hour;
-						if (minute <= 9) minute = "0" + minute;
-						if (second <= 9) second = "0" + second;
-						that.day = day;
-						that.hour = hour;
-						that.minute = minute;
-						that.second = second;
-					} else {
-						that.day = "00";
-						that.hour = "00";
-						that.minute = "00";
-						that.second = "00";
-					}
-				}
-				runTime();
-				setInterval(runTime, 1000);
-			}
-		}
-	};
-</script>
-
-<style>
-	.time{
-		display: flex;
-		justify-content: center;
-	} 
-	.red{
-		color: #fc4141;
-		margin: 0 4rpx;
-	}
-</style>

+ 0 - 36
components/emptyPage.vue

@@ -1,36 +0,0 @@
-<template>
-	<view class="empty-box">
-		<image src="/static/images/empty-box.png"></image>
-		<view class="txt">{{title}}</view>
-	</view>
-</template>
-
-<script>
-	export default{
-		props: {
-			title: {
-				type: String,
-				default: '暂无记录',
-			},
-		},
-	}
-	
-</script>
-
-<style lang="scss">
-	.empty-box{
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-		margin-top: 200rpx;
-		image{
-			width: 414rpx;
-			height: 240rpx;
-		}
-		.txt{
-			font-size: 26rpx;
-			color: #999;
-		}
-	}
-</style>

+ 0 - 118
components/home/index.vue

@@ -1,118 +0,0 @@
-<template>
-	<view style="touch-action: none;">
-		<view class="home" style="position:fixed;" :style="{ top: top + 'px', bottom: bottom }" id="right-nav" @touchmove.stop.prevent="setTouchMove">
-			<view class="homeCon bg-color-red" :class="homeActive === true ? 'on' : ''" v-if="homeActive">
-				<navigator hover-class='none' url='/pages/index/index' open-type='switchTab' class='iconfont icon-shouye-xianxing'></navigator>
-				<navigator hover-class='none' url='/pages/order_addcart/order_addcart' open-type='switchTab' class='iconfont icon-caigou-xianxing'></navigator>
-				<navigator hover-class='none' url='/pages/user/index' open-type='switchTab' class='iconfont icon-yonghu1'></navigator>
-			</view>
-			<view @click="open" class="pictrueBox">
-				<view class="pictrue">
-					<image :src="
-              homeActive === true
-                ? '/static/images/close.gif'
-                : '/static/images/open.gif'
-            "
-					 class="image" />
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-<script>
-	import {
-		mapGetters
-	} from "vuex";
-	export default {
-		name: "Home",
-		props: {},
-		data: function() {
-			return {
-				top: "",
-				bottom: ""
-			};
-		},
-		computed: mapGetters(["homeActive"]),
-		methods: {
-			setTouchMove(e) {
-				var that = this;
-				if (e.touches[0].clientY < 545 && e.touches[0].clientY > 66) {
-					that.top = e.touches[0].clientY
-					// that.setData({
-					// 	top: e.touches[0].clientY
-					// })
-				}
-			},
-			open: function() {
-				this.homeActive ?
-					this.$store.commit("CLOSE_HOME") :
-					this.$store.commit("OPEN_HOME");
-			}
-		},
-		created() {
-			this.bottom = "50px";
-		}
-	};
-</script>
-
-<style scoped>
-	.pictrueBox {
-		width: 130rpx;
-		height: 120rpx;
-	}
-
-	/*返回主页按钮*/
-	.home {
-		position: fixed;
-		color: white;
-		text-align: center;
-		z-index: 9999;
-		right: 15rpx;
-		display: flex;
-	}
-
-	.home .homeCon {
-		border-radius: 50rpx;
-		opacity: 0;
-		height: 0;
-		color: #e93323;
-		width: 0;
-	}
-
-	.home .homeCon.on {
-		opacity: 1;
-		animation: bounceInRight 0.5s cubic-bezier(0.215, 0.610, 0.355, 1.000);
-		width: 300rpx;
-		height: 86rpx;
-		margin-bottom: 20rpx;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		background: #f44939 !important;
-	}
-
-	.home .homeCon .iconfont {
-		font-size: 48rpx;
-		color: #fff;
-		display: inline-block;
-		margin: 0 auto;
-	}
-
-	.home .pictrue {
-		width: 86rpx;
-		height: 86rpx;
-		border-radius: 50%;
-		margin: 0 auto;
-	}
-
-	.home .pictrue .image {
-		width: 100%;
-		height: 100%;
-		border-radius: 50%;
-		transform: rotate(90deg);
-		ms-transform: rotate(90deg);
-		moz-transform: rotate(90deg);
-		webkit-transform: rotate(90deg);
-		o-transform: rotate(90deg);
-	}
-</style>

+ 0 - 630
components/jyf-parser/jyf-parser.vue

@@ -1,630 +0,0 @@
-<template>
-	<view>
-		<slot v-if="!nodes.length" />
-		<!--#ifdef APP-PLUS-NVUE-->
-		<web-view id="_top" ref="web" :style="'margin-top:-2px;height:'+height+'px'" @onPostMessage="_message" />
-		<!--#endif-->
-		<!--#ifndef APP-PLUS-NVUE-->
-		<view id="_top" :style="showAm+(selectable?';user-select:text;-webkit-user-select:text':'')">
-			<!--#ifdef H5 || MP-360-->
-			<div :id="'rtf'+uid"></div>
-			<!--#endif-->
-			<!--#ifndef H5 || MP-360-->
-			<trees :nodes="nodes" :lazyLoad="lazyLoad" :loading="loadingImg" />
-			<!--#endif-->
-		</view>
-		<!--#endif-->
-	</view>
-</template>
-
-<script>
-	// #ifndef H5 || APP-PLUS-NVUE || MP-360
-	import trees from './libs/trees';
-	var cache = {},
-		// #ifdef MP-WEIXIN || MP-TOUTIAO
-		fs = uni.getFileSystemManager ? uni.getFileSystemManager() : null,
-		// #endif
-		Parser = require('./libs/MpHtmlParser.js');
-	var dom;
-	// 计算 cache 的 key
-	function hash(str) {
-		for (var i = str.length, val = 5381; i--;)
-			val += (val << 5) + str.charCodeAt(i);
-		return val;
-	}
-	// #endif
-	// #ifdef H5 || APP-PLUS-NVUE || MP-360
-	var windowWidth = uni.getSystemInfoSync().windowWidth,
-		cfg = require('./libs/config.js');
-	// #endif
-	// #ifdef APP-PLUS-NVUE
-	var weexDom = weex.requireModule('dom');
-	// #endif
-	/**
-	 * Parser 富文本组件
-	 * @tutorial https://github.com/jin-yufeng/Parser
-	 * @property {String} html 富文本数据
-	 * @property {Boolean} autopause 是否在播放一个视频时自动暂停其他视频
-	 * @property {Boolean} autoscroll 是否自动给所有表格添加一个滚动层
-	 * @property {Boolean} autosetTitle 是否自动将 title 标签中的内容设置到页面标题
-	 * @property {Number} compress 压缩等级
-	 * @property {String} domain 图片、视频等链接的主域名
-	 * @property {Boolean} lazyLoad 是否开启图片懒加载
-	 * @property {String} loadingImg 图片加载完成前的占位图
-	 * @property {Boolean} selectable 是否开启长按复制
-	 * @property {Object} tagStyle 标签的默认样式
-	 * @property {Boolean} showWithAnimation 是否使用渐显动画
-	 * @property {Boolean} useAnchor 是否使用锚点
-	 * @property {Boolean} useCache 是否缓存解析结果
-	 * @event {Function} parse 解析完成事件
-	 * @event {Function} load dom 加载完成事件
-	 * @event {Function} ready 所有图片加载完毕事件
-	 * @event {Function} error 错误事件
-	 * @event {Function} imgtap 图片点击事件
-	 * @event {Function} linkpress 链接点击事件
-	 * @author JinYufeng
-	 * @version 20200728
-	 * @listens MIT
-	 */
-	export default {
-		name: 'parser',
-		data() {
-			return {
-				// #ifdef H5 || MP-360
-				uid: this._uid,
-				// #endif
-				// #ifdef APP-PLUS-NVUE
-				height: 1,
-				// #endif
-				// #ifndef APP-PLUS-NVUE
-				showAm: '',
-				// #endif
-				nodes: []
-			}
-		},
-		// #ifndef H5 || APP-PLUS-NVUE || MP-360
-		components: {
-			trees
-		},
-		// #endif
-		props: {
-			html: String,
-			autopause: {
-				type: Boolean,
-				default: true
-			},
-			autoscroll: Boolean,
-			autosetTitle: {
-				type: Boolean,
-				default: true
-			},
-			// #ifndef H5 || APP-PLUS-NVUE || MP-360
-			compress: Number,
-			loadingImg: String,
-			useCache: Boolean,
-			// #endif
-			domain: String,
-			lazyLoad: Boolean,
-			selectable: Boolean,
-			tagStyle: Object,
-			showWithAnimation: Boolean,
-			useAnchor: Boolean
-		},
-		watch: {
-			html(html) {
-				this.setContent(html);
-			}
-		},
-		created() {
-			// 图片数组
-			this.imgList = [];
-			this.imgList.each = function(f) {
-				for (var i = 0, len = this.length; i < len; i++)
-					this.setItem(i, f(this[i], i, this));
-			}
-			this.imgList.setItem = function(i, src) {
-				if (i == void 0 || !src) return;
-				// #ifndef MP-ALIPAY || APP-PLUS
-				// 去重
-				if (src.indexOf('http') == 0 && this.includes(src)) {
-					var newSrc = src.split('://')[0];
-					for (var j = newSrc.length, c; c = src[j]; j++) {
-						if (c == '/' && src[j - 1] != '/' && src[j + 1] != '/') break;
-						newSrc += Math.random() > 0.5 ? c.toUpperCase() : c;
-					}
-					newSrc += src.substr(j);
-					return this[i] = newSrc;
-				}
-				// #endif
-				this[i] = src;
-				// 暂存 data src
-				if (src.includes('data:image')) {
-					var filePath, info = src.match(/data:image\/(\S+?);(\S+?),(.+)/);
-					if (!info) return;
-					// #ifdef MP-WEIXIN || MP-TOUTIAO
-					filePath = `${wx.env.USER_DATA_PATH}/${Date.now()}.${info[1]}`;
-					fs && fs.writeFile({
-						filePath,
-						data: info[3],
-						encoding: info[2],
-						success: () => this[i] = filePath
-					})
-					// #endif
-					// #ifdef APP-PLUS
-					filePath = `_doc/parser_tmp/${Date.now()}.${info[1]}`;
-					var bitmap = new plus.nativeObj.Bitmap();
-					bitmap.loadBase64Data(src, () => {
-						bitmap.save(filePath, {}, () => {
-							bitmap.clear()
-							this[i] = filePath;
-						})
-					})
-					// #endif
-				}
-			}
-		},
-		mounted() {
-			// #ifdef H5 || MP-360
-			this.document = document.getElementById('rtf' + this._uid);
-			// #endif
-			// #ifndef H5 || APP-PLUS-NVUE || MP-360
-			if (dom) this.document = new dom(this);
-			// #endif
-			// #ifdef APP-PLUS-NVUE
-			this.document = this.$refs.web;
-			setTimeout(() => {
-				// #endif
-				if (this.html) this.setContent(this.html);
-				// #ifdef APP-PLUS-NVUE
-			}, 30)
-			// #endif
-		},
-		beforeDestroy() {
-			// #ifdef H5 || MP-360
-			if (this._observer) this._observer.disconnect();
-			// #endif
-			this.imgList.each(src => {
-				// #ifdef APP-PLUS
-				if (src && src.includes('_doc')) {
-					plus.io.resolveLocalFileSystemURL(src, entry => {
-						entry.remove();
-					});
-				}
-				// #endif
-				// #ifdef MP-WEIXIN || MP-TOUTIAO
-				if (src && src.includes(uni.env.USER_DATA_PATH))
-					fs && fs.unlink({
-						filePath: src
-					})
-				// #endif
-			})
-			clearInterval(this._timer);
-		},
-		methods: {
-			// 设置富文本内容
-			setContent(html, append) {
-				// #ifdef APP-PLUS-NVUE
-				if (!html)
-					return this.height = 1;
-				if (append)
-					this.$refs.web.evalJs("var b=document.createElement('div');b.innerHTML='" + html.replace(/'/g, "\\'") +
-						"';document.getElementById('parser').appendChild(b)");
-				else {
-					html =
-						'<meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"><style>html,body{width:100%;height:100%;overflow:hidden}body{margin:0}</style><base href="' +
-						this.domain + '"><div id="parser"' + (this.selectable ? '>' : ' style="user-select:none">') + this._handleHtml(html).replace(/\n/g, '\\n') +
-						'</div><script>"use strict";function e(e){if(window.__dcloud_weex_postMessage||window.__dcloud_weex_){var t={data:[e]};window.__dcloud_weex_postMessage?window.__dcloud_weex_postMessage(t):window.__dcloud_weex_.postMessage(JSON.stringify(t))}}document.body.onclick=function(){e({action:"click"})},' +
-						(this.showWithAnimation ? 'document.body.style.animation="_show .5s",' : '') +
-						'setTimeout(function(){e({action:"load",text:document.body.innerText,height:document.getElementById("parser").scrollHeight})},50);\x3c/script>';
-					this.$refs.web.evalJs("document.write('" + html.replace(/'/g, "\\'") + "');document.close()");
-				}
-				this.$refs.web.evalJs(
-					'var t=document.getElementsByTagName("title");t.length&&e({action:"getTitle",title:t[0].innerText});for(var o,n=document.getElementsByTagName("style"),r=1;o=n[r++];)o.innerHTML=o.innerHTML.replace(/body/g,"#parser");for(var a,c=document.getElementsByTagName("img"),s=[],i=0==c.length,d=0,l=0,g=0;a=c[l];l++)parseInt(a.style.width||a.getAttribute("width"))>' +
-					windowWidth + '&&(a.style.height="auto"),a.onload=function(){++d==c.length&&(i=!0)},a.onerror=function(){++d==c.length&&(i=!0),' + (cfg.errorImg ? 'this.src="' + cfg.errorImg + '",' : '') +
-					'e({action:"error",source:"img",target:this})},a.hasAttribute("ignore")||"A"==a.parentElement.nodeName||(a.i=g++,s.push(a.src),a.onclick=function(){e({action:"preview",img:{i:this.i,src:this.src}})});e({action:"getImgList",imgList:s});for(var u,m=document.getElementsByTagName("a"),f=0;u=m[f];f++)u.onclick=function(){var t,o=this.getAttribute("href");if("#"==o[0]){var n=document.getElementById(o.substr(1));n&&(t=n.offsetTop)}return e({action:"linkpress",href:o,offset:t}),!1};for(var h,y=document.getElementsByTagName("video"),v=0;h=y[v];v++)h.style.maxWidth="100%",h.onerror=function(){e({action:"error",source:"video",target:this})}' +
-					(this.autopause ? ',h.onplay=function(){for(var e,t=0;e=y[t];t++)e!=this&&e.pause()}' : '') +
-					';for(var _,p=document.getElementsByTagName("audio"),w=0;_=p[w];w++)_.onerror=function(){e({action:"error",source:"audio",target:this})};' +
-					(this.autoscroll ? 'for(var T,E=document.getElementsByTagName("table"),B=0;T=E[B];B++){var N=document.createElement("div");N.style.overflow="scroll",T.parentNode.replaceChild(N,T),N.appendChild(T)}' : '') +
-					'var x=document.getElementById("parser");clearInterval(window.timer),window.timer=setInterval(function(){i&&clearInterval(window.timer),e({action:"ready",ready:i,height:x.scrollHeight})},350)'
-				)
-				this.nodes = [1];
-				// #endif
-				// #ifdef H5 || MP-360
-				if (!html) {
-					if (this.rtf && !append) this.rtf.parentNode.removeChild(this.rtf);
-					return;
-				}
-				var div = document.createElement('div');
-				if (!append) {
-					if (this.rtf) this.rtf.parentNode.removeChild(this.rtf);
-					this.rtf = div;
-				} else {
-					if (!this.rtf) this.rtf = div;
-					else this.rtf.appendChild(div);
-				}
-				div.innerHTML = this._handleHtml(html, append);
-				for (var styles = this.rtf.getElementsByTagName('style'), i = 0, style; style = styles[i++];) {
-					style.innerHTML = style.innerHTML.replace(/body/g, '#rtf' + this._uid);
-					style.setAttribute('scoped', 'true');
-				}
-				// 懒加载
-				if (!this._observer && this.lazyLoad && IntersectionObserver) {
-					this._observer = new IntersectionObserver(changes => {
-						for (let item, i = 0; item = changes[i++];) {
-							if (item.isIntersecting) {
-								item.target.src = item.target.getAttribute('data-src');
-								item.target.removeAttribute('data-src');
-								this._observer.unobserve(item.target);
-							}
-						}
-					}, {
-						rootMargin: '500px 0px 500px 0px'
-					})
-				}
-				var _ts = this;
-				// 获取标题
-				var title = this.rtf.getElementsByTagName('title');
-				if (title.length && this.autosetTitle)
-					uni.setNavigationBarTitle({
-						title: title[0].innerText
-					})
-				// 图片处理
-				this.imgList.length = 0;
-				var imgs = this.rtf.getElementsByTagName('img');
-				for (let i = 0, j = 0, img; img = imgs[i]; i++) {
-					if (parseInt(img.style.width || img.getAttribute('width')) > windowWidth)
-						img.style.height = 'auto';
-					var src = img.getAttribute('src');
-					if (this.domain && src) {
-						if (src[0] == '/') {
-							if (src[1] == '/')
-								img.src = (this.domain.includes('://') ? this.domain.split('://')[0] : '') + ':' + src;
-							else img.src = this.domain + src;
-						} else if (!src.includes('://')) img.src = this.domain + '/' + src;
-					}
-					if (!img.hasAttribute('ignore') && img.parentElement.nodeName != 'A') {
-						img.i = j++;
-						_ts.imgList.push(img.src || img.getAttribute('data-src'));
-						img.onclick = function() {
-							var preview = true;
-							this.ignore = () => preview = false;
-							_ts.$emit('imgtap', this);
-							if (preview) {
-								uni.previewImage({
-									current: this.i,
-									urls: _ts.imgList
-								});
-							}
-						}
-					}
-					img.onerror = function() {
-						if (cfg.errorImg)
-							_ts.imgList[this.i] = this.src = cfg.errorImg;
-						_ts.$emit('error', {
-							source: 'img',
-							target: this
-						});
-					}
-					if (_ts.lazyLoad && this._observer && img.src && img.i != 0) {
-						img.setAttribute('data-src', img.src);
-						img.removeAttribute('src');
-						this._observer.observe(img);
-					}
-				}
-				// 链接处理
-				var links = this.rtf.getElementsByTagName('a');
-				for (var link of links) {
-					link.onclick = function() {
-						var jump = true,
-							href = this.getAttribute('href');
-						_ts.$emit('linkpress', {
-							href,
-							ignore: () => jump = false
-						});
-						if (jump && href) {
-							if (href[0] == '#') {
-								if (_ts.useAnchor) {
-									_ts.navigateTo({
-										id: href.substr(1)
-									})
-								}
-							} else if (href.indexOf('http') == 0 || href.indexOf('//') == 0)
-								return true;
-							else
-								uni.navigateTo({
-									url: href
-								})
-						}
-						return false;
-					}
-				}
-				// 视频处理
-				var videos = this.rtf.getElementsByTagName('video');
-				_ts.videoContexts = videos;
-				for (let video, i = 0; video = videos[i++];) {
-					video.style.maxWidth = '100%';
-					video.onerror = function() {
-						_ts.$emit('error', {
-							source: 'video',
-							target: this
-						});
-					}
-					video.onplay = function() {
-						if (_ts.autopause)
-							for (let item, i = 0; item = _ts.videoContexts[i++];)
-								if (item != this) item.pause();
-					}
-				}
-				// 音频处理
-				var audios = this.rtf.getElementsByTagName('audio');
-				for (var audio of audios)
-					audio.onerror = function() {
-						_ts.$emit('error', {
-							source: 'audio',
-							target: this
-						});
-					}
-				// 表格处理
-				if (this.autoscroll) {
-					var tables = this.rtf.getElementsByTagName('table');
-					for (var table of tables) {
-						let div = document.createElement('div');
-						div.style.overflow = 'scroll';
-						table.parentNode.replaceChild(div, table);
-						div.appendChild(table);
-					}
-				}
-				if (!append) this.document.appendChild(this.rtf);
-				this.$nextTick(() => {
-					this.nodes = [1];
-					this.$emit('load');
-				});
-				setTimeout(() => this.showAm = '', 500);
-				// #endif
-				// #ifndef APP-PLUS-NVUE
-				// #ifndef H5 || MP-360
-				var nodes;
-				if (!html) return this.nodes = [];
-				var parser = new Parser(html, this);
-				// 缓存读取
-				if (this.useCache) {
-					var hashVal = hash(html);
-					if (cache[hashVal])
-						nodes = cache[hashVal];
-					else {
-						nodes = parser.parse();
-						cache[hashVal] = nodes;
-					}
-				} else nodes = parser.parse();
-				this.$emit('parse', nodes);
-				if (append) this.nodes = this.nodes.concat(nodes);
-				else this.nodes = nodes;
-				if (nodes.length && nodes.title && this.autosetTitle)
-					uni.setNavigationBarTitle({
-						title: nodes.title
-					})
-				if (this.imgList) this.imgList.length = 0;
-				this.videoContexts = [];
-				this.$nextTick(() => {
-					(function f(cs) {
-						for (var i = cs.length; i--;) {
-							if (cs[i].top) {
-								cs[i].controls = [];
-								cs[i].init();
-								f(cs[i].$children);
-							}
-						}
-					})(this.$children)
-					this.$emit('load');
-				})
-				// #endif
-				var height;
-				clearInterval(this._timer);
-				this._timer = setInterval(() => {
-					// #ifdef H5 || MP-360
-					this.rect = this.rtf.getBoundingClientRect();
-					// #endif
-					// #ifndef H5 || MP-360
-					uni.createSelectorQuery().in(this)
-						.select('#_top').boundingClientRect().exec(res => {
-							if (!res) return;
-							this.rect = res[0];
-							// #endif
-							if (this.rect.height == height) {
-								this.$emit('ready', this.rect)
-								clearInterval(this._timer);
-							}
-							height = this.rect.height;
-							// #ifndef H5 || MP-360
-						});
-					// #endif
-				}, 350);
-				if (this.showWithAnimation && !append) this.showAm = 'animation:_show .5s';
-				// #endif
-			},
-			// 获取文本内容
-			getText(ns = this.nodes) {
-				var txt = '';
-				// #ifdef APP-PLUS-NVUE
-				txt = this._text;
-				// #endif
-				// #ifdef H5 || MP-360
-				txt = this.rtf.innerText;
-				// #endif
-				// #ifndef H5 || APP-PLUS-NVUE || MP-360
-				for (var i = 0, n; n = ns[i++];) {
-					if (n.type == 'text') txt += n.text.replace(/&nbsp;/g, '\u00A0').replace(/&lt;/g, '<').replace(/&gt;/g, '>')
-						.replace(/&amp;/g, '&');
-					else if (n.type == 'br') txt += '\n';
-					else {
-						// 块级标签前后加换行
-						var block = n.name == 'p' || n.name == 'div' || n.name == 'tr' || n.name == 'li' || (n.name[0] == 'h' && n.name[1] >
-							'0' && n.name[1] < '7');
-						if (block && txt && txt[txt.length - 1] != '\n') txt += '\n';
-						if (n.children) txt += this.getText(n.children);
-						if (block && txt[txt.length - 1] != '\n') txt += '\n';
-						else if (n.name == 'td' || n.name == 'th') txt += '\t';
-					}
-				}
-				// #endif
-				return txt;
-			},
-			// 锚点跳转
-			in (obj) {
-				if (obj.page && obj.selector && obj.scrollTop) this._in = obj;
-			},
-			navigateTo(obj) {
-				if (!this.useAnchor) return obj.fail && obj.fail('Anchor is disabled');
-				// #ifdef APP-PLUS-NVUE
-				if (!obj.id)
-					weexDom.scrollToElement(this.$refs.web);
-				else
-					this.$refs.web.evalJs('var pos=document.getElementById("' + obj.id +
-						'");if(pos)post({action:"linkpress",href:"#",offset:pos.offsetTop+' + (obj.offset || 0) + '})');
-				obj.success && obj.success();
-				// #endif
-				// #ifndef APP-PLUS-NVUE
-				var d = ' ';
-				// #ifdef MP-WEIXIN || MP-QQ || MP-TOUTIAO
-				d = '>>>';
-				// #endif
-				var selector = uni.createSelectorQuery().in(this._in ? this._in.page : this).select((this._in ? this._in.selector :
-					'#_top') + (obj.id ? `${d}#${obj.id},${this._in?this._in.selector:'#_top'}${d}.${obj.id}` : '')).boundingClientRect();
-				if (this._in) selector.select(this._in.selector).scrollOffset().select(this._in.selector).boundingClientRect();
-				else selector.selectViewport().scrollOffset();
-				selector.exec(res => {
-					if (!res[0]) return obj.fail && obj.fail('Label not found')
-					var scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + (obj.offset || 0);
-					if (this._in) this._in.page[this._in.scrollTop] = scrollTop;
-					else uni.pageScrollTo({
-						scrollTop,
-						duration: 300
-					})
-					obj.success && obj.success();
-				})
-				// #endif
-			},
-			// 获取视频对象
-			getVideoContext(id) {
-				// #ifndef APP-PLUS-NVUE
-				if (!id) return this.videoContexts;
-				else
-					for (var i = this.videoContexts.length; i--;)
-						if (this.videoContexts[i].id == id) return this.videoContexts[i];
-				// #endif
-			},
-			// #ifdef H5 || APP-PLUS-NVUE || MP-360
-			_handleHtml(html, append) {
-				if (!append) {
-					// 处理 tag-style 和 userAgentStyles
-					var style = '<style>@keyframes _show{0%{opacity:0}100%{opacity:1}}img{max-width:100%}';
-					for (var item in cfg.userAgentStyles)
-						style += `${item}{${cfg.userAgentStyles[item]}}`;
-					for (item in this.tagStyle)
-						style += `${item}{${this.tagStyle[item]}}`;
-					style += '</style>';
-					html = style + html;
-				}
-				// 处理 rpx
-				if (html.includes('rpx'))
-					html = html.replace(/[0-9.]+\s*rpx/g, $ => (parseFloat($) * windowWidth / 750) + 'px');
-				return html;
-			},
-			// #endif
-			// #ifdef APP-PLUS-NVUE
-			_message(e) {
-				// 接收 web-view 消息
-				var d = e.detail.data[0];
-				switch (d.action) {
-					case 'load':
-						this.$emit('load');
-						this.height = d.height;
-						this._text = d.text;
-						break;
-					case 'getTitle':
-						if (this.autosetTitle)
-							uni.setNavigationBarTitle({
-								title: d.title
-							})
-						break;
-					case 'getImgList':
-						this.imgList.length = 0;
-						for (var i = d.imgList.length; i--;)
-							this.imgList.setItem(i, d.imgList[i]);
-						break;
-					case 'preview':
-						var preview = true;
-						d.img.ignore = () => preview = false;
-						this.$emit('imgtap', d.img);
-						if (preview)
-							uni.previewImage({
-								current: d.img.i,
-								urls: this.imgList
-							})
-						break;
-					case 'linkpress':
-						var jump = true,
-							href = d.href;
-						this.$emit('linkpress', {
-							href,
-							ignore: () => jump = false
-						})
-						if (jump && href) {
-							if (href[0] == '#') {
-								if (this.useAnchor)
-									weexDom.scrollToElement(this.$refs.web, {
-										offset: d.offset
-									})
-							} else if (href.includes('://'))
-								plus.runtime.openWeb(href);
-							else
-								uni.navigateTo({
-									url: href
-								})
-						}
-						break;
-					case 'error':
-						if (d.source == 'img' && cfg.errorImg)
-							this.imgList.setItem(d.target.i, cfg.errorImg);
-						this.$emit('error', {
-							source: d.source,
-							target: d.target
-						})
-						break;
-					case 'ready':
-						this.height = d.height;
-						if (d.ready) uni.createSelectorQuery().in(this).select('#_top').boundingClientRect().exec(res => {
-							this.rect = res[0];
-							this.$emit('ready', res[0]);
-						})
-						break;
-					case 'click':
-						this.$emit('click');
-						this.$emit('tap');
-				}
-			},
-			// #endif
-		}
-	}
-</script>
-
-<style>
-	@keyframes _show {
-		0% {
-			opacity: 0;
-		}
-
-		100% {
-			opacity: 1;
-		}
-	}
-
-	/* #ifdef MP-WEIXIN */
-	:host {
-		display: block;
-		overflow: scroll;
-		-webkit-overflow-scrolling: touch;
-	}
-
-	/* #endif */
-</style>

+ 0 - 97
components/jyf-parser/libs/CssHandler.js

@@ -1,97 +0,0 @@
-const cfg = require('./config.js'),
-	isLetter = c => (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
-
-function CssHandler(tagStyle) {
-	var styles = Object.assign(Object.create(null), cfg.userAgentStyles);
-	for (var item in tagStyle)
-		styles[item] = (styles[item] ? styles[item] + ';' : '') + tagStyle[item];
-	this.styles = styles;
-}
-CssHandler.prototype.getStyle = function(data) {
-	this.styles = new parser(data, this.styles).parse();
-}
-CssHandler.prototype.match = function(name, attrs) {
-	var tmp, matched = (tmp = this.styles[name]) ? tmp + ';' : '';
-	if (attrs.class) {
-		var items = attrs.class.split(' ');
-		for (var i = 0, item; item = items[i]; i++)
-			if (tmp = this.styles['.' + item])
-				matched += tmp + ';';
-	}
-	if (tmp = this.styles['#' + attrs.id])
-		matched += tmp + ';';
-	return matched;
-}
-module.exports = CssHandler;
-
-function parser(data, init) {
-	this.data = data;
-	this.floor = 0;
-	this.i = 0;
-	this.list = [];
-	this.res = init;
-	this.state = this.Space;
-}
-parser.prototype.parse = function() {
-	for (var c; c = this.data[this.i]; this.i++)
-		this.state(c);
-	return this.res;
-}
-parser.prototype.section = function() {
-	return this.data.substring(this.start, this.i);
-}
-// 状态机
-parser.prototype.Space = function(c) {
-	if (c == '.' || c == '#' || isLetter(c)) {
-		this.start = this.i;
-		this.state = this.Name;
-	} else if (c == '/' && this.data[this.i + 1] == '*')
-		this.Comment();
-	else if (!cfg.blankChar[c] && c != ';')
-		this.state = this.Ignore;
-}
-parser.prototype.Comment = function() {
-	this.i = this.data.indexOf('*/', this.i) + 1;
-	if (!this.i) this.i = this.data.length;
-	this.state = this.Space;
-}
-parser.prototype.Ignore = function(c) {
-	if (c == '{') this.floor++;
-	else if (c == '}' && !--this.floor) this.state = this.Space;
-}
-parser.prototype.Name = function(c) {
-	if (cfg.blankChar[c]) {
-		this.list.push(this.section());
-		this.state = this.NameSpace;
-	} else if (c == '{') {
-		this.list.push(this.section());
-		this.Content();
-	} else if (c == ',') {
-		this.list.push(this.section());
-		this.Comma();
-	} else if (!isLetter(c) && (c < '0' || c > '9') && c != '-' && c != '_')
-		this.state = this.Ignore;
-}
-parser.prototype.NameSpace = function(c) {
-	if (c == '{') this.Content();
-	else if (c == ',') this.Comma();
-	else if (!cfg.blankChar[c]) this.state = this.Ignore;
-}
-parser.prototype.Comma = function() {
-	while (cfg.blankChar[this.data[++this.i]]);
-	if (this.data[this.i] == '{') this.Content();
-	else {
-		this.start = this.i--;
-		this.state = this.Name;
-	}
-}
-parser.prototype.Content = function() {
-	this.start = ++this.i;
-	if ((this.i = this.data.indexOf('}', this.i)) == -1) this.i = this.data.length;
-	var content = this.section();
-	for (var i = 0, item; item = this.list[i++];)
-		if (this.res[item]) this.res[item] += ';' + content;
-		else this.res[item] = content;
-	this.list = [];
-	this.state = this.Space;
-}

+ 0 - 535
components/jyf-parser/libs/MpHtmlParser.js

@@ -1,535 +0,0 @@
-/**
- * html 解析器
- * @tutorial https://github.com/jin-yufeng/Parser
- * @version 20200728
- * @author JinYufeng
- * @listens MIT
- */
-const cfg = require('./config.js'),
-	blankChar = cfg.blankChar,
-	CssHandler = require('./CssHandler.js'),
-	windowWidth = uni.getSystemInfoSync().windowWidth;
-var emoji;
-
-function MpHtmlParser(data, options = {}) {
-	this.attrs = {};
-	this.CssHandler = new CssHandler(options.tagStyle, windowWidth);
-	this.data = data;
-	this.domain = options.domain;
-	this.DOM = [];
-	this.i = this.start = this.audioNum = this.imgNum = this.videoNum = 0;
-	options.prot = (this.domain || '').includes('://') ? this.domain.split('://')[0] : 'http';
-	this.options = options;
-	this.state = this.Text;
-	this.STACK = [];
-	// 工具函数
-	this.bubble = () => {
-		for (var i = this.STACK.length, item; item = this.STACK[--i];) {
-			if (cfg.richOnlyTags[item.name]) {
-				if (item.name == 'table' && !Object.hasOwnProperty.call(item, 'c')) item.c = 1;
-				return false;
-			}
-			item.c = 1;
-		}
-		return true;
-	}
-	this.decode = (val, amp) => {
-		var i = -1,
-			j, en;
-		while (1) {
-			if ((i = val.indexOf('&', i + 1)) == -1) break;
-			if ((j = val.indexOf(';', i + 2)) == -1) break;
-			if (val[i + 1] == '#') {
-				en = parseInt((val[i + 2] == 'x' ? '0' : '') + val.substring(i + 2, j));
-				if (!isNaN(en)) val = val.substr(0, i) + String.fromCharCode(en) + val.substr(j + 1);
-			} else {
-				en = val.substring(i + 1, j);
-				if (cfg.entities[en] || en == amp)
-					val = val.substr(0, i) + (cfg.entities[en] || '&') + val.substr(j + 1);
-			}
-		}
-		return val;
-	}
-	this.getUrl = url => {
-		if (url[0] == '/') {
-			if (url[1] == '/') url = this.options.prot + ':' + url;
-			else if (this.domain) url = this.domain + url;
-		} else if (this.domain && url.indexOf('data:') != 0 && !url.includes('://'))
-			url = this.domain + '/' + url;
-		return url;
-	}
-	this.isClose = () => this.data[this.i] == '>' || (this.data[this.i] == '/' && this.data[this.i + 1] == '>');
-	this.section = () => this.data.substring(this.start, this.i);
-	this.parent = () => this.STACK[this.STACK.length - 1];
-	this.siblings = () => this.STACK.length ? this.parent().children : this.DOM;
-}
-MpHtmlParser.prototype.parse = function() {
-	if (emoji) this.data = emoji.parseEmoji(this.data);
-	for (var c; c = this.data[this.i]; this.i++)
-		this.state(c);
-	if (this.state == this.Text) this.setText();
-	while (this.STACK.length) this.popNode(this.STACK.pop());
-	return this.DOM;
-}
-// 设置属性
-MpHtmlParser.prototype.setAttr = function() {
-	var name = this.attrName.toLowerCase(),
-		val = this.attrVal;
-	if (cfg.boolAttrs[name]) this.attrs[name] = 'T';
-	else if (val) {
-		if (name == 'src' || (name == 'data-src' && !this.attrs.src)) this.attrs.src = this.getUrl(this.decode(val, 'amp'));
-		else if (name == 'href' || name == 'style') this.attrs[name] = this.decode(val, 'amp');
-		else if (name.substr(0, 5) != 'data-') this.attrs[name] = val;
-	}
-	this.attrVal = '';
-	while (blankChar[this.data[this.i]]) this.i++;
-	if (this.isClose()) this.setNode();
-	else {
-		this.start = this.i;
-		this.state = this.AttrName;
-	}
-}
-// 设置文本节点
-MpHtmlParser.prototype.setText = function() {
-	var back, text = this.section();
-	if (!text) return;
-	text = (cfg.onText && cfg.onText(text, () => back = true)) || text;
-	if (back) {
-		this.data = this.data.substr(0, this.start) + text + this.data.substr(this.i);
-		let j = this.start + text.length;
-		for (this.i = this.start; this.i < j; this.i++) this.state(this.data[this.i]);
-		return;
-	}
-	if (!this.pre) {
-		// 合并空白符
-		var flag, tmp = [];
-		for (let i = text.length, c; c = text[--i];)
-			if (!blankChar[c]) {
-				tmp.unshift(c);
-				if (!flag) flag = 1;
-			} else {
-				if (tmp[0] != ' ') tmp.unshift(' ');
-				if (c == '\n' && flag == void 0) flag = 0;
-			}
-		if (flag == 0) return;
-		text = tmp.join('');
-	}
-	this.siblings().push({
-		type: 'text',
-		text: this.decode(text)
-	});
-}
-// 设置元素节点
-MpHtmlParser.prototype.setNode = function() {
-	var node = {
-			name: this.tagName.toLowerCase(),
-			attrs: this.attrs
-		},
-		close = cfg.selfClosingTags[node.name];
-	if (this.options.nodes.length) node.type = 'node';
-	this.attrs = {};
-	if (!cfg.ignoreTags[node.name]) {
-		// 处理属性
-		var attrs = node.attrs,
-			style = this.CssHandler.match(node.name, attrs, node) + (attrs.style || ''),
-			styleObj = {};
-		if (attrs.id) {
-			if (this.options.compress & 1) attrs.id = void 0;
-			else if (this.options.useAnchor) this.bubble();
-		}
-		if ((this.options.compress & 2) && attrs.class) attrs.class = void 0;
-		switch (node.name) {
-			case 'a':
-			case 'ad': // #ifdef APP-PLUS
-			case 'iframe':
-				// #endif
-				this.bubble();
-				break;
-			case 'font':
-				if (attrs.color) {
-					styleObj['color'] = attrs.color;
-					attrs.color = void 0;
-				}
-				if (attrs.face) {
-					styleObj['font-family'] = attrs.face;
-					attrs.face = void 0;
-				}
-				if (attrs.size) {
-					var size = parseInt(attrs.size);
-					if (size < 1) size = 1;
-					else if (size > 7) size = 7;
-					var map = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
-					styleObj['font-size'] = map[size - 1];
-					attrs.size = void 0;
-				}
-				break;
-			case 'embed':
-				// #ifndef APP-PLUS
-				var src = node.attrs.src || '',
-					type = node.attrs.type || '';
-				if (type.includes('video') || src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8'))
-					node.name = 'video';
-				else if (type.includes('audio') || src.includes('.m4a') || src.includes('.wav') || src.includes('.mp3') || src.includes(
-						'.aac'))
-					node.name = 'audio';
-				else break;
-				if (node.attrs.autostart)
-					node.attrs.autoplay = 'T';
-				node.attrs.controls = 'T';
-				// #endif
-				// #ifdef APP-PLUS
-				this.bubble();
-				break;
-				// #endif
-			case 'video':
-			case 'audio':
-				if (!attrs.id) attrs.id = node.name + (++this[`${node.name}Num`]);
-				else this[`${node.name}Num`]++;
-				if (node.name == 'video') {
-					if (this.videoNum > 3)
-						node.lazyLoad = 1;
-					if (attrs.width) {
-						styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px');
-						attrs.width = void 0;
-					}
-					if (attrs.height) {
-						styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px');
-						attrs.height = void 0;
-					}
-				}
-				if (!attrs.controls && !attrs.autoplay) attrs.controls = 'T';
-				attrs.source = [];
-				if (attrs.src) {
-					attrs.source.push(attrs.src);
-					attrs.src = void 0;
-				}
-				this.bubble();
-				break;
-			case 'td':
-			case 'th':
-				if (attrs.colspan || attrs.rowspan)
-					for (var k = this.STACK.length, item; item = this.STACK[--k];)
-						if (item.name == 'table') {
-							item.c = void 0;
-							break;
-						}
-		}
-		if (attrs.align) {
-			styleObj['text-align'] = attrs.align;
-			attrs.align = void 0;
-		}
-		// 压缩 style
-		var styles = style.split(';');
-		style = '';
-		for (var i = 0, len = styles.length; i < len; i++) {
-			var info = styles[i].split(':');
-			if (info.length < 2) continue;
-			let key = info[0].trim().toLowerCase(),
-				value = info.slice(1).join(':').trim();
-			if (value[0] == '-' || value.includes('safe'))
-				style += `;${key}:${value}`;
-			else if (!styleObj[key] || value.includes('import') || !styleObj[key].includes('import'))
-				styleObj[key] = value;
-		}
-		if (node.name == 'img') {
-			if (attrs.src && !attrs.ignore) {
-				if (this.bubble())
-					attrs.i = (this.imgNum++).toString();
-				else attrs.ignore = 'T';
-			}
-			if (attrs.ignore) {
-				style += ';-webkit-touch-callout:none';
-				styleObj['max-width'] = '100%';
-			}
-			var width;
-			if (styleObj.width) width = styleObj.width;
-			else if (attrs.width) width = attrs.width.includes('%') ? attrs.width : attrs.width + 'px';
-			if (width) {
-				styleObj.width = width;
-				attrs.width = '100%';
-				if (parseInt(width) > windowWidth) {
-					styleObj.height = '';
-					if (attrs.height) attrs.height = void 0;
-				}
-			}
-			if (styleObj.height) {
-				attrs.height = styleObj.height;
-				styleObj.height = '';
-			} else if (attrs.height && !attrs.height.includes('%'))
-				attrs.height += 'px';
-		}
-		for (var key in styleObj) {
-			var value = styleObj[key];
-			if (!value) continue;
-			if (key.includes('flex') || key == 'order' || key == 'self-align') node.c = 1;
-			// 填充链接
-			if (value.includes('url')) {
-				var j = value.indexOf('(');
-				if (j++ != -1) {
-					while (value[j] == '"' || value[j] == "'" || blankChar[value[j]]) j++;
-					value = value.substr(0, j) + this.getUrl(value.substr(j));
-				}
-			}
-			// 转换 rpx
-			else if (value.includes('rpx'))
-				value = value.replace(/[0-9.]+\s*rpx/g, $ => parseFloat($) * windowWidth / 750 + 'px');
-			else if (key == 'white-space' && value.includes('pre') && !close)
-				this.pre = node.pre = true;
-			style += `;${key}:${value}`;
-		}
-		style = style.substr(1);
-		if (style) attrs.style = style;
-		if (!close) {
-			node.children = [];
-			if (node.name == 'pre' && cfg.highlight) {
-				this.remove(node);
-				this.pre = node.pre = true;
-			}
-			this.siblings().push(node);
-			this.STACK.push(node);
-		} else if (!cfg.filter || cfg.filter(node, this) != false)
-			this.siblings().push(node);
-	} else {
-		if (!close) this.remove(node);
-		else if (node.name == 'source') {
-			var parent = this.parent();
-			if (parent && (parent.name == 'video' || parent.name == 'audio') && node.attrs.src)
-				parent.attrs.source.push(node.attrs.src);
-		} else if (node.name == 'base' && !this.domain) this.domain = node.attrs.href;
-	}
-	if (this.data[this.i] == '/') this.i++;
-	this.start = this.i + 1;
-	this.state = this.Text;
-}
-// 移除标签
-MpHtmlParser.prototype.remove = function(node) {
-	var name = node.name,
-		j = this.i;
-	// 处理 svg
-	var handleSvg = () => {
-		var src = this.data.substring(j, this.i + 1);
-		if (!node.attrs.xmlns) src = ' xmlns="http://www.w3.org/2000/svg"' + src;
-		var i = j;
-		while (this.data[j] != '<') j--;
-		src = this.data.substring(j, i).replace("viewbox", "viewBox") + src;
-		var parent = this.parent();
-		if (node.attrs.width == '100%' && parent && (parent.attrs.style || '').includes('inline'))
-			parent.attrs.style = 'width:300px;max-width:100%;' + parent.attrs.style;
-		this.siblings().push({
-			name: 'img',
-			attrs: {
-				src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'),
-				style: (/vertical[^;]+/.exec(node.attrs.style) || []).shift(),
-				ignore: 'T'
-			}
-		})
-	}
-	if (node.name == 'svg' && this.data[j] == '/') return handleSvg(this.i++);
-	while (1) {
-		if ((this.i = this.data.indexOf('</', this.i + 1)) == -1) {
-			if (name == 'pre' || name == 'svg') this.i = j;
-			else this.i = this.data.length;
-			return;
-		}
-		this.start = (this.i += 2);
-		while (!blankChar[this.data[this.i]] && !this.isClose()) this.i++;
-		if (this.section().toLowerCase() == name) {
-			// 代码块高亮
-			if (name == 'pre') {
-				this.data = this.data.substr(0, j + 1) + cfg.highlight(this.data.substring(j + 1, this.i - 5), node.attrs) + this.data
-					.substr(this.i - 5);
-				return this.i = j;
-			} else if (name == 'style')
-				this.CssHandler.getStyle(this.data.substring(j + 1, this.i - 7));
-			else if (name == 'title')
-				this.DOM.title = this.data.substring(j + 1, this.i - 7);
-			if ((this.i = this.data.indexOf('>', this.i)) == -1) this.i = this.data.length;
-			if (name == 'svg') handleSvg();
-			return;
-		}
-	}
-}
-// 节点出栈处理
-MpHtmlParser.prototype.popNode = function(node) {
-	// 空白符处理
-	if (node.pre) {
-		node.pre = this.pre = void 0;
-		for (let i = this.STACK.length; i--;)
-			if (this.STACK[i].pre)
-				this.pre = true;
-	}
-	var siblings = this.siblings(),
-		len = siblings.length,
-		childs = node.children;
-	if (node.name == 'head' || (cfg.filter && cfg.filter(node, this) == false))
-		return siblings.pop();
-	var attrs = node.attrs;
-	// 替换一些标签名
-	if (cfg.blockTags[node.name]) node.name = 'div';
-	else if (!cfg.trustTags[node.name]) node.name = 'span';
-	// 处理列表
-	if (node.c && (node.name == 'ul' || node.name == 'ol')) {
-		if ((node.attrs.style || '').includes('list-style:none')) {
-			for (let i = 0, child; child = childs[i++];)
-				if (child.name == 'li')
-					child.name = 'div';
-		} else if (node.name == 'ul') {
-			var floor = 1;
-			for (let i = this.STACK.length; i--;)
-				if (this.STACK[i].name == 'ul') floor++;
-			if (floor != 1)
-				for (let i = childs.length; i--;)
-					childs[i].floor = floor;
-		} else {
-			for (let i = 0, num = 1, child; child = childs[i++];)
-				if (child.name == 'li') {
-					child.type = 'ol';
-					child.num = ((num, type) => {
-						if (type == 'a') return String.fromCharCode(97 + (num - 1) % 26);
-						if (type == 'A') return String.fromCharCode(65 + (num - 1) % 26);
-						if (type == 'i' || type == 'I') {
-							num = (num - 1) % 99 + 1;
-							var one = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'],
-								ten = ['X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'],
-								res = (ten[Math.floor(num / 10) - 1] || '') + (one[num % 10 - 1] || '');
-							if (type == 'i') return res.toLowerCase();
-							return res;
-						}
-						return num;
-					})(num++, attrs.type) + '.';
-				}
-		}
-	}
-	// 处理表格的边框
-	if (node.name == 'table') {
-		var padding = attrs.cellpadding,
-			spacing = attrs.cellspacing,
-			border = attrs.border;
-		if (node.c) {
-			this.bubble();
-			attrs.style = (attrs.style || '') + ';display:table';
-			if (!padding) padding = 2;
-			if (!spacing) spacing = 2;
-		}
-		if (border) attrs.style = `border:${border}px solid gray;${attrs.style || ''}`;
-		if (spacing) attrs.style = `border-spacing:${spacing}px;${attrs.style || ''}`;
-		if (border || padding || node.c)
-			(function f(ns) {
-				for (var i = 0, n; n = ns[i]; i++) {
-					if (n.type == 'text') continue;
-					var style = n.attrs.style || '';
-					if (node.c && n.name[0] == 't') {
-						n.c = 1;
-						style += ';display:table-' + (n.name == 'th' || n.name == 'td' ? 'cell' : (n.name == 'tr' ? 'row' : 'row-group'));
-					}
-					if (n.name == 'th' || n.name == 'td') {
-						if (border) style = `border:${border}px solid gray;${style}`;
-						if (padding) style = `padding:${padding}px;${style}`;
-					} else f(n.children || []);
-					if (style) n.attrs.style = style;
-				}
-			})(childs)
-		if (this.options.autoscroll) {
-			var table = Object.assign({}, node);
-			node.name = 'div';
-			node.attrs = {
-				style: 'overflow:scroll'
-			}
-			node.children = [table];
-		}
-	}
-	this.CssHandler.pop && this.CssHandler.pop(node);
-	// 自动压缩
-	if (node.name == 'div' && !Object.keys(attrs).length && childs.length == 1 && childs[0].name == 'div')
-		siblings[len - 1] = childs[0];
-}
-// 状态机
-MpHtmlParser.prototype.Text = function(c) {
-	if (c == '<') {
-		var next = this.data[this.i + 1],
-			isLetter = c => (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
-		if (isLetter(next)) {
-			this.setText();
-			this.start = this.i + 1;
-			this.state = this.TagName;
-		} else if (next == '/') {
-			this.setText();
-			if (isLetter(this.data[++this.i + 1])) {
-				this.start = this.i + 1;
-				this.state = this.EndTag;
-			} else this.Comment();
-		} else if (next == '!' || next == '?') {
-			this.setText();
-			this.Comment();
-		}
-	}
-}
-MpHtmlParser.prototype.Comment = function() {
-	var key;
-	if (this.data.substring(this.i + 2, this.i + 4) == '--') key = '-->';
-	else if (this.data.substring(this.i + 2, this.i + 9) == '[CDATA[') key = ']]>';
-	else key = '>';
-	if ((this.i = this.data.indexOf(key, this.i + 2)) == -1) this.i = this.data.length;
-	else this.i += key.length - 1;
-	this.start = this.i + 1;
-	this.state = this.Text;
-}
-MpHtmlParser.prototype.TagName = function(c) {
-	if (blankChar[c]) {
-		this.tagName = this.section();
-		while (blankChar[this.data[this.i]]) this.i++;
-		if (this.isClose()) this.setNode();
-		else {
-			this.start = this.i;
-			this.state = this.AttrName;
-		}
-	} else if (this.isClose()) {
-		this.tagName = this.section();
-		this.setNode();
-	}
-}
-MpHtmlParser.prototype.AttrName = function(c) {
-	if (c == '=' || blankChar[c] || this.isClose()) {
-		this.attrName = this.section();
-		if (blankChar[c])
-			while (blankChar[this.data[++this.i]]);
-		if (this.data[this.i] == '=') {
-			while (blankChar[this.data[++this.i]]);
-			this.start = this.i--;
-			this.state = this.AttrValue;
-		} else this.setAttr();
-	}
-}
-MpHtmlParser.prototype.AttrValue = function(c) {
-	if (c == '"' || c == "'") {
-		this.start++;
-		if ((this.i = this.data.indexOf(c, this.i + 1)) == -1) return this.i = this.data.length;
-		this.attrVal = this.section();
-		this.i++;
-	} else {
-		for (; !blankChar[this.data[this.i]] && !this.isClose(); this.i++);
-		this.attrVal = this.section();
-	}
-	this.setAttr();
-}
-MpHtmlParser.prototype.EndTag = function(c) {
-	if (blankChar[c] || c == '>' || c == '/') {
-		var name = this.section().toLowerCase();
-		for (var i = this.STACK.length; i--;)
-			if (this.STACK[i].name == name) break;
-		if (i != -1) {
-			var node;
-			while ((node = this.STACK.pop()).name != name) this.popNode(node);
-			this.popNode(node);
-		} else if (name == 'p' || name == 'br')
-			this.siblings().push({
-				name,
-				attrs: {}
-			});
-		this.i = this.data.indexOf('>', this.i);
-		this.start = this.i + 1;
-		if (this.i == -1) this.i = this.data.length;
-		else this.state = this.Text;
-	}
-}
-module.exports = MpHtmlParser;

+ 0 - 80
components/jyf-parser/libs/config.js

@@ -1,80 +0,0 @@
-/* 配置文件 */
-var cfg = {
-	// 出错占位图
-	errorImg: null,
-	// 过滤器函数
-	filter: null,
-	// 代码高亮函数
-	highlight: null,
-	// 文本处理函数
-	onText: null,
-	// 实体编码列表
-	entities: {
-		quot: '"',
-		apos: "'",
-		semi: ';',
-		nbsp: '\xA0',
-		ensp: '\u2002',
-		emsp: '\u2003',
-		ndash: '–',
-		mdash: '—',
-		middot: '·',
-		lsquo: '‘',
-		rsquo: '’',
-		ldquo: '“',
-		rdquo: '”',
-		bull: '•',
-		hellip: '…'
-	},
-	blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'),
-	boolAttrs: makeMap('allowfullscreen,autoplay,autostart,controls,ignore,loop,muted'),
-	// 块级标签,将被转为 div
-	blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section'),
-	// 将被移除的标签
-	ignoreTags: makeMap('area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr'),
-	// 只能被 rich-text 显示的标签
-	richOnlyTags: makeMap('a,colgroup,fieldset,legend,table'),
-	// 自闭合的标签
-	selfClosingTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'),
-	// 信任的标签
-	trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video'),
-	// 默认的标签样式
-	userAgentStyles: {
-		address: 'font-style:italic',
-		big: 'display:inline;font-size:1.2em',
-		blockquote: 'background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px',
-		caption: 'display:table-caption;text-align:center',
-		center: 'text-align:center',
-		cite: 'font-style:italic',
-		dd: 'margin-left:40px',
-		mark: 'background-color:yellow',
-		pre: 'font-family:monospace;white-space:pre;overflow:scroll',
-		s: 'text-decoration:line-through',
-		small: 'display:inline;font-size:0.8em',
-		u: 'text-decoration:underline'
-	}
-}
-
-function makeMap(str) {
-	var map = Object.create(null),
-		list = str.split(',');
-	for (var i = list.length; i--;)
-		map[list[i]] = true;
-	return map;
-}
-
-// #ifdef MP-WEIXIN
-if (wx.canIUse('editor')) {
-	cfg.blockTags.pre = void 0;
-	cfg.ignoreTags.rp = true;
-	Object.assign(cfg.richOnlyTags, makeMap('bdi,bdo,caption,rt,ruby'));
-	Object.assign(cfg.trustTags, makeMap('bdi,bdo,caption,pre,rt,ruby'));
-}
-// #endif
-
-// #ifdef APP-PLUS
-cfg.ignoreTags.iframe = void 0;
-Object.assign(cfg.trustTags, makeMap('embed,iframe'));
-// #endif
-
-module.exports = cfg;

+ 0 - 22
components/jyf-parser/libs/handler.wxs

@@ -1,22 +0,0 @@
-var inline = {
-	abbr: 1,
-	b: 1,
-	big: 1,
-	code: 1,
-	del: 1,
-	em: 1,
-	i: 1,
-	ins: 1,
-	label: 1,
-	q: 1,
-	small: 1,
-	span: 1,
-	strong: 1,
-	sub: 1,
-	sup: 1
-}
-module.exports = {
-	use: function(item) {
-		return !item.c && !inline[item.name] && (item.attrs.style || '').indexOf('display:inline') == -1
-	}
-}

+ 0 - 501
components/jyf-parser/libs/trees.vue

@@ -1,501 +0,0 @@
-<template>
-	<view :class="'interlayer '+(c||'')" :style="s">
-		<block v-for="(n, i) in nodes" v-bind:key="i">
-			<!--图片-->
-			<view v-if="n.name=='img'" :class="'_img '+n.attrs.class" :style="n.attrs.style" :data-attrs="n.attrs" @tap="imgtap">
-				<rich-text v-if="ctrl[i]!=0" :nodes="[{attrs:{src:loading&&(ctrl[i]||0)<2?loading:(lazyLoad&&!ctrl[i]?placeholder:(ctrl[i]==3?errorImg:n.attrs.src||'')),alt:n.attrs.alt||'',width:n.attrs.width||'',style:'-webkit-touch-callout:none;max-width:100%;display:block'+(n.attrs.height?';height:'+n.attrs.height:'')},name:'img'}]" />
-				<image class="_image" :src="lazyLoad&&!ctrl[i]?placeholder:n.attrs.src" :lazy-load="lazyLoad"
-				 :show-menu-by-longpress="!n.attrs.ignore" :data-i="i" :data-index="n.attrs.i" data-source="img" @load="loadImg"
-				 @error="error" />
-			</view>
-			<!--文本-->
-			<text v-else-if="n.type=='text'" decode>{{n.text}}</text>
-			<!--#ifndef MP-BAIDU-->
-			<text v-else-if="n.name=='br'">\n</text>
-			<!--#endif-->
-			<!--视频-->
-			<view v-else-if="((n.lazyLoad&&!n.attrs.autoplay)||(n.name=='video'&&!loadVideo))&&ctrl[i]==undefined" :id="n.attrs.id" :class="'_video '+(n.attrs.class||'')"
-			 :style="n.attrs.style" :data-i="i" @tap="_loadVideo" />
-			<video v-else-if="n.name=='video'" :id="n.attrs.id" :class="n.attrs.class" :style="n.attrs.style" :autoplay="n.attrs.autoplay||ctrl[i]==0"
-			 :controls="n.attrs.controls" :loop="n.attrs.loop" :muted="n.attrs.muted" :poster="n.attrs.poster" :src="n.attrs.source[ctrl[i]||0]"
-			 :unit-id="n.attrs['unit-id']" :data-id="n.attrs.id" :data-i="i" data-source="video" @error="error" @play="play" />
-			<!--音频-->
-			<audio v-else-if="n.name=='audio'" :ref="n.attrs.id" :class="n.attrs.class" :style="n.attrs.style" :author="n.attrs.author"
-			 :autoplay="n.attrs.autoplay" :controls="n.attrs.controls" :loop="n.attrs.loop" :name="n.attrs.name" :poster="n.attrs.poster"
-			 :src="n.attrs.source[ctrl[i]||0]" :data-i="i" :data-id="n.attrs.id" data-source="audio"
-			 @error.native="error" @play.native="play" />
-			<!--链接-->
-			<view v-else-if="n.name=='a'" :id="n.attrs.id" :class="'_a '+(n.attrs.class||'')" hover-class="_hover" :style="n.attrs.style"
-			 :data-attrs="n.attrs" @tap="linkpress">
-				<trees class="_span" c="_span" :nodes="n.children" />
-			</view>
-			<!--广告-->
-			<!--<ad v-else-if="n.name=='ad'" :class="n.attrs.class" :style="n.attrs.style" :unit-id="n.attrs['unit-id']" :appid="n.attrs.appid" :apid="n.attrs.apid" :type="n.attrs.type" :adpid="n.attrs.adpid" data-source="ad" @error="error" />-->
-			<!--列表-->
-			<view v-else-if="n.name=='li'" :id="n.attrs.id" :class="n.attrs.class" :style="(n.attrs.style||'')+';display:flex;flex-direction:row'">
-				<view v-if="n.type=='ol'" class="_ol-bef">{{n.num}}</view>
-				<view v-else class="_ul-bef">
-					<view v-if="n.floor%3==0" class="_ul-p1">█</view>
-					<view v-else-if="n.floor%3==2" class="_ul-p2" />
-					<view v-else class="_ul-p1" style="border-radius:50%">█</view>
-				</view>
-				<trees class="_li" c="_li" :nodes="n.children" :lazyLoad="lazyLoad" :loading="loading" />
-			</view>
-			<!--表格-->
-			<view v-else-if="n.name=='table'&&n.c" :id="n.attrs.id" :class="n.attrs.class" :style="(n.attrs.style||'')+';display:table'">
-				<view v-for="(tbody, o) in n.children" v-bind:key="o" :class="tbody.attrs.class" :style="(tbody.attrs.style||'')+(tbody.name[0]=='t'?';display:table-'+(tbody.name=='tr'?'row':'row-group'):'')">
-					<view v-for="(tr, p) in tbody.children" v-bind:key="p" :class="tr.attrs.class" :style="(tr.attrs.style||'')+(tr.name[0]=='t'?';display:table-'+(tr.name=='tr'?'row':'cell'):'')">
-						<trees v-if="tr.name=='td'" :nodes="tr.children" />
-						<trees v-else v-for="(td, q) in tr.children" v-bind:key="q" :class="td.attrs.class" :c="td.attrs.class" :style="(td.attrs.style||'')+(td.name[0]=='t'?';display:table-'+(td.name=='tr'?'row':'cell'):'')"
-						 :s="(td.attrs.style||'')+(td.name[0]=='t'?';display:table-'+(td.name=='tr'?'row':'cell'):'')" :nodes="td.children" />
-					</view>
-				</view>
-			</view>
-			<!--#ifdef APP-PLUS-->
-			<iframe v-else-if="n.name=='iframe'" :style="n.attrs.style" :allowfullscreen="n.attrs.allowfullscreen" :frameborder="n.attrs.frameborder"
-			 :width="n.attrs.width" :height="n.attrs.height" :src="n.attrs.src" />
-			<embed v-else-if="n.name=='embed'" :style="n.attrs.style" :width="n.attrs.width" :height="n.attrs.height" :src="n.attrs.src" />
-			<!--#endif-->
-			<!--富文本-->
-			<!--#ifdef MP-WEIXIN || MP-QQ || APP-PLUS-->
-			<rich-text v-else-if="handler.use(n)" :id="n.attrs.id" :class="'_p __'+n.name" :nodes="[n]" />
-			<!--#endif-->
-			<!--#ifndef MP-WEIXIN || MP-QQ || APP-PLUS-->
-			<rich-text v-else-if="!n.c" :id="n.attrs.id" :nodes="[n]" style="display:inline" />
-			<!--#endif-->
-			<trees v-else :class="(n.attrs.id||'')+' _'+n.name+' '+(n.attrs.class||'')" :c="(n.attrs.id||'')+' _'+n.name+' '+(n.attrs.class||'')"
-			 :style="n.attrs.style" :s="n.attrs.style" :nodes="n.children" :lazyLoad="lazyLoad" :loading="loading" />
-		</block>
-	</view>
-</template>
-<script module="handler" lang="wxs" src="./handler.wxs"></script>
-<script>
-	global.Parser = {};
-	import trees from './trees'
-	const errorImg = require('../libs/config.js').errorImg;
-	export default {
-		components: {
-			trees
-		},
-		name: 'trees',
-		data() {
-			return {
-				ctrl: [],
-				placeholder: 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="225"/>',
-				errorImg,
-				loadVideo: typeof plus == 'undefined',
-				// #ifndef MP-ALIPAY
-				c: '',
-				s: ''
-				// #endif
-			}
-		},
-		props: {
-			nodes: Array,
-			lazyLoad: Boolean,
-			loading: String,
-			// #ifdef MP-ALIPAY
-			c: String,
-			s: String
-			// #endif
-		},
-		mounted() {
-			for (this.top = this.$parent; this.top.$options.name != 'parser'; this.top = this.top.$parent);
-			this.init();
-		},
-		// #ifdef APP-PLUS
-		beforeDestroy() {
-			this.observer && this.observer.disconnect();
-		},
-		// #endif
-		methods: {
-			init() {
-				for (var i = this.nodes.length, n; n = this.nodes[--i];) {
-					if (n.name == 'img') {
-						this.top.imgList.setItem(n.attrs.i, n.attrs.src);
-						// #ifdef APP-PLUS
-						if (this.lazyLoad && !this.observer) {
-							this.observer = uni.createIntersectionObserver(this).relativeToViewport({
-								top: 500,
-								bottom: 500
-							});
-							setTimeout(() => {
-								this.observer.observe('._img', res => {
-									if (res.intersectionRatio) {
-										for (var j = this.nodes.length; j--;)
-											if (this.nodes[j].name == 'img')
-												this.$set(this.ctrl, j, 1);
-										this.observer.disconnect();
-									}
-								})
-							}, 0)
-						}
-						// #endif
-					} else if (n.name == 'video' || n.name == 'audio') {
-						var ctx;
-						if (n.name == 'video') {
-							ctx = uni.createVideoContext(n.attrs.id
-								// #ifndef MP-BAIDU
-								, this
-								// #endif
-							);
-						} else if (this.$refs[n.attrs.id])
-							ctx = this.$refs[n.attrs.id][0];
-						if (ctx) {
-							ctx.id = n.attrs.id;
-							this.top.videoContexts.push(ctx);
-						}
-					}
-				}
-				// #ifdef APP-PLUS
-				// APP 上避免 video 错位需要延时渲染
-				setTimeout(() => {
-					this.loadVideo = true;
-				}, 1000)
-				// #endif
-			},
-			play(e) {
-				var contexts = this.top.videoContexts;
-				if (contexts.length > 1 && this.top.autopause)
-					for (var i = contexts.length; i--;)
-						if (contexts[i].id != e.currentTarget.dataset.id)
-							contexts[i].pause();
-			},
-			imgtap(e) {
-				var attrs = e.currentTarget.dataset.attrs;
-				if (!attrs.ignore) {
-					var preview = true,
-						data = {
-							id: e.target.id,
-							src: attrs.src,
-							ignore: () => preview = false
-						};
-					global.Parser.onImgtap && global.Parser.onImgtap(data);
-					this.top.$emit('imgtap', data);
-					if (preview) {
-						var urls = this.top.imgList,
-							current = urls[attrs.i] ? parseInt(attrs.i) : (urls = [attrs.src], 0);
-						uni.previewImage({
-							current,
-							urls
-						})
-					}
-				}
-			},
-			loadImg(e) {
-				var i = e.currentTarget.dataset.i;
-				if (this.lazyLoad && !this.ctrl[i]) {
-					// #ifdef QUICKAPP-WEBVIEW
-					this.$set(this.ctrl, i, 0);
-					this.$nextTick(function() {
-						// #endif
-						// #ifndef APP-PLUS
-						this.$set(this.ctrl, i, 1);
-						// #endif
-						// #ifdef QUICKAPP-WEBVIEW
-					})
-					// #endif
-				} else if (this.loading && this.ctrl[i] != 2) {
-					// #ifdef QUICKAPP-WEBVIEW
-					this.$set(this.ctrl, i, 0);
-					this.$nextTick(function() {
-						// #endif
-						this.$set(this.ctrl, i, 2);
-						// #ifdef QUICKAPP-WEBVIEW
-					})
-					// #endif
-				}
-			},
-			linkpress(e) {
-				var jump = true,
-					attrs = e.currentTarget.dataset.attrs;
-				attrs.ignore = () => jump = false;
-				global.Parser.onLinkpress && global.Parser.onLinkpress(attrs);
-				this.top.$emit('linkpress', attrs);
-				if (jump) {
-					// #ifdef MP
-					if (attrs['app-id']) {
-						return uni.navigateToMiniProgram({
-							appId: attrs['app-id'],
-							path: attrs.path
-						})
-					}
-					// #endif
-					if (attrs.href) {
-						if (attrs.href[0] == '#') {
-							if (this.top.useAnchor)
-								this.top.navigateTo({
-									id: attrs.href.substring(1)
-								})
-						} else if (attrs.href.indexOf('http') == 0 || attrs.href.indexOf('//') == 0) {
-							// #ifdef APP-PLUS
-							plus.runtime.openWeb(attrs.href);
-							// #endif
-							// #ifndef APP-PLUS
-							uni.setClipboardData({
-								data: attrs.href,
-								success: () =>
-									uni.showToast({
-										title: '链接已复制'
-									})
-							})
-							// #endif
-						} else
-							uni.navigateTo({
-								url: attrs.href,
-								fail() {
-									uni.switchTab({
-										url: attrs.href,
-									})
-								}
-							})
-					}
-				}
-			},
-			error(e) {
-				var target = e.currentTarget,
-					source = target.dataset.source,
-					i = target.dataset.i;
-				if (source == 'video' || source == 'audio') {
-					// 加载其他 source
-					var index = this.ctrl[i] ? this.ctrl[i].i + 1 : 1;
-					if (index < this.nodes[i].attrs.source.length)
-						this.$set(this.ctrl, i, index);
-					if (e.detail.__args__)
-						e.detail = e.detail.__args__[0];
-				} else if (errorImg && source == 'img') {
-					this.top.imgList.setItem(target.dataset.index, errorImg);
-					this.$set(this.ctrl, i, 3);
-				}
-				this.top && this.top.$emit('error', {
-					source,
-					target,
-					errMsg: e.detail.errMsg
-				});
-			},
-			_loadVideo(e) {
-				this.$set(this.ctrl, e.target.dataset.i, 0);
-			}
-		}
-	}
-</script>
-
-<style>
-	/* 在这里引入自定义样式 */
-
-	/* 链接和图片效果 */
-	._a {
-		display: inline;
-		padding: 1.5px 0 1.5px 0;
-		color: #366092;
-		word-break: break-all;
-	}
-
-	._hover {
-		text-decoration: underline;
-		opacity: 0.7;
-	}
-
-	._img {
-		display: inline-block;
-		max-width: 100%;
-		overflow: hidden;
-	}
-
-	/* #ifdef MP-WEIXIN */
-	:host {
-		display: inline;
-	}
-
-	/* #endif */
-
-	/* #ifndef MP-ALIPAY || APP-PLUS */
-	.interlayer {
-		display: inherit;
-		flex-direction: inherit;
-		flex-wrap: inherit;
-		align-content: inherit;
-		align-items: inherit;
-		justify-content: inherit;
-		width: 100%;
-		white-space: inherit;
-	}
-
-	/* #endif */
-
-	._b,
-	._strong {
-		font-weight: bold;
-	}
-
-	/* #ifndef MP-ALIPAY */
-	._blockquote,
-	._div,
-	._p,
-	._ol,
-	._ul,
-	._li {
-		display: block;
-	}
-	
-	/* #endif */
-
-	._code {
-		font-family: monospace;
-	}
-
-	._del {
-		text-decoration: line-through;
-	}
-
-	._em,
-	._i {
-		font-style: italic;
-	}
-
-	._h1 {
-		font-size: 2em;
-	}
-
-	._h2 {
-		font-size: 1.5em;
-	}
-
-	._h3 {
-		font-size: 1.17em;
-	}
-
-	._h5 {
-		font-size: 0.83em;
-	}
-
-	._h6 {
-		font-size: 0.67em;
-	}
-
-	._h1,
-	._h2,
-	._h3,
-	._h4,
-	._h5,
-	._h6 {
-		display: block;
-		font-weight: bold;
-	}
-
-	._image {
-		display: block;
-		width: 100%;
-		height: 360px;
-		margin-top: -360px;
-		opacity: 0;
-	}
-
-	._ins {
-		text-decoration: underline;
-	}
-
-	._li {
-		flex: 1;
-		width: 0;
-	}
-
-	._ol-bef {
-		width: 36px;
-		margin-right: 5px;
-		text-align: right;
-	}
-
-	._ul-bef {
-		display: block;
-		margin: 0 12px 0 23px;
-		line-height: normal;
-	}
-
-	._ol-bef,
-	._ul-bef {
-		flex: none;
-		user-select: none;
-	}
-
-	._ul-p1 {
-		display: inline-block;
-		width: 0.3em;
-		height: 0.3em;
-		overflow: hidden;
-		line-height: 0.3em;
-	}
-
-	._ul-p2 {
-		display: inline-block;
-		width: 0.23em;
-		height: 0.23em;
-		border: 0.05em solid black;
-		border-radius: 50%;
-	}
-
-	._q::before {
-		content: '"';
-	}
-
-	._q::after {
-		content: '"';
-	}
-
-	._sub {
-		font-size: smaller;
-		vertical-align: sub;
-	}
-
-	._sup {
-		font-size: smaller;
-		vertical-align: super;
-	}
-
-	/* #ifdef MP-ALIPAY || APP-PLUS || QUICKAPP-WEBVIEW */
-	._abbr,
-	._b,
-	._code,
-	._del,
-	._em,
-	._i,
-	._ins,
-	._label,
-	._q,
-	._span,
-	._strong,
-	._sub,
-	._sup {
-		display: inline;
-	}
-
-	/* #endif */
-
-	/* #ifdef MP-WEIXIN || MP-QQ */
-	.__bdo,
-	.__bdi,
-	.__ruby,
-	.__rt {
-		display: inline-block;
-	}
-
-	/* #endif */
-	._video {
-		position: relative;
-		display: inline-block;
-		width: 300px;
-		height: 225px;
-		background-color: black;
-	}
-
-	._video::after {
-		position: absolute;
-		top: 50%;
-		left: 50%;
-		margin: -15px 0 0 -15px;
-		content: '';
-		border-color: transparent transparent transparent white;
-		border-style: solid;
-		border-width: 15px 0 15px 30px;
-	}
-</style>

+ 0 - 421
components/newlist/nowList.vue

@@ -1,421 +0,0 @@
-<template>
-	<view class="other">
-		<view class="other-1">大家还在拼</view>
-		
-		<view class="preferred_item" v-for="item in recommendedlist" @click.stop="ToKaiTuan(item)">
-			<view class="flex_item" style="overflow: hidden;">
-				<view class="tlist-img">
-					<view class="leftImgIcon">AA团</view>
-					<!-- <view class="leftImgIcon" v-if="sid == 129">达人团</view> -->
-					<view class="img"><image :src="item.image" mode="scaleToFill"></image></view>
-				</view>
-				<view class="tlist-img " v-for="imgItem in item.images">
-					<view class="img"><image :src="imgItem" mode="scaleToFill"></image></view>
-				</view>
-			</view>
-			<view class="goods_name">
-				<view class="goods_title flex_item">
-					<view class="text">{{ item.min_people }}人团</view>
-					<view class="title">{{ item.title }}</view>
-				</view>
-				<view class="goods-height">
-					<!-- <view class="goods_num clamp">{{ item.info }}</view> -->
-					<view class="flex goods-peplo">
-						<view class="goods-tip flex_item">
-							<view class="peplo">库存剩{{ item.percent | parseIntTo }}%</view>
-							<view class="make">{{ item.mark }}</view>
-						</view>
-						<view class="right flex_item">
-							<image src="/static/icon/hot.png" mode="aspectFill"></image>
-							<text>已拼{{ item.sales }}份</text>
-						</view>
-					</view>
-				</view>
-				<view class="price flex">
-					<view class="price_list">
-						<view class="price-red">
-							<text>单人仅付:</text>
-							<text class="moneyIcon">¥</text>
-							<text class="money">{{ item.price }}</text>
-							<text class="moneyType">/{{ item.unit_name }}</text>
-							<!-- <text class="outMoney">¥{{ item.product_price }}</text> -->
-						</view>
-					</view>
-					<view class="img position-relative" @click.stop="ToKaiTuan(item)">去开团</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-export default {
-	props: {
-		recommendedlist: {
-			type: Array,
-			default: function() {
-				return {
-				};
-			}
-		}
-	},
-	data() {
-		return {};
-	},
-	filters: {
-		parseIntTo(percent) {
-			percent = +percent * 100;
-			if (percent % 1 === 0) {
-				return percent;
-			} else {
-				percent = percent.toFixed(1);
-				return percent;
-			}
-		}
-	},
-	methods: {
-		// 去开团
-		ToKaiTuan(item) {
-			console.log(8754847)
-			let id = item.id;
-			uni.navigateTo({
-				url: '/pages/product/productGroup?id=' + id
-			});
-		},
-	}
-};
-</script>
-
-<style lang="scss">
-.other{
-		.other-1{
-			font-size:27rpx;
-			color:#333333;
-			line-height: 55rpx;
-		}
-		
-		.preferred_item {
-			width: 100%;
-			height: 100%;
-			padding: 25rpx 25rpx;
-			position: relative;
-			background-color: #FFFFFF;
-			border-radius: 15rpx;
-			margin-bottom: 15rpx;
-			.tlist-img {
-				width: 225rpx;
-				position: relative;
-				margin-right: 15rpx;
-				.leftImgIcon {
-					position: absolute;
-					top: 0;
-					left: 0;
-					font-size: 22rpx;
-					font-family: PingFangSC;
-					color: rgba(148, 71, 34, 1);
-					background: rgba(254, 242, 111, 1);
-					z-index: 99;
-					border-radius: 5rpx;
-					padding: 5rpx 10rpx;
-				}
-				.img {
-					width: 210rpx;
-					height: 210rpx;
-					image {
-						width: 100%;
-						height: 100%;
-						border-radius: 20rpx;
-					}
-				}
-				.stock {
-					margin-top: 13rpx;
-					font-size: 26rpx;
-					background: #fff1ee;
-					width: 100%;
-					color: #fb4912;
-					padding: 6rpx 0;
-					border-radius: 5rpx;
-					justify-content: center;
-					align-items: center;
-					position: absolute;
-					left: 0;
-					bottom: 0;
-					.img {
-						width: 20rpx;
-						height: 20rpx;
-						flex-shrink: 0;
-					}
-					.stock-num {
-						padding-left: 7rpx;
-						font-size: 22rpx;
-						border-radius: 5rpx;
-						height: 32rpx;
-						line-height: 32rpx;
-					}
-				}
-			}
-			.goods_name {
-				.goods_title {
-					padding-top: 15rpx;
-					color:rgba(0,0,0,1);
-					// white-space: nowrap;
-					// overflow: hidden;
-					// text-overflow: ellipsis;
-					font-size:32rpx;
-					color: $font-color-dark;
-					// height: 70rpx;
-					align-items: baseline;
-					.text{
-						border-radius: 8rpx;
-						border: 2rpx solid #FF1A27;
-						color: #FF1A27;
-						padding:0rpx 10rpx;
-						font-size: 26rpx !important;
-						margin-right: 15rpx;
-						
-					}
-					.title {
-						width: 80%;
-						overflow : hidden;
-						text-overflow: ellipsis;
-						display: -webkit-box;
-						-webkit-line-clamp: 2;
-						-webkit-box-orient: vertical;
-					}
-				}
-				.goods-height {
-					min-height: 60rpx;
-				}
-				.goods_num {
-					font-size: 26rpx;
-					color: #8f8f97;
-					padding-bottom: 15rpx;
-				}
-				.goods-peplo {
-					height: 45rpx;
-					margin-top: 15rpx;
-					.right {
-						color:#8e8e8e;
-						font-size: 24rpx;
-						width:195rpx;
-						image {
-							width: 30rpx;
-							height: 33rpx;
-							margin-right: 15rpx;
-						}
-					}
-					.goods-tip {
-						.peplo {
-							background:linear-gradient(14deg,rgba(255,116,37,1),rgba(255,30,41,1));
-							padding: 5rpx 10rpx;
-							color: #ffffff;
-							border-top-left-radius:8rpx;
-							border-bottom-left-radius: 8rpx;
-						}
-						.make {
-							background-color: #fef26f;
-							color: #944722;
-							border-top-right-radius: 8rpx;
-							border-bottom-right-radius: 8rpx;
-						}
-						.make,
-						.peplo {
-							font-size: $font-sm;
-							padding: 5rpx 10rpx;
-						}
-					}
-				}
-				.price {
-					font-size: 28rpx;
-					position: relative;
-					padding-top: 15rpx;
-					.price_list {
-						.price-red {
-							font-size: 30rpx !important;
-							font-family: Source Han Sans CN;
-							color: rgba(253, 27, 42, 1);
-							font-size: $font-base;
-							font-weight: bold;
-							.moneyIcon {
-								font-weight: normal !important; 
-							}
-							.money {
-								font-size: 58rpx;
-							}
-							.moneyType {
-								font-weight: 400;
-							}
-							.outMoney {
-								font-weight: 400;
-								text-decoration: line-through;
-								color: rgba(142, 142, 142, 1);
-							}
-						}
-						.price-green {
-							color: #2dbd59;
-							font-size: 26rpx !important;
-							font-weight: bold;
-							text {
-								background: linear-gradient(45deg, rgba(21, 197, 52, 1), rgba(21, 197, 52, 1));
-								color: #ffffff;
-								padding: 0rpx 10rpx;
-								border-radius: 7rpx;
-								font-size: 24rpx !important;
-								margin-left: 15rpx;
-							}
-						}
-					}
-					.img {
-						width: 265rpx;
-						height: 74rpx;
-						line-height: 74rpx;
-						// background:linear-gradient(14deg,rgba(255,116,37,1),rgba(255,30,41,1));
-						background: linear-gradient(270deg, rgba(181,116,242, 1) 0%, rgba(139,86,254, 1) 100%);
-						border-radius: 99rpx;
-						color: #ffffff;
-						font-size: $font-lg;
-						text-align: center;
-					}
-					.img1{
-						background-color: #D3D3D3;
-						width: 265rpx;
-						height: 74rpx;
-						line-height: 74rpx;
-						border-radius: 99rpx;
-						color: #ffffff;
-						font-size: $font-lg;
-						text-align: center;
-					}
-					.tomorrow {
-						background: #29a66e;
-						color: #ffffff;
-						border-radius: 25rpx;
-						padding: 10rpx 25rpx;
-					}
-				}
-			}
-		}
-		
-		
-		.other-2{
-			width: 100%;
-			background:#ffffff;
-			padding: 10rpx 15rpx ;
-			border-radius: 20rpx;
-			.content-row{
-				padding: 10rpx 0;
-				.row-1{
-					width: 210rpx;
-					position: relative;
-					margin-right: 20rpx;
-					text-align: center;
-					.row-1-1{
-						text-align: center;
-						height:40rpx;
-						background:#fff1ee;
-						border-radius:6rpx;
-						font-size:22rpx;
-						font-weight:500;
-						color:#fb4912;
-						line-height:40rpx;
-						image{
-							width: 23rpx;
-							height: 23rpx;
-							margin-right: 5rpx;
-						}
-					}
-					.img1{
-						width:170rpx;
-						height:170rpx;
-						border-radius:10rpx;
-					}
-					.img2{
-						position: absolute;
-						top: 0;
-						left: 16rpx;
-						width:80rpx;
-						height:32rpx;
-						border-radius:5px;
-					}
-				}
-				.row-2{
-					padding: 20rpx 0 20rpx 0;
-					width:calc(100% - 210rpx);
-					position: relative;
-					
-					border-bottom: 1px solid #EAEAEA;
-					.word-1{
-						font-size:32rpx;
-						font-weight:bold;
-						color:#141821;
-						margin-left: 10rpx;
-						overflow: hidden;
-						text-overflow: ellipsis;
-						white-space: nowrap;
-					}
-					.word-2{
-						margin-top: 10rpx;
-						font-size:24rpx;
-						color:#979797;
-					}
-					.word-3{
-						margin-top: 10rpx;
-						position: relative;
-						font-size:20rpx;
-						color:#ffffff;
-						image{
-							width: 235rpx;
-							height: 50rpx;
-						}
-						.word-3-1{
-							position: absolute;
-							top:8px;
-							left:2px;
-							width: 230rpx;
-							text-align: center;
-							.word-3-1-1{
-								display: inline-block;
-								color:#FD1B2A;
-								width: 50%;
-							}
-							
-						}
-					}
-					.word-4{
-						margin-top: 15rpx;
-						font-size:23rpx;
-						color:#fd1b2a;
-						margin-left: 10rpx;
-						text{
-							font-size:23rpx;
-							font-weight:bold;
-						}
-						.word-4-1{
-							font-size:36rpx;
-						}
-					}
-					.word-5{
-						margin-top: 15rpx;
-						font-size:21rpx;
-						color:#868686;
-					}
-					.button{
-						width:145rpx;
-						height:60rpx;
-						background:linear-gradient(14deg,#ff7425,#ff1e29);
-						border-radius:30rpx;
-						font-size:27rpx;
-						font-weight:bold;
-						color:#ffffff;
-						line-height:60rpx;
-						text-align: center;
-						
-						position: absolute;
-						bottom: 20rpx;
-						right: 0;
-					}
-				}
-			}
-		}
-	}
-</style>

+ 0 - 68
components/returnButton.vue

@@ -1,68 +0,0 @@
-<template>
-	<view class="content">
-		<view class="retun-Box" @click="navTo('/pages/order/order?state=0')">
-			<image class="return-img" src=".././static/tabBar/dingdan.png"></image>
-			<view class="return-text">订单</view>
-		</view>
-		<view class="retun-Box" @click="GoHome">
-			<image class="return-img" src=".././static/tabBar/home.png" ></image>
-			<view class="return-text">首页</view>
-		</view>
-	</view>
-</template>
-
-<script>
-export default {
-	props: {
-		
-	},
-	data() {
-		return {
-			
-		}
-	},
-	methods: {
-		navTo(url) {
-			uni.navigateTo({
-				url: url
-			})
-		},
-		GoHome() {
-			// uni.navigateTo({
-			// 	url: '/pages/groupBooking/index'
-			// })
-			uni.switchTab({
-				url: '/pages/index/index'
-			})
-		}
-	}
-}
-</script>
-
-<style lang="scss">
-.content {
-	position: fixed;
-	right: 0;
-	bottom: 330rpx;
-	.retun-Box {
-		border-radius: 50%;
-		background: #FFFFFF;
-		width: 100rpx;
-		height: 100rpx;
-		margin-top: 30rpx;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-		box-shadow: 0 6rpx 20rpx #888888;
-		.return-img {
-			width: 40rpx;
-			height: 40rpx;
-		}
-		.return-text {
-			font-size: $font-sm;
-			margin-top: 8rpx;
-		}
-	}
-}
-</style>

+ 0 - 246
components/seckill/seckill.vue

@@ -1,246 +0,0 @@
-<template>
-	<view class="seckill-section m-t" v-if="show">
-		<view class="s-header">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">限时秒杀</text></view>
-			<view class="tip-box">
-				<text class="tip" v-if="status == 1">{{ showTime }}点场结束</text>
-				<text class="tip" v-if="status == 2">距离下场开始</text>
-				<text class="tip" v-if="status == 0">当天活动已结束</text>
-				<uni-countdown v-if="status == 1 || status == 2" :show-day="false" :hour="stopTimeH" :minute="stopTimeM" :second="stopTimeS"></uni-countdown>
-			</view>
-			<view class="textNav iconfont iconenter" @click="navTo('/pages/product/seckill')">更多</view>
-		</view>
-		<scroll-view class="floor-list" scroll-x>
-			<view class="scoll-wrapper position-relative" @click="navTo('/pages/product/seckill')">
-				<view v-for="(item, index) in list" :key="index" class="floor-item">
-					<image class="list-image" :src="item.image" mode="aspectFill"></image>
-					<text class="title clamp">{{ item.title }}</text>
-					<text class="price">¥{{ item.price }}</text>
-				</view>
-				<view v-if="list.length == 0" class="floor-item ">
-					<image class="list-image" mode="aspectFill"></image>
-					<text class="title clamp"></text>
-					<text class="price"></text>
-				</view>
-				<view v-if="list.length == 0" class="noGoodsBg"><view>敬请期待</view></view>
-			</view>
-		</scroll-view>
-	</view>
-</template>
-
-<script>
-import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
-import { getSeckillList, getSeckillClass } from '@/api/product.js';
-import { timeComputed } from '@/utils/rocessor.js';
-export default {
-	components: {
-		uniCountdown
-	},
-	data() {
-		return {
-			list: [],
-			page: 1,
-			limit: 10,
-			showTime: '', //显示的时间
-			showTImeId: '', //显示时间id用于查询数据
-			stopTimeH: 0,
-			stopTimeM: 0,
-			stopTimeS: 0,
-			// 判断是否所有活动已经结束
-			stop: false, //活动是否已经结束
-			show: false, //是否显示活动
-			status: 0 //获取状态值1为有活动开始中 2为活动未开始 0为活动已经结束
-		};
-	},
-	created: function(e) {
-		// 载入分类
-		this.getClass();
-	},
-	methods: {
-		navTo(url) {
-			uni.navigateTo({
-				url
-			});
-		},
-		getList() {
-			getSeckillList(
-				{
-					page: this.page,
-					limit: this.limit
-				},
-				this.showTImeId
-			)
-				.then(e => {
-					this.list = e.data;
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		getClass() {
-			let obj = this;
-			getSeckillClass({})
-				.then(({ data }) => {
-					let arr = data.seckillTime;
-					// 用于判断是否有数据
-					let showDate = false;
-					for (var i = 0; i < arr.length; i++) {
-						let ar = arr[i];
-						if (ar.status === 1 || ar.status === 2) {
-							obj.status = ar.status;
-							// 保存要显示的场次时间
-							obj.showTime = ar.time;
-							// 保存要显示活动商品的id
-							obj.showTImeId = ar.id;
-							// 保存当前状态值
-							// 计算倒计时时间
-							if (ar.status === 1) {
-								obj.timeComputed(ar.stop * 1000);
-							} else {
-								// 获取需要开始
-								let arTime = ar.time.split(':');
-								let h = arTime[0];
-								let m = arTime[1];
-								let time = new Date();
-								// 设置时间
-								time.setHours(h, m, 0);
-								obj.timeComputed(time.getTime());
-							}
-							// 获取商品列表
-							obj.getList();
-							// 保存当前有活动在举行
-							showDate = true;
-							// 任务查询结束跳出循环
-							break;
-						}
-					}
-					// 判断是否有活动
-					if (arr.length > 0) {
-						obj.show = true;
-					}
-					// 判断今天活动是否已经全部结束
-					if (!showDate) {
-						// 保存活动结束最后一个小时的活动商品
-						obj.showTImeId = arr[arr.length - 1].id;
-						// 活动已经结束
-						obj.status = 0;
-						// 获取结束时的商品
-						obj.getList();
-						console.log(obj.status);
-					}
-					// 如果所有场次均已经结束
-				})
-				.catch(e => {
-					uni.showModal({
-						title: JSON.stringify(e)
-					});
-				});
-		},
-		// 计算倒计时时间
-		timeComputed(da) {
-			let obj = this;
-			let stopTime = timeComputed(da)
-			obj.stopTimeH =stopTime.hours;
-			obj.stopTimeM = stopTime.minutes;
-			obj.stopTimeS =stopTime.seconds;
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-/* 秒杀专区 */
-.seckill-section {
-	padding: 4rpx 30rpx 24rpx;
-	.s-header {
-		display: flex;
-		align-items: center;
-		height: 92rpx;
-		line-height: 1;
-		.tit-box {
-			flex-shrink: 0;
-		}
-		.tit {
-			@extend %font-title;
-		}
-		.f-left-icon {
-			@extend %f-left-icon;
-		}
-		.textNav {
-			line-height: 1;
-			padding: 15rpx 0;
-			flex-shrink: 0;
-			flex-grow: 1;
-			min-width: 100rpx;
-		}
-		.tip-box {
-			flex-grow: 1;
-			display: flex;
-			justify-content: flex-start;
-			align-items: center;
-		}
-		.tip {
-			font-size: $font-sm;
-			color: $font-color-light;
-			padding-left: 10rpx;
-			padding-right: 10rpx;
-		}
-		.timer {
-			display: inline-block;
-			width: 40rpx;
-			height: 36rpx;
-			text-align: center;
-			line-height: 36rpx;
-			margin-right: 14rpx;
-			font-size: $font-sm + 2rpx;
-			color: #fff;
-			border-radius: 2px;
-			background: rgba(0, 0, 0, 0.8);
-		}
-		.iconenter {
-			font-size: $font-sm;
-			color: $font-color-light;
-			flex: 1;
-			text-align: right;
-		}
-	}
-	.floor-list {
-		white-space: nowrap;
-		background-color: white;
-		padding: 20rpx;
-		border-radius: 5rpx;
-		box-shadow: $box-shadow;
-	}
-	.scoll-wrapper {
-		display: flex;
-		align-items: flex-start;
-		.noGoodsBg {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			height: 100%;
-			position: absolute;
-			top: 0;
-			left: 0;
-			width: 100%;
-			color: $font-color-light;
-		}
-		.floor-item {
-			width: 150rpx;
-			margin-right: 20rpx;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-dark;
-			line-height: 1.8;
-			.list-image {
-				width: 150rpx;
-				height: 150rpx;
-				border-radius: 6rpx;
-			}
-			.price {
-				color: $color-red;
-			}
-		}
-	}
-}
-</style>

+ 0 - 196
components/share.vue

@@ -1,196 +0,0 @@
-<template>
-	<view v-if="show" class="mask" @click="toggleMask" @touchmove.stop.prevent="stopPrevent" :style="{ backgroundColor: backgroundColor }">
-		<view
-			class="mask-content"
-			@click.stop.prevent="stopPrevent"
-			:style="[
-				{
-					height: config.height,
-					transform: transform
-				}
-			]"
-		>
-			<scroll-view class="view-content" scroll-y>
-				<view class="share-header">分享到</view>
-				<view class="share-list">
-					<view v-for="(item, index) in shareList" :key="index" class="share-item" @click="shareToFriend(item.text)">
-						<image class="itemImage" :src="item.icon" mode=""></image>
-						<text class="itemText">{{ item.text }}</text>
-					</view>
-				</view>
-			</scroll-view>
-			<view class="bottomButtom b-t" @click="toggleMask">取消</view>
-		</view>
-	</view>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			transform: 'translateY(50vh)',
-			timer: 0,
-			backgroundColor: 'rgba(0,0,0,0)',
-			show: false,
-			config: {}
-		};
-	},
-	props: {
-		contentHeight: {
-			type: Number,
-			default: 0
-		},
-		//是否是tabbar页面
-		hasTabbar: {
-			type: Boolean,
-			default: false
-		},
-		shareList: {
-			type: Array,
-			default: function() {
-				return [];
-			}
-		}
-	},
-	created() {
-		const height = uni.upx2px(this.contentHeight) + 'px';
-		this.config = {
-			height: height,
-			transform: `translateY(${height})`,
-			backgroundColor: 'rgba(0,0,0,.4)'
-		};
-		this.transform = this.config.transform;
-	},
-	methods: {
-		toggleMask() {
-			//防止高频点击
-			if (this.timer == 1) {
-				return;
-			}
-			this.timer = 1;
-			setTimeout(() => {
-				this.timer = 0;
-			}, 500);
-
-			if (this.show) {
-				this.transform = this.config.transform;
-				this.backgroundColor = 'rgba(0,0,0,0)';
-				setTimeout(() => {
-					this.show = false;
-					this.hasTabbar && uni.showTabBar();
-				}, 200);
-				return;
-			}
-
-			this.show = true;
-			//等待mask重绘完成执行
-			if (this.hasTabbar) {
-				uni.hideTabBar({
-					success: () => {
-						setTimeout(() => {
-							this.backgroundColor = this.config.backgroundColor;
-							this.transform = 'translateY(0px)';
-						}, 10);
-					}
-				});
-			} else {
-				setTimeout(() => {
-					this.backgroundColor = this.config.backgroundColor;
-					this.transform = 'translateY(0px)';
-				}, 10);
-			}
-		},
-		//防止冒泡和滚动穿透
-		stopPrevent() {},
-		//分享操作
-		shareToFriend(type) {
-			this.$api.msg(`分享给${type}`);
-			this.toggleMask();
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-.mask {
-	position: fixed;
-	left: 0;
-	top: 0;
-	right: 0;
-	bottom: 0;
-	display: flex;
-	justify-content: center;
-	align-items: flex-end;
-	z-index: 998;
-	transition: 0.3s;
-	.bottomButtom {
-		position: absolute;
-		left: 0;
-		bottom: 0;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		width: 100%;
-		height: 90rpx;
-		background: #fff;
-		z-index: 9;
-		font-size: $font-base + 2rpx;
-		color: $font-color-dark;
-	}
-}
-.mask-content {
-	width: 100%;
-	height: 580rpx;
-	transition: 0.3s;
-	background: #fff;
-	&.has-bottom {
-		padding-bottom: 90rpx;
-	}
-	.view-content {
-		height: 100%;
-	}
-}
-.share-header {
-	height: 110rpx;
-	font-size: $font-base + 2rpx;
-	color: font-color-dark;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	padding-top: 10rpx;
-	&:before,
-	&:after {
-		content: '';
-		width: 240rpx;
-		heighg: 0;
-		border-top: 1px solid $border-color-base;
-		transform: scaleY(0.5);
-		margin-right: 30rpx;
-	}
-	&:after {
-		margin-left: 30rpx;
-		margin-right: 0;
-	}
-}
-.share-list {
-	display: flex;
-	flex-wrap: wrap;
-}
-.share-item {
-	min-width: 33.33%;
-	display: flex;
-	flex-direction: column;
-	justify-content: center;
-	align-items: center;
-	height: 180rpx;
-	.itemImage {
-		width: 80rpx;
-		height: 80rpx;
-		margin-bottom: 16rpx;
-	}
-	.itemText {
-		font-size: $font-base;
-		color: $font-color-base;
-	}
-}
-</style>

+ 0 - 226
components/upload-images.vue

@@ -1,226 +0,0 @@
-<template>
-	<view class="upload-content">
-		<block v-for="(item, index) in imageList" :key="index">
-			<view class="upload-item">
-				<image class="upload-img" :src="item.filePath" mode="aspectFill" @click="previewImage(index)"></image>
-				<image class="upload-del-btn" 
-					@click="delImage(index)" 
-					src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjNBODgzQjUwNDM5MTFFOUJDMjlGN0UwRTJGMjVCNjQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjNBODgzQjYwNDM5MTFFOUJDMjlGN0UwRTJGMjVCNjQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGM0E4ODNCMzA0MzkxMUU5QkMyOUY3RTBFMkYyNUI2NCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGM0E4ODNCNDA0MzkxMUU5QkMyOUY3RTBFMkYyNUI2NCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PuYQTIAAAAHNSURBVHjazJgxasMwFIbjnsD4BDmCLxDQDZrNQ5bcILlBvXvpDRLIWmiHFkyH2t0LyVbwEkPpbE/eYlUCGYQax096UuIffkIgij7ryU/vyZuYy2e+Z56K70R8lsJcOfPn5AriMCvmZ2YKdMW8EQ/hRA9iEorwXlpZtObMRySQ6kysvrFWloHUEIcmUBuHUDLccmxQskErt7wyVLdy00tQ4Q2g5De2V9kNwWjffiNDA33f/42i6E13Qj5uNptlwJD+SyODuaqqqi/KVBTFOxSKA7VtW/NxSZI8AcbE2nuraZpvKgSBk6G4drsdBOwogz1CwAghH/JEl+BUKJ1VltPHHjoIAoeE4l53YFqb+RKcBSgqyqXhtxEKZwkKB3YOThYCqjPuCDoHZwGK3mGLtdPp5LmqTI1Dqe4p26EkNqA4iE6eg2z+iQ0okyQMATvYgLIIt9Y6knTyFBIudHqIq3BpmkL60VJ9O0sXZY8MBwSLtdNGEAQ/i8XiVXcz83EcEPDbuq/fzMdYWt+6GTmMsX2rh9q3TtsxNrzXhKt1rwg6rR1Dhdjqo7QMlWOvoWTF4imxQMRF7eaL8L5ohmwrLgDB8pCQc8DlcG7y538CDABJNGPqfaJgfgAAAABJRU5ErkJggg==" 
-					mode="scaleToFill">
-				</image>
-				<view class="upload-progress" v-if="item.progress < 100">{{item.progress}}%</view>
-			</view>
-		</block>
-		<view class="upload-add-btn" v-if="rduLength > 0" @click="chooseImage"></view>
-	</view>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			imageList: []
-		};
-	},
-	props: {
-		url: {
-			type: String,
-			value: '' //上传接口地址
-		},
-		count: {
-			type: Number,
-			value: 4 //单次可选择的图片数量
-		},
-		length: {
-			type: Number,
-			value: 50 //可上传总数量
-		}
-	},
-	computed: {
-		rduLength(){
-			return this.length - this.imageList.length;
-		}
-	},
-	methods: {
-		//选择图片
-		chooseImage: function(){
-			uni.chooseImage({
-				count: this.rduLength < this.count ? this.rduLength : this.count, //最多可以选择的图片张数,默认9
-				sizeType: ['original', 'compressed'], //original 原图,compressed 压缩图,默认二者都有
-				sourceType: ['album'], //album 从相册选图,camera 使用相机,默认二者都有
-				success: (res)=> {
-					const images = res.tempFilePaths;
-					this.uploadFiles(images);
-				}
-			});
-		},
-		//上传图片
-		async uploadFiles(images){
-			this.imageList.push({
-				filePath: images[0],
-				progress: 0
-			});
-			uni.showLoading({
-				title: '请稍后..',
-				mask: true,
-			})
-			try{
-				const uploadUrl = await this.uploadImage(images[0]);
-			}catch(err){
-				console.log(err);
-				return;
-			}
-			
-			if(uploadUrl !== false){
-				images.splice(0, 1);
-				this.imageList[this.imageList.length - 1].src = uploadUrl;
-
-				//判断是否需要继续上传
-				if(images.length > 0 && this.rduLength > 0){
-					this.uploadFiles(images);
-				}else{
-					uni.hideLoading();
-				}
-			}else{
-				//上传失败处理
-				this.imageList.pop();
-				uni.hideLoading();
-				uni.showToast({
-					title: '上传中出现问题,已终止上传',
-					icon: 'none',
-					mask: true,
-					duration: 2000
-				});
-			}
-		},
-		uploadImage: function(file){
-			return new Promise((resolve, reject)=> {
-				//发送给后端的附加参数
-				const formData = {
-					thumb_mode: 1,  
-				};
-				this.uploadTask = uni.uploadFile({
-					url: this.url, 
-					filePath: file,
-					name: 'file',
-					formData: formData,
-					success(uploadFileResult){
-						const uploadFileRes = JSON.parse(uploadFileResult.data) || {};
-						if(uploadFileRes.status === 1 && uploadFileRes.data){
-							resolve(uploadFileRes.data);
-						}else{
-							reject('接口返回错误');
-						}
-					}, 
-					fail(){
-						reject('网络链接错误');
-					}
-				});
-				//上传进度
-				this.uploadTask.onProgressUpdate((progressRes)=> {
-					this.imageList[this.imageList.length - 1].progress = progressRes.progress;
-				});
-			});
-		},
-		//删除图片
-		delImage: function(index){
-			uni.showModal({
-				content: '确定要放弃这张图片么?',
-				success: (confirmRes)=> {
-					if (confirmRes.confirm) {
-						this.imageList.splice(index, 1);
-					} 
-				}
-			});
-		},
-		//预览图片
-		previewImage: function(index){
-			const urls = [];
-			this.imageList.forEach((item)=> {
-				urls.push(item.filePath);
-			})
-			uni.previewImage({
-				current: urls[index],
-				urls: urls,
-				indicator: "number"
-			})
-		}
-	}
-}
-</script>
-
-<style lang="scss">
-	.upload-content{
-		padding:24upx 0 0 28upx;
-		background-color: #fff;
-		overflow:hidden;
-	}
-	.upload-item{
-		position: relative;
-		float:left;
-		width:150upx;
-		height:150upx;
-		margin-right:30upx;
-		margin-bottom:30upx;
-		&:nth-child(4n){
-			margin-right:0;
-		}
-		.upload-img{
-			width:100%;
-			height:100%;
-			border-radius:8upx;
-		}
-		.upload-del-btn{
-			position: absolute;
-			right:-16upx;
-			top:-14upx;
-			width:36upx;
-			height:36upx;
-			border: 4upx solid #fff;
-			border-radius: 100px;
-		}
-		.upload-progress{
-			position: absolute;
-			left:0;
-			top:0;
-			display:flex;
-			align-items:center;
-			justify-content: center;
-			width:100%;
-			height:100%;
-			background-color: rgba(0,0,0,.4);
-			color:#fff;
-			font-size:24upx;
-			border-radius:8upx;
-		}
-	}
-	.upload-add-btn {
-		position: relative;
-		float:left;
-		width: 150upx;
-		height: 150upx;
-		z-index: 99;
-		border-radius:8upx;
-		background:#f9f9f9;
-		&:before,
-		&:after {
-			content: " ";
-			position: absolute;
-			top: 50%;
-			left: 50%;
-			-webkit-transform: translate(-50%, -50%);
-			transform: translate(-50%, -50%);
-			width: 4upx;
-			height: 60upx;
-			background-color: #d6d6d6;
-		}
-		&:after {
-			width: 60upx;
-			height: 4upx;
-		}
-		&:active {
-			background-color: #f7f7f7;
-		}
-	}
-
-</style>

+ 1 - 1
pages.json

@@ -5,7 +5,7 @@
 				// #ifndef MP-WEIXIN
 				// #ifndef MP-WEIXIN
 				"navigationStyle": "custom",
 				"navigationStyle": "custom",
 				// #endif
 				// #endif
-				"navigationBarTitleText": ""
+				"navigationBarTitleText": "惠补商城"
 			}
 			}
 		},
 		},
 		{
 		{

+ 193 - 170
pages/index/index.vue

@@ -42,11 +42,11 @@
 				</view>
 				</view>
 				<view class="item-title">联系客服</view>
 				<view class="item-title">联系客服</view>
 			</view> -->
 			</view> -->
-			<!-- <view class="cate-item flex" @click="navto('/pages/index/storeList')">
+			<!-- <view class="cate-item flex" @click="navto('/pages/integralGoods/integral_goods_list')">
 				<view class="img-wrapper flex">
 				<view class="img-wrapper flex">
 					<image src="../../static/index/in6.png" mode=""></image>
 					<image src="../../static/index/in6.png" mode=""></image>
 				</view>
 				</view>
-				<view class="item-title">本地门店</view>
+				<view class="item-title">积分商品</view>
 			</view> -->
 			</view> -->
 			<!-- <view class="cate-item flex" @click="navto('/pages/user/shareQrCode',1)">
 			<!-- <view class="cate-item flex" @click="navto('/pages/user/shareQrCode',1)">
 				<view class="img-wrapper flex">
 				<view class="img-wrapper flex">
@@ -61,30 +61,54 @@
 				<view class="item-title">加入我们</view>
 				<view class="item-title">加入我们</view>
 			</view>
 			</view>
 		</view>
 		</view>
-		<!-- 分类 ed -->
-		<!-- <view class="jg">
-
-		</view> -->
-		<!-- <view class="hdlist" >
-			<image src="../../static/index/ryc.png" @click="navTo('/pages/index/actionDetail?id=1')" mode="widthFix"></image>
-			<image src="../../static/index/xny.png" @click="navTo('/pages/index/actionDetail?id=2')" mode="widthFix"></image>
-		</view> -->
+		<view class="ins-item">
+			<view class="type flex padding-b-30">
+				<image class="indexHot margin-r-10" src="../../static/icon/indexhot.png" mode="widthFix"></image>
+				<view class="title">
+					买商品送积分
+				</view>
+			</view>
+			<view class="item flex" v-for="item in goodIn.list" @click="navTo('/pages/product/product?id=' + item.id)">
+				<image class="goods-image" :src="item.image" mode="scaleToFill"></image>
+				<view class="content">
+					<view class="goods-title clamp2">
+						{{item.store_name}}
+					</view>
+					<view class="flex padding-t-10">
+						<view class="tip">
+							赠送{{item.give_integral}}积分
+						</view>
+					</view>
+					<view class="money flex-start">
+						<view class="newmoney padding-r-10">
+							¥{{+item.price }}
+						</view>
+						<view class="optmoney">
+							{{+item.ot_price }}
+						</view>
+					</view>
+					<view class="nav-bottom">
+						立即购买
+					</view>
+				</view>
+			</view>
+		</view>
 		<!-- 商品列表 start -->
 		<!-- 商品列表 start -->
 		<view class="product-box">
 		<view class="product-box">
 			<view class="product-tit flex">
 			<view class="product-tit flex">
 				<view class="hx">
 				<view class="hx">
-			
+
 				</view>
 				</view>
 				<view class="tit">
 				<view class="tit">
-					热销推荐
+					积分商品
 				</view>
 				</view>
 				<view class="hx">
 				<view class="hx">
-			
+
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
 		<view class="good-list">
 		<view class="good-list">
-			<view class="good" v-for="item in goodList" @click="navTo('/pages/product/product?id=' + item.id)">
+			<view class="good" v-for="item in inListData.list" @click="navTo('/pages/product/product?type=3&id=' + item.id)">
 				<image :src="item.image" mode="" class="good-image"></image>
 				<image :src="item.image" mode="" class="good-image"></image>
 				<view class="good-name ">
 				<view class="good-name ">
 					<view class="clamp">
 					<view class="clamp">
@@ -92,15 +116,15 @@
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="good-key">
 				<view class="good-key">
-					鸿运开来 为成功喝彩
+					<!-- 鸿运开来 为成功喝彩 -->
 				</view>
 				</view>
 				<view class="good-price">
 				<view class="good-price">
 					<view class="price">
 					<view class="price">
-						¥{{item.price}}
-					</view>
-					<view class="xl">
-						销量:{{item.sales}}
+						积分{{item.min_integral}}
 					</view>
 					</view>
+					<!-- <view class="xl">
+						库存:{{item.sales}}
+					</view> -->
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -131,15 +155,12 @@
 		loadIndexs
 		loadIndexs
 	} from '@/api/index.js';
 	} from '@/api/index.js';
 	import {
 	import {
-		getUserInfo,
-		spread
+		getUserInfo
 	} from '@/api/user.js';
 	} from '@/api/user.js';
 	import {
 	import {
-		getBargainList,
-		getProducts,
-		goodsDetail,
-		poster
-	} from '@/api/product.js';
+		getInGoods,
+		getIn,
+	} from '@/api/new.js';
 	import {
 	import {
 		saveUrl,
 		saveUrl,
 		interceptor
 		interceptor
@@ -148,35 +169,28 @@
 		mapState,
 		mapState,
 		mapMutations
 		mapMutations
 	} from 'vuex';
 	} from 'vuex';
-	// #ifdef H5
-	import {
-		weixindata,
-		shareLoad
-	} from '@/utils/wxAuthorized';
-	// #endif
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
 				text: 'shxsophina', //客服微信
 				text: 'shxsophina', //客服微信
-				page: 1,
-				limitt: 20,
-				loadingType: 'more',
 				current: 0,
 				current: 0,
-				shareShow: false, //分享海报
-				pageProportion: 0, //保存页面基于750宽度的比例
-				swiperHeight: 0,
-				checkid: 0,
 				titleNViewBackground: '',
 				titleNViewBackground: '',
 				swiperCurrent: 0,
 				swiperCurrent: 0,
 				swiperLength: 0,
 				swiperLength: 0,
 				carouselList: [], //轮播列表
 				carouselList: [], //轮播列表
-				page: 1,
-				limit: 5,
-				firstList: [],
-				goodList: [], //商品列表
-				shopList: [],
-				period: 1,
-				shareImage: '',
+				goodIn: {
+					loadingType: 'more',
+					page: 1,
+					limit: 10,
+					list: []
+				},
+				// 积分商品列表
+				inListData: {
+					loadingType: 'more',
+					page: 1,
+					limit: 10,
+					list: []
+				}
 			};
 			};
 		},
 		},
 		computed: {
 		computed: {
@@ -246,25 +260,46 @@
 		},
 		},
 		onShow: function() {
 		onShow: function() {
 			this.getGoodList()
 			this.getGoodList()
+			this.getIn()
 			this.loadData();
 			this.loadData();
 		},
 		},
 		methods: {
 		methods: {
+			getIn() {
+				let obj = this;
+				if (obj.goodIn.loadingType == 'loading' || obj.goodIn.loadingType == 'noMore') {
+					return
+				}
+				obj.goodIn.loadingType = 'loading'
+				getIn({
+					page: obj.goodIn.page,
+					limit: obj.goodIn.limit,
+				}).then(res => {
+					obj.goodIn.list = obj.goodIn.list.concat(res.data.list)
+					// if (obj.goodIn.page == res.data.length) {
+					// 	obj.goodIn.page++
+					// 	obj.loadingType = 'more';
+					// } else {
+					obj.goodIn.loadingType = 'noMore'
+					// }
+				})
+			},
 			getGoodList() {
 			getGoodList() {
 				let obj = this
 				let obj = this
-				if (obj.loadingType == 'loading' || obj.loadingType == 'noMore') {
+				if (obj.inListData.loadingType == 'loading' || obj.inListData.loadingType == 'noMore') {
 					return
 					return
 				}
 				}
-				obj.loadingType = 'loading'
-				getProducts({
-					page: 1,
-					limit: 50,
+				obj.inListData.loadingType = 'loading'
+				getInGoods({
+					page: obj.inListData.page,
+					limit: obj.inListData.limit,
 				}).then(res => {
 				}).then(res => {
-					obj.goodList = obj.goodList.concat(res.data)
-					if (obj.limit == res.data.length) {
-						obj.loadingType = 'more'
-					} else {
-						obj.loadingType = 'noMore'
-					}
+					obj.inListData.list = obj.inListData.list.concat(res.data.list)
+					// if (obj.inListData.page == res.data.length) {
+					// 	obj.inListData.page++
+					// 	obj.inListData.loadingType = 'more';
+					// } else {
+					obj.inListData.loadingType = 'noMore'
+					// }
 				})
 				})
 			},
 			},
 			navto(url, type = 0) {
 			navto(url, type = 0) {
@@ -322,12 +357,12 @@
 						let goods = data.info;
 						let goods = data.info;
 						console.log(goods, '商品信息');
 						console.log(goods, '商品信息');
 						this.carouselList = data.banner;
 						this.carouselList = data.banner;
-						this.swiperLength = this.carouselList.length;
-						this.bastList = data.giftInfo; //会员礼包
-						data.info.firstList.forEach(e => {
-							e.isVip = e.store_type ? "3" : "0"
-						})
-						this.firstList = data.info.firstList //首页商品
+						// this.swiperLength = this.carouselList.length;
+						// this.bastList = data.giftInfo; //会员礼包
+						// data.info.firstList.forEach(e => {
+						// 	e.isVip = e.store_type ? "3" : "0"
+						// })
+						// this.firstList = data.info.firstList //首页商品
 						uni.stopPullDownRefresh();
 						uni.stopPullDownRefresh();
 					})
 					})
 					.catch(e => {
 					.catch(e => {
@@ -470,6 +505,7 @@
 		// margin: 20rpx 0 0;
 		// margin: 20rpx 0 0;
 		border-radius: 20rpx;
 		border-radius: 20rpx;
 		margin: auto;
 		margin: auto;
+
 		image {
 		image {
 			width: 690rpx;
 			width: 690rpx;
 			height: 365rpx;
 			height: 365rpx;
@@ -510,6 +546,7 @@
 		padding: 0rpx 0 10rpx;
 		padding: 0rpx 0 10rpx;
 		margin-top: 20rpx;
 		margin-top: 20rpx;
 		flex-wrap: wrap;
 		flex-wrap: wrap;
+
 		.cate-item {
 		.cate-item {
 			flex-grow: 0;
 			flex-grow: 0;
 			width: 33.3%;
 			width: 33.3%;
@@ -518,6 +555,7 @@
 			align-items: center;
 			align-items: center;
 			justify-content: center;
 			justify-content: center;
 			padding-bottom: 20rpx;
 			padding-bottom: 20rpx;
+
 			.img-wrapper {
 			.img-wrapper {
 				width: 90rpx;
 				width: 90rpx;
 				height: 90rpx;
 				height: 90rpx;
@@ -547,15 +585,16 @@
 		// margin-top: 20rpx;
 		// margin-top: 20rpx;
 		background: #ffffff;
 		background: #ffffff;
 		padding: 26rpx 0 20rpx;
 		padding: 26rpx 0 20rpx;
+
 		.product-tit {
 		.product-tit {
 			justify-content: center;
 			justify-content: center;
-		
+
 			.hx {
 			.hx {
 				width: 120rpx;
 				width: 120rpx;
 				height: 1rpx;
 				height: 1rpx;
 				background: #4A2723;
 				background: #4A2723;
 			}
 			}
-		
+
 			.tit {
 			.tit {
 				margin: 0 70rpx;
 				margin: 0 70rpx;
 				font-size: 30rpx;
 				font-size: 30rpx;
@@ -672,15 +711,16 @@
 		background-color: #ffffff;
 		background-color: #ffffff;
 		border-radius: 20rpx;
 		border-radius: 20rpx;
 		position: relative;
 		position: relative;
+
 		.product-tit {
 		.product-tit {
 			justify-content: center;
 			justify-content: center;
-		
+
 			.hx {
 			.hx {
 				width: 120rpx;
 				width: 120rpx;
 				height: 1rpx;
 				height: 1rpx;
 				background: #989898;
 				background: #989898;
 			}
 			}
-		
+
 			.tit {
 			.tit {
 				margin: 0 70rpx;
 				margin: 0 70rpx;
 				font-size: 30rpx;
 				font-size: 30rpx;
@@ -688,6 +728,7 @@
 				color: #4A2723;
 				color: #4A2723;
 			}
 			}
 		}
 		}
+
 		.img {
 		.img {
 			position: relative;
 			position: relative;
 			top: -56rpx;
 			top: -56rpx;
@@ -768,11 +809,13 @@
 			}
 			}
 		}
 		}
 	}
 	}
+
 	.good-list {
 	.good-list {
 		display: flex;
 		display: flex;
 		justify-content: space-between;
 		justify-content: space-between;
 		flex-wrap: wrap;
 		flex-wrap: wrap;
 		padding: 20rpx 28rpx;
 		padding: 20rpx 28rpx;
+
 		.good {
 		.good {
 			width: 336rpx;
 			width: 336rpx;
 			height: 482rpx;
 			height: 482rpx;
@@ -781,25 +824,28 @@
 			border-radius: 14rpx;
 			border-radius: 14rpx;
 			margin-bottom: 20rpx;
 			margin-bottom: 20rpx;
 			position: relative;
 			position: relative;
+
 			.good-image {
 			.good-image {
 				width: 336rpx;
 				width: 336rpx;
 				height: 336rpx;
 				height: 336rpx;
 				background-color: #eee;
 				background-color: #eee;
 				border-radius: 14rpx 14rpx 0 0;
 				border-radius: 14rpx 14rpx 0 0;
 			}
 			}
-	
+
 			.good-name {
 			.good-name {
 				font-size: 28rpx;
 				font-size: 28rpx;
 				font-weight: bold;
 				font-weight: bold;
 				color: #333333;
 				color: #333333;
 				padding: 0 20rpx;
 				padding: 0 20rpx;
 			}
 			}
+
 			.good-key {
 			.good-key {
 				font-size: 22rpx;
 				font-size: 22rpx;
 				font-weight: 500;
 				font-weight: 500;
 				color: #999999;
 				color: #999999;
 				padding-left: 20rpx
 				padding-left: 20rpx
 			}
 			}
+
 			.good-price {
 			.good-price {
 				display: flex;
 				display: flex;
 				width: 336rpx;
 				width: 336rpx;
@@ -810,7 +856,8 @@
 				position: absolute;
 				position: absolute;
 				bottom: 20rpx;
 				bottom: 20rpx;
 				padding: 0 20rpx;
 				padding: 0 20rpx;
-				.xl{
+
+				.xl {
 					font-size: 20rpx;
 					font-size: 20rpx;
 					font-weight: bold;
 					font-weight: bold;
 					color: #999999;
 					color: #999999;
@@ -818,116 +865,92 @@
 			}
 			}
 		}
 		}
 	}
 	}
-	// .good-list {
-	// 	width: 750rpx;
-	// 	background:#fff;
-	// 	padding: 30rpx 0;
-	
-	// 	.good {
-	// 		width: 690rpx;
-	// 		height: 276rpx;
-	// 		background: #FFFFFF;
-	// 		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
-	// 		border-radius: 10rpx;
-	// 		margin: auto;
-	// 		padding: 20rpx 15rpx;
-	// 		margin-bottom: 20rpx;
-	// 		&:last-of-type {
-	// 			margin-bottom: 0rpx;
-	// 		}
-	
-	// 		.good-img {
-	// 			flex-shrink: 0;
-	// 			width: 236rpx;
-	// 			height: 236rpx;
-	// 			border-radius: 10rpx;
-	// 			margin-right: 22rpx;
-	
-	// 			image {
-	// 				width: 236rpx;
-	// 				height: 236rpx;
-	// 				border-radius: 10rpx;
-	// 			}
-	// 		}
-	
-	// 		.good-info {
-	// 			flex-grow: 1;
-	// 			height: 100%;
-	// 			flex-direction: column;
-	// 			justify-content: space-between;
-	// 			align-items: flex-start;
-	
-	// 			.good-name {
-	// 				font-size: 32rpx;
-	// 				font-weight: bold;
-	// 				padding-top: 10rpx;
-	// 				color: #333333;
-	// 			}
-	
-	// 			.good-price {
-	// 				width: 100%;
-	
-	// 				image {
-	// 					width: 14rpx;
-	// 					margin: 0 6rpx 0 10rpx;
-	// 				}
-	
-	// 				.old-price {
-	// 					.old-left {
-	// 						font-size: 26rpx;
-	// 						font-weight: 500;
-	// 						text-decoration: line-through;
-	// 						color: #999999;
-	// 					}
-	
-	// 					.old-right {
-	// 						font-size: 24rpx;
-	// 						font-weight: bold;
-	// 						color: #B59467;
-	// 					}
-	// 				}
-	
-	// 				.new-price {
-	// 					width: 100%;
-	// 					font-size: 36rpx;
-	// 					font-weight: bold;
-	// 					color: #FF4C4C;
-	// 					justify-content: space-between;
-	
-	// 					.good-tip {
-	// 						width: 137rpx;
-	// 						height: 52rpx;
-	// 						background: #ff4a48;
-	// 						border-radius: 26rpx;
-	// 						position: relative;
-	// 						font-size: 26rpx;
-	// 						font-weight: 500;
-	// 						color: #FFFFFF;
-	// 						line-height: 52rpx;
-	// 						text-align: center;
-	// 					}
-	// 				}
-	// 			}
-	// 		}
-	// 	}
-	
-	// }
+
 	.index-top-wrap {
 	.index-top-wrap {
 		position: relative;
 		position: relative;
+
 		.index-top {
 		.index-top {
 			width: 750rpx;
 			width: 750rpx;
 			position: absolute;
 			position: absolute;
 		}
 		}
+
 		.fud {
 		.fud {
 			position: relative;
 			position: relative;
 		}
 		}
 	}
 	}
-	.hdlist {
-		width: 100%;
-		image {
-			display: block;
-			width: 705rpx;
-			margin: 25rpx auto;
+
+	.ins-item {
+		padding: 30rpx;
+
+		.type {
+			justify-content: flex-start;
+
+			.indexHot {
+				width: 40rpx;
+			}
+
+			.title {
+				font-size: $font-lg;
+				font-weight: bold;
+			}
 		}
 		}
+
+		.item {
+			padding: 20rpx;
+			box-shadow: 0rpx 0rpx 20rpx rgba(0, 0, 0, 0.2);
+			border-radius: 20rpx;
+			margin-bottom: 30rpx;
+			position: relative;
+			.goods-title {
+				height: 2.5em;
+				font-weight: bold;
+			}
+
+			.goods-image {
+				width: 250rpx;
+				height: 250rpx;
+				border-radius: 20rpx;
+			}
+
+			.tip {
+				font-size: 24rpx;
+				color: rgb(253, 133, 62);
+				line-height: 1;
+				padding: 5rpx 10rpx;
+				border: 1px solid rgb(253, 133, 62);
+				border-radius: 5rpx;
+			}
+
+			.content {
+				padding-left: 20rpx;
+				align-self: stretch;
+				flex-grow: 1;
+				position: relative;
+			}
+			.money{
+				position: absolute;
+				bottom: 0rpx;
+				left: 20rpx;
+			.newmoney{
+				font-size: $font-lg;
+				color: $color-red;
+			}
+			.optmoney{
+				font-size: $font-sm;
+				color:$font-color-light;
+				text-decoration:line-through ;
+			}
+			}
+		}
+	}
+	.nav-bottom{
+		position: absolute;
+		bottom: 0rpx;
+		right: 0rpx;
+		color: #FFF;
+		background-color:$color-red;
+		line-height: 1;
+		padding: 10rpx 20rpx;
+		border-radius: 100rpx;
 	}
 	}
-</style>
+</style>

+ 10 - 5
pages/order/createOrder.vue

@@ -60,7 +60,9 @@
 					<text class="title clamp">{{ ls.productInfo.store_name }}</text>
 					<text class="title clamp">{{ ls.productInfo.store_name }}</text>
 					<text class="spec">{{ ls.productInfo.attrInfo ? ls.productInfo.attrInfo.suk : '默认' }}</text>
 					<text class="spec">{{ ls.productInfo.attrInfo ? ls.productInfo.attrInfo.suk : '默认' }}</text>
 					<view class="price-box">
 					<view class="price-box">
-						<text class="price">¥{{ ls.productInfo.attrInfo ? ls.productInfo.attrInfo.price : ls.productInfo.price }}</text>
+						<text class="price"  v-if="integralShow">{{ ls.productInfo.attrInfo ? ls.productInfo.attrInfo.integral : ls.productInfo.integral }}</text>
+						<text class="price"  v-else>¥{{ ls.productInfo.attrInfo ? ls.productInfo.attrInfo.price : ls.productInfo.price }}</text>
+						
 						<text class="number">{{ 'x ' + ls.cart_num + (ls.productInfo.unit_name || '') }}</text>
 						<text class="number">{{ 'x ' + ls.cart_num + (ls.productInfo.unit_name || '') }}</text>
 						<!-- <view><text class="price">¥{{lss.price}}</text></view> -->
 						<!-- <view><text class="price">¥{{lss.price}}</text></view> -->
 						<!-- <view class="number">
 						<!-- <view class="number">
@@ -111,9 +113,9 @@
 				<text class="cell-tit clamp">商品金额</text>
 				<text class="cell-tit clamp">商品金额</text>
 				<text class="cell-tip">¥{{ payAllMoney }}</text>
 				<text class="cell-tip">¥{{ payAllMoney }}</text>
 			</view>
 			</view>
-			<view class="yt-list-cell b-b" v-if="checkedPoints && integralShow">
-				<text class="cell-tit clamp">积分抵扣</text>
-				<text class="cell-tip">-¥{{ integralMoney }}</text>
+			<view class="yt-list-cell b-b" v-if="integralShow">
+				<text class="cell-tit clamp">积分</text>
+				<text class="cell-tip">{{ moneyAll.totalIntegral }}</text>
 			</view>
 			</view>
 			<view class="yt-list-cell b-b" v-if="moneyAll.vipPrice > 0">
 			<view class="yt-list-cell b-b" v-if="moneyAll.vipPrice > 0">
 				<text class="cell-tit clamp">VIP优惠</text>
 				<text class="cell-tit clamp">VIP优惠</text>
@@ -212,7 +214,7 @@ export default {
 			integralMoney: 0, //积分抵扣金额
 			integralMoney: 0, //积分抵扣金额
 			integralShow: false, //是否显示积分抵扣金额
 			integralShow: false, //是否显示积分抵扣金额
 			payType: true, //是否可支付
 			payType: true, //是否可支付
-			pinkid: '' //保存拼团商品id
+			pinkid: '' ,//保存拼团商品id
 		};
 		};
 	},
 	},
 	onLoad(option) {
 	onLoad(option) {
@@ -225,6 +227,9 @@ export default {
 			this.cartId = option.id;
 			this.cartId = option.id;
 			this.loadData();
 			this.loadData();
 		}
 		}
+		if(option.type ==3){
+			this.integralShow= true;
+		}
 		this.userinfo();
 		this.userinfo();
 	},
 	},
 	watch: {
 	watch: {

+ 1125 - 976
pages/product/product.vue

@@ -3,7 +3,9 @@
 		<view class="carousel">
 		<view class="carousel">
 			<swiper indicator-dots :circular="true" duration="400">
 			<swiper indicator-dots :circular="true" duration="400">
 				<swiper-item class="swiper-item" v-for="(item, index) in imgList" :key="index">
 				<swiper-item class="swiper-item" v-for="(item, index) in imgList" :key="index">
-					<view class="image-wrapper"><image :src="item" class="loaded" mode="scaleToFill"></image></view>
+					<view class="image-wrapper">
+						<image :src="item" class="loaded" mode="scaleToFill"></image>
+					</view>
 				</swiper-item>
 				</swiper-item>
 			</swiper>
 			</swiper>
 		</view>
 		</view>
@@ -13,20 +15,15 @@
 				<view class="title-box">
 				<view class="title-box">
 					<text class="price-tip">¥</text>
 					<text class="price-tip">¥</text>
 					<text class="price">{{ goodsObjact.price*1 }}</text>
 					<text class="price">{{ goodsObjact.price*1 }}</text>
-					<text class="m-price" v-if="goodsObjact.ot_price > goodsObjact.price">¥{{ goodsObjact.ot_price }}</text>
+					<text class="m-price"
+						v-if="goodsObjact.ot_price > goodsObjact.price">¥{{ goodsObjact.ot_price }}</text>
 					<!-- <text class="coupon-tip">7折</text> -->
 					<!-- <text class="coupon-tip">7折</text> -->
 				</view>
 				</view>
 				<view class="flex timeStop">
 				<view class="flex timeStop">
 					<view>距离结束</view>
 					<view>距离结束</view>
-					<uni-countdown
-						color="#ffffff"
-						background-color="#D65B3F"
-						splitor-color="#FFFFFF"
-						:show-day="false"
-						:hour="seckillObj.stopTimeH"
-						:minute="seckillObj.stopTimeM"
-						:second="seckillObj.stopTimeS"
-					></uni-countdown>
+					<uni-countdown color="#ffffff" background-color="#D65B3F" splitor-color="#FFFFFF" :show-day="false"
+						:hour="seckillObj.stopTimeH" :minute="seckillObj.stopTimeM"
+						:second="seckillObj.stopTimeS"></uni-countdown>
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -38,6 +35,11 @@
 				<text class="m-price" v-if="goodsObjact.ot_price > goodsObjact.price">¥{{ goodsObjact.ot_price }}</text>
 				<text class="m-price" v-if="goodsObjact.ot_price > goodsObjact.price">¥{{ goodsObjact.ot_price }}</text>
 			</view>
 			</view>
 			<text class="title" v-if="goodsType == 0">{{ goodsObjact.store_name }}</text>
 			<text class="title" v-if="goodsType == 0">{{ goodsObjact.store_name }}</text>
+			<view class="price-box" v-if="goodsType == 3">
+				<text class="price-tip">积分</text>
+				<text class="price">{{ goodsObjact.min_integral}}</text>
+			</view>
+			<text class="title" v-if="goodsType == 3">{{ goodsObjact.store_name }}</text>
 		</view>
 		</view>
 		<view class="c-list">
 		<view class="c-list">
 			<view class="c-row b-b" @click="toggleSpec">
 			<view class="c-row b-b" @click="toggleSpec">
@@ -63,7 +65,8 @@
 		<view class="detail-desc">
 		<view class="detail-desc">
 			<view class="d-header"><text>商品详情</text></view>
 			<view class="d-header"><text>商品详情</text></view>
 			<rich-text class="detail-centent" :nodes="goodsObjact.description"></rich-text>
 			<rich-text class="detail-centent" :nodes="goodsObjact.description"></rich-text>
-			<view :class="{ contentBottomHeight: goodsType == 1 || goodsType == 2, goodsBottom: goodsType == 0 }"></view>
+			<view :class="{ contentBottomHeight: goodsType == 1 || goodsType == 2, goodsBottom: goodsType == 0 }">
+			</view>
 		</view>
 		</view>
 		<!-- 底部操作菜单 -->
 		<!-- 底部操作菜单 -->
 		<view class="page-bottom" v-if="goodsType == 0">
 		<view class="page-bottom" v-if="goodsType == 0">
@@ -75,10 +78,19 @@
 					</view>
 					</view>
 				</view> -->
 				</view> -->
 				<view class="buy-now">
 				<view class="buy-now">
-					<button type="primary" class=" action-btn no-border buy-now-btn" @click.stop="toggleSpec(2)" v-if="is_bk == 0 && is_xf ==0">加入购物车</button>
-					<button type="primary" class=" action-btn no-border  add-cart-btn" @click.stop="toggleSpec(1)">立即购买</button>
+					<button type="primary" class=" action-btn no-border buy-now-btn" @click.stop="toggleSpec(2)"
+						v-if="is_bk == 0 && is_xf ==0">加入购物车</button>
+					<button type="primary" class=" action-btn no-border  add-cart-btn"
+						@click.stop="toggleSpec(1)">立即购买</button>
+				</view>
+			</view>
+		</view>
+		<view class="page-bottom" v-if="goodsType == 3">
+			<view class="action-btn-group">
+				<view class="buy-now">
+					<button type="primary" class=" action-btn no-border  add-cart-btn"
+						@click.stop="toggleSpec(1)">立即购买</button>
 				</view>
 				</view>
-				
 			</view>
 			</view>
 		</view>
 		</view>
 		<!-- 规格-模态层弹窗 -->
 		<!-- 规格-模态层弹窗 -->
@@ -90,7 +102,9 @@
 					<image :src="actionImage"></image>
 					<image :src="actionImage"></image>
 					<view class="right">
 					<view class="right">
 						<view class="good-name clamp">{{ goodsObjact.store_name }}</view>
 						<view class="good-name clamp">{{ goodsObjact.store_name }}</view>
-						<text class="price">¥{{ actionPrice * goodsNumber }}</text>
+						<!-- <text class="price">¥{{ actionPrice * goodsNumber }}</text> -->
+						<text class="price" v-if="goodsType == 3">{{ goodIntegral * goodsNumber }}</text>
+						<text class="price" v-else>¥{{ actionPrice * goodsNumber }}</text>
 						<!-- <text class="price jf">{{ goodIntegral }}</text> -->
 						<!-- <text class="price jf">{{ goodIntegral }}</text> -->
 						<!-- <text class="stock">库存:{{ goodsObjact.stock }}件</text> -->
 						<!-- <text class="stock">库存:{{ goodsObjact.stock }}件</text> -->
 						<!-- <view class="selected" v-if="goodsType == 0">
 						<!-- <view class="selected" v-if="goodsType == 0">
@@ -102,13 +116,8 @@
 				<view v-for="(item, index) in specList" :key="index" class="attr-list">
 				<view v-for="(item, index) in specList" :key="index" class="attr-list">
 					<text>{{ item.attr_name }}</text>
 					<text>{{ item.attr_name }}</text>
 					<view class="item-list">
 					<view class="item-list">
-						<text
-							v-for="(childItem, childIndex) in item.attr_value"
-							:key="childIndex"
-							class="tit"
-							:class="{ selected: childItem.check }"
-							@click="selectSpec(childItem, item, index)"
-						>
+						<text v-for="(childItem, childIndex) in item.attr_value" :key="childIndex" class="tit"
+							:class="{ selected: childItem.check }" @click="selectSpec(childItem, item, index)">
 							{{ childItem.attr }}
 							{{ childItem.attr }}
 						</text>
 						</text>
 					</view>
 					</view>
@@ -116,7 +125,8 @@
 				<view class="attr-list" style="padding-bottom: 120rpx;">
 				<view class="attr-list" style="padding-bottom: 120rpx;">
 					<text>购买数量</text>
 					<text>购买数量</text>
 					<view class="item-list">
 					<view class="item-list">
-						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
+						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax"
+							@eventChange="numberChange"></uni-number-box>
 					</view>
 					</view>
 				</view>
 				</view>
 				<button class="btn" @click.stop="buy">确定</button>
 				<button class="btn" @click.stop="buy">确定</button>
@@ -129,1070 +139,1209 @@
 </template>
 </template>
 
 
 <script>
 <script>
-// import share from '@/components/share';
-import uniNumberBox from '@/components/uni-number-box.vue';
-import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
-import { goodsDetail, cartAdd, collectAdd, collectDel, seckillGoods, groupGoods } from '@/api/product.js';
-// #ifdef H5
-import { weixindata,shareLoad } from '@/utils/wxAuthorized';
-import weixinObj from "@/plugin/jweixin-module/index.js";
-import { userInfo } from 'os';
-// #endif
+	// import share from '@/components/share';
+	import uniNumberBox from '@/components/uni-number-box.vue';
+	import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
+	import {
+		goodsDetail,
+		cartAdd,
+		collectAdd,
+		collectDel,
+		seckillGoods,
+		groupGoods
+	} from '@/api/product.js';
+	// #ifdef H5
+	import {
+		weixindata,
+		shareLoad
+	} from '@/utils/wxAuthorized';
+	import weixinObj from "@/plugin/jweixin-module/index.js";
+	import {
+		userInfo
+	} from 'os';
+	// #endif
 	import {
 	import {
 		mapState,
 		mapState,
 		mapMutations
 		mapMutations
 	} from 'vuex';
 	} from 'vuex';
-export default {
-	components: {
-		uniNumberBox,
-		uniCountdown
-	},
-	filters: {
-		address(val) {
-			let str = '';
-			if (val) {
-				str = val[0] + ' ' + val[1];
-			}
-			return str;
-		}
-	},
-	data() {
-		return {
-			details: '',
-			reply: '', //评论
-			type: 1, //默认支付方式add为
-			goodsNumber: 1, //购买数量
-			goodsid: '', //商品id
-			specClass: 'none', //显示隐藏弹窗
-			shareList: [], //分享列表
-			goodsObjact: {}, //保存商品数据
-			storeObjact: {}, //保存店铺数据
-			//图片循环
-			imgList: [],
-			specList: [],
-			// 对比对象
-			productValue: [],
-			actionPrice: 0, //默认选中商品价格
-			actionImage: '', //默认选中图片
-			uniqueId: '', //选中的商品分类
-			specSelected: [], //选中的分类
-			specSelectedName: '', //选中分类名称
-			goodsNumberMax: 0, //最大可购买数量
-			shopId: '', //商店id
-			//商店信息
-			shopInfo: {
-				logo: '',
-				title: ''
-			}, //商店信息
-			goodsType: 0, //商品类型1秒杀商品0为普通商品2为拼团商品
-			// 秒杀数据保存
-			seckillObj: {
-				stopTime: 0, //结束时间
-				stop: false, //是否结束
-				stopTimeH: 0, //小时
-				stopTimeM: 0, //分钟
-				stopTimeS: 0 //秒钟
-			},
-			// 拼团数据保存
-			pink: {
-				id: '', //拼团编号
-				uid: '', //用户编号
-				people: '', //拼团人数
-				price: '', //拼团价格
-				stop_time: '', //拼团结束时间
-				nickname: '', //团长昵称
-				avatar: '', //团长头像
-				count: '', //拼团剩余人数
-				h: '', //时
-				i: '', //分
-				s: '' //秒
-			},
-			is_bk: 0,
-			is_xf: 0,
-			goodIntegral: 0,//需要使用的积分
-		};
-	},
-	async onLoad(options) {
-		let obj = this;
-		if(options.is_bk) {
-			obj.is_bk = options.is_bk
-		}
-		if(options.is_xf) {
-			obj.is_xf = options.is_xf
-		}
-		//保存商品id
-		this.goodsid = options.id;
-		// 判断有无人邀请
-		if (options.spread) {
-			// 存储邀请人
-			uni.setStorageSync('spread', options.spread);
-		}
-		// 判断是否为秒杀商品
-		if (options.type == 1) {
-			// 保存商品类型
-			this.goodsType = 1;
-			// 保存结束时间
-			this.seckillObj.stopTime = options.stoptime;
-			// 获取当前时间毫秒数
-			let stoptime = options.stoptime * 1000;
-			// 获取当前时间
-			let acitonTime = new Date();
-			// 判断当前时间是否大于结束时间
-			if (acitonTime.getTime() > stoptime) {
-				// 当前秒杀时间已经结束
-				this.seckillObj.stop = true;
-			} else {
-				// 计算倒计时
-				this.timeComputed(stoptime, this.seckillObj);
-			}
-			this.seckillGoods();
-			return;
-		}
-		if (options.type == 2) {
-			// 保存当前拼团商品类型
-			this.goodsType = 2;
-			// 家在数据
-			this.groupGoods();
-			return;
-		}
-		if (this.goodsType == 0) {
-			// 加载普通商品详情
-			this.goodsDetail();
-		}
-	},
-	computed: {
-		// #ifdef H5
-		...mapState(['weichatObj', 'baseURL', 'urlFile']),
-		
-		// #endif
-		...mapState('user', ['userInfo','hasLogin'])
-	},
-	// 分享
-	onShareAppMessage(options) {
-		// 设置菜单中的转发按钮触发转发事件时的转发内容
-		let pages = getCurrentPages(); //获取加载的页面
-		let currentPage = pages[pages.length - 1]; //获取当前页面的对象
-		let url = currentPage.route; //当前页面url
-		let item = currentPage.options; //如果要获取url中所带的参数可以查看options
-		let name = this.goodsObjact.store_name || this.goodsObjact.title;
-		let shareObj = {
-			title: name, // 默认是小程序的名称(可以写slogan等)
-			path: url + '?id=' + item.id + '&scene=' + this.userInfo.uid + '&type=' + this.goodsType, // 默认是当前页面,必须是以‘/’开头的完整路径
-			imageUrl: this.goodsObjact.image,
-			success: function(res) {
-				console.log(shareObj.path, 'path+++++++++++++++++++');
-				// 转发成功之后的回调
-				if (res.errMsg == 'shareAppMessage:ok') {
-				}
-			},
-			fail: function() {
-				// 转发失败之后的回调
-				if (res.errMsg == 'shareAppMessage:fail cancel') {
-					// 用户取消转发
-				} else if (res.errMsg == 'shareAppMessage:fail') {
-					// 转发失败,其中 detail message 为详细失败信息
+	export default {
+		components: {
+			uniNumberBox,
+			uniCountdown
+		},
+		filters: {
+			address(val) {
+				let str = '';
+				if (val) {
+					str = val[0] + ' ' + val[1];
 				}
 				}
+				return str;
 			}
 			}
-		};
-	
-		return shareObj;
-	},
-	methods: {
-		navTo(url) {
-			uni.navigateTo({
-				url
-			});
-		},
-		// 转换字符串为数字
-		moneyNum: function(value) {
-			return +value;
 		},
 		},
-		navToProductGoods() {
-			uni.redirectTo({
-				url: '/pages/product/product?id=' + this.goodsObjact.product_id
-			});
+		data() {
+			return {
+				details: '',
+				reply: '', //评论
+				type: 1, //默认支付方式add为
+				goodsNumber: 1, //购买数量
+				goodsid: '', //商品id
+				specClass: 'none', //显示隐藏弹窗
+				shareList: [], //分享列表
+				goodsObjact: {}, //保存商品数据
+				storeObjact: {}, //保存店铺数据
+				//图片循环
+				imgList: [],
+				specList: [],
+				// 对比对象
+				productValue: [],
+				actionPrice: 0, //默认选中商品价格
+				actionImage: '', //默认选中图片
+				uniqueId: '', //选中的商品分类
+				specSelected: [], //选中的分类
+				specSelectedName: '', //选中分类名称
+				goodsNumberMax: 0, //最大可购买数量
+				shopId: '', //商店id
+				//商店信息
+				shopInfo: {
+					logo: '',
+					title: ''
+				}, //商店信息
+				goodsType: 0, //商品类型1秒杀商品0为普通商品2为拼团商品3为积分商品
+				// 秒杀数据保存
+				seckillObj: {
+					stopTime: 0, //结束时间
+					stop: false, //是否结束
+					stopTimeH: 0, //小时
+					stopTimeM: 0, //分钟
+					stopTimeS: 0 //秒钟
+				},
+				// 拼团数据保存
+				pink: {
+					id: '', //拼团编号
+					uid: '', //用户编号
+					people: '', //拼团人数
+					price: '', //拼团价格
+					stop_time: '', //拼团结束时间
+					nickname: '', //团长昵称
+					avatar: '', //团长头像
+					count: '', //拼团剩余人数
+					h: '', //时
+					i: '', //分
+					s: '' //秒
+				},
+				is_bk: 0,
+				is_xf: 0,
+				goodIntegral: 0, //需要使用的积分
+			};
 		},
 		},
-		// 获取商品信息
-		goodsDetail() {
+		async onLoad(options) {
 			let obj = this;
 			let obj = this;
-			goodsDetail({}, this.goodsid).then(function({ data }) {
-				obj.details = data;
-				let goods = data.storeInfo;
-				let store_info = data.system_store; // 保存店铺信息
-				console.log(store_info);
-				obj.storeObjact = store_info;
-				obj.goodsObjact = goods;
-				if (obj.goodsObjact.description != null) {
-					obj.goodsObjact.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
-				} //小程序商品详情图超出屏幕问题
-				// console.log()
-				obj.reply = data.reply; //保存评论列表
-				obj.imgList = goods.slider_image; //保存轮播图
-				obj.specList = data.productAttr; //保存分类列表
-				console.log(data.productAttr);
-				obj.productValue = data.productValue; //保存分类查询数据
-				 //保存默认选中商品价格
-				obj.actionPrice = goods.price;
-				obj.actionImage = goods.image_base; //保存默认选中商品价格
-				obj.goodsNumberMax = goods.stock; //保存默认选中最大可购买商品数量
-				obj.shopId = data.mer_id; //保存商店id
-			
-				// 保存默认选中的对象
-				obj.specSelected = []; //初始化默认选择对象
-				for (let i = 0; i < obj.specList.length; i++) {
-					// 设置默认数据
-					let attrValue = obj.specList[i].attr_value[0];
-					attrValue.check = true;
-					obj.specSelected.push(attrValue.attr);
-				}
-
-				//保存默认选中的对象字符串名称
-				let str = obj.specSelected.join(',');
-				// 设置默认值
-				obj.actionImage = obj.productValue[str].image;
-				obj.uniqueId = obj.productValue[str].unique;
-				obj.goodIntegral = obj.productValue[str].integral
-				if(obj.is_xf == 1) {
-					obj.goodsNumberMax = 1
+			if (options.is_bk) {
+				obj.is_bk = options.is_bk
+			}
+			if (options.is_xf) {
+				obj.is_xf = options.is_xf
+			}
+			//保存商品id
+			this.goodsid = options.id;
+			// 判断有无人邀请
+			if (options.spread) {
+				// 存储邀请人
+				uni.setStorageSync('spread', options.spread);
+			}
+			// 判断是否为秒杀商品
+			if (options.type == 1) {
+				// 保存商品类型
+				this.goodsType = 1;
+				// 保存结束时间
+				this.seckillObj.stopTime = options.stoptime;
+				// 获取当前时间毫秒数
+				let stoptime = options.stoptime * 1000;
+				// 获取当前时间
+				let acitonTime = new Date();
+				// 判断当前时间是否大于结束时间
+				if (acitonTime.getTime() > stoptime) {
+					// 当前秒杀时间已经结束
+					this.seckillObj.stop = true;
+				} else {
+					// 计算倒计时
+					this.timeComputed(stoptime, this.seckillObj);
 				}
 				}
-				console.log(obj.goodIntegral,'obj.goodIntegral')
-				// #ifdef H5
-				obj.shareDate();
-				// #endif
-			});
-		},
-		// #ifdef H5
-		// 加载微信html5页面分享方法
-		shareDate() {
-			let obj = this;
-			// 保存分享人id链接
-			let url = window.location.href + '&spread=' + this.userInfo.uid;
-			// 判断是否微信浏览器
-			let bool = uni.getStorageSync('weichatBrowser') || '';
-			if (bool) {
-				// 过滤微信强制添加的链接地址
-				url = url.replace(/[\?,&]from=singlemessage/g, '');
-				let data = {
-					link: url, // 分享链接
-					imgUrl: obj.goodsObjact.image, // 分享图标
-					desc: obj.goodsObjact.store_info,
-					title: obj.goodsObjact.store_name,
-					success: function(e) {
-						console.log(e);
-					}
-				};
-				shareLoad(data);
+				this.seckillGoods();
+				return;
 			}
 			}
-		},
-		// #endif
-		// 购买数量变化
-		numberChange(e) {
-			this.goodsNumber = e.number;
-		},
-		//规格弹窗开关
-		toggleSpec(str) {
-			if (this.specClass === 'show') {
-				this.specClass = 'hide';
-				setTimeout(() => {
-					this.specClass = 'none';
-				}, 250);
-			} else if (this.specClass === 'none') {
-				this.specClass = 'show';
+			if (options.type == 2) {
+				// 保存当前拼团商品类型
+				this.goodsType = 2;
+				// 家在数据
+				this.groupGoods();
+				return;
 			}
 			}
-			// 保存当前购买类型
-			this.type = str;
-		},
-		//选择规格
-		selectSpec(item, arr, ind) {
-			let obj = this
-			arr.attr_value.forEach(function(e) {
-				e.check = false;
-			});
-			item.check = true;
-			this.specSelected[ind] = item.attr;
-			let str = this.specSelected.join(',');
-			this.specSelectedName = this.specSelected.join(' ');
-			if (this.productValue[str]) {
-				let data = this.productValue[str];
-				this.actionPrice = data.price;
-				// if(obj.userInfo && obj.userInfo.level == 1) {
-				// 	obj.actionPrice = obj.goodsObjact.vip_repurchase
-				// }else if(obj.userInfo && obj.userInfo.level == 2) {
-				// 	obj.actionPrice = obj.goodsObjact.agent_repurchase
-				// }else {
-				// 	obj.actionPrice = goods.price;
-				// }
-				this.goodsNumberMax = data.stock;
-				this.actionImage = data.image;
-				this.uniqueId = data.unique;
-				this.goodIntegral = data.integral
-				console.log(this.goodIntegral,'xuanz')
+			if (this.goodsType == 0) {
+				// 加载普通商品详情
+				this.goodsDetail();
 			}
 			}
-			if(this.is_xf == 1) {
-				this.goodsNumberMax = 1
+			if (options.type == 3) {
+				this.goodsType = 3;
+				this.goodsDetail();
 			}
 			}
 		},
 		},
-		//分享
-		share() {
-			this.$refs.share.toggleMask();
+		computed: {
+			// #ifdef H5
+			...mapState(['weichatObj', 'baseURL', 'urlFile']),
+
+			// #endif
+			...mapState('user', ['userInfo', 'hasLogin'])
 		},
 		},
-		//收藏
-		toFavorite(item) {
-			let obj = this;
-			item.userCollect = !item.userCollect;
-			if (!item.userCollect) {
-				collectDel({ id: obj.goodsid, category: 'product' }).then(function(e) {
-					uni.showToast({
-						title: '成功取消收藏',
-						type: 'top',
-						duration: 1500
-					});
+		// 分享
+		onShareAppMessage(options) {
+			// 设置菜单中的转发按钮触发转发事件时的转发内容
+			let pages = getCurrentPages(); //获取加载的页面
+			let currentPage = pages[pages.length - 1]; //获取当前页面的对象
+			let url = currentPage.route; //当前页面url
+			let item = currentPage.options; //如果要获取url中所带的参数可以查看options
+			let name = this.goodsObjact.store_name || this.goodsObjact.title;
+			let shareObj = {
+				title: name, // 默认是小程序的名称(可以写slogan等)
+				path: url + '?id=' + item.id + '&scene=' + this.userInfo.uid + '&type=' + this
+				.goodsType, // 默认是当前页面,必须是以‘/’开头的完整路径
+				imageUrl: this.goodsObjact.image,
+				success: function(res) {
+					console.log(shareObj.path, 'path+++++++++++++++++++');
+					// 转发成功之后的回调
+					if (res.errMsg == 'shareAppMessage:ok') {}
+				},
+				fail: function() {
+					// 转发失败之后的回调
+					if (res.errMsg == 'shareAppMessage:fail cancel') {
+						// 用户取消转发
+					} else if (res.errMsg == 'shareAppMessage:fail') {
+						// 转发失败,其中 detail message 为详细失败信息
+					}
+				}
+			};
+
+			return shareObj;
+		},
+		methods: {
+			navTo(url) {
+				uni.navigateTo({
+					url
 				});
 				});
-			} else {
-				collectAdd({ id: obj.goodsid, category: 'product' }).then(function(e) {
-					uni.showToast({
-						title: '成功加入收藏',
-						type: 'top',
-						duration: 1500
-					});
+			},
+			// 转换字符串为数字
+			moneyNum: function(value) {
+				return +value;
+			},
+			navToProductGoods() {
+				uni.redirectTo({
+					url: '/pages/product/product?id=' + this.goodsObjact.product_id
 				});
 				});
-			}
-		},
-		// 立即购买
-		buy() {
-			let obj = this;
-			let data = {
-				cartNum: obj.goodsNumber, //商品数量
-				uniqueId: obj.uniqueId, //商品标签
-				new: '1', //商品是否新增加到购物车1为不加入0为加入
-				mer_id: obj.shopId
-				// type: 0,//0为余额支付  1为消费券支付 2为积分支付
-			};
-			if (obj.type == 2) {
-				data.new = 0;
-			}
-			if (obj.goodsType == 0) {
-				data.productId = obj.goodsid; //商品编号
-			}
-			// 判断是否为秒杀商品
-			if (obj.goodsType == 1) {
-				data.secKillId = obj.goodsid; //秒杀商品编号
-				data.productId = obj.goodsObjact.product_id; //商品编号
-				// 判断是否秒杀已经结束
-				if (obj.seckillObj.stop) {
-					uni.showModal({
-						title: '提示',
-						content: '当前活动已经结束',
-						showCancel: false
-					});
-					return;
+			},
+			// 获取商品信息
+			goodsDetail() {
+				let obj = this;
+				goodsDetail({}, this.goodsid).then(function({
+					data
+				}) {
+					obj.details = data;
+					let goods = data.storeInfo;
+					let store_info = data.system_store; // 保存店铺信息
+					console.log(store_info);
+					obj.storeObjact = store_info;
+					obj.goodsObjact = goods;
+					if (obj.goodsObjact.description != null) {
+						obj.goodsObjact.description = obj.goodsObjact.description.replace(/\<img/gi,
+							'<img class="rich-img"');
+					} //小程序商品详情图超出屏幕问题
+					// console.log()
+					obj.reply = data.reply; //保存评论列表
+					obj.imgList = goods.slider_image; //保存轮播图
+					obj.specList = data.productAttr; //保存分类列表
+					console.log(data.productAttr);
+					obj.productValue = data.productValue; //保存分类查询数据
+					//保存默认选中商品价格
+					obj.actionPrice = goods.price;
+					obj.actionImage = goods.image_base; //保存默认选中商品价格
+					obj.goodsNumberMax = goods.stock; //保存默认选中最大可购买商品数量
+					obj.shopId = data.mer_id; //保存商店id
+
+					// 保存默认选中的对象
+					obj.specSelected = []; //初始化默认选择对象
+					for (let i = 0; i < obj.specList.length; i++) {
+						// 设置默认数据
+						let attrValue = obj.specList[i].attr_value[0];
+						attrValue.check = true;
+						obj.specSelected.push(attrValue.attr);
+					}
+
+					//保存默认选中的对象字符串名称
+					let str = obj.specSelected.join(',');
+					// 设置默认值
+					obj.actionImage = obj.productValue[str].image;
+					obj.uniqueId = obj.productValue[str].unique;
+					obj.goodIntegral = obj.productValue[str].integral
+					if (obj.is_xf == 1) {
+						obj.goodsNumberMax = 1
+					}
+					console.log(obj.goodIntegral, 'obj.goodIntegral')
+					// #ifdef H5
+					obj.shareDate();
+					// #endif
+				});
+			},
+			// #ifdef H5
+			// 加载微信html5页面分享方法
+			shareDate() {
+				let obj = this;
+				// 保存分享人id链接
+				let url = window.location.href + '&spread=' + this.userInfo.uid;
+				// 判断是否微信浏览器
+				let bool = uni.getStorageSync('weichatBrowser') || '';
+				if (bool) {
+					// 过滤微信强制添加的链接地址
+					url = url.replace(/[\?,&]from=singlemessage/g, '');
+					let data = {
+						link: url, // 分享链接
+						imgUrl: obj.goodsObjact.image, // 分享图标
+						desc: obj.goodsObjact.store_info,
+						title: obj.goodsObjact.store_name,
+						success: function(e) {
+							console.log(e);
+						}
+					};
+					shareLoad(data);
 				}
 				}
-			}
-			// 判断是否为拼团商品
-			if (obj.goodsType == 2) {
-				data.combinationId = obj.goodsid; //拼团编号
-				data.productId = obj.goodsObjact.product_id; //商品编号
-			}
-			cartAdd(data)
-				.then(function({ data }) {
-					if (obj.type == 1) {
-						// 跳转到支付页
-						uni.navigateTo({
-							url: '/pages/order/createOrder?id=' + data.cartId + '&goodsType=' + obj.goodsType + '&is_xf=' + obj.is_xf + '&is_bk=' + obj.is_bk
+			},
+			// #endif
+			// 购买数量变化
+			numberChange(e) {
+				this.goodsNumber = e.number;
+			},
+			//规格弹窗开关
+			toggleSpec(str) {
+				if (this.specClass === 'show') {
+					this.specClass = 'hide';
+					setTimeout(() => {
+						this.specClass = 'none';
+					}, 250);
+				} else if (this.specClass === 'none') {
+					this.specClass = 'show';
+				}
+				// 保存当前购买类型
+				this.type = str;
+			},
+			//选择规格
+			selectSpec(item, arr, ind) {
+				let obj = this
+				arr.attr_value.forEach(function(e) {
+					e.check = false;
+				});
+				item.check = true;
+				this.specSelected[ind] = item.attr;
+				let str = this.specSelected.join(',');
+				this.specSelectedName = this.specSelected.join(' ');
+				if (this.productValue[str]) {
+					let data = this.productValue[str];
+					this.actionPrice = data.price;
+					// if(obj.userInfo && obj.userInfo.level == 1) {
+					// 	obj.actionPrice = obj.goodsObjact.vip_repurchase
+					// }else if(obj.userInfo && obj.userInfo.level == 2) {
+					// 	obj.actionPrice = obj.goodsObjact.agent_repurchase
+					// }else {
+					// 	obj.actionPrice = goods.price;
+					// }
+					this.goodsNumberMax = data.stock;
+					this.actionImage = data.image;
+					this.uniqueId = data.unique;
+					this.goodIntegral = data.integral
+					console.log(this.goodIntegral, 'xuanz')
+				}
+				if (this.is_xf == 1) {
+					this.goodsNumberMax = 1
+				}
+			},
+			//分享
+			share() {
+				this.$refs.share.toggleMask();
+			},
+			//收藏
+			toFavorite(item) {
+				let obj = this;
+				item.userCollect = !item.userCollect;
+				if (!item.userCollect) {
+					collectDel({
+						id: obj.goodsid,
+						category: 'product'
+					}).then(function(e) {
+						uni.showToast({
+							title: '成功取消收藏',
+							type: 'top',
+							duration: 1500
 						});
 						});
-					}
-					if (obj.type == 2) {
+					});
+				} else {
+					collectAdd({
+						id: obj.goodsid,
+						category: 'product'
+					}).then(function(e) {
 						uni.showToast({
 						uni.showToast({
-							title: '成功加入购物车',
+							title: '成功加入收藏',
 							type: 'top',
 							type: 'top',
-							duration: 2000
+							duration: 1500
+						});
+					});
+				}
+			},
+			// 立即购买
+			buy() {
+				let obj = this;
+				let data = {
+					cartNum: obj.goodsNumber, //商品数量
+					uniqueId: obj.uniqueId, //商品标签
+					new: '1', //商品是否新增加到购物车1为不加入0为加入
+					mer_id: obj.shopId
+					// type: 0,//0为余额支付  1为消费券支付 2为积分支付
+				};
+				if (obj.type == 2) {
+					data.new = 0;
+				}
+				if (obj.goodsType == 0) {
+					data.productId = obj.goodsid; //商品编号
+				}
+				if (obj.goodsType == 3) {
+					data.productId = obj.goodsid; //商品编号
+					console.log(obj.goodsObjact,'data.productId');
+				}
+				// 判断是否为秒杀商品
+				if (obj.goodsType == 1) {
+					data.secKillId = obj.goodsid; //秒杀商品编号
+					data.productId = obj.goodsObjact.product_id; //商品编号
+					// 判断是否秒杀已经结束
+					if (obj.seckillObj.stop) {
+						uni.showModal({
+							title: '提示',
+							content: '当前活动已经结束',
+							showCancel: false
 						});
 						});
-						obj.toggleSpec();
+						return;
 					}
 					}
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		stopPrevent() {}
-	}
-};
+				}
+				// 判断是否为拼团商品
+				if (obj.goodsType == 2) {
+					data.combinationId = obj.goodsid; //拼团编号
+					data.productId = obj.goodsObjact.product_id; //商品编号
+				}
+				cartAdd(data)
+					.then(function({
+						data
+					}) {
+						if (obj.type == 1) {
+							// 跳转到支付页
+							uni.navigateTo({
+								url: '/pages/order/createOrder?id=' + data.cartId + '&goodsType=' + obj
+									.goodsType + '&is_xf=' + obj.is_xf + '&is_bk=' + obj.is_bk
+							});
+						}
+						if (obj.type == 2) {
+							uni.showToast({
+								title: '成功加入购物车',
+								type: 'top',
+								duration: 2000
+							});
+							obj.toggleSpec();
+						}
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			stopPrevent() {}
+		}
+	};
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
-page {
-	background: $page-color-base;
-}
-//秒杀底部高度
-.seckillBottom {
-	height: 110rpx;
-}
-// 文章页底部高度撑开
-.contentBottomHeight {
-	height: 110rpx;
-}
-//默认商品底部高度
-.goodsBottom {
-	height: 100rpx;
-}
-.iconenter {
-	font-size: $font-base + 2rpx;
-	color: #888;
-}
-.carousel {
-	/* #ifdef APP-PLUS */
-	padding-top: var(--status-bar-height);
-	/* #endif */
-	height: 722rpx;
-	position: relative;
-	swiper {
-		height: 100%;
-	}
-	.image-wrapper {
-		width: 100%;
-		height: 100%;
-	}
-	.swiper-item {
-		display: flex;
-		justify-content: center;
-		align-content: center;
-		// height: 750rpx;
-		height: 710rpx;
-		overflow: hidden;
-		image {
-			width: 100%;
-			height: 100%;
-		}
+	page {
+		background: $page-color-base;
 	}
 	}
-}
-// 秒杀
-.seckill-box-title {
-	background: linear-gradient(90deg, rgba(239, 78, 81, 1) 0%, rgba(244, 113, 59, 1) 100%) !important;
-	.price,
-	.price-tip,
-	.timeStop,
-	.m-price {
-		color: #ffffff !important;
-	}
-	.price-tip {
-		font-size: $font-base;
+
+	//秒杀底部高度
+	.seckillBottom {
+		height: 110rpx;
 	}
 	}
-	.price {
-		font-size: 45rpx !important;
-		font-weight: bold;
+
+	// 文章页底部高度撑开
+	.contentBottomHeight {
+		height: 110rpx;
 	}
 	}
-	.timeStop {
+
+	//默认商品底部高度
+	.goodsBottom {
+		height: 100rpx;
 	}
 	}
-}
-// 底部拼团、秒杀支付按钮
-.goods-pay-box {
-	position: fixed;
-	left: 0;
-	bottom: 0;
-	z-index: 95;
-	width: 750rpx;
-	height: 100rpx;
-	line-height: 1;
-	color: #ffffff;
-	text-align: center;
-	font-size: $font-lg;
-	.bgLine {
-		background: linear-gradient(90deg, rgba(239, 78, 81, 1) 0%, rgba(244, 113, 59, 1) 100%);
+
+	.iconenter {
+		font-size: $font-base + 2rpx;
+		color: #888;
 	}
 	}
-	// 拼团支付按钮
-	.goods-pay {
-		display: flex;
-		align-content: center;
-		flex-wrap: wrap;
-		justify-content: center;
-		.goods-buttom,
-		.goods-buttom-money {
+
+	.carousel {
+		/* #ifdef APP-PLUS */
+		padding-top: var(--status-bar-height);
+		/* #endif */
+		height: 722rpx;
+		position: relative;
+
+		swiper {
+			height: 100%;
+		}
+
+		.image-wrapper {
 			width: 100%;
 			width: 100%;
+			height: 100%;
 		}
 		}
-		.goods-buttom-money {
-			font-size: $font-base;
+
+		.swiper-item {
+			display: flex;
+			justify-content: center;
+			align-content: center;
+			// height: 750rpx;
+			height: 710rpx;
+			overflow: hidden;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
 		}
 		}
 	}
 	}
-	.goods-pay-stop,
-	.goods-pay {
-		padding: 15rpx 0;
-		height: 100%;
-		width: 100%;
-	}
-	.goods-pay-stop {
-		background: $color-gray;
-		line-height: 70rpx;
-	}
-}
-/* 标题简介 */
-.introduce-section {
-	background: #fff;
-	padding: 20rpx 30rpx;
-	.title {
-		font-size: 32rpx;
-		color: $font-color-dark;
-		height: 50rpx;
-		line-height: 50rpx;
-	}
-	.price-box {
-		display: flex;
-		align-items: baseline;
-		height: 64rpx;
-		padding: 10rpx 0;
-		font-size: 26rpx;
-		color: #FD3B39;
-	}
-	.price {
-		font-size: $font-lg + 2rpx;
-	}
-	.m-price {
-		margin: 0 12rpx;
-		color: $font-color-light;
-		text-decoration: line-through;
-	}
-	.pt {
-		text-decoration:none;
-	}
-	.coupon-tip {
-		align-items: center;
-		padding: 4rpx 10rpx;
-		background: $uni-color-primary;
-		font-size: $font-sm;
-		color: #fff;
-		border-radius: 6rpx;
-		line-height: 1;
-		transform: translateY(-4rpx);
-	}
-	.bot-row {
-		display: flex;
-		align-items: center;
-		height: 50rpx;
-		font-size: $font-sm;
-		color: $font-color-light;
-		text {
-			flex: 1;
+
+	// 秒杀
+	.seckill-box-title {
+		background: linear-gradient(90deg, rgba(239, 78, 81, 1) 0%, rgba(244, 113, 59, 1) 100%) !important;
+
+		.price,
+		.price-tip,
+		.timeStop,
+		.m-price {
+			color: #ffffff !important;
 		}
 		}
-	}
-}
-/* 分享 */
-.share-section {
-	display: flex;
-	align-items: center;
-	color: $font-color-base;
-	background: linear-gradient(left, #fdf5f6, #fbebf6);
-	padding: 12rpx 30rpx;
-	.share-icon {
-		display: flex;
-		align-items: center;
-		width: 70rpx;
-		height: 30rpx;
-		line-height: 1;
-		border: 1px solid $uni-color-primary;
-		border-radius: 4rpx;
-		position: relative;
-		overflow: hidden;
-		font-size: 22rpx;
-		color: $uni-color-primary;
-		&:after {
-			content: '';
-			width: 50rpx;
-			height: 50rpx;
-			border-radius: 50%;
-			left: -20rpx;
-			top: -12rpx;
-			position: absolute;
-			background: $uni-color-primary;
+
+		.price-tip {
+			font-size: $font-base;
 		}
 		}
-	}
-	.iconfavorfill {
-		position: relative;
-		z-index: 1;
-		font-size: 24rpx;
-		margin-left: 2rpx;
-		margin-right: 10rpx;
-		color: #fff;
-		line-height: 1;
-	}
-	.tit {
-		font-size: $font-base;
-		margin-left: 10rpx;
-	}
-	.iconprompt {
-		padding: 10rpx;
-		font-size: 30rpx;
-		line-height: 1;
-	}
-	.share-btn {
-		flex: 1;
-		text-align: right;
-		font-size: $font-sm;
-		color: $uni-color-primary;
-	}
-	.iconenter {
-		font-size: $font-sm;
-		margin-left: 4rpx;
-		color: $uni-color-primary;
-	}
-}
-
-.c-list {
-	margin-top: 20rpx;
-	font-size: $font-sm + 2rpx;
-	color: $font-color-base;
-	background: #fff;
-	.c-row {
-		display: flex;
-		align-items: center;
-		padding: 20rpx 30rpx;
-		position: relative;
-	}
-	.tit {
-		width: 140rpx;
-	}
-	.con {
-		flex: 1;
-		color: $font-color-dark;
-		.selected-text {
-			margin-right: 10rpx;
-			.num {
-				color: #FD3B39;
-			}
+
+		.price {
+			font-size: 45rpx !important;
+			font-weight: bold;
 		}
 		}
+
+		.timeStop {}
 	}
 	}
-	.bz-list {
-		height: 40rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-dark;
-		text {
-			display: inline-block;
-			margin-right: 30rpx;
+
+	// 底部拼团、秒杀支付按钮
+	.goods-pay-box {
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 95;
+		width: 750rpx;
+		height: 100rpx;
+		line-height: 1;
+		color: #ffffff;
+		text-align: center;
+		font-size: $font-lg;
+
+		.bgLine {
+			background: linear-gradient(90deg, rgba(239, 78, 81, 1) 0%, rgba(244, 113, 59, 1) 100%);
 		}
 		}
-	}
-	.con-list {
-		flex: 1;
-		display: flex;
-		flex-direction: column;
-		color: $font-color-dark;
-		line-height: 40rpx;
-	}
-	.red {
-		color: $uni-color-primary;
-	}
-}
-
-/* 评价 */
-.eva-section {
-	display: flex;
-	flex-direction: column;
-	padding: 20rpx 30rpx;
-	background: #fff;
-	margin-top: 16rpx;
-	.e-header {
-		display: flex;
-		align-items: center;
-		height: 70rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-light;
-		.tit {
-			font-size: $font-base + 2rpx;
-			color: $font-color-dark;
-			margin-right: 4rpx;
+
+		// 拼团支付按钮
+		.goods-pay {
+			display: flex;
+			align-content: center;
+			flex-wrap: wrap;
+			justify-content: center;
+
+			.goods-buttom,
+			.goods-buttom-money {
+				width: 100%;
+			}
+
+			.goods-buttom-money {
+				font-size: $font-base;
+			}
 		}
 		}
-		.tip {
-			flex: 1;
-			text-align: right;
+
+		.goods-pay-stop,
+		.goods-pay {
+			padding: 15rpx 0;
+			height: 100%;
+			width: 100%;
 		}
 		}
-		.iconenter {
-			margin-left: 10rpx;
+
+		.goods-pay-stop {
+			background: $color-gray;
+			line-height: 70rpx;
 		}
 		}
 	}
 	}
-}
-.eva-box {
-	display: flex;
-	padding: 20rpx 0;
-	.portrait {
-		flex-shrink: 0;
-		width: 80rpx;
-		height: 80rpx;
-		border-radius: 100px;
-	}
-	.right {
-		flex: 1;
-		display: flex;
-		flex-direction: column;
-		font-size: $font-base;
-		color: $font-color-base;
-		padding-left: 26rpx;
-		.con {
-			font-size: $font-base;
+
+	/* 标题简介 */
+	.introduce-section {
+		background: #fff;
+		padding: 20rpx 30rpx;
+
+		.title {
+			font-size: 32rpx;
 			color: $font-color-dark;
 			color: $font-color-dark;
-			padding: 20rpx 0;
+			height: 50rpx;
+			line-height: 50rpx;
 		}
 		}
-		.bot {
+
+		.price-box {
 			display: flex;
 			display: flex;
-			justify-content: space-between;
-			font-size: $font-sm;
+			align-items: baseline;
+			height: 64rpx;
+			padding: 10rpx 0;
+			font-size: 26rpx;
+			color: #FD3B39;
+		}
+
+		.price {
+			font-size: $font-lg + 2rpx;
+		}
+
+		.m-price {
+			margin: 0 12rpx;
 			color: $font-color-light;
 			color: $font-color-light;
+			text-decoration: line-through;
 		}
 		}
-	}
-}
-
-.eva-boxs {
-	width: 100%;
-	overflow: hidden;
-	padding: 10px 28rpx;
-	background: #f4f4f4;
-	border-radius: 12rpx;
-	font-size: $font-sm + 2rpx;
-	color: #333;
-	.portrait {
-		flex-shrink: 0;
-		width: 80rpx;
-		height: 80rpx;
-		border-radius: 100px;
-	}
-	.right {
-		flex: 1;
-		display: flex;
-		flex-direction: column;
-		font-size: $font-base;
-		color: $font-color-base;
-		.con {
-			font-size: $font-base;
-			color: $font-color-dark;
+
+		.pt {
+			text-decoration: none;
+		}
+
+		.coupon-tip {
+			align-items: center;
+			padding: 4rpx 10rpx;
+			background: $uni-color-primary;
+			font-size: $font-sm;
+			color: #fff;
+			border-radius: 6rpx;
+			line-height: 1;
+			transform: translateY(-4rpx);
 		}
 		}
-		.bot {
+
+		.bot-row {
 			display: flex;
 			display: flex;
-			justify-content: space-between;
+			align-items: center;
+			height: 50rpx;
 			font-size: $font-sm;
 			font-size: $font-sm;
 			color: $font-color-light;
 			color: $font-color-light;
+
+			text {
+				flex: 1;
+			}
 		}
 		}
 	}
 	}
-}
-/*  详情 */
-.detail-desc {
-	background: #fff;
-	margin-top: 16rpx;
-	/deep/ img {
-		max-width: 100% !important;
-		display: inline !important;
-	}
-	/deep/ div {
-		max-width: 100% !important;
-	}
-	.d-header {
+
+	/* 分享 */
+	.share-section {
 		display: flex;
 		display: flex;
-		justify-content: center;
 		align-items: center;
 		align-items: center;
-		height: 80rpx;
-		font-size: $font-base + 2rpx;
-		color: $font-color-dark;
-		position: relative;
+		color: $font-color-base;
+		background: linear-gradient(left, #fdf5f6, #fbebf6);
+		padding: 12rpx 30rpx;
 
 
-		text {
-			padding: 0 20rpx;
-			background: #fff;
+		.share-icon {
+			display: flex;
+			align-items: center;
+			width: 70rpx;
+			height: 30rpx;
+			line-height: 1;
+			border: 1px solid $uni-color-primary;
+			border-radius: 4rpx;
+			position: relative;
+			overflow: hidden;
+			font-size: 22rpx;
+			color: $uni-color-primary;
+
+			&:after {
+				content: '';
+				width: 50rpx;
+				height: 50rpx;
+				border-radius: 50%;
+				left: -20rpx;
+				top: -12rpx;
+				position: absolute;
+				background: $uni-color-primary;
+			}
+		}
+
+		.iconfavorfill {
 			position: relative;
 			position: relative;
 			z-index: 1;
 			z-index: 1;
+			font-size: 24rpx;
+			margin-left: 2rpx;
+			margin-right: 10rpx;
+			color: #fff;
+			line-height: 1;
 		}
 		}
-		&:after {
-			position: absolute;
-			left: 50%;
-			top: 50%;
-			transform: translateX(-50%);
-			width: 300rpx;
-			height: 0;
-			content: '';
-			border-bottom: 1px solid #ccc;
+
+		.tit {
+			font-size: $font-base;
+			margin-left: 10rpx;
 		}
 		}
-	}
-}
 
 
-/* 规格选择弹窗 */
-.attr-content {
-	padding: 10rpx 0 0;
-	.a-t {
-		padding: 0 30rpx;
-		display: flex;
-		image {
-			width: 170rpx;
-			height: 170rpx;
-			flex-shrink: 0;
-			border-radius: 8rpx;
+		.iconprompt {
+			padding: 10rpx;
+			font-size: 30rpx;
+			line-height: 1;
 		}
 		}
-		.right {
+
+		.share-btn {
+			flex: 1;
+			text-align: right;
+			font-size: $font-sm;
+			color: $uni-color-primary;
+		}
+
+		.iconenter {
+			font-size: $font-sm;
+			margin-left: 4rpx;
+			color: $uni-color-primary;
+		}
+	}
+
+	.c-list {
+		margin-top: 20rpx;
+		font-size: $font-sm + 2rpx;
+		color: $font-color-base;
+		background: #fff;
+
+		.c-row {
 			display: flex;
 			display: flex;
-			flex-direction: column;
-			padding-left: 24rpx;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-base;
-			line-height: 42rpx;
-			.good-name {
-				padding-top: 20rpx;
-				max-width: 320rpx;
-				font-size: 30rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #1d2023;
-				line-height: 42rpx;
-				margin-bottom: 15rpx;
-			}
-			.price {
-				font-size: 60rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #ff6f0f;
-				// font-size: $font-lg;
-				// color: $uni-color-primary;
-				// margin-bottom: 10rpx;
-			}
+			align-items: center;
+			padding: 20rpx 30rpx;
+			position: relative;
+		}
+
+		.tit {
+			width: 140rpx;
+		}
+
+		.con {
+			flex: 1;
+			color: $font-color-dark;
+
 			.selected-text {
 			.selected-text {
 				margin-right: 10rpx;
 				margin-right: 10rpx;
+
+				.num {
+					color: #FD3B39;
+				}
+			}
+		}
+
+		.bz-list {
+			height: 40rpx;
+			font-size: $font-sm + 2rpx;
+			color: $font-color-dark;
+
+			text {
+				display: inline-block;
+				margin-right: 30rpx;
 			}
 			}
 		}
 		}
+
+		.con-list {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			color: $font-color-dark;
+			line-height: 40rpx;
+		}
+
+		.red {
+			color: $uni-color-primary;
+		}
 	}
 	}
-	.attr-list {
+
+	/* 评价 */
+	.eva-section {
 		display: flex;
 		display: flex;
 		flex-direction: column;
 		flex-direction: column;
-		font-size: $font-base + 2rpx;
-		color: $font-color-base;
-		padding-top: 30rpx;
-		padding-left: 40rpx;
-		padding-right: 30rpx;
+		padding: 20rpx 30rpx;
+		background: #fff;
+		margin-top: 16rpx;
+
+		.e-header {
+			display: flex;
+			align-items: center;
+			height: 70rpx;
+			font-size: $font-sm + 2rpx;
+			color: $font-color-light;
+
+			.tit {
+				font-size: $font-base + 2rpx;
+				color: $font-color-dark;
+				margin-right: 4rpx;
+			}
+
+			.tip {
+				flex: 1;
+				text-align: right;
+			}
+
+			.iconenter {
+				margin-left: 10rpx;
+			}
+		}
 	}
 	}
-	.item-list {
-		padding: 20rpx 0 0;
+
+	.eva-box {
 		display: flex;
 		display: flex;
-		flex-wrap: wrap;
-		.tit {
+		padding: 20rpx 0;
+
+		.portrait {
+			flex-shrink: 0;
+			width: 80rpx;
+			height: 80rpx;
+			border-radius: 100px;
+		}
+
+		.right {
+			flex: 1;
 			display: flex;
 			display: flex;
-			align-items: center;
-			justify-content: center;
-			background: #eee;
-			// margin-left: 10rpx;
-			margin-right: 20rpx;
-			margin-bottom: 20rpx;
-			border-radius: 100rpx;
-			min-width: 60rpx;
-			height: 60rpx;
-			padding: 0 20rpx;
+			flex-direction: column;
 			font-size: $font-base;
 			font-size: $font-base;
-			color: $font-color-dark;
-		}
-		.selected {
-			background: #fbebee;
-			color: $uni-color-primary;
+			color: $font-color-base;
+			padding-left: 26rpx;
+
+			.con {
+				font-size: $font-base;
+				color: $font-color-dark;
+				padding: 20rpx 0;
+			}
+
+			.bot {
+				display: flex;
+				justify-content: space-between;
+				font-size: $font-sm;
+				color: $font-color-light;
+			}
 		}
 		}
 	}
 	}
-}
-
-/*  弹出层 */
-.popup {
-	position: fixed;
-	left: 0;
-	top: 0;
-	right: 0;
-	bottom: 0;
-	z-index: 99;
-
-	&.show {
-		display: block;
-		.mask {
-			animation: showPopup 0.2s linear both;
+
+	.eva-boxs {
+		width: 100%;
+		overflow: hidden;
+		padding: 10px 28rpx;
+		background: #f4f4f4;
+		border-radius: 12rpx;
+		font-size: $font-sm + 2rpx;
+		color: #333;
+
+		.portrait {
+			flex-shrink: 0;
+			width: 80rpx;
+			height: 80rpx;
+			border-radius: 100px;
 		}
 		}
-		.layer {
-			animation: showLayer 0.2s linear both;
+
+		.right {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			font-size: $font-base;
+			color: $font-color-base;
+
+			.con {
+				font-size: $font-base;
+				color: $font-color-dark;
+			}
+
+			.bot {
+				display: flex;
+				justify-content: space-between;
+				font-size: $font-sm;
+				color: $font-color-light;
+			}
 		}
 		}
 	}
 	}
-	&.hide {
-		.mask {
-			animation: hidePopup 0.2s linear both;
+
+	/*  详情 */
+	.detail-desc {
+		background: #fff;
+		margin-top: 16rpx;
+
+		/deep/ img {
+			max-width: 100% !important;
+			display: inline !important;
 		}
 		}
-		.layer {
-			animation: hideLayer 0.2s linear both;
+
+		/deep/ div {
+			max-width: 100% !important;
 		}
 		}
-	}
-	&.none {
-		display: none;
-	}
-	.mask {
-		position: fixed;
-		top: 0;
-		width: 100%;
-		height: 100%;
-		z-index: 1;
-		background-color: rgba(0, 0, 0, 0.4);
-	}
-	.layer {
-		position: fixed;
-		z-index: 99;
-		bottom: 0;
-		width: 100%;
-		min-height: 30vh;
-		border-radius: 10rpx 10rpx 0 0;
-		background-color: #fff;
-		.btn {
-			position: absolute;
-			bottom: 0;
-			width: 750rpx;
-			height: 98rpx;
-			background: #FE5B38;
-			line-height: 98rpx;
-			// background: $uni-color-primary;
+
+		.d-header {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 80rpx;
 			font-size: $font-base + 2rpx;
 			font-size: $font-base + 2rpx;
-			color: #fff;
+			color: $font-color-dark;
+			position: relative;
+
+			text {
+				padding: 0 20rpx;
+				background: #fff;
+				position: relative;
+				z-index: 1;
+			}
+
+			&:after {
+				position: absolute;
+				left: 50%;
+				top: 50%;
+				transform: translateX(-50%);
+				width: 300rpx;
+				height: 0;
+				content: '';
+				border-bottom: 1px solid #ccc;
+			}
 		}
 		}
 	}
 	}
-	@keyframes showPopup {
-		0% {
-			opacity: 0;
-		}
-		100% {
-			opacity: 1;
+
+	/* 规格选择弹窗 */
+	.attr-content {
+		padding: 10rpx 0 0;
+
+		.a-t {
+			padding: 0 30rpx;
+			display: flex;
+
+			image {
+				width: 170rpx;
+				height: 170rpx;
+				flex-shrink: 0;
+				border-radius: 8rpx;
+			}
+
+			.right {
+				display: flex;
+				flex-direction: column;
+				padding-left: 24rpx;
+				font-size: $font-sm + 2rpx;
+				color: $font-color-base;
+				line-height: 42rpx;
+
+				.good-name {
+					padding-top: 20rpx;
+					max-width: 320rpx;
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #1d2023;
+					line-height: 42rpx;
+					margin-bottom: 15rpx;
+				}
+
+				.price {
+					font-size: 60rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #ff6f0f;
+					// font-size: $font-lg;
+					// color: $uni-color-primary;
+					// margin-bottom: 10rpx;
+				}
+
+				.selected-text {
+					margin-right: 10rpx;
+				}
+			}
 		}
 		}
-	}
-	@keyframes hidePopup {
-		0% {
-			opacity: 1;
+
+		.attr-list {
+			display: flex;
+			flex-direction: column;
+			font-size: $font-base + 2rpx;
+			color: $font-color-base;
+			padding-top: 30rpx;
+			padding-left: 40rpx;
+			padding-right: 30rpx;
 		}
 		}
-		100% {
-			opacity: 0;
+
+		.item-list {
+			padding: 20rpx 0 0;
+			display: flex;
+			flex-wrap: wrap;
+
+			.tit {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				background: #eee;
+				// margin-left: 10rpx;
+				margin-right: 20rpx;
+				margin-bottom: 20rpx;
+				border-radius: 100rpx;
+				min-width: 60rpx;
+				height: 60rpx;
+				padding: 0 20rpx;
+				font-size: $font-base;
+				color: $font-color-dark;
+			}
+
+			.selected {
+				background: #fbebee;
+				color: $uni-color-primary;
+			}
 		}
 		}
 	}
 	}
-	@keyframes showLayer {
-		0% {
-			transform: translateY(120%);
+
+	/*  弹出层 */
+	.popup {
+		position: fixed;
+		left: 0;
+		top: 0;
+		right: 0;
+		bottom: 0;
+		z-index: 99;
+
+		&.show {
+			display: block;
+
+			.mask {
+				animation: showPopup 0.2s linear both;
+			}
+
+			.layer {
+				animation: showLayer 0.2s linear both;
+			}
 		}
 		}
-		100% {
-			transform: translateY(0%);
+
+		&.hide {
+			.mask {
+				animation: hidePopup 0.2s linear both;
+			}
+
+			.layer {
+				animation: hideLayer 0.2s linear both;
+			}
 		}
 		}
-	}
-	@keyframes hideLayer {
-		0% {
-			transform: translateY(0);
+
+		&.none {
+			display: none;
 		}
 		}
-		100% {
-			transform: translateY(120%);
+
+		.mask {
+			position: fixed;
+			top: 0;
+			width: 100%;
+			height: 100%;
+			z-index: 1;
+			background-color: rgba(0, 0, 0, 0.4);
 		}
 		}
-	}
-}
-
-/* 底部操作菜单 */
-.page-bottom {
-	position: fixed;
-	left: 0rpx;
-	bottom: 0rpx;
-	z-index: 95;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-	width: 750rpx;
-	height: 98rpx;
-	background: rgba(255, 255, 255, 0.9);
-	box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
-	// border-radius: 16rpx;
-	.p-b-btn {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-		font-size: $font-sm;
-		color: $font-color-base;
-		width: 100rpx;
-		height: 98rpx;
-		.iconfont {
-			font-size: 40rpx;
-			line-height: 48rpx;
-			color: $font-color-light;
+
+		.layer {
+			position: fixed;
+			z-index: 99;
+			bottom: 0;
+			width: 100%;
+			min-height: 30vh;
+			border-radius: 10rpx 10rpx 0 0;
+			background-color: #fff;
+
+			.btn {
+				position: absolute;
+				bottom: 0;
+				width: 750rpx;
+				height: 98rpx;
+				background: #FE5B38;
+				line-height: 98rpx;
+				// background: $uni-color-primary;
+				font-size: $font-base + 2rpx;
+				color: #fff;
+			}
 		}
 		}
-		&.active,
-		&.active .iconfont {
-			color: $uni-color-primary;
+
+		@keyframes showPopup {
+			0% {
+				opacity: 0;
+			}
+
+			100% {
+				opacity: 1;
+			}
+		}
+
+		@keyframes hidePopup {
+			0% {
+				opacity: 1;
+			}
+
+			100% {
+				opacity: 0;
+			}
 		}
 		}
-		.icon-fenxiang2 {
-			font-size: 42rpx;
-			transform: translateY(-2rpx);
+
+		@keyframes showLayer {
+			0% {
+				transform: translateY(120%);
+			}
+
+			100% {
+				transform: translateY(0%);
+			}
 		}
 		}
-		.iconlikefill {
-			font-size: 46rpx;
+
+		@keyframes hideLayer {
+			0% {
+				transform: translateY(0);
+			}
+
+			100% {
+				transform: translateY(120%);
+			}
 		}
 		}
 	}
 	}
-	.action-btn-group {
+
+	/* 底部操作菜单 */
+	.page-bottom {
+		position: fixed;
+		left: 0rpx;
+		bottom: 0rpx;
+		z-index: 95;
 		display: flex;
 		display: flex;
+		justify-content: center;
+		align-items: center;
+		width: 750rpx;
 		height: 98rpx;
 		height: 98rpx;
-		overflow: hidden;
-		position: relative;
-		.shoucang {
-			width: 100rpx;
-			height: 100rpx;
-			background: #FFFFFF;
+		background: rgba(255, 255, 255, 0.9);
+		box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
+
+		// border-radius: 16rpx;
+		.p-b-btn {
+			display: flex;
 			flex-direction: column;
 			flex-direction: column;
+			align-items: center;
 			justify-content: center;
 			justify-content: center;
-			font-size: 20rpx;
-			image {
-				width: 36rpx;
-				height: 35rpx;
-				margin-bottom: 10rpx;
+			font-size: $font-sm;
+			color: $font-color-base;
+			width: 100rpx;
+			height: 98rpx;
+
+			.iconfont {
+				font-size: 40rpx;
+				line-height: 48rpx;
+				color: $font-color-light;
+			}
+
+			&.active,
+			&.active .iconfont {
+				color: $uni-color-primary;
+			}
+
+			.icon-fenxiang2 {
+				font-size: 42rpx;
+				transform: translateY(-2rpx);
+			}
+
+			.iconlikefill {
+				font-size: 46rpx;
 			}
 			}
 		}
 		}
-		.buy-now {
-			flex-grow: 1;
-			width: 750rpx;
-			display: flex;
-		}
-		.action-btn {
-			flex-shrink: 0;
-			flex-grow: 1;
+
+		.action-btn-group {
 			display: flex;
 			display: flex;
-			align-items: center;
-			justify-content: center;
-			// width: 580rpx;
-			flex-grow: 1;
-			height: 100%;
-			font-size: 34rpx;
-			padding: 0;
-			border-radius: 0;
-			// background: transparent;
-			background: #ffb238;
-			&.buy-now-btn {
-				background-color: #ffb238;
+			height: 98rpx;
+			overflow: hidden;
+			position: relative;
+
+			.shoucang {
+				width: 100rpx;
+				height: 100rpx;
+				background: #FFFFFF;
+				flex-direction: column;
+				justify-content: center;
+				font-size: 20rpx;
+
+				image {
+					width: 36rpx;
+					height: 35rpx;
+					margin-bottom: 10rpx;
+				}
 			}
 			}
-			&.add-cart-btn {
-				background: #FD3B39;
+
+			.buy-now {
+				flex-grow: 1;
+				width: 750rpx;
+				display: flex;
+			}
+
+			.action-btn {
+				flex-shrink: 0;
+				flex-grow: 1;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				// width: 580rpx;
+				flex-grow: 1;
+				height: 100%;
+				font-size: 34rpx;
+				padding: 0;
+				border-radius: 0;
+				// background: transparent;
+				background: #ffb238;
+
+				&.buy-now-btn {
+					background-color: #ffb238;
+				}
+
+				&.add-cart-btn {
+					background: #FD3B39;
+				}
 			}
 			}
 		}
 		}
 	}
 	}
-}
-// 商店头
-.shop-box {
-	background-color: #ffffff;
-	margin-top: 20rpx;
-	margin-bottom: 10rpx;
-	padding: 20rpx;
-	.shop-img {
-		border-radius: 300rpx;
-		height: 80rpx;
-		width: 80rpx;
-		margin-right: 20rpx;
+
+	// 商店头
+	.shop-box {
+		background-color: #ffffff;
+		margin-top: 20rpx;
+		margin-bottom: 10rpx;
+		padding: 20rpx;
+
+		.shop-img {
+			border-radius: 300rpx;
+			height: 80rpx;
+			width: 80rpx;
+			margin-right: 20rpx;
+		}
+
+		.shop-button {
+			border-radius: 100rpx;
+			padding: 10rpx 20rpx;
+			color: $color-red;
+			border: 1px solid $color-red;
+			font-size: $font-lg;
+			line-height: 1;
+		}
 	}
 	}
-	.shop-button {
-		border-radius: 100rpx;
-		padding: 10rpx 20rpx;
-		color: $color-red;
-		border: 1px solid $color-red;
-		font-size: $font-lg;
-		line-height: 1;
+
+	.detail-centent {
+		img {
+			vertical-align: top;
+		}
 	}
 	}
-}
-.detail-centent {
-	img {
+
+	/* 商品详情中限制图片大小 */
+	/deep/ .rich-img {
+		width: 100% !important;
+		height: auto;
 		vertical-align: top;
 		vertical-align: top;
 	}
 	}
-}
-/* 商品详情中限制图片大小 */
-/deep/ .rich-img {
-	width: 100% !important;
-	height: auto;
-	vertical-align: top;
-}
-</style>
+</style>

+ 1 - 7
pages/user/shareQrCode.vue

@@ -59,14 +59,8 @@
 					});
 					});
 				});
 				});
 			}else{
 			}else{
-				this.val = 'http://hgd.liuniu946.com/appdom/index.html?spread=' + this.userInfo.uid
+				this.val = this.baseURL+ this.urlFile+'/#/pages/index/index?spread=' + this.userInfo.uid
 			}
 			}
-		},
-		onShow() {
-		},
-		//下拉刷新
-		onPullDownRefresh() {
-	
 		},
 		},
 		computed: {
 		computed: {
 			...mapState(['baseURL', 'urlFile']),
 			...mapState(['baseURL', 'urlFile']),

BIN
static/icon/indexhot.png