hwq 3 years ago
parent
commit
40128556c3

+ 38 - 19
api/user.js

@@ -16,17 +16,24 @@ import Cache from '@/utils/cache'
 export function getUserInfo() {
 	return request.get('user');
 }
+/**
+ * 转账积分
+ * 
+ */
+export function jfzz(data) {
+	return request.post('user/accounts', data);
+}
 /**
  * 头像
  * 
  */
 export function editAvatar(data) {
-	return request.post('user/change/info',data);
+	return request.post('user/change/info', data);
 }
 
 // 修改昵称
 export function updateInfo(data) {
-	return request.post('user/change/avatar',data);
+	return request.post('user/change/avatar', data);
 }
 /**
  * h5用户登录
@@ -105,7 +112,9 @@ export function registerForget(data) {
  *
  */
 export function getMenuList() {
-	return request.get("common/menus",{},{noAuth: true});
+	return request.get("common/menus", {}, {
+		noAuth: true
+	});
 }
 /*
  * 签到用户信息
@@ -368,7 +377,8 @@ export function getRechargeApi() {
  * 登陆记录
  */
 export function setVisit(data) {
-	return request.post('user/set_visit', { ...data
+	return request.post('user/set_visit', {
+		...data
 	}, {
 		noAuth: true
 	});
@@ -392,7 +402,7 @@ export function serviceLogin(key, data) {
  * 客服获取客户列表
  */
 export function serviceUserList(mer_id, data) {
-	return request.get("service/user_list/"+mer_id, data);
+	return request.get("service/user_list/" + mer_id, data);
 }
 
 /**
@@ -431,7 +441,8 @@ export function feedbackType() {
  * 提交反馈
  */
 export function feedback(data) {
-	return request.post("user/feedback", { ...data
+	return request.post("user/feedback", {
+		...data
 	});
 }
 
@@ -540,13 +551,15 @@ export function spreadMsg(data) {
  */
 export function imgToBase(data) {
 	return request.post('common/base64', data);
-}
+}
 /**
  * 获取协议
  * 
  */
 export function getAgreementApi(key) {
-	return request.get('agreement/'+key,{},{noAuth: true});
+	return request.get('agreement/' + key, {}, {
+		noAuth: true
+	});
 }
 /**
  * 获取协议
@@ -619,25 +632,29 @@ export function memberInfo() {
  */
 export function growthValueRecord(data) {
 	return request.get('user/member/log', data)
-}
-
+}
+
 /**
  * 协议规则列表
  * @param object data
  * 
  */
 export function cacheLst() {
-	return request.get('agreement_lst',{}, {noAuth: true})
-}
-
+	return request.get('agreement_lst', {}, {
+		noAuth: true
+	})
+}
+
 /**
  * 协议规则列表对应的数据
  * @param object data
  * 
  */
 export function cacheInfo(key) {
-	return request.get(`agreement/${key}`,{}, {noAuth: true})
-}
+	return request.get(`agreement/${key}`, {}, {
+		noAuth: true
+	})
+}
 /**
  * 注销账户
  * @param object data
@@ -645,7 +662,7 @@ export function cacheInfo(key) {
  */
 export function userOut(data) {
 	return request.post(`user/cancel`, data)
-}
+}
 /**
  * 获取聊天用户信息
  * @param object data
@@ -653,12 +670,14 @@ export function userOut(data) {
  */
 export function serviceUser(merId, uid) {
 	return request.get(`service/user/${merId}/${uid}`)
-}
+}
 /**
  * 保存聊天用户备注
  * @param object data
  * 
  */
 export function serviceSaveMark(merId, uid, mark) {
-	return request.post(`service/mark/${merId}/${uid}`, {mark})
-}
+	return request.post(`service/mark/${merId}/${uid}`, {
+		mark
+	})
+}

+ 13 - 45
api/wallet.js

@@ -1,9 +1,9 @@
 import request from '@/utils/request'
 
 // 获取用户消费记录
-export function spreadCommission(data,state) {
+export function spreadCommission(data, state) {
 	return request({
-		url: '/api/spread/commission/'+state,
+		url: '/api/spread/commission/' + state,
 		method: 'get',
 		data
 	});
@@ -79,13 +79,9 @@ export function setAliInfo(data) {
 		data
 	});
 }
-// 保存默认银行卡账号
+// 保存银行卡信息
 export function setBankInfo(data) {
-	return request({
-		url: '/api/bank/edit',
-		method: 'post',
-		data
-	});
+	return request.post('user/pay', data)
 }
 
 
