diff --git a/config/index.js b/config/index.js index cd3d111..712400f 100644 --- a/config/index.js +++ b/config/index.js @@ -25,7 +25,7 @@ module.exports = { // Various Dev Server settings 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, errorOverlay: true, notifyOnErrors: true, diff --git a/peanut_book_vue.rar b/peanut_book_vue.rar deleted file mode 100644 index ebe63f4..0000000 Binary files a/peanut_book_vue.rar and /dev/null differ diff --git a/src/views/modules/migration/migrationList.vue b/src/views/modules/migration/migrationList.vue new file mode 100644 index 0000000..b085f9a --- /dev/null +++ b/src/views/modules/migration/migrationList.vue @@ -0,0 +1,75 @@ + + + \ No newline at end of file diff --git a/src/views/modules/order/transactiondetails.vue b/src/views/modules/order/transactiondetails.vue index cc36d29..41dd975 100644 --- a/src/views/modules/order/transactiondetails.vue +++ b/src/views/modules/order/transactiondetails.vue @@ -42,6 +42,12 @@ align="center" label="充值 支付 赠送优惠券....."> + + 新增 - + + IOS商品 + Google商品 + 长期有效 短期有效 + + IOS商品 + Google商品 + diff --git a/src/views/modules/user/user-add-or-update.vue b/src/views/modules/user/user-add-or-update.vue index a26ff61..c9446b7 100644 --- a/src/views/modules/user/user-add-or-update.vue +++ b/src/views/modules/user/user-add-or-update.vue @@ -3,7 +3,7 @@ @close="handlereset"> - + @@ -97,7 +97,7 @@ 取消 - 确定 + 确定 @@ -163,6 +163,11 @@ message: '密码不能为空', trigger: 'blur' }], + email: [{ + required: true, + message: '邮箱不能为空', + trigger: 'blur' + },{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }] // tel: [{ // validator: function(rule, value, callback) { // 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) { /// this.$message.error("手机号或邮箱不为空!") // 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) - } - }) + },