Przeglądaj źródła

订单兑换,组件-遮罩层

ltx529596 4 lat temu
rodzic
commit
194a4190ca
35 zmienionych plików z 387 dodań i 8658 usunięć
  1. 19 13
      src/pages.json
  2. 0 1041
      src/pages/cart/cart.vue
  3. 0 304
      src/pages/category/category.vue
  4. 120 0
      src/pages/components/mask.vue
  5. 186 0
      src/pages/index/conversion.vue
  6. 60 11
      src/pages/index/index.vue
  7. 0 483
      src/pages/product/list.vue
  8. 0 1261
      src/pages/product/product.vue
  9. 0 120
      src/pages/set/about/about.vue
  10. 0 136
      src/pages/set/about/detail.vue
  11. 0 148
      src/pages/set/authorization/list.vue
  12. 0 171
      src/pages/set/feedback/detail.vue
  13. 0 204
      src/pages/set/feedback/feedback.vue
  14. 0 141
      src/pages/set/feedback/list.vue
  15. 0 168
      src/pages/set/invoice/invoice.vue
  16. 0 174
      src/pages/set/invoice/list.vue
  17. 0 145
      src/pages/set/invoice/manage.vue
  18. 0 115
      src/pages/set/set.vue
  19. 1 0
      src/pages/shop/shop.vue
  20. 1 1
      src/pages/shop/shopdetail.vue
  21. 0 215
      src/pages/user/account/account.vue
  22. 0 183
      src/pages/user/account/bill.vue
  23. 0 318
      src/pages/user/account/integral.vue
  24. 0 415
      src/pages/user/account/recharge.vue
  25. 0 184
      src/pages/user/address/address.vue
  26. 0 177
      src/pages/user/address/manage.vue
  27. 0 211
      src/pages/user/collection/collection.vue
  28. 0 568
      src/pages/user/coupon/coupon.vue
  29. 0 326
      src/pages/user/coupon/detail.vue
  30. 0 135
      src/pages/user/coupon/list.vue
  31. 0 85
      src/pages/user/footprint/footprint.vue
  32. 0 196
      src/pages/user/money/pay.vue
  33. 0 62
      src/pages/user/money/success.vue
  34. 0 644
      src/pages/user/user.vue
  35. 0 303
      src/pages/user/userinfo/userinfo.vue

+ 19 - 13
src/pages.json

@@ -69,24 +69,30 @@
       "style":{
         "navigationBarTitleText": "订单管理"
       }
-    },
-		{
-		  "path":"pages/order/orderdetail",
-		  "style":{
-		    "navigationBarTitleText": "订单详情"
-		  }
-		},
+    },
+		{
+		  "path":"pages/order/orderdetail",
+		  "style":{
+		    "navigationBarTitleText": "订单详情"
+		  }
+    },
+    {
+      "path": "pages/index/conversion",
+      "style":{
+        "navigationBarTitleText": "订单兑换"
+      }
+    },
     {
       "path": "pages/shop/shop",
       "style": {
         "navigationBarTitleText": "商品管理"
       }
-    },
-		{
-			"path":"pages/shop/shopdetail",
-			"style":{
-				"navigationBarTitleText": "商品详情"
-			}
+    },
+		{
+			"path":"pages/shop/shopdetail",
+			"style":{
+				"navigationBarTitleText": "商品详情"
+			}
 		}
   ],
   "tabBar": {

+ 0 - 1041
src/pages/cart/cart.vue

@@ -1,1041 +0,0 @@
-<template>
-	<view class="cart">
-		<view class="header" :style="{position:headerPosition,top:headerTop}">
-			<view class="title">购物车</view>
-		</view>
-		<!-- 占位 -->
-		<view class="place"></view>
-		<!-- 购物车为空 -->
-		<view v-if="cartList.length === 0" class="empty">
-			<text class="iconfont icongouwuche"></text>
-			<view v-if="hasLogin" class="empty-tips">
-				空空如也
-				<navigator class="navigator" v-if="hasLogin" url="../category/category" open-type="switchTab">随便逛逛></navigator>
-			</view>
-			<view v-else class="empty-tips">
-				空空如也
-				<view class="navigator" @tap="navTo('/pages/public/logintype')">去登陆></view>
-			</view>
-		</view>
-		<!-- 购物车列表 -->
-		<view class="goods-list" v-else>
-			<view class="btn-clear" @tap="clearCart({lose_status: 1})">清空失效商品</view>
-			<view class="row" v-for="(row,index) in cartList" :key="index">
-				<!-- 删除按钮 -->
-				<view class="menu" @tap.stop="deleteCartItem(row.sku_id, 'one')">
-					<i class="iconfont icon iconiconfontshanchu1"></i>
-				</view>
-				<!-- 商品 -->
-				<view class="carrier" :class="[theIndex==index?'open':oldIndex==index?'close':'']"
-				      @touchstart="touchStart(index,$event)" @touchmove="touchMove(index,$event)"
-				      @touchend="touchEnd(index,$event)">
-					<!-- checkbox -->
-					<view class="checkbox-box" @tap="selected(index, row)">
-						<view class="checkbox" :class="[parseInt(row.status, 10) === 0 ? 'checkbox-disabled' : '']">
-							<view :class="[row.selected?'on':'']"></view>
-						</view>
-					</view>
-					<!-- 商品信息 -->
-					<view class="goods-info">
-						<view class="img">
-							<image :src="row.product_img"></image>
-						</view>
-						<view class="info">
-							<view class="title in2line" @tap="navTo(`/pages/product/product?id=${row.product.id}`)">
-								{{row.product_name}}
-							</view>
-							<view class="state-wrapper">
-								<view class="spec" @tap.stop="toggleSpec(row)">{{row.sku_name || '基础版'}}</view>
-								<view class="state" v-if="parseInt(row.status, 10) === 0">
-									已失效
-								</view>
-							</view>
-							<view class="price-number">
-								<view class="price" v-if="parseInt(row.status, 10) === 1">{{row.sku && row.sku.price}}</view>
-								<view class="remark" v-else>{{row.remark}}</view>
-								<view class="number" v-if="parseInt(row.status, 10) === 1">
-									<view class="sub" @tap.stop="sub(row, index)">
-										<text class="iconfont icon icon-jianhao"></text>
-									</view>
-									<view class="input" @tap.stop="discard">
-										<input type="number" v-model="row.number" @input.stop="numberChange(row, $event,index)"/>
-									</view>
-									<view class="add" @tap.stop="add(row, index)">
-										<text class="iconfont icon iconjia1"></text>
-									</view>
-								</view>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<!-- 脚部菜单 -->
-		<view class="footer" :style="{bottom: footerbottom}" v-if="cartList.length !== 0">
-			<view class="checkbox-box" @tap="allSelect">
-				<view class="checkbox">
-					<view :class="[isAllselected?'on':'']"></view>
-				</view>
-				<view class="text">全选</view>
-			</view>
-			<view class="delBtn del" @tap="deleteCartItem" v-if="selectedList.length>0">删除</view>
-			<view class="delBtn" @tap="clearCart()" v-if="selectedList.length>0">清空</view>
-			<view class="settlement">
-				<view class="sum">合计:
-					<view class="money">¥{{sumPrice}}</view>
-				</view>
-				<view class="btn" @tap="createOrder">结算({{selectedList.length}})</view>
-			</view>
-		</view>
-		<!-- 规格-模态层弹窗 -->
-		<view
-			class="popup spec"
-			:class="specClass"
-			@touchmove.stop.prevent="stopPrevent"
-			@tap="hideSpec"
-		>
-			<!-- 遮罩层 -->
-			<view class="mask" @tap="hideSpec"></view>
-			<view class="layer attr-content" @tap.stop="stopPrevent">
-				<view class="a-t">
-					<image :src="showTypeImage || productDetail.picture"></image>
-					<view class="right">
-						<text class="title">{{ productDetail.name }}</text>
-						<text class="price">¥{{ currentSkuPrice || productDetail.minSkuPrice }}</text>
-						<text class="stock">库存:{{ currentStock || productDetail.stock }}件</text>
-						<view class="selected" v-if="specSelected.length > 0">
-							已选:
-							<text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">
-								{{sItem.title}}
-							</text>
-							<text v-if="specSelected.length > 0">
-								* {{ cartCount }}
-							</text>
-						</view>
-					</view>
-				</view>
-				<view v-for="(item,index) in specList" :key="index" class="attr-list">
-					<text>{{item.title}}</text>
-					<view class="item-list">
-						<view class="tit"
-						      v-for="(childItem, childIndex) in specChildList"
-						      v-if="childItem.base_spec_id === item.base_spec_id"
-						      :key="childIndex"
-						      :class="{selected: childItem.selected}"
-						      :style="childItem.selected && parseInt(item.show_type) === 2 ? styleObject: ''"
-						      @tap="selectSpec(childIndex, childItem.base_spec_id, item.show_type)"
-						>
-							<text v-if="parseInt(item.show_type) === 1">
-								{{childItem.title }}
-							</text>
-							<text v-if="parseInt(item.show_type) === 2">
-								{{childItem.title }}
-							</text>
-							<view v-if="parseInt(item.show_type) === 3">
-								<image
-									class="img"
-									:src="childItem.data || productDetail.picture"
-									mode="aspectFill"
-								></image>
-								{{childItem.title }}
-							</view>
-						</view>
-					</view>
-				</view>
-				<button class="btn" @tap="toggleSpec">完成</button>
-			</view>
-		</view>
-		<!--页面加载动画-->
-		<rf-loading v-if="loading"></rf-loading>
-	</view>
-</template>
-
-<script>
-	import {
-		cartItemClear,
-		cartItemDel,
-		cartItemList,
-		cartItemUpdateNum,
-		cartItemUpdateSku,
-		productDetail
-	} from '@/api/product';
-
-	export default {
-		data() {
-			return {
-				sumPrice: '0.00',
-				headerPosition: 'fixed',
-				headerTop: null,
-				statusTop: null,
-				showHeader: true,
-				selectedList: [],
-				isAllselected: false,
-				//控制滑动效果
-				theIndex: null,
-				oldIndex: null,
-				isStop: false,
-				cartList: [],
-				hasLogin: null,
-				oldDiscount: 0,
-				footerbottom: 0,
-				specClass: 'none',
-				showTypeImage: null,
-				productDetail: {},
-				specSelected: [],
-				specChildList: [],
-				specList: [],
-				currentStock: 0,
-				currentSkuPrice: 0,
-				cartCount: 0,
-				currentSkuId: null,
-				currentNewSkuId: null,
-				styleObject: {},
-				loading: true
-			};
-		},
-		onPageScroll(e) {
-			//兼容iOS端下拉时顶部漂移
-			this.headerPosition = e.scrollTop >= 0 ? 'fixed' : 'absolute';
-			this.headerTop = e.scrollTop >= 0 ? null : 0;
-			this.statusTop = e.scrollTop >= 0 ? null : -this.statusHeight + 'px';
-		},
-		//下拉刷新,需要自己在page.json文件中配置开启页面下拉刷新 "enablePullDownRefresh": true
-		onPullDownRefresh() {
-			if (!this.hasLogin) {
-				if (type === 'refresh') {
-					uni.stopPullDownRefresh();
-				}
-				return;
-			}
-			;
-			this.selectedList.length = 0;
-			this.isAllselected = false;
-			this.sumPrice = 0;
-			this.getCartItemList('refresh');
-		},
-		onShow() {
-			//兼容H5下结算条位置
-			// #ifdef H5
-			this.footerbottom = document.getElementsByTagName('uni-tabbar')[0].offsetHeight + 'px';
-			// #endif
-			// #ifdef APP-PLUS
-			this.showHeader = false;
-			this.statusHeight = plus.navigator.getStatusbarHeight();
-			// #endif
-			this.initData();
-		},
-		methods: {
-			//规格弹窗开关
-			toggleSpec(row) {
-				if (parseInt(row.status, 10) === 0) return;
-				if (this.specClass === 'show') {
-					if (!this.hasLogin) {
-						this.specClass = 'none';
-						this.$mHelper.toast('请先登录!');
-						return;
-					}
-					if (this.specSelected.length < this.productDetail.base_attribute_format.length) {
-						this.$mHelper.toast('请先选择规格');
-						return;
-					}
-					this.handleCartItemUpdateSku(this.currentSkuId, this.currentNewSkuId);
-					this.specClass = 'hide';
-					setTimeout(() => {
-						this.specClass = 'none';
-					}, 250);
-				} else if (this.specClass === 'none') {
-					this.specClass = 'show';
-					if (row) {
-						this.specChildList = [];
-						this.cartCount = row.number;
-						this.getProductDetail(row);
-					}
-				}
-			},
-			//选择规格
-			selectSpec(index, pid, type) {
-				let list = this.specChildList;
-				list.forEach(item => {
-					if (item.base_spec_id === pid) {
-						this.$set(item, 'selected', false);
-					}
-				});
-				if (parseInt(type, 10) === 3) {
-					this.showTypeImage = list[index].data;
-				}
-				if (parseInt(type, 10) === 2) {
-					this.styleObject = {
-						color: list[index].data
-						// border: `1px solid ${list[index].data}`,
-					};
-				}
-				this.$set(list[index], 'selected', true);
-				//存储已选择
-				/**
-				 * 修复选择规格存储错误
-				 * 将这几行代码替换即可
-				 * 选择的规格存放在specSelected中
-				 */
-				this.specSelected = [];
-				list.forEach(item => {
-					if (item.selected === true) {
-						this.specSelected.push(item);
-					}
-				});
-				let skuStr = [];
-				this.specSelected.forEach(item => {
-					skuStr.push(item.base_spec_value_id);
-				});
-				this.productDetail.sku.forEach(item => {
-					if (item.data === skuStr.join('-')) {
-						this.currentStock = item.stock;
-						this.currentSkuPrice = item.price;
-						this.currentNewSkuId = item.id;
-						return;
-					}
-				});
-			},
-			// 获取产品详情
-			async getProductDetail(row) {
-				this.currentSkuId = row.sku_id;
-				this.currentNewSkuId = row.sku_id;
-				await this.$http.get(`${productDetail}`, {
-					id: row.product_id
-				}).then(async r => {
-					this.productDetail = r.data;
-					this.specList = this.productDetail.base_attribute_format;
-					this.specList.forEach(item => {
-						this.specChildList = [...this.specChildList, ...item.value];
-					});
-					/**
-					 * 修复选择规格存储错误
-					 * 将这几行代码替换即可
-					 * 选择的规格存放在specSelected中
-					 */
-					this.specSelected = [];
-					this.specChildList.forEach(item => {
-						if (row.sku_name.indexOf(item.title) !== -1) {
-							item.selected = true;
-							this.specSelected.push(item);
-						}
-					});
-					let skuStr = [];
-					this.specSelected.forEach(item => {
-						skuStr.push(item.base_spec_value_id);
-					});
-					this.productDetail.sku.forEach(item => {
-						if (item.data === skuStr.join('-')) {
-							this.currentStock = item.stock;
-							this.currentSkuPrice = item.price;
-							return;
-						}
-					});
-				});
-			},
-			hideSpec() {
-				this.specClass = 'hide';
-				setTimeout(() => {
-					this.specClass = 'none';
-				}, 250);
-			},
-			stopPrevent() {
-			},
-			// 删除选中购物车商品
-			async deleteCartItem(id, type) {
-				const sku_ids = [];
-				if (type) {
-					sku_ids.push(parseInt(id, 10));
-				} else {
-					for (let i = 0; i < this.cartList.length; i++) {
-						if (this.cartList[i].selected) {
-							sku_ids.push(parseInt(this.cartList[i].sku_id, 10));
-						}
-					}
-				}
-				await this.$http.post(`${cartItemDel}`, {
-					sku_ids: JSON.stringify(sku_ids)
-				}).then(() => {
-					this.selectedList.length = 0;
-					this.isAllselected = false;
-					this.sumPrice = 0;
-					this.getCartItemList();
-					this.oldIndex = null;
-					this.theIndex = null;
-				});
-			},
-			// 修改购物车商品sku
-			async handleCartItemUpdateSku(sku_id, new_sku_id) {
-				await this.$http.post(`${cartItemUpdateSku}`, {
-					sku_id,
-					new_sku_id
-				}).then(() => {
-					this.selectedList.length = 0;
-					this.isAllselected = false;
-					this.sumPrice = 0;
-					this.getCartItemList();
-				});
-			},
-			// 数据初始化
-			initData() {
-				this.hasLogin = this.$mStore.getters.hasLogin;
-				if (this.hasLogin) {
-					this.theIndex = null;
-					this.oldIndex = null;
-					this.selectedList.length = 0;
-					this.isAllselected = false;
-					this.sumPrice = 0;
-					this.getCartItemList();
-				} else {
-					this.cartList = [];
-					this.selectedList.length = 0;
-					this.loading = false;
-				}
-			},
-			// 通用跳转
-			navTo(url) {
-				uni.navigateTo({
-					url
-				});
-			},
-			// 获取购物车列表
-			async getCartItemList(type) {
-				await this.$http.get(`${cartItemList}`, {}, {}, this).then(r => {
-					this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-					this.cartList = r.data;
-					let cartNum = 0;
-					r.data.forEach(item => {
-						if (parseInt(item.status, 10) === 1) {
-							cartNum += 1;
-						}
-					});
-					uni.setStorageSync('cartNum', cartNum);
-					if (r.data.length === 0) {
-						uni.removeTabBarBadge({ index: 2 });
-						return;
-					}
-					uni.setTabBarBadge({
-						index: 2,
-						text: cartNum.toString()
-					});
-				}).catch(() => {
-					this.cartList = [];
-					this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-				});
-			},
-			// 清空购物车
-			clearCart(params) {
-				const content = params ? '清空失效商品?' : '清空购物车?';
-				uni.showModal({
-					content,
-					success: async (e) => {
-						if (e.confirm) {
-							await this.$http.post(`${cartItemClear}`, params).then(() => {
-								this.selectedList.length = 0;
-								this.isAllselected = false;
-								this.sumPrice = 0;
-								this.getCartItemList();
-							});
-						}
-					}
-				});
-			},
-			// 控制左滑删除效果
-			touchStart(index, event) {
-				//多点触控不触发
-				if (event.touches.length > 1) {
-					this.isStop = true;
-					return;
-				}
-				this.oldIndex = this.theIndex;
-				this.theIndex = null;
-				//初始坐标
-				this.initXY = [event.touches[0].pageX, event.touches[0].pageY];
-			},
-			touchMove(index, event) {
-				//多点触控不触发
-				if (event.touches.length > 1) {
-					this.isStop = true;
-					return;
-				}
-				let moveX = event.touches[0].pageX - this.initXY[0];
-				let moveY = event.touches[0].pageY - this.initXY[1];
-
-				if (this.isStop || Math.abs(moveX) < 5) {
-					return;
-				}
-				if (Math.abs(moveY) > Math.abs(moveX)) {
-					// 竖向滑动-不触发左滑效果
-					this.isStop = true;
-					return;
-				}
-
-				if (moveX < 0) {
-					this.theIndex = index;
-					this.isStop = true;
-				} else if (moveX > 0) {
-					if (this.theIndex != null && this.oldIndex == this.theIndex) {
-						this.oldIndex = index;
-						this.theIndex = null;
-						this.isStop = true;
-						setTimeout(() => {
-							this.oldIndex = null;
-						}, 150);
-					}
-				}
-			},
-			touchEnd(index, $event) {
-				//结束禁止触发效果
-				this.isStop = false;
-			},
-			// 选中商品
-			selected(index, item) {
-				if (parseInt(item.status, 10) === 0) return;
-				this.cartList[index].selected = this.cartList[index].selected ? false : true;
-				let i = this.selectedList.indexOf(this.cartList[index].id);
-				i > -1 ? this.selectedList.splice(i, 1) : this.selectedList.push(this.cartList[index].id);
-				this.isAllselected = this.selectedList.length == this.cartList.length;
-				this.sum();
-			},
-			// 全选商品
-			allSelect() {
-				let len = this.cartList.length;
-				let arr = [];
-				for (let i = 0; i < len; i++) {
-					// 当商品
-					if (parseInt(this.cartList[i].status, 10) !== 0) {
-						this.cartList[i].selected = this.isAllselected ? false : true;
-						arr.push(this.cartList[i].id);
-					}
-				}
-				this.selectedList = this.isAllselected ? [] : arr;
-				this.isAllselected = this.isAllselected || arr.length == 0 ? false : true;
-				if (arr.length > 0) {
-					this.sum();
-				}
-			},
-			// 减少数量(执行接口)
-			sub(item, index) {
-				if (this.cartList[index].number <= 1) {
-					return;
-				}
-				this.cartList[index].number--;
-				this.numberChange(item);
-			},
-			// 增加数量(执行接口)
-			add(item, index) {
-				this.cartList[index].number++;
-				this.numberChange(item, undefined, index, 'add');
-			},
-			// 控制可输入购物车商品数量
-			discard() {
-			},
-			// 监听购物车商品数量改变
-			async numberChange(item, data, index, type) {
-				if (data) {
-					this.cartList[index].number = data.detail.value;
-				}
-				await this.$http.post(`${cartItemUpdateNum}`, {
-					sku_id: item.sku_id,
-					num: item.number
-				}).then(r => {
-					if (r.code === 200) {
-						this.sum();
-					} else {
-						if (type === 'add') {
-							this.cartList[index].number--;
-						}
-						this.$mHelper.toast(r.message);
-					}
-				}).catch(() => {
-					if (type === 'add') {
-						this.cartList[index].number--;
-					}
-				});
-			},
-			// 创建订单
-			async createOrder() {
-				if (this.selectedList.length === 0) return;
-				const data = {};
-				const ids = [];
-				let len = this.cartList.length;
-				for (let i = 0; i < len; i++) {
-					if (this.cartList[i].selected) {
-						ids.push(parseInt(this.cartList[i].id, 10));
-					}
-				}
-				data.type = 'cart';
-				data.data = ids.join(',');
-				this.selectedList.length = 0;
-				this.isAllselected = false;
-				this.sumPrice = 0;
-				this.navTo(`/pages/order/create/order?data=${JSON.stringify(data)}`);
-			},
-			// 合计
-			sum() {
-				this.sumPrice = 0;
-				let len = this.cartList.length;
-				const arr = [];
-				for (let i = 0; i < len; i++) {
-					if (this.cartList[i].selected) {
-						arr.push(this.cartList[i]);
-						this.sumPrice = this.arrSort(arr);
-					}
-				}
-				this.sumPrice = this.sumPrice.toFixed(2);
-			},
-			// 向下舍去小数点后两位
-			floor(val) {
-				return Math.floor(val * 100) / 100;
-			},
-			// 计算相同商品不同规格价格
-			arrSort(arr) {
-				const map = {},
-					dest = [];
-				for (let i = 0; i < arr.length; i++) {
-					const ai = arr[i];
-					if (!map[ai.product.id]) {
-						dest.push({
-							id: ai.product.id,
-							num: 0,
-							price: 0,
-							data: [ai]
-						});
-						map[ai.product.id] = ai;
-					} else {
-						for (let j = 0; j < dest.length; j++) {
-							const dj = dest[j];
-							if (dj.data[0].product.id === ai.product.id) {
-								dj.data.push(ai);
-								break;
-							}
-						}
-					}
-				}
-				const discountArr = [];
-				dest.forEach(item => {
-					item.data.forEach(item2 => {
-						item.num += parseInt(item2.number, 10);
-						item.price += parseInt(item2.number, 10) * item2.price;
-					});
-					const ladderPreferential = item.data[0].ladderPreferential;
-					for (let i = 0; i < ladderPreferential.length; i++) {
-						if (item.num >= parseInt(ladderPreferential[i].quantity, 10)) {
-							ladderPreferential[i].num = item.num;
-							ladderPreferential[i].itemPrice = item.data[0].price;
-							ladderPreferential[i].totalPrice = item.price;
-							discountArr.push(ladderPreferential[i]);
-							break;
-						}
-					}
-				});
-				let amount = 0;
-				let discount = 0;
-				discountArr.forEach(item2 => {
-					if (parseInt(item2.type, 10) === 1) {
-						discount += item2.price * item2.num;
-					} else {
-						discount += (item2.totalPrice - this.floor(item2.itemPrice * item2.price / 100) * item2.num);
-					}
-				});
-				dest.forEach(item => {
-					amount += item.price;
-				});
-				return amount - discount;
-			}
-		}
-	};
-</script>
-<style lang="scss">
-	page {
-		position: relative;
-		background-color: #fff;
-	}
-
-	.checkbox-box {
-		display: flex;
-		align-items: center;
-
-		.checkbox {
-			width: 35upx;
-			height: 35upx;
-			border-radius: 100%;
-			border: solid 2upx $base-color;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-
-			.on {
-				width: 25upx;
-				height: 25upx;
-				border-radius: 100%;
-				background-color: $base-color;
-			}
-		}
-
-		.checkbox-disabled {
-			border: solid 2upx $font-color-disabled;
-		}
-
-		.text {
-			font-size: 28upx;
-			margin-left: 10upx;
-		}
-	}
-
-	.status {
-		width: 100%;
-		height: 0;
-		position: fixed;
-		z-index: 10;
-		background-color: #fff;
-		top: 0;
-		/*  #ifdef  APP-PLUS  */
-		height: var(--status-bar-height); //覆盖样式
-		/*  #endif  */
-	}
-
-	.header {
-		width: 92%;
-		padding: 0 4%;
-		height: 100upx;
-		display: flex;
-		align-items: center;
-		position: fixed;
-		top: 0;
-		z-index: 10;
-		background-color: #fff;
-		/*  #ifdef  APP-PLUS  */
-		top: var(--status-bar-height);
-		/*  #endif  */
-		.title {
-			font-size: 36upx;
-		}
-
-	}
-
-	.place {
-		background-color: #ffffff;
-		height: 100upx;
-		/*  #ifdef  APP-PLUS  */
-		margin-top: var(--status-bar-height);
-		/*  #endif  */
-	}
-
-	.goods-list {
-		width: 100%;
-		padding: 0 0 100upx 0;
-
-		.btn-clear {
-			text-align: right;
-			padding: 0 $spacing-lg;
-			font-size: $font-base + 2upx;
-			color: $base-color;
-		}
-
-		.tis {
-			width: 100%;
-			height: 60upx;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			font-size: 32upx;
-		}
-
-		.row {
-			width: calc(92%);
-			height: calc(22vw + 40upx);
-			margin: 20upx auto;
-			border-radius: 15upx;
-			box-shadow: 0upx 5upx 20upx rgba(0, 0, 0, 0.1);
-			display: flex;
-			align-items: center;
-			position: relative;
-			overflow: hidden;
-			z-index: 4;
-			border: 0;
-
-			.menu {
-				.icon {
-					color: #fff;
-					font-size: 60upx;
-				}
-
-				position: absolute;
-				width: 30%;
-				height: 100%;
-				right: 0;
-				display: flex;
-				justify-content: center;
-				align-items: center;
-				background-color: red;
-				color: #fff;
-				z-index: 2;
-			}
-
-			.carrier {
-				@keyframes showMenu {
-					0% {
-						transform: translateX(0);
-					}
-					100% {
-						transform: translateX(-30%);
-					}
-				}
-				@keyframes closeMenu {
-					0% {
-						transform: translateX(-30%);
-					}
-					100% {
-						transform: translateX(0);
-					}
-				}
-
-				&.open {
-					animation: showMenu 0.25s linear both;
-				}
-
-				&.close {
-					animation: closeMenu 0.15s linear both;
-				}
-
-				background-color: #fff;
-
-				.checkbox-box {
-					padding-left: 20upx;
-					flex-shrink: 0;
-					height: 22vw;
-					margin-right: 20upx;
-				}
-
-				position: absolute;
-				width: 100%;
-				padding: 0 0;
-				height: 100%;
-				z-index: 3;
-				display: flex;
-				align-items: center;
-
-				.goods-info {
-					width: 100%;
-					display: flex;
-					padding-right: 20upx;
-
-					.img {
-						width: 22vw;
-						height: 22vw;
-						border-radius: 10upx;
-						overflow: hidden;
-						flex-shrink: 0;
-						margin-right: 10upx;
-
-						image {
-							width: 22vw;
-							height: 22vw;
-						}
-					}
-
-					.info {
-						width: 100%;
-						height: 22vw;
-						overflow: hidden;
-						display: flex;
-						flex-wrap: wrap;
-						position: relative;
-
-						.title {
-							width: 100%;
-							font-size: $font-base;
-							line-height: 40upx;
-							height: 80upx
-						}
-
-						.price-number {
-							position: absolute;
-							width: 100%;
-							bottom: 0upx;
-							display: flex;
-							justify-content: space-between;
-							align-items: flex-end;
-							font-size: 28upx;
-							height: 60upx;
-
-							.remark {
-								font-size: $font-sm;
-								color: $font-color-disabled;
-							}
-
-							.price {
-								&:before {
-									content: '¥';
-									font-size: 26upx;
-								}
-							}
-
-							.number {
-								display: flex;
-								justify-content: center;
-								align-items: flex-end;
-
-								.input {
-									width: 60upx;
-									height: 60upx;
-									margin: 0 10upx;
-									background-color: #f3f3f3;
-
-									input {
-										width: 60upx;
-										height: 60upx;
-										display: flex;
-										justify-content: center;
-										align-items: center;
-										text-align: center;
-										font-size: 26upx;
-										color: $base-color;
-									}
-								}
-
-								.sub, .add {
-									width: 45upx;
-									height: 45upx;
-									background-color: #f3f3f3;
-									border-radius: 5upx;
-
-									.icon {
-										font-size: 22upx;
-										width: 45upx;
-										height: 45upx;
-										display: flex;
-										justify-content: center;
-										align-items: center;
-									}
-								}
-							}
-						}
-					}
-
-					.state-wrapper {
-						width: 100%;
-						display: flex;
-						justify-content: space-between;
-
-						.state {
-							margin: 5upx 20upx;
-							height: 45upx;
-							background-color: $font-color-light;
-							color: $color-white;
-							padding: 5upx 20upx;
-							font-size: $font-sm;
-							border-radius: 6upx;
-						}
-
-						.spec {
-							font-size: $font-sm;
-							background-color: #f3f3f3;
-							color: #a7a7a7;
-							padding: 5upx 15upx;
-							border-radius: 20upx;
-							margin-bottom: 20vw;
-						}
-					}
-				}
-			}
-		}
-	}
-
-	.empty {
-		position: fixed;
-		left: 0;
-		top: 0;
-		width: 100%;
-		height: 100vh;
-		padding-bottom: 100upx;
-		display: flex;
-		justify-content: center;
-		flex-direction: column;
-		align-items: center;
-		background: #fff;
-
-		.icongouwuche {
-			font-size: $font-lg + 100upx;
-			color: $base-color;
-		}
-
-		.empty-tips {
-			display: flex;
-			font-size: $font-sm+2upx;
-			color: $font-color-disabled;
-
-			.navigator {
-				color: $uni-color-primary;
-				margin-left: 16upx;
-			}
-		}
-	}
-
-	.footer {
-		width: 100%;
-		padding: 0 2%;
-		background-color: #fbfbfb;
-		height: 100upx;
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		font-size: 28upx;
-		position: fixed;
-		bottom: 0upx;
-		z-index: 5;
-
-		.delBtn {
-			border: solid 1upx $base-color;
-			color: $base-color;
-			padding: 0 24upx;
-			height: 42upx;
-			border-radius: 24upx;
-			font-size: $font-sm;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-		}
-
-		.settlement {
-			width: 52%;
-			display: flex;
-			justify-content: flex-end;
-			align-items: center;
-
-			.sum {
-				font-size: $font-base;
-				margin-right: 8upx;
-				display: flex;
-				justify-content: flex-end;
-
-				.money {
-					font-weight: 600;
-				}
-			}
-
-			.btn {
-				padding: 0 26upx;
-				height: 50upx;
-				background-color: $base-color;
-				color: #fff;
-				display: flex;
-				justify-content: center;
-				align-items: center;
-				border-radius: 30upx;
-			}
-		}
-	}
-
-	.popup .layer {
-		// #ifndef H5
-		bottom: 0;
-		// #endif
-	}
-</style>

+ 0 - 304
src/pages/category/category.vue

@@ -1,304 +0,0 @@
-<template>
-  <view class="rf-category">
-    <!--顶部搜索导航栏-->
-    <rf-search-bar
-        @link="toIndex"
-        @search="toSearch"
-        icon="iconxiatubiao--copy"
-        title="主页"
-        :placeholder="hotSearchDefault"/>
-    <rf-empty :info="'暂无产品分类~'" v-if="categoryList.length === 0 && !loading"></rf-empty>
-    <view class="category-list" v-else>
-      <!-- 左侧分类导航 -->
-      <scroll-view scroll-y="true" class="left">
-        <view class="row" v-for="(fItem, fIndex) in categoryList" :key="fItem.id"
-              :class="[fIndex===showCategoryIndex?'on':'']" @tap="showCategory(fIndex)">
-          <view class="text">
-            <view class="block"></view>
-            {{fItem.title}}
-          </view>
-        </view>
-      </scroll-view>
-      <!--右侧子导航-->
-      <scroll-view scroll-y="true" class="right" :class="animation">
-        <view class="category" v-for="(fItem, fIndex) in categoryList" :key="fItem.id"
-              v-if="fIndex===showCategoryIndex && fItem.child.length > 0">
-          <view class="banner" @tap="indexTopToDetailPage(cateTop.jump_type, cateTop.jump_link)">
-            <image :src="cateTop && cateTop.cover" mode="aspectFill"/>
-          </view>
-          <view class="box" v-for="sItem in fItem.child" :key="sItem.id" @tap="navTo(`/pages/product/list?cate_id=${sItem.id}`)">
-            <view class="text">{{sItem.title}}</view>
-            <view class="list" v-if="sItem.child && sItem.child.length > 0">
-              <view class="box" v-for="tItem in sItem.child" :key="tItem.id" @tap.stop="navTo(`/pages/product/list?cate_id=${tItem.id}`)">
-					      <image :src="tItem.cover || errorImage"></image>
-                <view class="text">{{tItem.title}}</view>
-              </view>
-            </view>
-            <view v-else class="no-data">
-              <i class="iconfont icon404"></i>
-              暂无子分类
-            </view>
-          </view>
-        </view>
-      </scroll-view>
-    </view>
-		<!--加载动画-->
-    <rf-loading v-if="loading"></rf-loading>
-  </view>
-</template>
-<script>
-	/**
-	 * @des 分类
-	 *
-	 * @author stav stavyan@qq.com
-	 * @date 2020-03-10 18:19
-	 * @copyright 2019
-	 */
-	import {productCate} from '@/api/product';
-	import rfSearchBar from '@/components/rf-search-bar';
-	import {advList} from '@/api/basic';
-	export default {
-		components: {
-			rfSearchBar
-		},
-		data() {
-			return {
-        hotSearchDefault: '请输入关键字', // 搜索默认关键字
-        showCategoryIndex: 0, // 一级菜单高亮显示序号
-        categoryList: [], // 分类列表
-        search: {},
-        cateTop: {}, // 分类通用广告图
-        animation: 'animation-slide-right',
-        loading: true,
-        errorImage: this.$mAssetsPath.errorImage
-      }
-		},
-		// 每次页面显示 执行该方法
-		onLoad() {
-			this.initData();
-		},
-		methods: {
-			// 跳转至商品列表
-			navTo(route) {
-			  this.$mRouter.push({route});
-			},
-			// 数据初始化
-			async initData() {
-				this.search = uni.getStorageSync('search') || {};
-				this.hotSearchDefault = '请输入关键字 ' + (this.search.hot_search_default ? ('如: ' + this.search.hot_search_default) : '');
-				this.getProductCate();
-        this.initCartItemCount();
-			},
-      // 设置购物车数量角标
-      async initCartItemCount() {
-        if (this.$mStore.getters.hasLogin && parseInt(uni.getStorageSync('cartNum'), 10) > 0) {
-          await uni.setTabBarBadge({
-            index: this.$mConstDataConfig.cartIndex,
-            text: uni.getStorageSync('cartNum').toString()
-          });
-        } else {
-          uni.removeStorageSync('cartNum');
-          uni.removeTabBarBadge({index: this.$mConstDataConfig.cartIndex});
-        }
-      },
-			// 获取商品分类列表
-			async getProductCate() {
-				await this.$http.get(`${productCate}`).then(r => {
-					this.loading = false;
-					// 获取分类广告图 注:广告图不是一级分类图
-          this.getAdvList();
-          // 过滤掉没有二级菜单的一级菜单
-					r.data.forEach(item => {
-            if (item.child.length > 0) {
-            	this.categoryList.push(item)
-            }
-          });
-				}).catch(() => {
-          this.loading = false;
-        });
-			},
-			// 获取广告列表
-			async getAdvList() {
-				await this.$http.get(`${advList}`, {
-					location: 'cate_top'
-				}).then(r => {
-					this.cateTop = r.data.cate_top[0];
-				});
-			},
-			//分类切换显示
-			showCategory(index) {
-				this.showCategoryIndex = index;
-				this.animation= 'animation-slide-right';
-				setTimeout(()=>{
-					this.animation= '';
-				}, 1000)
-			},
-			// 跳转至搜索详情页
-			toSearch() {
-			  this.$mRouter.push({route: `/pages/index/search/search?data=${JSON.stringify(this.search)}`});
-			},
-			// 跳转至分类页
-			toIndex() {
-        this.$mRouter.switchTab({route: '/pages/index/index'});
-			},
-			// 跳至广告图指定页面
-			indexTopToDetailPage(type, url) {
-				if (!type || !url) return;
-				switch (type) {
-					case 'product_view':
-						url = `/pages/product/product?id=${url}`;
-						break;
-					case 'article_view':
-						this.$mHelper.toast('article_view');
-						break;
-					case 'coupon_view':
-						url = `/pages/user/coupon/detail?id=${url}`;
-						break;
-					case 'helper_view':
-						this.$mHelper.toast('helper_view');
-						break;
-					case 'product_list_for_cate':
-						url = `/pages/product/list?cate_id=${url}`;
-						break;
-					default:
-						break;
-				}
-			  this.$mRouter.push({route: url});
-			}
-		}
-	}
-</script>
-<style scoped lang="scss">
-  page {
-	  background-color: $color-white;
-  }
-  .rf-category {
-    /*模块分类*/
-    .category-list {
-      width: 100%;
-      background-color: #fff;
-      display: flex;
-
-      .left, .right {
-        position: absolute;
-        top: 100upx;
-        /*  #ifdef  APP-PLUS  */
-        top: calc(100upx + var(--status-bar-height));
-        /*  #endif  */
-        bottom: 0upx;
-      }
-
-      .left {
-        width: 24%;
-        left: 0upx;
-        background-color: #f2f2f2;
-
-        .row {
-          width: 100%;
-          height: 90upx;
-          display: flex;
-          align-items: center;
-
-          .text {
-            width: 100%;
-            position: relative;
-            font-size: 28upx;
-            display: flex;
-            justify-content: center;
-            color: #3c3c3c;
-
-            .block {
-              position: absolute;
-              width: 0upx;
-              left: 0;
-            }
-          }
-
-          &.on {
-            height: 100upx;
-            background-color: #fff;
-
-            .text {
-              font-size: 30upx;
-              font-weight: 600;
-              color: #2d2d2d;
-
-              .block {
-                width: 10upx;
-                height: 80%;
-                top: 10%;
-                background-color: #f06c7a;
-              }
-            }
-          }
-        }
-      }
-
-      .right {
-        width: 76%;
-        left: 24%;
-        background-color: #fff;
-        .category {
-          width: calc(100%);
-          padding: 20upx 15upx;
-
-          .banner {
-            width: 96%;
-            margin: 0 auto 20upx;
-            height: 24.262vw;
-            border-radius: 10upx;
-            overflow: hidden;
-            box-shadow: 0upx 5upx 20upx rgba(0, 0, 0, 0.3);
-
-            image {
-              width: 100%;
-              height: 24.262vw;
-            }
-          }
-
-          .list {
-            margin-top: 40upx;
-            width: 100%;
-            display: flex;
-            flex-wrap: wrap;
-
-            .box {
-              width: calc(71.44vw / 3);
-              margin-bottom: 30upx;
-              display: flex;
-              justify-content: center;
-              align-items: center;
-              flex-wrap: wrap;
-
-              image {
-                width: 64%;
-                height: calc(71.44vw / 3 * 0.64);
-              }
-
-              .text {
-                margin-top: 8upx;
-                width: 100%;
-                display: flex;
-                justify-content: center;
-                font-size: 26upx;
-              }
-            }
-          }
-
-          .no-data {
-            margin: 48upx 0;
-            color: $font-color-light;
-            display: flex;
-            justify-content: center;
-            align-items: center;
-
-            .iconfont {
-              margin-right: 20upx;
-              font-size: $font-lg + 16upx;
-            }
-          }
-        }
-      }
-    }
-  }
-</style>

+ 120 - 0
src/pages/components/mask.vue

@@ -0,0 +1,120 @@
+<!-- 遮罩层 -->
+<template name="mask">
+  <view class="mask">
+    <view class="maskbgc"></view>
+    <view class="content">
+      <view class="header">
+        <view class="title">订单兑换</view>
+        <image src="" class="iconclose" />
+      </view>
+      <view class="content-warp">
+        <view class="txt">{{ txt }}</view>
+        <view class="sure">
+          <view class="btn">确认</view>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'mask',
+  components: {},
+  props: {
+    txt: {
+      type: String,
+      default: '该订单已核销',
+    },
+  },
+  data() {
+    //这里存放数据
+    return {};
+  },
+  //监控data中的数据变化
+  watch: {},
+  //方法集合
+  methods: {},
+  onLoad() {},
+};
+</script>
+<style lang='scss' scoped>
+.mask {
+  .maskbgc {
+    position: fixed;
+    bottom: 0;
+    top: 0;
+    left: 0;
+    right: 0;
+    background-color: rgba(0, 0, 0, 0.4);
+  }
+  .content {
+    position: fixed;
+    top: 50%;
+    margin-top: -281upx;
+    left: 50%;
+    margin-left: -320upx;
+    width: 640upx;
+    z-index: 101;
+    box-sizing: border-box;
+    overflow: hidden;
+    .header {
+      position: relative;
+      width: 100%;
+      height: 102upx;
+      border-top-left-radius: 20upx;
+      border-top-right-radius: 20upx;
+      background-color: #ffcd00;
+      .title {
+        text-align: center;
+        font-weight: 600;
+        line-height: 102upx;
+        color: #0f1e1a;
+        font-size: 36upx;
+        letter-spacing: 2upx;
+      }
+      .iconclose {
+        position: absolute;
+        right: 24upx;
+        top: 50%;
+        margin-top: -25upx;
+        height: 50upx;
+        width: 50upx;
+        background-color: #fff;
+      }
+    }
+
+    .content-warp {
+      background-color: #fff;
+      border-bottom-left-radius: 20upx;
+      border-bottom-right-radius: 20upx;
+      .txt {
+        height: 340upx;
+        line-height: 340upx;
+        text-align: center;
+        color: #18211e;
+        font-size: 36upx;
+        letter-spacing: 2upx;
+      }
+      .sure {
+        padding-bottom: 40upx;
+        box-sizing: border-box;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        .btn {
+          width: 280upx;
+          height: 80upx;
+          background-color: #a95cff;
+          color: #fff;
+          font-size: 32upx;
+          letter-spacing: 2upx;
+          text-align: center;
+          line-height: 80upx;
+          border-radius: 10upx;
+        }
+      }
+    }
+  }
+}
+</style>

