哦吼吼 6 лет назад
Родитель
Сommit
a374a14fe9

+ 1 - 1
admin-update/src/cool/components/upload/index.vue

@@ -8,7 +8,7 @@
 			accept="image/*"
 			v-bind="props"
 			:headers="{
-				Authorization: token
+				token: token
 			}"
 			:action="action"
 			:show-file-list="false"

+ 35 - 24
admin-update/src/mock/userInfo.js

@@ -229,17 +229,17 @@ let menu = {
 			viewPath: 'views/goods/goods-list.vue',
 			keepAlive: 1
 		},
-		{
-			id: '402',
-			parentId: '4',
-			name: '图库管理',
-			type: 1,
-			icon: 'icon-user',
-			orderNum: 1,
-			router: '/goods/img-store',
-			viewPath: 'views/goods/img-store.vue',
-			keepAlive: 1
-		},
+		// {
+		// 	id: '402',
+		// 	parentId: '4',
+		// 	name: '图库管理',
+		// 	type: 1,
+		// 	icon: 'icon-user',
+		// 	orderNum: 1,
+		// 	router: '/goods/img-store',
+		// 	viewPath: 'views/goods/img-store.vue',
+		// 	keepAlive: 1
+		// },
 		{
 			id: '403',
 			parentId: '4',
@@ -473,13 +473,24 @@ let menu = {
 			type: 1,
 			icon: 'iconkehuguanli',
 			orderNum: 2,
-			router: '/pages/interest/admin/my-invite',
+			router: '/pages/admin/my-invite',
 			viewPath: 'views/my-invite/index.vue',
 			keepAlive: 1
 		},
-		// ========================================================
 		{
 			id: '12',
+			parentId: null,
+			name: '收入明细',
+			type: 1,
+			icon: 'iconkehuguanli',
+			orderNum: 2,
+			router: '/admin/assets/list',
+			viewPath: 'views/assets/list.vue',
+			keepAlive: 1
+		},
+		// ========================================================
+		{
+			id: '13',
 			parentId: '8',
 			name: '新增',
 			type: 2,
@@ -774,18 +785,18 @@ let menu = {
 			router: null,
 			viewPath: null,
 			keepAlive: 0
-		},
-		{
-			id: '51',
-			parentId: '10',
-			name: '测试404页面',
-			type: 1,
-			icon: 'icon-newfill',
-			orderNum: 10,
-			router: '/test',
-			viewPath: null,
-			keepAlive: 1
 		}
+		// {
+		// 	id: '51',
+		// 	parentId: '10',
+		// 	name: '测试404页面',
+		// 	type: 1,
+		// 	icon: 'icon-newfill',
+		// 	orderNum: 10,
+		// 	router: '/test',
+		// 	viewPath: null,
+		// 	keepAlive: 1
+		// }
 	]
 };
 

+ 1 - 1
admin-update/src/pages/login/index.js

