更新:增加充值商品类型
This commit is contained in:
@@ -25,7 +25,7 @@ module.exports = {
|
|||||||
|
|
||||||
// Various Dev Server settings
|
// Various Dev Server settings
|
||||||
host: 'localhost', // can be overwritten by process.env.HOST
|
host: 'localhost', // can be overwritten by process.env.HOST
|
||||||
port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
port: 8002, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
||||||
autoOpenBrowser: true,
|
autoOpenBrowser: true,
|
||||||
errorOverlay: true,
|
errorOverlay: true,
|
||||||
notifyOnErrors: true,
|
notifyOnErrors: true,
|
||||||
|
|||||||
Binary file not shown.
75
src/views/modules/migration/migrationList.vue
Normal file
75
src/views/modules/migration/migrationList.vue
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form :inline="true">
|
||||||
|
<el-form-item label="登录账号">
|
||||||
|
<el-input v-model="migrationObj.bookName" placeholder="手机号/邮箱" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary">查询</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table :data="tableData" border style="width: 100%">
|
||||||
|
<el-table-column prop="date" label="日期">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="name" label="姓名">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column fixed="right" label="操作" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button @click="handleClick()" type="text" size="small">详情</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex"
|
||||||
|
:page-sizes="[10, 20, 50, 100]" :page-size="pageSize" :total="tableData.length"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper">
|
||||||
|
</el-pagination>
|
||||||
|
<el-dialog title="详细信息" :visible.sync="migrationState">
|
||||||
|
<el-descriptions border>
|
||||||
|
<el-descriptions-item label="用户名">kooriookami</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="手机号">18100000000</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="居住地">苏州市</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="联系地址">江苏省苏州市吴中区吴中大道 1188 号</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
|
||||||
|
<el-button type="primary" @click="migrationState = false">取消</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableData: [{
|
||||||
|
date: '2016-05-02',
|
||||||
|
name: '王小虎'
|
||||||
|
}],
|
||||||
|
migrationObj: {
|
||||||
|
bookName: ''
|
||||||
|
},
|
||||||
|
pageSize: 10,
|
||||||
|
pageIndex: 1,
|
||||||
|
migrationState: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClick() {
|
||||||
|
this.migrationState = true
|
||||||
|
},
|
||||||
|
|
||||||
|
// 每页数
|
||||||
|
sizeChangeHandle(val) {
|
||||||
|
this.pageSize = val;
|
||||||
|
this.pageIndex = 1;
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
// 当前页
|
||||||
|
currentChangeHandle(val) {
|
||||||
|
this.pageIndex = val;
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -42,6 +42,12 @@
|
|||||||
align="center"
|
align="center"
|
||||||
label="充值 支付 赠送优惠券.....">
|
label="充值 支付 赠送优惠券.....">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="productName"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
label="商品名称">
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="changeAmount"
|
prop="changeAmount"
|
||||||
header-align="center"
|
header-align="center"
|
||||||
|
|||||||
@@ -27,7 +27,10 @@
|
|||||||
>新增</el-button
|
>新增</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
<el-radio-group v-model="radio" style="margin-bottom: 20px;" @change="selectMethod">
|
||||||
|
<el-radio label="IOS">IOS商品</el-radio>
|
||||||
|
<el-radio label="Google">Google商品</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
<el-table
|
<el-table
|
||||||
height="70vh"
|
height="70vh"
|
||||||
:data="dataList"
|
:data="dataList"
|
||||||
@@ -139,6 +142,7 @@ import AddOrUpdate from "./views/add.vue";
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
radio: 'Google',
|
||||||
dataForm: {
|
dataForm: {
|
||||||
key: "",
|
key: "",
|
||||||
qudao: "Android"
|
qudao: "Android"
|
||||||
@@ -202,6 +206,11 @@ export default {
|
|||||||
// this.bookIds = e.bookIds
|
// this.bookIds = e.bookIds
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
|
selectMethod() {
|
||||||
|
console.log(this.radio);
|
||||||
|
this.getDataList()
|
||||||
|
|
||||||
|
},
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
getDataList() {
|
getDataList() {
|
||||||
this.dataListLoading = true;
|
this.dataListLoading = true;
|
||||||
@@ -215,8 +224,8 @@ export default {
|
|||||||
page: this.pageIndex,
|
page: this.pageIndex,
|
||||||
limit: this.pageSize,
|
limit: this.pageSize,
|
||||||
type: "point",
|
type: "point",
|
||||||
|
//qudao: "Google"
|
||||||
qudao: this.dataForm.qudao
|
qudao: this.radio
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
//默认 无 说明:请求头
|
//默认 无 说明:请求头
|
||||||
|
|||||||
@@ -37,6 +37,10 @@
|
|||||||
<el-radio v-model="dataForm.effective" :label="0">长期有效</el-radio>
|
<el-radio v-model="dataForm.effective" :label="0">长期有效</el-radio>
|
||||||
<el-radio v-model="dataForm.effective" :label="1">短期有效</el-radio>
|
<el-radio v-model="dataForm.effective" :label="1">短期有效</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="商品类型">
|
||||||
|
<el-radio v-model="dataForm.qudao" label="IOS">IOS商品</el-radio>
|
||||||
|
<el-radio v-model="dataForm.qudao" label="Google">Google商品</el-radio>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="开始时间"
|
label="开始时间"
|
||||||
@@ -113,7 +117,7 @@ export default {
|
|||||||
realMoney: 0, // 优惠金额
|
realMoney: 0, // 优惠金额
|
||||||
effective: 0, // 优惠金额
|
effective: 0, // 优惠金额
|
||||||
type: "point", // 充值类型
|
type: "point", // 充值类型
|
||||||
qudao: "Android", //
|
qudao: "Google", // Google Android
|
||||||
|
|
||||||
description: "", // 充值描述
|
description: "", // 充值描述
|
||||||
startTime: "", // 充值描述
|
startTime: "", // 充值描述
|
||||||
@@ -175,7 +179,7 @@ export default {
|
|||||||
// 获取光标所在位置
|
// 获取光标所在位置
|
||||||
let length = quill.getSelection().index;
|
let length = quill.getSelection().index;
|
||||||
// 插入图片,res为服务器返回的图片链接地址
|
// 插入图片,res为服务器返回的图片链接地址
|
||||||
quill.insertEmbed(length, "image", res.url);
|
quill.insertEmbed(length, "image", res.url);
|
||||||
// 调整光标到最后
|
// 调整光标到最后
|
||||||
quill.setSelection(length + 1);
|
quill.setSelection(length + 1);
|
||||||
} else {
|
} else {
|
||||||
@@ -202,7 +206,7 @@ export default {
|
|||||||
realMoney: 0, // 优惠金额
|
realMoney: 0, // 优惠金额
|
||||||
effective: 0, // 优惠金额
|
effective: 0, // 优惠金额
|
||||||
type: "point", // 充值类型
|
type: "point", // 充值类型
|
||||||
qudao: "Android", //
|
qudao: "Google", // Google Android
|
||||||
|
|
||||||
description: "", // 充值描述
|
description: "", // 充值描述
|
||||||
startTime: "", //
|
startTime: "", //
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
node-key="menuId"
|
node-key="menuId"
|
||||||
ref="menuListTree"
|
ref="menuListTree"
|
||||||
@current-change="menuListTreeCurrentChangeHandle"
|
@current-change="menuListTreeCurrentChangeHandle"
|
||||||
:default-expand-all="true"
|
:default-expand-all="false"
|
||||||
:highlight-current="true"
|
:highlight-current="true"
|
||||||
:expand-on-click-node="false">
|
:expand-on-click-node="false">
|
||||||
</el-tree>
|
</el-tree>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
@close="handlereset">
|
@close="handlereset">
|
||||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
||||||
label-width="120px">
|
label-width="120px">
|
||||||
<el-form-item label="电话" prop="tel">
|
<el-form-item label="电话" prop="tel" v-if="dataForm.id">
|
||||||
<el-input v-model="dataForm.tel" placeholder="电话" type="number"></el-input>
|
<el-input v-model="dataForm.tel" placeholder="电话" type="number"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="邮箱" prop="email">
|
<el-form-item label="邮箱" prop="email">
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="handlereset">取消</el-button>
|
<el-button @click="handlereset">取消</el-button>
|
||||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
<el-button type="primary" @click="dataFormSubmit('dataRule')">确定</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@@ -163,6 +163,11 @@
|
|||||||
message: '密码不能为空',
|
message: '密码不能为空',
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}],
|
}],
|
||||||
|
email: [{
|
||||||
|
required: true,
|
||||||
|
message: '邮箱不能为空',
|
||||||
|
trigger: 'blur'
|
||||||
|
},{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }]
|
||||||
// tel: [{
|
// tel: [{
|
||||||
// validator: function(rule, value, callback) {
|
// validator: function(rule, value, callback) {
|
||||||
// if (/^1[34578]\d{9}$/.test(value) == false) {
|
// if (/^1[34578]\d{9}$/.test(value) == false) {
|
||||||
@@ -237,7 +242,74 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit(formName) {
|
||||||
|
this.$refs.dataForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
let myData = {}
|
||||||
|
if (!this.dataForm.id) {
|
||||||
|
myData = {
|
||||||
|
// 'name': this.dataForm.name,
|
||||||
|
// 'tel': this.dataForm.tel,
|
||||||
|
'email': this.dataForm.email,
|
||||||
|
'password': this.dataForm.password,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
myData = {
|
||||||
|
'id': this.dataForm.id,
|
||||||
|
'name': this.dataForm.name,
|
||||||
|
'email': this.dataForm.email,
|
||||||
|
'age': this.dataForm.age,
|
||||||
|
'sex': this.dataForm.sex,
|
||||||
|
'avatar': this.dataForm.avatar,
|
||||||
|
'nickname': this.dataForm.nickname,
|
||||||
|
'tel': this.dataForm.tel,
|
||||||
|
'pointPower': this.dataForm.pointPower,
|
||||||
|
'tgdzPower': this.dataForm.tgdzPower,
|
||||||
|
'wylqPower': this.dataForm.wylqPower,
|
||||||
|
'prescriptAPower': this.dataForm.prescriptAPower,
|
||||||
|
'prescriptBPower': this.dataForm.prescriptBPower,
|
||||||
|
// 'password': this.dataForm.password,
|
||||||
|
// 'vip': this.dataForm.vip,
|
||||||
|
// 'vipValidtime': this.dataForm.vipValidtime,
|
||||||
|
// 'peanutCoin': this.dataForm.peanutCoin,
|
||||||
|
// 'readTime': this.dataForm.readTime,
|
||||||
|
// 'lastLoginTime': this.dataForm.lastLoginTime,
|
||||||
|
// 'createTime': this.dataForm.createTime,
|
||||||
|
// 'updateTime': this.dataForm.updateTime,
|
||||||
|
// 'delFlag': this.dataForm.delFlag
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('myData', myData)
|
||||||
|
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl(`/book/user/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||||
|
method: 'post',
|
||||||
|
data: this.$http.adornData(myData)
|
||||||
|
}).then(({
|
||||||
|
data
|
||||||
|
}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('refreshDataList')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error(data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.log('error submit!!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// if (!this.dataForm.email && !this.dataForm.tel) {
|
// if (!this.dataForm.email && !this.dataForm.tel) {
|
||||||
/// this.$message.error("手机号或邮箱不为空!")
|
/// this.$message.error("手机号或邮箱不为空!")
|
||||||
// return
|
// return
|
||||||
@@ -257,62 +329,7 @@
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
let myData = {}
|
|
||||||
if (!this.dataForm.id) {
|
|
||||||
myData = {
|
|
||||||
'name': this.dataForm.name,
|
|
||||||
'tel': this.dataForm.tel,
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
myData = {
|
|
||||||
'id': this.dataForm.id,
|
|
||||||
'name': this.dataForm.name,
|
|
||||||
'email': this.dataForm.email,
|
|
||||||
'age': this.dataForm.age,
|
|
||||||
'sex': this.dataForm.sex,
|
|
||||||
'avatar': this.dataForm.avatar,
|
|
||||||
'nickname': this.dataForm.nickname,
|
|
||||||
'tel': this.dataForm.tel,
|
|
||||||
'pointPower': this.dataForm.pointPower,
|
|
||||||
'tgdzPower': this.dataForm.tgdzPower,
|
|
||||||
'wylqPower': this.dataForm.wylqPower,
|
|
||||||
'prescriptAPower': this.dataForm.prescriptAPower,
|
|
||||||
'prescriptBPower': this.dataForm.prescriptBPower,
|
|
||||||
// 'password': this.dataForm.password,
|
|
||||||
// 'vip': this.dataForm.vip,
|
|
||||||
// 'vipValidtime': this.dataForm.vipValidtime,
|
|
||||||
// 'peanutCoin': this.dataForm.peanutCoin,
|
|
||||||
// 'readTime': this.dataForm.readTime,
|
|
||||||
// 'lastLoginTime': this.dataForm.lastLoginTime,
|
|
||||||
// 'createTime': this.dataForm.createTime,
|
|
||||||
// 'updateTime': this.dataForm.updateTime,
|
|
||||||
// 'delFlag': this.dataForm.delFlag
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('myData', myData)
|
|
||||||
|
|
||||||
this.$http({
|
|
||||||
url: this.$http.adornUrl(`/book/user/${!this.dataForm.id ? 'save' : 'update'}`),
|
|
||||||
method: 'post',
|
|
||||||
data: this.$http.adornData(myData)
|
|
||||||
}).then(({
|
|
||||||
data
|
|
||||||
}) => {
|
|
||||||
if (data && data.code === 0) {
|
|
||||||
this.$message({
|
|
||||||
message: '操作成功',
|
|
||||||
type: 'success',
|
|
||||||
duration: 1500,
|
|
||||||
onClose: () => {
|
|
||||||
this.visible = false
|
|
||||||
this.$emit('refreshDataList')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.$message.error(data.msg)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user