liujd 6 лет назад
Родитель
Сommit
3a954bc00c

+ 3 - 0
mobile-code/src/api/common/index.js

@@ -15,3 +15,6 @@ export const commonUrl = param => https.get('/merchant/common-url', param)
 
 // 常用链接 b
 export const getFestList = param => https.get('/fest/list', param)
+
+// 商家的门店 m
+export const getShop = param => https.get('/shop/detail', param)

+ 1 - 1
mobile-code/src/api/index.js

@@ -1 +1 @@
-export { default as apiBehavior } from './behaviorTrack'
+// export { default as apiBehavior } from './behaviorTrack'

+ 2 - 2
mobile-code/src/config.js

@@ -1,2 +1,2 @@
-// 项目配置--由bat脚本变更
-export const ProjectName = 'business'
+// 项目配置--由bat脚本自动变更
+export const ProjectName = 'mobile'

+ 1 - 1
mobile-code/src/constant/index.js

@@ -15,7 +15,7 @@ const envVal = {
 // 项目配置
 if (ProjectName == 'mobile') {
 	envVal.formal = process.env.NODE_ENV == 'development' ? 'http://m.huaml.com' : `${window.location.protocol}//${window.location.host}`
-	envVal.hostUrl = process.env.NODE_ENV == 'development' ? 'http://api.b.huaml.com' : `http://api.b.huaml.com`
+	envVal.hostUrl = process.env.NODE_ENV == 'development' ? 'http://api.m.huaml.com' : `http://api.m.huaml.com`
 
 	uni.setStorageSync('source', 'mobile')
 } else {

+ 0 - 2
mobile-code/src/m-config.js

@@ -1,2 +0,0 @@
-// 项目配置--由bat脚本自动变更
-export const ProjectName = 'mobile'

+ 0 - 61
mobile-code/src/m-manifest.json

@@ -1,61 +0,0 @@
-{
-    "name" : "花卉宝",
-    "appid" : "",
-    "description" : "应用描述",
-    "versionName" : "1.0.0",
-    "versionCode" : "100",
-    "transformPx" : true,
-    "debug": false,
-    "networkTimeout": {
-        "request":200000
-    },
-    "mp-weixin" : {
-        "appid" : "wx3a163add860e0a86",
-        "setting" : {
-            "urlCheck" : false
-        },
-        "usingComponents" : true,
-        "permission" : {
-            "scope.userLocation" : {
-                "desc" : "请点击确定"
-            }
-        }
-    },
-    "mp-alipay" : {
-        "usingComponents" : true
-    },
-    "mp-baidu" : {
-        "usingComponents" : true
-    },
-    "mp-toutiao" : {
-        "usingComponents" : true
-    },
-    "h5" : {
-        "template" : "template.h5.html",
-        "router" : {
-            // "mode" : "history",
-            "base" : "/",
-            "publicPath" : "/"
-        },
-        "devServer": {
-            "port": 81,
-            "proxy": {
-                "/api": {
-                    "target": "http://api.b.huaml.com",
-                    "secure": false,
-                    "changeOrigin": true,
-                    "pathRewrite": {
-                        "^/api": ""
-                    }
-                }
-            }
-        },
-        "sdkConfigs" : {
-            "maps" : {
-                "qqmap" : {
-                    "key" : ""
-                }
-            }
-        }
-    }
-}

+ 0 - 197
mobile-code/src/m-pages.json

@@ -1,197 +0,0 @@
-{
-	"pages": [
-		{
-			"path": "pages/home/index",
-			"style": {
-				"navigationBarTitleText": "加载中..."
-			}
-		},
-		{
-			"path": "pages/home/category",
-			"style": {
-				"navigationBarTitleText": "分类"
-			}
-		},
-		{
-			"path": "pages/home/shop",
-			"style": {
-				"navigationBarTitleText": "门店"
-			}
-		},
-		{
-			"path": "pages/home/user",
-			"style": {
-				"navigationBarTitleText": "我的"
-			}
-		},
-		{
-			"path": "pages/common/redirect",
-			"style": {
-				"navigationBarTitleText": "加载中..."
-			}
-		},
-		{
-			"path": "pages/common/webview",
-			"style": {
-				"navigationBarBackgroundColor": "#ffffff",
-				"navigationBarTextStyle": "black"
-			}
-		}
-	],
-	"subPackages": [
-		{
-			"root": "pages/user",
-			"pages": [
-				{
-					"path": "register",
-					"style": {
-						"navigationBarTitleText": "注册"
-					}
-				},
-				{
-					"path": "password",
-					"style": {
-						"navigationBarTitleText": "修改密码"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/goods",
-			"pages": [
-				{
-					"path": "detail",
-					"style": {
-						"navigationBarTitleText": "详情"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/pay",
-			"pages": [
-				{
-					"path": "index",
-					"style": {
-						"navigationBarTitleText": "支付"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/callback",
-			"pages": [
-				{
-					"path": "index"
-				}
-			]
-		},
-		{
-			"root": "pages/coupon",
-			"pages": [
-				{
-					"path": "list",
-					"style": {
-						"navigationBarTitleText": "优惠券",
-						"enablePullDownRefresh": true
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/order",
-			"pages": [
-				{
-					"path": "list",
-					"style": {
-						"navigationBarTitleText": "订单列表",
-						"enablePullDownRefresh": true
-					}
-				},
-				{
-					"path": "detail",
-					"style": {
-						"navigationBarTitleText": "订单列表"
-					}
-				},
-				{
-					"path": "buy",
-					"style": {
-						"navigationBarTitleText": "订单确认"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/interest",
-			"pages": [
-				{
-					"path": "invite",
-					"style": {
-						"navigationBarTitleText": "邀请排行",
-						"enablePullDownRefresh": true
-					}
-				},
-				{
-					"path": "level",
-					"style": {
-						"navigationBarTitleText": "会员等级",
-						"enablePullDownRefresh": true
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/chat",
-			"pages": [
-				{
-					"path": "index",
-					"style": {
-						"navigationBarTitleText": "客服",
-						"enablePullDownRefresh": true
-					}
-				}
-			]
-		}
-	],
-	"globalStyle": {
-		// #ifdef H5
-		"navigationStyle": "custom",
-		// #endif
-		"navigationBarBackgroundColor": "#fff",
-		"navigationBarTitleText": "花卉宝",
-		"navigationBarTextStyle": "black"
-	},
-	"tabBar": {
-		"color": "#C0C4CC",
-		"selectedColor": "#fa436a",
-		"borderStyle": "black",
-		"backgroundColor": "#ffffff",
-		"list": [{
-				"pagePath": "pages/home/index",
-				"iconPath": "static/images/common/home-no.png",
-				"selectedIconPath": "static/images/common/home-is.png",
-				"text": "首页"
-			},
-			{
-				"pagePath": "pages/home/category",
-				"iconPath": "static/images/common/category-no.png",
-				"selectedIconPath": "static/images/common/category-is.png",
-				"text": "分类"
-			},
-			{
-				"pagePath": "pages/home/shop",
-				"iconPath": "static/images/common/shop-no.png",
-				"selectedIconPath": "static/images/common/shop-is.png",
-				"text": "门店"
-			},
-			{
-				"pagePath": "pages/home/user",
-				"iconPath": "static/images/common/user-no.png",
-				"selectedIconPath": "static/images/common/user-is.png",
-				"text": "我的"
-			}
-		]
-	}
-}
-

+ 0 - 105
mobile-code/src/m-uni.scss

@@ -1,105 +0,0 @@
-/***
-全局scss 变量和方法 存放处
- */
-//  uniapp upx换算函数
-//  uni.upx2px(val) + 'px'
-/* 引入minxin */
-@import '~@/static/css/minxin.scss';
-
-/* 颜色变量 */
-/*图片地址*/
-$imgUrl: 'https://wximg.meijiabang.com/hkds/miniapp/images/';
-
-// 所有样式为公共样式,已在全局引用可直接使用
-// 主色
-$mainColor: #FF2842;
-$mainColor1: #049E2C;
-$auxiliaryColor2: #ff6900;
-
-$blueColor: #2965fe;
-$greenColor: #049E2C;
-$redColor: #ff3841;
-// 字体色
-$fontColorMain: #333333;
-$fontColor2: #666666;
-$fontColor3: #999999;
-$fontColor4: #bbbbbb;
-$fontColor5: #cccccc;
-// 边框
-$borderColor: #eee;
-$borderColor1: #46963E;
-// 背景色
-$backColor: #f5f5f5;
-
-// minxin
-@mixin disFlexCen(){
-    display:flex;
-    display: -webkit-flex;
-    display: -moz-flex;
-    display: -ms-flex;
-    align-items: center;
-}
-
-// =============================================== 下方为uniapp原生样式变量 ======================================
-
-/* 行为相关颜色 */
-$uni-color-primary: #007aff;
-$uni-color-success: #4cd964;
-$uni-color-warning: #f0ad4e;
-$uni-color-error: #dd524d;
-
-/* 文字基本颜色 */
-$uni-text-color:#333;//基本色
-$uni-text-color-inverse:#fff;//反色
-$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
-$uni-text-color-placeholder: #808080;
-$uni-text-color-disable:#c0c0c0;
-
-/* 背景颜色 */
-$uni-bg-color:#ffffff;
-$uni-bg-color-grey:#f8f8f8;
-$uni-bg-color-hover:#f1f1f1;//点击状态颜色
-$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
-
-/* 边框颜色 */
-$uni-border-color:#c8c7cc;
-
-/* 尺寸变量 */
-
-/* 文字尺寸 */
-$uni-font-size-sm:24upx;
-$uni-font-size-base:28upx;
-$uni-font-size-lg:32upx;
-
-/* 图片尺寸 */
-$uni-img-size-sm:40upx;
-$uni-img-size-base:52upx;
-$uni-img-size-lg:80upx;
-
-/* Border Radius */
-$uni-border-radius-sm: 4upx;
-$uni-border-radius-base: 6upx;
-$uni-border-radius-lg: 12upx;
-$uni-border-radius-circle: 50%;
-
-/* 水平间距 */
-$uni-spacing-row-sm: 10px;
-$uni-spacing-row-base: 20upx;
-$uni-spacing-row-lg: 30upx;
-
-/* 垂直间距 */
-$uni-spacing-col-sm: 8upx;
-$uni-spacing-col-base: 16upx;
-$uni-spacing-col-lg: 24upx;
-
-/* 透明度 */
-$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
-
-/* 文章场景相关 */
-$uni-color-title: #2C405A; // 文章标题颜色
-$uni-font-size-title:40upx;
-$uni-color-subtitle: #555555; // 二级标题颜色
-$uni-font-size-subtitle:36upx;
-$uni-color-paragraph: #3F536E; // 文章段落颜色
-$uni-font-size-paragraph:30upx;
-

+ 2 - 2
mobile-code/src/manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "花卉宝商家后台",
+    "name" : "花卉宝",
     "appid" : "",
     "description" : "应用描述",
     "versionName" : "1.0.0",
@@ -41,7 +41,7 @@
             "port": 81,
             "proxy": {
                 "/api": {
-                    "target": "http://api.b.huaml.com",
+                    "target": "http://api.m.huaml.com",
                     "secure": false,
                     "changeOrigin": true,
                     "pathRewrite": {

+ 59 - 152
mobile-code/src/pages.json

@@ -1,21 +1,27 @@
 {
 	"pages": [
 		{
-			"path": "pages/admin/workbench",
+			"path": "pages/home/index",
 			"style": {
-				"navigationBarTitleText": "工作台"
+				"navigationBarTitleText": "加载中..."
 			}
 		},
 		{
-			"path": "pages/admin/order",
+			"path": "pages/home/category",
 			"style": {
-				"navigationBarTitleText": "订单"
+				"navigationBarTitleText": "分类"
 			}
 		},
 		{
-			"path": "pages/admin/member",
+			"path": "pages/home/shop",
 			"style": {
-				"navigationBarTitleText": "客户"
+				"navigationBarTitleText": "门店"
+			}
+		},
+		{
+			"path": "pages/home/user",
+			"style": {
+				"navigationBarTitleText": "我的"
 			}
 		},
 		{
@@ -34,197 +40,103 @@
 	],
 	"subPackages": [
 		{
-			"root": "pages/order",
+			"root": "pages/user",
 			"pages": [
 				{
-					"path": "admin/detail",
+					"path": "register",
 					"style": {
-						"navigationBarTitleText": "详情"
+						"navigationBarTitleText": "注册"
 					}
 				},
 				{
-					"path": "admin/ship",
+					"path": "password",
 					"style": {
-						"navigationBarTitleText": "发货"
+						"navigationBarTitleText": "修改密码"
 					}
 				}
 			]
 		},
 		{
-			"root": "pages/member",
+			"root": "pages/goods",
 			"pages": [
-				{
-					"path": "add",
-					"style": {
-						"navigationBarTitleText": "添加客户"
-					}
-				},
 				{
 					"path": "detail",
 					"style": {
-						"navigationBarTitleText": "客户详情"
+						"navigationBarTitleText": "详情"
 					}
 				}
 			]
 		},
 		{
-			"root": "pages/interest",
+			"root": "pages/pay",
 			"pages": [
 				{
-					"path": "admin/invite",
-					"style": {
-						"navigationBarTitleText": "邀请列表"
-					}
-				},
-				{
-					"path": "admin/my-invite",
-					"style": {
-						"navigationBarTitleText": "我的邀请"
-					}
-				},
-				{
-					"path": "admin/setting",
+					"path": "index",
 					"style": {
-						"navigationBarTitleText": "奖励设置"
+						"navigationBarTitleText": "支付"
 					}
 				}
 			]
 		},
 		{
-			"root": "pages/coupon",
+			"root": "pages/callback",
 			"pages": [
 				{
-					"path": "admin/list",
-					"style": {
-						"navigationBarTitleText": "优惠券"
-					}
+					"path": "index"
 				}
 			]
 		},
 		{
-			"root": "pages/ad",
+			"root": "pages/coupon",
 			"pages": [
 				{
 					"path": "list",
 					"style": {
-						"navigationBarTitleText": "广告列表"
-					}
-				},
-				{
-					"path": "add",
-					"style": {
-						"navigationBarTitleText": "添加广告"
-					}
-				},
-				{
-					"path": "sel-goods",
-					"style": {
-						"navigationBarTitleText": "商品选择"
+						"navigationBarTitleText": "优惠券",
+						"enablePullDownRefresh": true
 					}
 				}
 			]
 		},
 		{
-			"root": "pages/staff",
+			"root": "pages/order",
 			"pages": [
 				{
 					"path": "list",
 					"style": {
-						"navigationBarTitleText": "员工管理"
+						"navigationBarTitleText": "订单列表",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
-					"path": "add",
+					"path": "detail",
 					"style": {
-						"navigationBarTitleText": "添加员工"
+						"navigationBarTitleText": "订单列表"
 					}
 				},
 				{
-					"path": "sel-member",
+					"path": "buy",
 					"style": {
-						"navigationBarTitleText": "客户列表"
+						"navigationBarTitleText": "订单确认"
 					}
 				}
 			]
 		},
 		{
-			"root": "pages/setting",
+			"root": "pages/interest",
 			"pages": [
 				{
-					"path": "list",
-					"style": {
-						"navigationBarTitleText": "设置"
-					}
-				},
-				{
-					"path": "wx-menu",
-					"style": {
-						"navigationBarTitleText": "微信菜单设置"
-					}
-				},
-				{
-					"path": "coupon",
+					"path": "invite",
 					"style": {
-						"navigationBarTitleText": "新人领券设置"
+						"navigationBarTitleText": "邀请排行",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
 					"path": "level",
 					"style": {
-						"navigationBarTitleText": "会员等级设置"
-					}
-				},
-				{
-					"path": "password",
-					"style": {
-						"navigationBarTitleText": "密码设置"
-					}
-				}
-			]
-		},
-		{
-			"root": "pages/goodsManage",
-			"pages": [
-				{
-					"path": "list",
-					"style": {
-						"navigationBarTitleText": "商品管理"
-					}
-				},
-				{
-					"path": "category",
-					"style": {
-						"navigationBarTitleText": "分类管理"
-					}
-				},
-				{
-					"path": "add",
-					"style": {
-						"navigationBarTitleText": "添加商品"
-					}
-				},
-				{
-					"path": "img-store",
-					"style": {
-						"navigationBarTitleText": "图库管理"
-					}
-				},
-				{
-					"path": "goods-name",
-					"style": {
-						"navigationBarTitleText": "填写商品信息"
-					}
-				},
-				{
-					"path": "freight",
-					"style": {
-						"navigationBarTitleText": "运费设置"
-					}
-				},
-				{
-					"path": "price-increase",
-					"style": {
-						"navigationBarTitleText": "节假日自动涨价"
+						"navigationBarTitleText": "会员等级",
+						"enablePullDownRefresh": true
 					}
 				}
 			]
@@ -240,17 +152,6 @@
 					}
 				}
 			]
-		},
-		{
-			"root": "pages/template",
-			"pages": [
-				{
-					"path": "index",
-					"style": {
-						"navigationBarTitleText": "选择模板"
-					}
-				}
-			]
 		}
 	],
 	"globalStyle": {
@@ -263,26 +164,32 @@
 	},
 	"tabBar": {
 		"color": "#C0C4CC",
-		"selectedColor": "#3385FF",
+		"selectedColor": "#fa436a",
 		"borderStyle": "black",
 		"backgroundColor": "#ffffff",
 		"list": [{
-				"pagePath": "pages/admin/workbench",
-				"iconPath": "static/images/admin/workbench-no.png",
-				"selectedIconPath": "static/images/admin/workbench-is.png",
-				"text": "工作台"
+				"pagePath": "pages/home/index",
+				"iconPath": "static/images/common/home-no.png",
+				"selectedIconPath": "static/images/common/home-is.png",
+				"text": "首页"
+			},
+			{
+				"pagePath": "pages/home/category",
+				"iconPath": "static/images/common/category-no.png",
+				"selectedIconPath": "static/images/common/category-is.png",
+				"text": "分类"
 			},
 			{
-				"pagePath": "pages/admin/order",
-				"iconPath": "static/images/admin/order-no.png",
-				"selectedIconPath": "static/images/admin/order-is.png",
-				"text": "订单"
+				"pagePath": "pages/home/shop",
+				"iconPath": "static/images/common/shop-no.png",
+				"selectedIconPath": "static/images/common/shop-is.png",
+				"text": "门店"
 			},
 			{
-				"pagePath": "pages/admin/member",
-				"iconPath": "static/images/admin/member-no.png",
-				"selectedIconPath": "static/images/admin/member-is.png",
-				"text": "客户"
+				"pagePath": "pages/home/user",
+				"iconPath": "static/images/common/user-no.png",
+				"selectedIconPath": "static/images/common/user-is.png",
+				"text": "我的"
 			}
 		]
 	}

+ 5 - 2
mobile-code/src/pages/coupon/list.vue

@@ -28,7 +28,7 @@
 							<div class="coupon-message">
 								<div class="app-color-2">优惠券</div>
 								<div>适用:全品类</div>
-								<div>有效至:{{ item.deadline | formatTime }}</div>
+								<div>有效至:{{ item.deadline | formatTime('YYYY-MM-DD') }}</div>
 							</div>
 							<!-- 未使用 -->
 							<template v-if="tabIndex == 0">
@@ -66,8 +66,10 @@ import { getList } from '@/api/coupon'
 export default {
 	name: 'tabs',
 	components: {
-		AppTabs
+		AppTabs,
+		AppWrapperEmpty
 	},
+	mixins: [list],
 	data() {
 		return {
 			tabIndex: 0,
@@ -108,6 +110,7 @@ export default {
 		},
 		_list() {
 			return getList({ status: this.tabIndex }).then(res => {
+				console.log(res)
 				this.completes(res)
 			})
 		},

+ 2 - 1
mobile-code/src/pages/goodsManage/list.vue

@@ -39,7 +39,7 @@
 		<!-- 底部 -->
 		<div class="app-footer">
 			<div class="btn-list other-btn" @click.stop="changeOperateShowFn">
-				<i class="iconfont iconxiala"></i>
+				<i class="iconfont iconxiala" :class="[operateBottomShow ? 'animate-open' : 'animate-close']"></i>
 				<span>其他设置</span>
 			</div>
 			<div class="btn-list">
@@ -254,6 +254,7 @@ export default {
 	.app-content {
 		min-height: calc(100vh - 80px);
 		padding-top: 80px;
+		background-color: #fff;
 		// padding-bottom: 100px;
 	}
 

+ 11 - 4
mobile-code/src/pages/home/category.vue

@@ -11,7 +11,7 @@
 				<div class="page-view" v-if="!$util.isEmpty(list.data)">
 					<div class="goods-list" v-for="(item, index) in list.data" :key="index" @click="$util.pageTo(`/pages/goods/detail?id=${item.id}`)">
 						<div class="img-blo">
-							<img :src="item.imgList[0].middle" alt mode="center" />
+							<img :src="item.imgList[0].middle" alt="商品图" mode="center" />
 						</div>
 						<div class="goods-det">
 							<div class="goods-det-top">
@@ -64,12 +64,15 @@ export default {
 	},
 	methods: {
 		async init() {
-			this._getClass()
-			this._list()
+			this._getClass().then(res => {
+				this._list()
+			})
 		},
 		// 分类
 		_getClass() {
-			getClass().then(res => {
+			return getClass().then(res => {
+				if (this.$util.isEmpty(res.data)) return false
+				this.form.categoryId = res.data[0].id
 				this.tabbar = res.data
 			})
 		},
@@ -109,6 +112,10 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+	.app-content {
+		background-color: #fff;
+	}
+
 	page {
 		background: #fff;
 	}

+ 51 - 12
mobile-code/src/pages/home/shop.vue

@@ -1,31 +1,31 @@
 <template>
 	<div class="app-main app-content">
-		<app-swiper />
+		<app-swiper :list="ad" @detail="adDetailFn" />
 		<div class="shop-wrap">
-			<div class="shop-tit">国兰华尚</div>
-			<div>花之都定期培育新物种,专门为婚庆公司提供花束,期待你的订单 为您私人定制,这个是公告!</div>
+			<div class="shop-tit">{{ shop.merchantName }}</div>
+			<div>{{ shop.introduction }}</div>
 		</div>
 		<div class="list-content">
 			<tui-list-view title class="tui-list-view">
-				<tui-list-cell @click="detail" :lineLeft="false" :lineRight="false" class="tui-list">
+				<tui-list-cell :lineLeft="false" :lineRight="false" class="tui-list">
 					<div class="list-wrap">
 						<div class="list-label">营业时间</div>
-						<div class="list-val">周一至周日(18:00-21:00)</div>
+						<div class="list-val">{{ shop.openTime }}</div>
 					</div>
 				</tui-list-cell>
-				<tui-list-cell @click="detail" :lineLeft="false" :lineRight="false" class="tui-list">
+				<tui-list-cell @click="phoneCall" :lineLeft="false" :lineRight="false" class="tui-list">
 					<div class="list-wrap">
 						<div class="list-label">联系电话</div>
-						<div class="list-val">15392387653</div>
+						<div class="list-val">{{ shop.telephone }}</div>
 					</div>
 					<div class="list-icon">
 						<i class="iconfont iconditu"></i>
 					</div>
 				</tui-list-cell>
-				<tui-list-cell @click="detail" :lineLeft="false" :lineRight="false" class="tui-list">
+				<tui-list-cell @click="goNavBtn" :lineLeft="false" :lineRight="false" class="tui-list">
 					<div class="list-wrap">
 						<div class="list-label">门店地址</div>
-						<div class="list-val">福建省厦门市湖里区蔡塘广场 -1220号</div>
+						<div class="list-val">{{ shop.shopFullAddress }}</div>
 					</div>
 					<div class="list-icon">
 						<i class="iconfont icondianhua"></i>
@@ -44,6 +44,8 @@ import TuiListView from '@/components/plugin/list-view'
 import TuiListCell from '@/components/plugin/list-cell'
 import AppSwiper from '@/components/app-swiper'
 import AppActivilyCoupon from '@/components/module/app-activily-coupon'
+// api
+import { getShop } from '@/api/common'
 export default {
 	name: 'category',
 	components: {
@@ -54,11 +56,48 @@ export default {
 		AppActivilyCoupon
 	},
 	data() {
-		return {}
+		return {
+			data: {},
+			ad: [],
+			shop: {}
+		}
+	},
+	onLoad(option) {
+		this.init()
 	},
-	onLoad(option) {},
 	methods: {
-		detail() {}
+		init() {
+			this._detail()
+		},
+		_detail() {
+			let form = {}
+			if (this.option.id) {
+				this.form.introUserId = this.option.id
+			}
+			getShop(form).then(res => {
+				this.data = res.data
+				if (this.$util.isEmpty(res.data)) return false
+				this.ad = res.data.ad
+				this.shop = res.data.shop
+			})
+		},
+		// operate
+		adDetailFn(item) {
+			location.href = item.url
+		},
+		phoneCall() {
+			uni.makePhoneCall({
+				phoneNumber: this.shop.telephone
+			})
+		},
+		goNavBtn() {
+			uni.openLocation({
+				latitude: parseFloat(this.shop.shopLat),
+				longitude: parseFloat(this.shop.shopLong),
+				name: this.shop.shopCity || '',
+				address: this.shop.shopFullAddress || ''
+			})
+		}
 	}
 }
 </script>

+ 6 - 0
mobile-code/src/pages/interest/level.vue

@@ -106,6 +106,12 @@ export default {
 					@include disFlex(center, center);
 					height: 70px;
 				}
+				.level-img {
+					/deep/.vip-text {
+						left: 42px;
+						transform: scale(0.8);
+					}
+				}
 			}
 			.level-list-tit {
 				color: #fff;

+ 87 - 33
mobile-code/src/pages/user/password.vue

@@ -1,35 +1,89 @@
 <template>
 	<div class="app-content">
-		<div class="module-com">
-			<tui-list-cell class="line-cell" :hover="false">
-				<div class="tui-title">旧密码</div>
-				<input placeholder-class="phcolor" class="tui-input" name="name" placeholder="首次设置不需要填写" maxlength="50" type="number" />
-			</tui-list-cell>
-			<tui-list-cell class="line-cell" :hover="false">
-				<div class="tui-title">密码</div>
-				<input placeholder-class="phcolor" class="tui-input" name="phone" placeholder="请输入密码" maxlength="50" type="number" />
-			</tui-list-cell>
-			<tui-list-cell class="line-cell" :hover="false">
-				<div class="tui-title">确认密码</div>
-				<input placeholder-class="phcolor" class="tui-input" name="phone" placeholder="请输入确认密码" maxlength="50" type="number" />
-			</tui-list-cell>
-            <div class="prompt-text">提示:余额支付时需要用到支付密码</div>
-            <div class="btn-wrap">
-			    <button class="button-com red big">确认</button>
-            </div>
-		</div>
+		<form @submit="formSubmit">
+			<div class="module-com">
+				<tui-list-cell class="line-cell" :hover="false">
+					<div class="tui-title">旧密码</div>
+					<input v-model="form.old" placeholder-class="phcolor" class="tui-input" name="old" placeholder="首次设置不需要填写" maxlength="50" type="password" />
+				</tui-list-cell>
+				<tui-list-cell class="line-cell" :hover="false">
+					<div class="tui-title">密码</div>
+					<input v-model="form.new" placeholder-class="phcolor" class="tui-input" name="new" placeholder="请输入密码" maxlength="50" type="password" />
+				</tui-list-cell>
+				<tui-list-cell class="line-cell" :hover="false">
+					<div class="tui-title">确认密码</div>
+					<input v-model="form.confirm" placeholder-class="phcolor" class="tui-input" name="confirm" placeholder="请输入确认密码" maxlength="50" type="password" />
+				</tui-list-cell>
+				<div class="prompt-text">提示:余额支付时需要用到支付密码</div>
+				<div class="btn-wrap">
+					<button class="button-com red big" formType="submit">确认</button>
+				</div>
+			</div>
+		</form>
 	</div>
 </template>
 
 <script>
 import TuiListCell from '@/components/plugin/list-cell'
+const form = require('@/utils/formValidation.js')
+// api
+import { modifyPassword } from '@/api/member'
 export default {
 	name: 'password',
 	components: {
 		TuiListCell
 	},
 	data() {
-		return {}
+		return {
+			form: {
+				old: '',
+				new: '',
+				confirm: ''
+			}
+		}
+	},
+	methods: {
+		// 确认
+		confirmFn() {
+			modifyPassword(this.form).then(res => {
+				this.$msg('修改成功!')
+				setTimeout(() => {
+					uni.switchTab({
+						url: '/pages/home/user'
+					})
+				}, 1000)
+			})
+		},
+		// 表单验证
+		formSubmit(e) {
+			// 表单规则
+			let rules = [
+				{
+					name: 'old',
+					rule: ['required'],
+					msg: ['请输入旧密码']
+				},
+				{
+					name: 'new',
+					rule: ['required'],
+					msg: ['请输入新密码']
+				},
+				{
+					name: 'confirm',
+					rule: ['required'],
+					msg: ['请输入确认密码']
+				}
+			]
+			// 进行表单检查
+			let formData = e.detail.value
+			let checkRes = form.validation(formData, rules)
+			// 验证通过!
+			if (!checkRes) {
+				this.confirmFn()
+			} else {
+				this.$msg(checkRes)
+			}
+		}
 	}
 }
 </script>
@@ -51,18 +105,18 @@ export default {
 		.phcolor {
 			color: #ccc;
 		}
-    }
-    .prompt-text {
-        color: $fontColor3;
-        margin-top: 20px;
-        margin-left: 30px;
-    }
-    .btn-wrap {
-        width: 90%;
-        margin: 60px auto;
-        .button-com {
-            width: 100%;
-            margin: 0 auto;
-        }
-    }
+	}
+	.prompt-text {
+		color: $fontColor3;
+		margin-top: 20px;
+		margin-left: 30px;
+	}
+	.btn-wrap {
+		width: 90%;
+		margin: 60px auto;
+		.button-com {
+			width: 100%;
+			margin: 0 auto;
+		}
+	}
 </style>

+ 8 - 0
mobile-code/src/static/css/common.scss

@@ -438,3 +438,11 @@ li {
     text-overflow: ellipsis;
     white-space: nowrap;
 }
+
+.animate-open {
+    transform: rotate(180);
+}
+
+.animate-close {
+    transform: rotate(0);
+}

+ 1 - 1
mobile-code/src/uni.scss

@@ -12,7 +12,7 @@ $imgUrl: 'https://wximg.meijiabang.com/hkds/miniapp/images/';
 
 // 所有样式为公共样式,已在全局引用可直接使用
 // 主色
-$mainColor: #3385FF;
+$mainColor: #FF2842;
 $mainColor1: #049E2C;
 $auxiliaryColor2: #ff6900;