+ 186 - 0
src/pages/index/conversion.vue

@@ -0,0 +1,186 @@
+<!-- 订单详情 -->
+<template>
+	<view class="conversion">
+		<Header :title="title"></Header>
+		<view class="" style="height: 94upx;"></view>
+		<view class="order-detail-content">
+			<view class="order-message">
+				<view class="title">订单信息</view>
+				<view class="ordername titlebar">产品名称:<text class="txt">观光车</text></view>
+				<view class="shopname titlebar">店铺名称:<text class="txt">观光车</text></view>
+				<view class="waternum titlebar">流水号:<text class="txt">观光车</text></view>
+				<view class="ordernum titlebar">订单号:<text class="txt">观光车</text></view>
+				<view class="phonenum titlebar">手机号:<text class="txt">观光车</text></view>
+				<view class="goindate titlebar">入园日期:<text class="txt">观光车</text></view>
+				<view class="price titlebar">产品价格:<text class="txt">观光车</text></view>
+				<view class="buynum titlebar">购买数量:<text class="txt">观光车</text></view>
+				<view class="palytime titlebar">游玩时间:<text class="txt">观光车</text></view>
+				<view class="orderstatus titlebar">订单状态:<text class="txt">退款中</text> </view>
+				<view class="tourist">
+					<view class="title">游客信息</view>
+					<view class="name touristbar">姓名:<text class="txt">猪猪虾</text></view>
+					<view class="idcard touristbar">身份证:<text class="txt">500233199308278293</text></view>
+				</view>
+			</view>
+			<view class="paymessage">
+				<view class="title">支付信息</view>
+				<view class="shoppric">产品价格:<text class="money">¥280</text></view>
+				<view class="realitypirc">实付金额:<text class="money">¥280</text></view>
+			</view>
+			<view class="btns">
+				<view class="btn cancel">取消兑换</view>
+				<view class="btn convert"  @tap="sureconvert">确认兑换</view>
+			</view>
+		</view>
+
+		<mask :txt="txt"></mask>
+
+		<rf-loading v-if="loading"></rf-loading>
+
+	</view>
+</template>
+
+<script>
+	import Header from '../components/header.vue';
+	import mask from '../components/mask'
+	export default {
+		components: {
+			Header,
+			mask
+		},
+		data() {
+			return {
+				title: '订单兑换',
+				loading: false,
+				txt:'是的'
+			}
+		},
+		onLoad() {
+
+		},
+		methods: {
+			//  确认兑换
+			sureconvert () {
+				console.log(1);
+			}
+			
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.conversion {
+		.order-detail-content {
+			padding: 24upx 32upx 44upx;
+
+			.order-message {
+				background-color: #FFFFFF;
+				padding: 31upx 33upx 35upx;
+				border-radius: 17upx;
+
+				.title {
+					font-size: 34upx;
+					color: #111111;
+				}
+
+				.titlebar {
+					font-size: 28upx;
+					color: #666666;
+					letter-spacing: 2upx;
+					margin-top: 12upx;
+
+					.txt {
+						margin-left: 10upx;
+						font-size: 28upx;
+					}
+				}
+
+				.ordername {
+					margin-top: 15upx;
+				}
+
+				.orderstatus {
+					height: 98upx;
+					line-height: 98upx;
+					border-top: 1px solid #e1e1e1;
+					border-bottom: 1px solid #e1e1e1;
+				}
+
+				.tourist {
+					.title {
+						padding: 15upx 0;
+						font-size: 34upx;
+						color: #111111;
+					}
+
+					.touristbar {
+						color: #666666;
+					}
+
+					.txt {
+						margin-left: 10upx;
+						font-size: 28upx;
+					}
+				}
+			}
+
+			.paymessage {
+				background-color: #FFFFFF;
+				padding: 31upx 33upx 35upx;
+				border-radius: 17upx;
+				margin-top: 24upx;
+
+				.title {
+					font-size: 34upx;
+					color: #111111;
+				}
+				.shoppric {
+					color: #666666;
+					margin-top: 20upx;
+					.money {
+						margin-left: 10upx;
+					}
+				}
+
+				.realitypirc {
+					color: #666666;
+					font-size: 28upx;
+					margin-top: 20upx;
+					border-top: 1upx solid #e1e1e1;
+					padding-top: 20upx;
+					.money {
+						margin-left: 10upx;
+						color: #fa4141;
+					}
+				}
+			}
+
+			.btns {
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				margin-top: 40upx;
+				.btn {
+					width: 321upx;
+					height: 92upx;
+					box-sizing: border-box;
+					text-align: center;
+					line-height: 92upx;
+					font-size: 38upx;
+					letter-spacing: 2upx;
+					color: #7a7c7c;
+					margin-right: 31upx;
+					background-color: #fff;
+					border: 1px solid #e2e2e2;
+					border-radius: 10upx;
+				}
+				.convert {
+					margin-right: 0;
+					background-color: #a95cff;
+					color: #FFFFFF;
+					border: none;
+				}
+			}
+		}
+	}
+</style>

+ 60 - 11
src/pages/index/index.vue

@@ -28,7 +28,7 @@
 							<view class="tele">151123165441</view>
 						</view>
 					</view>
-					<view class="user-right">
+					<view class="user-right" @tap="scanCode">
 						<image src="../../static/images/scan.png" mode="" class="sacnicon"></image>
 						<view class="txt">
 							验证码核销
@@ -36,7 +36,14 @@
 					</view>
 				</view>
 			</view>
-			<view class="" style="height: 100px;"></view>
+			<view class="" style="height: 284upx;background:red;"></view>
+     
+      <!-- 输入框 -->
+      <view class="input-code">
+        <input type="text" v-model="ordernum" placeholder-style="color:#b8bbbb;font-size:28upx;" class="code" placeholder="请输入验证码核验">
+        <view class="search" @tap="searchOrder">搜索</view>
+      </view>
+
 			<view class="index-content">
 				<!-- 关键指数 -->
 				<view class="exponent">
@@ -192,7 +199,7 @@
 
         <view id="testecharts"></view>
 
-				<view class="" style="height: 40rpx;"></view>
+				<view class="" style="height: 40upx;"></view>
 			</view>
 		</view>
 		<!--页面加载动画-->
@@ -213,6 +220,7 @@ export default {
       cWidth: '',
       cHeight: '',
       pixelRatio: 1, // 像素比
+      ordernum: null, // 订单号
 
       // 饼图数据
       bWidth: '',
@@ -240,9 +248,9 @@ export default {
       console.log('picker发送选择改变,携带值为', e.target.value);
       this.index = e.target.value;
     },
-    // 设置页
+    // 跳转设置页
     tosetting() {
-      this.$mRouter.redirectTo({ route: '/pages/index/setting/setting' });
+      this.$mRouter.push({ route: '/pages/index/setting/setting' });
     },
     getList() {
       console.log(1);
@@ -251,6 +259,21 @@ export default {
     seting() {
       console.log('设置');
     },
+    // 扫码订单
+    scanCode() {
+      // 允许从相机和相册扫码
+      uni.scanCode({
+        success: function (res) {
+          console.log('条码类型:' + res.scanType);
+          console.log('条码内容:' + res.result);
+        },
+      });
+    },
+    // 搜索订单
+    searchOrder () {
+      console.log();
+    },
+
     // 数据处理
     getServerData() {
       uni.request({
@@ -422,7 +445,7 @@ export default {
   }
 
   .user {
-    padding: 30rpx;
+    padding: 30upx 30upx 75upx;
     display: flex;
     justify-content: space-between;
     align-items: center;
@@ -433,8 +456,8 @@ export default {
       align-items: center;
 
       .usericon {
-        width: 100rpx;
-        height: 100rpx;
+        width: 100upx;
+        height: 100upx;
         border-radius: 50%;
         background-color: #ffffff;
       }
@@ -473,15 +496,41 @@ export default {
   }
 }
 
+.input-code {
+  position: fixed;
+  left: 50%;
+  margin-left: -344upx;
+  top: 234upx;
+  background-color: #fff;
+  width: 686upx;
+  padding:0 38upx;
+  box-shadow: 0 10upx 10upx rgba($color: #242424, $alpha: 0.1);
+  z-index: 100;
+  border-radius: 10upx;
+  box-sizing: border-box;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  .code {
+    flex: 1;
+    height: 100upx;
+  }
+  .search {
+    width: 60upx;
+    height: 100upx;
+    line-height: 100upx;
+    font-size: 28upx;
+    color: #ffcd00;
+    margin-left: 20upx;
+  }
+}
 .index {
   background-color: #fafafa;
 
   .index-content {
-    padding: 0 30rpx;
+    padding: 85upx 33rpx;
 
     .exponent {
-      margin-top: 20rpx;
-
       .title-warp {
         display: flex;
         justify-content: space-between;

+ 0 - 483
src/pages/product/list.vue

@@ -1,483 +0,0 @@
-<template>
-	<view class="product-list">
-		<!--顶部搜索导航栏-->
-		<rf-search-bar
-			@link="navToIndex"
-			@search="handleSearchProductList"
-			icon="iconxiatubiao--copy"
-			title="主页"
-			:inputDisabled="true"
-			:placeholder="hotSearchDefault"/>
-		<!--分类栏目-->
-		<view v-if="isShowNavBar" class="navbar" :style="{top: navBarTop}">
-			<view class="nav-item" :class="{current: filterIndex === 0}" @tap="tabClick(0)">
-				综合排序
-			</view>
-			<view class="nav-item" :class="{current: filterIndex === 1}" @tap="tabClick(1)">
-				<text>销量</text>
-				<view class="p-box">
-					<i :class="{active: salesOrder === 1 && filterIndex === 1}" class="iconfont iconshang"></i>
-					<i :class="{active: salesOrder === 2 && filterIndex === 1}" class="iconfont iconshang xia"></i>
-				</view>
-			</view>
-			<view class="nav-item" :class="{current: filterIndex === 2}" @tap="tabClick(2)">
-				浏览量
-			</view>
-			<view class="nav-item" :class="{current: filterIndex === 3}" @tap="tabClick(3)">
-				收藏
-			</view>
-			<view class="nav-item" :class="{current: filterIndex === 4}" @tap="tabClick(4)">
-				<text>价格</text>
-				<view class="p-box">
-					<i :class="{active: priceOrder === 1 && filterIndex === 4}" class="iconfont iconshang"></i>
-					<i :class="{active: priceOrder === 2 && filterIndex === 4}" class="iconfont iconshang xia"></i>
-				</view>
-			</view>
-			<i class="cate-item iconfont iconfenlei1" @tap="toggleCateMask('show')"></i>
-		</view>
-		<view v-else class="navbar" :style="{top: navBarTop}">
-			猜你喜欢
-		</view>
-		<!--商品列表-->
-		<view class="rf-product-list" :style="{marginTop: contentTop}" v-if="goodsList.length > 0">
-			<view
-				v-for="(item, index) in goodsList" :key="index"
-				class="product-item"
-				@tap="navTo(`/pages/product/product?id=${item.id}`)"
-			>
-				<view class="image-wrapper">
-					<image :src="item.picture" mode="aspectFill"></image>
-				</view>
-				<text class="title clamp in2line" v-if="item.name">{{item.name}}</text>
-				<view class="last-line" v-if="item.name">
-					<text class="price in1line">{{item.price}}
-						<text class="m-price" v-if="item.market_price > item.price">¥ {{ item.market_price }}</text>
-					</text>
-					<text class="sales in1line">
-						<text class="red">{{ item.sales }}</text>
-						付款
-					</text>
-				</view>
-			</view>
-			<rf-load-more :status="loadingType" v-if="goodsList.length > 0"></rf-load-more>
-		</view>
-		<rf-empty :info="errorInfo || '该分类暂无商品'" v-if="goodsList.length === 0 && !loading"></rf-empty>
-		<!--分类遮盖层-->
-		<view class="cate-mask"
-		      :class="cateMaskState===0 ? 'none' : cateMaskState===1 ? 'show' : ''"
-		      @tap="toggleCateMask">
-			<view class="cate-content" @tap.stop.prevent="stopPrevent" @touchmove.stop.prevent="stopPrevent">
-				<scroll-view scroll-y class="cate-list">
-					<view v-for="item in cateList" :key="item.id">
-						<view class="cate-item one" @tap.stop="changeCate(item.id)">{{item.title}}</view>
-						<view
-							v-for="sItem in item.child" :key="sItem.id"
-							class="cate-item two"
-							:class="{active: sItem.id==cateId}"
-							@tap.stop="changeCate(sItem.id)">
-							{{sItem.title}}
-							<view
-								v-for="tItem in sItem.child" :key="tItem.id"
-								class="cate-item three"
-								:class="{active: tItem.id==cateId}"
-								@tap.stop="changeCate(tItem.id)">
-								{{tItem.title}}
-							</view>
-						</view>
-					</view>
-				</scroll-view>
-			</view>
-		</view>
-		<!--页面加载动画-->
-		<rf-loading v-if="loading"></rf-loading>
-	</view>
-</template>
-<script>
-	import { guessYouLikeList, productCate, productList } from '@/api/product';
-	import rfLoadMore from '@/components/rf-load-more/rf-load-more';
-	import rfSearchBar from '@/components/rf-search-bar';
-	export default {
-		components: {
-			rfLoadMore,
-			rfSearchBar
-		},
-		data() {
-			return {
-				loading: true,  // 加载动画
-				navBarTop: '0',
-				cateMaskState: 0, //分类面板展开状态
-				loadingType: 'more', //加载更多状态
-				filterIndex: 0,
-				cateId: 0, //已选三级分类id
-				priceOrder: 0, //1 价格从低到高 2价格从高到低
-				salesOrder: 0, //1 价格从低到高 2价格从高到低
-				cateList: [],
-				goodsList: [],  // 商品列表
-				keyword: null,  // 搜索关键字
-				cateParams: null,
-				page: 1,
-				filterParams: {},
-				isShowNavBar: true,
-				hotSearchDefault: '请输入关键字',
-				contentTop: '88upx',
-				errorInfo: undefined // 接口请求出错信息
-			};
-		},
-		onLoad(options) {
-			this.initData(options);
-		},
-		//下拉刷新
-		onPullDownRefresh() {
-			this.filterParams = {};
-			this.page = 1;
-			this.goodsList.length = 0;
-			this.getProductList('refresh');
-		},
-		//加载更多
-		onReachBottom() {
-			this.page++;
-			this.getProductList();
-		},
-		methods: {
-			// 初始化数据
-			initData(options) {
-				/*  #ifdef APP-PLUS  */
-				switch (uni.getSystemInfoSync().platform) {
-					case 'android':
-						this.navBarTop = '128upx';
-						break;
-					case 'ios':
-						// 刘海屏返回true,否则返回false
-						if (plus.navigator.hasNotchInScreen()) {
-							this.navBarTop = '168upx';
-						} else {
-							this.navBarTop = '128upx';
-						}
-						break;
-				}
-				/*  #endif  */
-				/*  #ifndef APP-PLUS  */
-				this.navBarTop = '94upx';
-				/*  #endif  */
-				/*  #ifdef MP  */
-				this.contentTop = '98upx';
-				/*  #endif  */
-				this.cateId = options.cate_id;
-				if (options.params) {
-					this.cateParams = JSON.parse(options.params);
-					if (this.cateParams.guessYouLike === 1) {
-						this.isShowNavBar = false;
-						this.getGuessYouLikeList();
-						return;
-					}
-				}
-				this.keyword = options.keyword;
-				this.hotSearchDefault = options.keyword || '';
-				this.getProductList();
-				this.getProductCate();
-			},
-			// 搜索商品列表
-			handleSearchProductList(e) {
-				this.keyword = e.searchValue;
-				this.page = 1;
-				this.goodsList.length = 0;
-				this.filterParams = {};
-				this.getProductList();
-			},
-			// 跳转至主页
-			navToIndex() {
-				this.$mRouter.reLaunch({ route: '/pages/index/index' });
-			},
-			// 获取商品列表
-			async getProductList(type) {
-				let params = {};
-				if (this.keyword) {
-					params.keyword = this.keyword;
-				} else if (this.cateId) {
-					params.cate_id = this.cateId;
-				} else if (this.cateParams) {
-					params = { ...this.cateParams };
-				}
-				params.page = this.page;
-				await this.$http.get(`${productList}`, {
-					...params,
-					...this.filterParams
-				}).then(async r => {
-					this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-					this.loadingType = r.data.length === 10 ? 'more' : 'nomore';
-					this.goodsList = [...this.goodsList, ...r.data];
-				}).catch(err => {
-					this.errorInfo = err;
-					this.goodsList.length = 0;
-					this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-				});
-			},
-			async getGuessYouLikeList() {
-				await this.$http.get(`${guessYouLikeList}`, {}).then(r => {
-					this.loading = false;
-					this.loadingType = r.data.length === 10 ? 'more' : 'nomore';
-					this.goodsList = [...this.goodsList, ...r.data];
-				}).catch(() => {
-					this.loading = false;
-				});
-			},
-			// 获取商品分类
-			async getProductCate() {
-				await this.$http.get(`${productCate}`).then(r => {
-					this.cateList = r.data;
-					this.cateList.unshift({
-						title: '全部商品',
-						id: ''
-					});
-				});
-			},
-			//筛选点击
-			tabClick(index) {
-				this.filterParams = {};
-				if (this.filterIndex === index && index !== 4 && index !== 1) {
-					return;
-				}
-				this.filterIndex = index;
-				if (index === 0) {
-					this.filterParams = {};
-				} else if (index === 1) {
-					if (this.salesOrder === 1) {
-						this.filterParams.sales = 'desc';
-						this.salesOrder = 2;
-					} else {
-						this.filterParams.sales = 'asc';
-						this.salesOrder = 1;
-					}
-				} else if (index === 2) {
-					this.filterParams.view = 'desc';
-				} else if (index === 3) {
-					this.filterParams.collect = 'desc';
-				} else if (index === 4) {
-					if (this.priceOrder === 1) {
-						this.filterParams.price = 'desc';
-						this.priceOrder = 2;
-					} else {
-						this.filterParams.price = 'asc';
-						this.priceOrder = 1;
-					}
-				}
-				uni.pageScrollTo({
-					duration: 300,
-					scrollTop: 0
-				});
-				this.page = 1;
-				this.goodsList.length = 0;
-				this.loading = true;
-				this.getProductList();
-			},
-			//显示分类面板
-			toggleCateMask(type) {
-				let timer = type === 'show' ? 10 : 300;
-				let state = type === 'show' ? 1 : 0;
-				this.cateMaskState = 2;
-				setTimeout(() => {
-					this.cateMaskState = state;
-				}, timer);
-			},
-			//分类点击
-			changeCate(id) {
-				if (!id) {
-					this.cateParams = null;
-					this.cateId = null;
-					this.keyword = null;
-				}
-				this.cateId = id;
-				this.keyword = undefined;
-				this.toggleCateMask();
-				uni.pageScrollTo({
-					duration: 300,
-					scrollTop: 0
-				});
-				this.page = 1;
-				this.goodsList.length = 0;
-				this.filterParams = {};
-				this.loading = true;
-				this.getProductList('refresh');
-			},
-			//跳转详情
-			navTo(route) {
-				this.$mRouter.push({ route });
-			},
-			stopPrevent() {
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	page {
-		background: $color-white;
-	}
-
-	.product-list {
-		.navbar {
-			position: fixed;
-			left: 0;
-			/*top: var(--window-top);*/
-			display: flex;
-			width: 100%;
-			height: 80upx;
-			background: #fff;
-			box-shadow: 0 2upx 10upx rgba(0, 0, 0, .06);
-			z-index: 10;
-
-			.nav-item {
-				flex: 1;
-				display: flex;
-				justify-content: center;
-				align-items: center;
-				height: 100%;
-				font-size: $font-base;
-				color: $font-color-dark;
-				position: relative;
-
-				&.current {
-					color: $base-color;
-
-					&:after {
-						content: '';
-						position: absolute;
-						left: 50%;
-						bottom: 0;
-						transform: translateX(-50%);
-						width: 120upx;
-						height: 0;
-						border-bottom: 4upx solid $base-color;
-					}
-				}
-			}
-
-			.p-box {
-				display: flex;
-				flex-direction: column;
-
-				.iconfont {
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					width: 30upx;
-					height: 14upx;
-					line-height: 1;
-					margin-left: 4upx;
-					font-size: 26upx;
-					color: #888;
-
-					&.active {
-						color: $base-color;
-					}
-				}
-
-				.xia {
-					transform: scaleY(-1);
-				}
-			}
-
-			.cate-item {
-				display: flex;
-				justify-content: center;
-				align-items: center;
-				height: 100%;
-				width: 80upx;
-				position: relative;
-				font-size: 44upx;
-
-				&:after {
-					content: '';
-					position: absolute;
-					left: 0;
-					top: 50%;
-					transform: translateY(-50%);
-					border-left: 1px solid #ddd;
-					width: 0;
-					height: 36upx;
-				}
-			}
-		}
-
-		// 商品列表
-		.rf-product-list {
-			margin-top: 98upx;
-		}
-
-		/* 分类 */
-		.cate-mask {
-			position: fixed;
-			left: 0;
-			top: 40px;
-			bottom: 0;
-			width: 100%;
-			background: rgba(0, 0, 0, 0);
-			z-index: 95;
-			transition: .3s;
-
-			.cate-content {
-				width: 630upx;
-				height: 100%;
-				background: #fff;
-				float: right;
-				transform: translateX(100%);
-				transition: .3s;
-			}
-
-			&.none {
-				display: none;
-			}
-
-			&.show {
-				background: rgba(0, 0, 0, .4);
-
-				.cate-content {
-					transform: translateX(0);
-				}
-			}
-
-			.cate-list {
-				display: flex;
-				flex-direction: column;
-				height: 100%;
-
-				.cate-item {
-					display: flex;
-					align-items: center;
-					height: 70upx;
-					padding-left: 30upx;
-					font-size: 30upx;
-					position: relative;
-					color: $font-color-dark;
-				}
-
-				.one {
-					background: #eee;
-				}
-
-				.two {
-					background: #f8f8f8;
-					color: $font-color-base;
-					height: 60upx;
-					font-size: 28upx;
-					padding-left: 50upx;
-				}
-
-				.three {
-					font-size: 26upx;
-					color: $font-color-base;
-				}
-
-				.active {
-					color: $base-color;
-				}
-			}
-		}
-	}
-</style>

+ 0 - 1261
src/pages/product/product.vue

@@ -1,1261 +0,0 @@
-<template>
-	<view class="product">
-		<view class="detail" v-if="productDetail.name">
-			<!--顶部商品轮播图-->
-			<view class="carousel">
-				<swiper indicator-dots circular=true duration="400">
-				<swiper-item class="swiper-item" v-for="(item,index) in productDetail.covers" :key="index">
-					<view class="image-wrapper">
-						<image
-							:src="item"
-							class="loaded"
-							mode="aspectFill"
-						></image>
-					</view>
-				</swiper-item>
-			</swiper>
-			</view>
-			<!--商品信息-->
-			<view class="introduce-section">
-				<view class="title">
-					{{ productDetail.name || (' 暂无商品详情' + (!!errorInfo ? '[' + errorInfo + ']' : '')) }}
-					<uni-tag
-							v-if="productDetail.sales"
-							class="tag"
-							:inverted="true"
-							type="base"
-							:text="`${productDetail.sales}件已售`"
-							size="small" />
-					<uni-tag
-							v-if="productDetail.is_virtual == 1"
-							class="tag"
-							:inverted="true"
-							type="base"
-							text="虚拟物品"
-							size="small" />
-				</view>
-				<text class="sketch">{{ productDetail.sketch }}</text>
-				<view class="price-box point-box" v-if="productDetail.point_exchange_type == 4">
-					该商品仅需 <text class="price">{{ productDetail.point_exchange }} 积分</text>
-				</view>
-				<view class="price-box" v-else>
-					<text class="price" v-if="productDetail.price">¥ {{ currentSkuPrice || productDetail.price }}</text>
-					<text class="m-price" v-if="parseFloat(productDetail.market_price) > parseFloat(productDetail.price)">{{ productDetail.market_price }}</text>
-					<text class="coupon-tip" v-if="parseFloat(productDetail.market_price) > parseFloat(productDetail.price)">{{ (currentSkuPrice || productDetail.price) / productDetail.market_price | discountFilter }}折</text>
-				</view>
-				<view class="data" v-if="productDetail">
-					<view class="item"><text class="iconfont icontuandui"></text>推荐 {{ productDetail.collect_num || 0 }}</view>
-					<view class="item"><text class="iconfont iconkechakan"></text>浏览 {{ productDetail.view || 0 }}</view>
-				</view>
-			</view>
-			<!--  分享 -->
-			<view class="share-section" v-if="productDetail.name">
-				<view class="share-icon">
-					<text class="iconfont iconxingxing"></text>
-					 返
-				</view>
-				<text open-type="contact" class="tit">分享该商品给你的朋友们</text>
-				<!--#ifndef H5-->
-				<button :disabled="!!productDetail" class="share-btn" open-type="share">
-					立即分享
-					<i class="iconfont iconyou"></i>
-				</button>
-				<!--#endif-->
-			</view>
-			<!--商品参数-->
-			<view class="c-list">
-				<!--商品库存-->
-				<rf-item-popup title="商品库存" v-if="parseInt(productDetail.is_stock_visible, 10) == 1" :isEmpty="parseInt(currentStock || productDetail.stock, 10) === 0" empty="库存不足">
-					<view slot="content">{{ currentStock || productDetail.stock || 0 }} 个</view>
-				</rf-item-popup>
-				<!--发货地址-->
-				<rf-item-popup title="发货地址" :isEmpty="!productDetail.address_name" empty="发货地址未填写">
-					<view slot="content">{{ productDetail.address_name }}</view>
-				</rf-item-popup>
-				<!--购买类型-->
-				<rf-item-popup title="购买类型" @hide="hideService" :specClass="specClass" @show="toggleSpec" :isEmpty="specSelected.length === 0" :empty="`基础款 * ${cartCount}`">
-					<view slot="content">
-						<text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">
-							{{sItem.title}}
-						</text>
-					  <text> * {{ cartCount }}</text>
-					</view>
-					<view slot="right"><text class="iconfont iconyou"></text></view>
-					<view slot="popup" class="attr-content">
-						<view class="a-t">
-							<image :src="showTypeImage || productDetail.picture"></image>
-							<view class="right">
-								<text class="title">{{ productDetail.name }}</text>
-								<text class="price">¥{{ currentSkuPrice || productDetail.minSkuPrice }}</text>
-								<text class="stock">库存:{{ currentStock || productDetail.stock }}件</text>
-								<view class="selected" v-if="specSelected.length > 0">
-									已选:
-									<text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">
-										{{sItem.title}}
-									</text>
-									<text v-if="specSelected.length > 0">
-										 * {{ cartCount }}
-									</text>
-								</view>
-							</view>
-						</view>
-						<view v-for="(item,index) in specList" :key="index" class="attr-list">
-							<text>{{item.title}}</text>
-							<view class="item-list">
-								<view class="tit"
-									v-for="(childItem, childIndex) in specChildList"
-									v-if="childItem.base_spec_id === item.base_spec_id"
-									:key="childIndex"
-									:class="{selected: childItem.selected}"
-									:style="childItem.selected && parseInt(item.show_type) === 2 ? styleObject: ''"
-									@tap="selectSpec(childIndex, childItem.base_spec_id, item.show_type)"
-								>
-									<text v-if="parseInt(item.show_type) === 1">
-										{{childItem.title }}
-									</text>
-									<text v-if="parseInt(item.show_type) === 2">
-										{{childItem.title }}
-									</text>
-									<view v-if="parseInt(item.show_type) === 3">
-										<image
-											class="img"
-											:src="childItem.data || productDetail.picture"
-											mode="aspectFill"
-										></image>
-										{{childItem.title }}
-									</view>
-								</view>
-							</view>
-						</view>
-						<view class="select-count">
-							<text>购买数量</text>
-							<rf-number-box
-								class="step"
-								:min="1"
-								:max="parseInt(currentStock || productDetail.stock, 10)"
-								:value="cartCount"
-								@eventChange="numberChange"
-							></rf-number-box>
-						</view>
-						<button class="btn" @tap="toggleSpec">完成</button>
-					</view>
-				</rf-item-popup>
-				<!--优惠券-->
-				<rf-item-popup title="优惠券" @hide="hideService" :specClass="couponClass" @show="showPopupService('couponClass', 1)">
-					<view slot="content">
-						<text class="con t-r red">领取优惠券</text>
-					</view>
-					<view slot="right"><text class="iconfont iconyou"></text></view>
-					<view slot="popup" class="service">
-			      <!-- 优惠券列表 -->
-			      <view class="sub-list valid">
-			        <view class="row" v-for="(item,index) in productDetail.canReceiveCoupon" :key="index" @tap.stop="getCoupon(item)">
-			          <view class="carrier">
-			            <view class="title">
-				            <view>
-				              <text class="cell-icon">{{ parseInt(item.range_type, 10) === 2 ? '限' : '全' }}</text>
-				              <text class="cell-title">{{item.title}}</text>
-				            </view>
-				            <view>
-											<text class="price" v-if="item.money">{{item.money }}</text>
-											<text class="price-discount" v-else>{{ `${item.discount}折` }}</text>
-				            </view>
-			            </view>
-			            <view class="term">
-			              <text>{{ item.start_time | time }} ~ {{ item.end_time | time }}</text>
-										<text class="at_least">满{{ item.at_least }}可用</text>
-			            </view>
-			            <view class="usage">
-											<text>
-												{{ parseInt(item.range_type, 10) === 2 ? '部分产品使用' : '全场产品使用' }}
-											</text>
-			              <view>
-			                {{parseInt(item.max_fetch, 10) === 0 ? '不限' : `每人限领${item.max_fetch}` }}
-			                已领{{ item.get_count }}
-			                <text class="last" v-if="item.percentage">剩余{{ item.percentage }}%</text>
-			              </view>
-			            </view>
-			          </view>
-			        </view>
-			      </view>
-					</view>
-				</rf-item-popup>
-				<!--限购说明-->
-				<rf-item-popup title="限购说明">
-					<view slot="content">
-						<text>{{ parseInt(productDetail.max_buy, 10) === 0 ? '不限购' : `${productDetail.max_buy} 件` }}</text>
-					</view>
-				</rf-item-popup>
-				<!--积分活动-->
-				<rf-item-popup title="积分活动">
-					<view slot="content" class="con-list">
-						<text v-if="productDetail.point_exchange_type">兑换类型: {{ productDetail.point_exchange_type | pointExchangeTypeFilter }} </text>
-						<text v-if="parseInt(productDetail.give_point, 10) > 0">赠送类型: {{ productDetail.integral_give_type | integralGiveTypeFilter }} </text>
-						<text v-if="parseInt(productDetail.give_point, 10) > 0">下单可获得: {{ productDetail | givePointFilter }}</text>
-						<text v-if="productDetail.point_exchange != 0">兑换所需积分: {{ productDetail.point_exchange }} </text>
-						<text v-if="productDetail.max_use_point != 0">可使用抵扣积分: {{ productDetail.max_use_point }}</text>
-						<text class="buy-now" @tap="addCart('buy', true)" v-if="productDetail.point_exchange_type == 3">积分兑换 >>  </text>
-					</view>
-				</rf-item-popup>
-				<!--服务-->
-        <rf-item-popup title="服务" @hide="hideService" @show="showPopupService('serviceClass', productDetail.tags)" :specClass="serviceClass" :isEmpty="productDetail.tags.length === 0" empty="暂无相关服务">
-					<view slot="content">
-						<text>{{ productDetail.tags[0] }}</text>
-					</view>
-					<view slot="right" v-if="productDetail.tags.length > 0"><text class="iconfont iconyou"></text></view>
-					<view slot="popup" class="service">
-						<view class="content">
-							<view class="row" v-for="(item,index) in productDetail.tags" :key="index">
-								<view class="title">{{item}}</view>
-								<view class="description">此商品承诺{{item}}</view>
-							</view>
-						</view>
-						<button class="btn" @tap="hideService">完成</button>
-					</view>
-				</rf-item-popup>
-				<!--阶梯优惠-->
-				<rf-item-popup title="阶梯优惠" @hide="hideService" @show="showPopupService('ladderPreferentialClass', productDetail.ladderPreferential)" :specClass="ladderPreferentialClass" :isEmpty="productDetail.ladderPreferential.length === 0" empty="暂无阶梯优惠">
-					<view slot="content" class="con-list">
-						<text>
-							满{{ productDetail.ladderPreferential && productDetail.ladderPreferential[0] && productDetail.ladderPreferential[0].quantity }}件
-								<text v-if="parseInt(productDetail.ladderPreferential && productDetail.ladderPreferential[0] && productDetail.ladderPreferential[0].type, 10) === 1">
-									每件减{{ productDetail.ladderPreferential && productDetail.ladderPreferential[0] && productDetail.ladderPreferential[0].price }}元</text>
-								<text v-if="parseInt(productDetail.ladderPreferential && productDetail.ladderPreferential[0] && productDetail.ladderPreferential[0].type, 10) === 2">
-									每件{{ parseInt(productDetail.ladderPreferential && productDetail.ladderPreferential[0] && productDetail.ladderPreferential[0].price, 10) }}折</text>
-						</text>
-					</view>
-					<view slot="right" v-if="productDetail.ladderPreferential.length > 0"><text class="iconfont iconyou"></text></view>
-					<view slot="popup" class="service">
-						<view class="content">
-							<view class="row" v-for="(item,index) in productDetail.ladderPreferential" :key="index">
-								<view class="title">满{{ item.quantity }}件 <text v-if="parseInt(item.type, 10) === 1">每件减{{ item.price }}元</text>
-									<text v-if="parseInt(item.type, 10) === 2">每件{{ parseInt(item.price, 10) }}折</text>
-								</view>
-							</view>
-						</view>
-						<button class="btn" @tap="hideService">完成</button>
-					</view>
-				</rf-item-popup>
-				<!--商品参数-->
-				<rf-item-popup title="商品参数" @hide="hideService" @show="showPopupService('attributeValueClass', productDetail.attributeValue)" :specClass="attributeValueClass" :isEmpty="productDetail.attributeValue.length === 0" empty="暂无商品参数">
-					<view slot="content">
-						<text>
-							{{ `${productDetail.attributeValue && productDetail.attributeValue[0] && productDetail.attributeValue[0].title}: ${productDetail.attributeValue && productDetail.attributeValue[0] && productDetail.attributeValue[0].value}` }}</text>
-					</view>
-					<view slot="right" v-if="productDetail.attributeValue.length > 0"><text class="iconfont iconyou"></text></view>
-					<view slot="popup" class="service">
-						<view class="content">
-							<view class="row" v-for="(item,index) in productDetail.attributeValue" :key="index">
-								<view class="title">
-									{{ `${item.title}: ${item.value}` }}
-								</view>
-							</view>
-						</view>
-						<button class="btn" @tap="hideService">完成</button>
-					</view>
-				</rf-item-popup>
-			</view>
-			<!-- 评价 -->
-			<view class="eva-section" @tap="toEvaluateList">
-				<view class="e-header">
-					<text class="tit">评价</text>
-					<text>({{ productDetail.comment_num || 0 }})</text>
-					<text class="tip" v-if="productDetail.match_ratio">好评率 {{ productDetail.match_ratio }}%</text>
-					<text class="tip" v-else>暂无评价信息</text>
-					<i class="iconfont iconyou"></i>
-				</view>
-				<view class="eva-box" v-if="productDetail.evaluate && productDetail.evaluate.length > 0">
-					<image class="portrait"
-								 :src="productDetail.evaluate && productDetail.evaluate[0] && productDetail.evaluate[0].member_head_portrait || headImg" mode="aspectFill"></image>
-					<view class="right">
-						<view class="name">
-							<text>
-								{{ productDetail.evaluate && productDetail.evaluate[0] && productDetail.evaluate[0].member_nickname || '匿名用户' }}
-							</text>
-							<rf-rate
-								v-if="evaluateList.length > 0"
-								size="16"
-							  disabled="true"
-								:value="evaluateList[0].scores"
-								active-color="#fa436a" />
-						</view>
-						<text class="con in2line">{{ productDetail.evaluate && productDetail.evaluate[0] && productDetail.evaluate[0].content || '这个人很懒,什么都没留下~' }}</text>
-						<view class="bot">
-							<text class="attr">购买类型:{{ productDetail.evaluate && productDetail.evaluate[0] && productDetail.evaluate[0].sku_name || '基础版' }}</text>
-							<text class="time">{{ productDetail.evaluate && productDetail.evaluate[0] && productDetail.evaluate[0].created_at | time }}</text>
-						</view>
-					</view>
-				</view>
-			</view>
-			<!--底部商品详情-->
-			<view class="detail-desc">
-				<view class="d-header">
-					<text>商品详情</text>
-				</view>
-				<rich-text :nodes="productDetail.intro | formatRichText"></rich-text>
-			</view>
-			<!-- 底部操作菜单 -->
-			<view class="page-bottom">
-				<navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
-					<i class="iconfont iconxiatubiao--copy"></i>
-					<text>首页</text>
-				</navigator>
-				<navigator url="/pages/cart/cart" open-type="switchTab" class="p-b-btn cart">
-					<i class="iconfont icongouwuche"></i>
-					<text>购物车</text>
-					<rf-badge v-if="hasLogin && cartNum && cartNum > 0" type="error" size="small" class="badge" :text="cartNum"></rf-badge>
-				</navigator>
-				<view class="p-b-btn" :class="{active: favorite}" @tap="toFavorite">
-					<i class="iconfont iconshoucang"></i>
-					<text>收藏</text>
-				</view>
-				<!--<view @tap="navTo(`/pages/product/service/index`)" class="p-b-btn">-->
-					<!--<i class="iconfont icondanseshixintubiao-"></i>-->
-					<!--<text>客服</text>-->
-				<!--</view>-->
-				<view class="action-btn-group" v-if="parseInt((this.currentStock || this.productDetail.stock), 10) > 0">
-					<button type="primary"
-					        class="action-btn no-border buy-now-btn"
-					        :disabled="buyBtnDisabled"
-					        @tap="addCart('buy')">立即购买</button>
-					<button type="primary"
-									:disabled="addCartBtnDisabled"
-									class=" action-btn no-border add-cart-btn"
-									@tap="addCart('cart')">加入购物车</button>
-				</view>
-				<view class="action-btn-group" v-else>
-					<button type="primary"
-					        class="action-btn no-border buy-now-btn"
-					        :disabled="buyBtnDisabled"
-					        @tap="addCart('buy')">立即购买</button>
-					<button type="primary"
-					        class="action-btn "
-					        :disabled="buyBtnDisabled"
-					        @tap="addCart('buy')">库存不足</button>
-				</view>
-			</view>
-		</view>
-		<!-- 404页面 -->
-		<view v-if="!productDetail.name && !loading">
-			<rf-no-data :custom="true">
-				<view class="no-data-title">
-					{{ errorInfo || '暂无数据' }}
-				</view>
-				<view @tap="getProductDetail(productDetail.id)" slot="refresh" class="spec-color">重新加载</view>
-			</rf-no-data>
-		</view>
-		<!--页面加载动画-->
-    <rf-loading v-if="loading"></rf-loading>
-	</view>
-</template>
-
-<script>
-	/**
-	 * @des 商品详情
-	 *
-	 * @author stav stavyan@qq.com
-	 * @date 2020-03-23 15:04
-	 * @copyright 2019
-	 */
-	import {cartItemCount, cartItemCreate, productDetail} from '@/api/product';
-	import rfNumberBox from '@/components/rf-number-box';
-  import {collectCreate, collectDel, transmitCreate} from '@/api/basic';
-  import moment from '@/common/moment';
-	import {couponReceive} from '@/api/userInfo';
-	import rfRate from '@/components/rf-rate/rf-rate';
-	import rfBadge from '@/components/rf-badge/rf-badge'
-	import uniTag from '@/components/uni-tag/uni-tag'
-	import rfNoData from '@/components/rf-no-data'
-	import rfItemPopup from '@/components/rf-item-popup'
-	export default{
-		components: {
-			rfItemPopup,
-			rfBadge,
-			rfRate,
-			rfNumberBox,
-			uniTag,
-			rfNoData
-		},
-		filters: {
-		    /**
-			 * 处理富文本里的图片宽度自适应
-			 * 1.去掉img标签里的style、width、height属性
-			 * 2.img标签添加style属性:max-width:100%;height:auto
-			 * 3.修改所有style里的width属性为max-width:100%
-			 * 4.去掉<br/>标签
-			 * @param html
-			 * @returns {void|string|*}
-			 */
-			formatRichText (html) { //控制小程序中图片大小
-        if (html) {
-            let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
-						if(match.search(/style=/gi) == -1){
-							match = match.replace(/\<img/gi,'<img style=""');
-						}
-						return match;
-					});
-					newContent = newContent.replace(/style="/gi, '$& max-width:100% !important; ');
-					newContent = newContent.replace(/<br[^>]*\/>/gi, '');
-					return newContent;
-        } else {
-            return '暂无商品详情'
-        }
-			},
-			time(val) {
-				return moment(val * 1000).format('YYYY-MM-DD HH:mm')
-			},
-			discountFilter (val) {
-		    return (val * 10).toFixed(1);
-			},
-			pointExchangeTypeFilter(val) {
-				const type = ['', '非积分兑换', '积分加现金', '积分兑换或直接购买', '只支持积分兑换'];
-				return type[parseInt(val, 10)];
-			},
-			integralGiveTypeFilter(val) {
-				const type = ['固定积分', '百分比'];
-				return type[parseInt(val, 10)];
-			},
-			givePointFilter(val) {
-				return parseInt(val.integral_give_type, 10) === 1 ?
-						Math.round(parseInt(val.give_point, 10) / 100 * parseInt(val.minSkuPrice, 10)) :
-						parseInt(val.give_point, 10);
-			}
-		},
-		data() {
-			return {
-				serviceClass: 'none',//服务弹窗css类,控制开关动画
-				ladderPreferentialClass: 'none',//服务弹窗css类,控制开关动画
-				attributeValueClass: 'none',//scss类,控制开关动画
-				specClass: 'none',
-				couponClass: 'none',
-				cartType: null,
-				maskState: 0, //优惠券面板显示状态
-				couponList: [],
-				productDetail: {},
-				styleObject: {},
-				showTypeImage: null,
-				specSelected:[],
-				favorite: false,
-				shareList: [],
-				currentStock: null,
-				currentSkuPrice: null,
-				specList: [],
-				specChildList: [],
-				cartCount: 1,
-				product_id: null,
-				evaluateList: [],
-				hasLogin: null,
-				cartNum: null,
-				loading: true,
-        errorInfo: '',
-				headImg: this.$mAssetsPath.headImg,
-				isPointExchange: false
-			};
-		},
-		computed: {
-			buyBtnDisabled () {
-			    return parseInt(this.currentStock || this.productDetail.stock, 10) === 0;
-			},
-			addCartBtnDisabled () {
-		    return this.productDetail.point_exchange_type == 2 ||
-			    this.productDetail.point_exchange_type == 4 ||
-			    (this.currentStock || this.productDetail.stock) == 0 ||
-			    this.productDetail.is_virtual == 1;
-			}
-		},
-		async onLoad(options){
-			this.initData(options.id);
-			//规格 默认选中第一条
-			this.specList.forEach(item=>{
-				for(let cItem of this.specChildList){
-					if(cItem.pid === item.id){
-						this.$set(cItem, 'selected', true);
-						this.specSelected.push(cItem);
-						break; //forEach不能使用break
-					}
-				}
-			});
-			this.product_id = options.id;
-		},
-		onShareAppMessage() {
-		  // #ifdef MP-WEIXIN
-      this.$http.post(`${transmitCreate}`, {
-        topic_type: 'product',
-        topic_id: this.product_id
-      }).then(()=>{
-        return {
-          title: this.productDetail.name,
-          path: '/pages/product/product?id=' + this.product_id
-        }
-      })
-		  // #endif
-		  // #ifdef MP-QQ
-      return {
-        title: this.productDetail.name,
-        path: '/pages/product/product?id=' + this.product_id
-      }
-		  // #endif
-		},
-		methods:{
-			navTo (route) {
-				if (!this.hasLogin) {
-					this.$mHelper.backToLogin();
-				} else {
-					this.$mRouter.push({route});
-				}
-			},
-			// 弹窗
-			showPopupService(type, list) {
-				if(list.length === 0) return;
-				this[type] = 'show';
-			},
-			shareToH5() {
-				this.$mHelper.toast('请复制连接进行分享');
-			},
-			//关闭服务弹窗
-			hideService() {
-				this.specClass = 'none';
-				this.couponClass = 'none';
-				this.serviceClass = 'none';
-				this.ladderPreferentialClass = 'none';
-				this.attributeValueClass = 'none';
-			},
-			// 获取优惠券
-			async getCoupon(item) {
-				if (!this.hasLogin) {
-					this.maskState = 0;
-					this.$mHelper.backToLogin();
-					return;
-				}
-				await this.$http.post(`${couponReceive}`, {
-					id: item.id
-				}).then(() => {
-			    this.$mHelper.toast('领取成功');
-					this.maskState = 0;
-				}).catch(() => {
-					this.maskState = 0;
-				})
-			},
-			// 跳转至评价列表
-			toEvaluateList () {
-				if (!this.productDetail.evaluateStat || parseInt(this.productDetail.comment_num, 10) === 0) return;
-				this.$mRouter.push({route: `/pages/order/evaluation/list?comment_num=${this.productDetail.comment_num}&evaluateStat=${JSON.stringify(this.productDetail.evaluateStat)}`});
-			},
-			numberChange(data){
-				this.cartCount = data.number;
-			},
-			// 数据初始化
-			async initData(id) {
-				this.hasLogin = this.$mStore.getters.hasLogin;
-				this.cartNum = uni.getStorageSync('cartNum');
-				this.productDetail.id = id;
-				await this.getProductDetail(id);
-			},
-			// 获取产品详情
-			async getProductDetail (id) {
-				await this.$http.get(`${productDetail}`, {
-					id
-				}).then(async r => {
-					this.loading = false;
-          this.productDetail = r.data;
-          this.evaluateList = await r.data.evaluate;
-          this.favorite = this.productDetail.myCollect ? true : false;
-          this.specList = this.productDetail.base_attribute_format
-          this.specList.forEach(item => {
-              this.specChildList = [...this.specChildList, ...item.value]
-          });
-          /**
-           * 修复选择规格存储错误
-           * 将这几行代码替换即可
-           * 选择的规格存放在specSelected中
-           */
-          this.specSelected = [];
-          r.data.base_attribute_format.forEach(item => {
-              item.value[0].selected = true
-              this.specSelected.push(item.value[0]);
-          });
-          let skuStr = [];
-          this.specSelected.forEach(item => {
-              skuStr.push(item.base_spec_value_id)
-          })
-          this.productDetail.sku.forEach(item => {
-              if (item.data === skuStr.join('-')) {
-                  this.currentStock = item.stock;
-                  this.currentSkuPrice = item.price;
-                  return;
-              }
-          })
-        }).catch(err => {
-					this.loading = false;
-					this.errorInfo = err;
-				})
-			},
-			//规格弹窗开关
-			toggleSpec() {
-				if (!this.productDetail.id) return;
-				if(this.specClass === 'show'){
-					if (!this.hasLogin) {
-						this.specClass = 'none';
-						this.$mHelper.backToLogin();
-						return;
-					}
-          if (this.specSelected.length < this.productDetail.base_attribute_format.length){
-				    this.$mHelper.toast('请先选择规格');
-            return;
-          }
-          const skuStr = [];
-          let sku_id = '';
-          this.specSelected.forEach(item => {
-              skuStr.push(item.base_spec_value_id)
-          })
-          this.productDetail.sku.forEach(item => {
-            if (item.data === skuStr.join('-')) {
-              sku_id = item.id;
-              this.currentStock = item.stock;
-              this.currentSkuPrice = item.price;
-            }
-          });
-					if (parseInt(this.currentStock, 10) === 0) {
-				    this.$mHelper.toast('库存不足');
-				    return;
-					}
-					if (this.cartType === 'cart') {
-						this.handleCartItemCreate(sku_id);
-					} else if (this.cartType === 'buy') {
-						this.buy(sku_id);
-					}
-					this.cartType = null;
-					this.specClass = 'hide';
-					setTimeout(() => {
-						this.specClass = 'none';
-					}, 250);
-				} else if(this.specClass === 'none'){
-					this.specClass = 'show';
-				}
-			},
-			hideSpec() {
-				this.specClass = 'hide';
-				setTimeout(() => {
-					this.specClass = 'none';
-				}, 250);
-			},
-			// 添加商品至购物车
-			async handleCartItemCreate (sku_id) {
-				await this.$http.post(`${cartItemCreate}`, {
-					sku_id,
-					num: this.cartCount
-				}).then(async () => {
-					await this.$http.get(`${cartItemCount}`).then(async r => {
-						uni.setStorageSync('cartNum', r.data);
-						this.cartNum = r.data;
-						await uni.setTabBarBadge({
-							index: this.$mConstDataConfig.cartIndex,
-							text: r.data
-						});
-					});
-					this.$mHelper.toast('添加成功,在购物车等');
-				})
-			},
-			//选择规格
-			selectSpec(index, pid, type){
-				let list = this.specChildList;
-				list.forEach(item=>{
-					if(item.base_spec_id === pid){
-						this.$set(item, 'selected', false);
-					}
-				})
-				if (parseInt(type, 10) === 3) {
-					this.showTypeImage = list[index].data;
-				}
-				if (parseInt(type, 10) === 2) {
-					this.styleObject = {
-						color: list[index].data
-						// border: `1px solid ${list[index].data}`,
-					};
-				}
-				this.$set(list[index], 'selected', true);
-				//存储已选择
-				/**
-				 * 修复选择规格存储错误
-				 * 将这几行代码替换即可
-				 * 选择的规格存放在specSelected中
-				 */
-				this.specSelected = [];
-				list.forEach(item=>{
-					if(item.selected === true){
-						this.specSelected.push(item);
-					}
-				})
-				let skuStr = []
-				this.specSelected.forEach(item => {
-					skuStr.push(item.base_spec_value_id)
-				})
-				this.productDetail.sku.forEach(item => {
-						if (item.data === skuStr.join('-')) {
-							this.currentStock = item.stock;
-              this.currentSkuPrice = item.price;
-							return;
-						}
-					});
-			},
-			// 收藏
-			async toFavorite() {
-				if (!this.productDetail.id) return;
-				if (!this.$mStore.getters.hasLogin) {
-					this.specClass = 'none';
-					this.$mHelper.backToLogin();
-				} else {
-          this.favorite ? this.handleCollectDel() : this.handleCollectCreate();
-        }
-			},
-			// 收藏商品
-			async handleCollectCreate() {
-				await this.$http.post(`${collectCreate}`, {
-					topic_id: this.product_id,
-					topic_type: 'product'
-				}).then(() => {
-					this.favorite = !this.favorite;
-					this.$mHelper.toast('收藏成功');
-				})
-			},
-			// 取消收藏商品
-			async handleCollectDel() {
-				await this.$http.delete(`${collectDel}?id=${this.productDetail.myCollect.id}`).then(() => {
-					this.favorite = !this.favorite;
-					this.$mHelper.toast('取消收藏成功');
-				})
-			},
-			async buy(sku_id) {
-				const list = {};
-				const data = {};
-				data.sku_id = sku_id;
-				data.num = this.cartCount;
-				if (this.productDetail.point_exchange_type == 2 || this.productDetail.point_exchange_type == 4 || (this.productDetail.point_exchange_type == 3 && this.isPointExchange)) {
-					list.type = 'point_exchange';
-				} else {
-					list.type = 'buy_now';
-				}
-				list.data = JSON.stringify(data);
-				this.$mRouter.push({route: `/pages/order/create/order?data=${JSON.stringify(list)}`});
-			},
-			addCart(type, isPointExchange){
-				if (!this.productDetail.id) return;
-				this.specClass = 'show';
-				this.cartType = type;
-				this.isPointExchange = isPointExchange;
-			},
-			stopPrevent(){
-			}
-		}
-	}
-</script>
-
-<style scoped lang='scss'>
-	page{
-		background: $page-color-base;
-	}
-	.detail {
-		padding-bottom: 160upx;
-	}
-	.carousel {
-		height: 722upx;
-		position:relative;
-		swiper{
-			height: 100%;
-		}
-		.image-wrapper{
-			width: 100%;
-			height: 100%;
-		}
-		.swiper-item {
-			display: flex;
-			justify-content: center;
-			align-content: center;
-			height: 750upx;
-			overflow: hidden;
-			image {
-				width: 100%;
-				height: 100%;
-			}
-		}
-	}
-	/* 标题简介 */
-	.introduce-section{
-		background: #fff;
-		padding: 20upx 30upx;
-		.title{
-			font-size: $font-lg;
-			color: $font-color-dark;
-			.tag {
-				margin-left: 20upx;
-			}
-		}
-		.data {
-			display: flex;
-			justify-content: space-between;
-			margin: 5upx 15% 0;
-			font-size: $font-base;
-			color: $font-color-base;
-			.item {
-				height: 50upx;
-				line-height: 50upx;
-			}
-			.iconfont {
-				color: $font-color-light;
-				margin-right: 10upx;
-			}
-		}
-		.sketch {
-			margin-top: 10upx;
-			display: block;
-			color: $font-color-light;
-			font-size: $font-base;
-		}
-		.price-box{
-			display:flex;
-			align-items:baseline;
-			height: 64upx;
-			padding: 10upx 0;
-			font-size: 26upx;
-			color:$base-color;
-		}
-		.point-box {
-			color: $font-color-base;
-			.price {
-				color:$base-color;
-				margin-left: 10upx;
-			}
-		}
-		.price{
-			font-size: $font-lg + 2upx;
-		}
-		.m-price{
-			margin:0 12upx;
-			color: $font-color-light;
-			text-decoration: line-through;
-		}
-		.coupon-tip{
-			align-items: center;
-			padding: 4upx 10upx;
-			background: $uni-color-primary;
-			font-size: $font-sm;
-			color: #fff;
-			border-radius: 6upx;
-			line-height: 1;
-			transform: translateY(-4upx);
-		}
-	}
-	/* 分享 */
-	.share-section{
-		display:flex;
-		align-items:center;
-		color: $font-color-base;
-		background: linear-gradient(to left, #fdf5f6, #fbebf6);
-		padding: 12upx 30upx;
-		.share-icon{
-			display:flex;
-			align-items:center;
-			width: 70upx;
-			height: 30upx;
-			line-height: 1;
-			border: 1px solid $uni-color-primary;
-			border-radius: 4upx;
-			position:relative;
-			overflow: hidden;
-			font-size: 22upx;
-			color: $uni-color-primary;
-			&:after{
-				content: '';
-				width: 50upx;
-				height: 50upx;
-				border-radius: 50%;
-				left: -20upx;
-				top: -12upx;
-				position:absolute;
-				background: $uni-color-primary;
-			}
-		}
-		.iconxingxing{
-			position:relative;
-			z-index: 1;
-			font-size: 24upx;
-			margin-left: 2upx;
-			margin-right: 10upx;
-			color: #fff;
-			line-height: 1;
-		}
-		.tit{
-			font-size: $font-base;
-			margin-left:10upx;
-		}
-		.icon-bangzhu1{
-			padding: 10upx;
-			font-size: 30upx;
-			line-height: 1;
-		}
-		.share-btn{
-			flex: 1;
-			text-align:right;
-			font-size: $font-sm;
-			color: $uni-color-primary;
-			background: none;
-		}
-    .share-btn:after {
-      border: none;
-    }
-		.iconyou{
-			font-size: $font-sm;
-			margin-left: 4upx;
-			color: $uni-color-primary;
-		}
-	}
-	.c-list{
-		font-size: $font-sm + 2upx;
-		color: $font-color-base;
-		background: #fff;
-		.c-row{
-			display:flex;
-			align-items:center;
-			padding: 20upx 30upx;
-			position:relative;
-		}
-		.tit{
-			width: 140upx;
-		}
-		.con{
-			flex: 1;
-			color: $font-color-dark;
-			.selected-text{
-				margin-right: 10upx;
-			}
-		}
-		.bz-list{
-			height: 40upx;
-			font-size: $font-sm+2upx;
-			color: $font-color-dark;
-			text{
-				display: inline-block;
-				margin-right: 30upx;
-			}
-		}
-		.con-list{
-			flex: 1;
-			display:flex;
-			flex-direction: column;
-			color: $font-color-dark;
-			line-height: 40upx;
-			.buy-now {
-				color: $uni-color-primary;
-			}
-		}
-		.red{
-			color: $uni-color-primary;
-		}
-	}
-	/* 评价 */
-	.eva-section{
-		display: flex;
-		flex-direction: column;
-		padding: 20upx 30upx;
-		background: #fff;
-		margin-top: 16upx;
-		.e-header{
-			display: flex;
-			align-items: center;
-			height: 70upx;
-			font-size: $font-sm + 2upx;
-			color: $font-color-light;
-			.tit{
-				font-size: $font-base + 2upx;
-				color: $font-color-dark;
-				margin-right: 4upx;
-			}
-			.con {
-				padding: 0;
-			}
-			.tip{
-				flex: 1;
-				text-align: right;
-			}
-			.iconyou{
-				margin-left: 10upx;
-			}
-		}
-		.eva-box{
-			display: flex;
-			padding: 20upx 0;
-			.portrait{
-				flex-shrink: 0;
-				width: 80upx;
-				height: 80upx;
-				border-radius: 100px;
-			}
-			.right{
-				flex: 1;
-				display: flex;
-				flex-direction: column;
-				font-size: $font-base;
-				color: $font-color-base;
-				padding-left: 26upx;
-				.con{
-					font-size: $font-base;
-					color: $font-color-dark;
-				}
-				.bot{
-					display: flex;
-					justify-content: space-between;
-					font-size: $font-sm;
-					color:$font-color-light;
-				}
-				.name {
-					align-items: center;
-					display: flex;
-					justify-content: space-between;
-				}
-			}
-		}
-	}
-	/*  详情 */
-	.detail-desc{
-		background: #fff;
-		margin-top: 16upx;
-		padding: 0 10upx;
-		.d-header{
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			height: 80upx;
-			font-size: $font-base + 2upx;
-			color: $font-color-dark;
-			position: relative;
-			text{
-				padding: 0 20upx;
-				background: #fff;
-				position: relative;
-				z-index: 1;
-			}
-			&:after{
-				position: absolute;
-				left: 50%;
-				top: 50%;
-				transform: translateX(-50%);
-				width: 300upx;
-				height: 0;
-				content: '';
-				border-bottom: 1px solid #ccc;
-			}
-		}
-	}
-	/* 规格选择弹窗 */
-	.attr-content{
-		padding: 10upx 30upx;
-		.select-count {
-			padding: 30upx 0 10upx;
-			margin: 20upx 0;
-			border-top: 1px solid #ccc;
-			display: flex;
-			justify-content:space-between;
-			overflow: hidden;
-			position: relative;
-			font-size: $font-base + 6upx;
-			color: $font-color-base;
-			line-height: 60upx;
-			.step {
-				position: absolute;
-				left: 60vw;
-				bottom: 10upx;
-			}
-		}
-		.a-t{
-			display: flex;
-			image{
-				width: 170upx;
-				height: 170upx;
-				flex-shrink: 0;
-				margin-top: -40upx;
-				border-radius: 8upx;;
-			}
-			.right{
-				display: flex;
-				flex-direction: column;
-				padding-left: 24upx;
-				font-size: $font-sm + 2upx;
-				color: $font-color-base;
-				line-height: 42upx;
-				.price{
-					font-size: $font-lg;
-					color: $uni-color-primary;
-					margin-bottom: 10upx;
-				}
-				.selected-text{
-					margin-right: 10upx;
-				}
-			}
-		}
-		.attr-list{
-			display: flex;
-			flex-direction: column;
-			font-size: $font-base + 2upx;
-			color: $font-color-base;
-			padding-top: 15upx;
-			padding-left: 10upx;
-		}
-		.item-list{
-			padding: 10upx 0 0;
-			display: flex;
-			flex-wrap: wrap;
-			.tit{
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				background: #eee;
-				margin-right: 20upx;
-				margin-bottom: 20upx;
-				border-radius: 100upx;
-				min-width: 60upx;
-				height: 60upx;
-				padding: 0 20upx;
-				font-size: $font-base;
-				color: $font-color-dark;
-				.img {
-					width: 36upx;
-					height: 24upx;
-					margin: 0 4upx;
-				}
-			}
-			.selected{
-				background: #fbebee;
-				color: $uni-color-primary;
-			}
-		}
-	}
-	/* 底部操作菜单 */
-	.page-bottom{
-		position:fixed;
-		left: 30upx;
-		bottom:30upx;
-		z-index: 95;
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		width: 690upx;
-		height: 100upx;
-		background: rgba(255,255,255,.9);
-		box-shadow: 0 0 20upx 0 rgba(0,0,0,.5);
-		border-radius: 16upx;
-		.cart {
-			position: relative;
-			.badge {
-				position: absolute;
-				top: -8upx;
-				right: 0upx;
-			}
-		}
-		.p-b-btn{
-			display:flex;
-			flex-direction: column;
-			align-items: center;
-			justify-content: center;
-			font-size: $font-sm;
-			color: $font-color-base;
-			width: 96upx;
-			height: 80upx;
-			.iconfont{
-				font-size: 36upx;
-				line-height: 48upx;
-				color: $font-color-light;
-			}
-			&.active, &.active .iconfont{
-				color: $uni-color-primary;
-			}
-			.icon-fenxiang2 {
-				font-size: 42upx;
-				transform: translateY(-2upx);
-			}
-			.iconshoucang {
-				font-size: 40upx;
-			}
-			.icondanseshixintubiao- {
-				font-size: 46upx;
-			}
-			.red {
-				color: $base-color;
-			}
-		}
-		.action-btn-group{
-			display: flex;
-			height: 76upx;
-			border-radius: 100px;
-			overflow: hidden;
-			box-shadow: 0 20upx 40upx -16upx #fa436a;
-			box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
-			background: linear-gradient(to right, #ffac30,#fa436a,#F56C6C);
-			margin: 0 20upx;
-			position:relative;
-			&:after{
-				content: '';
-				position:absolute;
-				top: 50%;
-				right: 50%;
-				transform: translateY(-50%);
-				height: 28upx;
-				width: 0;
-				border-right: 1px solid rgba(255,255,255,.5);
-			}
-			.action-btn{
-				display:flex;
-				align-items: center;
-				justify-content: center;
-				width: 180upx;
-				height: 100%;
-				font-size: $font-base ;
-				padding: 0;
-				border-radius: 0;
-				background: transparent;
-			}
-		}
-	}
-	.layer {
-		position: fixed;
-		z-index: 99;
-		bottom: 0;
-		width: 100%;
-		border-radius: 10upx 10upx 0 0;
-		background-color: #fff;
-		.content {
-			width: 100%;
-			padding: 20upx 0;
-		}
-		.btn{
-			height: 66upx;
-			line-height: 66upx;
-			border-radius: 100upx;
-			background: $uni-color-primary;
-			font-size: $font-base + 2upx;
-			color: #fff;
-			margin: 30upx 30upx 20upx;
-		}
-	}
-	.service {
-		padding: $spacing-base $spacing-lg 0;
-		.row {
-			margin-bottom: $spacing-base;
-			.title {
-				font-size: $font-lg;
-			}
-			.description {
-				font-size: $font-base;
-			}
-		}
-	}
-	.selected-text {
-		margin-right: 4upx;
-	}
-	.sub-list {
-		margin: 40upx 0 80upx;
-		.row {
-			width: 100%;
-			margin-bottom: $spacing-lg;
-		}
-	}
-</style>

+ 0 - 120
src/pages/set/about/about.vue

@@ -1,120 +0,0 @@
-<template>
-	<view class="about">
-		<view class="list-cell b-b" v-for="item in navList" :key="item.title" @tap="navTo(`/pages/set/about/detail?field=${item.url}&title=${item.title}`)" hover-class="cell-hover" :hover-stay-time="50">
-			<text class="cell-tit">{{item.title}}</text>
-			<text class="cell-tip">{{item.content}}</text>
-			<text class="cell-more iconfont iconyou"></text>
-		</view>
-		<view class="history-section icon">
-			<view class="sec-header">
-				<i class="iconfont iconshare"></i>
-				<text>分享商城二维码给好友</text>
-			</view>
-			<view class="qrcode-wrapper">
-				<view class="qrcode-section">
-					<rf-image class="qrcode" :src="aboutInfo.qrcode ||''"></rf-image>
-					<text class="info">商城二维码</text>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>/**
-* @des 关于商城
-*
-* @author stav stavyan@qq.com
-* @date 2019-12-09 10:13
-* @copyright 2019
-*/
-import {merchantView} from '@/api/merchant';
-export default {
-	data() {
-		return {
-			aboutInfo: {},
-			navList: [
-				{ title: '商城介绍', url: '' },
-				// { title: '版权信息', url: 'copyright_companyname,copyright_desc,copyright_url' },
-				// { title: '证照信息', url: '' },
-				{ title: '注册协议', url: 'protocol_register' },
-				{ title: '充值协议', url: 'protocol_recharge' },
-				{ title: '隐私协议', url: 'protocol_privacy' }
-			]
-		}
-	},
-	onLoad() {
-		this.initData();
-	},
-	methods: {
-		// 初始化数据
-		initData () {
-			this.getConfigList();
-		},
-		// 获取商城信息
-		async getConfigList() {
-	    const userInfo = uni.getStorageSync('userInfo');
-			await this.$http.get(`${merchantView}`, {
-				id: userInfo.merchant_id,
-				field: 'web_qrcode'
-			}).then(r => {
-				this.aboutInfo = r.data
-			});
-		},
-		// 统一跳转接口
-		navTo(route){
-			this.$mRouter.push({route});
-		}
-	}
-}
-</script>
-<style lang="scss">
-	page{
-		position: relative;
-		background-color: #f5f5f5;
-	}
-	/*关于商城*/
-	.about {
-		padding: 20upx 0;
-		.history-section{
-			padding: 30upx 0 0;
-			margin-top: 20upx;
-			background: #fff;
-			border-radius:10upx;
-			.sec-header{
-				display:flex;
-				align-items: center;
-				font-size: $font-base;
-				color: $font-color-dark;
-				line-height: 40upx;
-				margin-left: 30upx;
-				.iconfont{
-					font-size: 44upx;
-					color: #5eba8f;
-					margin-right: 16upx;
-					line-height: 40upx;
-				}
-			}
-			.qrcode-wrapper {
-				margin: 40upx auto;
-				display: flex;
-				.qrcode-section {
-					flex: 1;
-					overflow: hidden;
-					text-align: center;
-					.qrcode {
-						width: 280upx;
-						height: 280upx;
-						image {
-							width: 280upx;
-							height: 280upx;
-						}
-					}
-					.info {
-						display: block;
-						margin-bottom: 40upx;
-					}
-				}
-			}
-		}
-	}
-</style>

+ 0 - 136
src/pages/set/about/detail.vue

@@ -1,136 +0,0 @@
-<template>
-	<view class="about">
-		<view class="shop-info" v-if="title === '商城介绍'">
-			<rf-image :src="detail.cover || detail.web_logo || ''"></rf-image>
-			<view v-if="detail.title"><text>商城名称: </text><text>{{ detail.title }}</text></view>
-			<view v-if="detail.address_name"><text>联系地址: </text><text>{{ detail.address_name }}</text></view>
-			<view v-if="detail.address_details"><text>详细地址: </text><text>{{ detail.address_details }}</text></view>
-			<view v-if="detail.mobile"><text>手机号码: </text><text>{{ detail.mobile }}</text></view>
-			<view v-if="detail.qq"><text>QQ: </text><text>{{ detail.qq }}</text></view>
-		</view>
-		<view class="shop-info" v-if="title === '注册协议'">
-			<view v-if="detail.protocol_register">
-				<rich-text :nodes="detail.protocol_register | formatRichText"></rich-text>
-			</view>
-			<rf-empty :info="`暂无${title}`" v-if="!detail.protocol_register"></rf-empty>
-		</view>
-		<view class="shop-info" v-if="title === '隐私协议'">
-			<view v-if="detail.protocol_privacy">
-				<rich-text :nodes="detail.protocol_privacy | formatRichText"></rich-text>
-			</view>
-			<rf-empty :info="`暂无${title}`" v-if="!detail.protocol_privacy"></rf-empty>
-		</view>
-		<view class="shop-info" v-if="title === '充值协议'">
-			<view v-if="detail.protocol_recharge">
-				<rich-text :nodes="detail.protocol_recharge | formatRichText"></rich-text>
-			</view>
-			<rf-empty :info="`暂无${title}`" v-if="!detail.protocol_recharge"></rf-empty>
-		</view>
-		<rf-empty :info="`暂无${title}`" v-if="!detail && !loading"></rf-empty>
-		<!--加载动画-->
-		<rf-loading v-if="loading"></rf-loading>
-	</view>
-</template>
-
-<script>
-/**
-* @des 关于商城详情
-*
-* @author stav stavyan@qq.com
-* @date 2019-12-09 10:13
-* @copyright 2019
-*/
-import {configList} from '@/api/basic';
-import {merchantView} from '@/api/merchant';
-export default {
-	data() {
-		return {
-			detail: {},
-			title: null,
-			loading: true
-		}
-	},
-	onLoad(options) {
-		this.initData(options);
-	},
-	filters: {
-	    /**
-		 * 处理富文本里的图片宽度自适应
-		 * 1.去掉img标签里的style、width、height属性
-		 * 2.img标签添加style属性:max-width:100%;height:auto
-		 * 3.修改所有style里的width属性为max-width:100%
-		 * 4.去掉<br/>标签
-		 * @param html
-		 * @returns {void|string|*}
-		 */
-		formatRichText (html) { //控制小程序中图片大小
-	    if (html) {
-	        let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
-					if(match.search(/style=/gi) == -1){
-						match = match.replace(/\<img/gi,'<img style=""');
-					}
-					return match;
-				});
-				newContent = newContent.replace(/style="/gi, '$& max-width:100% !important; ');
-				newContent = newContent.replace(/<br[^>]*\/>/gi, '');
-				return newContent;
-	    } else {
-	        return '暂无商品详情'
-	    }
-		},
-	},
-	methods: {
-		// 数据初始化
-		initData (options) {
-			this.title = options.title;
-			uni.setNavigationBarTitle({
-				title: options.title
-			});
-			this.getConfigList(options.field);
-		},
-		// 获取商城详情
-		async getConfigList(field) {
-	    if (field.indexOf('protocol') !== -1) {
-				await this.$http.get(`${configList}`, {
-					field
-				}).then(r => {
-			    this.loading = false;
-					this.detail = r.data
-				}).catch(() => {
-			    this.loading = false;
-				});
-	    } else {
-			  const userInfo = uni.getStorageSync('userInfo');
-		    if (!userInfo) return;
-				await this.$http.get(`${merchantView}`, {
-					id: userInfo.merchant_id,
-					field
-				}).then(r => {
-			    this.loading = false;
-					this.detail = r.data
-				}).catch(() => {
-			    this.loading = false;
-				});
-	    }
-		}
-	}
-}
-</script>
-<style lang="scss">
-	page{
-		background-color: $page-color-base;
-		position: relative;
-		.about {
-			padding-top: $spacing-lg;
-			.shop-info {
-				text-align: center;
-				image {
-					margin-top: 100upx;
-					width: 240upx;
-					height: 240upx;
-					border-radius: 50%;
-				}
-			}
-		}
-	}
-</style>

+ 0 - 148
src/pages/set/authorization/list.vue

@@ -1,148 +0,0 @@
-<template>
-	<view class="authorization-list">
-		<view class="rf-list" v-if="thirdPartyAuthList.length > 0">
-			<view class="rf-list-item" v-for="(item, index) in thirdPartyAuthList" :key="index">
-				<view class="left">
-					<image class="head_portrait" :src="item.head_portrait"></image>
-				</view>
-				<view class="mid">
-					<view class="title">
-						<text class="iconfont icon iconweixinzhifu"></text>
-						<text class="address">{{item.oauth_client | oauthClientFilter}}</text>
-					</view>
-					<view class="time">
-						<text>授权时间: {{item.updated_at | time}}</text>
-					</view>
-				</view>
-				<view class="right">
-					<text class="rf-button" @tap.stop="unBind(item.id)">解除绑定</text>
-				</view>
-			</view>
-			<rf-load-more :status="loadingType" v-if="thirdPartyAuthList.length > 0" />
-		</view>
-		<rf-empty :info="'您暂未授权第三方平台~'" v-if="thirdPartyAuthList.length === 0 && !loading"></rf-empty>
-		<!--加载动画-->
-		<rf-loading v-if="loading"></rf-loading>
-	</view>
-</template>
-
-<script>
-	import {thirdPartyAuthDelete, thirdPartyAuthList} from '@/api/userInfo';
-	import moment from '@/common/moment';
-	import rfLoadMore from '@/components/rf-load-more/rf-load-more';
-	export default {
-		components: {
-			rfLoadMore
-		},
-		data() {
-			return {
-				page: 1,
-				loadingType: 'more',
-				thirdPartyAuthList: [],
-				loading: true
-			}
-		},
-		filters: {
-			time(val) {
-				return moment(val * 1000).format('YYYY-MM-DD HH:mm:ss')
-			},
-			oauthClientFilter(val) {
-				switch (val) {
-					case 'wechat':
-						return '微信';
-					case 'wechatMp':
-						return '微信小程序';
-					case 'qq':
-						return 'QQ小程序';
-					case 'sina':
-						return '新浪';
-				}
-			}
-		},
-		//下拉刷新
-		onPullDownRefresh(){
-			this.page = 1;
-			this.thirdPartyAuthList.length = 0;
-			this.loading = true;
-			this.getThirdPartyAuthList('refresh');
-		},
-		//加载更多
-		onReachBottom(){
-			this.page ++;
-			this.getThirdPartyAuthList();
-		},
-		onLoad(){
-			this.initData()
-		},
-		methods: {
-			// 数据初始化
-			initData () {
-				this.page = 1;
-				this.thirdPartyAuthList.length = 0;
-				this.getThirdPartyAuthList();
-			},
-			// 获取收货地址列表
-			async getThirdPartyAuthList (type) {
-				await this.$http.get(`${thirdPartyAuthList}`).then(r=>{
-					this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-					this.loadingType  = r.data.length === 10 ? 'more' : 'nomore';
-					this.thirdPartyAuthList = [ ...this.thirdPartyAuthList, ...r.data ];
-				}).catch(() => {
-					this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-				})
-			},
-			// 解绑第三方授权登录
-			async unBind (id) {
-				await this.$http.delete(`${thirdPartyAuthDelete}?id=${id}`).then(r=>{
-						this.page = 1;
-						this.thirdPartyAuthList = [];
-						this.getThirdPartyAuthList();
-				})
-			}
-		}
-	}
-</script>
-
-<style lang='scss'>
-	page{
-		background-color: $page-color-base;
-	}
-	.authorization-list {
-		.rf-list {
-      .left {
-        .head_portrait {
-            width: 80upx;
-            height: 80upx;
-            margin: $spacing-lg $spacing-lg $spacing-lg 0;
-            border-radius: 50%;
-        }
-      }
-      .mid {
-          flex: 1;
-          .title {
-              font-size: $font-lg;
-              .iconweixinzhifu {
-                  margin-right: 10upx;
-                  color: #36cb59;
-              }
-          }
-          .time {
-              font-size: $font-sm;
-              color: $font-color-light;
-          }
-      }
-      .right {
-        .rf-button {
-            font-size: $font-sm;
-            padding: 10upx 20upx;
-        }
-      }
-		}
-	}
-</style>

+ 0 - 171
src/pages/set/feedback/detail.vue

@@ -1,171 +0,0 @@
-<template>
-	<view class="feedback-detail">
-		<view class='feedback-title'>
-			<text>问题和意见</text>
-		</view>
-		<view class="feedback-body">
-			<textarea disabled :value="feedbackDetail.content" class="feedback-textare"/>
-		</view>
-		<view class='feedback-title' v-if="feedbackDetail.covers && feedbackDetail.covers.length > 0">
-			<text>图片</text>
-		</view>
-		<view class="uni-uploader-body">
-			<view class="uni-uploader__files">
-				<block v-for="(image,index) in feedbackDetail.covers" :key="index">
-					<view class="uni-uploader__file">
-						<rf-image class="uni-uploader__img" :src="image"></rf-image>
-					</view>
-				</block>
-			</view>
-		</view>
-		<view class='feedback-title'>
-			<text>反馈类型</text>
-		</view>
-		<view class="feedback-body">
-			<radio-group class="feedback-type">
-				<label class="feedback-type-item" v-for="(item, index) in feedbackType" :key="index">
-					<radio color="#fa436a" disabled :value="item.value" :checked="item.value == feedbackDetail.type"/>
-					<text>{{ item.name }}</text>
-				</label>
-			</radio-group>
-		</view>
-		<view class='feedback-title'>
-			<text>QQ/邮箱/手机号</text>
-		</view>
-		<view class="feedback-body">
-			<input class="feedback-input" disabled :value="feedbackDetail.contact_way || '暂未留下联系方式'"/>
-		</view>
-		<view class='feedback-title'>
-			<text>回复内容</text>
-		</view>
-		<view class="feedback-body">
-			<textarea disabled :value="feedbackDetail.reply || '管理员未回复'" class="feedback-textare"/>
-		</view>
-	</view>
-</template>
-
-<script>
-    /**
-     * @des 意见反馈详情
-     *
-     * @author stav stavyan@qq.com
-     * @date 2020-03-11 10:20
-     * @copyright 2019
-     */
-    import {opinionDetail} from "@/api/userInfo";
-    export default {
-        data() {
-            return {
-                feedbackDetail: {},
-                feedbackType: [
-                    {
-                        value: '1',
-                        name: '功能建议'
-                    },
-                    {
-                        value: '2',
-                        name: 'BUG反馈'
-                    },
-                    {
-                        value: '3',
-                        name: '业务咨询'
-                    }]
-            }
-        },
-        onLoad(options) {
-            this.initData(options);
-        },
-        methods: {
-            // 数据初始化
-            initData(options) {
-                this.getFeedbackDetail(options.id)
-            },
-            // 获取反馈详情
-             async getFeedbackDetail(id) {
-                await this.$http.get(`${opinionDetail}`, {
-                    id
-                }).then(r => {
-                    this.feedbackDetail = r.data;
-                });
-            }
-        }
-    }
-</script>
-
-<style lang='scss'>
-	page {
-		background-color: $page-color-base;
-	}
-	
-	/* 上传 */
-	.uni-uploader {
-		flex: 1;
-		flex-direction: column;
-	}
-	
-	.uni-uploader-body {
-		margin-top: 16upx;
-	}
-	
-	.uni-uploader__files {
-		display: flex;
-		flex-direction: row;
-		flex-wrap: wrap;
-	}
-	
-	.uni-uploader__file {
-		margin: 10upx;
-		width: 210upx;
-		height: 210upx;
-	}
-	
-	.uni-uploader__img {
-		display: block;
-		width: 210upx;
-		height: 210upx;
-	}
-	
-	/*问题反馈*/
-	.feedback-title {
-		display: flex;
-		flex-direction: row;
-		justify-content: space-between;
-		align-items: center;
-		padding: 20upx;
-		color: #8f8f94;
-		font-size: 28upx;
-	}
-	
-	.feedback-body {
-		background: #fff;
-		
-		.feedback-type {
-			padding: 20upx;
-			
-			.feedback-type-item {
-				margin-right: 20upx;
-			}
-		}
-	}
-	
-	.feedback-textare {
-		height: 200upx;
-		font-size: 34upx;
-		line-height: 50upx;
-		width: 100%;
-		box-sizing: border-box;
-		padding: 20upx 30upx 0;
-	}
-	
-	.feedback-input {
-		font-size: 28upx;
-		height: 72upx;
-		min-height: 50upx;
-		padding: 15upx 20upx;
-		line-height: 72upx;
-	}
-	
-	.feedback-uploader {
-		padding: 22upx 20upx;
-	}
-</style>

+ 0 - 204
src/pages/set/feedback/feedback.vue

@@ -1,204 +0,0 @@
-<template>
-	<view class="page">
-		<view class='feedback-title'>
-			<text>问题和意见</text>
-			<text class="feedback-quick" @tap="chooseMsg">快速键入 <text class="iconfont iconxia"></text></text>
-		</view>
-		<view class="feedback-body">
-			<textarea placeholder="请详细描述你的问题和意见..." v-model="sendDate.content" class="feedback-textare"/>
-		</view>
-		<view class='feedback-title'>
-			<text>图片(选填,提供问题截图,总大小10M以下)</text>
-		</view>
-		<view class="feedback-body feedback-uploader rf-uploader">
-			<view class="uni-uploader">
-				<view class="uni-uploader-head">
-					<view class="uni-uploader-title">点击预览图片</view>
-					<view class="uni-uploader-info">{{imageList.length}}/9</view>
-				</view>
-				<view class="uni-uploader-body">
-					<view class="uni-uploader__files">
-						<block v-for="(image,index) in imageList" :key="index">
-							<view class="uni-uploader__file" style="position: relative;">
-								<rf-image class="uni-uploader__img" :src="image"></rf-image>
-								<view class="close-view" @tap="close(index)">x</view>
-							</view>
-						</block>
-						<view class="uni-uploader__input-box" v-if="imageList.length < 8">
-							<view class="uni-uploader__input" @tap="uploadImage"></view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class='feedback-title'>
-			<text>反馈类型</text>
-		</view>
-		<view class="feedback-body">
-			<radio-group class="feedback-type" @change="handleFeedbackTypeChange">
-				<label class="feedback-type-item" v-for="(item, index) in feedbackType" :key="index">
-					<radio color="#fa436a" :value="item.value" :checked="item.value === sendDate.type"/>
-					<text>{{ item.name }}</text>
-				</label>
-			</radio-group>
-		</view>
-		<view class='feedback-title'>
-			<text>QQ/邮箱/手机号</text>
-		</view>
-		<view class="feedback-body">
-			<input class="feedback-input" v-model="sendDate.contact_way" placeholder="(选填,方便我们联系你 )"/>
-		</view>
-		<button class="confirm-btn" :disabled="btnLoading" :loading="btnLoading" @tap="send">提交</button>
-		<view class='feedback-title'>
-			<text>反馈结果可在设置 -> 意见反馈 -> 点击列表后查看!</text>
-		</view>
-	</view>
-</template>
-
-<script>
-    import {opinionCreate, uploadImage} from '@/api/userInfo';
-    export default {
-        data() {
-            return {
-                msgContents: ['界面显示错乱', '启动缓慢,卡出翔了', 'UI无法直视,丑哭了', '偶发性崩溃'],
-                stars: [1, 2, 3, 4, 5],
-                imageList: [],
-                feedbackType: [
-                    {
-                        value: '1',
-                        name: '功能建议'
-                    },
-                    {
-                        value: '2',
-                        name: 'BUG反馈'
-                    },
-                    {
-                        value: '3',
-                        name: '业务咨询'
-                    }],
-                sendDate: {
-                    type: '1',
-                    covers: '',
-                    content: '',
-                    contact_way: ''
-                },
-	            btnLoading: false
-            }
-        },
-        methods: {
-          //   监听反馈类型事件
-            handleFeedbackTypeChange(e) {
-                this.sendDate.type = e.detail.value
-            },
-            // 打开相册选图
-            uploadImage() {
-                const _this = this;
-                uni.chooseImage({
-                    count: 6,
-                    sizeType: ['original', 'compressed'],
-                    sourceType: ['album'],
-                    success: function (res) {
-                        _this.handleUploadFile(res.tempFilePaths)
-                    }
-                });
-            },
-            // 依次上传图片
-            handleUploadFile(data) {
-                const _this = this;
-                data.forEach(item => {
-                    _this.$http.upload(uploadImage, {filePath: item, name: 'file'}).then(r => {
-                        _this.imageList.push(r.data.url)
-                    });
-                })
-            },
-            // 删除已选中图片
-            close(e) {
-                this.imageList.splice(e, 1);
-            },
-            // 快速输入
-            chooseMsg() { //快速输入
-                uni.showActionSheet({
-                    itemList: this.msgContents,
-                    success: (res) => {
-                        this.sendDate.content = this.msgContents[res.tapIndex];
-                    }
-                })
-            },
-           // 发送反馈
-            async send() {
-              this.btnLoading = true;
-              this.sendDate.covers = JSON.stringify(this.imageList);
-              await this.$http.post(`${opinionCreate}`, {
-                  ...this.sendDate
-              }).then(() => {
-                  this.btnLoading = false;
-                  this.$mRouter.back();
-              }).catch(() => {
-                  this.btnLoading = false;
-              });
-            }
-        }
-    }
-</script>
-
-<style lang='scss'>
-	page {
-		background-color: $page-color-base;
-	}
-	/*问题反馈*/
-	.feedback-title {
-		display: flex;
-		flex-direction: row;
-		justify-content: space-between;
-		align-items: center;
-		padding: 20upx;
-		color: #8f8f94;
-		font-size: 28upx;
-	}
-
-	.feedback-star-view.feedback-title {
-		justify-content: flex-start;
-		margin: 0;
-	}
-
-	.feedback-quick {
-		position: relative;
-		padding-right: 40upx;
-    .iconfont {
-      font-size: $font-sm;
-    }
-	}
-
-	.feedback-body {
-		background: #fff;
-
-		.feedback-type {
-			padding: 20upx;
-
-			.feedback-type-item {
-				margin-right: 20upx;
-			}
-		}
-	}
-
-	.feedback-textare {
-		height: 200upx;
-		font-size: 34upx;
-		line-height: 50upx;
-		width: 100%;
-		box-sizing: border-box;
-		padding: 20upx 30upx 0;
-	}
-
-	.feedback-input {
-		font-size: 28upx;
-		height: 72upx;
-		min-height: 50upx;
-		padding: 15upx 20upx;
-		line-height: 72upx;
-	}
-
-	.feedback-uploader {
-		padding: 22upx 20upx;
-	}
-</style>

+ 0 - 141
src/pages/set/feedback/list.vue

@@ -1,141 +0,0 @@
-<template>
-	<view class="feedback-list">
-		<view class="rf-list" v-if="feedbackList">
-			<view class="rf-list-item" v-for="(item, index) in feedbackList" :key="index"
-			      @tap="navTo(`/pages/set/feedback/detail?id=${item.id}`)">
-				<view class="wrapper">
-					<view class="address-box">
-						<text class="tag">{{ item.type | feedbackFilter }}</text>
-						<text class="address in1line">{{item.content}}</text>
-					</view>
-					<view class="u-box">
-						<text class="name">{{item.reply || '管理员未回复'}}</text>
-						<text class="mobile">联系方式:{{item.contact_way || '暂无'}}</text>
-					</view>
-				</view>
-			</view>
-			<rf-load-more v-if="feedbackList.length > 0 && !loading" :status="loadingType"/>
-		</view>
-    <view class="add-btn-wrapper">
-			<button class="add-btn" @tap="navTo(`/pages/set/feedback/feedback`)">意见反馈</button>
-    </view>
-		<rf-empty :info="'您还没有反馈意见'" v-if="feedbackList.length === 0 && !loading"></rf-empty>
-		<rf-loading v-if="loading"></rf-loading>
-	</view>
-</template>
-
-<script>
-    import {opinionList} from "@/api/userInfo";
-
-    import rfLoadMore from '@/components/rf-load-more/rf-load-more';
-
-    export default {
-        components: {
-            rfLoadMore
-        },
-        data() {
-            return {
-                page: 1,
-                feedbackList: [],
-                loadingType: 'more',
-                loading: true
-            }
-        },
-        filters: {
-            feedbackFilter(type) {
-                const feedbackType = ['', '功能建议', 'BUG反馈', '业务咨询']
-                return feedbackType[parseInt(type, 10)]
-            }
-        },
-        //下拉刷新
-        onPullDownRefresh() {
-            this.page = 1;
-            this.feedbackList.length = 0;
-            this.getFeedbackList('refresh');
-        },
-        //加载更多
-        onReachBottom() {
-            this.page++;
-            this.getFeedbackList();
-        },
-        onShow () {
-            this.initData()
-        },
-        methods: {
-            // 数据初始化
-            initData() {
-                this.page = 1;
-                this.feedbackList.length = 0;
-                this.getFeedbackList();
-            },
-            // 获取意见反馈列表
-            async getFeedbackList(type) {
-                await this.$http.get(`${opinionList}`, {page: this.page}).then(r => {
-                    this.loading = false;
-                    if (type === 'refresh') {
-                        uni.stopPullDownRefresh();
-                    }
-                    this.loadingType = r.data.length === 10 ? 'more' : 'nomore';
-                    this.feedbackList = [...this.feedbackList, ...r.data];
-                }).catch(() => {
-                    this.loading = false;
-                    if (type === 'refresh') {
-                        uni.stopPullDownRefresh();
-                    }
-                })
-            },
-            navTo(route) {
-                this.$mRouter.push({route});
-            }
-        }
-    }
-</script>
-
-<style lang='scss'>
-
-	page {
-		background-color: $page-color-base;
-	}
-
-	.feedback-list {
-		position: relative;
-
-		.wrapper {
-			display: flex;
-			flex-direction: column;
-			flex: 1;
-		}
-
-		.address-box {
-			display: flex;
-			align-items: center;
-
-			.tag {
-				font-size: 24upx;
-				color: $base-color;
-				margin-right: 10upx;
-				background: #fffafb;
-				border: 1px solid #ffb4c7;
-				border-radius: 4upx;
-				padding: 4upx 10upx;
-				line-height: 1;
-			}
-
-			.address {
-				font-size: 30upx;
-				color: $font-color-dark;
-			}
-		}
-
-		.u-box {
-			font-size: 28upx;
-			color: $font-color-light;
-			margin-top: 16upx;
-
-			.name {
-				margin-right: 30upx;
-			}
-		}
-	}
-
-</style>

+ 0 - 168
src/pages/set/invoice/invoice.vue

@@ -1,168 +0,0 @@
-<template>
-  <view class="invoice-list">
-    <view class="rf-list" v-if="invoiceList.length > 0">
-      <view class="rf-list-item" v-for="(item, index) in invoiceList" @tap="checkInvoice(item)" :key="index" @touchstart="goTouchStart(item.id)" @touchmove="goTouchMove" @touchend="goTouchEnd">
-        <view class="mid">
-          <view class="t-box">
-            <text v-if="parseInt(item.is_default, 10) === 1" class="tag">默认</text>
-            <text>发票抬头: {{item.title}}</text>
-          </view>
-          <view class="u-box">
-            [{{ parseInt(item.type, 10) === 1 ? '公司' : '个人' }}] — {{ item.duty_paragraph || '个人发票无税号' }}
-          </view>
-        </view>
-        <view class="right">
-          <text class="iconfont iconbianji" @tap.stop="addInvoice('edit', item.id)"></text>
-        </view>
-      </view>
-      <text class="tips" v-if="invoiceList.length > 0">
-        提示:长按可删除当前发票。最多只能存在一个默认发票。
-      </text>
-      <rf-load-more v-if="invoiceList.length > 0" :status="loadingType"/>
-    </view>
-    <view class="add-btn-wrapper">
-      <button class="add-btn" @tap="addInvoice('add')">新增发票</button>
-    </view>
-		<rf-empty info="暂无发票" v-if="invoiceList.length === 0 && !loading" ></rf-empty>
-    <!--加载动画-->
-		<rf-loading v-if="loading"></rf-loading>
-  </view>
-</template>
-
-<script>
-    import {invoiceList, invoiceDel} from '@/api/userInfo';
-    import rfLoadMore from '@/components/rf-load-more/rf-load-more';
-    export default {
-        components: {
-            rfLoadMore
-        },
-        data() {
-            return {
-                timeOutEvent: 0,
-                source: 0,
-                invoiceList: [],
-                page: 1,
-                loadingType: 'more',
-                loading: true
-            }
-        },
-        onShow() {
-            this.initData()
-        },
-        onLoad(option) {
-            this.source = option.source;
-        },
-        //下拉刷新
-        onPullDownRefresh() {
-            this.page = 1;
-            this.invoiceList.length = 0;
-            this.getInvoiceList('refresh');
-        },
-        //加载更多
-        onReachBottom() {
-            this.page++;
-            this.getInvoiceList();
-        },
-        methods: {
-            goTouchStart(id) {
-                clearTimeout(this.timeOutEvent);//清除定时器
-                this.timeOutEvent = 0;
-                this.timeOutEvent = setTimeout(() => {
-                    uni.showModal({
-                      content: '确定要删除该发票吗',
-                      success: (e) => {
-                        if (e.confirm) {
-                          this.handleInvoiceDel(id);
-                        }
-                      }
-                    });
-                }, 0.5 * 1000);//这里设置定时
-            },
-            async handleInvoiceDel(id) {
-              await this.$http.delete(`${invoiceDel}?id=${id}`).then(() => {
-                  this.page = 1;
-                  this.invoiceList.length = 0;
-                  this.getInvoiceList();
-              })
-            },
-            //手释放,如果在500毫秒内就释放,则取消长按事件,此时可以执行onclick应该执行的事件
-            goTouchEnd() {
-                clearTimeout(this.timeOutEvent);
-                if (this.timeOutEvent != 0) {
-                }
-            },
-            //如果手指有移动,则取消所有事件,此时说明用户只是要移动而不是长按
-            goTouchMove() {
-                clearTimeout(this.timeOutEvent);//清除定时器
-                this.timeOutEvent = 0;
-            },
-            // 初始化数据
-            initData() {
-                this.page = 1;
-                this.invoiceList.length = 0;
-                this.getInvoiceList();
-            },
-            // 获取发票列表
-            async getInvoiceList(type) {
-                await this.$http.get(`${invoiceList}`, {page: this.page}).then(r => {
-                  this.loading = false;
-                  if (type === 'refresh') {
-                    uni.stopPullDownRefresh();
-                  }
-                  this.loadingType = r.data.length === 10 ? 'more' : 'nomore';
-                  this.invoiceList = [...this.invoiceList, ...r.data];
-                }).catch(() => {
-                  if (type === 'refresh') {
-                    uni.stopPullDownRefresh();
-                  }
-                  this.loading = false;
-                })
-            },
-            //选择发票
-            checkInvoice(item) {
-              if (parseInt(this.source, 10) === 1) {
-                  //this.$mHelper.prePage()获取上一页实例,在App.vue定义
-                  this.$mHelper.prePage().invoiceItem = item;
-                  this.$mRouter.back();
-              }
-            },
-            // 跳转至新增/编辑发票
-            addInvoice(type, id) {
-              this.$mRouter.push({route: `/pages/set/invoice/manage?type=${type}&id=${id}`});
-            }
-        }
-    }
-</script>
-
-<style lang='scss'>
-	page{
-    background-color: $page-color-base;
-	}
-	.invoice-list {
-		position: relative;
-    .t-box{
-      display: flex;
-      align-items: center;
-      font-size: 30upx;
-      color: $font-color-dark;
-      .tag {
-        font-size: 24upx;
-        color: $base-color;
-        margin-right: 10upx;
-        background: #fffafb;
-        border: 1px solid #ffb4c7;
-        border-radius: 4upx;
-        padding: 4upx 10upx;
-        line-height: 1;
-      }
-    }
-	  .u-box{
-      font-size: 28upx;
-      color: $font-color-light;
-      margin-top: 16upx;
-      .name{
-        margin-right: 30upx;
-      }
-    }
-	}
-</style>

+ 0 - 174
src/pages/set/invoice/list.vue

@@ -1,174 +0,0 @@
-<template>
-	<view class="invoice-history">
-    <view class="rf-list" v-if="invoiceList.length > 0">
-      <view class="rf-list-item" v-for="(item, index) in invoiceList" :key="index" @tap="navTo(item.order_id)">
-        <view class="wrapper">
-					<view class="address-box">
-						<view class="order-fl">
-							订单编号: <text class="order-sn">{{item.order_sn}}</text>
-						</view>
-						<view class="order-wrapper">
-							<text class="address">{{item.title}}<text v-if="item.content">{{ ` - ${item.content}` }}</text></text>
-							<text class="address">开票金额: <text class="base-color">{{item.tax_money}}</text></text>
-						</view>
-					</view>
-					<view class="u-box">
-						<view class="in1line">
-							<text class="name">[{{ parseInt(item.type, 10) === 1 ? '公司' : '个人' }}]</text>
-							<text class="mobile">{{ item.duty_paragraph || '个人发票无税号' }}</text>
-						</view>
-						<text class="time">{{item.created_at | time}}</text>
-					</view>
-
-				</view>
-      </view>
-      <rf-load-more v-if="invoiceList.length > 0" :status="loadingType"/>
-    </view>
-		<rf-empty info="您还未购买任何商品" v-if="invoiceList.length === 0 && !loading" ></rf-empty>
-		<!--加载动画-->
-		<rf-loading v-if="loading"></rf-loading>
-	</view>
-</template>
-
-<script>
-	import {orderInvoiceList} from '@/api/userInfo';
-	import moment from '@/common/moment';
-	import rfLoadMore from '@/components/rf-load-more/rf-load-more';
-	export default {
-		components: {
-			rfLoadMore
-		},
-		data() {
-			return {
-				page: 1,
-				loadingType: 'more',
-				invoiceList: [],
-				loading: true
-			}
-		},
-		filters: {
-			time(val) {
-				return moment(val * 1000).format('YYYY-MM-DD HH:mm')
-			}
-		},
-		onLoad(){
-			this.initData()
-		},
-		//下拉刷新
-		onPullDownRefresh(){
-			this.page = 1;
-			this.invoiceList.length === 0;
-			this.getInvoiceList('refresh');
-		},
-		//加载更多
-		onReachBottom(){
-			this.page ++;
-			this.getInvoiceList();
-		},
-		methods: {
-			// 数据初始化
-			initData () {
-				this.getInvoiceList();
-			},
-			// 获取发票历史
-			async getInvoiceList (type) {
-				await this.$http.get(`${orderInvoiceList}`,{
-					page: this.page
-				}).then(r=>{
-			    this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-					this.loadingType = r.data.length === 10 ? 'more' : 'nomore';
-					this.invoiceList = [...this.invoiceList, ...r.data];
-				}).catch(() => {
-			    this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-				})
-			},
-			navTo(id){
-				this.$mRouter.push({route: `/pages/order/detail?id=${id}`});
-			}
-		}
-	}
-</script>
-
-<style lang='scss'>
-	page{
-    background-color: $page-color-base;
-	}
-	.invoice-list {
-		position: relative;
-    .t-box{
-      display: flex;
-      align-items: center;
-      font-size: 30upx;
-      color: $font-color-dark;
-      .tag {
-        font-size: 24upx;
-        color: $base-color;
-        margin-right: 10upx;
-        background: #fffafb;
-        border: 1px solid #ffb4c7;
-        border-radius: 4upx;
-        padding: 4upx 10upx;
-        line-height: 1;
-      }
-    }
-	  .u-box{
-      font-size: 28upx;
-      color: $font-color-light;
-      margin-top: 16upx;
-      .name{
-        margin-right: 30upx;
-      }
-    }
-	}
-	.wrapper{
-		display: flex;
-		flex-direction: column;
-		flex: 1;
-	}
-	.address-box{
-		.order-fl {
-			font-size: $font-sm;
-			color: $font-color-light;
-			margin-bottom: 10upx;
-			.order-sn {
-				margin-left: 14upx;
-			}
-		}
-		.order-wrapper {
-			display: flex;
-			justify-content: space-between;
-			.tag{
-				font-size: 24upx;
-				color: $base-color;
-				margin-right: 10upx;
-				background: #fffafb;
-				border: 1px solid #ffb4c7;
-				border-radius: 4upx;
-				padding: 4upx 10upx;
-				line-height: 1;
-			}
-			.address{
-				font-size: $font-base + 2upx;
-				color: $font-color-dark;
-			}
-		}
-	}
-	.u-box{
-		font-size: 28upx;
-		color: $font-color-light;
-		margin-top: 16upx;
-		display: flex;
-		justify-content: space-between;
-		.name{
-		}
-		.time {
-			font-size: $font-sm + 2upx;
-		}
-	}
-</style>

+ 0 - 145
src/pages/set/invoice/manage.vue

@@ -1,145 +0,0 @@
-<template>
-	<view class="invoice-manage rf-row-wrapper">
-		<view class="row b-b">
-			<text class="tit">发票类型</text>
-			<radio-group class="invoice-type" @change="handleInvoiceTypeChange">
-				<label class="invoice-type-item" v-for="(item, index) in invoiceType" :key="index">
-					<radio
-							class="gender-item-radio"
-							color="#fa436a"
-							:value="'' + item.value"
-							:checked="item.value === invoiceData.type"/>
-					<text class="gender-item-text">{{ item.name }}</text>
-				</label>
-			</radio-group>
-		</view>
-		<view class="row b-b">
-			<text class="tit">发票抬头</text>
-			<input class="input" type="text" v-model="invoiceData.title" placeholder="请输入发票抬头"
-			       placeholder-class="placeholder"/>
-		</view>
-		<view class="row b-b" v-if="parseInt(invoiceData.type, 10) === 1">
-			<text class="tit">发票税号</text>
-			<input class="input" type="text" v-model="invoiceData.duty_paragraph" placeholder="请输入发票税号"
-			       placeholder-class="placeholder"/>
-		</view>
-		<view class="row default-row">
-			<text class="tit">设为默认</text>
-			<switch :checked="invoiceData.is_default ? true : false" color="#fa436a" @change="switchChange"/>
-		</view>
-		<button class="add-btn" :disabled="btnLoading" :loading="btnLoading"  @tap="confirm">提交</button>
-	</view>
-</template>
-
-<script>
-    import {
-        invoiceCreate,
-        invoiceUpdate,
-        invoiceDetail
-    } from '@/api/userInfo';
-
-    export default {
-        data() {
-            return {
-                invoiceData: {
-                    type: 2,
-                    title: '',
-                    duty_paragraph: '',
-                    is_default: ''
-                },
-                invoiceType: [
-                    {name: '公司', value: 1},
-                    {name: '个人', value: 2}
-                ],
-                reqBody: {},
-		            btnLoading: false
-            }
-        },
-        onLoad(options) {
-            this.initData(options);
-        },
-        methods: {
-            async initData(options) {
-                let title = '新增发票';
-                if (options.type === 'edit') {
-                    title = '编辑发票'
-                    await this.getInvoiceDetail(options.id)
-                }
-                this.manageType = options.type;
-                uni.setNavigationBarTitle({
-                    title
-                })
-            },
-            // 获取发票详情
-            async getInvoiceDetail(id) {
-                await this.$http.get(`${invoiceDetail}`, {
-                    id
-                }).then(async r => {
-                    this.invoiceData = r.data;
-                })
-            },
-            handleInvoiceTypeChange(e) {
-                this.invoiceData.type = e.detail.value;
-            },
-            switchChange(e) {
-                this.invoiceData.is_default = e.detail.value ? '1' : '0';
-            },
-            //提交
-            confirm() {
-                this.reqBody['title'] = this.invoiceData['title'];
-                let checkSendCode;
-                if (parseInt(this.invoiceData['type'], 10) === 1) {
-                    this.reqBody['duty_paragraph'] = this.invoiceData['duty_paragraph'];
-                    checkSendCode = this.$mGraceChecker.check(this.reqBody, this.$mFormRule.cInvoiceRule);
-                } else if (parseInt(this.invoiceData['type'], 10) === 2) {
-                    checkSendCode = this.$mGraceChecker.check(this.reqBody, this.$mFormRule.pInvoiceRule);
-                }
-                if (!checkSendCode) {
-                    this.$mHelper.toast(this.$mGraceChecker.error);
-                    return;
-                }
-                this.btnLoading = true;
-                if (this.manageType === 'edit') {
-                    this.handleInvoiceUpdate(this.invoiceData)
-                } else {
-                    this.handleInvoiceCreate(this.invoiceData)
-                }
-            },
-            // 编辑发票
-            async handleInvoiceUpdate(params) {
-                await this.$http.put(`${invoiceUpdate}?id=${params.id}`, params).then(() => {
-                	  this.btnLoading = false;
-                    this.$mHelper.toast('恭喜您, 发票修改成功!');
-										this.$mRouter.back();
-                }).catch(() => {
-                	this.btnLoading = false;
-                })
-            },
-            // 新增发票
-            async handleInvoiceCreate(params) {
-                await this.$http.post(`${invoiceCreate}`, params).then(() => {
-                	  this.btnLoading = false;
-                    this.$mHelper.toast('恭喜您, 发票添加成功!');
-										this.$mRouter.back();
-                }).catch(() => {
-                	this.btnLoading = false;
-                })
-            }
-        }
-    }
-</script>
-
-<style lang="scss">
-
-	page {
-		background: $page-color-base;
-	}
-
-	.invoice-manage {
-		padding-top: 16upx;
-
-		.invoice-type-item {
-			margin-right: 20upx;
-		}
-	}
-</style>

+ 0 - 115
src/pages/set/set.vue

@@ -1,115 +0,0 @@
-<template>
-	<view class="set">
-		<view class="list-cell b-b" :class="{'m-t': item.class === 'mT'}" v-for="item in setList" :key="item.title" @tap="navTo(item.url)" hover-class="cell-hover" :hover-stay-time="50">
-			<text class="cell-tit">{{item.title}}</text>
-			<text class="cell-tip">{{item.content}}</text>
-			<text class="cell-more iconfont iconyou"></text>
-		</view>
-		<view class="list-cell m-t">
-			<text class="cell-tit">消息推送</text>
-			<switch checked color="#fa436a" @change="switchChange" />
-		</view>
-		<view class="list-cell log-out-btn" @tap="toLogout">
-			<text class="cell-tit">退出登录</text>
-		</view>
-    <!--进度条加载-->
-		<rf-load-progress :height="CustomBar" :progress="loadProgress"></rf-load-progress>
-	</view>
-</template>
-
-<script>
-	import {logout} from '@/api/login';
-	export default {
-		data() {
-			return {
-				loadProgress: 0,
-				CustomBar: this.CustomBar,
-				user: {},
-				setList: [
-					{title: '个人资料', url: '/pages/user/userinfo/userinfo', content: ''},
-					{title: '修改密码', url: '/pages/public/password?type=1', content: ''},
-					{title: '授权管理', url: '/pages/set/authorization/list', content: ''},
-					{title: '发票管理', url: '/pages/set/invoice/invoice', content: '', class: 'mT'},
-					{title: '开票历史', url: '/pages/set/invoice/list', content: ''},
-					{title: '清除缓存', url: 'clearCache', content: ''},
-					{title: '关于商城', url: '/pages/set/about/about', content: '', class: 'mT'},
-					{title: '当前版本', url: '', content: '当前版本 1.0.0'},
-					{title: '意见反馈', url: '/pages/set/feedback/list', content: ''}
-				]
-			};
-		},
-		onLoad () {
-			this.initData();
-		},
-		methods:{
-			// 初始化数据
-			initData () {
-        this.user = uni.getStorageSync('user');
-        // 缓存大小
-				this.setList[5].content = `${uni.getStorageInfoSync().currentSize} kb`;
-			},
-			// 通用跳转
-			navTo(route){
-				if (!route) return;
-				if (route === 'clearCache') {
-					uni.showModal({
-				    content: '确定要清除缓存吗',
-				    success: (e)=>{
-				    	if(e.confirm){
-				    		this.setList[5].content = '0 kb';
-				    		uni.clearStorageSync();
-				    		this.handleLoadProgress();
-				    	}
-				    }
-					});
-					return;
-				}
-				this.$mRouter.push({route});
-			},
-			// 加载进度条
-			handleLoadProgress() {
-				this.loadProgress = this.loadProgress + 6;
-				if (this.loadProgress < 100) {
-					setTimeout(() => {
-						this.handleLoadProgress();
-					}, 100)
-				} else {
-					this.loadProgress = 0;
-					this.$mStore.commit('login', this.user);
-          this.$mHelper.toast('清除缓存成功')
-				}
-			},
-			//退出登录
-			toLogout(){
-				uni.showModal({
-				    content: '确定要退出登录么',
-				    success: (e)=>{
-				    	if(e.confirm){
-				    		this.$http.post(`${logout}`).then(() => {
-									this.$mStore.commit('logout');
-									uni.reLaunch({
-										url: '/pages/user/user'
-									})
-								})
-				    	}
-				    }
-				});
-			},
-			// 监听消息推送是否打开
-			switchChange(e){
-				let statusTip = e.detail.value ? '打开': '关闭';
-				this.$mHelper.toast(`${statusTip}消息推送`);
-			}
-
-		}
-	}
-</script>
-
-<style lang='scss'>
-	page{
-		background: $page-color-base;
-	}
-	.set {
-		padding-top: $spacing-base;
-	}
-</style>

+ 1 - 0
src/pages/shop/shop.vue

@@ -58,6 +58,7 @@
 
 				</view>
 				<view class="operate">
+					<view class="btn stick">置顶</view>
 					<view class="btn sold">下架</view>
 					<view class="btn compile" @tap="topage">编辑</view>
 					<view class="btn delete">删除</view>

+ 1 - 1
src/pages/shop/shopdetail.vue

@@ -3,7 +3,7 @@
 		<Header :title="title"></Header>
 		<view class="" style="height: 94upx;"></view>
 		<view class="shopdetail-content">
-
+			
 		</view>
 	</view>
 </template>

+ 0 - 215
src/pages/user/account/account.vue

@@ -1,215 +0,0 @@
-<template>
-  <view class="my-account">
-		<!--账户信息面板-->
-    <view class="header">
-      <view class="account">
-        <view class="assets">
-          <view>总资产(元)</view>
-          <view class="money">
-							{{ userInfo && userInfo.account && userInfo.account.user_money || '0.00' }}
-          </view>
-        </view>
-        <text @tap="navTo('/pages/user/account/recharge')" class="recharge" >充值</text>
-      </view>
-      <view class="cumulative">
-        <view class="item">
-          <view>累计充值(元)</view>
-          <view class="money">
-							{{ userInfo && userInfo.account && userInfo.account.accumulate_money || '0.00' }}
-          </view>
-        </view>
-        <view class="item">
-          <view>累计消费(元)</view>
-          <view class="money">
-							{{ -(userInfo && userInfo.account && userInfo.account.consume_money) || '0.00' }}
-          </view>
-        </view>
-      </view>
-    </view>
-	  <!--余额/积分导航-->
-    <view class="nav">
-      <view class="item" v-for="item in navList" :key="item.title" @tap="navTo(item.url)">
-        <text class="iconfont" :class="item.icon"></text>
-        <text>{{ item.title }}</text>
-      </view>
-    </view>
-	  <!--广告-->
-    <view class="advert">
-        <view
-          class="item on"
-          @tap="navTo('/pages/user/coupon/list')"
-        >
-          <view class="text">
-            <view class="name">领取优惠券</view>
-            <text class="desc">满减享优惠</text>
-          </view>
-          <text class="iconfont iconwodeyouhuiquan"></text>
-        </view>
-      </view>
-		<!--加载动画-->
-		<rf-loading v-if="loading"></rf-loading>
-  </view>
-</template>
-
-<script>/**
- * @des 用户账户中心
- *
- * @author stav stavyan@qq.com
- * @date 2020-01-10 15:17
- * @copyright 2019
- */
-import { memberInfo } from '@/api/userInfo';
-
-export default {
-    data() {
-      return {
-        userInfo: {},
-        loading: true,
-        navList: [
-          {title: '账单记录', icon: 'icondaifukuan', url: '/pages/user/account/bill'},
-          {title: '充值记录', icon: 'iconchongzhijilu', url: '/pages/user/account/bill?state=2'},
-          {title: '消费记录', icon: 'iconzuheduozhongxiaofeifangshizuhexiaofei', url: '/pages/user/account/bill?state=3'},
-          {title: '积分中心', icon: 'iconjifenqia', url: '/pages/user/account/integral'}
-        ]
-      }
-    },
-    onShow() {
-      this.initData();
-    },
-    methods: {
-		// 初始化数据
-		initData() {
-			this.getMemberInfo();
-		},
-    // 获取用户信息
-    async getMemberInfo() {
-      await this.$http.get(memberInfo).then(async r => {
-        this.loading = false;
-        this.userInfo = r.data;
-      }).catch(() => {
-        this.loading = false;
-      });
-    },
-		navTo(route) {
-			this.$mRouter.push({route})
-		}
-	}
-  }
-</script>
-<style scoped lang="scss">
-  page {
-    background-color: $color-white;
-  }
-  .my-account {
-    padding: 32upx 20upx;
-    width: 100%;
-    .header {
-      padding: 30upx;
-      height: 320upx;
-      background-color: $base-color;
-      opacity: 0.9;
-      border-radius: 20upx;
-      color: rgba(255, 255, 255, 0.6);
-      font-size: $font-sm;
-      position: relative;
-      .account {
-        width: calc(100% - 60upx);
-        display: flex;
-        position: absolute;
-        z-index: 2;
-        justify-content: space-between;
-        .assets {
-          .money {
-            color: #fff;
-            font-size: $font-lg + 10upx;
-            margin: 0;
-          }
-        }
-        .recharge {
-          font-size: $font-base;
-          width: 150upx;
-          height: 54upx;
-          line-height: 54upx;
-          border-radius: $font-base;
-          background-color: #fff9f8;
-          text-align: center;
-          color: $base-color;
-          margin-top: 10upx;
-        }
-      }
-      .cumulative {
-        width: calc(100% - 240upx);
-        position: absolute;
-        bottom: 20upx;
-        display: flex;
-        justify-content: space-between;
-        .money {
-          color: #fff;
-          font-size: $font-lg + 4upx;
-          margin: 0;
-        }
-      }
-      .header-bg {
-        position: absolute;
-        width: 100%;
-        height: 320upx;
-        z-index: 1;
-        top: 0;
-        image {
-          width: 100%;
-          height: 320upx
-        }
-      }
-    }
-    .nav{
-      border-bottom:1px solid #f5f5f5;
-      display: flex;
-      .item{
-        flex:1;
-        margin: 20upx;
-        font-size: $font-base - 4upx;
-        display: inline-block;
-        text-align:center;
-        color:#999;
-        .iconfont {
-          display: block;
-          margin: 0 auto;
-          font-size: $font-lg + 20upx;
-          color: $base-color;
-        }
-      }
-    }
-    .advert{
-      display: flex;
-      .item{
-        background-color:#fff6d1;
-        flex: 1;
-        border-radius: 24upx;
-        padding: 10upx 0;
-        margin: 20upx 10upx;
-        color: $base-color;
-        display: flex;
-        justify-content: space-between;
-        .iconfont {
-          font-size: $font-lg + 20upx;
-          margin-right: 20upx;
-        }
-        .text {
-          margin-left: 20upx;
-          .name{
-            font-size: $font-base;
-            font-weight: bold;
-            height: 40upx;
-            color: $base-color;
-          }
-          .desc {
-            font-size: $font-sm - 2upx;
-          }
-        }
-      }
-      .on{
-          background-color:#fff3f3;
-        }
-    }
-  }
-</style>

+ 0 - 183
src/pages/user/account/bill.vue

@@ -1,183 +0,0 @@
-<template>
-	<view class="account-bill">
-		<!--顶部账单类型 全部/充值/消费-->
-		<view class="navbar">
-			<view
-					v-for="(item, index) in billTypeList" :key="index"
-					class="nav-item"
-					:class="{current: tabCurrentIndex === index}"
-					@tap="tabClick(index, item.state)"
-			>
-				{{item.text}}
-			</view>
-		</view>
-		<!--账单明细列表-->
-		<view class="rf-list" v-if="integralList.length > 0">
-			<view class="rf-list-item" v-for="(item, index) in integralList" :key="index">
-				<view class="mid">
-					<view class="title">
-						{{item.remark }}
-					</view>
-					<view class="time">
-						{{item.created_at | time}}
-					</view>
-				</view>
-				<view class="right">
-					<text class="change-num" :class="parseFloat(item.num) >= 0 ? 'change-num-add' : 'change-num-reduce'">{{item.num
-						| numFilter }}
-					</text>
-				</view>
-			</view>
-			<rf-load-more class="load-more" :status="loadingType" v-if="integralList.length > 0"></rf-load-more>
-		</view>
-		<rf-empty :info="'暂无账单记录'" v-if="integralList.length === 0 && !loading"></rf-empty>
-		<!--加载动画-->
-		<rf-loading v-if="loading"></rf-loading>
-	</view>
-</template>
-<script>
-    /**
-     * @des 账单明细
-     *
-     * @author stav stavyan@qq.com
-     * @date 2020-01-13 11:18
-     * @copyright 2019
-     */
-    import {creditsLogList} from "@/api/userInfo";
-    import rfLoadMore from '@/components/rf-load-more/rf-load-more.vue';
-    import moment from '@/common/moment';
-
-    export default {
-        components: {
-            rfLoadMore
-        },
-        data() {
-            return {
-                loading: true,
-                typeClass: 'valid',
-                state: 1,
-                tabCurrentIndex: 0,
-                billTypeList: [
-                    {
-                        state: 1,
-                        text: '全部'
-                    },
-                    {
-                        state: 2,
-                        text: '充值'
-                    },
-                    {
-                        state: 3,
-                        text: '消费'
-                    }
-                ],
-                integralList: [],
-                loadingType: 'more',
-                page: 1
-            };
-        },
-        filters: {
-            time(val) {
-                return moment(val * 1000).format('YYYY-MM-DD HH:mm:ss')
-            },
-            numFilter(val) {
-                return val >= 0 ? `+${val.toString()}` : val;
-            }
-        },
-        //下拉刷新
-        onPullDownRefresh() {
-            this.page = 1;
-            this.integralList = [];
-            this.getIntegralListList('refresh');
-        },
-        //加载更多
-        onReachBottom() {
-            this.page++;
-            this.getIntegralListList();
-        },
-        onLoad(options) {
-          this.initData(options);
-        },
-        methods: {
-            //顶部tab点击
-            tabClick(index, state) {
-                this.page = 1;
-                this.integralList.length = 0;
-                this.loading = true;
-                this.tabCurrentIndex = index;
-                this.state = state;
-                this.getIntegralListList();
-            },
-            // 数据初始化
-            initData(options) {
-                this.state = parseInt(options.state, 10);
-                if (this.state === 2) {
-                    this.tabClick(1, 2);
-                    return;
-                } else if (this.state === 3) {
-                    this.tabClick(2, 3);
-                    return;
-                }
-                this.getIntegralListList();
-            },
-            // 获取积分
-            async getIntegralListList(type) {
-                const params = {};
-                params.credit_type = 1
-                if (this.state === 2) {
-                    params.num_type = 1
-                } else if (this.state === 3) {
-                    params.num_type = 2
-                }
-                params.page = this.page;
-                await this.$http.get(`${creditsLogList}`, {
-                    ...params
-                }).then(r => {
-                    this.loading = false;
-                    if (type === 'refresh') {
-                        uni.stopPullDownRefresh();
-                    }
-                    this.loadingType = r.data.length === 10 ? 'more' : 'nomore';
-                    this.integralList = [...this.integralList, ...r.data];
-                }).catch(() => {
-                    this.loading = false;
-                    if (type === 'refresh') {
-                        uni.stopPullDownRefresh();
-                    }
-                });
-            }
-        }
-    };
-</script>
-<style scoped lang="scss">
-	page {
-		background-color: $page-color-base;
-	}
-	.account-bill {
-		.mid {
-			.title {
-				margin-top: 10upx;
-				font-size: $font-base + 2upx;
-				color: $font-color-dark;
-			}
-			.time {
-				margin-top: 10upx;
-				font-size: $font-sm;
-				color: $font-color-light;
-			}
-		}
-		.right {
-			.change-num {
-				font-size: $font-lg + 4upx;
-				color: $font-color-base;
-				font-weight: lighter;
-			}
-			.change-num-add {
-				color: #16ac57;
-			}
-			.change-num-reduce {
-				color: #fc4141;
-			}
-		}
-	}
-</style>

+ 0 - 318
src/pages/user/account/integral.vue

@@ -1,318 +0,0 @@
-<template>
-  <view class="integral">
-    <view class="header">
-      <view class="title">当前积分</view>
-      <text class="num">
-        {{ userInfo && userInfo.account && userInfo.account.user_integral || '0' }}
-      </text>
-      <view class="line" />
-      <view class="nav">
-        <view class="item">
-          <text class="num">
-            {{ userInfo && userInfo.account && userInfo.account.accumulate_integral || '0' }}
-          </text>
-          <text class="title">累计积分</text>
-        </view>
-        <view class="item">
-          <text class="num">
-            {{ -(userInfo && userInfo.account && userInfo.account.consume_integral) || '0' }}
-          </text>
-          <text class="title">累计消费</text>
-        </view>
-        <view class="item">
-          <text class="num">
-            {{ userInfo && userInfo.frozen_integral && userInfo.account.frozen_integral || '0' }}
-          </text>
-          <text class="title">冻结积分</text>
-        </view>
-      </view>
-      <view class="tab">
-        <view
-            class="item"
-            :class="current === index ? 'on' : ''"
-            v-for="(item, index) in navList"
-            :key="index"
-            @tap="nav(index)"
-        >
-          {{ item.name }}
-        </view>
-      </view>
-    </view>
-    <view class="wrapper">
-      <view class="list1" :hidden="current !== 0">
-        <view class="tip acea-row row-middle">
-          <span class="iconfont icon-shuoming"></span
-          >提示:积分可用来兑换指定商品
-        </view>
-         <view class="list b-b" v-for="(item, index) in integralList" :key="index">
-          <view class="wrapper">
-            <view class="address-box">
-              {{item.remark }}
-            </view>
-            <view class="u-box">
-              {{item.created_at | time}}
-            </view>
-          </view>
-          <text class="change-num" :class="parseFloat(item.num) >= 0 ? 'change-num-add' : 'change-num-reduce'">{{item.num | numFilter }}</text>
-        </view>
-        <rf-load-more class="load-more" :status="loadingType"></rf-load-more>
-      </view>
-      <view class="list2" :hidden="current !== 1">
-        <view class="item">
-          <text class="name">购买商品可获得积分奖励</text>
-          <view class="earn" @tap="toCategory">赚积分</view>
-        </view>
-      </view>
-    </view>
-    <!--加载动画-->
-		<rf-loading v-if="loading"></rf-loading>
-  </view>
-</template>
-<script>
-/**
- * @des 积分中心
- *
- * @author stav stavyan@qq.com
- * @date 2020-01-10 15:24
- * @copyright 2019
- */
-import {creditsLogList} from "@/api/userInfo";
-import rfLoadMore from '@/components/rf-load-more/rf-load-more.vue';
-
-import moment from '@/common/moment';
-export default {
-  name: "Integral",
-  components: {
-    rfLoadMore
-  },
-  data () {
-    return {
-      navList: [
-        {name: "分值明细" },
-        {name: "分值提升" }
-      ],
-      current: 0,
-      integralList: [],
-      loadingType: 'more',
-      page: 1,
-      userInfo: {},
-      loading: true
-    };
-  },
-  onLoad () {
-    this.initData();
-  },
-  filters: {
-    time(val) {
-      return moment(val * 1000).format('YYYY-MM-DD HH:mm:ss')
-    },
-    numFilter(val) {
-      return val >= 0 ? `+${val.toString()}` : val;
-    }
-  },
-  //加载更多
-  onReachBottom(){
-    this.page ++;
-    this.getIntegralListList();
-  },
-  methods: {
-    toCategory () {
-      this.$mRouter.reLaunch({route: '/pages/category/category'});
-    },
-    nav (index) {
-      this.loading = true;
-      this.current = index;
-      this.page = 1;
-      this.integralList.length = 0;
-      this.getIntegralListList();
-    },
-    initData () {
-      this.userInfo = uni.getStorageSync('userInfo') || undefined;
-      this.getIntegralListList();
-    },
-    async getIntegralListList () {
-        await this.$http.get(`${creditsLogList}`, {
-          page: this.page
-        }).then(r=>{
-          this.loading = false;
-          this.loadingType  = r.data.length === 10 ? 'more' : 'nomore';
-          this.integralList = [ ...this.integralList, ...r.data ]
-        }).catch(() => {
-          this.loading = false;
-        });
-      }
-  }
-};
-</script>
-<style scoped lang="scss">
-  page {
-    background-color: $color-white;
-  }
-  .integral {
-    .header {
-      background-color: $base-color;
-      opacity: 0.9;
-      background-repeat: no-repeat;
-      background-size: 100% 100%;
-      width: 100%;
-      height: 420upx;
-      font-size: $font-base;
-      color: #fff;
-      padding: 20upx 0;
-      text-align: center;
-      position: relative;
-      .title {
-        font-size: $font-sm;
-        margin: 10upx 0;
-      }
-      .num {
-        /*<!--color: $base-color;-->*/
-        font-size: $font-lg + 20upx;
-        font-weight: lighter;
-        line-height: 1;
-      }
-      .line {
-        width: 10%;
-        height: 3upx;
-        background-color: #fff;
-        margin: 20upx auto 30upx;
-      }
-      .nav {
-        width: 100%;
-        display: flex;
-        .item {
-          flex: 1;
-          .num {
-            font-size: $font-lg + 4upx;
-            display: block;
-            line-height: 1;
-          }
-        }
-      }
-      .tab {
-        position: absolute;
-        bottom: -2upx;
-        display: flex;
-        width: 80%;
-        margin: 0 10%;
-        border-radius: 20upx 20upx 0 0;
-        background-color: #f7f7f7;
-        height: 80upx;
-        line-height: 80upx;
-        font-size: $font-base;
-        color: #bbb;
-        .item {
-          flex: 1;
-          text-align: center;
-          line-height: 80upx;
-        }
-        .on {
-          background-color: #fff;
-          color: $base-color;
-          font-weight: bold;
-          border-radius: 20upx 0 0 0;
-        }
-        .on:last-child {
-          border-radius: 0 20upx 0 0;
-        }
-      }
-    }
-  }
-
-  .wrapper .list1 {
-    background-color: #fff;
-    padding: 30upx 20upx;
-    .tip {
-    font-size: $font-sm;
-    width: 90%;
-    margin: 0 5%;
-    height: 64upx;
-    line-height: 64upx;
-    border-radius: 30upx;
-    background-color: #fff5e2;
-    border: 1px solid #ffeac1;
-    color: #c8a86b;
-    text-align: center;
-  }
-	  .list{
-      width: 100%;
-      display: flex;
-      align-items: center;
-      padding: 20upx 36upx;;
-      background: #fff;
-      position: relative;
-      .wrapper{
-        display: flex;
-        flex-direction: column;
-        flex: 1;
-        .address-box{
-          display: flex;
-          align-items: center;
-          font-size: $font-base;
-          color: $font-color-dark;
-        }
-        .u-box{
-          color: $font-color-light;
-          font-size: $font-sm;
-        }
-      }
-      .change-num {
-        font-size: $font-lg + 4upx;
-        color: $font-color-base;
-        font-weight: lighter;
-      }
-      .change-num-add {
-        color: #16ac57;
-      }
-      .change-num-reduce {
-        color: $base-color;
-      }
-    }
-  }
-
-  .wrapper .list2 {
-    width: 100%;
-    margin: 20upx 0;
-    /*background-color: #F76260;*/
-  }
-  .wrapper .list2 .item {
-    background-image: linear-gradient(to right, #fff7e7 0%, #fffdf9 100%);
-    width: 90%;
-    margin: 10upx 5%;
-    height: 120upx;
-    line-height: 120upx;
-    position: relative;
-    border-radius: 20upx;
-    padding: 0 20upx;
-    display: flex;
-  }
-
-  .wrapper .list2 .item .pictrue {
-    width: 60upx;
-    height: 100upx;
-    margin: 20upx 0;
-    image {
-      width: 80%;
-      height: 80%;
-    }
-  }
-
-  .wrapper .list2 .item .name {
-    flex: 1;
-    font-size: $font-sm;
-    font-weight: bold;
-    color: #c8a86b;
-    margin: 0 20upx;
-  }
-
-  .wrapper .list2 .item .earn {
-    font-size: $font-sm;
-    color: #c8a86b;
-    border: 2upx solid #c8a86b;
-    text-align: center;
-    height: 48upx;
-    margin: 36upx 0;
-    width: 120upx;
-    border-radius: 10upx;
-  }
-</style>

+ 0 - 415
src/pages/user/account/recharge.vue

@@ -1,415 +0,0 @@
-<template>
-	<view class="recharge">
-		<view class="block">
-			<view class="title">
-				我的账户
-			</view>
-			<view class="content">
-				<view class="my">
-					我的账户余额:
-					<text class="balance">{{ userInfo.account && userInfo.account.user_money || '0' }}</text>
-					元
-				</view>
-			</view>
-		</view>
-		<view class="block">
-			<view class="title">
-				充值金额
-			</view>
-			<view class="content">
-				<view class="amount">
-					<view class="list">
-						<view class="box" v-for="(amount,index) in amountList" :key="index" @tap="select(amount)"
-						      :class="{'on':amount.price == inputAmount}">
-							<view class="real">{{amount.price}}元</view>
-							<text class="give">赠送 {{ amount.give_price }}元</text>
-						</view>
-					</view>
-					<view class="num">
-						<view class="text">
-							自定义充值金额
-						</view>
-						<view class="input">
-							<input type="number" @input="handleInputAmountChange" v-model="inputAmount"/>
-						</view>
-						<text class="give" v-if="inputAmountGive > 0">赠送 {{ inputAmountGive }}元</text>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="block">
-			<view class="title">
-				选择支付方式
-			</view>
-			<view class="content">
-				<view class="pay-list">
-					<view class="row" @tap="payType='2'">
-						<i class="icon iconfont iconalipay"></i>
-						<view class="center">
-							支付宝支付
-						</view>
-						<view class="right">
-							<radio :checked="payType=='2'" color="#f06c7a"/>
-						</view>
-					</view>
-					<view class="row" @tap="payType='1'">
-						<i class="icon iconfont iconweixinzhifu"></i>
-						<view class="center">
-							微信支付
-						</view>
-						<view class="right">
-							<radio :checked="payType=='1'" color="#f06c7a"/>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="pay">
-			<view class="btn" @tap="pay">立即充值</view>
-			<view class="tis">
-				点击立即充值,即代表您同意
-				<view class="terms" @tap="toTipDetail">
-					《充值协议》
-				</view>
-			</view>
-		</view>
-
-		<!--加载动画-->
-		<rf-loading v-if="pageLoading"></rf-loading>
-	</view>
-</template>
-
-<script>
-    import {memberInfo, rechargeConfigIndex} from '@/api/userInfo';
-
-    export default {
-        data() {
-            return {
-                inputAmount: 0,//金额
-                inputAmountGive: 0,//金额
-                amountList: [],//预设3个可选快捷金额
-                payType: 1,//支付类型
-                userInfo: {},
-                loading: false,
-                providerList: [],
-                code: null,
-                pageLoading: true
-            };
-        },
-        onLoad(options) {
-            this.initData(options);
-        },
-        methods: {
-        	  // 计算充值送的钱 后台配置
-            handleInputAmountChange(e) {
-                this.inputAmount = parseFloat(e.detail.value);
-                if (this.inputAmount < this.amountList[0].price) {
-                    this.inputAmountGive = 0;
-                    return;
-                }
-                if (this.inputAmount >= this.amountList[this.amountList.length - 1].price) {
-                    this.inputAmountGive = this.amountList[this.amountList.length - 1].give_price;
-                    return;
-                }
-                for (let i = 0; i < this.amountList.length; i++) {
-                    if (this.inputAmount >= this.amountList[i].price && this.inputAmount < this.amountList[i + 1].price) {
-                        this.inputAmountGive = this.amountList[i].give_price;
-                    }
-                }
-            },
-            async pay() {
-                const params = {};
-                params.money = parseFloat(this.inputAmount);
-                switch (parseInt(this.payType, 10)) {
-                    case 1: // 微信支付
-                        this.$mPayment.weixinPay('recharge', JSON.stringify(params));
-                        break;
-                    case 2: // 支付宝支付
-                        this.$mPayment.aliPay('recharge', JSON.stringify(params));
-                        break;
-                    default:
-                        break;
-                }
-            },
-            // 充值成功后更新用户信息
-            async getMemberInfo() {
-                this.$http.get(memberInfo).then(r => {
-                    uni.setStorage({
-                        key: 'userInfo',
-                        data: r.data
-                    })
-                    this.userInfo = r.data || undefined;
-                })
-            },
-            toTipDetail() {
-            	this.$mRouter.push({route: '/pages/set/about/detail?field=protocol_recharge&title=充值协议'});
-            },
-            // 初始化数据
-            async initData(options) {
-                this.code = options.code;
-                this.userInfo = uni.getStorageSync('userInfo') || undefined;
-                await this.$http.get(`${rechargeConfigIndex}`).then(r => {
-                    this.pageLoading = false;
-                    this.amountList = r.data;
-                    this.inputAmount = r.data[0] && r.data[0].price || 0.01;
-                    this.inputAmountGive = r.data[0] && r.data[0].give_price || 0;
-                }).catch(() => {
-                    this.pageLoading = false;
-                });
-                // #ifdef H5
-                if (uni.getSystemInfoSync().platform === 'android') {
-                    this.$mPayment.wxConfigH5();
-                }
-                // #endif
-                // #ifdef APP-PLUS
-                uni.getProvider({
-                    service: 'payment',
-                    success: (e) => {
-                        console.log('payment success:' + JSON.stringify(e));
-                        let providerList = [];
-                        e.provider.map((value) => {
-                            switch (value) {
-                                case 'alipay':
-                                    providerList.push({
-                                        name: '支付宝',
-                                        id: value,
-                                        loading: false
-                                    });
-                                    break;
-                                case 'wxpay':
-                                    providerList.push({
-                                        name: '微信',
-                                        id: value,
-                                        loading: false
-                                    });
-                                    break;
-                                default:
-                                    break;
-                            }
-                        })
-                        this.providerList = providerList;
-                    },
-                    fail: (e) => {
-                        console.log('获取支付通道失败:', e);
-                    }
-                });
-                // #endif
-            },
-            select(item) {
-                this.inputAmount = item.price;
-                this.inputAmountGive = item.give_price;
-            }
-        }
-    }
-</script>
-
-<style lang="scss">
-	page {
-		background-color: $color-white;
-	}
-
-	.block {
-		width: 100%;
-		padding: 20upx;
-
-		.title {
-			width: 100%;
-			font-size: 34upx;
-		}
-
-		.content {
-			.my {
-				width: 100%;
-				height: 120upx;
-				display: flex;
-				align-items: center;
-				font-size: $font-lg;
-				border-bottom: solid 1upx #eee;
-
-				.balance {
-					margin-right: 6upx;
-					color: $base-color;
-					font-size: $font-lg + 4upx;
-				}
-			}
-
-			.amount {
-				width: 100%;
-
-				.list {
-					display: flex;
-					justify-content: space-between;
-					padding-top: 20upx;
-					flex-wrap: wrap;
-
-					.box {
-						width: 31%;
-						margin-bottom: 20upx;
-						height: 120upx;
-						text-align: center;
-						border-radius: 10upx;
-						box-shadow: 0upx 5upx 20upx rgba(0, 0, 0, 0.05);
-						background-color: #f1f1f1;
-						color: 333;
-
-						&.on {
-							background-color: #f06c7a;
-							color: #fff;
-
-							.give {
-								color: #fff;
-							}
-						}
-
-						.real {
-							font-size: $font-lg;
-							margin-top: 10upx;
-						}
-
-						.give {
-							display: block;
-							font-size: $font-sm;
-							color: $base-color;
-						}
-					}
-				}
-
-				.num {
-					margin-top: 10upx;
-					display: flex;
-					justify-content: flex-end;
-					align-items: center;
-
-					.text {
-						padding-right: 10upx;
-						font-size: 30upx;
-					}
-
-					.give {
-						font-size: $font-sm;
-						color: $base-color;
-					}
-
-					.input {
-						width: 28.2vw;
-						border-bottom: solid 2upx #999;
-						justify-content: flex-end;
-						align-items: center;
-
-						input {
-							margin: 0 20upx;
-							height: 60upx;
-							font-size: 30upx;
-							color: #f06c7a;
-							justify-content: flex-end;
-							align-items: center;
-						}
-					}
-				}
-			}
-
-			.pay-list {
-				width: 100%;
-				border-bottom: solid 1upx #eee;
-
-				.row {
-					width: 100%;
-					height: 120upx;
-					display: flex;
-					align-items: center;
-
-					.icon {
-						width: 100upx;
-						font-size: 52upx;
-						margin-left: 15upx;
-					}
-
-					.iconerjiye-yucunkuan {
-						color: #fe8e2e;
-					}
-
-					.iconweixinzhifu {
-						color: #36cb59;
-					}
-
-					.iconalipay {
-						color: #01aaef;
-					}
-
-					.center {
-						width: 100%;
-						font-size: 30upx;
-					}
-
-					.right {
-						width: 100upx;
-						flex-shrink: 0;
-						display: flex;
-						justify-content: flex-end;
-					}
-				}
-			}
-		}
-	}
-
-	.pay {
-		margin-top: 20upx;
-		width: 100%;
-		display: flex;
-		justify-content: center;
-		flex-wrap: wrap;
-
-		.btn {
-			width: 70%;
-			height: 80upx;
-			border-radius: 80upx;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			color: #fff;
-			background-color: #f06c7a;
-			box-shadow: 0upx 5upx 10upx rgba(0, 0, 0, 0.2);
-		}
-
-		.tis {
-			margin-top: 10upx;
-			width: 100%;
-			font-size: 24upx;
-			display: flex;
-			justify-content: center;
-			align-items: baseline;
-			color: #999;
-
-			.terms {
-				color: #5a9ef7;
-			}
-		}
-	}
-
-	.rmbLogo {
-		font-size: 40upx;
-	}
-
-	button {
-		background-color: #007aff;
-		color: #ffffff;
-	}
-
-	.uni-h1.uni-center {
-		display: flex;
-		flex-direction: row;
-		justify-content: center;
-		align-items: flex-end;
-	}
-
-	.price {
-		border-bottom: 1px solid #eee;
-		width: 200upx;
-		height: 80upx;
-		padding-bottom: 4upx;
-	}
-
-	.ipaPayBtn {
-		margin-top: 30upx;
-	}
-</style>

+ 0 - 184
src/pages/user/address/address.vue

@@ -1,184 +0,0 @@
-<template>
-  <view class="address-list">
-    <view class="rf-list" v-if="addressList.length > 0">
-      <view class="rf-list-item" v-for="(item, index) in addressList" :key="index" @tap="checkAddress(item)">
-        <view class="mid" @touchstart="goTouchStart(item.id)" @touchmove="goTouchMove" @touchend="goTouchEnd">
-          <view class="address-box">
-            <text v-if="parseInt(item.is_default, 10) === 1" class="tag">默认</text>
-            <text class="address in1line">{{item.address_name}} {{item.address_details}}</text>
-          </view>
-          <view class="u-box">
-            <text class="name">{{item.realname}}</text>
-            <text class="mobile">{{item.mobile}}</text>
-          </view>
-        </view>
-        <view class="right">
-          <text class="iconfont iconbianji" @tap.stop="addAddress('edit', item.id)"></text>
-        </view>
-      </view>
-      <text v-if="addressList.length > 0" class="tips">
-        提示:长按可删除当前收货地址。最多只能存在一个默认地址。
-      </text>
-      <rf-load-more v-if="addressList.length > 0" :status="loadingType"/>
-    </view>
-    <view class="add-btn-wrapper">
-      <button class="add-btn" @tap="addAddress('add')">新增地址</button>
-    </view>
-    <rf-empty :info="`暂无收货地址,请添加地址`" v-if="addressList.length === 0 && !loading"></rf-empty>
-    <!--加载动画-->
-    <rf-loading v-if="loading"></rf-loading>
-  </view>
-</template>
-
-<script>
-	/**
-	 * @des 收货地址列表
-	 *
-	 * @author stav stavyan@qq.com
-	 * @date 2020-03-10 18:00
-	 * @copyright 2019
-	 */
-	import {addressDelete, addressList} from "@/api/userInfo";
-
-	import rfLoadMore from '@/components/rf-load-more/rf-load-more';
-
-	export default {
-		components: {
-			rfLoadMore
-		},
-		data() {
-			return {
-				timeOutEvent: 0,
-				source: 0,
-				page: 1,
-				addressList: [],
-				loadingType: 'more',
-				loading: true
-			}
-		},
-		//下拉刷新
-		onPullDownRefresh() {
-			this.page = 1;
-			this.addressList = [];
-			this.getAddressList('refresh');
-		},
-		//加载更多
-		onReachBottom() {
-			this.page++;
-			this.getAddressList();
-		},
-		onLoad(option) {
-			this.source = option.source;
-		},
-		onShow() {
-			this.initData()
-		},
-		methods: {
-			goTouchStart(id) {
-				clearTimeout(this.timeOutEvent);//清除定时器
-				this.timeOutEvent = 0;
-				this.timeOutEvent = setTimeout(() => {
-					uni.showModal({
-						content: '确定要删除该收货地址吗',
-						success: (e) => {
-							if (e.confirm) {
-								this.handleAddressDelete(id);
-							}
-						}
-					});
-				}, 0.5 * 1000);//这里设置定时
-			},
-      // 删除地址
-      async handleAddressDelete(id) {
-				await this.$http.delete(`${addressDelete}?id=${id}`).then(() => {
-          this.page = 1;
-          this.addressList.length = 0;
-          this.getAddressList();
-        })
-      },
-			//手释放,如果在500毫秒内就释放,则取消长按事件,此时可以执行onclick应该执行的事件
-			goTouchEnd() {
-				clearTimeout(this.timeOutEvent);
-			},
-			//如果手指有移动,则取消所有事件,此时说明用户只是要移动而不是长按
-			goTouchMove() {
-				clearTimeout(this.timeOutEvent);//清除定时器
-				this.timeOutEvent = 0;
-			},
-			// 数据初始化
-			initData() {
-				this.page = 1;
-				this.addressList.length = 0;
-				this.getAddressList();
-			},
-			// 获取收货地址列表
-			async getAddressList(type) {
-				await this.$http.get(`${addressList}`, {
-					page: this.page
-				}).then(r => {
-					this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-					this.loadingType = r.data.length === 10 ? 'more' : 'nomore';
-					this.addressList = [...this.addressList, ...r.data];
-				}).catch(() => {
-					this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-				});
-			},
-			// 选择地址
-			checkAddress(item) {
-				if (parseInt(this.source, 10) === 1) {
-					//this.$mHelper.prePage()获取上一页实例,在App.vue定义
-					this.$mHelper.prePage().addressData = item;
-				  this.$mRouter.back();
-				}
-			},
-			// 跳转添加地址页面
-			addAddress(type, id) {
-				this.$mRouter.push({route: `/pages/user/address/manage?type=${type}&id=${id}`});
-			}
-		}
-	}
-</script>
-
-<style lang='scss'>
-	page{
-    background-color: $page-color-base;
-	}
-	.address-list {
-		position: relative;
-    .address-box {
-      display: flex;
-      align-items: center;
-
-      .tag {
-        font-size: 20upx;
-        color: $base-color;
-        background: #fffafb;
-        border: 1px solid #ffb4c7;
-        border-radius: 4upx;
-        padding: 4upx 6upx;
-        line-height: 1;
-      }
-
-      .address {
-        font-size: 30upx;
-        color: $font-color-dark;
-      }
-    }
-
-    .u-box {
-      font-size: 28upx;
-      color: $font-color-light;
-      margin-top: 16upx;
-
-      .name {
-        margin-right: 30upx;
-      }
-    }
-  }
-</style>

+ 0 - 177
src/pages/user/address/manage.vue

@@ -1,177 +0,0 @@
-<template>
-	<view class="address-manage rf-row-wrapper">
-		<view class="row b-b">
-			<text class="tit">联系人</text>
-			<input class="input" type="text" v-model="addressData.realname" @blur="handleRealNameChange" placeholder="收货人姓名" placeholder-class="placeholder" />
-		</view>
-		<view class="row b-b">
-			<text class="tit">手机号</text>
-			<input class="input" type="number" v-model="addressData.mobile" @blur="handleMobileChange" placeholder="收货人手机号码" placeholder-class="placeholder" />
-		</view>
-		<view class="row b-b">
-			<text class="tit">选择地址</text>
-			<!--地址三级联动-->
-			<rf-pick-regions
-					:addressData="addressData"
-	        @getRegions="handleGetRegions">
-      </rf-pick-regions>
-		</view>
-		<view class="row b-b">
-			<text class="tit">详细地址</text>
-			<input class="input" type="text" v-model="addressData.address_details" @blur="bindAddressDetailsChange" placeholder="请输入详细地址" placeholder-class="placeholder" />
-		</view>
-		<view class="row default-row">
-			<text class="tit">设为默认</text>
-			<switch :checked="addressData.is_default ? true : false" color="#fa436a" @change="switchChange" />
-		</view>
-		<button class="add-btn" :disabled="btnLoading" :loading="btnLoading"  @tap="confirm">提交</button>
-
-		<!--加载动画-->
-		<rf-loading v-if="loading"></rf-loading>
-	</view>
-</template>
-
-<script>
-	/**
-	 * @des 收货地址列表
-	 *
-	 * @author stav stavyan@qq.com
-	 * @date 2020-03-10 18:00
-	 * @copyright 2019
-	 */
-	import {addressCreate, addressUpdate, addressDetail} from '@/api/userInfo';
-  import rfPickRegions from '@/components/rf-pick-regions';
-	export default {
-        components: {
-            rfPickRegions
-        },
-		data() {
-			return {
-				addressData: {
-					realname: '',
-					mobile: '',
-					address_details: '',
-					address_name: '请选择地址',
-					address: '',
-					is_default: false,
-					province_id: '',
-					city_id: '',
-					area_id: ''
-				},
-				btnLoading: false,
-				multiArray: [[], [], []],
-				multiIndex: [0, 0, 0],
-				loading: true
-			}
-		},
-		onLoad(options){
-			this.initData(options);
-		},
-		methods: {
-      // 获取选择的地区
-      handleGetRegions(e){
-        this.addressData.province_id = e.province_id;
-        this.addressData.city_id = e.city_id;
-        this.addressData.area_id = e.area_id;
-      },
-	    // 数据初始化
-			async initData(options) {
-				let title = '新增收货地址';
-				if(options.type==='edit'){
-					title = '编辑收货地址'
-					await this.getAddressDetail(options.id)
-				} else {
-			    setTimeout(() => {this.loading = false;}, 1 * 1000);
-				}
-				this.manageType = options.type;
-				uni.setNavigationBarTitle({
-					title
-				});
-			},
-	    // 获取收货地址
-			async getAddressDetail(id) {
-				await this.$http.get(`${addressDetail}`, {
-					id
-				}).then(async r => {
-					this.addressData = r.data;
-			    setTimeout(() => {this.loading = false;}, 1 * 1000);
-				}).catch(() => {
-			    this.loading = false;
-				})
-			},
-			handleRealNameChange (e) {
-				this.addressData.realname = e.detail.value;
-			},
-			bindAddressDetailsChange (e) {
-				this.addressData.address_details = e.detail.value;
-			},
-			handleMobileChange (e) {
-				this.addressData.mobile = e.detail.value;
-			},
-			switchChange(e){
-				this.addressData.is_default = e.detail.value;
-			},
-			//提交
-			confirm(){
-				let data = this.addressData;
-				if(!data.realname){
-					this.$mHelper.toast('请填写收货人姓名');
-					return;
-				}
-				if(!/(^1[3|4|5|7|8][0-9]{9}$)/.test(data.mobile)){
-					this.$mHelper.toast('请输入正确的手机号码');
-					return;
-				}
-				this.btnLoading = true;
-				if (this.manageType === 'edit') {
-					this.handleAddressUpdate(data)
-				} else {
-					this.handleAddressCreate(data)
-				}
-			},
-			async handleAddressUpdate (data) {
-				await this.$http.put(`${addressUpdate}?id=${data.id}`, {
-					realname: data.realname,
-					mobile: data.mobile,
-					address_details: data.address_details,
-					is_default: data.is_default ? 1 : 0,
-					province_id: data.province_id,
-					city_id: data.city_id,
-					area_id: data.area_id
-				}).then(() =>{
-            this.btnLoading = false;
-						this.$mHelper.toast('收货地址修改成功!');
-						this.$mRouter.back();
-				}).catch(() => {
-					this.btnLoading = false;
-				});
-			},
-			async handleAddressCreate (data) {
-				await this.$http.post(`${addressCreate}`, {
-					realname: data.realname,
-					mobile: data.mobile,
-					address_details: data.address_details,
-					is_default: data.is_default ? 1 : 0,
-					province_id: data.province_id,
-					city_id: data.city_id,
-					area_id: data.area_id
-				}).then(() =>{
-            this.btnLoading = false;
-						this.$mHelper.toast('收货地址修改成功!');
-						this.$mRouter.back();
-				}).catch(() => {
-					this.btnLoading = false;
-				});
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	page {
-		background: $page-color-base;
-	}
-	.address-manage {
-		padding-top: 16upx;
-	}
-</style>

+ 0 - 211
src/pages/user/collection/collection.vue

@@ -1,211 +0,0 @@
-<template>
-  <view class="collection">
-    <rf-swipe-action class="rf-list">
-      <rf-swipe-action-item
-          :options="options"
-          :info="item"
-          @action="bindClick"
-          :key="index"
-          class="rf-swipe-item"
-          v-for="(item, index) in collectionList">
-          <view class="rf-list-item" @tap="navTo(`/pages/product/product?id=${item.product.id}`)">
-          <view class="left">
-            <image class="image"  :src="item.product && item.product.picture"></image>
-          </view>
-          <view class="mid">
-            <view class="title in2line">{{ item.product && item.product.name }}</view>
-            <view class="data">
-              <view class="item"><text class="iconfont icontuandui"></text>推荐 {{item.product && item.product.collect_num || 0 }}</view>
-              <view class="item"><text class="iconfont iconkechakan"></text>浏览 {{item.product && item.product.view || 0 }}</view>
-            </view>
-            <view class="state-wrapper">
-              <text class="state" v-if="parseInt(item.product && item.product.product_status) === 0">
-                失效
-              </text>
-            </view>
-            <view class="bottom">
-              <text class="price">{{ item.product && item.product.minPriceSku.price }}</text>
-              <text>{{ item.created_at | time }}</text>
-            </view>
-          </view>
-        </view>
-      </rf-swipe-action-item>
-      <rf-load-more :status="loadingType" v-if="collectionList.length > 0"/>
-    </rf-swipe-action>
-    <rf-empty :info="'快去收藏一些商品吧~'" v-if="collectionList.length === 0 && !loading"></rf-empty>
-    <!--加载动画-->
-    <rf-loading v-if="loading"></rf-loading>
-  </view>
-</template>
-
-<script>
-	/**
-	 * @des 我的收藏
-	 *
-	 * @author stav stavyan@qq.com
-	 * @date 2019-11-22 10:47
-	 * @copyright 2019
-	 */
-	import {collectList} from "@/api/userInfo";
-	import rfLoadMore from '@/components/rf-load-more/rf-load-more';
-	import {collectDel} from "@/api/basic";
-	import moment from '@/common/moment';
-	import rfSwipeAction from '@/components/rf-swipe-action/rf-swipe-action';
-	import rfSwipeActionItem from '@/components/rf-swipe-action-item/rf-swipe-action-item';
-	export default {
-		components: {
-			rfLoadMore,
-			rfSwipeAction,
-			rfSwipeActionItem
-		},
-		data() {
-			return {
-				collectionList: [],
-				page: 1,
-				loadingType: 'more',
-				options: [
-					{text: '取消收藏', style: {backgroundColor: '#fa436a'}}
-				],
-				loading: true
-			};
-		},
-		filters: {
-			time(val) {
-				return moment(val * 1000).format('YYYY-MM-DD HH:mm')
-			}
-		},
-		onShow() {
-			this.initData();
-		},
-		//下拉刷新
-		onPullDownRefresh() {
-			this.page = 1;
-			this.collectionList = [];
-			this.loading = true;
-			this.getCollectionList('refresh');
-		},
-		//加载更多
-		onReachBottom() {
-			this.page++;
-			this.getCollectionList();
-		},
-		methods: {
-			async bindClick(e) {
-				if (e.content.text === '取消收藏') {
-          this.handleDeleteCollection(e.data.id);
-				}
-			},
-      async handleDeleteCollection(id) {
-        await this.$http.delete(`${collectDel}?id=${id}`, {
-          page: this.page
-        }).then(() => {
-          this.$mHelper.toast('取消收藏成功');
-          this.page = 1;
-          this.collectionList.length = 0;
-          this.getCollectionList();
-        })
-      },
-			// 数据初始化
-			initData() {
-				this.page = 1;
-				this.collectionList.length = 0;
-        this.getCollectionList();
-			},
-			// 获取收藏列表
-			async getCollectionList(type) {
-				await this.$http.get(`${collectList}`, {
-					page: this.page
-				}).then(r => {
-					this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-					this.loadingType = r.data.length === 10 ? 'more' : 'nomore';
-					this.collectionList = [...this.collectionList, ...r.data];
-				}).catch(() => {
-					this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-				});
-			},
-			navTo(route) {
-				this.$mRouter.push({route})
-			}
-		}
-	}
-</script>
-
-<style lang='scss'>
-	page{
-    background-color: $page-color-base;
-	}
-  .collection {
-    .rf-swipe-item {
-      margin: 0 $spacing-sm $spacing-base;
-    }
-    .rf-list-item {
-      padding: 0;
-      margin: 0;
-    }
-    .left {
-      padding: 20upx 20upx 10upx;
-      .image {
-        width: 260upx;
-        height: 240upx;
-      }
-    }
-    .mid {
-      width: calc(100vw - 350upx);
-      margin: 0 10upx;
-      .title {
-        height: 88upx;
-        font-size: $font-base + 2upx;
-        color: $font-color-dark;
-      }
-      .data {
-        display: flex;
-        justify-content: space-between;
-        margin: 10upx 0 5upx;
-        font-size: $font-base;
-        color: $font-color-base;
-        .item {
-          height: 50upx;
-          line-height: 50upx;
-        }
-        .iconfont {
-          color: $font-color-light;
-          margin-right: 10upx;
-        }
-      }
-      .state-wrapper {
-        height: 48upx;
-        .state {
-          margin: 5upx 0;
-          background-color: $base-color;
-          opacity: 0.8;
-          color: $color-white;
-          font-size: $font-sm;
-          padding: 4upx 10upx;
-          border-radius: 6upx;
-        }
-      }
-      .bottom {
-        width: 100%;
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-        font-size: $font-sm;
-        color: $font-color-light;
-        .price{
-          color: $base-color;
-          font-size: $font-lg;
-          &:before{
-            content: '¥';
-            font-size: $font-sm;
-          }
-        }
-      }
-    }
-  }
-</style>

+ 0 - 568
src/pages/user/coupon/coupon.vue

@@ -1,568 +0,0 @@
-<template>
-  <view class="my-coupon">
-    <!--顶部导航栏-->
-    <view class="tabr" :style="{top:headerTop}">
-      <view :class="{on:typeClass=='valid'}" @tap="switchType('valid', 1)">可用
-        <text v-if="state === 1">({{couponList.length}})</text>
-      </view>
-      <view :class="{on:typeClass=='used'}" @tap="switchType('used', 2)">已使用
-        <text v-if="state === 2">({{couponList.length}})</text>
-      </view>
-      <view :class="{on:typeClass=='invalid'}" @tap="switchType('invalid', 3)">已失效
-        <text v-if="state === 3">({{couponList.length}})</text>
-      </view>
-      <view class="border" :class="typeClass"></view>
-    </view>
-    <!--占位符-->
-    <view class="place"></view>
-    <!--优惠券列表-->
-    <view class="coupon-list">
-      <view v-if="state === 3 && couponList.length > 0" class="empty-invalid" @tap.stop="emptyInvalidCoupon">
-        <view class="icon shanchu"></view>
-        清空失效优惠券
-      </view>
-      <!-- 优惠券列表 -->
-      <view class="sub-list valid" :style="{marginTop: state === 3 ? '50upx' : 0}">
-        <view class="row" v-for="(row,index) in couponList" :key="index">
-          <!-- content -->
-          <view class="carrier">
-            <view class="left">
-              <view class="in1line title">
-                <text class="cell-icon">{{ parseInt(row.couponType.range_type, 10) === 2 ? '限' : '全' }}</text>
-                {{row.title}}
-              </view>
-              <view class="term" v-if="state !== 2">
-                {{ row.start_time | time }} ~ {{ row.end_time | time }}
-              </view>
-              <view class="term" v-else>
-                使用时间:{{ row.use_time | timeFull }}
-              </view>
-              <view class="overdue" v-if="state === 3">
-                <i class="iconfont iconyiguoqi2 "></i>
-              </view>
-              <view class="overdue" v-if="state === 2">
-                <i class="iconfont iconyishiyong"></i>
-              </view>
-              <view class="usage">
-                {{parseInt(row.couponType.max_fetch, 10) === 0 ? '不限' : `每人限领${row.couponType.max_fetch}` }}
-                已领{{ row.couponType.get_count }}
-                <text v-if="row.couponType.percentage">剩余{{ row.couponType.percentage }}%</text>
-              </view>
-            </view>
-            <view class="right" :class="{ invalid: state !== 1 }">
-              <view class="ticket">
-                <view class="num">
-                  {{ row.money ? '¥' + row.money : row.discount + '折' }}
-                </view>
-              </view>
-              <view class="criteria">
-                满{{row.at_least}}使用
-              </view>
-              <view class="use view" @tap="show(row)" v-if="parseInt(row.couponType.range_type, 10) === 2">
-                商品
-              </view>
-              <view class="use" v-if="state == 1" @tap="navTo('/pages/category/category', 'tab')">
-                去使用
-              </view>
-              <view class="use" v-else @tap="navTo(`/pages/order/detail?id=${row.use_order_id}`)">
-                去查看
-              </view>
-            </view>
-          </view>
-        </view>
-      </view>
-      <rf-load-more :status="loadingType" v-if="couponList.length > 0"></rf-load-more>
-    </view>
-    <rf-empty :info="'暂无优惠券'" v-if="couponList.length === 0 && !loading"></rf-empty>
-    <!--显示部分商品的抽屉-->
-    <uni-drawer class="rf-drawer" :visible="showRight" mode="right" @close="closeDrawer()">
-      <view class="rf-drawer-title">可用商品列表</view>
-      <view class="rf-drawer-list">
-        <view class="rf-drawer-item" @tap="navTo(`/pages/product/product?id=${item.id}`)" v-for="item in currentCoupon.usableProduct" :key="item.id">
-          <view class="left">
-            <view class="title">{{ item.name.split('】')[0].split('【').join('') }}</view>
-            <view class="desc in2line">{{item.name.split('】')[1]}}</view>
-          </view>
-          <text class="iconfont iconyou"></text>
-        </view>
-      </view>
-      <view class="close">
-        <button class="btn" plain="true" size="small" type="primary" @tap="hide">关闭</button>
-      </view>
-    </uni-drawer>
-    <rf-loading v-if="loading"></rf-loading>
-  </view>
-</template>
-
-<script>
-	/**
-	 * @des 优惠券管理
-	 *
-	 * @author stav stavyan@qq.com
-	 * @date 2019-12-09 10:13
-	 * @copyright 2019
-	 */
-	import {couponClear, myCouponList} from "@/api/userInfo";
-	import rfLoadMore from '@/components/rf-load-more/rf-load-more';
-
-	import moment from '@/common/moment';
-	import uniDrawer from '@/components/uni-drawer/uni-drawer'
-
-	export default {
-		components: {
-			rfLoadMore,
-			uniDrawer
-		},
-		data() {
-			return {
-				headerTop: 0,
-				//控制滑动效果
-				typeClass: 'valid',
-				theIndex: null,
-				oldIndex: null,
-				state: 1,
-				isStop: false,
-				couponList: [],
-				loadingType: 'more',
-				token: null,
-				page: 1,
-				showRight: false,
-				currentCoupon: {},
-				loading: true,
-			}
-		},
-		filters: {
-			// 格式化时间
-			time(val) {
-				return moment(val * 1000).format('YYYY-MM-DD')
-			},
-			// 格式化时间
-			timeFull(val) {
-				return moment(val * 1000).format('YYYY-MM-DD HH:mm:ss')
-			}
-		},
-		//下拉刷新,需要自己在page.json文件中配置开启页面下拉刷新 "enablePullDownRefresh": true
-		onPullDownRefresh() {
-			this.page = 1;
-			this.couponList = [];
-			this.getMyCouponList('refresh');
-		},
-		//加载更多
-		onReachBottom() {
-			this.page++;
-			this.getMyCouponList();
-		},
-		onLoad() {
-			// 数据初始化
-			this.initData();
-			//兼容H5下排序栏位置
-			// #ifdef H5
-			//定时器方式循环获取高度为止,这么写的原因是onLoad中head未必已经渲染出来。
-			let Timer = setInterval(() => {
-				let uniHead = document.getElementsByTagName('uni-page-head');
-				if (uniHead.length > 0) {
-					this.headerTop = uniHead[0].offsetHeight + 'px';
-					clearInterval(Timer);//清除定时器
-				}
-			}, 1);
-			// #endif
-		},
-		methods: {
-			// 显示抽屉(可使用商品)
-			show(item) {
-				if (item.usableProduct.length === 0) return;
-				this.currentCoupon = item;
-				this.showRight = true
-			},
-			// 隐藏抽屉
-			hide() {
-				this.showRight = false
-			},
-			// 关闭抽屉
-			closeDrawer() {
-				this.showRight = false
-			},
-			// 切换顶部优惠券类型
-			switchType(type, state) {
-				if (this.typeClass === type) {
-					return;
-				}
-				uni.pageScrollTo({
-					scrollTop: 0,
-					duration: 0
-				})
-				this.typeClass = type;
-				this.state = state;
-				this.page = 1;
-				this.couponList = [];
-				this.loading = true;
-				this.getMyCouponList();
-			},
-			// 清空失效优惠券
-			async emptyInvalidCoupon() {
-				await this.$http.get(`${couponClear}`).then(() => {
-					this.getMyCouponList();
-				})
-			},
-			// 占位方法
-			discard() {
-				//丢弃
-			},
-			// 初始化数据
-			initData() {
-        this.page = 1;
-        this.couponList = [];
-        this.getMyCouponList();
-			},
-			// 统一跳转接口
-			navTo(route, type) {
-				if (type) {
-					this.$mRouter.switchTab({route});
-				} else {
-					this.$mRouter.push({route});
-        }
-			},
-			// 获取我的优惠券列表
-			async getMyCouponList(type) {
-				await this.$http.get(`${myCouponList}`, {
-					page: this.page,
-					state: this.state
-				}).then(r => {
-					this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-					this.loadingType = r.data.length === 10 ? 'more' : 'nomore';
-					this.couponList = [...this.couponList, ...r.data]
-				}).catch(() => {
-					this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-        });
-			}
-		}
-	}
-</script>
-<style lang="scss">
-  view {
-    display: flex;
-    flex-wrap: wrap;
-  }
-
-  page {
-    position: relative;
-    background-color: $page-color-base
-  }
-
-  .my-coupon {
-    .place {
-      width: 100%;
-      height: 95upx;
-    }
-
-   .tabr {
-      background-color: #fff;
-      width: 100%;
-      height: 95upx;
-      padding: 0 3%;
-      border-bottom: solid 1upx #dedede;
-      position: fixed;
-      top: 0;
-      z-index: 10;
-
-      view {
-        width: 33.3%;
-        height: 90upx;
-        justify-content: center;
-        align-items: center;
-        font-size: 32upx;
-        color: #999;
-      }
-
-      .on {
-        color: $base-color;
-      }
-
-      .border {
-        height: 4upx;
-        background-color: $base-color;
-        transition: all .3s ease-out;
-
-        &.used {
-          transform: translate3d(100%, 0, 0);
-        }
-
-        &.invalid {
-          transform: translate3d(200%, 0, 0);
-        }
-      }
-
-    }
-  }
-
-  .coupon-list {
-    width: 100%;
-    display: block;
-    position: relative;
-    .empty-invalid {
-      position: absolute;
-      right: 20upx;
-      top: 10upx;
-      font-size: $font-base;
-      color: $base-color;
-
-      .icon {
-        font-size: $font-base;
-        color: $base-color;
-        margin-right: 8upx;
-      }
-    }
-  }
-  @keyframes showValid {
-    0% {
-      transform: translateX(-100%);
-    }
-    100% {
-      transform: translateX(0);
-    }
-  }
-  @keyframes showInvalid {
-    0% {
-      transform: translateX(0);
-    }
-    100% {
-      transform: translateX(-100%);
-    }
-  }
-  .sub-list {
-    width: 100%;
-    &.invalid {
-      position: absolute;
-      top: 0;
-      left: 100%;
-      display: none;
-    }
-
-    &.showvalid {
-      display: flex;
-      animation: showValid 0.20s linear both;
-    }
-
-    &.showinvalid {
-      display: flex;
-      animation: showInvalid 0.20s linear both;
-    }
-
-    .tis {
-      width: 100%;
-      height: 60upx;
-      justify-content: center;
-      align-items: center;
-      font-size: 32upx;
-    }
-
-    .row {
-      width: 92%;
-      height: 24vw;
-      margin: 20upx auto 10upx auto;
-      border-radius: 8upx;
-      // box-shadow: 0upx 0 10upx rgba(0,0,0,0.1);
-      align-items: center;
-      position: relative;
-      overflow: hidden;
-      z-index: 4;
-      border: 0;
-
-      .menu {
-        .icon {
-          color: #fff;
-          font-size: 50upx;
-        }
-
-        position: absolute;
-        width: 28%;
-        height: 100%;
-        right: 0;
-        justify-content: center;
-        align-items: center;
-        background-color: $base-color;
-        color: #fff;
-        z-index: 2;
-      }
-
-      .carrier {
-        @keyframes showMenu {
-          0% {
-            transform: translateX(0);
-          }
-          100% {
-            transform: translateX(-28%);
-          }
-        }
-        @keyframes closeMenu {
-          0% {
-            transform: translateX(-28%);
-          }
-          100% {
-            transform: translateX(0);
-          }
-        }
-
-        &.open {
-          animation: showMenu 0.25s linear both;
-        }
-
-        &.close {
-          animation: closeMenu 0.15s linear both;
-        }
-
-        background-color: #fff;
-        position: absolute;
-        width: 100%;
-        padding: 0 0;
-        height: 100%;
-        z-index: 3;
-        flex-wrap: nowrap;
-
-        .left {
-          width: 100%;
-          position: relative;
-
-          .title {
-            padding-top: 3vw;
-            width: 90%;
-            margin: 0 5%;
-            font-size: 36upx;
-
-            .cell-icon {
-              display: inline-block;
-              height: 32upx;
-              margin-top: 15upx;
-              width: 32upx;
-              font-size: 22upx;
-              color: #fff;
-              text-align: center;
-              line-height: 32upx;
-              background: #f85e52;
-              border-radius: 4upx;
-              margin-right: 12upx;
-
-              &.hb {
-                background: #ffaa0e;
-              }
-
-              &.lpk {
-                background: #3ab54a;
-              }
-
-            }
-          }
-
-          .term {
-            width: 90%;
-            margin: 0 5%;
-            font-size: 26upx;
-            color: #999;
-          }
-
-          .usage {
-            width: 90%;
-            margin: 0 5%;
-            font-size: 26upx;
-            color: $font-color-light;
-          }
-
-          .gap-top, .gap-bottom {
-            position: absolute;
-            width: 20upx;
-            height: 20upx;
-            right: -10upx;
-            border-radius: 100%;
-            background-color: #f5f5f5;
-          }
-
-          .gap-top {
-            top: -10upx;
-          }
-
-          .gap-bottom {
-            bottom: -10upx;
-          }
-
-          .overdue {
-            position: absolute;
-            right: 10upx;
-            top: 0;
-
-            .iconyiguoqi2 {
-              font-size: $font-lg + 40upx;
-              color: $base-color;
-            }
-
-            .iconyishiyong {
-              font-size: $font-lg + 40upx;
-              color: $font-color-base;
-            }
-          }
-        }
-
-        .right {
-          flex-shrink: 0;
-          width: 28%;
-          color: #fff;
-          background: linear-gradient(to right, rgba(250, 67, 106, 0.72), rgba(250, 67, 106, 0.64));
-
-          &.invalid {
-            background: linear-gradient(to right, #aaa, #999);
-
-            .use {
-              color: #aaa;
-            }
-          }
-
-          justify-content: center;
-
-          .ticket, .criteria {
-            width: 100%;
-          }
-
-          .ticket {
-            padding-top: 1vw;
-            justify-content: center;
-            align-items: baseline;
-            height: 6vw;
-
-            .num {
-              font-size: 42upx;
-              font-weight: 600;
-            }
-
-            .unit {
-              font-size: 24upx;
-            }
-          }
-
-          .criteria {
-            justify-content: center;
-
-            font-size: 28upx;
-          }
-
-          .use {
-            width: 45%;
-            margin: 0 2.5%;
-            height: 40upx;
-            justify-content: center;
-            align-items: center;
-            font-size: 24upx;
-            background-color: #fff;
-            color: $base-color;
-            border-radius: 40upx;
-            padding: 0 4upx;
-          }
-        }
-      }
-    }
-  }
-</style>

+ 0 - 326
src/pages/user/coupon/detail.vue

@@ -1,326 +0,0 @@
-<template>
-	<view class="coupon-detail" :style="{backgroundColor: couponList.length === 0 ? '#fff' : '' }">
-		<!-- 优惠券详情 -->
-		<view class="sub-list valid" :style="{marginTop: state === 3 ? '40upx' : 0}">
-				<view class="row" v-for="(row,index) in couponList" :key="index" >
-					<!-- content -->
-					<view class="carrier">
-						<view class="left">
-							<view class="in1line title">
-								<text class="cell-icon">{{ parseInt(row.range_type, 10) === 2 ? '限' : '全' }}</text>
-								{{row.title}}
-							</view>
-							<view class="term" v-if="state !== 2">
-								{{ row.start_time | time }} ~ {{ row.end_time | time }}
-							</view>
-							<view class="term" v-else>
-								使用时间:{{ row.use_time | timeFull }}
-							</view>
-							<view class="icon shixiao" v-if="state === 3" />
-							<view class="used" v-if="state === 2">已使用</view>
-							<view class="usage">
-								{{parseInt(row.max_fetch, 10) === 0 ? '不限' : `每人限领 ${row.max_fetch}` }}
-								总领取 {{ row.get_count }}
-								<text v-if="row.percentage">剩余{{ row.percentage }}%</text>
-							</view>
-						</view>
-						<view class="right" :class="{ invalid: state !== 1 }">
-							<view class="ticket">
-								<view class="num">
-									{{ row.money ? '¥' + row.money : row.discount + '折' }}
-								</view>
-							</view>
-							<view class="criteria">
-								满{{row.at_least}}使用
-							</view>
-							<view class="btn-group">
-								<view class="use view" @tap="show(row)" v-if="parseInt(row.range_type, 10) === 2">
-									商品
-								</view>
-								<view class="use" @tap="getCoupon(row)">
-									领取
-								</view>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		<uni-drawer class="rf-drawer" :visible="showRight" mode="right" @close="closeDrawer()">
-				<view class="rf-drawer-title">可用商品列表</view>
-				<view class="rf-drawer-list">
-	        <view class="rf-drawer-item" @tap="navTo(`/pages/product/product?id=${item.id}`)" v-for="item in currentCoupon.usableProduct" :key="item.id">
-		        <view class="left">
-		          <view class="title">{{ item.name.split('】')[0].split('【').join('') }}</view>
-		          <text class="desc in2line">{{item.name.split('】')[1]}}</text>
-		        </view>
-		        <text class="iconfont iconyou"></text>
-	        </view>
-	      </view>
-				<view class="close">
-					<button class="btn" plain="true" size="small" type="primary" @tap="hide">关闭</button>
-				</view>
-		</uni-drawer>
-
-		<rf-empty :info="'暂无优惠券'" v-if="couponList.length === 0 && !loading"></rf-empty>
-		<!--加载动画-->
-		<rf-loading v-if="loading"></rf-loading>
-	</view>
-</template>
-
-<script>
-	/**
- * @des 优惠券详情
- *
- * @author stav stavyan@qq.com
- * @date 2019-12-09 10:13
- * @copyright 2019
- */
-import { couponDetail, couponReceive} from "@/api/userInfo";
-import moment from '@/common/moment';
-import uniDrawer from '@/components/uni-drawer/uni-drawer';
-export default {
-	components: {
-		uniDrawer,
-	},
-	data() {
-		return {
-			headerTop:0,
-			//控制滑动效果
-			typeClass:'valid',
-			theIndex: null,
-			oldIndex: null,
-			state: 1,
-			isStop:false,
-			couponList: [],
-			loadingType: 'more',
-			token: null,
-			page: 1,
-			showRight: false,
-			currentCoupon: {},
-			loading: true
-		}
-	},
-	filters: {
-		time(val) {
-			return moment(val * 1000).format('YYYY-MM-DD')
-		},
-		timeFull(val) {
-			return moment(val * 1000).format('YYYY-MM-DD HH:mm:ss')
-		}
-	},
-	onLoad(options) {
-		this.initData(options);
-	},
-	methods: {
-		show(item) {
-			if (item.usableProduct.length === 0) return;
-			this.currentCoupon = item;
-			this.showRight = true
-		},
-		hide() {
-			this.showRight = false
-		},
-		closeDrawer() {
-			this.showRight = false
-		},
-		// 初始化数据
-		initData (options) {
-			this.getMyCouponDetail(options.id);
-		},
-		// 获取优惠券
-		async getCoupon(item) {
-			if (!this.$mStore.getters.hasLogin) {
-				this.$mHelper.toast('请您先登录!');
-				return;
-			}
-			if (parseInt(item.is_get, 10) === 0) {
-				this.$mHelper.toast('该优惠券暂不可领取!');
-				return;
-			}
-			await this.$http.post(`${couponReceive}`, {
-				id: item.id
-			}).then(() => {
-        this.$mHelper.toast('领取成功');
-				setTimeout(() => {
-					this.couponList = [];
-					this.getMyCouponDetail(item.id);
-				}, 1.5 * 1000)
-			})
-		},
-		// 统一跳转接口
-		navTo(route){
-			this.$mRouter.push({route})
-		},
-		// 获取我的收货地址列表
-		async getMyCouponDetail (id) {
-			await this.$http.get(`${couponDetail}`, {
-				id
-			}).then(r=>{
-		    this.loading = false;
-				this.couponList.push(r.data);
-			}).catch(() => {
-		    this.loading = false;
-			})
-		}
-	}
-}
-</script>
-<style lang="scss">
-	.list{
-		display: flex;
-		width: 100%;
-		position: relative;
-	}
-	.sub-list{
-		width: 100%;
-		padding-top: 10upx;
-		.row{
-			width: 92%;
-			height: 24vw;
-			margin: 10upx auto;
-			border-radius: 8upx;
-			align-items: center;
-			position: relative;
-			overflow: hidden;
-			z-index: 4;
-			border: 0;
-			.carrier{
-				background-color: #fff;
-				position: absolute;
-				width: 100%;
-				padding: 0 0;
-				height: 100%;
-				z-index: 3;
-				display: flex;
-				.left{
-					flex: 1;
-					.title{
-						padding-top: 3vw;
-						width: 90%;
-						margin: 0 5%;
-						font-size: 36upx;
-						.cell-icon {
-							display: inline-block;
-							height: 32upx;
-							margin-top: 15upx;
-							width: 32upx;
-							font-size: 22upx;
-							color: #fff;
-							text-align: center;
-							line-height: 32upx;
-							background: #f85e52;
-							border-radius: 4upx;
-							margin-right: 12upx;
-							&.hb {
-								background: #ffaa0e;
-							}
-
-							&.lpk {
-								background: #3ab54a;
-							}
-
-						}
-					}
-					.term{
-						width: 90%;
-						margin: 0 5%;
-						font-size: 26upx;
-						color: #999;
-					}
-					.usage {
-						width: 90%;
-						margin: 0 5%;
-						font-size: 26upx;
-						color: $font-color-light;
-					}
-					position: relative;
-					.gap-top,.gap-bottom{
-						position: absolute;
-						width: 20upx;
-						height: 20upx;
-						right: -10upx;
-						border-radius: 100%;
-						background-color: #f5f5f5;
-					}
-					.gap-top{
-						top: -10upx;
-					}
-					.gap-bottom{
-						bottom: -10upx;
-					}
-					.used {
-						position: absolute;
-						right: 10upx;
-						bottom: 5upx;
-						font-size: $font-sm;
-						color: $base-color;
-					}
-					.shixiao{
-						position: absolute;
-						right: 0;
-						top: -20upx;
-						font-size: 150upx;
-						z-index: 6;
-						color: rgba(153,153,153,0.2)
-					}
-				}
-				.right{
-					width: 28%;
-					color: #fff;
-					text-align: center;
-					background:linear-gradient(to right, rgba(250,67,106, 0.72), rgba(250,67,106, 0.64));
-					.ticket,.criteria{width: 100%;}
-					.ticket{
-						padding-top: 20upx;
-						.num{
-							font-size: $font-lg + 12upx;
-							font-weight: 600;
-							line-height: 1.2;
-						}
-						.unit{
-							font-size: 24upx;
-						}
-					}
-					.criteria{
-						font-size: $font-base;
-					}
-					.btn-group {
-						display: flex;
-						justify-content: space-between;
-						align-items: center;
-						.use{
-							flex: 1;
-							margin: 0 6upx;
-							height: 40upx;
-							justify-content: center;
-							align-items: center;
-							font-size: 24upx;
-							background-color: #fff;
-							color: $base-color;
-							border-radius: 40upx;
-							padding: 0 4upx;
-						}
-					}
-				}
-			}
-		}
-	}
-	.drawer {
-		.close {
-			.btn{
-	      width: 320upx;
-	      height: 76upx;
-	      line-height: 76upx;
-	      border-radius: 50px;
-	      margin-top: 70upx;
-	      background: $uni-color-primary;
-	      color: #fff;
-	      font-size: $font-lg;
-	      border: none;
-	      &:after{
-	        border-radius: 100px;
-	      }
-	    }
-		}
-	}
-</style>

+ 0 - 135
src/pages/user/coupon/list.vue

@@ -1,135 +0,0 @@
-<template>
-	<view class="coupon-center">
-    <view class="coupon-list">
-      <!-- 优惠券列表 -->
-      <view class="sub-list valid">
-        <view class="row" v-for="(item,index) in couponList" :key="index" @tap.stop="getCoupon(item)">
-          <view class="carrier">
-            <view class="title">
-	            <view>
-	              <text class="cell-icon">{{ parseInt(item.range_type, 10) === 2 ? '限' : '全' }}</text>
-	              <text class="cell-title">{{item.title}}</text>
-	            </view>
-	            <view>
-								<text class="price" v-if="item.money">{{item.money }}</text>
-								<text class="price-discount" v-else>{{ `${item.discount}折` }}</text>
-	            </view>
-            </view>
-            <view class="term">
-              <text>{{ item.start_time | time }} ~ {{ item.end_time | time }}</text>
-							<text class="at_least">满{{ item.at_least }}可用</text>
-            </view>
-            <view class="usage">
-								<text>
-									{{ parseInt(item.range_type, 10) === 2 ? '部分产品使用' : '全场产品使用' }}
-								</text>
-              <view>
-                {{parseInt(item.max_fetch, 10) === 0 ? '不限' : `每人限领${item.max_fetch}` }}
-                已领{{ item.get_count }}
-                <text class="last" v-if="item.percentage">剩余{{ item.percentage }}%</text>
-              </view>
-            </view>
-          </view>
-        </view>
-      </view>
-      <rf-load-more :status="loadingType" v-if="couponList.length > 0"></rf-load-more>
-    </view>
-		<rf-empty :info="errorInfo || '暂无优惠券'" v-if="couponList.length === 0 && !loading"></rf-empty>
-		<!--页面加载动画-->
-		<rf-loading v-if="loading"></rf-loading>
-	</view>
-</template>
-
-<script>
-    /**
-     * @des 领取中心
-     *
-     * @author stav stavyan@qq.com
-     * @date 2020-01-13 11:28
-     * @copyright 2019
-     */
-    import {couponList, couponReceive} from "@/api/userInfo";
-    import rfLoadMore from '@/components/rf-load-more/rf-load-more';
-    import moment from '@/common/moment';
-    export default {
-        components: {
-            rfLoadMore
-        },
-        data() {
-            return {
-                couponList: [],
-                type: null,
-                loadingType: 'more',
-                page: 1,
-                loading: true,
-                errorInfo: ''
-            }
-        },
-        filters: {
-            time(val) {
-              return moment(val * 1000).format('YYYY-MM-DD HH:mm')
-            }
-        },
-        onLoad(options) {
-            this.type = options.type;
-            this.initData();
-        },
-        //下拉刷新
-        onPullDownRefresh() {
-            this.page = 1;
-            this.couponList.length = 0;
-            this.getCouponList('refresh');
-        },
-        //加载更多
-        onReachBottom() {
-            this.page++;
-            this.getCouponList();
-        },
-        methods: {
-            // 数据初始化
-            initData() {
-                this.getCouponList();
-            },
-            //获取收货地址列表
-            async getCouponList(type) {
-                await this.$http.get(`${couponList}`, {
-                    page: this.page
-                }).then(r => {
-                    this.loading = false;
-                    if (type === 'refresh') {
-                        uni.stopPullDownRefresh();
-                    }
-                    this.loadingType = r.data.length === 10 ? 'more' : 'nomore';
-                    this.couponList = [...this.couponList, ...r.data];
-                }).catch(err => {
-                    this.couponList.length = 0;
-                    this.errorInfo = err;
-                    this.loading = false;
-                    if (type === 'refresh') {
-                        uni.stopPullDownRefresh();
-                    }
-                })
-            },
-            // 获取优惠券
-            async getCoupon(item) {
-                if (this.type) return;
-                // 优惠券是否可领取 is_get 0 不可领取
-                if (parseInt(item.is_get, 10) === 0) {
-                    this.$mHelper.toast('该优惠券不可领取');
-                    return;
-                }
-                await this.$http.post(`${couponReceive}`, {
-                    id: item.id
-                }).then(() => {
-                    this.$mHelper.toast('领取成功');
-                    this.loading = true;
-                    this.page = 1;
-                    this.couponList.length = 0;
-                    this.getCouponList();
-                })
-            }
-        }
-    }
-</script>
-<style lang='scss'>
-</style>

Plik diff jest za duży
+ 0 - 85
src/pages/user/footprint/footprint.vue


+ 0 - 196
src/pages/user/money/pay.vue

@@ -1,196 +0,0 @@
-<template>
-	<view class="app">
-		<view class="price-box">
-			<text>支付金额</text>
-			<text class="price">{{ money }}</text>
-		</view>
-		<view class="pay-type-list">
-			<view class="type-item b-b" @tap="changePayType(1)" v-if="parseInt(payTypeList.order_wechat_pay, 10) === 1">
-				<i class="iconfont icon iconweixinzhifu"></i>
-				<view class="con">
-					<text class="tit">微信支付</text>
-					<text>推荐使用微信支付</text>
-				</view>
-				<label class="radio">
-					<radio value="" color="#fa436a" :checked='payType == 1'/>
-				</label>
-			</view>
-			<view class="type-item b-b" @tap="changePayType(2)" v-if="parseInt(payTypeList.order_ali_pay, 10) === 1">
-				<i class="iconfont icon iconalipay"></i>
-				<view class="con">
-					<text class="tit">支付宝支付</text>
-					<text>推荐使用支付宝支付</text>
-				</view>
-				<label class="radio">
-					<radio value="" color="#fa436a" :checked='payType == 2'/>
-				</label>
-			</view>
-			<view class="type-item" @tap="changePayType(5)" v-if="parseInt(payTypeList.order_balance_pay, 10) === 1">
-				<i class="iconfont icon iconerjiye-yucunkuan"></i>
-				<view class="con">
-					<text class="tit">预存款支付</text>
-					<text>可用余额 {{ userInfo && userInfo.account && userInfo.account.user_money }}</text>
-				</view>
-				<label class="radio">
-					<radio value="" color="#fa436a" :checked='payType === 5'/>
-				</label>
-			</view>
-		</view>
-		<button class="confirm-btn" :disabled="btnLoading" :loading="btnLoading" @tap="confirm">确认支付</button>
-	</view>
-</template>
-
-<script>
-    import {orderPay} from "@/api/product";
-    import {orderDetail} from "@/api/userInfo";
-    import {configList} from "@/api/basic";
-    export default {
-        data() {
-            return {
-                payType: 5,
-                payTypeList: {},
-                money: 0,
-                userInfo: {},
-                orderDetail: {},
-                orderInfo: {},
-                btnLoading: false
-            };
-        },
-        computed: {},
-        onLoad(options) {
-            this.initData(options);
-        },
-        methods: {
-            // 数据初始化
-            async initData(options) {
-                this.orderInfo.order_id = parseInt(options.id, 10);
-                this.getPayTypeList();
-                this.getOrderDetail(options.id);
-                this.userInfo = uni.getStorageSync('userInfo') || undefined;
-                // #ifdef H5
-		            if (uni.getSystemInfoSync().platform === 'android') await this.$mPayment.wxConfigH5();
-				        // #endif
-            },
-            //选择支付方式
-            changePayType(type) {
-                this.payType = type;
-            },
-            // 获取订单费用
-            async getOrderDetail(id) {
-                await this.$http.get(`${orderDetail}`, {
-                    id, // 订单id
-                    simplify: 1 // 获取简化订单详情
-                }).then(r => {
-                    this.money = r.data.pay_money
-                });
-            },
-            // 获取支付类型列表
-            async getPayTypeList() {
-                await this.$http.get(`${configList}`, {
-                    field: 'order_balance_pay,order_wechat_pay,order_ali_pay'
-                }).then(r => {
-                    this.payTypeList = r.data
-                });
-            },
-            //确认支付
-            async confirm() {
-                this.btnLoading = true;
-                switch (parseInt(this.payType)) {
-                  case 1:
-                    this.$mPayment.weixinPay('order', JSON.stringify(this.orderInfo));
-                    break;
-                  case 2:
-                    this.$mPayment.aliPay('order', JSON.stringify(this.orderInfo));
-                    break;
-                  case 5:
-                    this.$mPayment.balancePay(JSON.stringify(this.orderInfo));
-                    break;
-                }
-                setTimeout(() => {
-                	this.btnLoading = false;
-                }, 0.5 * 1000)
-            }
-        }
-    }
-</script>
-
-<style lang='scss'>
-	page {
-		background-color: $color-white;
-	}
-
-	.app {
-		width: 100%;
-	}
-
-	.price-box {
-		background-color: #fff;
-		height: 265upx;
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-		font-size: 28upx;
-		color: #909399;
-
-		.price {
-			font-size: 50upx;
-			color: #303133;
-			margin-top: 12upx;
-
-			&:before {
-				content: '¥';
-				font-size: 40upx;
-			}
-		}
-	}
-
-	.pay-type-list {
-		margin-top: 20upx;
-		background-color: #fff;
-		padding-left: 60upx;
-
-		.type-item {
-			height: 120upx;
-			padding: 20upx 0;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			padding-right: 60upx;
-			font-size: 30upx;
-			position: relative;
-		}
-
-		.icon {
-			width: 100upx;
-			font-size: 52upx;
-		}
-
-		.iconerjiye-yucunkuan {
-			color: #fe8e2e;
-		}
-
-		.iconweixinzhifu {
-			color: #36cb59;
-		}
-
-		.iconalipay {
-			color: #01aaef;
-		}
-
-		.tit {
-			font-size: $font-lg;
-			color: $font-color-dark;
-			margin-bottom: 4upx;
-		}
-
-		.con {
-			flex: 1;
-			display: flex;
-			flex-direction: column;
-			font-size: $font-sm;
-			color: $font-color-light;
-		}
-	}
-
-</style>

+ 0 - 62
src/pages/user/money/success.vue

@@ -1,62 +0,0 @@
-<template>
-	<view class="content">
-		<i class="iconfont success-icon iconxuanzhong2"></i>
-		<text class="tit">支付成功</text>
-
-		<view class="btn-group">
-			<navigator url="/pages/order/order?state=1" open-type="redirect" class="mix-btn">查看订单</navigator>
-			<navigator url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-
-			}
-		},
-		methods: {
-
-		}
-	}
-</script>
-
-<style lang='scss'>
-	.content{
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-	}
-	.success-icon{
-		font-size: 160upx;
-		color: #fa436a;
-		margin-top: 100upx;
-	}
-	.tit{
-		font-size: 38upx;
-		color: #303133;
-	}
-	.btn-group{
-		padding-top: 100upx;
-	}
-	.mix-btn {
-		margin-top: 30upx;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		width: 600upx;
-		height: 80upx;
-		font-size: $font-lg;
-		color: #fff;
-		background-color: $base-color;
-		border-radius: 10upx;
-		&.hollow{
-			background: #fff;
-			color: #303133;
-			border: 1px solid #ccc;
-		}
-	}
-</style>

+ 0 - 644
src/pages/user/user.vue

@@ -1,644 +0,0 @@
-<template>
-	<view class="user">
-		<!--头部-->
-		<view class="user-section">
-			<image class="bg" :src="userBg"></image>
-			<!--用户信息-->
-			<view class="user-info-box">
-				<view
-					class="portrait-box"
-					@tap="navTo(userInfo ? '/pages/user/userinfo/userinfo' : 'login')"
-				>
-					<image
-						class="portrait"
-						:src="userInfo.head_portrait || headImg"
-					></image>
-					<text class="username" v-if="hasLogin">
-						{{
-							userInfo.nickname ||
-							userInfo.realname ||
-							'暂无昵称'
-						}}
-					</text>
-					<text class="username" v-else>登录/注册</text>
-				</view>
-			</view>
-			<!--vip信息-->
-			<view class="vip-card-box">
-				<image class="card-bg" :src="vipCardBg"></image>
-				<view class="tit">
-					<i class="iconfont iconiLinkapp-"/>
-					欢迎来到RageFrame微商城
-				</view>
-				<text class="e-m">RageFrame 版权所有</text>
-			</view>
-		</view>
-		<!-- 个人中心 内容区-->
-		<view
-				class="cover-container"
-				:style="[{
-				transform: coverTransform,
-				transition: coverTransition
-			}]"
-				@touchstart="coverTouchstart"
-				@touchmove="coverTouchmove"
-				@touchend="coverTouchend"
-		>
-			<image class="arc" :src="arc"></image>
-
-			<!--余额 优惠券 积分信息-->
-			<view class="promotion-center">
-				<list-cell icon="iconwallett" iconColor="#e07472" @eventClick="navTo('/pages/user/account/account')"
-				           title="我的账户"></list-cell>
-				<view class="tj-sction">
-					<view class="tj-item" v-for="item in amountList" :key="item.title" @tap="navTo(item.url)">
-						<text class="num" :class="item.value > 0 ? 'red' : ''">
-							{{ item.value }}
-						</text>
-						<text>{{ item.title }}</text>
-					</view>
-				</view>
-			</view>
-
-			<!-- 我的订单 -->
-			<view class="promotion-center">
-				<list-cell icon="iconfapiaoguanli" iconColor="#e07472"
-				           @eventClick="navTo(`/pages/index/search/search?keyword=搜索我的订单&type=order`)" title="搜索订单"></list-cell>
-				<view class="order-section">
-					<view
-							class="order-item"
-							v-for="item in orderSectionList"
-							:key="item.title"
-							@tap="navTo(item.url)"
-							hover-class="common-hover"
-							:hover-stay-time="50">
-						<i class="iconfont" :class="item.icon"/>
-						<text>{{ item.title }}</text>
-						<rf-badge type="error" size="small" class="badge" :text="item.num"></rf-badge>
-					</view>
-				</view>
-			</view>
-
-			<!-- 浏览历史 -->
-			<view class="history-section">
-				<list-cell icon="iconlishijilu" iconColor="#5eba8f" @eventClick="navTo('/pages/user/footprint/footprint')"
-				           title="我的足迹"></list-cell>
-				<view v-if="hasLogin">
-					<scroll-view scroll-x class="h-list" v-if="footPrintList.length > 0">
-						<view class="h-item" v-for="item in footPrintList" :key="item.id">
-							<image class="h-item-img" @tap.stop="navTo(`/pages/product/product?id=${item.product.id}`)"
-							       :src="item.product.picture" mode="aspectFill"></image>
-						<view class="h-item-text in2line">{{ item.product.name }}</view>
-						</view>
-					</scroll-view>
-					<view class="no-foot-print" v-else-if="footPrintList.length === 0" @tap="navTo('/pages/product/list')">
-						<i class="iconfont iconshare no-foot-print-icon"/>
-						先去浏览一些吧~
-					</view>
-				</view>
-				<view class="no-foot-print" v-else @tap="navTo('/pages/user/footprint/footprint')">
-					<i class="iconfont iconmima no-foot-print-icon"/>
-					登陆后查看
-				</view>
-			</view>
-
-			<!--设置中心-->
-			<view class="promotion-center">
-				<list-cell icon="iconshezhi1" iconColor="#e07472" @eventClick="navTo('/pages/set/set')"
-				           title="设置中心"></list-cell>
-				<view class="tj-sction">
-
-					<!-- 分类列表 -->
-					<view class="category-list">
-						<view
-								class="category"
-								v-for="(item, index) in settingList"
-								:key="index"
-								@tap.stop="navTo(item.url)"
-						>
-							<view v-if="item.title!=='分享'">
-								<view class="img">
-									<text class="iconfont" :style="{color: item.color}" :class="item.icon"></text>
-								</view>
-								<view class="text">{{ item.title }}</view>
-							</view>
-							<button class="share-btn" open-type="share" @tap.tap="shareToH5" v-else>
-								<view class="img">
-									<text class="iconfont" :style="{color: item.color}" :class="item.icon"></text>
-								</view>
-								<view class="text">{{ item.title }}</view>
-							</button>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<!--页面加载动画-->
-		<rf-loading v-if="loading"></rf-loading>
-	</view>
-</template>
-<script>
-    /**
-     * @des 个人中心
-     *
-     * @author stav stavyan@qq.com
-     * @date 2020-01-10 11:41
-     * @copyright 2019
-     */
-    import {footPrintList, memberInfo} from '@/api/userInfo';
-    import listCell from '@/components/rf-list-cell';
-    import {mapMutations} from 'vuex';
-    import rfBadge from '@/components/rf-badge/rf-badge'
-    let startY = 0, moveY = 0, pageAtTop = true;
-    export default {
-        components: {
-            listCell,
-            rfBadge
-        },
-        data() {
-            return {
-                settingList: this.$mConstDataConfig.settingList,
-                orderSectionList: this.$mConstDataConfig.orderSectionList,
-                amountList: this.$mConstDataConfig.amountList,
-                headImg: this.$mAssetsPath.headImg,
-                vipCardBg: this.$mAssetsPath.vipCardBg,
-                arc: this.$mAssetsPath.arc,
-                userBg: this.$mAssetsPath.userBg,
-                coverTransform: 'translateY(0px)',
-                coverTransition: '0s',
-                moving: false,
-                userInfo: { // 用户信息
-                    promoter: null  // 分销商信息
-                },
-                footPrintList: [], // 足迹列表
-                loading: true,
-		            hasLogin: false
-            }
-        },
-        // 小程序分享
-        onShareAppMessage() {
-            return {
-                title: '欢迎来到RageFrame商城',
-                path: '/pages/index/index'
-            }
-        },
-        async onShow() {
-            // 初始化数据
-            this.initData();
-        },
-        // #ifndef MP
-        onNavigationBarButtonTap(e) {
-            const index = e.index;
-            if (index === 0) {
-                this.navTo('/pages/set/set');
-            } else if (index === 1) {
-                // #ifdef APP-PLUS
-                const pages = getCurrentPages();
-                const page = pages[pages.length - 1];
-                const currentWebview = page.$getAppWebview();
-                currentWebview.hideTitleNViewButtonRedDot({
-                    index
-                });
-                // #endif
-                this.$mRouter.push({route: '/pages/index/notice/notice'});
-            }
-        },
-        // #endif
-        methods: {
-            // h5分享
-            shareToH5() {
-                // #ifdef H5
-                this.$mHelper.toast('请复制连接进行分享');
-                // #endif
-            },
-            ...mapMutations(['login']),
-            // 数据初始化
-            async initData() {
-            	this.hasLogin = this.$mStore.getters.hasLogin;
-                if (this.hasLogin) {
-                    await this.getMemberInfo();
-                } else {
-                    this.loading = false;
-                    this.resetSectionData();
-                }
-            },
-            // 设置购物车数量角标
-            async initCartItemCount() {
-							if (parseInt(uni.getStorageSync('cartNum'), 10) > 0) {
-                await uni.setTabBarBadge({
-                  index: this.$mConstDataConfig.cartIndex,
-                  text: uni.getStorageSync('cartNum')
-                });
-							} else {
-                uni.removeStorageSync('cartNum');
-                uni.removeTabBarBadge({index: this.$mConstDataConfig.cartIndex});
-							}
-            },
-            // 获取用户信息
-            async getMemberInfo() {
-                await this.$http.get(memberInfo).then(async r => {
-                    this.loading = false;
-                    this.userInfo = r.data;
-                    await uni.setStorageSync('cartNum', r.data.cart_num);
-                    // 获取足迹列表
-                    await this.getFootPrintList();
-                    await this.setSectionData(r.data);
-                    await this.initCartItemCount();
-                }).catch(() => {
-                	  this.hasLogin = false;
-                	  this.userInfo = {};
-                    this.resetSectionData();
-                    this.loading = false;
-                });
-            },
-            // 清空个人中心的各模块状态
-            resetSectionData() {
-                uni.removeTabBarBadge({index: this.$mConstDataConfig.cartIndex});
-                this.amountList[0].value = 0;
-                this.amountList[1].value = 0;
-                this.amountList[2].value = 0;
-                this.orderSectionList[0].num = 0;
-                this.orderSectionList[1].num = 0;
-                this.orderSectionList[2].num = 0;
-                this.orderSectionList[3].num = 0;
-                this.orderSectionList[4].num = 0;
-            },
-            // 给个人中心的各模块赋值
-            setSectionData(data) {
-                const orderSynthesizeNumArr = [];
-                for (let item in data.order_synthesize_num) {
-                    orderSynthesizeNumArr.push(data.order_synthesize_num[item])
-                }
-                for (let i = 0; i < this.orderSectionList.length; i++) {
-                    this.orderSectionList[i].num = orderSynthesizeNumArr[i].toString();
-                }
-                this.amountList[0].value = data.account.user_money || 0;
-                this.amountList[1].value = data.coupon_num || 0;
-                this.amountList[2].value = data.account.user_integral || 0;
-                // 更新userInfo缓存
-                uni.setStorageSync('userInfo', data);
-            },
-            // 获取足迹列表
-            async getFootPrintList() {
-                await this.$http.get(`${footPrintList}`).then(r => {
-                    this.footPrintList = r.data
-                });
-            },
-            // 统一跳转接口,拦截未登录路由
-            navTo(route) {
-                if (!route) {
-                    return;
-                }
-                if (!this.hasLogin) {
-                    uni.showModal({
-                        content: '你暂未登陆,是否跳转登录页面?',
-                        success: (confirmRes) => {
-                            if (confirmRes.confirm) {
-                                this.$mRouter.push({route: '/pages/public/login'});
-                            }
-                        }
-                    });
-                } else {
-                    this.$mRouter.push({route});
-                }
-            },
-            /**
-             *  会员卡下拉和回弹
-             *  1.关闭bounce避免ios端下拉冲突
-             *  2.由于touchmove事件的缺陷(以前做小程序就遇到,比如20跳到40,h5反而好很多),下拉的时候会有掉帧的感觉
-             *    transition设置0.1秒延迟,让css来过渡这段空窗期
-             *  3.回弹效果可修改曲线值来调整效果,推荐一个好用的bezier生成工具 http://cubic-bezier.com/
-             */
-            coverTouchstart(e) {
-                if (pageAtTop === false) {
-                    return;
-                }
-                this.coverTransition = 'transform .1s linear';
-                startY = e.touches[0].clientY;
-            },
-            coverTouchmove(e) {
-                moveY = e.touches[0].clientY;
-                let moveDistance = moveY - startY;
-                if (moveDistance < 0) {
-                    this.moving = false;
-                    return;
-                }
-                this.moving = true;
-                if (moveDistance >= 80 && moveDistance < 100) {
-                    moveDistance = 80;
-                }
-                if (moveDistance > 0 && moveDistance <= 80) {
-                    this.coverTransform = `translateY(${moveDistance}px)`;
-                }
-            },
-            coverTouchend() {
-                if (this.moving === false) {
-                    return;
-                }
-                this.moving = false;
-                this.coverTransition = 'transform 0.3s cubic-bezier(.21,1.93,.53,.64)';
-                this.coverTransform = 'translateY(0px)';
-            }
-        }
-    }
-</script>
-<style lang='scss' scoped>
-	page {
-		background-color: $page-color-base;
-	}
-
-	.user {
-		.user-section {
-			background-color: $page-color-base;
-			height: 520upx;
-			padding: 100upx 30upx 0;
-			position: relative;
-
-			.bg {
-				position: absolute;
-				left: 0;
-				top: 0;
-				width: 100%;
-				height: 100%;
-				filter: blur(1px);
-				opacity: .7;
-			}
-
-			.user-info-box {
-				height: 180upx;
-				display: flex;
-				align-items: center;
-				position: relative;
-				z-index: 1;
-				justify-content: space-between;
-
-				.portrait-box {
-					display: flex;
-					align-items: center;
-
-					.portrait {
-						width: 130upx;
-						height: 130upx;
-						border: 5upx solid #fff;
-						border-radius: 50%;
-					}
-
-					.username {
-						font-size: $font-lg + 6upx;
-						color: $color-white;
-						margin-left: 20upx;
-					}
-
-					button {
-						background-color: transparent;
-						font-size: $font-lg + 6upx;
-						color: $font-color-dark;
-						border: none;
-					}
-
-					button::after {
-						border: none;
-					}
-				}
-			}
-
-			.vip-card-box {
-				display: flex;
-				flex-direction: column;
-				color: #f7d680;
-				height: 240upx;
-				background: linear-gradient(to left, rgba(0, 0, 0, .7), rgba(0, 0, 0, .8));
-				border-radius: 16upx 16upx 0 0;
-				overflow: hidden;
-				position: relative;
-				padding: 20upx 24upx;
-
-				.card-bg {
-					position: absolute;
-					top: 20upx;
-					right: 0;
-					width: 380upx;
-					height: 260upx;
-				}
-
-				.tit {
-					font-size: $font-base+2upx;
-					color: #f7d680;
-					margin-bottom: 28upx;
-
-					.iconfont {
-						color: #f6e5a3;
-						display: inline-block;
-						margin-right: 16upx;
-					}
-				}
-			}
-		}
-
-		.cover-container {
-			margin-top: -150upx;
-			padding: 0 30upx 20upx;
-			position: relative;
-			background-color: $page-color-base;
-
-			.arc {
-				position: absolute;
-				left: 0;
-				top: -34upx;
-				width: 100%;
-				height: 36upx;
-			}
-
-			.promotion-center {
-				background: #fff;
-				margin: 20upx 0;
-				/*分类列表*/
-				.category-list {
-					width: 100%;
-					padding: 0 0 30upx 0;
-					border-bottom: solid 2upx #f6f6f6;
-					display: flex;
-					flex-wrap: wrap;
-
-					.category {
-						width: 33.3%;
-						margin-top: 50upx;
-						display: flex;
-						justify-content: center;
-						flex-wrap: wrap;
-
-						.img {
-							width: 100%;
-							display: flex;
-							justify-content: center;
-
-							.iconfont {
-								font-size: $font-lg + 24upx;
-							}
-						}
-
-						.text {
-							width: 100%;
-							display: flex;
-							justify-content: center;
-							font-size: 24upx;
-							color: #3c3c3c;
-						}
-
-						.share-btn {
-							height: 142upx;
-							text-align: left;
-							background: none;
-							padding: 0;
-							margin: 0;
-						}
-
-						.share-btn:after {
-							border: none;
-							border-radius: none;
-						}
-					}
-				}
-			}
-
-			.tj-sction {
-				@extend %section;
-				display: flex;
-
-				.tj-item {
-					@extend %flex-center;
-					flex: 1;
-					flex-direction: column;
-					margin: 30upx 0;
-					font-size: $font-sm;
-					color: #75787d;
-					/*border-right: 2upx solid rgba(0, 0, 0, 0.2);*/
-				}
-
-				/*.tj-item:last-child {*/
-				/*border-right: none;*/
-				/*}*/
-				.num {
-					font-size: $font-base;
-					color: $font-color-dark;
-				}
-
-				.red {
-					color: $base-color;
-				}
-			}
-
-			.order-section {
-				@extend %section;
-				padding: 28upx 0;
-
-				.order-item {
-					@extend %flex-center;
-					width: 120upx;
-					height: 120upx;
-					border-radius: 10upx;
-					font-size: $font-sm;
-					color: $font-color-dark;
-					position: relative;
-				}
-
-				.badge {
-					position: absolute;
-					top: 0;
-					right: 4upx;
-				}
-
-				.iconfont {
-					font-size: 48upx;
-					color: #fa436a;
-				}
-
-				.icon-shouhoutuikuan {
-					font-size: 44upx;
-				}
-			}
-
-			.history-section {
-				background: #fff;
-				border-radius: 10upx;
-				.sec-header {
-					display: flex;
-					align-items: center;
-					font-size: $font-base;
-					color: $font-color-dark;
-					.iconfont {
-						color: #5eba8f;
-						margin-right: 16upx;
-						line-height: 40upx;
-					}
-					.content {
-						flex: 1;
-					}
-					.iconyou {
-						font-size: $font-base + 2upx;
-						color: $font-color-base;
-						margin-left: $uni-spacing-row-sm;
-					}
-				}
-				.h-list {
-					white-space: nowrap;
-					padding: 20upx 30upx 0;
-					.h-item {
-						display: inline-block;
-						font-size: $font-sm;
-						color: $font-color-base;
-						width: 160upx;
-						margin-right: 20upx;
-						border-radius: 10upx;
-						.h-item-img {
-							width: 160upx;
-							height: 160upx;
-						}
-						.h-item-text {
-							font-size: $font-sm;
-						}
-					}
-				}
-
-				.no-foot-print {
-					text-align: center;
-					padding: 48upx 0;
-
-					.no-foot-print-icon {
-						color: $base-color;
-						font-size: $font-lg + 2upx;
-						margin-right: 10upx;
-					}
-				}
-
-				.share-btn {
-					height: 102upx;
-					text-align: left;
-					background: none;
-					padding: 0;
-					margin: 0;
-				}
-
-				.share-btn:after {
-					border: none;
-					border-radius: none;
-				}
-			}
-		}
-	}
-
-	%flex-center {
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-	}
-
-	%section {
-		justify-content: space-around;
-		display: flex;
-		align-content: center;
-		background: #fff;
-		border-radius: 10upx;
-	}
-</style>

+ 0 - 303
src/pages/user/userinfo/userinfo.vue

@@ -1,303 +0,0 @@
-<template>
-	<view class="userinfo">
-		<!--头像 + 背景-->
-		<view class="user-section">
-			<image class="bg" :src="userBg"></image>
-			<text class="bg-upload-btn yticon icon-paizhao"></text>
-      <!--#ifdef H5-->
-			<!--h5直接上传头像-->
-			<view class="portrait-box" @tap="uploadImage">
-				<image class="portrait" :src="profileInfo.head_portrait || headImg"></image>
-			</view>
-      <!-- #endif -->
-			<!--#ifndef H5-->
-			<!--非h5裁剪头像上传-->
-			<view class="portrait-box">
-        <avatar
-					canRotate="false"
-          selWidth="200px" selHeight="400upx" @upload="handleUploadFile" :avatarSrc="profileInfo.head_portrait || headImg"
-          avatarStyle="width: 200upx; height: 200upx; border-radius: 100%; border: 6upx solid #fff;">
-        </avatar>
-			</view>
-      <!-- #endif -->
-		</view>
-		<view class="input-content">
-				<view class="input-item">
-					<text class="tit">手机号</text>
-					<input
-						type="number"
-						v-model="profileInfo.mobile"
-						disabled
-						placeholder="请输入手机号码"
-					/>
-				</view>
-				<view class="input-item">
-					<text class="tit">昵 称</text>
-					<input
-						type="text"
-						v-model="profileInfo.nickname"
-						placeholder="请输入您的昵称"
-					/>
-				</view>
-				<view class="input-item">
-					<text class="tit">姓 名</text>
-					<input
-						type="text"
-						v-model="profileInfo.realname"
-						placeholder="请输入您的姓名"
-					/>
-				</view>
-				<view class="input-item">
-					<text class="tit">性 别</text>
-					<radio-group @change="handleGenderChange">
-						<label class="gender-item" v-for="(item, index) in genders" :key="index">
-							<radio class="gender-item-radio" color="#fa436a" :value="item.value" :checked="item.value === profileInfo.gender" />
-							<text class="gender-item-text">{{ item.name }}</text>
-						</label>
-					</radio-group>
-				</view>
-				<view class="input-item">
-					<text class="tit">生 日</text>
-					<picker mode="date" v-model="date" @change="bindDateChange">
-						<view class="date" style="background: none;">{{ date || '请选择日期' }}</view>
-					</picker>
-				</view>
-				<view class="input-item">
-					<text class="tit">Q Q</text>
-					<input
-						type="number"
-						v-model="profileInfo.qq"
-						placeholder="请输入您的QQ"
-					/>
-				</view>
-				<view class="input-item">
-					<text class="tit">邮 箱</text>
-					<input
-						v-model="profileInfo.email"
-						placeholder="请输入您的邮箱"
-					/>
-				</view>
-				<button class="confirm-btn" :disabled="btnLoading" :loading="btnLoading" @tap="toUpdateInfo">修改资料</button>
-		</view>
-
-		<!--加载动画-->
-		<rf-loading v-if="loading"></rf-loading>
-
-    <!--进度条加载-->
-		<rf-load-progress :height="CustomBar" :progress="loadProgress"></rf-load-progress>
-	</view>
-</template>
-
-<script>
-	/**
-	 * @des 修改用户信息
-	 *
-	 * @author stav stavyan@qq.com
-	 * @date 2020-01-10 14:28
-	 * @copyright 2019
-	 */
-	import {memberInfo, memberUpdate, uploadImage} from '@/api/userInfo';
-	import avatar from '@/components/rf-avatar/rf-avatar';
-	import moment from '@/common/moment';
-	export default {
-		components: { avatar },
-		data() {
-			return {
-				loadProgress: 0,
-				CustomBar: this.CustomBar,
-				profileInfo: {},
-				genders: [
-					{
-						value: '0',
-						name: '未知'
-					},
-					{
-						value: '1',
-						name: '男'
-					},
-					{
-						value: '2',
-						name: '女'
-					}],
-				date: moment().format('YYYY-MM-DD'),
-				token: null,
-				loading: true,
-				headImg: this.$mAssetsPath.headImg,
-				userBg: this.$mAssetsPath.userBg,
-				btnLoading: false
-			};
-		},
-		onLoad () {
-			this.initData()
-		},
-		methods: {
-			// 上传头像
-			uploadImage () {
-				// 从相册选择图片
-				const _this = this;
-				uni.chooseImage({
-					count: 1,
-					sizeType: ['original', 'compressed'],
-					sourceType: ['album'],
-					success: function(res) {
-						_this.handleUploadFile(res.tempFilePaths);
-					}
-				});
-			},
-			// 上传头像
-			handleUploadFile (data) {
-				const _this = this;
-		    let filePath = data.path || data[0];
-        _this.$http.upload(uploadImage, {filePath, name: 'file'}).then(r => {
-							_this.profileInfo.head_portrait = r.data.url;
-							_this.handleUpdateInfo(_this.profileInfo);
-        });
-			},
-			// 监听日期更改
-			bindDateChange(e) {
-				this.date = e.target.value
-			},
-			// 监听性别更改
-			handleGenderChange (e) {
-		    this.profileInfo.gender = e.detail.value;
-			},
-			// 数据初始化
-			initData(){
-		    this.token = uni.getStorageSync('accessToken') || undefined;
-				this.getMemberInfo()
-			},
-			// 获取用户信息
-			async getMemberInfo () {
-				await this.$http.get(memberInfo).then(r => {
-			    this.loading = false;
-					this.profileInfo = r.data;
-					this.date = this.profileInfo.birthday;
-				}).catch(() => {
-			    this.loading = false;
-				})
-			},
-			// 更新用户信息
-			async toUpdateInfo(){
-				this.handleUpdateInfo();
-			},
-			// 更新用户信息
-			async handleUpdateInfo () {
-				this.btnLoading = true;
-				this.loadProgress = this.loadProgress + 6;
-		    const timer = setInterval(() => {
-					this.loadProgress = this.loadProgress + 6;
-		    }, 50);
-				await this.$http.put(`${memberUpdate}?id=${this.profileInfo.id}`, {
-					...this.profileInfo,
-					birthday: this.date
-				}).then(() =>{
-				    clearInterval(timer);
-						this.loadProgress = 0;
-				    this.$mHelper.toast('恭喜您, 资料修改成功!');
-				    setTimeout(() => {
-					    this.$mRouter.back();
-				    }, 1 * 1000);
-				}).catch(() => {
-					this.btnLoading = false;
-				});
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	page {
-		background-color: $color-white;
-	}
-	.userinfo{
-		.user-section{
-			display:flex;
-			align-items:center;
-			justify-content: center;
-			height: 300upx;
-			padding: 40upx 30upx 0;
-			overflow: hidden;
-			position:relative;
-			.bg{
-				position:absolute;
-				left: 0;
-				top: 0;
-				width: 100%;
-				height: 100%;
-				filter: blur(1px);
-				opacity: .7;
-			}
-			.portrait-box{
-				clear: both;
-				z-index: 2;
-			}
-			.portrait{
-				position: relative;
-				width: 200upx;
-				height: 200upx;
-				border-radius: 50%;
-	      border: 6upx solid #fff;
-			}
-			.yticon{
-				position:absolute;
-				line-height: 1;
-				z-index: 5;
-				font-size: 48upx;
-				color: #fff;
-				padding: 4upx 6upx;
-				border-radius: 6upx;
-				background: rgba(0,0,0,.4);
-			}
-			.pt-upload-btn{
-				right: 0;
-				bottom: 10upx;
-			}
-			.bg-upload-btn{
-				right: 20upx;
-				bottom: 16upx;
-			}
-		}
-		.input-content{
-			padding: 40upx 60upx;
-			.input-item{
-				display:flex;
-				padding: 0 30upx;
-				background: $page-color-light;
-				height: 80upx;
-				line-height: 80upx;
-				border-radius: 4px;
-				margin-bottom: 30upx;
-				&:last-child{
-					margin-bottom: 0;
-				}
-				.tit{
-					width: 90upx;
-					font-size: $font-sm+2upx;
-					color: $font-color-base;
-				}
-				input {
-					height: 80upx;
-					line-height: 80upx;
-					font-size: $font-base + 2upx;
-					color: $font-color-dark;
-				}
-				.date {
-					height: 80upx;
-					line-height: 80upx;
-					font-size: $font-base + 2upx;
-					color: $font-color-dark;
-				}
-				.gender-item {
-					margin-right: 20upx;
-					.gender-item-text {
-						padding: 0 5upx;
-					}
-					radio .wx-radio-input.wx-radio-input-checked {
-						background: $uni-color-primary;
-						border-color: $uni-color-primary;
-					}
-				}
-			}
-		}
-	}
-</style>

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików