lalala 6 лет назад
Родитель
Сommit
fca7979dad

+ 1 - 1
mobile-code/src/admin/goodsManage/category.vue

@@ -19,7 +19,7 @@
 							</div>
 							<div class="operate-icon-wrap" @click="operateFn(item, index)">
 								<div class="operate-icon">
-									<i class="iconfont" :class="[ index == operateIndex ? 'iconcaozuojihuo' : 	'iconcaozuo']"></i>
+									<i class="iconfont" :class="[ index == operateIndex ? 'iconcaozuojihuo' : 'iconcaozuo']"></i>
 								</div>
 							</div>
 						</div>

+ 273 - 197
mobile-code/src/admin/goodsManage/list.vue

@@ -13,16 +13,31 @@
 					<!--内容部分 start -->
 					<block v-if="!$util.isEmpty(list.data)">
 						<div class="page-view">
-							<div class="goods-list" v-for="(item, index) in list.data" :key="index" @click="pageTo(`/pages/goods/detail?id=${item.id}`)">
-								<div class="img-blo">
-									<img :src="item.imgList[0].middle" alt="商品图" mode="center" />
-								</div>
-								<div class="goods-det">
-									<div class="goods-det-top">
-										<div class="goods-name">{{ item.goodsName }}</div>
-										<div class="goods-sales">已售{{ item.sold }}</div>
+							<div class="goods-list" v-for="(item, index) in list.data" :key="index">
+								<div class="goods-list-top">
+									<div class="img-blo">
+										<img :src="item.imgList[0].middle" alt="商品图" mode="center" />
+									</div>
+									<div class="goods-det">
+										<div class="goods-det-top">
+											<div class="goods-name">{{ item.goodsName }}</div>
+											<!-- <div class="goods-sales">已售{{ item.sold }}</div> -->
+											<!-- <div class="goods-sales">{{ item.categoryName }}</div> -->
+										</div>
+										<div class="operate-wrap">
+											<div class="goods-price">¥{{ item.price }}</div>
+											<div class="operate-icon-wrap" @click="operateFn(item, index)">
+												<div class="operate-icon">
+													<i class="iconfont" :class="[ index == operateIndex ? 'iconcaozuojihuo' : 	'iconcaozuo']"></i>
+												</div>
+											</div>
+										</div>
 									</div>
-									<div class="goods-price">¥{{ item.price }}</div>
+								</div>
+								<div class="goods-list-bottom flex-center-between">
+									<div>已售: {{ item.sold }}</div>
+									<div>销量: {{ item.stock }}</div>
+									<div>浏览: {{ item.viewNum }}</div>
 								</div>
 							</div>
 						</div>
@@ -51,205 +66,251 @@
 		</div>
 		<!-- 操作弹窗 -->
 		<operate-line-module v-if="operateBottomShow" :btnData="btnBottomData" :bottom="120" :right="528" />
+		<!-- 删除提示 -->
+		<modal-module :show="delModal" :maskClosable="false" @cancel="modalCancel" @click="delModalClick" content="确定删除该商品吗?" color="#333" :size="32" padding="30rpx 30rpx"></modal-module>
 	</div>
 </template>
 
 <script>
-import AppTabs from '@/components/plugin/tabs'
-import OperateModule from '@/admin/home/components/module/operate'
-import OperateLineModule from '@/admin/home/components/module/operate-line'
-import AppWrapperEmpty from '@/components/app-wrapper-empty'
-// api
-import { categoryListB, getCategoryGoodsB } from '@/api/goods'
-import { list } from '@/mixins'
-export default {
-	name: 'goods-manage-list',
-	components: {
-		AppTabs,
-		OperateLineModule,
-		OperateModule,
-		AppWrapperEmpty
-	},
-	mixins: [list],
-	data() {
-		return {
-			// tabs
-			tabIndex: 0,
-			tabs: [
-				{
-					name: '出售中'
-				},
-				{
-					name: '已下架'
-				}
-			],
-			// 中间
-			tabbar: [],
-			height: 0, // scroll-view高度
-			currentTab: 0, // 预设当前项的值
-			scrollTop: 0, // tab标题的滚动条位置
-			form: {
-				categoryId: ''
-			},
-			// 操作菜单
-			operateData: {},
-			operateShow: false,
-			operateIndex: null,
-			operateTop: 0,
-			// 底部操作
-			operateBottomShow: false,
-			btnBottomData: [
-				{
-					name: '图库管理',
-					click: () => this.$util.pageTo('/admin/goodsManage/img-store')
-				},
-				{
-					name: '运费设置',
-					click: () => this.$util.pageTo('/admin/goodsManage/freight')
-				},
-				{
-					name: '通用简介',
-					click: () => alert('请在电脑端进行设置!')
-				},
-				{
-					name: '自动涨价',
-					click: () => this.$util.pageTo('/admin/goodsManage/price-increase')
-				}
-			]
-		}
-	},
-	computed: {
-		btnData() {
-			return [
-				{
-					text: '置顶',
-					icon: 'iconzhiding',
-					click: () => {
-						this.delModal = true
-					}
-				},
-				{
-					text: '编辑',
-					icon: 'iconbianji',
-					click: () => {
-						this.$util.pageTo({
-							url: '/admin/ad/add',
-							query: {
-								type: this.tabIndex,
-								id: this.operateData.id
-							}
-						})
-					}
-				},
-				{
-					text: this.operateData.status == 1 ? '下架' : '启用',
-					icon: this.operateData.status == 1 ? 'iconxiajia' : 'iconqiyong',
-					click: () => {
-						this.changeStatusFn()
+	import AppTabs from '@/components/plugin/tabs'
+	import OperateModule from '@/admin/home/components/module/operate'
+	import OperateLineModule from '@/admin/home/components/module/operate-line'
+	import AppWrapperEmpty from '@/components/app-wrapper-empty'
+	import ModalModule from '@/components/plugin/modal'
+	// api
+	import { categoryListB, getCategoryGoodsB, delB, changeStatusB } from '@/api/goods'
+	import { list } from '@/mixins'
+	export default {
+		name: 'goods-manage-list',
+		components: {
+			AppTabs,
+			OperateLineModule,
+			OperateModule,
+			AppWrapperEmpty,
+			ModalModule
+		},
+		mixins: [list],
+		data() {
+			return {
+				// tabs
+				tabIndex: 0,
+				tabs: [
+					{
+						name: '出售中'
+					},
+					{
+						name: '已下架'
 					}
+				],
+				// 中间
+				tabbar: [],
+				height: 0, // scroll-view高度
+				currentTab: 0, // 预设当前项的值
+				scrollTop: 0, // tab标题的滚动条位置
+				form: {
+					categoryId: ''
 				},
-				{
-					text: '删除',
-					icon: 'iconshanchu1',
-					click: () => {
-						this.delModal = true
+				// 删除弹窗
+				delModal: false,
+				// 操作菜单
+				operateData: {},
+				operateShow: false,
+				operateIndex: null,
+				operateTop: 0,
+				// 底部操作
+				operateBottomShow: false,
+				btnBottomData: [
+					{
+						name: '图库管理',
+						click: () => this.$util.pageTo('/admin/goodsManage/img-store')
+					},
+					{
+						name: '运费设置',
+						click: () => this.$util.pageTo('/admin/goodsManage/freight')
+					},
+					{
+						name: '通用简介',
+						click: () => alert('请在电脑端进行设置!')
+					},
+					{
+						name: '自动涨价',
+						click: () => this.$util.pageTo('/admin/goodsManage/price-increase')
 					}
-				}
-			]
-		}
-	},
-	onLoad: function() {
-		if (this.$util.isLogin()) {
-			setTimeout(() => {
-				uni.getSystemInfo({
-					success: res => {
-						this.height = res.windowHeight - 90
-						this.sInit()
-					}
-				})
-			}, 50)
-		}
-	},
-	methods: {
-		async sInit() {
-			this._getClass()
-			this._list()
-		},
-		// 分类
-		_getClass() {
-			categoryListB().then(res => {
-				this.tabbar = res.data
-			})
-		},
-		// 列表
-		_list() {
-			return getCategoryGoodsB({
-				status: this.tabIndex == 0 ? 1 : 0,
-				...this.form
-			}).then(res => {
-				this.completes(res)
-			})
-		},
-		// tabs
-		change(e) {
-			if (this.tabIndex == e.index) {
-				return false
-			} else {
-				this.tabIndex = e.index
-				this.operateCloseFn()
-				this.resetList()
-				this._list()
+				]
 			}
 		},
-		// 操作按钮
-		operateFn(item, index) {
-			if (this.operateIndex == index) {
-				this.operateCloseFn()
-			} else {
-				this.operateData = item
-				this.operateData.index = index
-				this.operateIndex = index
-				this.operateTop = (index + 1) * 214
-				this.operateShow = true
+		computed: {
+			btnData() {
+				return [
+					// {
+					// 	text: '置顶',
+					// 	icon: 'iconzhiding',
+					// 	click: () => {
+					// 		this.delModal = true
+					// 	}
+					// },
+					{
+						text: '编辑',
+						icon: 'iconbianji',
+						click: () => {
+							this.$util.pageTo({
+								url: '/admin/goodsManage/add',
+								query: {
+									type: this.tabIndex,
+									id: this.operateData.id
+								}
+							})
+						}
+					},
+					{
+						text: this.operateData.status == 1 ? '下架' : '上架',
+						icon: this.operateData.status == 1 ? 'iconxiajia' : 'iconqiyong',
+						click: () => {
+							this.changeStatusFn()
+						}
+					},
+					{
+						text: '删除',
+						icon: 'iconshanchu1',
+						click: () => {
+							this.delModal = true
+						}
+					},
+					{
+						text: '分享',
+						icon: 'iconfenxiang1',
+						click: () => {
+							this.$msg('功能开发中。。。')
+						}
+					}
+				]
 			}
 		},
-		// 关闭操作按钮
-		operateCloseFn() {
-			this.operateData = {}
-			this.operateIndex = null
-			this.operateShow = false
-		},
-		// 点击标题切换当前页时改变样式
-		swichNav(e, item) {
-			let cur = e.currentTarget.dataset.current
-			if (this.currentTab == cur) {
-				return false
-			} else {
-				this.currentTab = cur
-				this.form.categoryId = item.id
-				this.resetList()
-				this._list()
-				// this.checkCor()
+		onLoad: function() {
+			if (this.$util.isLogin()) {
+				setTimeout(() => {
+					uni.getSystemInfo({
+						success: res => {
+							this.height = res.windowHeight - 90
+							this.sInit()
+						}
+					})
+				}, 50)
 			}
 		},
-		// 判断当前滚动超过一屏时,设置tab标题滚动条。
-		checkCor() {
-			let that = this
-			// 这里计算按照实际情况进行修改,动态数据要进行动态分析
-			// 思路:窗体高度/单个分类高度 200rpx 转px计算 =>得到一屏幕所显示的个数,结合后台传回分类总数进行计算
-			// 数据很多可以多次if判断然后进行滚动距离计算即可
-			if (that.currentTab > 7) {
-				that.scrollTop = 500
-			} else {
-				that.scrollTop = 0
+		methods: {
+			async sInit() {
+				this._getClass()
+				this._list()
+			},
+			// 分类
+			_getClass() {
+				categoryListB().then(res => {
+					this.tabbar = res.data
+				})
+			},
+			// 列表
+			_list() {
+				return getCategoryGoodsB({
+					status: this.tabIndex == 0 ? 1 : 0,
+					...this.form
+				}).then(res => {
+					this.completes(res)
+				})
+			},
+			// tabs
+			change(e) {
+				if (this.tabIndex == e.index) {
+					return false
+				} else {
+					this.tabIndex = e.index
+					this.operateCloseFn()
+					this.resetList()
+					this._list()
+				}
+			},
+			// 操作按钮
+			operateFn(item, index) {
+				if (this.operateIndex == index) {
+					this.operateCloseFn()
+				} else {
+					this.operateData = item
+					this.operateData.index = index
+					this.operateIndex = index
+					this.operateTop = (index + 1) * 224 - 20
+					this.operateShow = true
+				}
+			},
+			// 关闭操作按钮
+			operateCloseFn() {
+				this.operateData = {}
+				this.operateIndex = null
+				this.operateShow = false
+			},
+			// 点击标题切换当前页时改变样式
+			swichNav(e, item) {
+				let cur = e.currentTarget.dataset.current
+				if (this.currentTab == cur) {
+					return false
+				} else {
+					this.currentTab = cur
+					this.form.categoryId = item.id
+					this.resetList()
+					this._list()
+					// this.checkCor()
+				}
+			},
+			// 判断当前滚动超过一屏时,设置tab标题滚动条。
+			checkCor() {
+				let that = this
+				// 这里计算按照实际情况进行修改,动态数据要进行动态分析
+				// 思路:窗体高度/单个分类高度 200rpx 转px计算 =>得到一屏幕所显示的个数,结合后台传回分类总数进行计算
+				// 数据很多可以多次if判断然后进行滚动距离计算即可
+				if (that.currentTab > 7) {
+					that.scrollTop = 500
+				} else {
+					that.scrollTop = 0
+				}
+			},
+			// operate
+			// operateCancle() {
+			// 	this.operateData = {}
+			// 	this.operateIndex = null
+			// 	this.operateShow = false
+			// },
+			changeOperateShowFn() {
+				this.operateBottomShow = !this.operateBottomShow
+			},
+			changeStatusFn() {
+				let status = this.operateData.status == 1 ? 0 : 1
+				changeStatusB({
+					id: this.operateData.id,
+					status: status
+				}).then(res => {
+					this.list.data[this.operateIndex].status = status
+					this.operateCloseFn()
+					this.$msg('操作成功!')
+				})
+			},
+			// delModal
+			modalCancel() {
+				this.delModal = false
+			},
+			delModalClick(e) {
+				if (e.index === 0) {
+					this.modalCancel()
+				} else {
+					delB({ id: this.operateData.id }).then(res => {
+						this.modalCancel()
+						this.operateCloseFn()
+						this.$msg('删除成功!')
+						this.resetList()
+						this._list()
+					})
+				}
 			}
-		},
-		// operate
-		changeOperateShowFn() {
-			this.operateBottomShow = !this.operateBottomShow
 		}
 	}
-}
 </script>
 
 <style lang="scss" scoped>
@@ -324,16 +385,31 @@ export default {
 			box-sizing: border-box;
 			padding-bottom: env(safe-area-inset-bottom);
 			.goods-list {
-				@include disFlex(flex-start, flex-start);
 				margin: 40px 0;
+				.goods-list-top {
+					position: relative;
+					@include disFlex(flex-start, flex-start);
+				}
+				.goods-list-bottom {
+					width: 74%;
+					margin-top: 16px;
+					color: $fontColor2;
+				}
 				.img-blo {
-					width: 200px;
-					height: 200px;
+					width: 130px;
+					height: 130px;
 					margin-right: 20px;
 				}
 				.goods-det {
-					padding-top: 18px;
+					width: calc(100% - 150px);
+					// padding-top: 18px;
 					font-size: 28px;
+					.operate-wrap {
+						@include disFlex(flex-end, space-between);
+					}
+					.operate-icon-wrap {
+						left: -20px;
+					}
 					.goods-name {
 						margin-bottom: 10px;
 					}
@@ -343,7 +419,7 @@ export default {
 					}
 					.goods-price {
 						margin-top: 50px;
-						color: $mainColor;
+						color: #ff2842;
 						font-weight: bold;
 					}
 				}

+ 1 - 1
mobile-code/src/admin/home/member.vue

@@ -21,7 +21,7 @@
 								</div>
                             </div>
 							<div class="tui-msg-content">
-                                <div>
+                                <div class="icon-wrap">
                                     <i class="iconfont iconzhifubao"></i>
                                 </div>
                                 <span>{{item.visitTimeFormat}}</span>

+ 12 - 2
mobile-code/src/admin/staff/add.vue

@@ -7,6 +7,10 @@
 					<div class="tui-title required">员工姓名</div>
 					<input v-model="form.adminName" placeholder-class="phcolor" class="tui-input" name="adminName" placeholder="请输入姓名" maxlength="50" type="text" />
 				</tui-list-cell>
+				<tui-list-cell class="line-cell" :hover="false">
+					<div class="tui-title required">手机号</div>
+					<input v-model="form.mobile" placeholder-class="phcolor" class="tui-input" name="mobile" placeholder="请输入手机号" maxlength="50" type="number" />
+				</tui-list-cell>
 				<tui-list-cell class="line-cell" :arrow="true">
 					<div class="tui-title required">角色</div>
 					<picker mode="selector" :value="form.roleId" :range="roleList" range-key="roleName" @change="changeRoleFn" class="tui-input">
@@ -23,8 +27,8 @@
 							<app-avatar-module :src="memberData.avatarUrl" :width="60" />
 						</div>
 						<div class="member-det">
-							<div class="app-size-28">{{ memberData.realName }}</div>
-							<div>{{ memberData.mobile }}</div>
+							<div class="app-size-28">{{ memberData.userName }}</div>
+							<div>{{ memberData.mobile == 0 ? '暂无' : memberData.mobile }}</div>
 						</div>
 					</div>
 					<div v-else class="tui-placeholder">请选择</div>
@@ -87,6 +91,7 @@ export default {
 		return {
 			form: {
 				adminName: '',
+				mobile: '',
 				roleId: '',
 				remind: 0,
 				password: '',
@@ -201,6 +206,11 @@ export default {
 					rule: ['required'],
 					msg: ['请输入姓名']
 				},
+				{
+					name: 'mobile',
+					rule: ['required'],
+					msg: ['请输入手机号']
+				},
 				{
 					name: 'roleId',
 					rule: ['required'],

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

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

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

@@ -1,318 +0,0 @@
-{
-	"pages": [
-		{
-			"path": "admin/home/workbench",
-			"style": {
-				"navigationBarTitleText": "工作台"
-			}
-		},
-		{
-			"path": "admin/home/order",
-			"style": {
-				"navigationBarTitleText": "订单"
-			}
-		},
-		{
-			"path": "admin/home/member",
-			"style": {
-				"navigationBarTitleText": "客户"
-			}
-		},
-		{
-			"path": "pages/common/redirect",
-			"style": {
-				"navigationBarTitleText": "加载中..."
-			}
-		},
-		{
-			"path": "pages/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": "客户"
-			}
-		]
-	}
-}
-

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

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

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

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

+ 2 - 2
mobile-code/src/b-manifest.json → mobile-code/src/m-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": {

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

@@ -0,0 +1,203 @@
+{
+	"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": "订单确认"
+					}
+				},
+				{
+					"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": "我的"
+			}
+		]
+	}
+}
+

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

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

+ 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.m.huaml.com",
+                    "target": "http://api.b.huaml.com",
                     "secure": false,
                     "changeOrigin": true,
                     "pathRewrite": {

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

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

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

@@ -157,7 +157,6 @@ class Request {
 								icon: 'none',
 								mask: true
 							})
-							uni.removeStorageSync('token')
 							setTimeout(() => {
 								getCheckLogin()
 								// uni.reLaunch({

+ 1 - 1
mobile-code/src/static/iconfont/iconfont.css

@@ -10,7 +10,7 @@
 
 .iconfont {
   font-family: "iconfont" !important;
-  font-size: 16px;
+  font-size: 32px;
   font-style: normal;
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;

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

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