Kaynağa Gözat

Merge branch 'master' of http://git.liuniu946.com/xiemingyang/zhengyi

xiemingyang 4 yıl önce
ebeveyn
işleme
66936c60ac

+ 105 - 105
manifest.json

@@ -1,105 +1,105 @@
-{
-    "name" : "基础项目",
-    "appid" : "__UNI__F0EBD91",
-    "description" : "",
-    "versionName" : "1.0.0",
-    "versionCode" : "100",
-    "transformPx" : false,
-    "app-plus" : {
-        /* 5+App特有相关 */
-        "usingComponents" : true,
-        "splashscreen" : {
-            "alwaysShowBeforeRender" : true,
-            "waiting" : true,
-            "autoclose" : true,
-            "delay" : 0
-        },
-        "modules" : {},
-        /* 模块配置 */
-        "distribute" : {
-            /* 应用发布信息 */
-            "android" : {
-                /* android打包配置 */
-                "permissions" : [
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
-                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
-                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
-                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>"
-                ],
-                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
-            },
-            "ios" : {
-                "idfa" : false
-            },
-            /* ios打包配置 */
-            "sdkConfigs" : {
-                "maps" : {},
-                "oauth" : {
-                    "weixin" : {
-                        "appid" : "",
-                        "appsecret" : "",
-                        "UniversalLinks" : ""
-                    }
-                }
-            }
-        }
-    },
-    /* SDK配置 */
-    "quickapp" : {},
-    /* 快应用特有相关 */
-    "mp-weixin" : {
-        /* 小程序特有相关 */
-        "usingComponents" : true,
-        "appid" : "",
-        "setting" : {
-            "urlCheck" : true
-        }
-    },
-    // "h5" : {
-    //     "title" : "商城",
-    //     "domain" : "",
-    //     "router" : {
-    //         "base" : "/index/",
-    //         "mode" : "hash"
-    //     },
-    //     "devServer" : {
-    //         "proxy" : {
-    //             "/api" : {
-    //                 "target" : "http://192.168.0.101/api",
-    //                 // "changeOrigin": true,
-    //                 "pathRewrite" : {
-    //                     "/api" : "" // rewrite path
-    //                 }
-    //             }
-    //         }
-    //     }
-    // }
-	"h5" : {
-	        "title" : "正一药业",
-	        "domain" : "",
-	        "router" : {
-	            "base" : "/index/",
-	            "mode" : "hash"
-	        },
-	        "devServer" : {
-	            "proxy" : {
-	                "/api" : {
-	                    "target" : "http://zccy.frp.liuniu946.com", //请求的目标域名
-	                    "changeOrigin" : true,
-	                    // "secure": false,
-	                    "pathRewrite" : {
-	                                                // "^/api": "/"
-	                                        }
-	                }
-	            }
-	        }
-	    }  
-}
+{
+    "name" : "基础项目",
+    "appid" : "__UNI__F0EBD91",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
+    "app-plus" : {
+        /* 5+App特有相关 */
+        "usingComponents" : true,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        "modules" : {},
+        /* 模块配置 */
+        "distribute" : {
+            /* 应用发布信息 */
+            "android" : {
+                /* android打包配置 */
+                "permissions" : [
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
+                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>"
+                ],
+                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
+            },
+            "ios" : {
+                "idfa" : false
+            },
+            /* ios打包配置 */
+            "sdkConfigs" : {
+                "maps" : {},
+                "oauth" : {
+                    "weixin" : {
+                        "appid" : "",
+                        "appsecret" : "",
+                        "UniversalLinks" : ""
+                    }
+                }
+            }
+        }
+    },
+    /* SDK配置 */
+    "quickapp" : {},
+    /* 快应用特有相关 */
+    "mp-weixin" : {
+        /* 小程序特有相关 */
+        "usingComponents" : true,
+        "appid" : "",
+        "setting" : {
+            "urlCheck" : true
+        }
+    },
+    // "h5" : {
+    //     "title" : "商城",
+    //     "domain" : "",
+    //     "router" : {
+    //         "base" : "/index/",
+    //         "mode" : "hash"
+    //     },
+    //     "devServer" : {
+    //         "proxy" : {
+    //             "/api" : {
+    //                 "target" : "http://192.168.0.101/api",
+    //                 // "changeOrigin": true,
+    //                 "pathRewrite" : {
+    //                     "/api" : "" // rewrite path
+    //                 }
+    //             }
+    //         }
+    //     }
+    // }
+	"h5" : {
+	        "title" : "正一药业",
+	        "domain" : "",
+	        "router" : {
+	            "base" : "/index/",
+	            "mode" : "hash"
+	        },
+	        "devServer" : {
+	            "proxy" : {
+	                "/api" : {
+	                    "target" : "http://po.frp.liuniu946.com", //请求的目标域名
+	                    "changeOrigin" : true,
+	                    // "secure": false,
+	                    "pathRewrite" : {
+	                                                // "^/api": "/"
+	                                        }
+	                }
+	            }
+	        }
+	    }  
+}

+ 49 - 58
pages.json

