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

+ 1 - 1
mobile-code/src/App.vue

@@ -17,7 +17,7 @@ export default {
 		// #endif
 		// 开发
 		if (process.env.NODE_ENV == 'development') {
-			uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IjBfMTI1NDM3NDUifQ.eyJpc3MiOiJodHRwczpcL1wvYXBpLmIuaHVhbWwuY29tIiwiYXVkIjoiaHR0cHM6XC9cL2FwaS5iLmh1YW1sLmNvbSIsImp0aSI6IjBfMTI1NDM3NDUiLCJpYXQiOjE1ODA3MTA1NjEsIm5iZiI6MTU4MDcxMDU2MSwiZXhwIjoxNTg5MzUwNTYxLCJ1bmlxdWVJZCI6IjEyNTQzNzQ1Iiwic291cmNlSWQiOjB9.kHrIKm0MUOnX8fCDjOXwd7wQ4jOSEV8gvwR4H4hn_hQ')
+			uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6IjBfNyJ9.eyJpc3MiOiJodHRwczpcL1wvYXBpLmIuaHVhbWwuY29tIiwiYXVkIjoiaHR0cHM6XC9cL2FwaS5iLmh1YW1sLmNvbSIsImp0aSI6IjBfNyIsImlhdCI6MTU4MjAyOTY2MywibmJmIjoxNTgyMDI5NjYzLCJleHAiOjE1OTA2Njk2NjMsInVuaXF1ZUlkIjoiNyIsInNvdXJjZUlkIjowfQ.v04WwuiNYArwrCzERY--uB3mWx4r2Za2R0chdjdTZF4')
 			uni.setStorageSync('account', '12362')
 		}
 	},

+ 5 - 4
mobile-code/src/admin/ad/add.vue

