|
@@ -240,6 +240,54 @@
|
|
|
margin: 0;
|
|
margin: 0;
|
|
|
line-height: 24px;
|
|
line-height: 24px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ .el-dialog {
|
|
|
|
|
+ width: 335px;
|
|
|
|
|
+ border-radius: 20px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .el-dialog__header {
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .el-dialog__title {
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ color: #222222;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .prize_form .el-form-item {
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .prize_form .el-form-item__label {
|
|
|
|
|
+ line-height: 20px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .prize_form .el-input {
|
|
|
|
|
+ border: 1px solid #CCCCCC;
|
|
|
|
|
+ border-radius: 5px;
|
|
|
|
|
+ width: 295px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .prize_form .el-input__inner {
|
|
|
|
|
+ text-align: left;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dialog-footer {
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dialog-footer button {
|
|
|
|
|
+ width: 119px;
|
|
|
|
|
+ height: 46px;
|
|
|
|
|
+ background: #FFB34B;
|
|
|
|
|
+ border-radius: 20px;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ color: #FFFFFF;
|
|
|
|
|
+ border: none;
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|
|
|
|
|
|
|
|
<body>
|
|
<body>
|
|
@@ -312,6 +360,19 @@
|
|
|
<div class="save_btn" @click="showAskDialog = false">长按图片保存</div>
|
|
<div class="save_btn" @click="showAskDialog = false">长按图片保存</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <el-dialog title="填写推荐人信息" :visible.sync="showDialog">
|
|
|
|
|
+ <el-form :model="lightData" class="prize_form" label-position="top">
|
|
|
|
|
+ <el-form-item label="推荐人">
|
|
|
|
|
+ <el-input v-model="lightData.referrer"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="门店">
|
|
|
|
|
+ <el-input v-model="lightData.store"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button type="warning" :loading="loading" @click="handleSaveRefer">确 定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</body>
|
|
</body>
|
|
|
<script>
|
|
<script>
|
|
@@ -342,7 +403,11 @@
|
|
|
},
|
|
},
|
|
|
raffle1BizId: null,
|
|
raffle1BizId: null,
|
|
|
raffle2BizId: null,
|
|
raffle2BizId: null,
|
|
|
|
|
+ referrer: '', // 推荐人
|
|
|
|
|
+ store: '', // 门店
|
|
|
},
|
|
},
|
|
|
|
|
+ showDialog: false, // 填写推荐人信息弹窗
|
|
|
|
|
+ loading: false, // 提交按钮loading
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created () {
|
|
created () {
|
|
@@ -438,7 +503,10 @@
|
|
|
}).then(result => {
|
|
}).then(result => {
|
|
|
let { data, code, msg } = result
|
|
let { data, code, msg } = result
|
|
|
if (code === 1) {
|
|
if (code === 1) {
|
|
|
- this.lightData = data
|
|
|
|
|
|
|
+ this.lightData = data
|
|
|
|
|
+ if (!data.referrer || !data.store) {
|
|
|
|
|
+ this.showDialog = true
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
message: msg,
|
|
message: msg,
|
|
@@ -458,6 +526,48 @@
|
|
|
}
|
|
}
|
|
|
window.location.replace(url)
|
|
window.location.replace(url)
|
|
|
},
|
|
},
|
|
|
|
|
+ handleSaveRefer () {
|
|
|
|
|
+ if (!this.lightData.referrer) {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: '请填写推荐人',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!this.lightData.store) {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: '请填写门店',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.loading = true
|
|
|
|
|
+ let openId = this.getQueryParam('openId') || localStorage.getItem('openId')
|
|
|
|
|
+ fetch(this.httpUrl + `/scrm/v1/wxcp-lighten-owner/p/updateReferrer?openId=${openId}&bId=${this.bId}`, {
|
|
|
|
|
+ method: 'post',
|
|
|
|
|
+ body: JSON.stringify({
|
|
|
|
|
+ referrer: this.lightData.referrer, // 推荐人
|
|
|
|
|
+ store: this.lightData.store, // 门店
|
|
|
|
|
+ }),
|
|
|
|
|
+ headers: {
|
|
|
|
|
+ 'Content-Type': 'application/json'
|
|
|
|
|
+ }
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ return res.json()
|
|
|
|
|
+ }).then(result => {
|
|
|
|
|
+ let { data, code, msg } = result
|
|
|
|
|
+ if (code === 1) {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: '提交成功!',
|
|
|
|
|
+ type: 'success'
|
|
|
|
|
+ })
|
|
|
|
|
+ this.showDialog = false
|
|
|
|
|
+ this.lightenShare()
|
|
|
|
|
+ }
|
|
|
|
|
+ }).finally(() => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
// 截取url中的数据
|
|
// 截取url中的数据
|
|
|
getQueryParam (paramName) {
|
|
getQueryParam (paramName) {
|
|
|
// 获取当前URL的查询字符串部分
|
|
// 获取当前URL的查询字符串部分
|