@@ -1,62 +1,4 @@
 {
-	"pages": [{
-			"path": "pages/index/index",
-			"style": {
-				"enablePullDownRefresh": true,
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "商城首页"
-			}
-		},
-		{
-			"path": "pages/category/category",
-			"style": {
-				// #ifdef APP-PLUS
-				"navigationStyle": "custom",
-				// #endif
-				// #ifndef MP
-				"app-plus": {
-					"bounce": "none",
-					"titleNView": {
-						"searchInput": {
-							"backgroundColor": "rgba(231, 231, 231,.7)",
-							"borderRadius": "16px",
-							"placeholder": "商品搜索",
-							"disabled": true,
-							"placeholderColor": "#606266",
-							"align": "left"
-						}
-					}
-				},
-				// #endif
-				"navigationBarTitleText": "分类",
-				"navigationBarBackgroundColor": "#FFFFFF"
-			}
-		}, {
-			"path": "pages/cart/cart",
-			"style": {
-				"navigationBarTitleText": "购物车",
-				"navigationBarBackgroundColor": "#FFFFFF",
-				"navigationBarTextStyle": "black"
-			}
-		},
-		{
-			"path": "pages/user/user",
-			"style": {
-				"navigationBarTitleText": "个人中心"
-			}
-		},
-		{
-			"path": "pages/user/jiedian",
-			"style": {
-				"navigationBarTitleText": "我的接点",
-				"navigationBarBackgroundColor": "#FFFFFF",
-				"navigationBarTextStyle": "black"
-			}
-		},
-		{
-			"path": "pages/user/accounts"
-		}
-		],
 		"pages": [{
 				"path": "pages/index/index",
 				"style": {
@@ -204,6 +146,12 @@
 			
 				}
 			},
+			{
+				"path": "pages/user/jiedian",
+				"style": {
+					"navigationBarTitleText": "我的接点"
+				}
+			},
 			{
 				"path": "pages/user/withdraw",
 				"style": {
@@ -357,6 +305,49 @@
 				"style": {
 					"navigationBarTitleText": "充值"
 				}
+			},
+			{
+				"path": "pages/public/register",
+				"style": {
+					"navigationBarTitleText": "注册",
+					"app-plus": {
+						"titleNView": {
+							"type": "transparent"
+						}
+					}
+				}
+			}, {
+				"path": "pages/public/login",
+				"style": {
+					"navigationBarTitleText": "登录",
+					"app-plus": {
+						"titleNView": {
+							"type": "transparent"
+						}
+					}
+				}
+			},
+			{
+				"path": "pages/public/wxLogin",
+				"style": {
+					"navigationBarTitleText": "微信登录",
+					"app-plus": {
+						"titleNView": {
+							"type": "transparent"
+						}
+					}
+				}
+			},
+			{
+				"path": "pages/public/forget",
+				"style": {
+					"navigationBarTitleText": "忘记密码",
+					"app-plus": {
+						"titleNView": {
+							"type": "transparent"
+						}
+					}
+				}
 			}
 		],
 		"tabBar": {

+ 201 - 0
pages/public/forget.vue

@@ -0,0 +1,201 @@
+<template>
+	<view class="container">
+		<view class="container_text">
+			<!-- <image class="banner-img" src="/static/img/img01.png" mode=" scaleToFill"></image> -->
+		</view>
+		<view class="loginTitle"><text>手机号登录</text></view>
+		<view class="login_text">
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img03.png"></image></view>
+				<view class="login_name"><input class="uni-input" v-model="phone" focus placeholder="请输入手机号" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img06.png"></image></view>
+				<view class="login_name flex">
+					<input class="uni-input width" v-model="code" focus placeholder="请输入验证码" />
+					<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
+				</view>
+			</view>
+			<view>
+				<button type="green" @click="register" class="uni-button uni-button-green">登录</button>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+import { mapMutations } from 'vuex';
+import { verify, loginMobile, getUserInfo } from '@/api/login.js';
+export default {
+	data() {
+		return {
+			phone: '', //用户
+			code: '', //验证码
+			time: '', //保存倒计时对象
+			countDown: 0 //倒计时
+		};
+	},
+	onLoad() {},
+	watch: {
+		// 监听倒计时
+		countDown(i) {
+			if (i == 0) {
+				clearInterval(this.time);
+			}
+		}
+	},
+	methods: {
+		...mapMutations('user', ['setUserInfo', 'login']),
+		// 手机登录
+		register() {
+			let obj = this;
+			if (obj.phone == '') {
+				obj.$api.msg('请输入电话号码');
+				return;
+			}
+			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.phone)) {
+				obj.$api.msg('请输入正确的手机号');
+				return;
+			}
+			if (obj.code == '') {
+				obj.$api.msg('请输入验证码');
+				return;
+			}
+
+			loginMobile({
+				phone: obj.phone, //账号
+				captcha: obj.code
+			}).then(function(e) {
+				uni.setStorageSync('token', e.data.token);
+				getUserInfo({}).then(e => {
+					obj.login();
+					// 保存返回用户数据
+					obj.setUserInfo(e.data);
+					//成功跳转首页
+					uni.switchTab({
+						url: '/pages/index/index'
+					});
+				});
+			}).catch((e) => {
+				console.log(e);
+			});
+		},
+		//发送验证码
+		verification() {
+			let obj = this;
+			if (this.phone == '') {
+				this.$api.msg('请输入电话号码');
+				return;
+			}
+			if (this.phone.length < 11) {
+				this.$api.msg('请输入正确的手机号');
+				return;
+			}
+			// 判断是否在倒计时
+			if (obj.countDown > 0) {
+				return false;
+			} else {
+				obj.countDown = 60;
+				obj.time = setInterval(() => {
+					obj.countDown--;
+				}, 1000);
+				//调用验证码接口
+				verify({
+					phone: obj.phone,
+					type: 'login'
+				})
+					.then(({ data }) => {})
+					.catch(err => {
+						console.log(err);
+					});
+			}
+		},
+		login() {
+			//返回登录
+			uni.navigateTo({
+				url: '/pages/public/login'
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	height: 100%;
+}
+.container {
+	width: 100%;
+	height: 100%;
+	background-size: 100%;
+}
+.container_text {
+	width: 100%;
+	height: 500rpx;
+	background-color: #ff4c4c;
+	top: 0rpx;
+	.banner-img {
+		width: 100%;
+		height: 100%;
+	}
+}
+.login_text {
+	margin: auto 30rpx;
+	position: relative;
+	padding: 100rpx 102rpx;
+	background-color: #ffffff;
+	margin-top: -180rpx;
+	border-radius: 20rpx;
+	.login_input {
+		border-bottom: 1px solid #f0f0f0;
+		margin-bottom: 65rpx;
+		.login_img image {
+			height: 35rpx;
+			width: 29rpx;
+			margin-right: 20rpx;
+		}
+		.uni-input {
+			text-align: left;
+			width: 470rpx;
+			font-size: 28rpx !important;
+		}
+		.login_name {
+			color: #333333;
+			.width {
+				width: 325rpx !important;
+			}
+			.code {
+				color: #ff4c4c;
+				font-size: 23rpx;
+				border-left: 1px solid #eeeeee;
+				width: 150rpx;
+				flex-shrink: 0;
+				text-align: center;
+			}
+		}
+	}
+	.uni-button-green {
+		color: #ffffff;
+		background-color: #ff4c4c;
+		margin: 40rpx 10rpx;
+		border-radius: 50rpx;
+	}
+	.uni-button {
+		height: 85rpx;
+		line-height: 85rpx;
+	}
+}
+.loginTitle {
+	position: absolute;
+	top: 250rpx;
+	width: 100%;
+	text-align: center;
+	color: white;
+	font-size: 40rpx;
+}
+
+uni-button {
+	height: 80rpx !important;
+	line-height: 80rpx !important;
+}
+
+</style>

+ 387 - 0
pages/public/login.vue

@@ -0,0 +1,387 @@
+<template>
+	<view class="container">
+		<view class="container_text">
+			<!-- <image class="banner-img" src="/static/img/img01.png" mode="scaleToFill"> -->
+		</image>
+		</view>
+		<view class="loginTitle"><text>登录</text></view>
+		<view class="login_text">
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img03.png"></image></view>
+				<view class="login_name"><input class="uni-input" v-model="username" focus placeholder="请输入手机号" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img04.png"></image></view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="passward" focus placeholder="请输入密码" /></view>
+			</view>
+			<view><button type="green" class="uni-button uni-button-green" @click="toLogin">登录</button></view>
+			<view><button type="green" class="uni-button uni-button-green uni-button-green-plain" plain="true" hover-class="none" @click="register">注册</button></view>
+			<navigator url="./forget"><view class="forget">忘记密码</view></navigator>
+			<view class="flex other">
+				<view class="fenge"></view>
+				<view class="qita">其他方式登录</view>
+				<view class="fenge"></view>
+			</view>
+			<!-- #ifndef APP-PLUS -->
+			<view class="weixin" @click="wecahtLogin"><image src="/static/img/img05.png"></image></view>
+			<view class="weixin_text" @click="wecahtLogin">微信登录</view>
+			<!-- #endif -->
+			<!-- #ifdef APP-PLUS -->
+			<block v-if="!is_ios">
+				<view class="weixin" @click="wecahtLogin"><image src="/static/img/img05.png" mode="scaleToFill"></image></view>
+				<view class="weixin_text" @click="wecahtLogin">微信登录</view>
+			</block>
+			<block v-else>
+				<view class="ios_login flex" @click="wecahtLogin('weixin')">
+					<text class="iconfont iconweixin"></text>
+					<text class="weixin_text">微信登录</text>
+				</view>
+				<view v-if="is_apple_login" class="ios_login flex" @click="wecahtLogin('apple')">
+					<image class="loginIcon" src="/static/icon/appleIcon.png" mode=" scaleToFill"></image>
+					<text class="weixin_text">通过Apple登录</text>
+				</view>
+			</block>
+			<!-- #endif -->
+		</view>
+	</view>
+</template>
+
+<script>
+import { mapMutations } from 'vuex';
+import { login } from '@/api/login.js';
+import { getUserInfo } from '@/api/user.js';
+// #ifdef APP-PLUS
+// applelogin接口需要开发编写,基础项目中可能没有
+import { applelogin } from '@/api/set.js';
+// loginWx接口需要开发编写,基础项目中可能没有
+import { loginWx } from '@/api/login.js';
+// #endif
+// #ifdef H5
+import { loginWinxin } from '@/utils/wxAuthorized';
+// #endif
+export default {
+	data() {
+		return {
+			username: '',
+			passward: '',
+			// #ifdef APP-PLUS
+			is_ios: false, //判断是否为ios手机
+			is_apple_login: false //是否有ios授权登录功能
+			// #endif
+		};
+	},
+	onLoad() {
+		let obj = this;
+		// #ifdef APP-PLUS
+		let system = uni.getStorageSync('platform');
+		// 判断是否为ios
+		if (system == 'ios') {
+			obj.is_ios = true;
+		}
+		uni.getSystemInfo({
+			success(e) {
+				if (+e.system.split('.')[0] >= 13) {
+					obj.is_apple_login = true;
+				}
+			}
+		});
+		// #endif
+	},
+	methods: {
+		...mapMutations('user', ['setUserInfo', 'login']),
+		// 微信登录
+		wecahtLogin(type) {
+			let obj = this;
+			// #ifdef H5
+			let weichatBrowser = uni.getStorageSync('weichatBrowser');
+			if (weichatBrowser) {
+				loginWinxin();
+			}
+			// #endif
+			// #ifdef APP-PLUS
+			uni.login({
+				provider: type,
+				success(e) {
+					uni.getUserInfo({
+						provider: type,
+						success(es) {
+							if (type === 'weixin') {
+								loginWx(es.userInfo)
+									.then(e => {
+										uni.setStorageSync('token', e.data.token);
+										getUserInfo({}).then(e => {
+											obj.login();
+											// 保存返回用户数据
+											obj.setUserInfo(e.data);
+											//成功跳转首页
+											uni.switchTab({
+												url: '/pages/index/index'
+											});
+										});
+									})
+									.catch(e => {
+										console.log(e);
+										uni.showModal({
+											content: JSON.stringify(e),
+											success() {},
+											fail() {}
+										});
+									});
+							}
+							if (type === 'apple') {
+								console.log(es.userInfo);
+								applelogin({
+									account: es.userInfo.openId
+								})
+									.then(function(e) {
+										console.log(e, 'token');
+										uni.setStorageSync('token', e.data.token);
+										getUserInfo({}).then(e => {
+											obj.login();
+											// 保存返回用户数据
+											obj.setUserInfo(e.data);
+											//成功跳转首页
+											uni.switchTab({
+												url: '/pages/index/index'
+											});
+										});
+									})
+									.catch(function(e) {
+										console.log(e);
+									});
+							}
+						},
+						fail(es) {
+							uni.showModal({
+								content: JSON.stringify(es),
+								success() {
+									// obj.login();
+									// // 保存返回用户数据
+									// obj.setUserInfo(e.data);
+									// //成功跳转首页
+									// uni.switchTab({
+									// 	url: '/pages/index/index'
+									// });
+								}
+							});
+						}
+					});
+				},
+				fail(e) {
+					uni.showModal({
+						title: '提示',
+						content: JSON.stringify(e),
+						showCancel: false
+					});
+				}
+			});
+			// #endif
+		},
+		//登录
+		async toLogin() {
+			let obj = this;
+			obj.logining = true;
+			if (obj.username == '') {
+				obj.$api.msg('请输入手机号');
+				return;
+			}
+			if (obj.passward == '') {
+				obj.$api.msg('请输入密码');
+				return;
+			}
+			login({
+				account: obj.username,
+				password: obj.passward
+			})
+				.then(function(e) {
+					uni.setStorageSync('token', e.data.token);
+					// obj.$store.commit('hasLogin', true);
+					obj.login()
+					getUserInfo({}).then(e => {
+						obj.login();
+						// 保存返回用户数据
+						obj.setUserInfo(e.data);
+						let ur = uni.getStorageSync('present') || '/pages/index/index';
+						//成功跳转首页
+						uni.switchTab({
+							url: ur,
+							fail(e) {
+								uni.navigateTo({
+									url: ur,
+									fail(e) {
+										uni.navigateTo({
+											url: '/pages/index/index'
+										});
+									}
+								});
+							}
+						});
+					});
+				})
+				.catch(function(e) {
+					console.log(e);
+				});
+		},
+		//跳转注册页
+		register() {
+			uni.navigateTo({
+				url: `/pages/public/register`
+			});
+		},
+		// 后退
+		navBack() {
+			uni.navigateBack();
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+/* #ifdef APP-PLUS */
+
+.ios_login {
+	width: 260rpx;
+	border-radius: 12rpx;
+	justify-content: center;
+	border: 1px solid #212121;
+	margin: 24rpx auto;
+	padding: 10rpx;
+	background-color: #212121;
+	color: #ffffff;
+	.loginIcon {
+		width: 50rpx;
+		height: 50rpx;
+	}
+	.weixin_text {
+		line-height: 1;
+		margin-left: 20rpx;
+		color: #ffffff !important;
+	}
+}
+
+/* #endif */
+.ios_login {
+	width: 350rpx;
+	border-radius: 12rpx;
+	justify-content: center;
+	border: 1px solid #212121;
+	margin: 24rpx auto;
+	padding: 15rpx;
+	background-color: #212121;
+	color: #ffffff;
+	font-size: 32rpx;
+	.loginIcon {
+		font-size: 35rpx;
+		width: 35rpx;
+		height: 35rpx;
+	}
+	.weixin_text {
+		line-height: 1;
+		margin-left: 20rpx;
+		color: #ffffff !important;
+	}
+}
+
+page {
+	height: 100%;
+}
+.container {
+	width: 100%;
+	height: 100%;
+	background-size: 100%;
+}
+.container_text {
+	width: 100%;
+	height: 500rpx;
+	top: 0rpx;
+	background-color: #ff4c4c;
+	.banner-img {
+		width: 100%;
+		height: 100%;
+	}
+}
+.login_text {
+	margin: auto 30rpx;
+	position: relative;
+	padding: 100rpx 102rpx;
+	background-color: #ffffff;
+	margin-top: -180rpx;
+	border-radius: 20rpx;
+	.login_input {
+		border-bottom: 1px solid #f0f0f0;
+		margin-bottom: 65rpx;
+		.login_img image {
+			height: 35rpx;
+			width: 29rpx;
+			margin-right: 20rpx;
+		}
+		.uni-input {
+			text-align: left;
+			width: 470rpx;
+			font-size: 28rpx !important;
+		}
+		.login_name {
+			color: #333333;
+		}
+	}
+
+	.other {
+		margin-top: 60rpx;
+		.fenge {
+			width: 30%;
+			height: 2rpx;
+			background-color: #eeeeee;
+		}
+		.qita {
+			font-size: 28rpx;
+			color: #999999;
+		}
+	}
+	.weixin {
+		width: 75rpx;
+		height: 75rpx;
+		margin: 25rpx auto;
+	}
+	.weixin image {
+		width: 100%;
+		height: 100%;
+	}
+	.weixin_text {
+		text-align: center;
+		font-size: 28rpx;
+		color: #999999;
+	}
+	.forget {
+		font-size: 28rpx;
+		width: 100%;
+		text-align: right;
+		color: #999999;
+	}
+
+	.uni-button-green {
+		color: #ffffff;
+		background-color: #ff4c4c;
+		margin: 40rpx 10rpx;
+		border-radius: 50rpx;
+	}
+	.uni-button-green-plain {
+		border: 1px solid #ff4c4c;
+		margin: 40rpx 10rpx;
+		border-radius: 50rpx;
+		color: #ff4c4c;
+		background-color: #ffffff;
+	}
+	.uni-button {
+		height: 85rpx;
+		line-height: 85rpx;
+	}
+}
+.loginTitle {
+	position: absolute;
+	top: 250rpx;
+	width: 100%;
+	text-align: center;
+	color: white;
+	font-size: 40rpx;
+}
+</style>

+ 282 - 0
pages/public/register.vue

@@ -0,0 +1,282 @@
+<template>
+	<view class="container">
+		<view class="container_text" >
+			<!-- <image class="banner-img" src="/static/img/img01.png" mode="scaleToFill"></image> -->
+		</view>
+		<view class="loginTitle"><text>注册</text></view>
+		<view class="login_text">
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img03.png"></image></view>
+				<view class="login_name"><input class="uni-input" v-model="phone" focus placeholder="请输入账号" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img04.png"></image></view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="password" focus placeholder="请输入密码" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img04.png"></image></view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="repassword" focus placeholder="请重复输入密码" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img07.png"></image></view>
+				<view class="login_name"><input class="uni-input" type="text" v-model="invitation" focus placeholder="请输入邀请码" /></view>
+			</view>
+			<!-- <view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img06.png"></image></view>
+				<view class="login_name flex">
+					<input class="uni-input width" v-model="code" focus placeholder="请输入验证码" />
+					<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
+				</view>
+			</view> -->
+			<view><button type="green" @click="register" class="uni-button uni-button-green">注册账号</button></view>
+			<view><button class="uni-button uni-button-green uni-button-green-plain" type="green" plain="true" hover-class="none" @click="login">返回登录</button></view>
+		</view>
+	</view>
+</template>
+<script>
+import { register, verify } from '@/api/login.js';
+export default {
+	data() {
+		return {
+			phone: '', //用户
+			password: '', //密码
+			repassword: '',
+			invitation: '', //邀请码
+			code: '', //验证码
+			time: '', //保存倒计时对象
+			countDown: 0 ,//倒计时
+		};
+	},
+	onLoad() {
+		// 获取扫码邀请人id
+		this.invitation = uni.getStorageSync('spread')||'';
+	},
+	watch: {
+		// 监听倒计时
+		countDown(i) {
+			if (i == 0) {
+				clearInterval(this.time);
+			}
+		}
+	},
+	methods: {
+		// 注册
+		register() {
+			let obj = this;
+			if (obj.phone == '') {
+				obj.$api.msg('请输入账号');
+				return;
+			}
+			// if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.phone)) {
+			// 	obj.$api.msg('请输入正确的手机号');
+			// 	return;
+			// }
+			if (obj.password == '') {
+				obj.$api.msg('请输入密码');
+				return;
+			}
+			if (obj.repassword == '') {
+				obj.$api.msg('请再次输入密码');
+				return;
+			}
+			if (obj.repassword != obj.password) {
+				obj.$api.msg('两次密码不正确');
+				return;
+			}
+			// if ((obj.invitation = '')) {
+			// 	obj.$api.msg('请输入邀请码');
+			// 	return;
+			// }
+			// if (obj.code == '') {
+			// 	obj.$api.msg('请输入验证码');
+			// 	return;
+			// }
+			register({
+				account: obj.phone, //账号
+				// captcha: obj.code, //验证码
+				password: obj.password ,//密码
+				spread:this.invitation//上级推广人
+			}).then(function(e) {
+				uni.showToast({
+					title:'注册成功',
+					duration:2000,
+					position:'top'
+				});
+				setTimeout(function () {
+					uni.navigateTo({
+						url: '/pages/public/login'
+					});
+				},1000)
+				
+			});
+			//调用注册接口,成功跳转登录页
+		},
+		//发送验证码
+		verification() {
+			let obj = this;
+			if (this.phone == '') {
+				this.$api.msg('请输入电话号码');
+				return;
+			}
+			if (this.phone.length < 11) {
+				this.$api.msg('请输入正确的手机号');
+				return;
+			}
+			// 判断是否在倒计时
+			if (obj.countDown > 0) {
+				return false;
+			} else {
+				obj.countDown = 60;
+				obj.time = setInterval(() => {
+					obj.countDown--;
+				}, 1000);
+				//调用验证码接口
+				verify({
+					phone: obj.phone,
+					type: 'register'
+				})
+					.then(({ data }) => {})
+					.catch(err => {
+						console.log(err);
+					});
+			}
+		},
+		login() {
+			//返回登录
+			uni.navigateTo({
+				url: '/pages/public/login'
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	height: 100%;
+}
+.container {
+	width: 100%;
+	height: 100%;
+	background-size: 100%;
+}
+.container_text {
+	width: 100%;
+	height: 500rpx;
+	top: 0rpx;
+	background-color: #FF4343;
+	.banner-img {
+		width: 100%;
+		height: 100%;
+	}
+}
+.login_text {
+	margin: auto 30rpx;
+	position: relative;
+	padding: 100rpx 102rpx;
+	background-color: #ffffff;
+	margin-top: -180rpx;
+	border-radius: 20rpx;
+	.login_input {
+		border-bottom: 1px solid #f0f0f0;
+		margin-bottom: 65rpx;
+		.login_img image {
+			height: 35rpx;
+			width: 29rpx;
+			margin-right: 20rpx;
+		}
+		.uni-input {
+			text-align: left;
+			width: 470rpx;
+			font-size: 28rpx !important;
+		}
+		.login_name {
+			color: #333333;
+		}
+	}
+
+	.other {
+		margin-top: 60rpx;
+		.fenge {
+			width: 30%;
+			height: 2rpx;
+			background-color: #eeeeee;
+		}
+		.qita {
+			font-size: 28rpx;
+			color: #999999;
+		}
+	}
+	.weixin {
+		width: 75rpx;
+		height: 75rpx;
+		margin: 25rpx auto;
+	}
+	.weixin image {
+		width: 100%;
+		height: 100%;
+	}
+	.weixin_text {
+		text-align: center;
+		font-size: 28rpx;
+		color: #999999;
+	}
+	.forget {
+		font-size: 28rpx;
+		width: 100%;
+		text-align: right;
+		color: #999999;
+	}
+
+	.uni-button-green {
+		color: #ffffff;
+		background-color:  $base-color;
+		margin: 40rpx 10rpx;
+		border-radius: 50rpx;
+	}
+	.uni-button-green-plain {
+		border: 1px solid  $base-color;
+		margin: 40rpx 10rpx;
+		border-radius: 50rpx;
+		color:  $base-color;
+		background-color: #ffffff;
+	}
+	.uni-button {
+		height: 85rpx;
+		line-height: 85rpx;
+	}
+}
+.loginTitle {
+	position: absolute;
+	top: 250rpx;
+	width: 100%;
+	text-align: center;
+	color: white;
+	font-size: 40rpx;
+}
+
+.forget {
+	width: 100rpx;
+	font-size: 24rpx;
+	color: #ffffff;
+	margin: 0px auto;
+	border-bottom: 1px solid #ffffff;
+}
+.width {
+	width: 325rpx !important;
+}
+.code {
+	color:  $base-color;
+	font-size: 23rpx;
+	border-left: 1px solid #eeeeee;
+	width: 150rpx;
+	flex-shrink: 0;
+	text-align: center;
+}
+uni-button {
+	height: 80rpx !important;
+	line-height: 80rpx !important;
+}
+
+</style>
+

+ 291 - 0
pages/public/wxLogin.vue

@@ -0,0 +1,291 @@
+<template>
+	<view class="content">
+		<!-- #ifdef MP -->
+		<image class="bg-img" src="/static/img/img09.png" mode=" scaleToFill"></image>
+		<view class="logo-img-box">
+			<image class="logo-img" src="/static/img/logo.png" mode=" aspectFit"></image>
+			<button class="userInfo" type="warn" open-type="getUserInfo" @getuserinfo="userInfoData">
+				<text class="iconfont iconweixin"></text>
+				<text>微信授权登录</text>
+			</button>
+		</view>
+		<!-- #endif -->
+		<view class="Mask" v-show="MaskShow">
+			<view class="Mask-box">
+				<view class="title">申请获取您的手机号</view>
+				<view class="text">为了方便您的取货和我们的送货,并获取更多优惠活动,需要您的手机授权</view>
+				<view class="btn_box">
+					<button class="weixin" @click="ToIndex()">取消</button>
+					<button class="weixin" open-type="getPhoneNumber" @getphonenumber="PhoneNumber">手机号授权</button>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+// #ifdef H5
+import { loginWinxin } from '@/utils/wxAuthorized';
+// #endif
+// #ifdef MP-WEIXIN
+import { wechatMpAuth } from '@/api/wx';
+// #endif
+import { mapMutations } from 'vuex';
+import { getUserInfo, bangding } from '@/api/login.js';
+export default {
+	data() {
+		return {
+			userInfo: {}, //授权用户信息
+			code: '', //授权code
+			loding: false, //判断是否在点击中
+			MaskShow: false // 手机号授权弹窗
+		};
+	},
+	onLoad(option) {
+		this.loadData();
+	},
+	methods: {
+		loadData() {
+			// #ifdef H5
+			loginWinxin();
+			// #endif
+		},
+		// #ifndef H5
+		// 用户确认授权
+		userInfoData(e) {
+			const that = this;
+			// #ifdef MP-WEIXIN
+			if (!this.loding) {
+				wx.getUserProfile({
+					desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
+					success: res => {
+						that.userInfo = res;
+						that.loadMp();
+					},
+					fail: err => {
+						console.log('getUserProfile出错', err);
+					}
+				});
+			}
+			// #endif
+		},
+		// #endif
+		// #ifdef MP-WEIXIN
+		loadMp(option) {
+			let obj = this;
+			obj.loding = true;
+			// 获取登录授权页数据
+			let user = obj.userInfo;
+			// 获取推广人id
+			let spread_spid = uni.getStorageSync('spread') || '';
+			// let spread_code = uni.getStorageSync('spread_code') || '';
+			uni.showLoading({
+				title: '授权中',
+				mask: true
+			});
+			wx.login({
+				success(e) {
+					wechatMpAuth({
+						code: e.code,
+						iv: user.iv,
+						encryptedData: user.encryptedData,
+						spread_spid: spread_spid,
+						// #ifdef MP
+						spread_code: spread_code
+						// #endif
+					})
+						.then(({ data }) => {
+							obj.loding = false;
+							obj.wchatAuth(data);
+							console.log(data);
+						})
+						.catch(e => {
+							obj.loding = false;
+							uni.hideLoading();
+						});
+				},
+				fill: function(e) {
+					obj.loding = false;
+					console.log(e);
+				}
+			});
+		},
+		wchatAuth(data) {
+			let obj = this;
+			// 保存token
+			uni.setStorageSync('token', data.token);
+			// 获取用户基础信息
+			getUserInfo({})
+				.then(e => {
+					uni.hideLoading();
+					obj.login();
+					// 保存返回用户数据
+					obj.setUserInfo(e.data);
+					obj.ToIndex();
+					// if (e.data.phone == null || !e.data.phone ) {
+					// 	obj.MaskShow = true;
+					// } else {
+					// 	obj.ToIndex();
+					// }
+				})
+				.catch(e => {
+					uni.hideLoading();
+				});
+		},
+		// #endif
+		ToIndex() {
+			let obj = this;
+			let ur = uni.getStorageSync('present') || '/pages/index/index';
+			// 用于处理缓存bug
+			if (ur == 'pages/product/product') {
+				ur = '/pages/index/index';
+			}
+			uni.switchTab({
+				url: ur,
+				fail(e) {
+					uni.navigateTo({
+						url: ur,
+						fail(e) {
+							uni.navigateTo({
+								url: '/pages/index/index'
+							});
+						}
+					});
+				}
+			});
+		},
+		// 绑定手机号
+		PhoneNumber(e) {
+			let obj = this;
+			obj.MaskShow = false;
+			(obj.iv = e.detail.iv), (obj.encryptedData = e.detail.encryptedData);
+
+			uni.setStorageSync('code', obj.code);
+			bangding({
+				flag: 1,
+				cache_key: obj.cache_key,
+				code: obj.code,
+				iv: obj.iv,
+				encryptedData: obj.encryptedData
+			}).then(function(e) {
+				if (e.data.is_bind == 1) {
+					console.log('bangding1');
+					bangding({
+						flag: 1,
+						cache_key: obj.cache_key,
+						code: obj.code,
+						iv: obj.iv,
+						encryptedData: obj.encryptedData,
+						step: 1
+					})
+						.then(function(e) {
+							// 获取用户基础信息
+							obj.GetUser();
+							obj.$api.msg(e.msg);
+							obj.$nextTick(function() {
+								obj.ToIndex();
+							});
+						})
+						.catch(e => {
+							console.log(e);
+						});
+				} else {
+					console.log('bangding2');
+					obj.$api.msg(e.msg);
+					// 获取用户基础信息
+					obj.GetUser();
+					obj.$api.msg(e.msg);
+					obj.$nextTick(function() {
+						obj.ToIndex();
+					});
+				}
+			});
+		},
+		GetUser() {
+			// 获取用户基础信息
+			getUserInfo({})
+				.then(({ data }) => {
+					this.setUserInfo(data);
+					console.log(data, 11);
+					console.log(uni.getStorageSync('userInfo'), 55);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	height: 100%;
+}
+
+.Mask {
+	position: fixed;
+	top: 0;
+	width: 100%;
+	height: 100%;
+	background-color: rgba(51, 51, 51, 0.7);
+	.Mask-box {
+		margin: auto;
+		margin-top: 320rpx;
+		padding: 50rpx 30rpx;
+		width: 90%;
+		height: 450rpx;
+		top: 500rpx;
+		left: 10%;
+		background-color: #ffffff;
+		border-radius: 15rpx;
+		.title {
+			text-align: center;
+			font-size: 35rpx;
+			font-weight: 700;
+		}
+		.text {
+			font-size: 30rpx;
+			color: #848484;
+			padding-top: 50rpx;
+		}
+		.btn_box {
+			margin: 70rpx 0 0 0;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+		}
+	}
+}
+
+.weixin {
+	// background: linear-gradient(90deg, rgba(36, 214, 78, 1), rgba(45, 187, 89, 1));
+	background: $base-color;
+	width: 40%;
+	color: #ffffff;
+	border-radius: 50rpx;
+	border: none;
+	margin: 0 20rpx;
+}
+.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;
+}
+</style>

+ 275 - 292
pages/story/story.vue

@@ -1,293 +1,276 @@
-<template>
-	<view class="content">
-		<!-- 头部导航 -->
-		<view class="nav-bar flex">
-			<view class="nav-item" v-for="(item,index) in navList" :key="index"
-				:class="{'active': currentIndex == index}" @click="navClick(index)">
-				{{item.tit}}
-			</view>
-		</view>
-		<!-- 分类列表 -->
-		<swiper :duration="400" class="swiper-wrapper" :style="{'height': height}" :current="currentIndex" @change="swiperChange">
-			<swiper-item>
-				<scroll-view scroll-y="true" :style="{'height': height}" class="scroll-wrapper">
-					<view class="list" v-for="(item,index) in 100">
-						<template v-if="index == 0">
-							<view class="list-top-tit clamp2">竹胎酵素饮】正一健康竹胎酵素饮相关纪录片在浙江卫视热播</view>
-							<image src="" mode="" class="list-top-img"></image>
-							<view class="list-top-time">
-								更新时间:2019-12-06
-							</view>
-						</template>
-						<template v-else>
-							<view class="list-scend">
-								<image src="" mode="" class="list-img"></image>
-								<view class="list-info">
-									<view class="list-tit clamp">竹胎酵素饮】正一健康竹胎酵素饮相关纪录片在浙江卫视热播</view>
-									<view class="list-time">
-										更新时间:2019-12-06
-									</view>
-								</view>
-							</view>
-						</template>
-					</view>
-				</scroll-view>
-			</swiper-item>
-			<swiper-item>
-				<scroll-view scroll-y="true" :style="{'height': height}" class="scroll-wrapper">
-					<view class="list" v-for="(item,index) in 100">
-						<template v-if="index == 0">
-							<view class="list-top-tit clamp2">竹胎酵素饮】正一健康竹胎酵素饮相关纪录片在浙江卫视热播</view>
-							<image src="" mode="" class="list-top-img"></image>
-							<view class="list-top-time">
-								更新时间:2019-12-06
-							</view>
-						</template>
-						<template v-else>
-							<view class="list-scend">
-								<image src="" mode="" class="list-img"></image>
-								<view class="list-info">
-									<view class="list-tit clamp">竹胎酵素饮】正一健康竹胎酵素饮相关纪录片在浙江卫视热播</view>
-									<view class="list-time">
-										更新时间:2019-12-06
-									</view>
-								</view>
-							</view>
-						</template>
-					</view>
-				</scroll-view>
-			</swiper-item>
-			<swiper-item>
-				<scroll-view scroll-y="true" :style="{'height': height}" class="scroll-wrapper">
-					<view class="list" v-for="(item,index) in 100">
-						<template v-if="index == 0">
-							<view class="list-top-tit clamp2">竹胎酵素饮】正一健康竹胎酵素饮相关纪录片在浙江卫视热播</view>
-							<image src="" mode="" class="list-top-img"></image>
-							<view class="list-top-time">
-								更新时间:2019-12-06
-							</view>
-						</template>
-						<template v-else>
-							<view class="list-scend">
-								<image src="" mode="" class="list-img"></image>
-								<view class="list-info">
-									<view class="list-tit clamp">竹胎酵素饮】正一健康竹胎酵素饮相关纪录片在浙江卫视热播</view>
-									<view class="list-time">
-										更新时间:2019-12-06
-									</view>
-								</view>
-							</view>
-						</template>
-					</view>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-	export default {
-		components: {
-
-		},
-		onReady(res) {
-			var _this = this;
-			uni.getSystemInfo({
-				success: resu => {
-					const query = uni.createSelectorQuery();
-					query.select('.swiper-wrapper').boundingClientRect();
-					query.exec(function(res) {
-						console.log(res, 'ddddddddddddd');
-						_this.height = resu.windowHeight - res[0].top + 'px';
-						console.log('打印页面的剩余高度', _this.height);
-					});
-				},
-				fail: res => {}
-			});
-		},
-		data() {
-			return {
-				height: '', //swiper 高度
-				currentIndex: 0, //当前头部导航位置
-				navList: [{
-						cid: 1,
-						tit: '公司简介',
-						list: [],
-						page: 1,
-						limit: 10,
-						loadingType: 'more'
-					},
-					{
-						cid: 2,
-						tit: '产品简介',
-						list: [],
-						page: 1,
-						limit: 10,
-						loadingType: 'more'
-					},
-					{
-						cid: 1,
-						tit: '案例分享',
-						list: [],
-						page: 1,
-						limit: 10,
-						loadingType: 'more'
-					}
-				]
-			}
-		},
-		onLoad() {
-			this.getData()
-		},
-		methods: {
-			navClick(index) {
-				this.currentIndex = index
-			},
-			swiperChange(e) {
-				console.log(e,'swiperChange')
-				this.currentIndex = e.detail.current
-				this.getData('tabChange')
-			},
-			getData(source) {
-				let obj = this
-				let index = this.currentIndex;
-				let navItem = this.navList[index];
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				if (navItem.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				navItem.loadingType = 'loading';
-				getCricleList({
-					page: navItem.page,
-					limit: navItem.limit
-				}).then(({data}) => {
-					console.log(res)
-					let list = data.list.map( item => {
-						return item
-					})
-					navItem.list = navItem.list.concat(list);
-					console.log(arr);
-					
-					if (navItem.limit == data.list.data.length) {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'more';
-						navItem.page++;
-					} else {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'noMore';
-					}
-					this.$set(navItem, 'loaded', true);
-					
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	page {
-		height: 100%;
-		background-color: #eee;
-		padding-top: 20rpx;
-	}
-
-	.content {
-		height: 100%;
-
-		background-color: #fff;
-
-		.nav-bar {
-			line-height: 86rpx;
-			font-size: 32rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #333333;
-			justify-content: space-around;
-			border-bottom: #E0E0E0 1px solid;
-
-			.active {
-				color: #3F7C1F;
-				border-bottom: 3rpx solid #3F7C1F;
-			}
-
-			.nav-item {
-				// flex-grow: 1;
-				text-align: center;
-			}
-		}
-	}
-
-	.swiper-wrapper {
-		background-color: #eee;
-	
-		.scroll-wrapper {
-				padding: 0 22rpx 0 23rpx;
-		}
-		.list {
-			padding: 18rpx 0;
-			border-bottom: 1px solid #E0E0E0;
-			.list-top-tit {
-				font-size: 32rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #333333;
-				line-height: 42rpx;
-			}
-
-			.list-top-img {
-				margin-top: 15rpx;
-				width: 705rpx;
-				height: 399rpx;
-				background-color: #999;
-			}
-
-			.list-top-time {
-				font-size: 26rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #999999;
-				line-height: 32rpx;
-			}
-			
-			.list-scend {
-				display: flex;
-				.list-img {
-					flex-shrink: 0;
-					background-color: #999;
-					width: 224rpx;
-					height: 160rpx;
-				}
-				.list-info {
-					padding:10rpx 0 19rpx 23rpx;
-					position: relative;
-					.list-tit {
-						width: 420rpx;
-						font-size: 32rpx;
-						font-family: PingFang SC;
-						font-weight: bold;
-						color: #333333;
-						line-height: 32px;
-					}
-					.list-time {
-						font-size: 28rpx;
-						font-family: PingFang SC;
-						font-weight: 500;
-						color: #666666;
-						line-height: 32rpx;
-						position: absolute;
-						bottom: 19rpx;
-					}
-				}
-				
-			}
-		}
-	}
+<template>
+	<view class="content">
+		<!-- 头部导航 -->
+		<view class="nav-bar flex">
+			<view class="nav-item" v-for="(item,index) in navList" :key="index"
+				:class="{'active': currentIndex == index}" @click="navClick(index)">
+				{{item.tit}}
+			</view>
+		</view>
+		<!-- 分类列表 -->
+		<swiper :duration="400" class="swiper-wrapper" :style="{'height': height}" :current="currentIndex"
+			@change="swiperChange">
+			<swiper-item v-for="(navitem,navindex) in navList">
+				<scroll-view scroll-y="true" :style="{'height': height}" class="scroll-wrapper">
+					<view class="list" v-for="(item,index) in navitem.list"
+						@click="navTo('/pages/story/storyDetail?id=' + item.id)">
+						<template v-if="index == 0">
+							<view class="list-top-tit clamp2">{{item.title}}</view>
+							<image :src="item.image_input[0]" mode="" class="list-top-img"></image>
+							<view class="list-top-time">
+								更新时间: {{item.add_time}}
+							</view>
+						</template>
+						<template v-else>
+							<view class="list-scend">
+								<image :src="item.image_input[0]" mode="" class="list-img"></image>
+								<view class="list-info">
+									<view class="list-tit clamp">{{item.title}}</view>
+									<view class="list-time">
+										更新时间: {{item.add_time}}
+									</view>
+								</view>
+							</view>
+						</template>
+					</view>
+					<uni-load-more :status="navitem.loadingType" v-if="navitem.loaded"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import {
+		article,
+		details
+	} from '@/api/index.js'
+	export default {
+		components: {
+			uniLoadMore
+		},
+		onReady(res) {
+			var _this = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.swiper-wrapper').boundingClientRect();
+					query.exec(function(res) {
+						console.log(res, 'ddddddddddddd');
+						_this.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		data() {
+			return {
+				height: '', //swiper 高度
+				currentIndex: 0, //当前头部导航位置
+				navList: [{
+						cid: 1,
+						tit: '公司简介',
+						list: [],
+						page: 1,
+						limit: 10,
+						loadingType: 'more'
+					},
+					{
+						cid: 2,
+						tit: '产品简介',
+						list: [],
+						page: 1,
+						limit: 10,
+						loadingType: 'more'
+					},
+					{
+						cid: 3,
+						tit: '案例分享',
+						list: [],
+						page: 1,
+						limit: 10,
+						loadingType: 'more'
+					}
+				]
+			}
+		},
+		onLoad() {
+			this.getData('tabChange')
+		},
+		methods: {
+			//跳转详情
+			navTo(url) {
+				console.log(url)
+				uni.navigateTo({
+					url: url
+				})
+			},
+			navClick(index) {
+				this.currentIndex = index
+			},
+			swiperChange(e) {
+				console.log(e, 'swiperChange')
+				this.currentIndex = e.detail.current
+				this.getData('tabChange')
+			},
+			getData(source) {
+				let obj = this
+				let index = this.currentIndex;
+				let navItem = this.navList[index];
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				if (navItem.loadingType === 'noMore') {
+					//防止重复加载
+					return;
+				}
+				if (source == 'tabChange') {
+					uni.showLoading({
+						title: "加载中...",
+						mask: true
+					})
+				}
+				navItem.loadingType = 'loading';
+				article({
+					page: navItem.page,
+					limit: navItem.limit
+				}, navItem.cid).then(({
+					data
+				}) => {
+					if (source == 'tabChange' && navItem.loaded != false) {
+						uni.hideLoading()
+					}
+					console.log(data)
+					let list = data.map(item => {
+						return item
+					})
+					navItem.list = navItem.list.concat(list);
+
+					if (navItem.limit == data.length) {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'more';
+						navItem.page++;
+					} else {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'noMore';
+					}
+					this.$set(navItem, 'loaded', true);
+
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	page {
+		height: 100%;
+		background-color: #eee;
+		padding-top: 20rpx;
+	}
+
+	.content {
+		height: 100%;
+
+		background-color: #fff;
+
+		.nav-bar {
+			line-height: 86rpx;
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			justify-content: space-around;
+			border-bottom: #E0E0E0 1px solid;
+
+			.active {
+				color: #3F7C1F;
+				border-bottom: 3rpx solid #3F7C1F;
+			}
+
+			.nav-item {
+				// flex-grow: 1;
+				text-align: center;
+			}
+		}
+	}
+
+	.swiper-wrapper {
+		background-color: #fff;
+
+		.scroll-wrapper {
+			padding: 0 22rpx 0 23rpx;
+		}
+
+		.list {
+			padding: 18rpx 0;
+			border-bottom: 1px solid #E0E0E0;
+
+			.list-top-tit {
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+				line-height: 42rpx;
+			}
+
+			.list-top-img {
+				margin-top: 15rpx;
+				width: 705rpx;
+				height: 399rpx;
+				background-color: #999;
+			}
+
+			.list-top-time {
+				font-size: 26rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				line-height: 32rpx;
+			}
+
+			.list-scend {
+				display: flex;
+
+				.list-img {
+					flex-shrink: 0;
+					background-color: #999;
+					width: 224rpx;
+					height: 160rpx;
+				}
+
+				.list-info {
+					padding: 10rpx 0 19rpx 23rpx;
+					position: relative;
+
+					.list-tit {
+						width: 420rpx;
+						font-size: 32rpx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #333333;
+						line-height: 32px;
+					}
+
+					.list-time {
+						font-size: 28rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+						line-height: 32rpx;
+						position: absolute;
+						bottom: 19rpx;
+					}
+				}
+
+			}
+		}
+	}
 </style>

+ 40 - 25
pages/story/storyDetail.vue

@@ -1,24 +1,24 @@
 <template>
-	<view class="content">
-		<view class="top">
-			<image src="" mode=""></image>
-		</view>
-		<view class="detail">
-			<view class="detail-top">
-				<view class="tit">
-					正一健康竹胎酵素饮正一健康竹胎酵素饮正
+	<view class="content" >
+		<template v-if="detail">
+			<view class="top">
+				<image :src="detail.image_input[0]" mode=""></image>
+			</view>
+			<view class="detail">
+				<view class="detail-top">
+					<view class="tit">
+						{{detail.title}}
+					</view>
+					<view class="time">
+						更新时间: {{detail.add_time}}
+					</view>
 				</view>
-				<view class="time">
-					更新时间:2019-12-06
+				<view class="jg">
+				</view>
+				<view class="detail-content" v-html="detail.content">
 				</view>
 			</view>
-			<view class="jg">
-				
-			</view>
-			<view class="detail-content" v-html="content">
-				
-			</view>
-		</view>
+		</template>
 	</view>
 </template>
 
@@ -27,8 +27,8 @@
 	export default {
 		data() {
 			return {
-				content: '正一健康竹胎酵素饮正一健康竹胎酵素饮正正一健康竹胎酵素饮正一健康竹胎酵素饮正正一健康竹胎酵素饮正一健康竹胎酵素饮正正一健康竹胎酵素饮正一健康竹胎酵素饮正',
-				detail: {},
+				content: '',
+				detail: '',
 			}
 			
 		},
@@ -40,9 +40,18 @@
 		methods: {
 			getDetail(id) {
 				let obj = this
-				details({},id).then( res => {
-					obj.content = res.data.content
-					obj.detail = res.data
+				uni.showLoading({
+					title: '加载中...'
+				})
+				details({},id).then( ({data}) => {
+					uni.hideLoading()
+					console.log(data)
+					data.content = data.content.replace(/\<img/gi, '<img class="rich-img"')
+					this.detail = data
+					// obj.content = res.data.content
+					// obj.detail = res.data
+				}).catch(err => {
+					console.log(err)
 				})
 			}
 		}
@@ -102,10 +111,16 @@
 				color: #333333;
 				line-height: 48rpx;
 				padding: 37rpx 40rpx;
-				* {
-					max-width: 100%;
-				}
+				width: 750rpx;
+				
+				// * {
+				// 	max-width: 100%;
+				// }
+				
 			}
 		}
+	}
+	.rich-img {
+		width: 100% !important;
 	}
 </style>

+ 337 - 15
pages/user/jiedian.vue

@@ -1,34 +1,356 @@
 <template>
-	<view class="container">
-		<view class="jiedianbackground">
-			<image src="../../static/image/jiedian.png" mode=""></image>
+	<view class="content">
+		<view class="container">
+			<view class="jiedianbackground">
+				<image src="../../static/image/jiedian.png" mode=""></image>
+			</view>
+			<view class="number-box">
+				<view class="number">
+					<text>{{people}}</text>人
+				</view>
+				<view class="renshu">
+					我的接点人数
+				</view>
+			</view>
+		</view>
+		<view class="message">
+			<view class="yeji">
+				<view class="yeji-a">
+					<view class="yeji-top">
+						A区业绩
+					</view>
+					<view class="yeji-buttom">¥{{a}}</view>
+				</view>
+				<view class="border"></view>
+				<view class="yeji-a">
+					<view class="yeji-top">
+						B区业绩
+					</view>
+					<view class="yeji-buttom">¥{{b}}</view>
+				</view>
+				<view class="border"></view>
+				<view class="yeji-a">
+					<view class="yeji-top">
+						C区业绩
+					</view>
+					<view class="yeji-buttom">¥{{c}}</view>
+				</view>
+			</view>
+			<view class="relation-box">
+				<view class="relation">
+					<view class="headbox">
+						<view class="head">
+							<view class="photo">
+								<image src="../../static/image/photo.jpg" mode=""></image>
+							</view>
+						</view>
+						<view class="head-title">
+							<image src="../../static/image/jiedian1.png" mode=""></image>
+						</view>
+					</view>
+					<view class="information">
+						<view class="name">
+							徐浩岚
+						</view>
+						<view class="cell">
+							18252757278
+						</view>
+					</view>
+				</view>
+				<view class="sanchaji">
+					<image src="../../static/image/sanchaji.png" mode=""></image>
+				</view>
+				<view class="subordinate">
+					<view class="headbox" >
+						<view class="head">
+							<view class="photo">
+								<image src="../../static/image/photo.jpg" mode=""></image>
+							</view>
+						</view>
+						<view class="head-title">
+							<image src="../../static/image/jiedian1.png" mode=""></image>
+						</view>
+					</view>
+					<view class="headbox" >
+						<view class="head">
+							<view class="photo">
+								<image src="../../static/image/photo.jpg" mode=""></image>
+							</view>
+						</view>
+						<view class="head-title">
+							<image src="../../static/image/jiedian1.png" mode=""></image>
+						</view>
+					</view>
+					<view class="headbox" >
+						<view class="head">
+							<view class="photo">
+								<image src="../../static/image/photo.jpg" mode=""></image>
+							</view>
+						</view>
+						<view class="head-title">
+							<image src="../../static/image/jiedian1.png" mode=""></image>
+						</view>
+					</view>
+				</view>
+			</view>
+
 		</view>
-		
 	</view>
 </template>
 
 <script>
-	export default{
-		data(){
-			return{}
+	export default {
+		data() {
+			return {
+				a: 1,
+				b: 2,
+				c: 3,
+				people: 255,
+				//'12345678901'.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
+			}
 		},
-		methods:{}
+		methods: {}
 	}
 </script>
 
 <style lang="scss">
-	page{
+	page {
 		padding: 0;
 		margin: 0;
+		height: 100%;
 		background-color: #FFFFFF;
 	}
-	.container{
-		height: 100%;
+
+	.content {}
+
+	.container {
+		width: 750rpx;
+		height: 400rpx;
+		position: relative;
+
+		.jiedianbackground {
+			position: absolute;
+			width: 750rpx;
+			height: 400rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.number-box {
+			width: 750rpx;
+			height: 400rpx;
+			position: absolute;
+			display: flex;
+			justify-content: center;
+			flex-direction: column;
+			align-items: center;
+
+			.number {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #3F7C1F;
+
+				text {
+					font-size: 72rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #3F7C1F;
+					line-height: 86rpx;
+				}
+			}
+
+			.renshu {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #3F7C1F;
+			}
+		}
 	}
-	.jiedianbackground{
-		image{
-			width: 100%;
-			height: 100%;
+
+	.message {
+		padding: 0 30rpx;
+
+		.relation-box {
+			margin-top: 100rpx;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+
+			.relation {
+				position: relative;
+				display: flex;
+				align-items: center;
+				
+
+				.headbox {
+
+					position: absolute;
+					width: 154rpx;
+					height: 154rpx;
+
+					.head {
+						width: 154rpx;
+						height: 154rpx;
+						background: #EF9E20;
+						box-shadow: 5rpx 0rpx 5rpx 0rpx rgba(110, 171, 78, 0.26);
+						border-radius: 50%;
+						overflow: hidden;
+
+						.photo {
+							width: 154rpx;
+							height: 154rpx;
+
+							image {
+								width: 100%;
+								height: 100%;
+							}
+						}
+					}
+
+					.head-title {
+						margin: -30rpx 30rpx 0 30rpx;
+						width: 94rpx;
+						height: 32rpx;
+
+						image {
+							width: 100%;
+							height: 100%;
+						}
+					}
+				}
+
+				.information {
+					margin-left: 77rpx;
+					display: flex;
+					justify-content: center;
+					flex-direction: column;
+					width: 297rpx;
+					height: 137rpx;
+					align-items: center;
+					background: #FFFFFF;
+					border: 4rpx solid #6EAB4E;
+					border-radius: 10rpx;
+
+					.name {
+						font-size: 32rpx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #3F7C1F;
+						line-height: 48rpx;
+					}
+
+					.cell {
+						margin-left: 70rpx;
+						font-size: 26rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #ABD56F;
+						line-height: 48rpx;
+					}
+				}
+
+
+			}
+
+			.sanchaji {
+				margin: 30rpx 0;
+				width: 530rpx;
+				height: 91rpx;
+
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+
+			.subordinate {
+				width: 750rpx;
+				display: flex;
+				justify-content: space-around;
+					.headbox {
+						
+						width: 154rpx;
+						height: 154rpx;
+
+						.head {
+							width: 154rpx;
+							height: 154rpx;
+							background: #EF9E20;
+							box-shadow: 5rpx 0rpx 5rpx 0rpx rgba(110, 171, 78, 0.26);
+							border-radius: 50%;
+							overflow: hidden;
+
+							.photo {
+								width: 154rpx;
+								height: 154rpx;
+
+								image {
+									width: 100%;
+									height: 100%;
+								}
+							}
+						}
+
+						.head-title {
+							margin: -30rpx 30rpx 0 30rpx;
+							width: 94rpx;
+							height: 32rpx;
+
+							image {
+								width: 100%;
+								height: 100%;
+							}
+						}
+					
+				}
+			}
+		}
+
+		.yeji {
+			position: relative;
+			margin-top: -72rpx;
+			width: 690rpx;
+			height: 143rpx;
+			background: #FFFFFF;
+			box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
+			border-radius: 10rpx;
+			display: flex;
+			justify-content: space-around;
+			align-items: center;
+
+			.yeji-a {
+				display: flex;
+				flex-direction: column;
+				justify-content: space-around;
+				align-items: center;
+
+				.yeji-top {
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #333333;
+					line-height: 35px;
+				}
+
+				.yeji-buttom {
+					font-size: 34rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #333333;
+					line-height: 35px;
+				}
+			}
+
+			.border {
+				width: 1rpx;
+				height: 51rpx;
+				background: #DDDDDD;
+			}
 		}
 	}
 </style>

+ 554 - 551
static/css/cmy.css

@@ -1,551 +1,554 @@
-/*初始化类*/
-@font-face {
-	font-family: 'iconfont';
-	/* project id 1482221 */
-	src: url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.eot');
-	src: url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.eot?#iefix') format('embedded-opentype'),
-		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.woff2') format('woff2'),
-		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.woff') format('woff'),
-		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.ttf') format('truetype'),
-		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.svg#iconfont') format('svg');
-}
-
-.acea-row {
-	display: -webkit-box;
-	display: -moz-box;
-	display: -webkit-flex;
-	display: -ms-flexbox;
-	display: flex;
-	-webkit-box-lines: multiple;
-	-moz-box-lines: multiple;
-	-o-box-lines: multiple;
-	-webkit-flex-wrap: wrap;
-	-ms-flex-wrap: wrap;
-	flex-wrap: wrap
-}
-
-.acea-row.row-middle {
-	-webkit-box-align: center;
-	-moz-box-align: center;
-	-o-box-align: center;
-	-ms-flex-align: center;
-	-webkit-align-items: center;
-	align-items: center
-}
-
-.bg-color-red {
-	background-color: #e93323 !important;
-}
-
-.acea-row.row-right {
-	-webkit-box-pack: end;
-	-moz-box-pack: end;
-	-o-box-pack: end;
-	-ms-flex-pack: end;
-	-webkit-justify-content: flex-end;
-	justify-content: flex-end
-}
-
-.acea-row.row-between-wrapper {
-	-webkit-box-align: center;
-	-moz-box-align: center;
-	-o-box-align: center;
-	-ms-flex-align: center;
-	-webkit-align-items: center;
-	align-items: center;
-	-webkit-box-pack: justify;
-	-moz-box-pack: justify;
-	-o-box-pack: justify;
-	-ms-flex-pack: justify;
-	-webkit-justify-content: space-between;
-	justify-content: space-between
-}
-
-.acea-row.row-column-around {
-	-webkit-flex-direction: column;
-	-ms-flex-direction: column;
-	flex-direction: column;
-	justify-content: space-around;
-	-webkit-justify-content: space-around
-}
-
-.acea-row.row-center-wrapper {
-	-webkit-box-align: center;
-	-moz-box-align: center;
-	-o-box-align: center;
-	-ms-flex-align: center;
-	-webkit-align-items: center;
-	align-items: center;
-	-webkit-box-pack: center;
-	-moz-box-pack: center;
-	-o-box-pack: center;
-	-ms-flex-pack: center;
-	-webkit-justify-content: center;
-	justify-content: center
-}
-
-.iconfont {
-	font-family: "iconfont" !important;
-	font-size: 34rpx;
-	font-style: normal;
-	-webkit-font-smoothing: antialiased;
-	-webkit-text-stroke-width: 0rpx;
-	-moz-osx-font-smoothing: grayscale;
-}
-
-.iconedit:before {
-	content: "\e649";
-}
-
-.iconfavorfill:before {
-	content: "\e64b";
-}
-
-.iconfavor:before {
-	content: "\e64c";
-}
-
-.iconlocation:before {
-	content: "\e651";
-}
-
-.iconroundcheckfill:before {
-	content: "\e656";
-}
-
-.iconroundcheck:before {
-	content: "\e657";
-}
-
-.iconunfold:before {
-	content: "\e661";
-}
-
-.iconlikefill:before {
-	content: "\e668";
-}
-
-.iconlike:before {
-	content: "\e669";
-}
-
-.iconshop:before {
-	content: "\e676";
-}
-
-.iconcart:before {
-	content: "\e6af";
-}
-
-.icondelete:before {
-	content: "\e6b4";
-}
-
-.iconhome:before {
-	content: "\e6b8";
-}
-
-.iconcartfill:before {
-	content: "\e6b9";
-}
-
-.iconhomefill:before {
-	content: "\e6bb";
-}
-
-.iconlock:before {
-	content: "\e6c0";
-}
-
-.iconfriendadd:before {
-	content: "\e6ca";
-}
-
-.iconfold:before {
-	content: "\e6de";
-}
-
-.iconapps:before {
-	content: "\e729";
-}
-
-.iconadd:before {
-	content: "\e767";
-}
-
-.iconmove:before {
-	content: "\e768";
-}
-
-.icontriangledownfill:before {
-	content: "\e79b";
-}
-
-.icontriangleupfill:before {
-	content: "\e79c";
-}
-
-.iconshaixuan:before {
-	content: "\e74a";
-}
-
-.iconyanzhengma:before {
-	content: "\e684";
-}
-
-.iconjifen:before {
-	content: "\e60f";
-}
-
-.iconwuliuxinxi:before {
-	content: "\e62b";
-}
-
-.iconmessage:before {
-	content: "\e78a";
-}
-
-.iconsetting:before {
-	content: "\e78e";
-}
-
-.iconaddition:before {
-	content: "\e6e0";
-}
-
-.iconclose:before {
-	content: "\e6e9";
-}
-
-.iconenter:after {
-	content: "\e6f8";
-}
-
-.iconprompt:before {
-	content: "\e71b";
-}
-
-.iconreturn:before {
-	content: "\e720";
-}
-
-.iconsearch:before {
-	content: "\e741";
-}
-
-.iconpengyouquan:before {
-	content: "\e62c";
-}
-
-.iconweixin:before {
-	content: "\e60e";
-}
-
-.iconzhifubao:before {
-	content: "\e673";
-}
-
-.iconyue:before {
-	content: "\e618";
-}
-
-.iconweixin1:before {
-	content: "\e622";
-}
-
-.iconlock1:before {
-	content: "\e64d";
-}
-
-.iconuser:before {
-	content: "\e64e";
-}
-
-.iconchenggongtixianshouyi:before {
-	content: "\e64f";
-}
-
-.iconviptuiguangdingdan:before {
-	content: "\e650";
-}
-
-.icondaifukuan:before {
-	content: "\e652";
-}
-
-.icondaijiesuanshouyi:before {
-	content: "\e653";
-}
-
-.icondaidakuanshouyi:before {
-	content: "\e654";
-}
-
-.icondaifahuo:before {
-	content: "\e655";
-}
-
-.icondaishouhuoshouyi:before {
-	content: "\e658";
-}
-
-.icondaishouhuo:before {
-	content: "\e659";
-}
-
-.iconwuxiaoshouyi:before {
-	content: "\e65a";
-}
-
-.icontixianmingxi:before {
-	content: "\e65b";
-}
-
-.iconshouyi:before {
-	content: "\e65c";
-}
-
-.iconkouchutixianshouxufei:before {
-	content: "\e65d";
-}
-
-.iconyishenqingshouyi:before {
-	content: "\e65e";
-}
-
-.icontuihuanhuo:before {
-	content: "\e65f";
-}
-
-
-/*水平线*/
-.hr {
-	width: 100%;
-	position: relative;
-	border-bottom: 1px solid #dddddd;
-	/* height: 0.5rpx; */
-}
-
-/* 一行显示 */
-.clamp {
-	overflow: hidden;
-	text-overflow: ellipsis;
-	white-space: nowrap;
-	display: block;
-}
-
-/* 二行显示 */
-.clamp2 {
-	overflow: hidden;
-	text-overflow: ellipsis;
-	display: -webkit-box;
-	-webkit-line-clamp: 2;
-	-webkit-box-orient: vertical;
-}
-
-/* 二行显示 */
-.ellipsis {
-	overflow: hidden;
-	text-overflow: ellipsis;
-	display: -webkit-box;
-	-webkit-box-orient: vertical;
-	-webkit-line-clamp: 2;
-}
-
-.common-hover {
-	background: #f5f5f5;
-}
-
-/* 角标 */
-.corner {
-	background-color: #e51c23;
-	position: absolute;
-	right: -18rpx;
-	top: -18rpx;
-	color: #FFFFFF;
-	text-align: center;
-	border-radius: 999px;
-	font-size: 24rpx !important;
-	min-width: 35rpx;
-	min-height: 35rpx;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	line-height: 1;
-}
-
-.flex_item {
-	display: flex;
-	align-items: center;
-	/* justify-content: space-between; */
-}
-
-/* 左右顶格加上下居中 */
-.flex-between-center {
-	display: flex;
-	justify-content: space-between;
-	align-items: center;
-}
-
-/* flex布局-整体居中 */
-.flex-center {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-}
-
-.flex-start {
-	display: flex;
-	align-items: center;
-	justify-content: flex-start;
-}
-
-/*文字对齐*/
-.text-left {
-	text-align: left !important;
-}
-
-.text-center {
-	text-align: center !important;
-}
-
-.text-justify {
-	text-align: justify !important;
-}
-
-.text-right {
-	text-align: right !important;
-}
-
-.text-default {
-	color: #212121 !important;
-}
-
-.text-white {
-	color: #ffffff !important;
-}
-
-.text-primary {
-	color: #00bcd4 !important;
-}
-
-.text-success {
-	color: #009688 !important;
-}
-
-.text-info {
-	color: #03a9f4 !important;
-}
-
-.text-warning {
-	color: #ffc107 !important;
-}
-
-.text-danger {
-	color: #e51c23 !important;
-}
-
-.text-pink {
-	color: #e91e63 !important;
-}
-
-.text-purple {
-	color: #673ab7 !important;
-}
-
-.text-indigo {
-	color: #3f51b5 !important;
-}
-
-.text-gray {
-	color: #999999 !important;
-}
-
-.bg-default {
-	background-color: #f5f5f5 !important;
-}
-
-.bg-primary {
-	background-color: #00bcd4 !important;
-}
-
-.bg-success {
-	background-color: #009688 !important;
-}
-
-.bg-info {
-	background-color: #03a9f4 !important;
-}
-
-.bg-warning {
-	background-color: #FFB238 !important;
-}
-
-.bg-danger {
-	background-color: #DC4D46 !important;
-}
-
-.bg-pink {
-	background-color: #e91e63 !important;
-}
-
-.bg-purple {
-	background-color: #673ab7 !important;
-}
-
-.bg-indigo {
-	background-color: #3f51b5 !important;
-}
-
-.bg-white {
-	background-color: white !important;
-}
-
-.bg-gray {
-	background-color: #e3e3e3 !important;
-}
-
-/* 边框 */
-.border-radius-15 {
-	border-radius: 15rpx;
-}
-
-.border-radius-10 {
-	border-radius: 10rpx;
-}
-
-.border-radius-all {
-	border-radius: 1000rpx;
-}
-
-/* 底部边线 */
-.borde-b {
-	border-bottom: 1px solid #dddddd;
-}
-
-/* 弹性盒子 */
-.flex {
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-}
-
-.items-left {
-	justify-content: flex-start;
-}
-
-.items-right {
-	justify-content: flex-end;
-}
-
-.flex-shrink-false {
-	flex-shrink: 0;
-}
-
-.flex-grow-true {
-	flex-grow: 1;
-}
-
-.position-relative {
-	position: relative;
-}
+/*初始化类*/
+@font-face {
+	font-family: 'iconfont';
+	/* project id 1482221 */
+	src: url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.eot');
+	src: url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.eot?#iefix') format('embedded-opentype'),
+		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.woff2') format('woff2'),
+		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.woff') format('woff'),
+		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.ttf') format('truetype'),
+		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.svg#iconfont') format('svg');
+}
+
+.acea-row {
+	display: -webkit-box;
+	display: -moz-box;
+	display: -webkit-flex;
+	display: -ms-flexbox;
+	display: flex;
+	-webkit-box-lines: multiple;
+	-moz-box-lines: multiple;
+	-o-box-lines: multiple;
+	-webkit-flex-wrap: wrap;
+	-ms-flex-wrap: wrap;
+	flex-wrap: wrap
+}
+
+.acea-row.row-middle {
+	-webkit-box-align: center;
+	-moz-box-align: center;
+	-o-box-align: center;
+	-ms-flex-align: center;
+	-webkit-align-items: center;
+	align-items: center
+}
+
+.bg-color-red {
+	background-color: #e93323 !important;
+}
+
+.acea-row.row-right {
+	-webkit-box-pack: end;
+	-moz-box-pack: end;
+	-o-box-pack: end;
+	-ms-flex-pack: end;
+	-webkit-justify-content: flex-end;
+	justify-content: flex-end
+}
+
+.acea-row.row-between-wrapper {
+	-webkit-box-align: center;
+	-moz-box-align: center;
+	-o-box-align: center;
+	-ms-flex-align: center;
+	-webkit-align-items: center;
+	align-items: center;
+	-webkit-box-pack: justify;
+	-moz-box-pack: justify;
+	-o-box-pack: justify;
+	-ms-flex-pack: justify;
+	-webkit-justify-content: space-between;
+	justify-content: space-between
+}
+
+.acea-row.row-column-around {
+	-webkit-flex-direction: column;
+	-ms-flex-direction: column;
+	flex-direction: column;
+	justify-content: space-around;
+	-webkit-justify-content: space-around
+}
+
+.acea-row.row-center-wrapper {
+	-webkit-box-align: center;
+	-moz-box-align: center;
+	-o-box-align: center;
+	-ms-flex-align: center;
+	-webkit-align-items: center;
+	align-items: center;
+	-webkit-box-pack: center;
+	-moz-box-pack: center;
+	-o-box-pack: center;
+	-ms-flex-pack: center;
+	-webkit-justify-content: center;
+	justify-content: center
+}
+
+.iconfont {
+	font-family: "iconfont" !important;
+	font-size: 34rpx;
+	font-style: normal;
+	-webkit-font-smoothing: antialiased;
+	-webkit-text-stroke-width: 0rpx;
+	-moz-osx-font-smoothing: grayscale;
+}
+
+.iconedit:before {
+	content: "\e649";
+}
+
+.iconfavorfill:before {
+	content: "\e64b";
+}
+
+.iconfavor:before {
+	content: "\e64c";
+}
+
+.iconlocation:before {
+	content: "\e651";
+}
+
+.iconroundcheckfill:before {
+	content: "\e656";
+}
+
+.iconroundcheck:before {
+	content: "\e657";
+}
+
+.iconunfold:before {
+	content: "\e661";
+}
+
+.iconlikefill:before {
+	content: "\e668";
+}
+
+.iconlike:before {
+	content: "\e669";
+}
+
+.iconshop:before {
+	content: "\e676";
+}
+
+.iconcart:before {
+	content: "\e6af";
+}
+
+.icondelete:before {
+	content: "\e6b4";
+}
+
+.iconhome:before {
+	content: "\e6b8";
+}
+
+.iconcartfill:before {
+	content: "\e6b9";
+}
+
+.iconhomefill:before {
+	content: "\e6bb";
+}
+
+.iconlock:before {
+	content: "\e6c0";
+}
+
+.iconfriendadd:before {
+	content: "\e6ca";
+}
+
+.iconfold:before {
+	content: "\e6de";
+}
+
+.iconapps:before {
+	content: "\e729";
+}
+
+.iconadd:before {
+	content: "\e767";
+}
+
+.iconmove:before {
+	content: "\e768";
+}
+
+.icontriangledownfill:before {
+	content: "\e79b";
+}
+
+.icontriangleupfill:before {
+	content: "\e79c";
+}
+
+.iconshaixuan:before {
+	content: "\e74a";
+}
+
+.iconyanzhengma:before {
+	content: "\e684";
+}
+
+.iconjifen:before {
+	content: "\e60f";
+}
+
+.iconwuliuxinxi:before {
+	content: "\e62b";
+}
+
+.iconmessage:before {
+	content: "\e78a";
+}
+
+.iconsetting:before {
+	content: "\e78e";
+}
+
+.iconaddition:before {
+	content: "\e6e0";
+}
+
+.iconclose:before {
+	content: "\e6e9";
+}
+
+.iconenter:after {
+	content: "\e6f8";
+}
+
+.iconprompt:before {
+	content: "\e71b";
+}
+
+.iconreturn:before {
+	content: "\e720";
+}
+
+.iconsearch:before {
+	content: "\e741";
+}
+
+.iconpengyouquan:before {
+	content: "\e62c";
+}
+
+.iconweixin:before {
+	content: "\e60e";
+}
+
+.iconzhifubao:before {
+	content: "\e673";
+}
+
+.iconyue:before {
+	content: "\e618";
+}
+
+.iconweixin1:before {
+	content: "\e622";
+}
+
+.iconlock1:before {
+	content: "\e64d";
+}
+
+.iconuser:before {
+	content: "\e64e";
+}
+
+.iconchenggongtixianshouyi:before {
+	content: "\e64f";
+}
+
+.iconviptuiguangdingdan:before {
+	content: "\e650";
+}
+
+.icondaifukuan:before {
+	content: "\e652";
+}
+
+.icondaijiesuanshouyi:before {
+	content: "\e653";
+}
+
+.icondaidakuanshouyi:before {
+	content: "\e654";
+}
+
+.icondaifahuo:before {
+	content: "\e655";
+}
+
+.icondaishouhuoshouyi:before {
+	content: "\e658";
+}
+
+.icondaishouhuo:before {
+	content: "\e659";
+}
+
+.iconwuxiaoshouyi:before {
+	content: "\e65a";
+}
+
+.icontixianmingxi:before {
+	content: "\e65b";
+}
+
+.iconshouyi:before {
+	content: "\e65c";
+}
+
+.iconkouchutixianshouxufei:before {
+	content: "\e65d";
+}
+
+.iconyishenqingshouyi:before {
+	content: "\e65e";
+}
+
+.icontuihuanhuo:before {
+	content: "\e65f";
+}
+
+
+/*水平线*/
+.hr {
+	width: 100%;
+	position: relative;
+	border-bottom: 1px solid #dddddd;
+	/* height: 0.5rpx; */
+}
+
+/* 一行显示 */
+.clamp {
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+	display: block;
+}
+
+/* 二行显示 */
+.clamp2 {
+	overflow: hidden;
+	text-overflow: ellipsis;
+	display: -webkit-box;
+	-webkit-line-clamp: 2;
+	-webkit-box-orient: vertical;
+}
+
+/* 二行显示 */
+.ellipsis {
+	overflow: hidden;
+	text-overflow: ellipsis;
+	display: -webkit-box;
+	-webkit-box-orient: vertical;
+	-webkit-line-clamp: 2;
+}
+
+.common-hover {
+	background: #f5f5f5;
+}
+
+/* 角标 */
+.corner {
+	background-color: #e51c23;
+	position: absolute;
+	right: -18rpx;
+	top: -18rpx;
+	color: #FFFFFF;
+	text-align: center;
+	border-radius: 999px;
+	font-size: 24rpx !important;
+	min-width: 35rpx;
+	min-height: 35rpx;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	line-height: 1;
+}
+
+.flex_item {
+	display: flex;
+	align-items: center;
+	/* justify-content: space-between; */
+}
+
+/* 左右顶格加上下居中 */
+.flex-between-center {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+}
+
+/* flex布局-整体居中 */
+.flex-center {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+}
+
+.flex-start {
+	display: flex;
+	align-items: center;
+	justify-content: flex-start;
+}
+
+/*文字对齐*/
+.text-left {
+	text-align: left !important;
+}
+
+.text-center {
+	text-align: center !important;
+}
+
+.text-justify {
+	text-align: justify !important;
+}
+
+.text-right {
+	text-align: right !important;
+}
+
+.text-default {
+	color: #212121 !important;
+}
+
+.text-white {
+	color: #ffffff !important;
+}
+
+.text-primary {
+	color: #00bcd4 !important;
+}
+
+.text-success {
+	color: #009688 !important;
+}
+
+.text-info {
+	color: #03a9f4 !important;
+}
+
+.text-warning {
+	color: #ffc107 !important;
+}
+
+.text-danger {
+	color: #e51c23 !important;
+}
+
+.text-pink {
+	color: #e91e63 !important;
+}
+
+.text-purple {
+	color: #673ab7 !important;
+}
+
+.text-indigo {
+	color: #3f51b5 !important;
+}
+
+.text-gray {
+	color: #999999 !important;
+}
+
+.bg-default {
+	background-color: #f5f5f5 !important;
+}
+
+.bg-primary {
+	background-color: #00bcd4 !important;
+}
+
+.bg-success {
+	background-color: #009688 !important;
+}
+
+.bg-info {
+	background-color: #03a9f4 !important;
+}
+
+.bg-warning {
+	background-color: #FFB238 !important;
+}
+
+.bg-danger {
+	background-color: #DC4D46 !important;
+}
+
+.bg-pink {
+	background-color: #e91e63 !important;
+}
+
+.bg-purple {
+	background-color: #673ab7 !important;
+}
+
+.bg-indigo {
+	background-color: #3f51b5 !important;
+}
+
+.bg-white {
+	background-color: white !important;
+}
+
+.bg-gray {
+	background-color: #e3e3e3 !important;
+}
+
+/* 边框 */
+.border-radius-15 {
+	border-radius: 15rpx;
+}
+
+.border-radius-10 {
+	border-radius: 10rpx;
+}
+
+.border-radius-all {
+	border-radius: 1000rpx;
+}
+
+/* 底部边线 */
+.borde-b {
+	border-bottom: 1px solid #dddddd;
+}
+
+/* 弹性盒子 */
+.flex {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+}
+
+.items-left {
+	justify-content: flex-start;
+}
+
+.items-right {
+	justify-content: flex-end;
+}
+
+.flex-shrink-false {
+	flex-shrink: 0;
+}
+
+.flex-grow-true {
+	flex-grow: 1;
+}
+
+.position-relative {
+	position: relative;
+}
+.rich-img {
+		width: 100% !important;
+	}

BIN
static/image/photo.jpg


BIN
static/image/sanchaji.png


+ 36 - 35
store/index.js

@@ -1,35 +1,36 @@
-import Vue from 'vue'
-import Vuex from 'vuex'
-import user from './model/user'
-Vue.use(Vuex)
-
-const store = new Vuex.Store({
-	namespaced: true,
-	state: {
-		// baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置 
-		baseURL:'http://base.liuniu946.com',//请求地址配置 
-		urlFile:'/index',//项目部署所在文件夹
-		userInfo: {}, //登录信息
-		loginInterceptor:false,//是否打开强制登录
-		// #ifdef H5 || MP-WEIXIN
-		weichatInfo:{},//保存微信注册信息
-		weichatObj:'',//微信对象
-		// #endif
-	},
-	mutations: {
-		//保存微信信息
-		setWeiChatInfo(state, provider) {
-			state.weichatInfo = provider;
-		},
-		//保存微信对象
-		setWeiChatObj(state, provider) {
-			state.weichatObj = provider;
-		}
-	},
-	modules:{
-		user
-	},
-	actions: {}
-})
-
-export default store
+import Vue from 'vue'
+import Vuex from 'vuex'
+import user from './model/user'
+Vue.use(Vuex)
+
+const store = new Vuex.Store({
+	namespaced: true,
+	state: {
+		// baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置 
+		baseURL:'http://po.frp.liuniu946.com',//请求地址配置 
+		urlFile:'/index',//项目部署所在文件夹
+		userInfo: {}, //登录信息
+		loginInterceptor:false,//是否打开强制登录
+		// #ifdef H5 || MP-WEIXIN
+		weichatInfo:{},//保存微信注册信息
+		weichatObj:'',//微信对象
+		// #endif
+	},
+	mutations: {
+		//保存微信信息
+		setWeiChatInfo(state, provider) {
+			state.weichatInfo = provider;
+			
+		},
+		//保存微信对象
+		setWeiChatObj(state, provider) {
+			state.weichatObj = provider;
+		}
+	},
+	modules:{
+		user
+	},
+	actions: {}
+})
+
+export default store