@@ -109,7 +109,7 @@ export default {
 				adName: '',
 				adImg: [],
 				status: 0,
-				inTurn: '',
+				inTurn: '1',
 				type: 0,
 				style: 0,
 				url: '',
@@ -226,10 +226,11 @@ export default {
 			if (this.option.id) {
 				form.id = this.option.id
 			}
-			if (this.form.style == 0) {
-				form.goodsId = ''
+			if (form.style == 0) {
+				delete form.goodsId
 			} else {
-				form.url = ''
+				// form.url = ''
+				delete form.url
 			}
 			hostFn(form).then(res => {
 				let promptText = this.option.id ? '修改成功!' : '添加成功!'

+ 3 - 2
mobile-code/src/admin/goodsManage/category.vue

@@ -138,7 +138,7 @@ export default {
 					text: '删除',
 					icon: 'iconshanchu1',
 					click: () => {
-						this.operateCancle()
+						// this.operateCancle()
 						this.delModal = true
 					}
 				}
@@ -194,7 +194,7 @@ export default {
 			if (this.modifyTitle == '编辑') {
 				form.categoryId = this.operateData.id
 			}
-			categoryAddB({
+			host({
 				...form
 			}).then(res => {
 				this.$msg('操作成功!')
@@ -238,6 +238,7 @@ export default {
 			if (e.index === 0) {
 				this.modalCancel()
 			} else {
+				console.log('this.operateData', this.operateData)
 				categoryDelB({ categoryId: this.operateData.id }).then(res => {
 					this.modalCancel()
 					this.operateCancle()

+ 11 - 8
mobile-code/src/admin/goodsManage/list.vue

@@ -130,7 +130,10 @@
 					},
 					{
 						name: '通用简介',
-						click: () => alert('请在电脑端进行设置!')
+						click: () => {
+							// alert('请在电脑端进行设置!')
+							this.$msg('请在电脑端进行设置!')
+						}
 					},
 					{
 						name: '自动涨价',
@@ -175,14 +178,14 @@
 						click: () => {
 							this.delModal = true
 						}
-					},
-					{
-						text: '分享',
-						icon: 'iconfenxiang1',
-						click: () => {
-							this.$msg('功能开发中。。。')
-						}
 					}
+					// {
+					// 	text: '分享',
+					// 	icon: 'iconfenxiang1',
+					// 	click: () => {
+					// 		this.$msg('功能开发中。。。')
+					// 	}
+					// }
 				]
 			}
 		},

+ 116 - 109
mobile-code/src/admin/home/order.vue

@@ -52,124 +52,131 @@
 </template>
 
 <script>
-import AppTabs from '@/components/plugin/tabs'
-import ListModule from '@/components/module/app-order-list'
-import AppWrapperEmpty from '@/components/app-wrapper-empty'
-import ModalModule from '@/components/plugin/modal'
-import { list } from '@/mixins'
-// api
-import { getListB, freeShipping } from '@/api/order'
-export default {
-	name: 'order-list',
-	components: {
-		ListModule,
-		AppTabs,
-		AppWrapperEmpty,
-		ModalModule
-	},
-	mixins: [list],
-	data() {
-		return {
-			tabIndex: 0,
-			tabs: [
-				{
-					name: '全部',
-					value: 0
-				},
-				{
-					name: '待付款',
-					value: 0
-				},
-				{
-					name: '待配送',
-					value: 0
-				},
-				{
-					name: '配送中',
-					value: 0
-				},
-				{
-					name: '已完结',
-					value: 0
-				}
-			],
-			// operate
-			operateIndex: null,
-			operateData: {},
-			// 免发货
-			freeShipModal: false
-		}
-	},
-	onPullDownRefresh() {
-		console.log('fasdfasdf')
-	},
-	// 加载更多
-	onReachBottom() {
-		console.log('5151')
-	},
-	onLoad: function() {
-		// this.init()
-	},
-	methods: {
-		async init() {
-			this._list()
+	import AppTabs from '@/components/plugin/tabs'
+	import ListModule from '@/components/module/app-order-list'
+	import AppWrapperEmpty from '@/components/app-wrapper-empty'
+	import ModalModule from '@/components/plugin/modal'
+	import { list } from '@/mixins'
+	// api
+	import { getListB, freeShipping } from '@/api/order'
+	export default {
+		name: 'order-list',
+		components: {
+			ListModule,
+			AppTabs,
+			AppWrapperEmpty,
+			ModalModule
 		},
-		_list() {
-			let status = JSON.parse(JSON.stringify(this.tabIndex))
-			status = status == 4 ? 5 : status - 1
-			return getListB({
-				status: status,
-				search: '',
-				page: this.list.page
-			}).then(res => {
-				this.completes(res)
-				if (this.$util.isEmpty(res.data)) return false
-				this.tabs[0].value = res.data.asset.totalOrder
-				this.tabs[1].value = res.data.asset.unPayOrder
-				this.tabs[2].value = res.data.asset.unSendOrder
-				this.tabs[3].value = res.data.asset.sendingOrder
-				this.tabs[4].value = res.data.asset.finishOrder
-			})
-		},
-		change(e) {
-			if (this.tabIndex == e.index) {
-				return false
-			} else {
-				this.tabIndex = e.index
-				this.resetList()
-				this._list()
+		mixins: [list],
+		data() {
+			return {
+				tabIndex: 0,
+				tabs: [
+					{
+						name: '全部',
+						value: 0
+					},
+					{
+						name: '待付款',
+						value: 0
+					},
+					{
+						name: '待配送',
+						value: 0
+					},
+					{
+						name: '配送中',
+						value: 0
+					},
+					{
+						name: '已完结',
+						value: 0
+					}
+				],
+				// operate
+				operateIndex: null,
+				operateData: {},
+				// 免发货
+				freeShipModal: false
 			}
 		},
-		// 免发货
-		freeShippingFn(item, index) {
-			this.operateIndex = index
-			this.operateData = item
-			this.freeShipModal = true
+		onPullDownRefresh() {
+			console.log('fasdfasdf')
+		},
+		// 加载更多
+		onReachBottom() {
+			console.log('5151')
+		},
+		onLoad: function() {
+			// this.init()
 		},
-		// 免发货
-		freeShipModalClick(e) {
-			if (e.index === 0) {
-				this.modalCancel()
-			} else {
-				this.list.data[this.operateIndex].status = 2
+		onShow() {
+			let tabIndex = uni.getStorageSync('switchTabQuery') || null
+			console.log('tabIndex', tabIndex)
+			if (tabIndex) {
+				uni.removeStorageSync('switchTabQuery')
+				this.tabIndex = parseInt(tabIndex.tabIndex)
 			}
+			this._list()
 		},
-		// 查看配送
-		seeSendFn(item) {
-			this.$util.pageTo({
-				url: '/admin/order/ship',
-				query: {
-					id: item.id,
-					pageStatus: 5
+		methods: {
+			async init() {},
+			_list() {
+				let status = JSON.parse(JSON.stringify(this.tabIndex))
+				status = status == 4 ? 5 : status - 1
+				return getListB({
+					status: status,
+					search: '',
+					page: this.list.page
+				}).then(res => {
+					this.completes(res)
+					if (this.$util.isEmpty(res.data)) return false
+					this.tabs[0].value = res.data.asset.totalOrder
+					this.tabs[1].value = res.data.asset.unPayOrder
+					this.tabs[2].value = res.data.asset.unSendOrder
+					this.tabs[3].value = res.data.asset.sendingOrder
+					this.tabs[4].value = res.data.asset.finishOrder
+				})
+			},
+			change(e) {
+				if (this.tabIndex == e.index) {
+					return false
+				} else {
+					this.tabIndex = e.index
+					this.resetList()
+					this._list()
 				}
-			})
-		},
-		// 关闭弹窗
-		modalCancel() {
-			this.freeShipModal = false
+			},
+			// 免发货
+			freeShippingFn(item, index) {
+				this.operateIndex = index
+				this.operateData = item
+				this.freeShipModal = true
+			},
+			// 免发货
+			freeShipModalClick(e) {
+				if (e.index === 0) {
+					this.modalCancel()
+				} else {
+					this.list.data[this.operateIndex].status = 2
+				}
+			},
+			// 查看配送
+			seeSendFn(item) {
+				this.$util.pageTo({
+					url: '/admin/order/ship',
+					query: {
+						id: item.id,
+						pageStatus: 5
+					}
+				})
+			},
+			// 关闭弹窗
+			modalCancel() {
+				this.freeShipModal = false
+			}
 		}
 	}
-}
 </script>
 
 <style lang="scss" scoped>

+ 27 - 4
mobile-code/src/admin/home/workbench.vue

@@ -30,7 +30,7 @@
 		<!-- 订单总览 -->
 		<div class="module-com order-wrap">
 			<div class="total-blo">
-				<div class="total-list" v-for="(item, index) in orderData" :key="index" @click="pageToFn(item)">
+				<div class="total-list" v-for="(item, index) in orderData" :key="index" @click="pageTo(item)">
 					<div class="list-num">{{ item.value }}</div>
 					<div class="app-color-3">{{ item.name }}</div>
 				</div>
@@ -97,16 +97,29 @@ export default {
 				{
 					name: '待付款',
 					value: 0,
-					url: '/admin/order/list'
+					url: '/admin/home/order',
+					type: 4,
+					query: {
+						tabIndex: 1
+					}
 				},
 				{
 					name: '待配送',
 					value: 0,
-					url: '/admin/order/list'
+					url: '/admin/home/order',
+					type: 4,
+					query: {
+						tabIndex: 2
+					}
 				},
 				{
 					name: '配送中',
-					value: 0
+					value: 0,
+					url: '/admin/home/order',
+					type: 4,
+					query: {
+						tabIndex: 3
+					}
 				},
 				{
 					name: '待通知',
@@ -114,10 +127,20 @@ export default {
 				},
 				{
 					name: '已完结',
+					url: '/admin/home/order',
+					type: 4,
+					query: {
+						tabIndex: 4
+					},
 					value: 0
 				},
 				{
 					name: '全部',
+					url: '/admin/home/order',
+					type: 4,
+					query: {
+						tabIndex: 0
+					},
 					value: 0
 				}
 			],

+ 1 - 1
mobile-code/src/admin/setting/password.vue

@@ -91,7 +91,7 @@ export default {
 		},
 		confirmFn() {
 			if (!this.isOldPass) {
-				delete this.form[old]
+				delete this.form.old
 			}
 			let hostFn = this.tabIndex == 1 ? updatePassword : updateConfirmPassword
 			hostFn(this.form).then(res => {

+ 6 - 6
mobile-code/src/admin/staff/add.vue

@@ -7,10 +7,6 @@
 					<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">
@@ -20,7 +16,7 @@
 					</picker>
 				</tui-list-cell>
 				<tui-list-cell class="line-cell" :arrow="true" @click="selMemberFn">
-					<div class="tui-title required">关联微信</div>
+					<div class="tui-title required">绑定微信</div>
 					<div v-if="form.userId" class="member-wrap flex-center">
 						<input v-model="form.userId" name="userId" type="text" hidden />
 						<div class="member-img">
@@ -34,7 +30,7 @@
 					<div v-else class="tui-placeholder">请选择</div>
 				</tui-list-cell>
 			</div>
-			<div class="prompt-text">注: 关联的微信号要注册会员并关注公从号</div>
+			<div class="prompt-text">注: 请先关注公众号,绑定后可以在移动端自动登陆</div>
 			<!-- 收款通知 -->
 			<div class="module-com input-line-wrap">
 				<tui-list-cell class="line-cell between" padding="14rpx 30rpx" :hover="false">
@@ -46,6 +42,10 @@
 			</div>
 			<!-- 登录信息 -->
 			<div class="module-com input-line-wrap">
+				<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" :hover="false">
 					<div class="tui-title required">登陆密码</div>
 					<input v-model="form.password" placeholder-class="phcolor" class="tui-input" name="password" placeholder="请输入" maxlength="50" type="text" />

+ 0 - 1
mobile-code/src/filters/index.js

@@ -26,7 +26,6 @@ Vue.filter('default_img', function(url) {
 
 Vue.filter('default_avatar', function(url) {
 	if (!url) {
-		console.log('url')
 		return require('@/static/images/user/attr-default.png')
 	}
 	return url

+ 3 - 1
mobile-code/src/utils/util.js

@@ -202,8 +202,10 @@ export const pageTo = (item) => {
 				url: allUrl
 			})
 		} else if (item.type == 4) {
+			console.log('switchTab', item.query)
+			uni.setStorageSync('switchTabQuery', item.query)
 			uni.switchTab({
-				url: allUrl
+				url: item.url
 			})
 		} else {
 			uni.navigateTo({