hwq 1 year ago
parent
commit
631c67ba04
60 changed files with 1564 additions and 1379 deletions
  1. 9 0
      api/user.js
  2. 4 4
      manifest.json
  3. 16 6
      pages.json
  4. 484 438
      pages/cart/cart.vue
  5. 446 291
      pages/index/index.vue
  6. 43 30
      pages/money/recharge.vue
  7. 2 2
      pages/product/product.vue
  8. 283 148
      pages/public/wxLogin.vue
  9. 1 1
      pages/set/addressManage.vue
  10. 10 2
      pages/user/award.vue
  11. 105 297
      pages/user/shareQrCode.vue
  12. 6 5
      pages/user/team.vue
  13. 7 7
      pages/user/user.vue
  14. 128 137
      pages/user/withdrawal.vue
  15. 10 1
      pages/user/yue.vue
  16. BIN
      static/icon/bkq.png
  17. BIN
      static/icon/gn1.png
  18. BIN
      static/icon/hhh.png
  19. BIN
      static/icon/in1.png
  20. BIN
      static/icon/in2.png
  21. BIN
      static/icon/in3.png
  22. BIN
      static/icon/in4.png
  23. BIN
      static/icon/in5.png
  24. BIN
      static/icon/title.png
  25. BIN
      static/icon/user-top.png
  26. BIN
      static/icon/》.png
  27. BIN
      static/img/add.png
  28. BIN
      static/img/back.png
  29. BIN
      static/img/gift-bg.png
  30. BIN
      static/img/gift-title.png
  31. BIN
      static/img/img12.png
  32. BIN
      static/img/img39.png
  33. BIN
      static/img/img45.png
  34. BIN
      static/img/in-ban.png
  35. BIN
      static/img/index-bg.png
  36. BIN
      static/img/index-icon.png
  37. BIN
      static/img/index-title.png
  38. BIN
      static/img/index1.png
  39. BIN
      static/img/index2.png
  40. BIN
      static/img/index3.png
  41. BIN
      static/img/index4.png
  42. BIN
      static/img/jhq.png
  43. BIN
      static/img/logo.png
  44. BIN
      static/img/shop-bg.png
  45. BIN
      static/img/shop-title.png
  46. BIN
      static/img/sqdl.png
  47. BIN
      static/img/team-bg.png
  48. BIN
      static/img/tg-bg.png
  49. BIN
      static/img/top-bd.png
  50. BIN
      static/tabBar/cart-action.png
  51. BIN
      static/tabBar/cart.png
  52. BIN
      static/tabBar/cate-action.png
  53. BIN
      static/tabBar/cate.png
  54. BIN
      static/tabBar/home-action.png
  55. BIN
      static/tabBar/home.png
  56. BIN
      static/tabBar/user-action.png
  57. BIN
      static/tabBar/user.png
  58. 1 1
      store/index.js
  59. 1 1
      uni.scss
  60. 8 8
      utils/wxAuthorized.js

+ 9 - 0
api/user.js

@@ -161,4 +161,13 @@ export function getLevelList(data) {
 		method: 'get',
 		data
 	})
+}
+
+// 是否过审
+export function version(data) {
+	return request({
+		url: '/api/version',
+		method: 'get',
+		data
+	})
 }

+ 4 - 4
manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "华中康新堂",
+    "name" : "滇润堂",
     "appid" : "__UNI__E0158B1",
     "description" : "",
     "versionName" : "1.0.0",