@@ -118,64 +114,36 @@ export function pay_list(data) {
 
 
 //充值金额
-export function moneyChong(data){
+export function moneyChong(data) {
 	return request({
-		url:'/api/recharge/index',
-		method:'get',
+		url: '/api/recharge/index',
+		method: 'get',
 		data
 	})
 }
 
 //贡献值查询
 export function getContributionList(data) {
-	return request({
-		url: '/api/contribution_list/list',
-		method: 'get',
-		data
-	})
+	return request.get('user/contribution', data)
 }
 
 //消费券查询
 export function getConsumptionList(data) {
-	return request({
-		url: '/api/consumption_list/list',
-		method: 'get',
-		data
-	})
+	return request.get('user/consumptionBill', data)
 }
 
 //动态积分
 export function getDynamicIntegralList(data) {
-	return request({
-		url: '/api/dynamic_integral_list/list',
-		method: 'get',
-		data
-	})
+	return request.get("user/dynamicBill", data)
 }
 
 //	积分列表
 export function integrallist(data) {
-	return request({
-		url: '/api/integral/list',
-		method: 'get',
-		data
-	});
+	return request.get('user/integralBill', data)
 }
 
-// 保存银行卡信息
-export function setBank(data) {
-	return request({
-		url: '/api/public/pay',
-		method: 'post',
-		data
-	});
-}
 
 // 获取银行卡信息
 export function getBank(data) {
-	return request({
-		url: '/api/public/pay_list',
-		method: 'get',
-		data
-	});
-}
+	return request.get('user/pay_list', data)
+}

+ 46 - 25
main.js

@@ -12,22 +12,42 @@ import App from './App'
 import store from './store'
 import Cache from './utils/cache'
 import util from 'utils/util'
-import { HTTP_REQUEST_URL } from '@/config/app';
+import {
+	HTTP_REQUEST_URL
+} from '@/config/app';
 import skeleton from './components/skeleton/index.vue'
 Vue.component('skeleton', skeleton)
-
+const msg = (title, duration = 1500, mask = false, icon = 'none') => {
+	//统一提示方便全局修改
+	if (Boolean(title) === false) {
+		return;
+	}
+	uni.showToast({
+		title,
+		duration,
+		mask,
+		icon
+	});
+}
+Vue.prototype.$api = {
+	msg
+};
 Vue.prototype.$util = util;
 Vue.prototype.$Cache = Cache;
 Vue.prototype.$eventHub = new Vue();
 Vue.config.productionTip = false
 
 // #ifdef H5
-import { parseQuery } from "./utils";
+import {
+	parseQuery
+} from "./utils";
 import Auth from './libs/wechat';
-import { SPREAD } from './config/cache';
+import {
+	SPREAD
+} from './config/cache';
 // import wx from '@/node_modules/jweixin-module/lib/index'
-var __s = document.createElement('script');
-__s.src=HTTP_REQUEST_URL+"/api/script";
+var __s = document.createElement('script');
+__s.src = HTTP_REQUEST_URL + "/api/script";
 document.head.appendChild(__s);
 Vue.prototype.$wechat = Auth;
 let cookieName = "VCONSOLE",
@@ -48,8 +68,8 @@ if (urlSpread !== undefined) {
 }
 
 if (vconsole !== undefined) {
-  if (vconsole === md5UnCrmeb && Cache.has(cookieName))
-	  Cache.clear(cookieName);
+	if (vconsole === md5UnCrmeb && Cache.has(cookieName))
+		Cache.clear(cookieName);
 } else vconsole = Cache.get(cookieName);
 
 import VConsole from './components/vconsole.min.js'
@@ -57,22 +77,22 @@ import VConsole from './components/vconsole.min.js'
 if (vconsole !== undefined && vconsole === md5Crmeb) {
 	Cache.set(cookieName, md5Crmeb, 3600);
 	let vConsole = new VConsole();
-	
+
 }
-// 注册全局防抖指令
-Vue.directive('debounce',{
-  inserted:(el,binding)=>{
-    let debounceTime = binding.value || 2000
-    let timer
-    el.addEventListener('click',e=>{
-        el.style.pointerEvents = 'none'; 
-        if(!el.disabled){
-          timer = setTimeout(()=>{
-            el.style.pointerEvents = 'auto'
-          },debounceTime)
-        }
-    },true)
-  }
+// 注册全局防抖指令
+Vue.directive('debounce', {
+	inserted: (el, binding) => {
+		let debounceTime = binding.value || 2000
+		let timer
+		el.addEventListener('click', e => {
+			el.style.pointerEvents = 'none';
+			if (!el.disabled) {
+				timer = setTimeout(() => {
+					el.style.pointerEvents = 'auto'
+				}, debounceTime)
+			}
+		}, true)
+	}
 })
 
 // if(!!!Auth.isAndroid() && Auth.isWeixin()){
@@ -86,9 +106,10 @@ Vue.directive('debounce',{
 App.mpType = 'app'
 
 
+
 const app = new Vue({
-    ...App,
+	...App,
 	store,
 	Cache
 })
-app.$mount();
+app.$mount();

+ 9 - 2
pages.json

@@ -49,6 +49,13 @@
 				// #endif
 			}
 		},
+		{
+			"path": "pages/user/xfjfzz",
+			"style": {
+				"navigationBarTitleText": "积分转账"
+
+			}
+		},
 		{
 			"path": "pages/user/mythq",
 			"style": {
@@ -68,9 +75,9 @@
 			}
 		},
 		{
-			"path": "pages/user/favorites",
+			"path": "pages/user/account",
 			"style": {
-				"navigationBarTitleText": "我的收藏"
+				"navigationBarTitleText": "提现账号"
 			}
 		},
 		{

+ 209 - 0
pages/user/account.vue

@@ -0,0 +1,209 @@
+<template>
+	<view class="content">
+		<!-- 	<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view> -->
+		<view class="row b-b">
+			<text class="tit">姓名</text>
+			<input class="input" v-model="name" type="text" placeholder="请输入姓名" placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b">
+			<text class="tit">银行卡号</text>
+			<input class="input" v-model="payment" type="text" placeholder="请输入银行卡号" placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b">
+			<text class="tit">手机号码</text>
+			<input class="input" v-model="phone" type="text" placeholder="请输入手机号码" placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b">
+			<text class="tit">所属银行</text>
+			<input class="input" v-model="bank" type="text" placeholder="请输入所属银行" placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b">
+			<text class="tit">所属支行</text>
+			<input class="input" v-model="bank_name" type="text" placeholder="请输入所属支行" placeholder-class="placeholder" />
+		</view>
+
+		<button class="add-btn up" @click="confirm">提 交 保 存</button>
+	</view>
+</template>
+
+<script>
+import { setBankInfo, getBank } from '@/api/wallet.js';
+export default {
+	data() {
+		return {
+			type: 3,
+			payment: '',
+			name: '',
+			bank: '',
+			phone: '',
+			bank_name: '',
+			loading: false
+		};
+	},
+
+	onLoad(options) {
+		this.getBank();
+	},
+
+	methods: {
+		// 提交保存
+		confirm() {
+			let obj = this;
+			if (obj.loading) {
+				return;
+			}
+			if (obj.name == '') {
+				return obj.$api.msg('请输入姓名');
+			}
+			if (obj.payment == '') {
+				return obj.$api.msg('请输入银行卡号');
+			}
+			if (obj.phone == '') {
+				return obj.$api.msg('请输入手机号');
+			}
+			if (obj.bank == '') {
+				return obj.$api.msg('请输入所属银行');
+			}
+			if (obj.bank_name == '') {
+				return obj.$api.msg('请输入所属支行');
+			}
+			obj.loading = true;
+			setBankInfo({
+				type: obj.type,
+				name: obj.name,
+				phone: obj.phone,
+				payment: obj.payment,
+				bank: obj.bank,
+				bank_name: obj.bank_name
+			})
+				.then(res => {
+					obj.loading = false;
+					uni.showToast({
+						title: '修改成功',
+						duration: 2000,
+						position: 'top'
+					});
+					console.log('修改成功');
+					obj.$api.prePage().dataUp();
+					setTimeout(() => {
+						uni.navigateBack();
+					}, 1500);
+				})
+				.catch(err => {
+					obj.loading = false;
+					this.$api.msg(err);
+				});
+		},
+		getBank() {
+			let obj = this;
+			getBank().then(res => {
+				if (res.data.bank.length == 0) {
+					console.log('没有填信息');
+				} else {
+					let bank = res.data.bank;
+					obj.name = bank.name;
+					obj.phone = bank.phone;
+					obj.payment = bank.payment;
+					obj.bank = bank.bank;
+					obj.bank_name = bank.bank_name;
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.row {
+	display: flex;
+	align-items: center;
+	position: relative;
+	padding: 0 30rpx;
+	height: 110rpx;
+	background: #fff;
+
+	.tit {
+		flex-shrink: 0;
+		width: 200rpx;
+		font-size: 30rpx;
+		color: $font-color-dark;
+	}
+
+	.input {
+		flex: 1;
+		font-size: 30rpx;
+		color: $font-color-dark;
+	}
+
+	.iconlocation {
+		font-size: 36rpx;
+		color: $font-color-light;
+	}
+}
+
+page,
+.content {
+	background: $page-color-base;
+	height: 100%;
+}
+
+.swiper-box {
+	height: 750rpx;
+}
+
+.navbar {
+	display: flex;
+	height: 40px;
+	padding: 0 5px;
+	background: #fff;
+	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+	position: relative;
+	z-index: 10;
+
+	.nav-item {
+		flex: 1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		font-size: 15px;
+		color: $font-color-dark;
+		position: relative;
+
+		&.current {
+			color: $base-color;
+
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 44px;
+				height: 0;
+				border-bottom: 2px solid $base-color;
+			}
+		}
+	}
+}
+
+.add-btn {
+	&.up {
+		background-color: #e93323;
+		color: #fff;
+	}
+
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 690rpx;
+	height: 80rpx;
+	margin: 0 auto;
+	margin-top: 30rpx;
+	font-size: $font-lg;
+	border-radius: 10rpx;
+	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+}
+</style>

+ 0 - 156
pages/user/favorites.vue

@@ -1,156 +0,0 @@
-<template>
-	<view class="container">
-		<!-- 空白页 -->
-		<empty v-if="favoriteList.length < 1"></empty>
-		<view class="favorites flex" v-for="ls in favoriteList" @click="toproduct(ls.pid)">
-			<view class="favorites_img"><image :src="ls.image"></image></view>
-			<view class="favorites_list">
-				<view class="favorites_name">{{ ls.store_name }}</view>
-				<view class="favorites_peice flex">
-					<view>
-						<text>¥{{ ls.price }}</text>
-					</view>
-					<view class="icon_del" @click.prevent.stop="del(ls.pid)" v-show="delshow">
-						<text class="iconfont icondelete"></text>
-						<text>取消</text>
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-import { getcollectList, delcollect } from '@/api/user.js';
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import empty from '@/components/empty';
-export default {
-	components: {
-		uniLoadMore,
-		empty
-	},
-	data() {
-		return {
-			tabCurrentIndex: 0,
-			favoriteList: '',
-			delshow: true
-		};
-	},
-	onLoad() {
-		this.loadData();
-	},
-	methods: {
-		//获取收藏夹列表
-		loadData() {
-			let obj = this;
-			getcollectList({
-				page: '1',
-				limit: '10'
-			})
-				.then(function(e) {
-					obj.favoriteList = e.data;
-					console.log(obj.favoriteList);
-				})
-				.catch(function(e) {
-					console.log(e);
-				});
-		},
-		//跳转商品详情页
-		toproduct(item) {
-			let id = item;
-			uni.navigateTo({
-				url: `/pages/product/product?id=${id}`
-			});
-		},
-		//删除收藏夹商品
-		del(item) {
-			let obj = this;
-			uni.showModal({
-				title: '提示',
-				content: '是否取消收藏该商品',
-				success: e => {
-					if (e.confirm) {
-						delcollect({
-							id: item,
-							category: 'product'
-						})
-							.then(function(e) {
-								uni.showToast({
-									title: '已取消收藏',
-									duration: 1500
-								});
-								obj.loadData();
-							})
-							.catch(function(e) {
-								console.log(e);
-							});
-					}
-				}
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	height: 100%;
-}
-%flex-center {
-	display: flex;
-	flex-direction: column;
-	justify-content: center;
-	align-items: center;
-}
-%section {
-	display: flex;
-	justify-content: space-around;
-	align-content: center;
-	background: #fff;
-	border-radius: 10rpx;
-}
-.container {
-	height: 100%;
-	background-color: $page-color-base;
-	padding: 15rpx 0rpx;
-	font-size: 28rpx;
-}
-.favorites {
-	width: 90%;
-	background-color: #ffffff;
-	border-radius: 15rpx;
-	margin: 15rpx auto;
-	padding: 25rpx 25rpx;
-	margin-bottom: 25rpx;
-}
-.favorites_img {
-	width: 80px !important;
-	height: 80px;
-}
-.favorites_img image {
-	width: 100%;
-	height: 100%;
-}
-.favorites_list {
-	width: 70%;
-	padding-left: 20rpx;
-}
-.icon_del {
-	color: $font-color-base;
-	z-index: 9999;
-	font-weight: bold;
-}
-.favorites_name {
-	height: 80rpx;
-	overflow: hidden;
-	text-overflow: ellipsis;
-	display: -webkit-box;
-	-webkit-box-orient: vertial;
-	-webkit-line-clamp: 2;
-}
-.favorites_peice {
-	margin-top: 25rpx;
-	color: #db1935;
-	font-weight: bold;
-}
-</style>

+ 4 - 2
pages/user/index.vue

@@ -104,7 +104,7 @@
 					<view class="tool-img"><image src="../../static/icon/gn2.png" mode=""></image></view>
 					<view class="tool-name">邀请有礼</view>
 				</view>
-				<view class="tool-item" @click="authTo('/pages/user/favorites')">
+				<view class="tool-item" @click="authTo('/pages/users/user_goods_collection/index')">
 					<view class="tool-img"><image src="../../static/icon/gn3.png" mode=""></image></view>
 					<view class="tool-name">我的收藏</view>
 				</view>
@@ -152,7 +152,7 @@
 <script>
 import { getMenuList, getUserInfo, setVisit } from '@/api/user.js';
 import { orderData } from '@/api/order.js';
-import { mapGetters } from 'vuex';
+import { mapGetters, mapMutations } from 'vuex';
 import authorize from '@/components/Authorize';
 // #ifndef H5
 import passwordPopup from '@/components/passwordPopup';
@@ -273,6 +273,7 @@ export default {
 		}
 	},
 	methods: {
+		...mapMutations(['UPDATE_USERINFO']),
 		authTo(url) {
 			if (this.isLogin) {
 				uni.navigateTo({
@@ -373,6 +374,7 @@ export default {
 		getUserInfo: function() {
 			let that = this;
 			getUserInfo().then(res => {
+				this.UPDATE_USERINFO(res.data);
 				(that.userInfo = res.data), (that.is_promoter = res.data.is_promoter);
 				that.extension_status = res.data.extension_status;
 				that.getMyMenus();

+ 3 - 3
pages/user/myggz.vue

@@ -59,7 +59,7 @@
 <script>
 import { userBalance, getContributionList } from '@/api/wallet.js';
 import { getMoneyStyle } from '@/utils/rocessor.js';
-import { mapState, mapMutations } from 'vuex';
+import { mapGetters } from 'vuex';
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 import empty from '@/components/empty';
 export default {
@@ -67,7 +67,7 @@ export default {
 		getMoneyStyle
 	},
 	computed: {
-		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+		...mapGetters(['userInfo'])
 	},
 	components: {
 		empty,
@@ -153,7 +153,7 @@ export default {
 			getContributionList({
 				page: navItem.page,
 				limit: navItem.limit,
-				pm: navItem.state
+				status: navItem.state
 			})
 				.then(({ data }) => {
 					obj.sr = data.sr;

+ 4 - 4
pages/user/mygwjf.vue

@@ -10,7 +10,7 @@
 			<view class="content-bg"><image src="../../static/img/jf-bg.png" mode=""></image></view>
 			<view class="my-jf">
 				<view class="jf-zz" @click.stop="navto('/pages/user/xfjfzz?type=1')">积分转账</view>
-				<view class="jf-zz jf-tx" @click.stop="navto('/pages/user/withdrawal?jftype=1')">积分提现</view>
+				<view class="jf-zz jf-tx" @click.stop="navto('/pages/users/user_cash/index?jftype=1')">积分提现</view>
 				<view class="jf-tit">积分余额</view>
 				<view class="jf-val">{{ userInfo.integral * 1 || 0 }}</view>
 				<view class="jf-item-list flex">
@@ -74,7 +74,7 @@
 <script>
 import { userBalance, integrallist } from '@/api/wallet.js';
 import { getMoneyStyle } from '@/utils/rocessor.js';
-import { mapState, mapMutations } from 'vuex';
+import { mapGetters } from 'vuex';
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 import empty from '@/components/empty';
 export default {
@@ -82,7 +82,7 @@ export default {
 		getMoneyStyle
 	},
 	computed: {
-		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+		...mapGetters(['userInfo'])
 	},
 	components: {
 		empty,
@@ -170,7 +170,7 @@ export default {
 			integrallist({
 				page: navItem.page,
 				limit: navItem.limit,
-				pm: navItem.state
+				status: navItem.state
 			})
 				.then(({ data }) => {
 					obj.sr = data.sr;

+ 6 - 5
pages/user/myjf.vue

@@ -8,7 +8,7 @@
 			</view>
 			<view class="content-bg"><image src="../../static/img/jf-bg.png" mode=""></image></view>
 			<view class="money-box">
-				<view class="money">{{ userInfo.contribution || '0' }}</view>
+				<view class="money">{{ userInfo.dynamic_integral * 1 || '0' }}</view>
 				<view>当前余额</view>
 			</view>
 			<view class="moneybtn-box">
@@ -66,7 +66,7 @@
 <script>
 import { userBalance, getDynamicIntegralList } from '@/api/wallet.js';
 import { getMoneyStyle } from '@/utils/rocessor.js';
-import { mapState, mapMutations } from 'vuex';
+import { mapGetters } from 'vuex';
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 import empty from '@/components/empty';
 export default {
@@ -74,7 +74,7 @@ export default {
 		getMoneyStyle
 	},
 	computed: {
-		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+		...mapGetters(['userInfo'])
 	},
 	components: {
 		empty,
@@ -126,6 +126,7 @@ export default {
 	},
 	onLoad(options) {},
 	onShow() {
+		console.log(this.userInfo, '12345678');
 		this.loadData();
 	},
 	methods: {
@@ -141,6 +142,7 @@ export default {
 		},
 		//获取收入支出信息
 		async loadData(source) {
+			console.log('进入');
 			let obj = this;
 			//这里是将订单挂载到tab列表下
 			let index = this.tabCurrentIndex;
@@ -156,11 +158,10 @@ export default {
 			}
 			// 修改当前对象状态为加载中
 			navItem.loadingType = 'loading';
-
 			getDynamicIntegralList({
 				page: navItem.page,
 				limit: navItem.limit,
-				pm: navItem.state
+				status: navItem.state
 			})
 				.then(({ data }) => {
 					obj.sr = data.sr;

+ 3 - 3
pages/user/mythq.vue

@@ -63,7 +63,7 @@
 <script>
 import { userBalance, getConsumptionList } from '@/api/wallet.js';
 import { getMoneyStyle } from '@/utils/rocessor.js';
-import { mapState, mapMutations } from 'vuex';
+import { mapGetters } from 'vuex';
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 import empty from '@/components/empty';
 export default {
@@ -71,7 +71,7 @@ export default {
 		getMoneyStyle
 	},
 	computed: {
-		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+		...mapGetters(['userInfo'])
 	},
 	components: {
 		empty,
@@ -157,7 +157,7 @@ export default {
 			getConsumptionList({
 				page: navItem.page,
 				limit: navItem.limit,
-				pm: navItem.state
+				status: navItem.state
 			})
 				.then(({ data }) => {
 					obj.sr = data.sr;

+ 364 - 0
pages/user/xfjfzz.vue

@@ -0,0 +1,364 @@
+<template>
+	<view class="content">
+		<view class="content-money">
+			<view class="flex">
+				<view class="buttom">
+					<view class="icon" v-if="type == 1">{{ userInfo.integral | getMoneyStyle }}</view>
+					<view class="icon" v-if="type == 2">{{ userInfo.dynamic_integral | getMoneyStyle }}</view>
+					<view class="icon" v-if="type == 3">{{ userInfo.now_money | getMoneyStyle }}</view>
+					<text class="text">可转账余额</text>
+				</view>
+			</view>
+		</view>
+		<view class="row-box">
+			<view class="title">收款人UID</view>
+			<view class="row"><input class="input" type="number" v-model="card" placeholder="请输入收款人UID" placeholder-class="placeholder" /></view>
+		</view>
+		<view class="row-box">
+			<view class="title">转账金额</view>
+			<view class="row">
+				<!-- <text class="tit">¥</text> -->
+				<input class="input" type="number" v-model="withdrawal" placeholder="转入金额" placeholder-class="placeholder" />
+				<view class="buttom" @click="withdrawal = userInfo.integral" v-if="type == 1">全部转账</view>
+				<view class="buttom" @click="withdrawal = userInfo.dynamic_integral" v-if="type == 2">全部转账</view>
+			</view>
+		</view>
+		<button class="add-btn up" :class="{ action: loding }" @click="!loding ? confirm() : ''">转账</button>
+	</view>
+</template>
+
+<script>
+import { getMoneyStyle } from '@/utils/rocessor.js';
+import { getUserInfo, jfzz } from '@/api/user.js';
+import { mapMutations, mapGetters } from 'vuex';
+export default {
+	filters: {
+		getMoneyStyle
+	},
+	data() {
+		return {
+			money: '0.00', //可提现金额
+			withdrawal: '', //提现金额
+			password: '', //支付密码
+			card: '', //转账卡号
+			name: '',
+			// #ifdef H5
+			weichatBsrowser: false,
+			// #endif
+			loding: false,
+			type: 0
+		};
+	},
+	onLoad(options) {
+		// #ifdef H5
+		this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
+		// #endif
+		this.dataUp();
+		if (options.type) {
+			this.type = options.type;
+			console.log(this.type);
+			if (this.type == 1) {
+				uni.setNavigationBarTitle({
+					title: '静态积分转账'
+				});
+			} else if (this.type == 2) {
+				uni.setNavigationBarTitle({
+					title: '动态积分转账'
+				});
+			} else if (this.type == 3) {
+				uni.setNavigationBarTitle({
+					title: '余额转账'
+				});
+			}
+		}
+	},
+	computed: {
+		...mapGetters(['userInfo'])
+	},
+	methods: {
+		...mapMutations(['UPDATE_USERINFO']),
+		// 更新数据
+		dataUp() {
+			let obj = this;
+			getUserInfo({})
+				.then(e => {
+					// 保存返回用户数据
+					obj.UPDATE_USERINFO(e.data);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		// 切换选中对象
+		tabRadio(e) {
+			this.type = e.detail.value;
+		},
+		// 提交
+		confirm() {
+			let obj = this;
+			obj.loding = true;
+			if (obj.withdrawal == 0) {
+				obj.loding = false;
+				uni.showModal({
+					title: '提示',
+					content: '转账金额不要为0'
+				});
+				return;
+			}
+			if (obj.card == obj.userInfo.uid) {
+				obj.loding = false;
+				uni.showModal({
+					title: '提示',
+					content: '不要输入自己的用户账号'
+				});
+				return;
+			}
+			let data = {
+				uid: obj.card, //编号
+				price: obj.withdrawal, //金额
+				type: obj.type
+			};
+			jfzz(data)
+				.then(e => {
+					// 允许按钮点击
+					obj.loding = false;
+					// 初始化提现金额
+					obj.withdrawal = '';
+					uni.showToast({
+						title: '转账成功',
+						duration: 2000,
+						position: 'top'
+					});
+					obj.dataUp();
+					// obj.cancel();
+				})
+				.catch(e => {
+					console.log(e);
+					obj.$api.msg(e);
+					obj.loding = false;
+					console.log();
+				});
+		},
+		boblack() {
+			uni.navigateBack({
+				fail() {
+					uni.switchTab({
+						url: '/pages/index/index'
+					});
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	height: 100%;
+}
+
+.content-money {
+	padding: 30rpx 0;
+	background: #ffffff;
+}
+
+.item {
+	padding: 0 $page-row-spacing;
+	background-color: #ffffff;
+}
+
+.flex {
+	background-color: #ffffff;
+	text-align: center;
+	margin: 0 30rpx;
+	border-radius: $border-radius-sm;
+	justify-content: center;
+
+	.buttom {
+		font-size: $font-lg;
+		width: 50%;
+	}
+
+	.interval {
+		width: 2px;
+		height: 60rpx;
+		background-color: #eeeeee;
+	}
+
+	.icon {
+		background-size: 100%;
+		font-size: 42rpx;
+		color: $font-color-dark;
+		font-weight: bold;
+		background-repeat: no-repeat;
+		background-position: center;
+	}
+
+	.text {
+		color: $font-color-light;
+	}
+}
+
+.row-box {
+	margin-top: 30rpx;
+	padding: 20rpx 30rpx;
+	background: #fff;
+
+	.title {
+		font-size: $font-base + 2rpx;
+		color: $font-color-dark;
+	}
+
+	.row {
+		display: flex;
+		align-items: center;
+		position: relative;
+		height: 80rpx;
+
+		.tit {
+			flex-shrink: 0;
+			width: 40rpx;
+			font-size: 30rpx;
+			color: $font-color-dark;
+		}
+
+		.input {
+			flex: 1;
+			font-size: 30rpx;
+			color: $font-color-dark;
+		}
+
+		.iconlocation {
+			font-size: 36rpx;
+			color: $font-color-light;
+		}
+
+		.buttom {
+			color: #f21f5d;
+			font-size: $font-base;
+		}
+	}
+}
+
+.add-btn {
+	width: 520rpx;
+	height: 80rpx;
+	border-radius: 20rpx;
+	margin: 140rpx auto 0;
+	font-size: 36rpx;
+	font-weight: bold;
+	color: #f8daba;
+	line-height: 80rpx;
+	background-color: #303030;
+}
+
+.back-btn {
+	width: 520rpx;
+	height: 80rpx;
+	border-radius: 20rpx;
+	margin: 40rpx auto;
+	font-size: 36rpx;
+	font-weight: bold;
+	color: #303030;
+	background-color: #f8daba;
+}
+
+.name {
+	background: #fff;
+	padding: 30rpx;
+}
+
+.list {
+	padding-left: 30rpx;
+	margin-top: 30rpx;
+	background-color: #ffffff;
+
+	.box {
+		display: flex;
+		align-items: center;
+		width: 100%;
+		height: 120rpx;
+		border-bottom: 1px solid $border-color-light;
+
+		.icon {
+			font-size: 48rpx;
+			padding-right: 20rpx;
+
+			.icon-img {
+				height: 50rpx;
+				width: 50rpx;
+			}
+		}
+
+		.iconweixin1 {
+			color: #18bf16;
+		}
+
+		.iconzhifubao {
+			color: #08aaec;
+		}
+
+		.title-box {
+			flex-grow: 1;
+			text-align: left;
+
+			.title {
+				font-size: $font-base + 2rpx;
+				color: $font-color-base;
+			}
+
+			.node {
+				font-size: $font-sm;
+				color: $font-color-light;
+			}
+		}
+	}
+}
+
+.tip {
+	padding: 20rpx;
+	color: #ff0000;
+}
+
+/deep/ .uni-radio-input {
+	width: 45rpx;
+	height: 45rpx;
+}
+
+.psw-wrapper {
+	width: 548rpx;
+	height: 344rpx;
+	background-color: #ffffff;
+	border-radius: 15rpx 15rpx;
+
+	.psw-title {
+		width: 100%;
+		font-size: 35rpx;
+		padding: 43rpx 0 49rpx;
+		text-align: center;
+		font-weight: 800;
+	}
+
+	.psw-ipt {
+		display: block;
+		background-color: #dce3ed;
+		height: 90rpx;
+		width: 464rpx;
+		padding-left: 30rpx;
+		margin: 0 auto;
+		font-size: 80rpx;
+	}
+
+	.psw-btn text {
+		display: inline-block;
+		text-align: center;
+		width: 50%;
+		padding-top: 29rpx;
+		font-size: 35rpx;
+	}
+
+	.psw-qd {
+		color: #5771df;
+	}
+}
+</style>

+ 92 - 40
pages/users/user_cash/index.vue

@@ -22,34 +22,34 @@
 					<form @submit="subCash" report-submit='true'>
 						<view class='item acea-row row-between-wrapper'>
 							<view class='name'>持卡人</view>
-							<view class='input'><input placeholder='请输入持卡人姓名' placeholder-class='placeholder' name="real_name"></input></view>
+							<view class='input'><input placeholder='请输入持卡人姓名' v-model="array.name" placeholder-class='placeholder' name="real_name"></input></view>
 						</view>
 						<view class='item acea-row row-between-wrapper'>
 							<view class='name'>卡号</view>
-							<view class='input'><input type='number' placeholder='请填写卡号' placeholder-class='placeholder' name="bank_code"></input></view>
+							<view class='input'><input type='number' placeholder='请填写卡号' v-model="array.payment" placeholder-class='placeholder' name="bank_code"></input></view>
 						</view>
-						<view class='item acea-row row-between-wrapper' v-if="array.length>0">
+						<view class='item acea-row row-between-wrapper'>
 							<view class='name'>银行</view>
-							<view class='input'>
-								<picker @change="bindPickerChange" :value="index" :range="array" range-key="name">
-									<text class='Bank'>{{array[index]["name"]}}</text>
-									<text class='iconfont icon-qiepian38'></text>
-								</picker>
-							</view>
+							<view class='input'><input placeholder='请填写银行' placeholder-class='placeholder' v-model="array.bank" name="bank_address"></input></view>
+						</view>
+						<view class='item acea-row row-between-wrapper'>
+							<view class='name'>支行</view>
+							<view class='input'><input placeholder='请填写支行' placeholder-class='placeholder' v-model="array.bank_name" name="bank_name"></input></view>
 						</view>
 						<view class='item acea-row row-between-wrapper'>
 							<view class='name'>提现</view>
 							<view class='input'><input :placeholder='"最低提现金额"+minPrice' placeholder-class='placeholder' name="extract_price"
 								 type='digit' v-model="extract_price"></input></view>
 						</view>
-						<view class='tip mt25'>
-							当前可提现金额: <text class="price">¥{{userInfo.brokerage_price}},</text>冻结佣金:¥{{userInfo.lock_brokerage}}
+						<view class='tip mb25' style="margin-top: 25rpx;">
+							当前可提现金额: <text class="price">{{money}}</text>
 						</view>
-						<view class='tip'>
+						<!-- <view class='tip'>
 							说明: 每笔佣金的冻结期为{{userInfo.broken_day}}天,到期后可提现
-						</view>
+						</view> -->
 						<view class="btn-submit">
 							<button formType="submit" :disabled="load" class='bnt b-color' :class="load ? 'disabled' : ''" >提现</button>
+							<button class="add-btn modified"  @click="navTo('/pages/user/account')">账号管理</button>
 						</view>
 					</form>
 				</view>
@@ -80,15 +80,13 @@
 							</view>
 
 							<view class='tip mt25'>
-								当前可提现金额: <text class="price">¥{{userInfo.brokerage_price}},</text>冻结佣金:¥{{userInfo.lock_brokerage}}
-							</view>
-							<view class='tip'>
-								说明: 每笔佣金的冻结期为{{userInfo.broken_day}}天,到期后可提现
+								当前可提现金额: <text class="price">{{money}}</text>
 							</view>
 							<button formType="submit" :disabled="load" class='bnt b-color' :class="load ? 'disabled' : ''" >提现</button>
 						</view>
 						<view v-else class="auto_arrival">
-							<view class='tip'>当前可提现金额: <text class="price">¥{{userInfo.brokerage_price}}</text>
+							<view class='tip mt25'>
+								当前可提现金额: <text class="price">{{money}}</text>
 							</view>
 							<view class='input'><input placeholder-class='placeholder1' name="extract_price"
 								 type='digit' :placeholder="placeholderValue" @focus="placeholderValue = ''" v-model="extract_price"></input>
@@ -125,17 +123,16 @@
 							</view>
 						</view>
 						<view class='tip mb25'>
-							当前可提现金额: <text class="price">¥{{userInfo.brokerage_price}},</text>冻结佣金:¥{{userInfo.lock_brokerage}}
-						</view>
-						<view class='tip' v-if="userInfo.broken_day>0">
-							说明: 每笔佣金的冻结期为{{userInfo.broken_day}}天,到期后可提现
+							当前可提现金额: <text class="price">{{money}}</text>
 						</view>
 						<view class="btn-submit">
 						    <button formType="submit" :disabled="load" class='bnt b-color' :class="load ? 'disabled' : ''" >提现</button>
 						</view>
+						
 					</form>
 				</view>
 			</view>
+			
 		</view>
 		<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
 		<cash :payMode='pay_type' :pay_close="pay_close" @payClose="payClose" @onChangeFun="onChangeFun" :order_id="currentTab"></cash>
@@ -162,6 +159,7 @@
 	import authorize from '@/components/Authorize';
 	import cash from '@/components/cash';
 	import { configMap } from '@/utils';
+	import { getBank } from '@/api/wallet.js';
 	export default {
 		components: {
 			cash,
@@ -194,7 +192,7 @@
 				currentTab: '0',
 				extract_price: '',
 				index: 0,
-				array: [], //提现银行
+				array: {bank:'',bank_name:'',name:'',payment:'',}, //提现银行
 				minPrice: 0.00, //最低提现金额
 				userInfo: [],
 				isClone: false,
@@ -207,7 +205,9 @@
 				placeholderValue: '0.00',
 				payColor: '',
 				pay_close: false,
-				pay_type: []
+				pay_type: [],
+				money:'',
+				jftype:'',
 			};
 		},
 		computed: {
@@ -222,10 +222,21 @@
 				immediate: true
 			}
 		},
-		onLoad() {
+		onLoad(options) {
+			this.jftype = options.jftype
 			if (this.isLogin) {
 				this.getUserInfo();
 				this.getUserExtractBank();
+				if(options.jftype == 1) {
+					uni.setNavigationBarTitle({
+						title:'静态积分提现'
+					})
+				}
+				if(options.jftype == 2) {
+					uni.setNavigationBarTitle({
+						title:'动态积分提现'
+					})
+				}
 			} else {
                 this.isAuto = true;
                 this.isShowAuth = true
@@ -258,9 +269,9 @@
 			},
 			getUserExtractBank: function() {
 				let that = this;
-				extractBank().then(res => {
-					let array = res.data;
-					that.$set(that, 'array', array);
+				getBank().then(res => {
+					that.array = res.data.bank
+					console.log(res,'123456');
 				});
 			},
 			/**
@@ -270,7 +281,17 @@
 				let that = this;
 				spreadInfo().then(res => {
 					that.userInfo = res.data;
+					console.log(that.userInfo);
 					that.minPrice = res.data.user_extract_min;
+					getUserInfo().then(e =>{
+						if(that.jftype == 1) {
+							that.money = e.data.integral * 1
+							console.log(that.money);
+						}
+						if(that.jftype == 2) {
+							that.money = e.data.dynamic_integral * 1
+						}
+					})
 				});
 			},
 			swichNav: function(current) {
@@ -322,11 +343,13 @@
 					if (value.bank_code.length == 0) return this.$util.Tips({
 						title: '请填写卡号'
 					});
-					// if (that.index == 0) return this.$util.Tips({
-					// 	title: "请选择银行"
-					// });
+					if (value.bank_address.length == 0) return this.$util.Tips({
+						title: '请填写银行'
+					});
+					if (value.bank_name.length == 0) return this.$util.Tips({
+						title: '请填写支行'
+					});
 					value.extract_type = 'bank';
-					value.bank_address = (that.array && that.array.length) ? that.array[that.index].name : '';
 				} else if (that.currentTab == 1) { //微信
 					value.extract_type = 'weixin';
 					if(!this.sys_extension_type){
@@ -355,6 +378,7 @@
 					title: '提现金额不能低于' + that.minPrice
 				});
 				value.extract_type = this.currentTab
+				value.type = this.jftype
 				console.log(value, 'value')
 				that.load = true;
 				if(that.sys_extension_type && that.currentTab == 1)
@@ -366,14 +390,14 @@
 						title: res.message,
 						icon: 'success'
 					});
-					setTimeout(function(){
-						// uni.navigateBack({
-						// 	delta: 1,
-						// })
-						uni.navigateTo({
-							url: '/pages/users/user_spread_user/index'
-						});
-					},1000)
+					// setTimeout(function(){
+					// 	// uni.navigateBack({
+					// 	// 	delta: 1,
+					// 	// })
+					// 	uni.navigateTo({
+					// 		url: '/pages/users/user_spread_user/index'
+					// 	});
+					// },1000)
 				}).catch(err => {
 					that.load = false;
 					return that.$util.Tips({
@@ -390,6 +414,11 @@
 				// this.$set(this, 'pay_order_id', );
 
 			},
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				});
+			},
 			/**
 			 * 关闭支付组件
 			 *
@@ -631,4 +660,27 @@
 	 uni-toast.uni-mask{
 		background-color: rgba(0,0,0,0.5) !important;
 	}
+	.add-btn {
+		&.modified {
+			// color: #ffffff;
+			border:1px solid #e93323;
+			color: #e93323;
+		}
+	
+		&.up {
+			background: linear-gradient(90deg, #e93323, #e93323);
+			color: #fff;
+		}
+	
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 690rpx;
+		height: 90rpx;
+		margin: 0 auto;
+		margin-top: 30rpx;
+		font-size: $font-lg;
+		border-radius: 40rpx;
+		// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+	}
 </style>

+ 235 - 219
pages/users/user_goods_collection/index.vue

@@ -1,31 +1,42 @@
 <template>
 	<view :style="viewColor">
-		<view class='collectionGoods' v-if="collectProductList.length">
-			<view class='item acea-row row-between-wrapper' v-for="(item,index) in collectProductList" :key="index" v-if="item.spu" @tap="goDetail(item.spu)">
-				<view class='pictrue' >
-					<easy-loadimage mode="widthFix" :image-src="item.spu.image"></easy-loadimage>
-				</view>
-				<view class='text acea-row row-column-between'>
-					<view class='name'>
-						<text v-if="item.spu.product_type != 0" :class="'font_bg-red type'+item.spu.product_type">{{item.spu.product_type == 1 ? "秒杀" : item.spu.product_type == 2 ? "预售" : item.spu.product_type == 3 ? "助力" : item.spu.product_type == 4 ? "拼团" : ""}}</text>
-						<text class="name_text line1">{{item.spu.store_name}}</text>
+		<view class="collectionGoods" v-if="collectProductList.length">
+			<view class="item acea-row row-between-wrapper" v-for="(item, index) in collectProductList" :key="index" v-if="item.spu" @tap="goDetail(item.spu)">
+				<view class="pictrue"><easy-loadimage mode="widthFix" :image-src="item.spu.image"></easy-loadimage></view>
+				<view class="text acea-row row-column-between">
+					<view class="name">
+						<text v-if="item.spu.product_type != 0" :class="'font_bg-red type' + item.spu.product_type">
+							{{
+								item.spu.product_type == 1
+									? '秒杀'
+									: item.spu.product_type == 2
+									? '预售'
+									: item.spu.product_type == 3
+									? '助力'
+									: item.spu.product_type == 4
+									? '拼团'
+									: ''
+							}}
+						</text>
+						<text class="name_text line1">{{ item.spu.store_name }}</text>
 					</view>
-					<view class='acea-row row-between-wrapper'>
-						<view class='money'>¥{{item.spu.price}}</view>
-						<view class='delete' @click.stop='delCollection(item.type_id,index)'>删除</view>
+					<view class="acea-row row-between-wrapper">
+						<view class="money">¥{{ item.spu.price }}</view>
+						<view class="delete" @click.stop="delCollection(item.type_id, index)">删除</view>
 					</view>
 				</view>
 			</view>
-			<view class='loadingicon acea-row row-center-wrapper'>
-				<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
+			<view class="loadingicon acea-row row-center-wrapper">
+				<text class="loading iconfont icon-jiazai" :hidden="loading == false"></text>
+				{{ loadTitle }}
 			</view>
 		</view>
-		<view class='noCommodity' v-else-if="!collectProductList.length && page > 1">
-			<view class='pictrue'>
-				<image src='@/static/images/noCart.png'></image>
+		<view class="noCommodity" v-else-if="!collectProductList.length && page > 1">
+			<view class="pictrue">
+				<image src="@/static/images/noCart.png"></image>
 				<view>暂无商品,去添加点什么吧</view>
 			</view>
-			
+
 			<recommend :hostProduct="hostProduct" :isLogin="isLogin"></recommend>
 		</view>
 		<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
@@ -33,75 +44,76 @@
 </template>
 
 <script>
-	// +----------------------------------------------------------------------
-	// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
-	// +----------------------------------------------------------------------
-	// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
-	// +----------------------------------------------------------------------
-	// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
-	// +----------------------------------------------------------------------
-	// | Author: CRMEB Team <admin@crmeb.com>
-	// +----------------------------------------------------------------------
-	import { getCollectUserList, getProductHot, userCollectDel } from '@/api/store.js';
-	import { goShopDetail } from '@/libs/order.js'
-	import {openBargainSubscribe} from '@/utils/SubscribeMessage.js'
-	import {initiateAssistApi} from '@/api/activity.js'
-	import { mapGetters } from "vuex";
-	import recommend from '@/components/recommend';
-	import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
-	import authorize from '@/components/Authorize';
-	export default {
-		components: {
-			recommend,
-			easyLoadimage,
-			authorize
-		},
-		data() {
-			return {
-				hostProduct: [],
-				loadTitle: '加载更多',
-				loading: false,
-				loadend: false,
-				collectProductList: [],
-				limit: 20,
-				page: 1,
-				isAuto: false, //没有授权的不会自动授权
-				isShowAuth: false ,//是否隐藏授权
-				hotScroll:false,
-				hotPage:1,
-				hotLimit:10
-			};
-		},
-		computed: mapGetters(['isLogin','viewColor']),
-		onLoad() {
-			if (this.isLogin) {
-				this.get_user_collect_product();
-				this.get_host_product();
-			} else {
-				this.isAuto = true;
-                this.isShowAuth = true
-			}
-		},
+// +----------------------------------------------------------------------
+// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+// +----------------------------------------------------------------------
+// | Author: CRMEB Team <admin@crmeb.com>
+// +----------------------------------------------------------------------
+import { getCollectUserList, getProductHot, userCollectDel } from '@/api/store.js';
+import { goShopDetail } from '@/libs/order.js';
+import { openBargainSubscribe } from '@/utils/SubscribeMessage.js';
+import { initiateAssistApi } from '@/api/activity.js';
+import { mapGetters } from 'vuex';
+import recommend from '@/components/recommend';
+import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
+import authorize from '@/components/Authorize';
+export default {
+	components: {
+		recommend,
+		easyLoadimage,
+		authorize
+	},
+	data() {
+		return {
+			hostProduct: [],
+			loadTitle: '加载更多',
+			loading: false,
+			loadend: false,
+			collectProductList: [],
+			limit: 20,
+			page: 1,
+			isAuto: false, //没有授权的不会自动授权
+			isShowAuth: false, //是否隐藏授权
+			hotScroll: false,
+			hotPage: 1,
+			hotLimit: 10
+		};
+	},
+	computed: mapGetters(['isLogin', 'viewColor']),
+	onLoad() {
+		if (this.isLogin) {
+			this.get_user_collect_product();
+			this.get_host_product();
+		} else {
+			this.isAuto = true;
+			this.isShowAuth = true;
+		}
+	},
+	/**
+	 * 页面上拉触底事件的处理函数
+	 */
+	methods: {
 		/**
-		 * 页面上拉触底事件的处理函数
+		 * 授权回调
 		 */
-		methods: {
-			/**
-			 * 授权回调
-			 */
-			onLoadFun: function() {
-				this.isShowAuth = false;
-				this.get_user_collect_product();
-				this.get_host_product();
-			},
-			// 授权关闭
-			authColse: function(e) {
-				this.isShowAuth = e
-			},
-			goDetail(item){
-				goShopDetail(item, this.uid).then(res => {
+		onLoadFun: function() {
+			this.isShowAuth = false;
+			this.get_user_collect_product();
+			this.get_host_product();
+		},
+		// 授权关闭
+		authColse: function(e) {
+			this.isShowAuth = e;
+		},
+		goDetail(item) {
+			goShopDetail(item, this.uid).then(res => {
 				if (this.isLogin) {
-						initiateAssistApi(item.activity_id).then(res => {
+					initiateAssistApi(item.activity_id)
+						.then(res => {
 							let id = res.data.product_assist_set_id;
 							uni.hideLoading();
 							// #ifndef MP
@@ -110,40 +122,44 @@
 							});
 							// #endif
 							// #ifdef MP
-							openBargainSubscribe().then(res => {
-								uni.hideLoading();
-								uni.navigateTo({
-									url: '/pages/activity/assist_detail/index?id=' + id
+							openBargainSubscribe()
+								.then(res => {
+									uni.hideLoading();
+									uni.navigateTo({
+										url: '/pages/activity/assist_detail/index?id=' + id
+									});
+								})
+								.catch(err => {
+									uni.hideLoading();
 								});
-							}).catch((err) => {
-								uni.hideLoading();
-							});
 							// #endif
-						}).catch((err) => {
+						})
+						.catch(err => {
 							uni.showToast({
 								title: err,
 								icon: 'none'
-							})
+							});
 						});
-					} else {
-                    this.isAuto = true;
-                    this.isShowAuth = true
-					}
-				})
-			},
-			/**
-			 * 获取收藏产品
-			 */
-			get_user_collect_product: function() {
-				let that = this;
-				if (this.loading) return;
-				if (this.loadend) return;
-				that.loading = true;
-				that.loadTitle = "";
-				getCollectUserList({
-					page: that.page,
-					limit: that.limit
-				}).then(res => {
+				} else {
+					this.isAuto = true;
+					this.isShowAuth = true;
+				}
+			});
+		},
+		/**
+		 * 获取收藏产品
+		 */
+		get_user_collect_product: function() {
+			let that = this;
+			if (this.loading) return;
+			if (this.loadend) return;
+			that.loading = true;
+			that.loadTitle = '';
+			getCollectUserList({
+				page: that.page,
+				limit: that.limit
+			})
+				.then(res => {
 					let collectProductList = res.data.list;
 					let loadend = collectProductList.length < that.limit;
 					that.collectProductList = that.$util.SplitArray(collectProductList, that.collectProductList);
@@ -152,130 +168,130 @@
 					that.loadTitle = loadend ? '我也是有底线的' : '加载更多';
 					that.page = that.page + 1;
 					that.loading = false;
-				}).catch(err => {
+				})
+				.catch(err => {
 					that.loading = false;
-					that.loadTitle = "加载更多";
+					that.loadTitle = '加载更多';
 				});
-			},
-			/**
-			 * 取消收藏
-			 */
-			delCollection: function(id, index) {
-				let that = this;
-				userCollectDel({
-					type:1,
-					type_id:id
-				}).then(res => {
-					return that.$util.Tips({
+		},
+		/**
+		 * 取消收藏
+		 */
+		delCollection: function(id, index) {
+			let that = this;
+			userCollectDel({
+				type: 1,
+				type_id: id
+			}).then(res => {
+				return that.$util.Tips(
+					{
 						title: '取消收藏成功',
 						icon: 'success'
-					}, function() {
+					},
+					function() {
 						that.collectProductList.splice(index, 1);
 						that.$set(that, 'collectProductList', that.collectProductList);
-					});
-				});
-			},
-			/**
-			 * 获取我的推荐
-			 */
-			get_host_product: function() {
-				let that = this;
-				if(that.hotScroll) return
-				getProductHot(
-					that.hotPage,
-					that.hotLimit,
-				).then(res => {
-					that.hotPage++
-					that.hotScroll = res.data.list.length<that.hotLimit
-					that.hostProduct = that.hostProduct.concat(res.data.list)
-				});
-			}
-
-		},
-		onReachBottom() {
-			this.get_user_collect_product();
+					}
+				);
+			});
 		},
-		// 滚动监听
-		onPageScroll(e) {
-			// 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
-			uni.$emit('scroll');
+		/**
+		 * 获取我的推荐
+		 */
+		get_host_product: function() {
+			let that = this;
+			if (that.hotScroll) return;
+			getProductHot(that.hotPage, that.hotLimit).then(res => {
+				that.hotPage++;
+				that.hotScroll = res.data.list.length < that.hotLimit;
+				that.hostProduct = that.hostProduct.concat(res.data.list);
+			});
 		}
+	},
+	onReachBottom() {
+		this.get_user_collect_product();
+	},
+	// 滚动监听
+	onPageScroll(e) {
+		// 传入scrollTop值并触发所有easy-loadimage组件下的滚动监听事件
+		uni.$emit('scroll');
 	}
+};
 </script>
 
 <style scoped lang="scss">
-	.collectionGoods {
-		background-color: #fff;
-		border-top: 1rpx solid #eee;
-	}
-	.font_bg-red {
-		background-color: var(--view-theme);
-		border: 1rpx solid var(--view-theme);
-		&.type2{
-			background-color: #FD6523;
-			border: 1rpx solid #FD6523;
-		}
-	}
-	.collectionGoods .item {
-		margin-left: 30rpx;
-		padding-right: 30rpx;
-		border-bottom: 1rpx solid #eee;
-		height: 180rpx;
+.collectionGoods {
+	background-color: #fff;
+	border-top: 1rpx solid #eee;
+}
+.font_bg-red {
+	background-color: var(--view-theme);
+	border: 1rpx solid var(--view-theme);
+	&.type2 {
+		background-color: #fd6523;
+		border: 1rpx solid #fd6523;
 	}
+}
+.collectionGoods .item {
+	margin-left: 30rpx;
+	padding-right: 30rpx;
+	border-bottom: 1rpx solid #eee;
+	height: 180rpx;
+}
 
-	.collectionGoods .item .pictrue {
-		width: 130rpx;
-		height: 130rpx;
-	}
+.collectionGoods .item .pictrue {
+	width: 130rpx;
+	height: 130rpx;
+}
 
-	/deep/.collectionGoods .item .pictrue image,
-	/deep/.collectionGoods .item .easy-loadimage, .collectionGoods .item uni-image{
-		width: 100%;
-		height: 100%;
-		border-radius: 6rpx;
-	}
+/deep/.collectionGoods .item .pictrue image,
+/deep/.collectionGoods .item .easy-loadimage,
+.collectionGoods .item uni-image {
+	width: 100%;
+	height: 100%;
+	border-radius: 6rpx;
+}
 
-	.collectionGoods .item .text {
-		width: 535rpx;
-		height: 130rpx;
-		font-size: 28rpx;
-		color: #282828;
-	}
-
-	.collectionGoods .item .text .name {
-		width: 100%;
-		display: flex;
-		align-items: center;
-	}
-	.collectionGoods .item .name_text{
-		display: inline-block;
-		max-width: 400rpx;
-	}
+.collectionGoods .item .text {
+	width: 535rpx;
+	height: 130rpx;
+	font-size: 28rpx;
+	color: #282828;
+}
 
-	.collectionGoods .item .text .money {
-		font-size: 26rpx;
-		color: var(--view-priceColor);
-	}
+.collectionGoods .item .text .name {
+	width: 100%;
+	display: flex;
+	align-items: center;
+}
+.collectionGoods .item .name_text {
+	display: inline-block;
+	max-width: 400rpx;
+}
 
-	.collectionGoods .item .text .delete {
-		font-size: 26rpx;
-		color: #282828;
-		width: 144rpx;
-		height: 46rpx;
-		border: 1px solid #bbb;
-		border-radius: 24rpx;
-		text-align: center;
-		line-height: 46rpx;
-	}
+.collectionGoods .item .text .money {
+	font-size: 26rpx;
+	color: var(--view-priceColor);
+}
 
-	.noCommodity {
-		background-color: #fff;
-		padding-top: 1rpx;
-		border-top: 0;
-	}
-	.noCommodity .pictrue{
-		text-align: center;
-		margin: 78rpx auto 56rpx auto;
-	}
+.collectionGoods .item .text .delete {
+	font-size: 26rpx;
+	color: #282828;
+	width: 144rpx;
+	height: 46rpx;
+	border: 1px solid #bbb;
+	border-radius: 24rpx;
+	text-align: center;
+	line-height: 46rpx;
+}
 
-</style>
+.noCommodity {
+	background-color: #fff;
+	padding-top: 1rpx;
+	border-top: 0;
+}
+.noCommodity .pictrue {
+	text-align: center;
+	margin: 78rpx auto 56rpx auto;
+}
+</style>

+ 6 - 0
uni.scss

@@ -80,3 +80,9 @@ $font-lg: 32rpx;
 $font-color-base: #606266; //基础
 $font-base: 28rpx;
 $font-color-light: #909399; //灰色
+$page-row-spacing: 30rpx;
+$border-radius-sm: 15rpx;
+$font-color-dark: #303133; //黑
+$border-color-light: #ebeef5; //亮灰
+$font-sm: 24rpx;
+$font-color-spec: #5dbc7c; //可操作文字颜色