@@ -8,7 +8,7 @@ export default {
 	data() {
 		return {
 			form: {
-				mobile: '18030142050',
+				mobile: '15280215347',
 				password: '123456',
 				// captchaId: '',
 				verifyCode: ''

+ 21 - 1
admin-update/src/service/category/index.js

@@ -1,6 +1,26 @@
 import { BaseService, Service } from '@/cool';
 
 @Service('category')
-export class CategoryService extends BaseService {}
+export class CategoryService extends BaseService {
+	page(params) {
+		return this.request({
+			url: '/list',
+			params: {
+				...params
+			}
+		}).then(res => {
+			return {
+				list: res
+			};
+		});
+	}
+
+	updateStatus(data) {
+		return this.request({
+			url: '/change-status',
+			params: data
+		});
+	}
+}
 
 export default new CategoryService();

+ 17 - 0
admin-update/src/service/goods/index.js

@@ -2,6 +2,7 @@ import { BaseService, Service } from '@/cool';
 
 @Service('goods')
 export class GoodsService extends BaseService {
+	// 更新商品状态 b
 	changeStatus(data) {
 		return this.request({
 			url: '/change-status',
@@ -9,6 +10,22 @@ export class GoodsService extends BaseService {
 			data: data
 		});
 	}
+
+	// 商品管理-涨价设置 b
+	getAutoPrice(data) {
+		return this.request({
+			url: '/goods/setting',
+			params: data
+		});
+	}
+
+	// 商品管理-更新涨价 b
+	setAutoPrice(data) {
+		return this.request({
+			url: '/goods/update-rise',
+			params: data
+		});
+	}
 }
 
 export default new GoodsService();

+ 25 - 0
admin-update/src/service/single/index.js

@@ -32,6 +32,31 @@ export class SingleService extends BaseService {
 			params: data
 		});
 	}
+
+	// 常用链接 b
+	capitalList(data) {
+		return this.request({
+			url: '/merchant-capital/list',
+			params: data
+		});
+	}
+
+	// 获取商品通用简介 b
+	getGoodsIntro(data) {
+		return this.request({
+			url: '/goods/introduce',
+			params: data
+		});
+	}
+
+	// 更新商品通用简介 b
+	editGoodsIntro(data) {
+		return this.request({
+			url: '/goods/update-introduce',
+			method: 'POST',
+			data: data
+		});
+	}
 }
 
 export default new SingleService();

+ 2 - 2
admin-update/src/store/modules/config.js

@@ -21,8 +21,8 @@ export default {
 		// 分类
 		getCategory({ commit }) {
 			return this.$service.category.list().then(res => {
-				commit('SET_CATEGORY', res);
-				return res;
+				commit('SET_CATEGORY', res.list);
+				return res.list;
 			});
 		},
 		delCategory({ commit }) {

+ 85 - 0
admin-update/src/views/assets/list.vue

@@ -0,0 +1,85 @@
+<template>
+	<div class="app-list-content">
+		<cl-crud class="liu-crud-wrap" @load="onLoad"></cl-crud>
+	</div>
+</template>
+
+<script>
+export default {
+	name: 'assets-list',
+	methods: {
+		// cl-crud 组件ad
+		onLoad({ ctx, app }) {
+			this.app = app;
+			ctx.service({
+				page: () => {
+					return this.$service.single.capitalList();
+				}
+			})
+				.set('table', {
+					columns: [
+						{
+							prop: 'id',
+							label: 'id',
+							align: 'center',
+							'min-width': 100
+						},
+						{
+							prop: 'userName',
+							label: '姓名',
+							align: 'center'
+						},
+						{
+							prop: 'event',
+							label: '收入类型',
+							align: 'center'
+						},
+						{
+							prop: 'payWay',
+							label: '支付方式',
+							align: 'center'
+						},
+						{
+							prop: 'amount',
+							label: '收支',
+							align: 'center'
+						},
+						{
+							prop: 'totalIncome',
+							label: '累计收入',
+							align: 'center'
+						},
+						{
+							prop: 'addTime',
+							label: '时间',
+							align: 'center'
+						}
+					],
+					// 操作列
+					op: {
+						visible: false, // 是否显示
+						// 同 element-ui Table-column Attributes
+						props: {
+							width: 100,
+							align: 'center',
+							fixed: 'right',
+							label: '操作'
+						},
+						// 布局,请移步 `layout`
+						layout: []
+					}
+				})
+				.set('layout', [
+					['slot-tabs'],
+					['flex1', 'refresh-btn', 'slot-add-ad-btn'],
+					['data-table'],
+					['flex1', 'pagination']
+				])
+				.done();
+			app.refresh({ type: this.tabIndex });
+		}
+	}
+};
+</script>
+
+<style lang="stylus" scoped></style>

+ 43 - 16
admin-update/src/views/goods/auto-price.vue

@@ -1,18 +1,12 @@
 <template>
 	<div class="app-content auto-price-wrap">
-		<el-form
-			:model="ruleForm"
-			:rules="rules"
-			ref="ruleForm"
-			label-width="100px"
-			class="demo-ruleForm"
-		>
+		<el-form :model="form" :rules="rules" ref="form" label-width="100px" class="demo-form">
 			<el-form-item label="开启自动涨价" prop="name">
-				<el-switch v-model="ruleForm.delivery"></el-switch>
+				<el-switch v-model="form.delivery"></el-switch>
 			</el-form-item>
 			<el-form-item label="要涨价节日" prop="name">
 				<el-checkbox
-					v-model="ruleForm.status"
+					v-model="form.status"
 					label="七夕节"
 					border
 					v-for="(item, index) in 4"
@@ -21,19 +15,19 @@
 				></el-checkbox>
 			</el-form-item>
 			<el-form-item label="涨价方式" prop="resource">
-				<el-radio-group v-model="ruleForm.resource">
+				<el-radio-group v-model="form.resource">
 					<el-radio label="按百分比"></el-radio>
 					<el-radio label="按金额"></el-radio>
 				</el-radio-group>
 			</el-form-item>
 			<template v-if="true">
 				<el-form-item label="比例" prop="resource">
-					<el-input v-model="ruleForm.name" placeholder="涨价10%,请输入10"></el-input>
+					<el-input v-model="form.name" placeholder="涨价10%,请输入10"></el-input>
 				</el-form-item>
 			</template>
 			<template v-else>
 				<el-form-item label="金额" prop="resource">
-					<el-input v-model="ruleForm.name" placeholder="涨价80元请输入80"></el-input>
+					<el-input v-model="form.name" placeholder="涨价80元请输入80"></el-input>
 				</el-form-item>
 			</template>
 			<el-form-item>
@@ -42,8 +36,8 @@
 				</div>
 			</el-form-item>
 			<el-form-item>
-				<el-button @click="resetForm('ruleForm')">重置</el-button>
-				<el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
+				<el-button @click="resetForm('form')">重置</el-button>
+				<el-button type="primary" @click="submitForm('form')">保存</el-button>
 			</el-form-item>
 		</el-form>
 	</div>
@@ -54,15 +48,48 @@ export default {
 	name: 'auto-price',
 	data() {
 		return {
-			ruleForm: {},
+			form: {
+				riseSwitch: '0',
+				riseType: '0',
+				festIdList: [],
+				riseAmount: ''
+			},
 			rules: {}
 		};
 	},
+	mounted() {
+		this.init();
+	},
 	methods: {
+		init() {
+			this._getData();
+		},
+		_getData() {
+			this.$service.goods.getAutoPrice().then(res => {
+				if (this.$util.isEmpty(res.data)) return;
+				res.data.festIdList = res.data.festIdList.map(e => e + '');
+				Object.keys(this.form).forEach((i, index) => {
+					this.form[i] = res.data[i];
+				});
+			});
+		},
+		setPrice() {
+			if (this.form.festIdList.length == 0) {
+				this.$message.error('请先选择节日!');
+				return false;
+			}
+			if (!this.form.riseAmount) {
+				this.$message.error('请先输入比例或者金额!');
+				return false;
+			}
+			this.$service.goods.getAutoPrice(this.form).then(res => {
+				this.$message.error('更新成功!');
+			});
+		},
 		submitForm(formName) {
 			this.$refs[formName].validate(valid => {
 				if (valid) {
-					alert('submit!');
+					this.setPrice();
 				} else {
 					console.log('error submit!!');
 					return false;

+ 193 - 2
admin-update/src/views/goods/category.vue

@@ -1,10 +1,201 @@
 <template>
-	<div class="app-content"></div>
+	<div class="app-list-content">
+		<cl-crud class="liu-crud-wrap" @load="onLoad">
+			<template #table-column-status="{scope}"
+				><el-switch
+					v-model="scope.row.status"
+					active-value="1"
+					inactive-value="0"
+					@change="changeStatus(scope.row)"
+				></el-switch>
+			</template>
+
+			<!-- 编辑 -->
+			<template #slot-poster="{scope}">
+				<el-button type="text" @click="getPosterBtnFn(scope.row)">获取海报</el-button>
+			</template>
+
+			<!-- 删除 -->
+			<template #slot-modify="{scope}">
+				<el-button type="text" @click="modifyBtnFn(scope.row)">修改</el-button>
+			</template>
+
+			<!-- 添加 -->
+			<template #slot-add-ad-btn="{scope}">
+				<el-button type="primary" size="mini" @click="addBtnFn">添加</el-button>
+			</template>
+		</cl-crud>
+		<el-dialog
+			:title="`${addOrModify == 1 ? '添加' : '修改'}分类`"
+			:visible.sync="addDialog"
+			:close-on-click-modal="false"
+			width="400px"
+		>
+			<div class="ad-modal-content">
+				<el-form
+					:model="adForm"
+					:rules="adForm"
+					ref="adForm"
+					label-width="100px"
+					class="demo-form"
+				>
+					<el-form-item label="分类名称" prop="categoryName">
+						<el-input
+							v-model="adForm.categoryName"
+							placeholder="请输入名称"
+							size="small"
+						></el-input>
+					</el-form-item>
+					<el-form-item label="分类图片" prop="img">
+						<cl-upload v-model="adForm.img"></cl-upload>
+					</el-form-item>
+					<el-form-item label="马上启用" prop="status">
+						<el-switch
+							v-model="adForm.status"
+							active-value="1"
+							inactive-value="0"
+						></el-switch>
+					</el-form-item>
+				</el-form>
+			</div>
+			<div slot="footer" class="dialog-footer">
+				<el-button size="small" @click="resetForm">取 消</el-button>
+				<el-button type="primary" size="small" @click="confirmFn">确认</el-button>
+			</div>
+		</el-dialog>
+	</div>
 </template>
 
 <script>
 export default {
-	name: 'goods-category'
+	name: 'goods-category',
+	data() {
+		return {
+			// 修改弹窗
+			modifyData: {},
+			// 新增弹窗
+			addOrModify: 1,
+			addDialog: false,
+			adForm: {
+				categoryName: '',
+				img: '',
+				status: '1'
+			}
+		};
+	},
+	methods: {
+		// operate
+		addBtnFn() {
+			this.addDialog = true;
+			this.addOrModify = 1;
+		},
+		modifyBtnFn(item) {
+			this.modifyData = item;
+			this.addOrModify = 2;
+			this.addDialog = true;
+		},
+		changeStatus(item) {
+			this.$service.category.updateStatus({ id: item.id, status: item.status }).then(res => {
+				this.$message.success('操作成功!');
+			});
+		},
+		addOrModifyFn() {
+			let host = null;
+			if (this.addOrModify == 1) {
+				host = () => {
+					return this.$service.category.add(form);
+				};
+			} else {
+				host = () => {
+					return this.$service.category.update({
+						categoryId: this.modifyData.id,
+						...this.form
+					});
+				};
+			}
+			host().then(res => {
+				this.$message.success('操作成功!');
+				this.resetForm();
+				this.app.refresh({ type: this.tabIndex });
+			});
+		},
+		confirmFn() {
+			this.addOrModify();
+		},
+		resetForm() {
+			this.$refs['adForm'].resetFields();
+			this.addDialog = false;
+		},
+		getPosterBtnFn() {
+			this.$message('提示功能开发中!');
+		},
+		// cl-crud 组件ad
+		onLoad({ ctx, app }) {
+			this.app = app;
+			ctx.service(this.$service.category)
+				.set('table', {
+					columns: [
+						{
+							prop: 'id',
+							label: 'id',
+							align: 'center',
+							'min-width': 100
+						},
+						{
+							prop: 'categoryName',
+							label: '分类名称',
+							align: 'center'
+						},
+						{
+							prop: 'img',
+							label: '图片',
+							align: 'center'
+						},
+						{
+							prop: 'goodsNum',
+							label: '商品数',
+							align: 'center'
+						},
+						{
+							prop: 'sold',
+							label: '销量',
+							align: 'center'
+						},
+						{
+							prop: 'status',
+							label: '启用状态',
+							align: 'center'
+						},
+						{
+							prop: 'inTurn',
+							label: '排序',
+							align: 'center'
+						}
+					],
+					// 操作列
+					op: {
+						visible: false, // 是否显示
+						// 同 element-ui Table-column Attributes
+						props: {
+							width: 100,
+							align: 'center',
+							fixed: 'right',
+							label: '操作'
+						},
+						// 布局,请移步 `layout`
+						layout: []
+					}
+				})
+				.set('layout', [
+					['slot-tabs'],
+					['flex1', 'refresh-btn', 'slot-add-ad-btn'],
+					['data-table'],
+					['flex1', 'pagination']
+				])
+				.done();
+			app.refresh({ type: this.tabIndex });
+		}
+	}
 };
 </script>
 

+ 27 - 13
admin-update/src/views/goods/summary.vue

@@ -1,14 +1,8 @@
 <template>
 	<div class="app-content summary-wrap">
-		<el-form
-			:model="ruleForm"
-			:rules="rules"
-			ref="ruleForm"
-			label-width="100px"
-			class="demo-ruleForm"
-		>
-			<el-form-item label="商品通用简介" prop="resource">
-				<cl-editor-quill v-model="ruleForm.desc" @load="editor"></cl-editor-quill>
+		<el-form :model="form" :rules="rules" ref="form" label-width="100px" class="demo-form">
+			<el-form-item label="商品通用简介" prop="desc">
+				<cl-editor-quill v-model="form.desc" @load="editor"></cl-editor-quill>
 			</el-form-item>
 			<el-form-item>
 				<div class="app-color-3">
@@ -17,7 +11,7 @@
 				</div>
 			</el-form-item>
 			<el-form-item>
-				<el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
+				<el-button type="primary" @click="submitForm('form')">保存</el-button>
 			</el-form-item>
 		</el-form>
 	</div>
@@ -28,16 +22,36 @@ export default {
 	name: 'goods-summary',
 	data() {
 		return {
-			ruleForm: {},
-			rules: {}
+			form: {
+				desc: ''
+			},
+			rules: {},
+			data: ''
 		};
 	},
+	mounted() {
+		this.init();
+	},
 	methods: {
+		init() {
+			this._getData();
+		},
+		_getData() {
+			this.$service.single.getGoodsIntro().then(res => {
+				this.form.desc = res.introduce;
+			});
+		},
+		_updateFn() {
+			this.$service.single.editGoodsIntro({ introduce: this.form.desc }).then(res => {
+				this.form.desc = res.introduce;
+			});
+		},
 		editor() {},
 		submitForm(formName) {
 			this.$refs[formName].validate(valid => {
 				if (valid) {
-					alert('submit!');
+					console.log(this.form);
+					this._updateFn();
 				} else {
 					console.log('error submit!!');
 					return false;

+ 1 - 1
mobile-code/src/admin/goodsManage/price-increase.vue

@@ -60,7 +60,7 @@ export default {
 	},
 	data() {
 		return {
-			radioVal: '0',
+			// radioVal: '0',
 			form: {
 				riseSwitch: '0',
 				riseType: '0',

+ 15 - 9
mobile-code/src/mixins/globalMixins.js

@@ -36,17 +36,19 @@ export default {
 		// 登录
 		if (constant.source == 'business' || constant.source == 'mobile') {
 			if (isLogin()) {
+				// #ifdef H5
 				if (this.init) {
-					// #ifdef H5
 					this.init()
-					// #endif
-					// #ifdef MP-WEIXIN
-					wxLoginFn().then(res => {
-						this.init()
-					})
-					// #endif
 					// console.log('init', this.init)
 				}
+				// #endif
+				// #ifdef MP-WEIXIN
+				wxLoginFn().then(res => {
+					if (this.init) {
+						this.init()
+					}
+				})
+				// #endif
 			} else {
 				// #ifdef H5
 				getCheckLogin().then(res => {
@@ -59,13 +61,17 @@ export default {
 				// #endif
 				// #ifdef MP-WEIXIN
 				wxLoginFn().then(res => {
-					this.init()
+					if (this.init) {
+						this.init()
+					}
 				})
 				// #endif
 			}
 		}
 		if (constant.source == 'official') {
-			this.init()
+			if (this.init) {
+				this.init()
+			}
 		}
 	},
 	mounted() {

+ 1 - 1
mobile-code/src/official/index.vue

@@ -54,7 +54,7 @@
 			status: 1
 		})">立即续费</div>
 		<div v-if="status == 4" class="app-footer" @click="pageTo({
-			url: '/official/pay',
+			url: '/official/apply',
 			status: 2
 		})">立即订购</div>
 	</div>

+ 1 - 1
www/index.html

@@ -6,4 +6,4 @@
 				// window.location.href = '/h5/pcguide.html';
 			}</script><script>document.addEventListener('DOMContentLoaded', function() {
 				document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
-			})</script><link rel=stylesheet href=/static/index.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script>/*BAIDU_STAT*/</script><script src=/static/js/chunk-vendors.3186e5ea.js></script><script src=/static/js/index.22979a8b.js></script></body></html>
+			})</script><link rel=stylesheet href=/static/index.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script>/*BAIDU_STAT*/</script><script src=/static/js/chunk-vendors.b6706ef5.js></script><script src=/static/js/index.a8aedf29.js></script></body></html>

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
www/static/js/chunk-vendors.3186e5ea.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
www/static/js/chunk-vendors.b6706ef5.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
www/static/js/index.22979a8b.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
www/static/js/index.a8aedf29.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
www/static/js/official-apply.d97fd409.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
www/static/js/official-apply.e6e646ea.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
www/static/js/official-callback.8bd47cef.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
www/static/js/official-callback.e58db2d0.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
www/static/js/official-index.592bfdac.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
www/static/js/official-index.70363981.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
www/static/js/official-pay.03f95177.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
www/static/js/official-pay.1b93afdf.js


Некоторые файлы не были показаны из-за большого количества измененных файлов