@@ -58,14 +58,14 @@
     "mp-weixin" : {
         /* 小程序特有相关 */
         "usingComponents" : true,
-        "appid" : "",
+        "appid" : "wx1fc72714ab0fde17",
         "setting" : {
             "urlCheck" : true,
             "minified" : true
         }
     },
     "h5" : {
-        "title" : "华中康新堂",
+        "title" : "滇润堂",
         "domain" : "",
         "router" : {
             "base" : "/index/",
@@ -74,7 +74,7 @@
         "devServer" : {
             "proxy" : {
                 "/api" : {
-                    "target" : "http://kxt.liuniukj.com/api",
+                    "target" : "https://drt.liuniukj.com/api",
                     // "changeOrigin": true,
                     "pathRewrite" : {
                         "/api" : "" // rewrite path

+ 16 - 6
pages.json

@@ -2,7 +2,7 @@
 	"pages": [{
 			"path": "pages/index/index",
 			"style": {
-				"navigationBarTitleText": "华中康新堂",
+				"navigationBarTitleText": "滇润堂",
 				"navigationStyle": "custom"
 			}
 		},
@@ -317,26 +317,36 @@
 			"path": "pages/user/team",
 			"style": {
 				"navigationBarTitleText": "我的推广",
-				"navigationStyle": "custom"
+				"navigationStyle": "custom",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
 			}
 		},
 		{
 			"path": "pages/user/yue",
 			"style": {
 				"navigationBarTitleText": "我的余额",
-				"navigationStyle": "custom"
+				"navigationStyle": "custom",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
 			}
 		}
 	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "华中康新堂",
+		"navigationBarTitleText": "滇润堂",
 		"navigationBarBackgroundColor": "#FFFFFF",
 		"backgroundColor": "#f8f8f8"
 	},
 	"tabBar": {
-		"color": "#C0C4CC",
-		"selectedColor": "#9C0B18",
+		"color": "#666666",
+		"selectedColor": "#418C78",
 		"borderStyle": "black",
 		"backgroundColor": "#ffffff",
 		"list": [{

+ 484 - 438
pages/cart/cart.vue

@@ -5,7 +5,8 @@
 			<image src="/static/error/emptyCart.png" class="emptyImg" mode="aspectFit"></image>
 			<view v-if="hasLogin" class="empty-tips">
 				空空如也
-				<navigator class="navigator" v-if="hasLogin" url="../index/index" open-type="switchTab">随便逛逛></navigator>
+				<navigator class="navigator" v-if="hasLogin" url="../index/index" open-type="switchTab">随便逛逛>
+				</navigator>
 			</view>
 			<view v-else class="empty-tips">
 				空空如也
@@ -27,15 +28,10 @@
 				<block v-for="(item, index) in cartList" :key="item.id">
 					<view class="cart-item" :class="{ 'b-b': index !== cartList.length - 1 }">
 						<view class="image-wrapper">
-							<image
-								:src="item.productInfo.image"
-								:class="[item.loaded]"
-								mode="aspectFill"
-								lazy-load
-								@load="onImageLoad('cartList', index)"
-								@error="onImageError('cartList', index)"
-							></image>
-							<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.checked }" @click="check('item', index)"></view>
+							<image :src="item.productInfo.image" :class="[item.loaded]" mode="aspectFill" lazy-load
+								@load="onImageLoad('cartList', index)" @error="onImageError('cartList', index)"></image>
+							<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.checked }"
+								@click="check('item', index)"></view>
 						</view>
 						<view class="item-right">
 							<text class="clamp title">{{ item.productInfo.store_name }}</text>
@@ -51,9 +47,9 @@
 								:index="index"
 								@eventChange="numberChange"
 							></uni-number-box> -->
-							<view class="munbox flex" >
+							<view class="munbox flex">
 								<image src="../../static/icon/reduce.png" mode="" @click="reduce(item,index)"></image>
-								<input type="number" :value="item.cart_num" disabled/>
+								<input type="number" :value="item.cart_num" disabled />
 								<image src="../../static/icon/add.png" mode="" @click="add(item)"></image>
 							</view>
 						</view>
@@ -64,7 +60,8 @@
 			<!-- 底部菜单栏 -->
 			<view class="action-section">
 				<view class="checkbox">
-					<view class="iconfont iconroundcheckfill icon-checked-box" @click="check('all')" :class="{ 'icon-checked': allChecked }"></view>
+					<view class="iconfont iconroundcheckfill icon-checked-box" @click="check('all')"
+						:class="{ 'icon-checked': allChecked }"></view>
 					<!-- <view class="clear-btn" @click="allChecked ? clearCart() : ''" :class="{ show: allChecked }"><text>清空</text></view> -->
 				</view>
 				<view class="total-box">
@@ -82,472 +79,521 @@
 </template>
 
 <script>
+	// #ifdef H5
 	import weixinObj from "@/plugin/jweixin-module/index.js";
-import { getCartList, getCartNum, cartDel } from '@/api/user.js';
-import { mapState } from 'vuex';
-import uniNumberBox from '@/components/uni-number-box.vue';
-import { saveUrl, interceptor } from '@/utils/loginUtils.js';
-export default {
-	components: {
-		uniNumberBox
-	},
-	data() {
-		return {
-			total: 0, //总价格
-			allChecked: false, //全选状态  true|false
-			empty: false, //空白页现实  true|false
-			cartList: []
-		};
-	},
-	onShow() {
-		// 只有登录时才加载数据
-		if (this.hasLogin) {
-			this.loadData();
-		}
-		weixinObj.hideAllNonBaseMenuItem();
-	},
-	watch: {
-		//显示空白页
-		cartList(e) {
-			let empty = e.length === 0 ? true : false;
-			if (this.empty !== empty) {
-				this.empty = empty;
+	// #endif
+	import {
+		getCartList,
+		getCartNum,
+		cartDel
+	} from '@/api/user.js';
+	import {
+		mapState
+	} from 'vuex';
+	import uniNumberBox from '@/components/uni-number-box.vue';
+	import {
+		saveUrl,
+		interceptor
+	} from '@/utils/loginUtils.js';
+	export default {
+		components: {
+			uniNumberBox
+		},
+		data() {
+			return {
+				total: 0, //总价格
+				allChecked: false, //全选状态  true|false
+				empty: false, //空白页现实  true|false
+				cartList: []
+			};
+		},
+		onShow() {
+			// 只有登录时才加载数据
+			if (this.hasLogin) {
+				this.loadData();
 			}
-		}
-	},
-	computed: {
-		...mapState('user', ['hasLogin'])
-	},
-	methods: {
-		reduce(item,index) {
-			if(item.cart_num == 1) {
+			weixinObj.hideAllNonBaseMenuItem();
+		},
+		watch: {
+			//显示空白页
+			cartList(e) {
+				let empty = e.length === 0 ? true : false;
+				if (this.empty !== empty) {
+					this.empty = empty;
+				}
+			}
+		},
+		computed: {
+			...mapState('user', ['hasLogin'])
+		},
+		methods: {
+			reduce(item, index) {
+				if (item.cart_num == 1) {
+					uni.showModal({
+						content: '删除该商品?',
+						success: e => {
+							if (e.confirm) {
+								this.deleteCartItem(index)
+							}
+						}
+					});
+
+				} else {
+					item.cart_num--
+					this.newNumberChange(item)
+				}
+			},
+			add(item) {
+				console.log(item)
+				if (item.productInfo.stock > item.cart_num) {
+					item.cart_num++
+					this.newNumberChange(item)
+				} else {
+					return
+				}
+			},
+			//请求数据
+			async loadData() {
+				let obj = this;
+				getCartList({})
+					.then(function(e) {
+						// 获取当前购物车物品增加数量
+						let nub = obj.cartList.length;
+						// 获取之前对象数组
+						let aArray = obj.cartList.reverse();
+						// 获取返回数据对象数组
+						let bArray = e.data.valid.reverse();
+						obj.cartList = bArray
+							.map((item, ind) => {
+								// 设置返回数据默认为勾选状态
+								item.checked = true;
+								// 获取相同数组之前对象的数据
+								let carlist = aArray[ind];
+								// 判断之前是否已经加载完毕
+								if (carlist && carlist.loaded == 'loaded') {
+									item.loaded = 'loaded';
+								}
+								return item;
+							})
+							.reverse();
+						obj.calcTotal(); //计算总价
+					})
+					.catch(function(e) {
+						console.log(e);
+					});
+			},
+			//监听image加载完成
+			onImageLoad(key, index) {
+				// 修改载入完成后图片class样式
+				this.$set(this[key][index], 'loaded', 'loaded');
+			},
+			//监听image加载失败
+			onImageError(key, index) {
+				this[key][index].image = '/static/error/errorImage.jpg';
+			},
+			// 跳转到登录页
+			navToLogin() {
+				// 保存地址
+				saveUrl();
+				// 登录拦截
+				interceptor();
+			},
+			//选中状态处理
+			check(type, index) {
+				if (type === 'item') {
+					this.cartList[index].checked = !this.cartList[index].checked;
+				} else {
+					const checked = !this.allChecked;
+					const list = this.cartList;
+					list.forEach(item => {
+						item.checked = checked;
+					});
+					this.allChecked = checked;
+				}
+				this.calcTotal(type);
+			},
+			//数量
+			numberChange(data) {
+				let arr = this.cartList[data.index];
+				arr.cart_num = data.number;
+				getCartNum({
+						id: arr.id,
+						number: data.number
+					})
+					.then(e => {
+						console.log(e);
+					})
+					.catch(function(e) {
+						console.log(e);
+					});
+				this.calcTotal();
+			},
+			newNumberChange(item) {
+				getCartNum({
+						id: item.id,
+						number: item.cart_num
+					})
+					.then(e => {
+						console.log(e);
+					})
+					.catch(function(e) {
+						console.log(e);
+					});
+				this.calcTotal();
+			},
+			//删除
+			deleteCartItem(index) {
+				let list = this.cartList;
+				let row = list[index];
+				let id = row.id;
+				cartDel({
+					ids: id
+				});
+				this.cartList.splice(index, 1);
+				uni.hideLoading();
+				this.calcTotal();
+			},
+			//清空
+			clearCart() {
 				uni.showModal({
-					content: '删除该商品?',
+					content: '清空购物车?',
 					success: e => {
 						if (e.confirm) {
-							this.deleteCartItem(index)
+							let st = this.cartList.map(e => {
+								return e.id;
+							});
+							cartDel({
+								ids: st.join(',')
+							}).then(e => {
+								console.log(e);
+							});
+							this.cartList = [];
 						}
 					}
 				});
-				
-			}else {
-				item.cart_num--
-				this.newNumberChange(item)
-			}
-		},
-		add(item) {
-			console.log(item)
-			if(item.productInfo.stock > item.cart_num) {
-				item.cart_num++
-				this.newNumberChange(item)
-			}else {
-				return 
-			}
-		},
-		//请求数据
-		async loadData() {
-			let obj = this;
-			getCartList({})
-				.then(function(e) {
-					// 获取当前购物车物品增加数量
-					let nub = obj.cartList.length;
-					// 获取之前对象数组
-					let aArray = obj.cartList.reverse();
-					// 获取返回数据对象数组
-					let bArray = e.data.valid.reverse();
-					obj.cartList = bArray
-						.map((item, ind) => {
-							// 设置返回数据默认为勾选状态
-							item.checked = true;
-							// 获取相同数组之前对象的数据
-							let carlist = aArray[ind];
-							// 判断之前是否已经加载完毕
-							if (carlist && carlist.loaded == 'loaded') {
-								item.loaded = 'loaded';
-							}
-							return item;
-						})
-						.reverse();
-					obj.calcTotal(); //计算总价
-				})
-				.catch(function(e) {
-					console.log(e);
-				});
-		},
-		//监听image加载完成
-		onImageLoad(key, index) {
-			// 修改载入完成后图片class样式
-			this.$set(this[key][index], 'loaded', 'loaded');
-		},
-		//监听image加载失败
-		onImageError(key, index) {
-			this[key][index].image = '/static/error/errorImage.jpg';
-		},
-		// 跳转到登录页
-		navToLogin() {
-			// 保存地址
-			saveUrl();
-			// 登录拦截
-			interceptor();
-		},
-		//选中状态处理
-		check(type, index) {
-			if (type === 'item') {
-				this.cartList[index].checked = !this.cartList[index].checked;
-			} else {
-				const checked = !this.allChecked;
-				const list = this.cartList;
+			},
+			//计算总价
+			calcTotal() {
+				let list = this.cartList;
+				if (list.length === 0) {
+					this.empty = true;
+					return;
+				}
+				let total = 0;
+				let checked = true;
 				list.forEach(item => {
-					item.checked = checked;
+					if (item.checked === true) {
+						total += item.productInfo.price * item.cart_num;
+					} else if (checked === true) {
+						checked = false;
+					}
 				});
 				this.allChecked = checked;
-			}
-			this.calcTotal(type);
-		},
-		//数量
-		numberChange(data) {
-			let arr = this.cartList[data.index];
-			arr.cart_num = data.number;
-			getCartNum({ id: arr.id, number: data.number })
-				.then(e => {
-					console.log(e);
-				})
-				.catch(function(e) {
-					console.log(e);
+				this.total = Number(total.toFixed(2));
+			},
+			//创建订单
+			createOrder() {
+				let list = this.cartList;
+				let goodsData = [];
+				list.forEach(item => {
+					if (item.checked) {
+						goodsData.push(item.id);
+					}
 				});
-			this.calcTotal();
-		},
-		newNumberChange(item) {
-			getCartNum({ id: item.id, number: item.cart_num })
-				.then(e => {
-					console.log(e);
-				})
-				.catch(function(e) {
-					console.log(e);
+
+				uni.navigateTo({
+					url: '/pages/order/createOrder?id=' + goodsData.join(',')
 				});
-			this.calcTotal();
-		},
-		//删除
-		deleteCartItem(index) {
-			let list = this.cartList;
-			let row = list[index];
-			let id = row.id;
-			cartDel({
-				ids: id
-			});
-			this.cartList.splice(index, 1);
-			uni.hideLoading();
-			this.calcTotal();
-		},
-		//清空
-		clearCart() {
-			uni.showModal({
-				content: '清空购物车?',
-				success: e => {
-					if (e.confirm) {
-						let st = this.cartList.map(e => {
-							return e.id;
-						});
-						cartDel({
-							ids: st.join(',')
-						}).then(e => {
-							console.log(e);
-						});
-						this.cartList = [];
-					}
-				}
-			});
-		},
-		//计算总价
-		calcTotal() {
-			let list = this.cartList;
-			if (list.length === 0) {
-				this.empty = true;
-				return;
 			}
-			let total = 0;
-			let checked = true;
-			list.forEach(item => {
-				if (item.checked === true) {
-					total += item.productInfo.price * item.cart_num;
-				} else if (checked === true) {
-					checked = false;
-				}
-			});
-			this.allChecked = checked;
-			this.total = Number(total.toFixed(2));
-		},
-		//创建订单
-		createOrder() {
-			let list = this.cartList;
-			let goodsData = [];
-			list.forEach(item => {
-				if (item.checked) {
-					goodsData.push(item.id);
-				}
-			});
-
-			uni.navigateTo({
-				url: '/pages/order/createOrder?id=' + goodsData.join(',')
-			});
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-.container {
-	padding-bottom: 134rpx;
-	background-color: $page-color-base;
-	/* 空白页 */
-	.empty {
-		position: fixed;
-		left: 0;
-		top: 0;
-		width: 100%;
-		height: 100vh;
-		padding-bottom: 100rpx;
-		display: flex;
-		justify-content: center;
-		flex-direction: column;
-		align-items: center;
-		background: #fff;
-		.emptyImg {
-			width: 300rpx;
-			height: 250rpx;
-			margin-bottom: 30rpx;
-		}
-		.empty-tips {
+	.container {
+		padding-bottom: 134rpx;
+		background-color: $page-color-base;
+
+		/* 空白页 */
+		.empty {
+			position: fixed;
+			left: 0;
+			top: 0;
+			width: 100%;
+			height: 100vh;
+			padding-bottom: 100rpx;
 			display: flex;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-disabled;
-			.navigator {
-				color: $uni-color-primary;
-				margin-left: 16rpx;
+			justify-content: center;
+			flex-direction: column;
+			align-items: center;
+			background: #fff;
+
+			.emptyImg {
+				width: 300rpx;
+				height: 250rpx;
+				margin-bottom: 30rpx;
+			}
+
+			.empty-tips {
+				display: flex;
+				font-size: $font-sm + 2rpx;
+				color: $font-color-disabled;
+
+				.navigator {
+					color: $uni-color-primary;
+					margin-left: 16rpx;
+				}
 			}
 		}
 	}
-}
-/* 购物车列表项 */
-.cart-item {
-	width: 710rpx;
-	height: 210rpx;
-	background: #FFFFFF;
-	box-shadow: 0px 0px 10rpx 0rpx rgba(0, 0, 0, 0.1);
-	border-radius: 10rpx;
-	margin: 20rpx auto;
-	
-	display: flex;
-	position: relative;
-	padding: 30rpx 26rpx 30rpx 80rpx;
-	.image-wrapper {
-		width: 150rpx;
-		height: 150rpx;
-		flex-shrink: 0;
-		position: relative;
-		image {
-			border-radius: 8rpx;
-		}
-	}
-	.checkbox {
-		position: absolute;
-		top: 0;
-		bottom: 0;
-		left: -65rpx;
-		margin: auto 0;
-		height: 50rpx;
-		z-index: 8;
-		font-size: 44rpx;
-		line-height: 1;
-		padding: 4rpx;
-		color: $font-color-disabled;
-		background: #fff;
-		border-radius: 50px;
-	}
-	.item-right {
+
+	/* 购物车列表项 */
+	.cart-item {
+		width: 710rpx;
+		height: 210rpx;
+		background: #FFFFFF;
+		box-shadow: 0px 0px 10rpx 0rpx rgba(0, 0, 0, 0.1);
+		border-radius: 10rpx;
+		margin: 20rpx auto;
+
 		display: flex;
-		flex-direction: column;
-		flex: 1;
-		overflow: hidden;
 		position: relative;
-		padding-left: 30rpx;
-		.munbox {
-			width: 144rpx;
-			height: 44rpx;
-			position: absolute;
-			bottom: 0;
-			right: 0;
-			input {
-				display: inline-block;
-				text-align: center;
-			}
+		padding: 30rpx 26rpx 30rpx 80rpx;
+
+		.image-wrapper {
+			width: 150rpx;
+			height: 150rpx;
+			flex-shrink: 0;
+			position: relative;
+
 			image {
-				flex-shrink: 0;
-				width: 44rpx;
-				height: 44rpx;
+				border-radius: 8rpx;
 			}
 		}
-		.title,
-		.price {
-			font-size: $font-base + 2rpx;
-			color: $font-color-dark;
-			height: 40rpx;
-			line-height: 40rpx;
-		}
-		.attr {
-			font-size: $font-sm + 2rpx;
-			color: $font-color-light;
+
+		.checkbox {
+			position: absolute;
+			top: 0;
+			bottom: 0;
+			left: -65rpx;
+			margin: auto 0;
 			height: 50rpx;
-			line-height: 50rpx;
-			
-			font-size: 26rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #999999;
-		}
-		.price {
-			// height: 50rpx;
-			// line-height: 50rpx;
-			padding-top: 20rpx;
-			font-size: 34rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #FF4C4C;
+			z-index: 8;
+			font-size: 44rpx;
+			line-height: 1;
+			padding: 4rpx;
+			color: $font-color-disabled;
+			background: #fff;
+			border-radius: 50px;
 		}
-		.step {
-			margin-top: 20rpx;
+
+		.item-right {
+			display: flex;
+			flex-direction: column;
+			flex: 1;
+			overflow: hidden;
+			position: relative;
+			padding-left: 30rpx;
+
+			.munbox {
+				width: 144rpx;
+				height: 44rpx;
+				position: absolute;
+				bottom: 0;
+				right: 0;
+
+				input {
+					display: inline-block;
+					text-align: center;
+				}
+
+				image {
+					flex-shrink: 0;
+					width: 44rpx;
+					height: 44rpx;
+				}
+			}
+
+			.title,
+			.price {
+				font-size: $font-base + 2rpx;
+				color: $font-color-dark;
+				height: 40rpx;
+				line-height: 40rpx;
+			}
+
+			.attr {
+				font-size: $font-sm + 2rpx;
+				color: $font-color-light;
+				height: 50rpx;
+				line-height: 50rpx;
+
+				font-size: 26rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #999999;
+			}
+
+			.price {
+				// height: 50rpx;
+				// line-height: 50rpx;
+				padding-top: 20rpx;
+				font-size: 34rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FF4C4C;
+			}
+
+			.step {
+				margin-top: 20rpx;
+			}
+
+			.title {
+				font-size: 34rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
 		}
-		.title {
+
+		.del-btn {
+			padding: 4rpx 10rpx;
 			font-size: 34rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #333333;
-		}
-	}
-	.del-btn {
-		padding: 4rpx 10rpx;
-		font-size: 34rpx;
-		height: 50rpx;
-		color: $font-color-light;
-	}
-}
-/* 底部栏 */
-.action-section {
-	/* #ifdef H5 */
-	margin-bottom: 100rpx;
-	/* #endif */
-	position: fixed;
-	left: 30rpx;
-	bottom: 30rpx;
-	z-index: 95;
-	display: flex;
-	align-items: center;
-	width: 690rpx;
-	height: 100rpx;
-	padding: 0 30rpx;
-	background: rgba(255, 255, 255, 0.9);
-	box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
-	border-radius: 16rpx;
-	.checkbox {
-		height: 52rpx;
-		position: relative;
-		.icon-checked-box {
-			border-radius: 50rpx;
-			background-color: #ffffff;
-			width: 52rpx;
-			height: 100%;
-			position: relative;
-			z-index: 5;
-			font-size: 53rpx;
-			line-height: 1;
+			height: 50rpx;
 			color: $font-color-light;
 		}
-		.icon-checked {
-			color: $base-color;
-		}
-	}
-	.clear-btn {
-		position: absolute;
-		left: 26rpx;
-		top: 0;
-		z-index: 4;
-		width: 0;
-		height: 52rpx;
-		line-height: 52rpx;
-		padding-left: 38rpx;
-		font-size: $font-base;
-		color: #fff;
-		background: $font-color-disabled;
-		border-radius: 0 50px 50px 0;
-		opacity: 0;
-		transition: 0.2s;
-		&.show {
-			opacity: 1;
-			width: 120rpx;
-		}
 	}
-	.total-box {
-		flex: 1;
+
+	/* 底部栏 */
+	.action-section {
+		/* #ifdef H5 */
+		margin-bottom: 100rpx;
+		/* #endif */
+		position: fixed;
+		left: 30rpx;
+		bottom: 30rpx;
+		z-index: 95;
 		display: flex;
-		flex-direction: column;
-		text-align: right;
-		padding-right: 40rpx;
-		
-		.price {
-			font-size: 36rpx;
-			color: $font-color-dark;
+		align-items: center;
+		width: 690rpx;
+		height: 100rpx;
+		padding: 0 30rpx;
+		background: rgba(255, 255, 255, 0.9);
+		box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
+		border-radius: 16rpx;
+
+		.checkbox {
+			height: 52rpx;
+			position: relative;
+
+			.icon-checked-box {
+				border-radius: 50rpx;
+				background-color: #ffffff;
+				width: 52rpx;
+				height: 100%;
+				position: relative;
+				z-index: 5;
+				font-size: 53rpx;
+				line-height: 1;
+				color: $font-color-light;
+			}
+
+			.icon-checked {
+				color: $base-color;
+			}
 		}
-		.coupon {
-			font-size: $font-sm;
-			color: $font-color-light;
-			text {
+
+		.clear-btn {
+			position: absolute;
+			left: 26rpx;
+			top: 0;
+			z-index: 4;
+			width: 0;
+			height: 52rpx;
+			line-height: 52rpx;
+			padding-left: 38rpx;
+			font-size: $font-base;
+			color: #fff;
+			background: $font-color-disabled;
+			border-radius: 0 50px 50px 0;
+			opacity: 0;
+			transition: 0.2s;
+
+			&.show {
+				opacity: 1;
+				width: 120rpx;
+			}
+		}
+
+		.total-box {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			text-align: right;
+			padding-right: 40rpx;
+
+			.price {
+				font-size: 36rpx;
 				color: $font-color-dark;
 			}
+
+			.coupon {
+				font-size: $font-sm;
+				color: $font-color-light;
+
+				text {
+					color: $font-color-dark;
+				}
+			}
 		}
-	}
-	.confirm-btn {
-		padding: 0 38rpx;
-		margin: 0;
-		border-radius: 100px;
-		height: 76rpx;
-		line-height: 76rpx;
-		font-size: $font-base + 2rpx;
-		background: $base-color;
-	}
-}
-/* 复选框选中状态 */
-.action-section .checkbox.checked,
-.cart-item .checkbox.checked {
-	color: $base-color;
-}
-.cart-hand {
-	width: 750rpx;
-	height: 88rpx;
-	background: #FFFFFF;
-	font-size: 30rpx;
-	font-family: PingFang SC;
-	font-weight: bold;
-	color: #333333;
-	line-height: 88rpx;
-	padding-left: 28rpx;
-	padding-right: 26rpx;
-	.hand-tit {
-		text {
-			color: #FF4C4C;
+
+		.confirm-btn {
+			padding: 0 38rpx;
+			margin: 0;
+			border-radius: 100px;
+			height: 76rpx;
+			line-height: 76rpx;
+			font-size: $font-base + 2rpx;
+			background: $base-color;
 		}
-	
 	}
-	.hand-btn {
-		width: 164rpx;
-		height: 62rpx;
-		border: 2rpx solid #FF4C4C;
-		border-radius: 31rpx;
-		font-size: 26rpx;
+
+	/* 复选框选中状态 */
+	.action-section .checkbox.checked,
+	.cart-item .checkbox.checked {
+		color: $base-color;
+	}
+
+	.cart-hand {
+		width: 750rpx;
+		height: 88rpx;
+		background: #FFFFFF;
+		font-size: 30rpx;
 		font-family: PingFang SC;
 		font-weight: bold;
-		color: #FF4C4C;
-		line-height: 62rpx;
-		text-align: center;
+		color: #333333;
+		line-height: 88rpx;
+		padding-left: 28rpx;
+		padding-right: 26rpx;
+
+		.hand-tit {
+			text {
+				color: #FF4C4C;
+			}
+
+		}
+
+		.hand-btn {
+			width: 164rpx;
+			height: 62rpx;
+			border: 2rpx solid #FF4C4C;
+			border-radius: 31rpx;
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #FF4C4C;
+			line-height: 62rpx;
+			text-align: center;
+		}
 	}
-}
-</style>
+</style>

+ 446 - 291
pages/index/index.vue

@@ -2,90 +2,114 @@
 	<view class="container">
 		<!-- 顶部logo and 搜索 start-->
 		<view class="status_bar"></view>
-		<view class="top-bg">
-			<image src="../../static/img/index-bg.png" mode=""></image>
+		<view class="bg">
+			<image src="../../static/img/index-bg.png" mode="widthFix"></image>
 		</view>
-		<view class="top-search flex">
-			<view class="search-box flex" @click="clickSearch()">
-				<image class="search" src="../../static/icon/search-h.png" mode=""></image>
-				<view class="search-font">输入关键词搜索</view>
-			</view>
+		<view class="index-title">
+			<image class="index-title-bg" src="../../static/img/index-title.png" mode="widthFix"></image>
 		</view>
-		<!-- 顶部logo and 搜索 end-->
-		<view class="jg" style="background-color: #fff;"></view>
-		<!-- 轮播图 start -->
-		<swiper class="top-swiper" autoplay="true" duration="400" interval="5000" @change="swiperChange">
-			<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item"
-				@click="bannerNavToUrl(item)">
-				<image :src="item.pic" />
-			</swiper-item>
-		</swiper>
-		<!-- 轮播图 end -->
-		<!-- 分类 start -->
-		<view class="cate-section flex">
-			<view class="cate-item flex" @click="navto('/pages/category/category')">
-				<view class="img-wrapper flex">
-					<image src="../../static/icon/in1.png" mode=""></image>
-				</view>
-				<view class="item-title">全部商品</view>
+		<!-- 分类start -->
+		<view class="care">
+			<view class="title">
+				<image class="title-icon" src="../../static/img/index-icon.png" mode="widthFix"></image>
+				<view class="title-font">傣方美颜 · 解锁福利</view>
+				<view class="title-font title-tip">走进滇润堂</view>
 			</view>
-			<view class="cate-item flex" @click="navto('/pages/index/artDetail?id=1')">
-				<view class="img-wrapper flex">
-					<image src="../../static/icon/in2.png" mode=""></image>
+			<view class="care-main flex">
+				<view class="care-item shang" @click="navto('/pages/category/category')">
+					<image src="../../static/img/index1.png" mode="widthFix"></image>
 				</view>
-				<view class="item-title">公司介绍</view>
-			</view>
-			<view class="cate-item flex" @click="navTo('/pages/product/classify?type=3')">
-				<view class="img-wrapper flex">
-					<image src="../../static/icon/in5.png" mode=""></image>
+				<view class="care-item" @click="navto('/pages/index/artDetail?id=1')">
+					<image src="../../static/img/index2.png" mode="widthFix"></image>
 				</view>
-				<view class="item-title">爆款区</view>
-			</view>
-			<view class="cate-item flex" @click="openKf">
-				<view class="img-wrapper flex">
-					<image src="../../static/icon/in3.png" mode=""></image>
+				<view class="care-item" @click="navto('/pages/user/shareQrCode',1)">
+					<image src="../../static/img/index3.png" mode="widthFix"></image>
 				</view>
-				<view class="item-title">联系客服</view>
-			</view>
-			<view class="cate-item flex" @click="navto('/pages/user/shareQrCode',1)">
-				<view class="img-wrapper flex">
-					<image src="../../static/icon/in4.png" mode=""></image>
+				<view class="care-item shang" @click="openKf()">
+					<image src="../../static/img/index4.png" mode="widthFix"></image>
 				</view>
-				<view class="item-title">邀请有礼</view>
 			</view>
 		</view>
-		<!-- 分类 ed -->
-		<!-- 进货商品列表 start -->
-		<view v-if="userInfo && userInfo. is_power == 1" class="jhq" @click="navTo('/pages/product/classify?type=2')">
-			<image src="../../static/img/jhq.png" mode="widthFix">
-			</image>
+		<!-- 分类end -->
+		<!-- 明星商品start -->
+		<view class="gift-box">
+			<view class="title">
+				<image class="title-icon" src="../../static/img/index-icon.png" mode="widthFix"></image>
+				<view class="title-font">古方养颜 · 傣族美学</view>
+				<view class="title-font title-tip">明星礼包套餐</view>
+			</view>
+			<view class="gift">
+				<view class="gift-item" v-for="(item,index) in goodList"
+					@click="navto('/pages/product/product?id=' + item.id)">
+					<view class="gift-bg">
+						<image src="../../static/img/gift-bg.png" mode=""></image>
+					</view>
+					<view class="gift-image">
+						<image class="gift-image-bg" :src="item.image" mode=""></image>
+						<view class="gift-image-title">
+							<view class="gift-title-bg">
+								<image src="../../static/img/gift-title.png" mode=""></image>
+							</view>
+							<!-- <view class="gift-title-font">
+								爆款
+								直降
+							</view> -->
+						</view>
+					</view>
+					<view class="gift-info">
+						<view class="gift-title">明星产品 清润养肤</view>
+						<view class="gift-title name clamp">{{ item.store_name }}</view>
+						<view class="gift-btn-box">
+							<view class="gift-price">
+								钜惠价: <text class="gift-num">¥{{ item.price*1 }}</text>
+							</view>
+							<view class="gift-btn">
+								立即抢购 >
+							</view>
+						</view>
+					</view>
+
+				</view>
+			</view>
 		</view>
-		<!-- 进货商品列表 ed-->
-		<view class="jg"></view>
-		<!-- 普通商品列表start -->
-		<view class="goodsList">
-			<view class="goodsList-title">
-				<image src="../../static/icon/title.png" mode=""></image>
+		<!-- 明星商品end -->
+		<!-- 普通商品start -->
+		<view class="shop-box">
+			<view class="title">
+				<image class="title-icon" src="../../static/img/index-icon.png" mode="widthFix"></image>
+				<view class="title-font">古方养颜 · 傣族美学</view>
+				<view class="title-font title-tip">爆款商品为您推荐</view>
 			</view>
-			<view class="goodsList-box flex">
-				<view class="goodsList-item" :key="ind" v-for="(ls, ind) in firstList"
-					@click="navTo('/pages/product/product?id=' + ls.id)">
-					<view class="image-wrapper">
-						<image class="image" :src="ls.image" mode=" scaleToFill"></image>
+			<view class="shop-main flex">
+				<view class="shop-item" v-for="(item,index) in firstList"
+					@click="navto('/pages/product/product?id=' + item.id)">
+					<view class="shop-bg">
+						<image src="../../static/img/shop-bg.png" mode=""></image>
 					</view>
-					<view class="title clamp2">
-						{{ ls.store_name }}
+					<view class="shop-image">
+						<image class="shop-image-bg" :src="item.image" mode=""></image>
+						<!-- <view class="shop-image-title">
+							<view class="shop-title-bg">
+								<image src="../../static/img/shop-title.png" mode=""></image>
+							</view>
+						</view> -->
 					</view>
-					<view class="hot-price">
-						<view class="price">
-							¥{{ ls.price * 1 }}
-							<text class="ot-price" v-if="ls.ot_price*1>ls.price*1">¥{{ls.ot_price}}</text>
+					<view class="shop-info">
+						<view class="shop-title">花容清透 养肤美颜</view>
+						<view class="shop-title shop-name clamp">{{ item.store_name }}</view>
+						<view class="shop-btn-box">
+							<view class="shop-price">
+								钜惠价: <text class="shop-num">¥{{ item.price*1 }}</text>
+							</view>
+							<view class="shop-btn">
+								立即抢购 >
+							</view>
 						</view>
 					</view>
 				</view>
 			</view>
 		</view>
-		<!-- 普通商品列表end -->
+		<!-- 普通商品end -->
 		<uni-popup ref="popupkf" type="center">
 			<view class="popup-box">
 				<view class="img">
@@ -140,18 +164,18 @@
 		data() {
 			return {
 				text: '', //客服微信
-				current: 0,
+				page: 1,
+				limit: 10,
+				loadingType: 'more',
 				swiperHeight: 0,
 				checkid: 0,
 				titleNViewBackground: '',
 				swiperCurrent: 0,
 				swiperLength: 0,
 				carouselList: [], //轮播列表
-				page: 1,
-				limit: 100,
-				loadingType: 'more',
 				firstList: [],
-				shareImage: '',
+				goodList: [], //商品列表
+				shopList: []
 			};
 		},
 		computed: {
@@ -166,7 +190,7 @@
 			let shareObj = {}
 			if (this.userInfo.uid) {
 				shareObj = {
-					title: this.userInfo.nickname + '邀请您加入华中康新堂', // 默认是小程序的名称(可以写slogan等)
+					title: this.userInfo.nickname + '邀请您加入滇润堂', // 默认是小程序的名称(可以写slogan等)
 					path: url + '?scene=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
 					imageUrl: '',
 					success: function(res) {
@@ -184,7 +208,7 @@
 				};
 			} else {
 				shareObj = {
-					title: '华中康新堂', // 默认是小程序的名称(可以写slogan等)
+					title: '滇润堂', // 默认是小程序的名称(可以写slogan等)
 					path: url, // 默认是当前页面,必须是以‘/’开头的完整路径
 					imageUrl: '',
 					success: function(res) {
@@ -204,10 +228,13 @@
 
 			return shareObj;
 		},
-		onReachBottom() {
-			this.getgroom();
-		},
 		onLoad: function(option) {
+			// #ifndef MP
+			if (option.spread) {
+				// 存储其他邀请人
+				uni.setStorageSync('spread', option.spread);
+			}
+			// #endif
 			// #ifdef MP
 			if (option.scene) {
 				// 存储小程序邀请人
@@ -219,50 +246,30 @@
 			// #endif
 		},
 		onShow: function() {
-			this.page = 1;
-			this.limit = 100;
-			this.loadingType = 'more';
-			this.firstList = []
+			this.getGoodList();
 			this.loadData();
-			this.getgroom();
-			if (this.hasLogin) {
-				this.getuser()
-			}
 		},
 		methods: {
 			...mapMutations('user', ['setUserInfo']),
-			getuser() {
-				getUserInfo({})
-					.then(({
-						data
-					}) => {
-						this.setUserInfo(data);
-					})
-					.catch(e => {
-						console.log(e);
-					});
-
-			},
-			getgroom() {
-				const obj = this
-				if (obj.loadingType == 'nomore' || obj.loadingType == 'loading') {
-					return
+			getGoodList() {
+				let obj = this;
+				if (obj.loadingType == 'loading' || obj.loadingType == 'noMore') {
+					return;
 				}
-				obj.loadingType = 'loading'
-				groom({
-					page: this.page,
-					limit: this.limit
-				}, 3).then(({
-					data
-				}) => {
-					console.log(data, '123456');
-					obj.firstList = obj.firstList.concat(data.list)
-					if (obj.limit == data.list.length) {
-						obj.loadingType = 'more'
+				obj.loadingType = 'loading';
+				getProducts({
+					page: 1,
+					limit: 1000,
+					set_vip: 1
+				}).then(res => {
+					obj.goodList = res.data;
+					if (obj.limit == res.data.length) {
+						obj.page++;
+						obj.loadingType = 'more';
 					} else {
-						obj.loadingType = 'nomore'
+						obj.loadingType = 'noMore';
 					}
-				})
+				});
 			},
 			navto(url, type = 0) {
 				if (type == 1) {
@@ -320,7 +327,10 @@
 						console.log(goods, '商品信息');
 						this.carouselList = data.banner;
 						this.swiperLength = this.carouselList.length;
-						// this.firstList = data.info.firstList //首页商品
+						data.info.firstList.forEach(e => {
+							e.isVip = e.store_type ? '3' : '0';
+						});
+						this.firstList = data.info.firstList; //首页商品
 						uni.stopPullDownRefresh();
 					})
 					.catch(e => {
@@ -411,138 +421,369 @@
 	page {
 		min-height: 100%;
 		height: auto;
-		background: #ffffff;
+		background: #c3e3e0;
 	}
 
-	.top-bg {
+	.bg {
 		position: absolute;
 		top: 0;
 		left: 0;
 		right: 0;
 		width: 750rpx;
-		height: 346rpx;
 
 		image {
 			width: 100%;
-			height: 100%;
 		}
 	}
 
-	// 顶部搜索
-	.top-search {
+	.index-title {
 		position: relative;
 		z-index: 2;
-		height: 80rpx;
-		padding: 0 20rpx;
-		// background-color: #fff;
+		width: 582rpx;
+		height: 585rpx;
+		padding-top: 100rpx;
+		margin: 0 auto;
 
-		.top-logo {
-			width: 50rpx;
-			// height: 50rpx;
-			margin-right: 10rpx;
+		.index-title-bg {
+			width: 100%;
+		}
+	}
 
-			image {
-				width: 48rpx;
-			}
+	.title {
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
 
+		.title-icon {
+			width: 30rpx;
 		}
 
-		.search-box {
-			justify-content: center;
-			width: 698rpx;
-			height: 60rpx;
-			background: rgba(#ffffff, 0.47);
-			box-shadow: 0rpx 9rpx 21rpx 0rpx rgba(4, 114, 69, 0.22);
-			border-radius: 30rpx;
-
-			.search {
-				width: 34rpx;
-				height: 34rpx;
-			}
+		.title-font {
+			margin-top: 20rpx;
+			position: relative;
+			z-index: 2;
+			font-size: 42rpx;
+			font-family: Source Han Serif SC;
+			font-weight: bold;
+			color: #2E6D5C;
+			// text-shadow: 0rpx 0rpx 0rpx #FFFFFF;
+
+			background: linear-gradient(-84deg, #235144 0%, #3a8a74 100%);
+			-webkit-background-clip: text;
+			-webkit-text-fill-color: transparent;
+		}
 
-			.search-font {
-				margin-left: 14rpx;
-				font-size: 28rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #FFFFFF;
-			}
+		.title-tip {
+			font-size: 26rpx;
 		}
 	}
 
-	// 顶部轮播图
-	.top-swiper {
-		margin: 20rpx auto 0;
-		width: 700rpx;
-		border-radius: 14rpx;
+	.care {
+		margin-top: 54rpx;
 
-		image {
-			width: 700rpx;
-			height: 300rpx;
-		}
-	}
+		.care-main {
+			justify-content: space-around;
+			margin-top: 25rpx;
+			padding: 0 20rpx;
 
-	.swiper-btm {
-		height: 60rpx;
-		width: 750rpx;
-		background-color: #fff;
-		margin-bottom: 20rpx;
-		font-size: 26rpx;
-		font-weight: 500;
-		color: #333333;
-
-		.btm-item {
-			flex-grow: 1;
-			justify-content: center;
+			.care-item {
+				position: relative;
+				z-index: 2;
+				width: 144rpx;
 
-			image {
-				width: 25rpx;
-				height: 25rpx;
-				margin-right: 14rpx;
+				image {
+					width: 100%;
+				}
+			}
+
+			.shang {
+				top: -50rpx;
 			}
 		}
 	}
 
-	.jg {
-		height: 20rpx;
-		background: #F8F8F8;
+	.gift-box {
+		margin-top: 40rpx;
+
+		.gift {
+			margin-top: 36rpx;
+
+			.gift-item {
+				position: relative;
+				width: 690rpx;
+				margin: 0 auto 60rpx;
+				display: flex;
+				align-items: flex-start;
+				padding: 50rpx 38rpx 56rpx;
+
+				.gift-bg {
+					position: absolute;
+					top: 0;
+					left: 0;
+					right: 0;
+					width: 100%;
+					height: 100%;
+
+					image {
+						width: 100%;
+						height: 100%;
+					}
+				}
+
+				.gift-image {
+					position: relative;
+					z-index: 2;
+					width: 233rpx;
+					height: 233rpx;
+					background: #FFFFFF;
+					border-radius: 13rpx;
+
+					.gift-image-bg {
+						width: 233rpx;
+						height: 233rpx;
+						border-radius: 13rpx;
+					}
+
+					.gift-image-title {
+						position: absolute;
+						top: -30rpx;
+						right: -20rpx;
+						width: 72rpx;
+						height: 72rpx;
+
+						.gift-title-bg {
+							position: absolute;
+							top: 0;
+							right: 0;
+							left: 0;
+							width: 72rpx;
+							height: 72rpx;
+
+							image {
+								width: 100%;
+								height: 100%;
+							}
+						}
+
+						.gift-title-font {
+							text-align: center;
+							position: relative;
+							z-index: 2;
+							font-size: 20rpx;
+							font-family: Source Han Serif SC;
+							font-weight: bold;
+							color: #FFF3E4;
+
+						}
+					}
+				}
+
+				.gift-info {
+					width: 60%;
+					margin-left: 32rpx;
+					position: relative;
+
+					.gift-title {
+						font-size: 38rpx;
+						font-family: Source Han Serif SC;
+						font-weight: bold;
+						color: #2E6D5C;
+
+						background: linear-gradient(-84deg, #235144 0%, #3a8a74 100%);
+						-webkit-background-clip: text;
+						-webkit-text-fill-color: transparent;
+					}
+
+					.name {
+						margin-top: 20rpx;
+						font-size: 24rpx;
+					}
+
+					.gift-btn-box {
+						width: auto;
+						margin-top: 90rpx;
+						display: flex;
+						justify-content: space-between;
+						align-items: center;
+						background: #FFFFFF;
+						border: 1px solid #F26150;
+						border-radius: 34rpx;
+						height: 50rpx;
+
+						.gift-price {
+							padding-left: 10rpx;
+							font-size: 18rpx;
+							font-family: FZYanSongS-DB-GB;
+							font-weight: 400;
+							color: #E36847;
+
+							.gift-num {
+								font-size: 30rpx;
+							}
+						}
+
+						.gift-btn {
+							padding: 0 20rpx;
+							height: 50rpx;
+							margin-left: 20rpx;
+							background: #E36847;
+							border-radius: 34rpx;
+							display: flex;
+							justify-content: center;
+							align-items: center;
+							font-size: 17rpx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #FFFFFF;
+						}
+					}
+				}
+			}
+		}
 	}
 
-	// 分类
-	.cate-section {
-		justify-content: space-around;
-		background-color: #fff;
-		padding: 30rpx 0 30rpx;
+	.shop-box {
+		margin-top: 40rpx;
 
-		.cate-item {
-			flex-grow: 0;
-			width: 20%;
-			flex-direction: column;
-			text-align: center;
-			align-items: center;
-			justify-content: center;
+		.shop-main {
+			margin: 36rpx 0 0 36rpx;
+			flex-wrap: wrap;
+			justify-content: flex-start;
 
-			.img-wrapper {
-				width: 100rpx;
-				height: 100rpx;
-				border-radius: 20rpx;
+			.shop-item {
 				position: relative;
+				width: 358rpx;
+				margin: 0 0 60rpx;
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				justify-content: center;
+				padding: 44rpx 50rpx 10rpx 40rpx;
 
-				image {
+				.shop-bg {
+					position: absolute;
+					top: 0;
+					left: 0;
+					right: 0;
 					width: 100%;
 					height: 100%;
-					position: absolute;
-					left: 50%;
-					top: 50%;
-					transform: translate(-50%, -50%);
+
+					image {
+						width: 100%;
+						height: 100%;
+					}
 				}
-			}
 
-			.item-title {
-				margin-top: 15rpx;
-				font-size: 24rpx;
-				font-weight: 500;
-				color: #333333;
+				.shop-image {
+					position: relative;
+					z-index: 2;
+					width: 230rpx;
+					height: 230rpx;
+					background: #FFFFFF;
+					border-radius: 13rpx;
+
+					.shop-image-bg {
+						width: 233rpx;
+						height: 233rpx;
+						border-radius: 13rpx;
+					}
+
+					.shop-image-title {
+						position: absolute;
+						top: -30rpx;
+						right: -20rpx;
+						width: 72rpx;
+						height: 72rpx;
+
+						.shop-title-bg {
+							position: absolute;
+							top: 0;
+							right: 0;
+							left: 0;
+							width: 72rpx;
+							height: 72rpx;
+
+							image {
+								width: 100%;
+								height: 100%;
+							}
+						}
+
+						.shop-title-font {
+							text-align: center;
+							position: relative;
+							z-index: 2;
+							font-size: 20rpx;
+							font-family: Source Han Serif SC;
+							font-weight: bold;
+							color: #FFF3E4;
+
+						}
+					}
+				}
+
+				.shop-info {
+					position: relative;
+					z-index: 2;
+					width: 100%;
+				}
+
+				.shop-title {
+					margin-top: 20rpx;
+					font-size: 32rpx;
+					font-family: Source Han Serif SC;
+					font-weight: bold;
+					color: #2E6D5C;
+
+					background: linear-gradient(-84deg, #235144 0%, #3a8a74 100%);
+					-webkit-background-clip: text;
+					-webkit-text-fill-color: transparent;
+				}
+
+				.shop-name {
+					text-align: center;
+					margin-top: 20rpx;
+					font-size: 20rpx;
+				}
+
+				.shop-btn-box {
+					margin-top: 12rpx;
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					background: #FFFFFF;
+					border: 1px solid #F26150;
+					border-radius: 34rpx;
+					height: 50rpx;
+
+					.shop-price {
+						padding-left: 10rpx;
+						font-size: 16rpx;
+						font-family: FZYanSongS-DB-GB;
+						font-weight: 400;
+						color: #E36847;
+
+						.shop-num {
+							font-size: 26rpx;
+						}
+					}
+
+					.shop-btn {
+						padding: 0 20rpx;
+						height: 50rpx;
+						margin-left: 20rpx;
+						background: #E36847;
+						border-radius: 34rpx;
+						display: flex;
+						justify-content: center;
+						align-items: center;
+						font-size: 14rpx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #FFFFFF;
+					}
+				}
 			}
 		}
 	}
@@ -634,90 +875,4 @@
 			}
 		}
 	}
-
-	.jhq {
-		margin: 0 auto;
-		width: 750rpx;
-
-		image {
-			width: 100%;
-		}
-	}
-
-	.goodsList {
-		background: #FFFFFF;
-		padding-top: 41rpx;
-
-		.goodsList-title {
-			margin: 0 auto 32rpx;
-			width: 376rpx;
-			height: 34rpx;
-
-			image {
-				width: 100%;
-				height: 100%;
-			}
-		}
-	}
-
-	.goodsList-box {
-		background: #FFFFFF;
-		padding: 26rpx 20rpx 20rpx;
-		flex-wrap: wrap;
-
-		.goodsList-item {
-			width: 345rpx;
-			background-color: #ffffff;
-			border-radius: 12rpx;
-			box-shadow: 0 0 15rpx rgba(0, 0, 0, 0.2);
-			margin-bottom: 20rpx;
-
-			.image-wrapper {
-				width: 345rpx;
-				height: 345rpx;
-				border-radius: 3px;
-				position: relative;
-
-				.image {
-					width: 100%;
-					height: 100%;
-					opacity: 1;
-					border-radius: 12rpx 12rpx 0 0;
-				}
-			}
-
-			.title {
-				margin-top: 24rpx;
-				padding: 0 20rpx;
-				font-size: 32rpx;
-				font-weight: 500;
-				color: #333333;
-			}
-
-			.hot-price {
-				display: flex;
-				justify-content: flex-start;
-				align-items: center;
-
-				.price {
-					margin-left: 10rpx;
-					font-size: 36rpx;
-					color: #9C0B18;
-					font-weight: 500;
-					display: flex;
-					justify-content: flex-start;
-					align-items: center;
-
-					.ot-price {
-						margin-left: 7rpx;
-						font-size: 26rpx;
-						font-weight: 500;
-						text-decoration: line-through;
-						color: #999999;
-					}
-
-				}
-			}
-		}
-	}
 </style>

+ 43 - 30
pages/money/recharge.vue

@@ -56,8 +56,12 @@
 	} from '@/utils/rocessor.js';
 	import {
 		rechargeWechat,
-		getRechargePrice
+		getRechargePrice,
+		rechargeRoutine
 	} from '@/api/wallet.js';
+	// #ifdef H5
+	import weichatObj from '@/plugin/jweixin-module/index.js';
+	// #endif
 	import {
 		mapState,
 		mapMutations
@@ -142,6 +146,7 @@
 					});
 					return
 				}
+				// #ifdef H5
 				rechargeWechat({
 						price: this.money,
 						from: this.type,
@@ -149,9 +154,8 @@
 					})
 					.then(e => {
 						console.log(e);
-						// #ifdef H5
 						let da = e.data.data;
-						obj.weichatObj.chooseWXPay({
+						weichatObj.chooseWXPay({
 							timestamp: da.timestamp,
 							nonceStr: da.nonceStr,
 							package: da.package,
@@ -174,38 +178,47 @@
 									});
 							}
 						});
-						// #endif
-						// #ifdef APP-PLUS
-						uni.requestPayment({
-							provider: 'wxpay',
-							orderInfo: e.data.data,
-							success: function() {
-								uni.showToast({
-									title: '充值成功',
-									duration: 2000,
-									position: 'top'
-								});
-								getUserInfo()
-									.then(({
-										data
-									}) => {
-										obj.setUserInfo(data);
-									})
-									.catch(e => {
-										console.log(e);
-									});
-							},
-							fail(e) {
-								console.log(e);
-							}
-						});
-						// #endif
 						obj.payLoding = false;
 					})
 					.catch(e => {
 						obj.payLoding = false;
 						console.log(e);
 					});
+				// #endif
+				// #ifndef H5
+				rechargeRoutine({
+					price: this.money,
+					from: this.type,
+					rechar_id: this.chooseId
+				}).then(e => {
+					uni.requestPayment({
+						provider: 'wxpay',
+						orderInfo: e.data.data,
+						success: function() {
+							uni.showToast({
+								title: '充值成功',
+								duration: 2000,
+								position: 'top'
+							});
+							getUserInfo()
+								.then(({
+									data
+								}) => {
+									obj.setUserInfo(data);
+								})
+								.catch(e => {
+									console.log(e);
+								});
+							obj.payLoding = false;
+						},
+						fail(e) {
+							obj.payLoding = false;
+							console.log(e);
+						}
+					});
+				})
+
+				// #endif
 			},
 			comfirm() {
 				let obj = this
@@ -235,7 +248,7 @@
 			changemoney(item, index, id) {
 				this.choose = index;
 				this.money = item * 1;
-				this.chooseId = id
+				// this.chooseId = id
 			}
 		}
 	};

+ 2 - 2
pages/product/product.vue

@@ -1303,11 +1303,11 @@
 				background: #ffb238;
 
 				&.buy-now-btn {
-					background-color: #ce878e;
+					background-color: #ffb238;
 				}
 
 				&.add-cart-btn {
-					background: #9c0b18;
+					background: #418c78;
 				}
 			}
 		}

+ 283 - 148
pages/public/wxLogin.vue

@@ -3,84 +3,105 @@
 		<!-- #ifndef H5 -->
 		<!-- <image class="bg-img" :src="baseURL+urlFile+'/img/img09.png'" mode=" scaleToFill"></image> -->
 		<view class="logo-img-box">
-			<image class="logo-img" src="https://hongmd.liuniu946.com/static/img/hmdlogo.png" mode=" aspectFit"></image>
-			<button class="userInfo" type="warn" @click="isclick?'':userInfoData()" :class="{'nocaction': isclick}">
+			<image class="logo-img" src="../../static/img/logo.png" mode=" aspectFit"></image>
+			<!-- 获取头像登录 -->
+			<!-- <button class="userInfo" type="warn" @click="isclick?'':userInfoData()" :class="{'nocaction': isclick}">
 				<text class="iconfont iconweixin"></text>
 				<text>
 				微信授权登录
 				</text>
-			</button>
+			</button> -->
+			<!-- 获取手机号登录 -->
+			<template v-if="!hasphone">
+				<button class="userInfo" type="warn" :class="{ nocaction: isclick }" open-type="getPhoneNumber"
+					@getphonenumber="getPhoneNumber">
+					<!-- <text class="iconfont iconweixin"></text> -->
+					<text>手机号快捷登录</text>
+				</button>
+			</template>
+			<template v-if="hasphone">
+				<button class="userInfo" type="warn" :class="{ nocaction: isclick }"
+					@click="isclick ? '' : userInfoData()">
+					<!-- <text class="iconfont iconweixin"></text> -->
+					<text>手机号快捷登录</text>
+				</button>
+			</template>
+
+			<!-- 550*450 -->
+			<uni-popup ref="popupsq" type="center">
+				<view class="popupsq-wrap">
+					<view class=""
+						style="text-align: center;font-size: 32rpx;font-weight: bold;padding: 40rpx 0;color: #000;">滇润堂
+					</view>
+					<view class="" style="font-size: 26rpx;padding-bottom: 35rpx;color: #000;">该程序获取以下授权:</view>
+					<view class="" style="font-size: 26rpx;color:#b7b7b7;">获取您的公开信息(昵称,头像),以便于个性话头像和昵称</view>
+					<view class="flex" style="padding-top: 40rpx;">
+						<view class="btn qx" style="" @click="close()">取消</view>
+						<view class="btn qr" style="" @click="isclick ? '' : userInfoData()">确认授权</view>
+					</view>
+				</view>
+			</uni-popup>
 		</view>
 		<!-- #endif -->
 	</view>
 </template>
 
 <script>
-	import { getUserInfo } from '@/api/login.js';
-// #ifdef H5
-import { loginWinxin } from '@/utils/wxAuthorized';
-// #endif
-// #ifdef MP-WEIXIN
-import { loginWinxinMp } from '@/utils/wxMinProgram';
-import { wechatMpAuth } from '@/api/wx';
-// #endif
-import { mapMutations,mapState } from 'vuex';
-export default {
-	data() {
-		return {
-			userInfo:{},//授权用户信息
-			code:'',//授权code
-			isclick: false,//是否点击了
-		};
-	},
-	onLoad(option) {
-		this.loadData();
-	},
-	computed: {
-		// ...mapState(['baseURL','urlFile']) 
-	},
-	methods: {
-		// ...mapMutations(['login', 'setUserInfo']),
-		...mapMutations('user',['login', 'setUserInfo']),
-		loadData() {
-			let obj = this;
-			// #ifdef H5
-			loginWinxin();
-			// #endif
-			// #ifdef MP-WEIXIN
-			loginWinxinMp().then(() => {
-					wx.login({
-						success(e) {
-							console.log(e,'loginWinxinMp');
-							obj.code = e.code;
-						},
-						fill:function (e) {
-							console.log(e)
-						}
-					})
-			});
-			// #endif
+	import {
+		getUserInfo
+	} from '@/api/login.js';
+	// #ifdef H5
+	import {
+		loginWinxin
+	} from '@/utils/wxAuthorized';
+	// #endif
+	// #ifdef MP-WEIXIN
+	import {
+		loginWinxinMp
+	} from '@/utils/wxMinProgram';
+	import {
+		wechatMpAuth
+	} from '@/api/wx';
+	// #endif
+	import {
+		mapMutations,
+		mapState
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				userInfo: {}, //授权用户信息
+				code: '', //授权code
+				isclick: false, //是否点击了
+				iv1: '',
+				encryptedData1: '',
+				hasphone: false
+			};
 		},
-		// 用户确认授权
-		userInfoData(){
-			let that = this
-			if(that.isclick) {
-				return 
-			}
-			that.isclick = true
-			wx.getUserProfile({
-				desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
-				success: res => {
-					console.log(res,'that.userInfo+++++++++++++++++++')
-					that.userInfo = res;
-					uni.showLoading({
-						title: '授权中',
-						mask: true
-					});
-					that.loadMp();
-				},
-				fail: err => {
-					that.isclick = false
+		onLoad() {
+			this.loadData();
+		},
+		computed: {
+			// ...mapState(['baseURL','urlFile'])
+		},
+		methods: {
+			// ...mapMutations(['login', 'setUserInfo']),
+			...mapMutations('user', ['login', 'setUserInfo']),
+			close() {
+				this.$refs.popupsq.close();
+			},
+			getPhoneNumber(e) {
+				let obj = this;
+				console.log(e, 'e+++++++++++++++');
+				// 用户同意授权
+				if (e.detail.errMsg == 'getPhoneNumber:ok') {
+					console.log('chenggong++++++++++++++');
+					obj.hasphone = true;
+					obj.iv1 = e.detail.iv;
+					obj.encryptedData1 = e.detail.encryptedData;
+					obj.$refs.popupsq.open();
+				} else {
+					obj.isclick = false;
 					uni.showToast({
 						title: '您拒绝了请求,不能正常使用小程序',
 						icon: 'error',
@@ -88,58 +109,141 @@ export default {
 					});
 					return;
 				}
-			});
-			// this.userInfo = e;
-			// console.log(e,'用户确认授权')
-			// this.loadMp()
-				
-		},
-		// #ifdef MP-WEIXIN
-		loadMp() {
-			let obj = this;
-			// 获取登录授权页数据
-			let user = obj.userInfo;
-			console.log(user)
-			// 获取推广人id
-			let spread_spid = uni.getStorageSync('spread') || '';
-			// #ifdef MP
-			let spread_code = uni.getStorageSync('spread_code') || '';
-			// #endif
-			
-			wechatMpAuth({
-				code: obj.code,
-				iv: user.iv,
-				encryptedData: user.encryptedData,
-				spread_spid: spread_spid,
+			},
+			loadData() {
+				let obj = this;
+				// #ifdef H5
+				loginWinxin();
+				// #endif
+				// #ifdef MP-WEIXIN
+				loginWinxinMp().then(e => {
+					console.log(e, 'ddddddddddddddddddddddd');
+					// obj.code = e.code
+					wx.login({
+						success(e) {
+							console.log(e, 'loginWinxinMp');
+							obj.code = e.code;
+							console.log(obj.code, 'wxlogin.code++++++');
+						},
+						fill: function(e) {
+							console.log(e);
+						}
+					});
+				});
+				// #endif
+			},
+			// 用户确认授权
+			userInfoData() {
+				let that = this;
+				if (that.isclick) {
+					return;
+				}
+				that.isclick = true;
+				wx.getUserProfile({
+					desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
+					success: res => {
+						console.log(res, 'that.userInfo+++++++++++++++++++');
+						that.userInfo = res;
+						uni.showLoading({
+							title: '授权中',
+							mask: true
+						});
+						that.loadMp();
+					},
+					fail: err => {
+						that.isclick = false;
+						uni.showToast({
+							title: '您拒绝了请求,不能正常使用小程序',
+							icon: 'error',
+							duration: 2000
+						});
+						return;
+					}
+				});
+				// this.userInfo = e;
+				// console.log(e,'用户确认授权')
+				// this.loadMp()
+			},
+			// #ifdef MP-WEIXIN
+			loadMp() {
+				let obj = this;
+				// 获取登录授权页数据
+				let user = obj.userInfo;
+				console.log(user);
+				// 获取推广人id
+				let spread_spid = uni.getStorageSync('spread') || '';
 				// #ifdef MP
-				spread_code: spread_code,
+				let spread_code = uni.getStorageSync('spread_code') || '';
 				// #endif
-			}).then(({ data }) => {
-				obj.wchatAuth(data);
-				console.log(data,'wechatMpAuth++++++++++++++++++++++++++')
-				
-			}).catch( err => {
-				// obj.loding = false;
-				// uni.hideLoading();
-			});
-		},
-		// #endif
-		wchatAuth(data) {
-			let obj = this;
-			// 保存token
-			uni.setStorageSync('token', data.token);
-			console.log(data.token,'token++++++++++++++')
-			// 获取用户基础信息
-			getUserInfo({}).then(e => {
-				console.log('userInfo+++++++++++',e)
-				obj.login();
-				uni.hideLoading();
+
+				wechatMpAuth({
+						code: obj.code,
+						iv: user.iv,
+						iv1: obj.iv1,
+						encryptedData1: obj.encryptedData1,
+						encryptedData: user.encryptedData,
+						spread_spid: spread_spid,
+						// #ifdef MP
+						spread_code: spread_code
+						// #endif
+					})
+					.then(({
+						data
+					}) => {
+						obj.wchatAuth(data);
+						console.log(data, 'wechatMpAuth++++++++++++++++++++++++++');
+					})
+					.catch(err => {
+						// obj.loding = false;
+						// uni.hideLoading();
+					});
+			},
+			// #endif
+			wchatAuth(data) {
+				let obj = this;
+				// 保存token
+				uni.setStorageSync('token', data.token);
+				console.log(data.token, 'token++++++++++++++');
+				// 获取用户基础信息
+				getUserInfo({}).then(e => {
+					console.log('userInfo+++++++++++', e);
+					obj.login();
+					uni.hideLoading();
+					// 保存返回用户数据
+					obj.setUserInfo(e.data);
+					obj.go();
+					// if (e.data.nickname == '微信用户') {
+					// 	uni.showModal({
+					// 		title: '提示',
+					// 		content: '您暂未设置用户名,头像。是否前往设置',
+					// 		success: function(res) {
+					// 			if (res.confirm) {
+					// 				uni.navigateTo({
+					// 					url: '/pages/set/userinfo'
+					// 				});
+					// 			} else if (res.cancel) {
+					// 				logout({})
+					// 					.then(e => {
+					// 						obj.logout();
+					// 					})
+					// 					.catch(e => {
+					// 						console.log(e);
+					// 					});
+					// 				obj.go();
+					// 			}
+					// 		}
+					// 	});
+					// } else {
+					// 	obj.go();
+					// }
+				});
+			},
+			go() {
 				// 保存返回用户数据
-				obj.setUserInfo(e.data);
 				let ur = uni.getStorageSync('present') || '/pages/index/index';
 				// 用于处理缓存bug
-				if (ur=='pages/shop/product') {
-					ur = '/pages/index/index'
+				if (ur == 'pages/shop/product') {
+					ur = '/pages/index/index';
 				}
 				uni.switchTab({
 					url: ur,
@@ -148,46 +252,77 @@ export default {
 							url: ur,
 							fail(e) {
 								uni.navigateTo({
-									url: '/pages/index/index',
+									url: '/pages/index/index'
 								});
 							}
 						});
 					}
 				});
-			});
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-page,
-.content {
-	height: 100%;
-	background-color: #fff;
-}
-.bg-img,
-.logo-img-box {
-	position: absolute;
-	top: 0;
-	left: 0;
-	width: 100%;
-	height: 100%;
-}
-.logo-img {
-	margin-top: 20vh;
-	margin-left: 176rpx;
-	width: 385rpx;
-	height: 394rpx;
-}
-.userInfo {
-	margin: 0 100rpx;
-	margin-top: 50rpx;
-	color: #FFFFFF;
-	border-radius: 99rpx;
-	background-color: $base-color !important;
-}
-.nocaction {
-	background-color: #999;
-}
-</style>
+	page,
+	.content {
+		height: 100%;
+		background-color: #fff;
+	}
+
+	.bg-img,
+	.logo-img-box {
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+	}
+
+	.logo-img {
+		margin-top: 20vh;
+		margin-left: 176rpx;
+		width: 385rpx;
+		height: 394rpx;
+	}
+
+	.userInfo {
+		margin: 0 100rpx;
+		margin-top: 50rpx;
+		color: #ffffff;
+		border-radius: 99rpx;
+		background-color: $base-color !important;
+	}
+
+	.nocaction {
+		background-color: #999;
+	}
+
+	.popupsq-wrap {
+		width: 550rpx;
+		height: 450rpx;
+		background-color: #fff;
+		border-radius: 20rpx;
+		padding: 0 30rpx;
+
+		.btn {
+			width: 240rpx;
+			height: 90rpx;
+			text-align: center;
+			line-height: 90rpx;
+			font-size: 30rpx;
+			border-radius: 45rpx;
+			font-weight: bold;
+		}
+
+		.qx {
+			color: #000;
+			border: #f0f0f0 1px solid;
+		}
+
+		.qr {
+			color: #fff;
+			background-color: $base-color;
+		}
+	}
+</style>

+ 1 - 1
pages/set/addressManage.vue

@@ -28,7 +28,7 @@
 
 		<uni-list class="margin-t-20">
 			<uni-list-item title="设为默认" :switch-checked="addressData.default" :show-switch="true" :show-arrow="false"
-				switch-color="#902020" @switchChange="switchChange"></uni-list-item>
+				switch-color="#418c78" @switchChange="switchChange"></uni-list-item>
 		</uni-list>
 
 		<button class="add-btn" @click="confirm">提交</button>

+ 10 - 2
pages/user/award.vue

@@ -282,7 +282,9 @@
 				font-size: 36rpx;
 				font-family: PingFang SC;
 				font-weight: bold;
-				color: #fffeff;
+				background: linear-gradient(-84deg, #235144 0%, #3a8a74 100%);
+				-webkit-background-clip: text;
+				-webkit-text-fill-color: transparent;
 				height: 80rpx;
 				font-size: 36rpx;
 				font-weight: 700;
@@ -356,6 +358,9 @@
 		padding-top: 90rpx;
 		/* #endif */
 		color: #ffffff;
+		background: linear-gradient(-84deg, #235144 0%, #3a8a74 100%);
+		-webkit-background-clip: text;
+		-webkit-text-fill-color: transparent;
 		text-align: center;
 		/* #ifdef APP-PLUS */
 		height: 200rpx;
@@ -385,6 +390,9 @@
 		position: relative;
 		z-index: 2;
 		color: #ffffff;
+		background: linear-gradient(-84deg, #235144 0%, #3a8a74 100%);
+		-webkit-background-clip: text;
+		-webkit-text-fill-color: transparent;
 		padding: 0rpx 50rpx;
 		font-size: 30rpx;
 		font-family: PingFang SC;
@@ -423,7 +431,7 @@
 					transform: translateX(-50%);
 					width: 44px;
 					height: 0;
-					border-bottom: 2px solid #fe5b38;
+					border-bottom: 2px solid #418C78;
 				}
 			}
 		}

+ 105 - 297
pages/user/shareQrCode.vue

@@ -1,353 +1,161 @@
 <template>
-	<view class="andr-shQ-padL30 andr-shQ-padR30 andr-shQ-Flex andr-shQ-FlexDirC">
-		<view class="andr-shQ-w100B andr-shQ-Flex andr-shQ-JusCC">
-			<swiper class="imgw750h375 matop" :indicator-dots="false" :current="current" @change="currentChange">
-				<!-- #ifdef H5 -->
-				<swiper-item v-for="(item, index) in rwmListArr" :key="index">
-					<image :src="item.wap_poster" mode="aspectFit" class="imgw750h375" />
-				</swiper-item>
-				<!-- #endif -->
-				<!-- #ifdef MP-WEIXIN -->
-				<swiper-item v-for="(item, index) in rwmListArr" :key="index">
-					<image :src="item.poster" mode="aspectFit" class="imgw750h375" />
-				</swiper-item>
-				<!-- #endif -->
-
-			</swiper>
-		</view>
-		<!-- <view class="baocun" @click="comfirm(userInfo.uid+'')">复制邀请码</view> -->
-		<!-- #ifdef H5 -->
-		<!-- <view class="baocun">长按二维码保存图片</view> -->
-
-		<!-- #endif -->
-		<!-- #ifdef MP-WEIXIN -->
-		<view class="baocun" @click="seav">保存分享海报</view>
-		<!-- <button open-type="share" class="baocun btn" v-if="scLoading == 2">分享到微信</button> -->
-		<!-- #endif -->
+	<view class="container">
+		<image @longtap="bc_code" mode="widthFix" class="backImg" :src="backImg"></image>
+		<view class="tki-qrcode"><canvas @longtap="bc_code" canvas-id="qrcode" /></view>
 	</view>
 </template>
+
 <script>
-	import {
-		mapState
-	} from 'vuex';
 	import {
 		spreadBanner
 	} from '@/api/user.js';
-	import {
-		interceptor,
-		saveUrl
-	} from '@/utils/loginUtils';
-	// #ifdef H5
-	import {
-		weixindata
-	} from '@/utils/wxAuthorized';
-	import weixinObj from "@/plugin/jweixin-module/index.js";
-	// #endif
 	export default {
+		// components: { tkiQrcode },
 		data() {
 			return {
-				rwmListArr: [],
-				current: 0,
-				imgSrc: ''
+				url: '',
+				backImg: '',
+				userInfo: '',
+				iswei: 1
 			};
 		},
-		onLoad(option) {
-			uni.showLoading({
-				title: '邀请图生成中',
-				mask: true
-			});
-			// 判断是否强制登录
-			this.loadCodeList();
-			// #ifdef MP-WEIXIN
-			uni.authorize({
-				scope: 'scope.writePhotosAlbum',
-				complete() {}
-			});
-			// #endif
-			try{
-				weixinObj.hideAllNonBaseMenuItem();
-			}catch(e){
-				//TODO handle the exception
-			}
-			
-		},
-		onShow() {
-			if (this.loginInterceptor && !this.hasLogin) {
-				saveUrl();
-				// 登录拦截
-				interceptor();
-			}
-		},
-		//下拉刷新
-		onPullDownRefresh() {
-			let obj = this;
-			//监听下拉刷新动作的执行方法,每次手动下拉刷新都会执行一次
-			setTimeout(function() {
-				obj.loadCodeList();
-				uni.stopPullDownRefresh(); //停止下拉刷新动画
-			}, 1000);
+		onLoad() {
+			this.spread();
 		},
 		computed: {
-			...mapState(['weichatObj', 'baseURL', 'urlFile']),
-			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
-		},
-		methods: {
-			comfirm(text) {
-				// let text = this.userInfo.uid
-				console.log(text);
-				const result = this.uniCopy(text);
-				if (result === false) {
-					uni.showToast({
-						title: '不支持'
-					});
+			cpSize() {
+				if (this.unit == 'upx') {
+					return uni.upx2px(this.size);
 				} else {
-					uni.showToast({
-						title: '复制成功',
-						icon: 'none'
-					});
+					return this.size;
 				}
-				// this.$refs.popup.close();
-			},
-			uniCopy(content) {
-				/**
-				 * 小程序端 和 app端的复制逻辑
-				 */
-				//#ifndef H5
-				uni.setClipboardData({
-					data: content,
-					success: function() {
-						console.log('success');
-						return true;
-					}
+			}
+		},
+		methods: {
+			spread() {
+				uni.showLoading({
+					title: '加载中'
 				});
-				//#endif
-
-				/**
-				 * H5端的复制逻辑
-				 */
-				// #ifdef H5
-				if (!document.queryCommandSupported('copy')) {
-					//为了兼容有些浏览器 queryCommandSupported 的判断
-					// 不支持
-					return false;
+				let obj = this;
+				//#ifdef H5
+				let ua = navigator.userAgent.toLowerCase(); //获取判断用的对象
+				console.log(ua, '123456');
+				if (ua.match(/MicroMessenger/i) == 'micromessenger') {
+					obj.iswei = 2;
+					console.log('weixin');
 				}
-				let textarea = document.createElement('textarea');
-				textarea.value = content;
-				textarea.readOnly = 'readOnly';
-				document.body.appendChild(textarea);
-				textarea.select(); // 选择对象
-				textarea.setSelectionRange(0, content.length); //核心
-				let result = document.execCommand('copy'); // 执行浏览器复制命令
-				textarea.remove();
-				return result;
-				// #endif
-			},
-			loadCodeList() {
-				let self = this;
-				// 加载二维码信息
-				// let andrUid = uni.getStorageSync('andrUid')||'';
+				//#endif 
 				spreadBanner({
-					// #ifdef H5
+					//#ifdef H5
 					type: 2,
-					// #endif
-					// #ifdef MP
+					//#endif
+					//#ifdef MP
 					type: 1,
-					// #endif
-				}).then(e => {
-					if (e.status == 200) {
-						console.log(e.data)
-						self.rwmListArr = e.data;
-						// #ifdef H5
-						self.imgSrc = self.rwmListArr[0].wap_poster;
-						// #endif
-						// #ifdef MP-WEIXIN
-						self.imgSrc = self.rwmListArr[0].poster;
-						// #endif
-					}
+					//#endif
+				}).then(({
+					data
+				}) => {
+					console.log(data);
+					//#ifdef MP
+					obj.backImg = data[0].poster;
+					//#endif
+					//#ifdef H5
+					obj.backImg = data[0].wap_poster;
+					//#endif
+					//#ifdef APP-PLUS
+					obj.backImg = data[0].wap_poster;
+					//#endif
 					uni.hideLoading();
 				});
 			},
-			currentChange(e) {
-				this.current = e.detail.current;
-			},
-			// onShareAppMessage(options){
-			// 	console.log(options,'options')
-			// 	let userInfo = uni.getStorageSync('userInfo');
-			// 	console.log(userInfo)
-			//   let obj = this;
-			//   // 设置菜单中的转发按钮触发转发事件时的转发内容
-			//   let shareObj = {
-			//     title: "邀请好友领券",        // 默认是小程序的名称(可以写slogan等)
-			//     path: '/pages/index/index?spread='+userInfo.uid,        // 默认是当前页面,必须是以‘/’开头的完整路径
-			//     imageUrl: obj.imgSrc,
-			//     success: function(res){
-			//       // 转发成功之后的回调
-			//       if(res.errMsg == 'shareAppMessage:ok'){
-			//       }
-			//     },
-			//     fail: function(){
-			//       // 转发失败之后的回调
-			//       if(res.errMsg == 'shareAppMessage:fail cancel'){
-			//         // 用户取消转发
-			//       }else if(res.errMsg == 'shareAppMessage:fail'){
-			//         // 转发失败,其中 detail message 为详细失败信息
-			//       }
-			//     }
-			//   };
-			//   // 来自页面内的按钮的转发
-			//   if( options.from == 'button' ){
-			//     // 此处可以修改 shareObj 中的内容
-			//     shareObj.path = '/pages/index/index?spread='+userInfo.uid;
-			//         console.log(shareObj.path,'shareObj.path')
-			//   }
-			//   // 返回shareObj
-			//   return shareObj;
-			// },
-			// scClick() {
-			// 	let self = this;
-			// 	// #ifdef H5
-			// 	self.imgSrc = self.rwmListArr[self.current].wap_poster;
-			// 	// #endif
-			// 	// #ifdef MP-WEIXIN
-			// 	self.imgSrc = self.rwmListArr[self.current].poster;
-			// 	// #endif
-			// },
-			// #ifdef MP-WEIXIN
-			seav() {
-				uni.getImageInfo({
-					src: this.imgSrc,
-					complete: function(result) {
-						let path = result.path;
-						uni.getSetting({
-							success(res) {
-								console.log(res)
-								if (!res.authSetting['scope.writePhotosAlbum']) {
-									uni.authorize({
-										scope: 'scope.writePhotosAlbum',
-										success(res) {
-											uni.saveImageToPhotosAlbum({
-												filePath: path,
-												complete(result) {}
-											});
-										},
-										complete(result) {
-											uni.showToast({
-												title: '请先授权保存图片',
-												duration: 2000,
-												icon: 'none'
-											});
-											obj.seav();
-										}
-									})
-								} else {
-									uni.saveImageToPhotosAlbum({
-										filePath: path,
-										complete(result) {
-											uni.showToast({
-												title: '保存图片成功!',
-												duration: 2000,
-												icon: 'none'
-											});
-										}
-									});
+			bc_code() {
+				let that = this;
+				console.log('保存二维码', this.backImg);
+				uni.downloadFile({
+					//获得二维码的临时地址
+					url: this.backImg,
+					success: res => {
+						//console.log('获取url',res)
+						if (res.statusCode == 200) {
+							uni.saveImageToPhotosAlbum({
+								filePath: res.tempFilePath, //传入临时地址
+								success() {
+									that.$api.msg('保存成功'); //封装的提示
+								},
+								fail() {
+									that.$api.msg('保存失败');
 								}
-							}
-						});
+							});
+						}
 					}
 				});
 			}
-			// #endif
 		}
 	};
 </script>
 
 <style lang="scss">
 	page {
-		height: 100%;
-	}
-
-	.imgw750h375 {
 		width: 100%;
-		height: 958rpx;
-	}
-
-	.matop {
-		// margin-top: 40rpx;
-	}
-
-	.andr-shQ-padL30 {
-		// padding-left: 30rpx;
-	}
+		min-height: 100%;
 
-	.andr-shQ-padR30 {
-		// padding-right: 30rpx;
-	}
-
-	.andr-shQ-Flex {
-		// display: flex;
-	}
-
-	.andr-shQ-FlexDirC {
-		flex-direction: column;
-	}
-
-	.andr-shQ-w100B {
-		// width: 100%;
+		.container {
+			width: 100%;
+			height: 100%;
+		}
 	}
 
-	.andr-shQ-JusCC {
-		justify-content: center;
+	.backImg {
+		position: absolute;
+		width: 100%;
 	}
 
-	.andr-shQ-marginT30 {
-		// margin-top: 30rpx;
-	}
+	.portrait {
+		width: 100%;
+		text-align: center;
+		padding-top: 80rpx;
+		padding-bottom: 30rpx;
 
-	.andr-shQ-bgc06B163 {
-		background-color: $base-color;
+		image {
+			width: 250rpx;
+			height: 250rpx;
+		}
 	}
 
-	.andr-shQ-cFFF {
+	.text {
+		text-align: center;
+		width: 100%;
 		color: #ffffff;
+		font-size: 55rpx;
+		letter-spacing: 15rpx;
 	}
 
-	.andr-shQ-bdR50 {
-		border-radius: 50rpx;
-	}
-
-	.andr-shQ-h86 {
-		height: 86rpx;
-	}
-
-	.andr-shQ-AIC {
-		align-items: center;
+	.uid-name {
+		padding: 50rpx 0rpx;
+		text-align: center;
+		width: 100%;
+		color: #ffffff;
 	}
 
-	.baocun {
+	.copy-btn {
 		color: #ffffff;
-		background: $base-color;
-		text-align: center;
-		width: 80%;
-		margin: 50rpx auto;
-		font-size: 28rpx;
-		padding: 25rpx 0rpx;
+		background-color: #4ba6ed;
 		border-radius: 50rpx;
-	}
-
-	.btn {
-		padding: 0rpx 0rpx !important;
+		width: 170rpx;
+		line-height: 70rpx;
 		margin: 0rpx auto;
-		margin-bottom: 100rpx;
+		text-align: center;
 	}
 
-	/* #ifdef H5 */
-	.cbnagan {
-		width: 80%;
-		background: $base-color;
-		margin: 50rpx auto;
-		font-size: 28rpx;
-		text-align: center;
+	.tki-qrcode {
+		position: fixed;
+		bottom: 10%;
+		left: 30%;
 	}
 
-	/* #endif */
+	canvas {
+		width: 150px;
+		height: 150px;
+		margin: auto;
+	}
 </style>

+ 6 - 5
pages/user/team.vue

@@ -157,16 +157,11 @@
 				myspread({
 						page: navItem.page,
 						limit: navItem.limit,
-						grade: state,
-						uid: this.userInfo.uid
 					})
 					.then(({
 						data
 					}) => {
 						console.log(data);
-						this.order = data.order
-						this.zt_order = data.zt_order
-						this.jt_order = data.jt_order
 						this.all = data.total;
 						this.totalLevel = data.totalLevel
 						if (data.list.length > 0) {
@@ -254,6 +249,9 @@
 				font-family: PingFang SC;
 				font-weight: bold;
 				color: #fffeff;
+				background: linear-gradient(-84deg, #235144 0%, #3a8a74 100%);
+				-webkit-background-clip: text;
+				-webkit-text-fill-color: transparent;
 				height: 80rpx;
 				font-size: 36rpx;
 				font-weight: 700;
@@ -285,6 +283,9 @@
 		z-index: 2;
 		padding-top: 90rpx;
 		color: #ffffff;
+		background: linear-gradient(-84deg, #235144 0%, #3a8a74 100%);
+		-webkit-background-clip: text;
+		-webkit-text-fill-color: transparent;
 		text-align: center;
 
 		.money {

+ 7 - 7
pages/user/user.vue

@@ -6,7 +6,7 @@
 		</view>
 		<view class="" style="height: 100rpx;"></view>
 		<view class="user-box">
-			<view class="user-shop flex" v-if="userInfo.uid">
+			<!-- <view class="user-shop flex" v-if="userInfo.uid">
 				<view class="user-shop-item" v-if="userInfo.level> 0 " style="width: 180rpx;">
 					<image class="user-shop-icon" src="../../static/icon/level.png" mode="" style="width: 180rpx;">
 					</image>
@@ -14,26 +14,26 @@
 						{{userInfo.level_name}}
 					</view>
 				</view>
-			</view>
+			</view> -->
 			<image class="avatar" :src="userInfo.avatar" mode="" v-if="userInfo.avatar"
 				@click="navTo('/pages/set/userinfo')"></image>
 			<image class="avatar" src="../../static/error/missing-face.png" mode="" v-else></image>
-			<view class="dz" v-if="userInfo.is_v1 && userInfo.is_v1 ==1">
+			<!-- <view class="dz" v-if="userInfo.is_v1 && userInfo.is_v1 ==1">
 				<view class="dz-bg">
 					<image src="../../static/icon/dz.png" mode=""></image>
 				</view>
 				<view class="dz-font">
 					店长
 				</view>
-			</view>
+			</view> -->
 			<view class="user-name-id">
 				<view class="user-name clamp1">{{ userInfo.nickname || '游客'}}</view>
-				<view class="dl" v-if="userInfo && userInfo.area_admin > 0">
+				<!-- <view class="dl" v-if="userInfo && userInfo.area_admin > 0">
 					<image class="dl-icon" src="../../static/icon/dl.png" mode=""></image>
 					<view class="dl-font">
 						{{userInfo.area_admin == 1?'省代':userInfo.area_admin == 2?'市代':userInfo.area_admin == 3?'区代':'镇代'}}
 					</view>
-				</view>
+				</view> -->
 			</view>
 			<view class="user-money flex">
 				<view class="user-money-item" @click="navTo('/pages/user/award')">
@@ -106,7 +106,7 @@
 			</view>
 			<image src="../../static/icon/back.png" mode="" class="right-img"></image>
 		</view>
-		<view class="user-list flex" @click="navTo('/pages/set/set')">
+		<view class="user-list flex" @click="navTo('/pages/set/userinfo')">
 			<image src="../../static/icon/u4.png" mode="" class="left-img"></image>
 			<view class="">
 				设置

+ 128 - 137
pages/user/withdrawal.vue

@@ -4,7 +4,7 @@
 		<view class="content-money">
 			<view class="flex " style="width: 750rpx;justify-content: space-around;margin-left: 0;">
 				<view class="buttom">
-					<view class="icon">{{ money | getMoneyStyle }}</view>
+					<view class="icon">{{ money }}</view>
 					<text class="text">可提现佣金</text>
 				</view>
 			</view>
@@ -19,105 +19,82 @@
 				<view class="buttom" @click="withdrawal = money">全部提现</view>
 			</view>
 		</view>
-		<view class="tip" v-if="sxf*1 >0">
-			提现手续费{{sxf}}%<text v-if="withdrawal*1 !=0">,实际到账{{(withdrawal*1/100*(100-sxf*1)).toFixed(2)*1}}</text>
-		</view>
 		<view class="list">
 			<radio-group @change="tabRadio">
 				<!-- <label>
 					<view class="box">
 						<view class="icon iconfont iconweixin1"></view>
 						<view class="title-box">
-							<view class="title">
-								<text v-if="weixin_no">提现至微信</text>
-								<text v-else>请创建微信账号</text>
-							</view>
-							<view class="node">
-								<text v-if="weixin_no">账号({{ weixin_no }})</text>
-							</view>
-						</view>
-						<view class="right">
-							<radio value="weixin" color="#c29963" :checked="type == 'weixin'" />
+							<view class="title"><text>提现至微信</text></view>
 						</view>
+						<view class="right"><radio value="weixin" color="#ff2d2d" :checked="type == 'weixin'" /></view>
 					</view>
 				</label> -->
-				<label>
-					<view class="box">
-						<view class="icon iconfont iconzhifubao"></view>
-						<view class="title-box">
-							<view class="title">
-								<text v-if="aliData.name">提现至支付宝</text>
-								<text v-else>请创建支付宝账号</text>
-							</view>
-							<view class="node">
-								<text v-if="aliData.name">真实姓名({{ aliData.name }})</text>
+				<template v-if="isSh == 0">
+					<!-- <label>
+						<view class="box">
+							<view class="icon iconfont iconzhifubao"></view>
+							<view class="title-box">
+								<view class="title"><text>提现至支付宝</text></view>
 							</view>
+							<view class="right"><radio value="alipay" color="#ff2d2d" :checked="type == 'alipay'" /></view>
 						</view>
-						<view class="right">
-							<radio value="alipay" color="#9c0b18" :checked="type == 'alipay'" />
-						</view>
-					</view>
-				</label>
-				<label>
-					<view class="box">
-						<view class="icon iconfont">
-							<image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image>
-						</view>
-						<view class="title-box">
-							<view class="title">
-								<text v-if="bankData.name">{{ bankData.bank + ' ' + bankData.payment }}</text>
-								<text v-else>请创建银行账号</text>
+					</label> -->
+					<label>
+						<view class="box">
+							<view class="icon iconfont">
+								<image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image>
 							</view>
-							<view class="node">
-								<text v-if="bankData.name">真实姓名({{ bankData.name }})</text>
+							<view class="title-box">
+								<view class="title"><text>提现银行账号</text></view>
+							</view>
+							<view class="right">
+								<radio value="bank" color="#418c78" :checked="type == 'bank'" />
 							</view>
 						</view>
-						<view class="right">
-							<radio value="bank" color="#9c0b18" :checked="type == 'bank'" />
-						</view>
-					</view>
-				</label>
+					</label>
+				</template>
 			</radio-group>
 		</view>
-		<!-- <view class="row b-b" v-if="type == 'weixin'">
-			<text class="tit">微信账号</text>
-			<input class="input" type="text" v-model="weixin_no" placeholder="请输入微信账号"
-				placeholder-class="placeholder" />
-		</view>
-		<view class="row b-b" v-if="type == 'alipay'">
-			<text class="tit">支付宝账号</text>
-			<input class="input" type="text" v-model="alipay_code" placeholder="请输入支付宝账号"
-				placeholder-class="placeholder" />
-		</view>
-		<view class="row b-b" v-if="type == 'alipay'">
-			<text class="tit">支付宝姓名</text>
-			<input class="input" type="text" v-model="alipay_name" placeholder="请输入支付宝姓名"
-				placeholder-class="placeholder" />
-		</view>
-		<view class="row b-b" v-if="type == 'bank'">
-			<text class="tit">银行卡号</text>
-			<input class="input" type="text" v-model="bank_code" placeholder="请输入银行卡号"
-				placeholder-class="placeholder" />
-		</view>
-		<view class="row b-b" v-if="type == 'bank'">
-			<text class="tit">姓名</text>
-			<input class="input" type="text" v-model="bank_people" placeholder="请输入银行卡姓名"
-				placeholder-class="placeholder" />
-		</view>
-		<view class="row b-b" v-if="type == 'bank'">
-			<text class="tit">所属银行</text>
-			<input class="input" type="text" v-model="bank_name" placeholder="请输入所属银行"
-				placeholder-class="placeholder" />
-		</view>
-		<view class="row b-b" v-if="type == 'bank'">
+		<template v-if="isSh == 0">
+			<view class="row b-b" v-if="type == 'alipay'">
+				<text class="tit">姓名</text>
+				<input class="input" type="text" v-model="ali_people" placeholder="请输入支付宝姓名"
+					placeholder-class="placeholder" />
+			</view>
+			<view class="row b-b" v-if="type == 'alipay'">
+				<text class="tit">支付宝账号</text>
+				<input class="input" type="text" v-model="alipay_code" placeholder="请输入支付宝账号"
+					placeholder-class="placeholder" />
+			</view>
+			<view class="row b-b" v-if="type == 'bank'">
+				<text class="tit">姓名</text>
+				<input class="input" type="text" v-model="bank_people" placeholder="请输入银行卡姓名"
+					placeholder-class="placeholder" />
+			</view>
+			<view class="row b-b" v-if="type == 'bank'">
+				<text class="tit">银行卡号</text>
+				<input class="input" type="text" v-model="bank_code" placeholder="请输入银行卡号"
+					placeholder-class="placeholder" />
+			</view>
+
+			<view class="row b-b" v-if="type == 'bank'">
+				<text class="tit">手机号</text>
+				<input class="input" type="text" v-model="phone" placeholder="请输入手机号" placeholder-class="placeholder" />
+			</view>
+			<view class="row b-b" v-if="type == 'bank'">
+				<text class="tit">所属银行</text>
+				<input class="input" type="text" v-model="bank_name" placeholder="请输入所属银行"
+					placeholder-class="placeholder" />
+			</view>
+		</template>
+
+		<!-- <view class="row b-b" v-if="type == 'bank'">
 			<text class="tit">所属支行</text>
 			<input class="input" type="text" v-model="bank_belonging" placeholder="请输入所属支行"
 				placeholder-class="placeholder" />
 		</view> -->
-		<button class="add-btn modified"
-			@click="navTo('/pages/money/account?type=' + (type=='bank'?'3':'2'))">账号管理</button>
 		<button class="add-btn up" @click="confirm">提交申请</button>
-
 	</view>
 </template>
 
@@ -135,7 +112,8 @@
 	} from '@/api/wallet.js';
 	import {
 		orderData,
-		getUserInfo
+		getUserInfo,
+		version
 	} from '@/api/user.js';
 	import {
 		mapState,
@@ -154,15 +132,15 @@
 		},
 		data() {
 			return {
-				sxf: '',
+				ali_people: '',
+				loading: false,
+				phone: '',
 				weixin_no: '',
 				type: 'bank', //提现方式
 				money: '0.00', //可提现金额
 				freeze: '0.0', //冻结金额
 				withdrawal: '', //提现金额
 				minPrice: '', //最少提现金额
-				aliData: {},
-				bankData: {},
 				weixin: {},
 				alipay_code: '',
 				alipay_name: '',
@@ -171,44 +149,35 @@
 				bank_name: '',
 				bank_belonging: '',
 				jftype: 0,
+				isSh: 1
 			};
 		},
 		onLoad(options) {
 			//加载提现信息
 			this.loadData();
-			// // 加载提款账号信息
-			// this.loadAli();
-			// this.loadBank();
-			this.dataUp()
-
 		},
 		methods: {
 			...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
-			dataUp() {
-				let obj = this
-				getBank().then(res => {
-					console.log(res.data.zfb, 'res')
-					if (res.data.zfb.name) {
-						obj.aliData = res.data.zfb
-						console.log(obj.aliData, 'obj.aliData')
-					}
-					if (res.data.bank.name) {
-						obj.bankData = res.data.bank
-					}
-				})
-			},
-			// 加载余额信息
 			async loadData() {
-
 				extractBank({}).then(({
 					data
 				}) => {
-					console.log(data, 'data+++++++++')
+					console.log(data, 'data+++++++++');
 					this.minPrice = data.minPrice;
-					this.money = data.brokerage_price,
-						this.sxf = data.commission
+					this.money = data.brokerage_price;
+					if (data.extractInfo != null) {
+						this.bank_people = data.extractInfo.real_name;
+						this.bank_name = data.extractInfo.bank_address;
+						this.bank_code = data.extractInfo.bank_code;
+						this.phone = this.userInfo.phone;
+					}
+				});
+				version({}).then(({
+					data
+				}) => {
+					this.isSh = data.status;
+					console.log(data, '123456');
 				});
-
 			},
 			// 跳转
 			navTo(url) {
@@ -222,21 +191,15 @@
 			},
 			// 提交
 			confirm() {
-				let obj = this
+				let obj = this;
+				if (obj.loading) {
+					return;
+				}
 				let data = {
 					extract_type: this.type, //bank -银行卡 alipay-支付宝 weixin-微信
 					money: this.withdrawal, //金额
 					type: 0 //0佣金1余额
 				};
-				if (this.withdrawal % 100 != 0) {
-					uni.showToast({
-						title: '提现金额为100的倍数',
-						duration: 2000,
-						mask: false,
-						icon: 'none'
-					});
-					return;
-				}
 				if (this.withdrawal < this.minPrice) {
 					uni.showToast({
 						title: '提现金额不可少于' + this.minPrice,
@@ -246,28 +209,56 @@
 					});
 					return;
 				}
-				if (this.type == 'alipay') {
-					console.log('alipay');
-					data.name = this.aliData.name;
-					data.alipay_code = this.aliData.payment;
+				if (obj.type == 'alipay') {
+					if (obj.ali_people == '') {
+						return obj.$api.msg('请输入姓名');
+					}
+					if (obj.alipay_code == '') {
+						return obj.$api.msg('请输入支付宝账号');
+					}
+					data.name = obj.ali_people;
+					data.alipay_code = obj.alipay_code;
 				}
-				if (this.type == 'bank') {
-					console.log('bank');
-					data.name = this.bankData.name;
-					data.bankname = this.bankData.bank;
-					data.cardnum = this.bankData.payment;
-					// data.bank_belonging = this.bankData.bank_name
+				// if (this.type == 'alipay') {
+				// 	console.log('alipay');
+				// 	data.name = this.aliData.name;
+				// 	data.alipay_code = this.aliData.payment;
+				// }
+				if (obj.type == 'bank') {
+					if (obj.bank_people == '') {
+						return obj.$api.msg('请输入姓名');
+					}
+					if (obj.phone == '') {
+						return obj.$api.msg('请输入手机号码');
+					}
+					if (obj.bank_name == '') {
+						return obj.$api.msg('请输入所属银行');
+					}
+					if (obj.bank_code == '') {
+						return obj.$api.msg('请输入银行卡号');
+					}
+					data.name = obj.bank_people;
+					data.phone = obj.phone;
+					data.bankname = obj.bank_name;
+					data.cardnum = obj.bank_code;
 				}
+				// if (this.type == 'bank') {
+				// 	console.log('bank');
+				// 	data.name = this.bankData.name;
+				// 	data.bankname = this.bankData.bank;
+				// 	data.cardnum = this.bankData.payment;
+				// 	// data.bank_belonging = this.bankData.bank_name
+				// }
 				if (this.type == 'weixin') {
 					console.log('weixin');
-					data.weixin = this.weixin_no
-
+					data.weixin = '123456';
 				}
-
+				obj.loading = true;
 				extractCash(data)
 					.then(e => {
-						obj.loadData()
-
+						obj.loadData();
+						obj.withdrawal = '';
+						obj.loading = false;
 						uni.showToast({
 							title: '提交成功',
 							duration: 2000,
@@ -275,7 +266,7 @@
 						});
 					})
 					.catch(e => {
-						console.log();
+						obj.loading = false;
 					});
 			}
 		}
@@ -358,7 +349,7 @@
 			}
 
 			.buttom {
-				color: $font-color-spec;
+				color: $base-color;
 				font-size: $font-base;
 			}
 		}
@@ -367,13 +358,13 @@
 	.add-btn {
 		&.modified {
 			// color: #ffffff;
-			border: 1px solid #9c0b18;
+			border: 1px solid #ff4072;
 			// background-color: #fff;
-			color: #9c0b18;
+			color: #ff4072;
 		}
 
 		&.up {
-			background: #9c0b18;
+			background: $base-color;
 			color: #fff;
 		}
 

+ 10 - 1
pages/user/yue.vue

@@ -263,6 +263,9 @@
 				font-family: PingFang SC;
 				font-weight: bold;
 				color: #fffeff;
+				background: linear-gradient(-84deg, #235144 0%, #3a8a74 100%);
+				-webkit-background-clip: text;
+				-webkit-text-fill-color: transparent;
 				height: 80rpx;
 				font-size: 36rpx;
 				font-weight: 700;
@@ -294,6 +297,9 @@
 		z-index: 2;
 		padding-top: 70rpx;
 		color: #ffffff;
+		background: linear-gradient(-84deg, #235144 0%, #3a8a74 100%);
+		-webkit-background-clip: text;
+		-webkit-text-fill-color: transparent;
 		text-align: center;
 
 		.money {
@@ -314,6 +320,9 @@
 		position: relative;
 		z-index: 2;
 		color: #ffffff;
+		background: linear-gradient(-84deg, #235144 0%, #3a8a74 100%);
+		-webkit-background-clip: text;
+		-webkit-text-fill-color: transparent;
 		padding: 20rpx 50rpx;
 		font-size: 30rpx;
 		font-family: PingFang SC;
@@ -353,7 +362,7 @@
 					transform: translateX(-50%);
 					width: 44px;
 					height: 0;
-					border-bottom: 2px solid #FF4C4C;
+					border-bottom: 2px solid #418C78;
 				}
 			}
 		}

BIN
static/icon/bkq.png


BIN
static/icon/gn1.png


BIN
static/icon/hhh.png


BIN
static/icon/in1.png


BIN
static/icon/in2.png


BIN
static/icon/in3.png


BIN
static/icon/in4.png


BIN
static/icon/in5.png


BIN
static/icon/title.png


BIN
static/icon/user-top.png


BIN
static/icon/》.png


BIN
static/img/add.png


BIN
static/img/back.png


BIN
static/img/gift-bg.png


BIN
static/img/gift-title.png


BIN
static/img/img12.png


BIN
static/img/img39.png


BIN
static/img/img45.png


BIN
static/img/in-ban.png


BIN
static/img/index-bg.png


BIN
static/img/index-icon.png


BIN
static/img/index-title.png


BIN
static/img/index1.png


BIN
static/img/index2.png


BIN
static/img/index3.png


BIN
static/img/index4.png


BIN
static/img/jhq.png


BIN
static/img/logo.png


BIN
static/img/shop-bg.png


BIN
static/img/shop-title.png


BIN
static/img/sqdl.png


BIN
static/img/team-bg.png


BIN
static/img/tg-bg.png


BIN
static/img/top-bd.png


BIN
static/tabBar/cart-action.png


BIN
static/tabBar/cart.png


BIN
static/tabBar/cate-action.png


BIN
static/tabBar/cate.png


BIN
static/tabBar/home-action.png


BIN
static/tabBar/home.png


BIN
static/tabBar/user-action.png


BIN
static/tabBar/user.png


+ 1 - 1
store/index.js

@@ -6,7 +6,7 @@ Vue.use(Vuex)
 const store = new Vuex.Store({
 	state: {
 		// baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置 
-		baseURL: 'http://kxt.liuniukj.com', //请求地址配置 
+		baseURL: 'https://drt.liuniukj.com', //请求地址配置 
 		urlFile: '/index', //项目部署所在文件夹
 		userInfo: {}, //登录信息
 		loginInterceptor: false, //是否打开强制登录

+ 1 - 1
uni.scss

@@ -4,7 +4,7 @@ $page-row-spacing: 30rpx;
 $page-color-base: #f8f8f8; //页面背景颜色
 $page-color-light: #f8f6fc;
 // 主题颜色
-$base-color: #902020; //项目颜色
+$base-color: #418c78; //项目颜色
 $box-shadow-color: #5dbc7c; //阴影颜色
 $font-color: #5dbc7c; //字体颜色
 $font-color-spec: #5dbc7c; //可操作文字颜色

+ 8 - 8
utils/wxAuthorized.js

@@ -55,8 +55,8 @@ function weixinSq() {
 	// 微信授权后跳转页面
 	try {
 		// 判断是否真实路由模式
-		const type = router.mode === "history"?'':'/#'
-		let ul = encodeURIComponent(store.state.baseURL + store.state.urlFile +type+ '/pages/redirect/redirect');
+		const type = router.mode === "history" ? '' : '/#'
+		let ul = encodeURIComponent(store.state.baseURL + store.state.urlFile + type + '/pages/redirect/redirect');
 		// 打开微信授权页面
 		let url =
 			'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' +
@@ -224,19 +224,19 @@ function shareFun(config) {
 export function setRouter(route) {
 	return new Promise((ok, err) => {
 		router = getApp().$router;
-		console.log(router,'开始数据');
+		console.log(router, '开始数据');
 		if (!router) {
 			const set = setInterval(() => {
 				router = getApp().$router;
-				console.log(router,'返回数据');
+				console.log(router, '返回数据');
 				if (router) {
-					console.log(router,'结束');
+					console.log(router, '结束');
 					clearInterval(set)
 					ok(router)
 				}
 			}, 100);
-		}else{
-			console.log(router,'成功');
+		} else {
+			console.log(router, '成功');
 			ok(router)
 		}
 	})
@@ -248,4 +248,4 @@ export default {
 	appId,
 	setRouter,
 	shareLoad
-}
+}