lalala 6 years ago
parent
commit
38b259febb

+ 7 - 0
mobile-code/src/api/coupon/index.js

@@ -43,3 +43,10 @@ export const couponAssetDet = data => {
 export const couponAssetUpdate = data => {
 	return https.post('/coupon-asset/update', data)
 }
+
+/** *
+ * 门店领取优惠券 m
+ */
+export const receiveGift = data => {
+	return https.post('invite/get-new-gift', data)
+}

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

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

+ 2 - 2
mobile-code/src/m-manifest.json → mobile-code/src/b-manifest.json

@@ -90,7 +90,7 @@
         "usingComponents" : true,
         "permission" : {
             "scope.userLocation" : {
-                "desc" : "获取位置信息后为您提供个性化推荐"
+                "desc" : "请点击确定"
             }
         }
     },
@@ -121,7 +121,7 @@
             "port": 81,
             "proxy": {
                 "/api": {
-                    "target": "http://api.m.huaml.com",
+                    "target": "http://api.b.huaml.com",
                     "secure": false,
                     "changeOrigin": true,
                     "pathRewrite": {

+ 318 - 0
mobile-code/src/b-pages.json

@@ -0,0 +1,318 @@
+{
+	"pages": [
+		{
+			"path": "admin/home/workbench",
+			"style": {
+				"navigationBarTitleText": "工作台"
+			}
+		},
+		{
+			"path": "admin/home/order",
+			"style": {
+				"navigationBarTitleText": "订单"
+			}
+		},
+		{
+			"path": "admin/home/member",
+			"style": {
+				"navigationBarTitleText": "客户"
+			}
+		},
+		{
+			"path": "common/redirect",
+			"style": {
+				"navigationBarTitleText": "加载中..."
+			}
+		},
+		{
+			"path": "common/webview",
+			"style": {
+				"navigationBarBackgroundColor": "#ffffff",
+				"navigationBarTextStyle": "black"
+			}
+		}
+	],
+	"subPackages": [
+		{
+			"root": "admin/order",
+			"pages": [
+				{
+					"path": "detail",
+					"style": {
+						"navigationBarTitleText": "详情"
+					}
+				},
+				{
+					"path": "ship",
+					"style": {
+						"navigationBarTitleText": "发货"
+					}
+				},
+				{
+					"path": "fill-form",
+					"style": {
+						"navigationBarTitleText": "填写收花人"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/member",
+			"pages": [
+				{
+					"path": "add",
+					"style": {
+						"navigationBarTitleText": "添加客户"
+					}
+				},
+				{
+					"path": "detail",
+					"style": {
+						"navigationBarTitleText": "客户详情"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/interest",
+			"pages": [
+				{
+					"path": "invite",
+					"style": {
+						"navigationBarTitleText": "邀请列表"
+					}
+				},
+				{
+					"path": "my-invite",
+					"style": {
+						"navigationBarTitleText": "我的邀请"
+					}
+				},
+				{
+					"path": "setting",
+					"style": {
+						"navigationBarTitleText": "奖励设置"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/coupon",
+			"pages": [
+				{
+					"path": "list",
+					"style": {
+						"navigationBarTitleText": "优惠券"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/ad",
+			"pages": [
+				{
+					"path": "list",
+					"style": {
+						"navigationBarTitleText": "广告列表"
+					}
+				},
+				{
+					"path": "add",
+					"style": {
+						"navigationBarTitleText": "添加广告"
+					}
+				},
+				{
+					"path": "sel-goods",
+					"style": {
+						"navigationBarTitleText": "商品选择"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/staff",
+			"pages": [
+				{
+					"path": "list",
+					"style": {
+						"navigationBarTitleText": "员工管理"
+					}
+				},
+				{
+					"path": "add",
+					"style": {
+						"navigationBarTitleText": ""
+					}
+				},
+				{
+					"path": "sel-member",
+					"style": {
+						"navigationBarTitleText": "客户列表"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/setting",
+			"pages": [
+				{
+					"path": "list",
+					"style": {
+						"navigationBarTitleText": "设置"
+					}
+				},
+				{
+					"path": "wx-menu",
+					"style": {
+						"navigationBarTitleText": "微信菜单设置"
+					}
+				},
+				{
+					"path": "coupon",
+					"style": {
+						"navigationBarTitleText": "新人领券设置"
+					}
+				},
+				{
+					"path": "level",
+					"style": {
+						"navigationBarTitleText": "会员等级设置"
+					}
+				},
+				{
+					"path": "password",
+					"style": {
+						"navigationBarTitleText": "密码设置"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/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": "节假日自动涨价"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/statistics",
+			"pages": [
+				{
+					"path": "index",
+					"style": {
+						"navigationBarTitleText": "数据统计"
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/assets",
+			"pages": [
+				{
+					"path": "list",
+					"style": {
+						"navigationBarTitleText": "收入明细"
+					}
+				}
+			]
+		},
+		{
+			"root": "pages/chat",
+			"pages": [
+				{
+					"path": "index",
+					"style": {
+						"navigationBarTitleText": "客服",
+						"enablePullDownRefresh": true
+					}
+				}
+			]
+		},
+		{
+			"root": "admin/template",
+			"pages": [
+				{
+					"path": "index",
+					"style": {
+						"navigationBarTitleText": "选择模板"
+					}
+				}
+			]
+		}
+	],
+	"globalStyle": {
+		// #ifdef H5
+		"navigationStyle": "custom",
+		// #endif
+		"navigationBarBackgroundColor": "#fff",
+		"navigationBarTitleText": "花卉宝",
+		"navigationBarTextStyle": "black"
+	},
+	"tabBar": {
+		"color": "#C0C4CC",
+		"selectedColor": "#3385FF",
+		"borderStyle": "black",
+		"backgroundColor": "#ffffff",
+		"list": [{
+				"pagePath": "admin/home/workbench",
+				"iconPath": "static/images/admin/workbench-no.png",
+				"selectedIconPath": "static/images/admin/workbench-is.png",
+				"text": "工作台"
+			},
+			{
+				"pagePath": "admin/home/order",
+				"iconPath": "static/images/admin/order-no.png",
+				"selectedIconPath": "static/images/admin/order-is.png",
+				"text": "订单"
+			},
+			{
+				"pagePath": "admin/home/member",
+				"iconPath": "static/images/admin/member-no.png",
+				"selectedIconPath": "static/images/admin/member-is.png",
+				"text": "客户"
+			}
+		]
+	}
+}
+

+ 1 - 1
mobile-code/src/m-uni.scss → mobile-code/src/b-uni.scss

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

+ 20 - 5
mobile-code/src/components/module/app-activily-coupon.vue

@@ -13,15 +13,15 @@
 					<div class="list-det-left">
 						<div class="price-wrap">
 							<span>¥</span>
-							<span class="price">1000</span>
+							<span class="price">{{ info.amount }}</span>
 						</div>
-						<div class="full-reduc">满100可使用</div>
+						<div class="full-reduc">满{{ info.miniCost }}可使用</div>
 					</div>
 					<div class="list-det-right">
 						<div class="coupon-message">
 							<div class="app-color-0">优惠券</div>
-							<div>适用:全品类</div>
-							<div>有效至:2020-10-11</div>
+							<div>适用:{{ info.prize }}</div>
+							<div>有效至:{{ info.validTime }}</div>
 						</div>
 					</div>
 				</div>
@@ -32,6 +32,8 @@
 
 <script>
 import ModalModule from '@/components/plugin/modal'
+// api
+import { receiveGift } from '@/api/coupon'
 export default {
 	name: 'app-activily-coupon',
 	components: {
@@ -41,6 +43,14 @@ export default {
 		show: {
 			type: Boolean,
 			default: false
+		},
+		info: {
+			type: Object,
+			default: () => {}
+		},
+		introUserId: {
+			type: String,
+			default: ''
 		}
 	},
 	data() {
@@ -51,9 +61,14 @@ export default {
 	methods: {
 		receive() {
 			console.log('领取!')
+			let id = this.introUserId || ''
+			receiveGift({introUserId: id}).then(res => {
+				this.$msg('领取成功!')
+				this.modalCancel()
+			})
 		},
 		modalCancel() {
-			this.show = false
+			this.$emit('update:show', false)
 		}
 	}
 }

+ 2 - 2
mobile-code/src/components/plugin/modal.vue

@@ -135,7 +135,7 @@ export default {
 		top: 50%;
 		margin: auto;
 		background: #fff;
-		z-index: 9998;
+		z-index: 1008;
 		transition: all 0.3s ease-in-out;
 		opacity: 0;
 		box-sizing: border-box;
@@ -162,7 +162,7 @@ export default {
 		right: 0;
 		bottom: 0;
 		background: rgba(0, 0, 0, 0.6);
-		z-index: 9996;
+		z-index: 1006;
 		transition: all 0.3s ease-in-out;
 		opacity: 0;
 		visibility: hidden;

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

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

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

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

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

@@ -1,203 +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": "common/redirect",
-			"style": {
-				"navigationBarTitleText": "加载中..."
-			}
-		},
-		{
-			"path": "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": "订单确认"
-					}
-				},
-				{
-					"path": "comment",
-					"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": "我的"
-			}
-		]
-	}
-}
-

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

@@ -90,7 +90,7 @@
         "usingComponents" : true,
         "permission" : {
             "scope.userLocation" : {
-                "desc" : "请点击确定"
+                "desc" : "获取位置信息后为您提供个性化推荐"
             }
         }
     },
@@ -121,7 +121,7 @@
             "port": 81,
             "proxy": {
                 "/api": {
-                    "target": "http://api.b.huaml.com",
+                    "target": "http://api.m.huaml.com",
                     "secure": false,
                     "changeOrigin": true,
                     "pathRewrite": {

+ 62 - 177
mobile-code/src/pages.json

@@ -1,21 +1,27 @@
 {
 	"pages": [
 		{
-			"path": "admin/home/workbench",
+			"path": "pages/home/index",
 			"style": {
-				"navigationBarTitleText": "工作台"
+				"navigationBarTitleText": "加载中..."
+			}
+		},
+		{
+			"path": "pages/home/category",
+			"style": {
+				"navigationBarTitleText": "分类"
 			}
 		},
 		{
-			"path": "admin/home/order",
+			"path": "pages/home/shop",
 			"style": {
-				"navigationBarTitleText": "订单"
+				"navigationBarTitleText": "门店"
 			}
 		},
 		{
-			"path": "admin/home/member",
+			"path": "pages/home/user",
 			"style": {
-				"navigationBarTitleText": "客户"
+				"navigationBarTitleText": "我的"
 			}
 		},
 		{
@@ -34,225 +40,109 @@
 	],
 	"subPackages": [
 		{
-			"root": "admin/order",
+			"root": "pages/user",
 			"pages": [
 				{
-					"path": "detail",
+					"path": "register",
 					"style": {
-						"navigationBarTitleText": "详情"
+						"navigationBarTitleText": "注册"
 					}
 				},
 				{
-					"path": "ship",
-					"style": {
-						"navigationBarTitleText": "发货"
-					}
-				},
-				{
-					"path": "fill-form",
+					"path": "password",
 					"style": {
-						"navigationBarTitleText": "填写收花人"
+						"navigationBarTitleText": "修改密码"
 					}
 				}
 			]
 		},
 		{
-			"root": "admin/member",
+			"root": "pages/goods",
 			"pages": [
-				{
-					"path": "add",
-					"style": {
-						"navigationBarTitleText": "添加客户"
-					}
-				},
 				{
 					"path": "detail",
 					"style": {
-						"navigationBarTitleText": "客户详情"
-					}
-				}
-			]
-		},
-		{
-			"root": "admin/interest",
-			"pages": [
-				{
-					"path": "invite",
-					"style": {
-						"navigationBarTitleText": "邀请列表"
-					}
-				},
-				{
-					"path": "my-invite",
-					"style": {
-						"navigationBarTitleText": "我的邀请"
-					}
-				},
-				{
-					"path": "setting",
-					"style": {
-						"navigationBarTitleText": "奖励设置"
+						"navigationBarTitleText": "详情"
 					}
 				}
 			]
 		},
 		{
-			"root": "admin/coupon",
+			"root": "pages/pay",
 			"pages": [
 				{
-					"path": "list",
+					"path": "index",
 					"style": {
-						"navigationBarTitleText": "优惠券"
+						"navigationBarTitleText": ""
 					}
 				}
 			]
 		},
 		{
-			"root": "admin/ad",
+			"root": "pages/callback",
 			"pages": [
 				{
-					"path": "list",
-					"style": {
-						"navigationBarTitleText": "广告列表"
-					}
-				},
-				{
-					"path": "add",
-					"style": {
-						"navigationBarTitleText": "添加广告"
-					}
-				},
-				{
-					"path": "sel-goods",
-					"style": {
-						"navigationBarTitleText": "商品选择"
-					}
+					"path": "index"
 				}
 			]
 		},
 		{
-			"root": "admin/staff",
+			"root": "pages/coupon",
 			"pages": [
 				{
 					"path": "list",
 					"style": {
-						"navigationBarTitleText": "员工管理"
-					}
-				},
-				{
-					"path": "add",
-					"style": {
-						"navigationBarTitleText": ""
-					}
-				},
-				{
-					"path": "sel-member",
-					"style": {
-						"navigationBarTitleText": "客户列表"
+						"navigationBarTitleText": "优惠券",
+						"enablePullDownRefresh": true
 					}
 				}
 			]
 		},
 		{
-			"root": "admin/setting",
+			"root": "pages/order",
 			"pages": [
 				{
 					"path": "list",
 					"style": {
-						"navigationBarTitleText": "设置"
-					}
-				},
-				{
-					"path": "wx-menu",
-					"style": {
-						"navigationBarTitleText": "微信菜单设置"
+						"navigationBarTitleText": "订单列表",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
-					"path": "coupon",
+					"path": "detail",
 					"style": {
-						"navigationBarTitleText": "新人领券设置"
+						"navigationBarTitleText": "订单列表"
 					}
 				},
 				{
-					"path": "level",
+					"path": "buy",
 					"style": {
-						"navigationBarTitleText": "会员等级设置"
+						"navigationBarTitleText": "订单确认"
 					}
 				},
 				{
-					"path": "password",
+					"path": "comment",
 					"style": {
-						"navigationBarTitleText": "密码设置"
+						"navigationBarTitleText": "评价"
 					}
 				}
 			]
 		},
 		{
-			"root": "admin/goodsManage",
+			"root": "pages/interest",
 			"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",
+					"path": "invite",
 					"style": {
-						"navigationBarTitleText": "运费设置"
+						"navigationBarTitleText": "邀请排行",
+						"enablePullDownRefresh": true
 					}
 				},
 				{
-					"path": "price-increase",
-					"style": {
-						"navigationBarTitleText": "节假日自动涨价"
-					}
-				}
-			]
-		},
-		{
-			"root": "admin/statistics",
-			"pages": [
-				{
-					"path": "index",
-					"style": {
-						"navigationBarTitleText": "数据统计"
-					}
-				}
-			]
-		},
-		{
-			"root": "admin/assets",
-			"pages": [
-				{
-					"path": "list",
+					"path": "level",
 					"style": {
-						"navigationBarTitleText": "收入明细"
+						"navigationBarTitleText": "会员等级",
+						"enablePullDownRefresh": true
 					}
 				}
 			]
@@ -268,17 +158,6 @@
 					}
 				}
 			]
-		},
-		{
-			"root": "admin/template",
-			"pages": [
-				{
-					"path": "index",
-					"style": {
-						"navigationBarTitleText": "选择模板"
-					}
-				}
-			]
 		}
 	],
 	"globalStyle": {
@@ -291,26 +170,32 @@
 	},
 	"tabBar": {
 		"color": "#C0C4CC",
-		"selectedColor": "#3385FF",
+		"selectedColor": "#fa436a",
 		"borderStyle": "black",
 		"backgroundColor": "#ffffff",
 		"list": [{
-				"pagePath": "admin/home/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": "admin/home/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": "admin/home/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": "我的"
 			}
 		]
 	}

+ 9 - 2
mobile-code/src/pages/home/shop.vue

@@ -34,7 +34,7 @@
 			</tui-list-view>
 		</div>
 		<!-- <app-footer :activeIndex="2" /> -->
-		<app-activily-coupon :show="false" />
+		<app-activily-coupon :show.sync="activeCoupon" :info="newUserGift" :introUserId="option.introUserId" />
 	</div>
 </template>
 
@@ -59,7 +59,10 @@ export default {
 		return {
 			data: {},
 			ad: [],
-			shop: {}
+			shop: {},
+			// 新人领券
+			newUserGift: {},
+			activeCoupon: false
 		}
 	},
 	onLoad(option) {
@@ -82,6 +85,10 @@ export default {
 					return e
 				})
 				this.shop = res.data.shop
+				if (!this.$util.isEmpty(res.data.newUserGift)) {
+					this.newUserGift = res.data.newUserGift
+					this.activeCoupon = true
+				}
 			})
 		},
 		// operate

+ 21 - 0
mobile-code/src/pages/interest/invite.vue

@@ -99,10 +99,13 @@
 </template>
 
 <script>
+	import { mapGetters } from 'vuex'
 	import AppWrapperEmpty from '@/components/app-wrapper-empty'
 	import AlertModule from '@/components/plugin/alert'
 	import AppShareMask from '@/components/module/app-share-mask'
+	import { share } from '@/mixins'
 	// api
+	import { getShopUser } from '@/utils/auth'
 	import { getList, getProfile } from '@/api/invite'
 	export default {
 		name: 'invite',
@@ -111,6 +114,7 @@
 			AppShareMask,
 			AppWrapperEmpty
 		},
+		mixins: [share],
 		data() {
 			return {
 				data: {
@@ -123,6 +127,9 @@
 				showShare: false
 			}
 		},
+		computed: {
+			...mapGetters({ shopUser: 'getShopUser' })
+		},
 		onLoad() {
 			// this.init()
 		},
@@ -130,6 +137,20 @@
 			init() {
 				this._getProfile()
 				this._getList()
+
+				getShopUser().then(res => {
+					console.log('this.data', res)
+
+					// 设置分享
+					let shareParams = {
+						title: `${res.merchantName}`, // 分享标题
+						desc: '这家店不错推荐给你', // 分享内容
+						imgUrl: res.smallAvatarUrl,
+						pagePath: `${window.location.protocol}//m.${this.$constant.firstHost}.com/#/pages/home/shop?introUserId=${res.id}`
+					}
+					this.jweixinFn(shareParams)
+
+				})
 			},
 			_getProfile() {
 				getProfile().then(res => {

+ 1 - 0
mobile-code/src/plugins/luch-request_0.0.7/request.js

@@ -164,6 +164,7 @@ class Request {
 								// })
 							}, 1000)
 						} else {
+							console.log('response.data', response.data)
 							if (!config.hideError) {
 								// this.$msg(response.data.msg)
 								uni.showToast({

+ 5 - 0
mobile-code/src/static/css/reset.scss

@@ -23,6 +23,11 @@ body {
     height: 96px !important;
 }
 
+// 修改uni-toast样式
+uni-toast {
+    z-index: 99999 !important;
+}
+
 .uni-status-bar {
     height: auto !important;
 }

+ 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;