Commit b8b99f63 authored by huangyuanyuan's avatar huangyuanyuan

添加兑换码

parent 215acca5
...@@ -483,6 +483,7 @@ export default { ...@@ -483,6 +483,7 @@ export default {
if (result && result.city && result.bounds) { if (result && result.city && result.bounds) {
var citybounds = result.bounds; var citybounds = result.bounds;
_this.cityText = result.city; _this.cityText = result.city;
console.log(" _this.cityText", _this.cityText)
// document.getElementById('info').innerHTML = '您当前所在城市:'+cityinfo; // document.getElementById('info').innerHTML = '您当前所在城市:'+cityinfo;
// //地图显示当前城市 // //地图显示当前城市
// map.setBounds(citybounds); // map.setBounds(citybounds);
......
...@@ -283,6 +283,11 @@ ...@@ -283,6 +283,11 @@
<div> <div>
<el-input v-model="Remarks" placeholder="你可以在此处输入需要备注的信息" rows="3" type='textarea' :autosize='{minRows:3,maxRows:30}'></el-input> <el-input v-model="Remarks" placeholder="你可以在此处输入需要备注的信息" rows="3" type='textarea' :autosize='{minRows:3,maxRows:30}'></el-input>
</div> </div>
<p>兑换码</p>
<div>
<el-input size="small" v-model="ActivateCode" placeholder="请输入兑换码" style="width:200px"></el-input>
<el-button @click="GetCode" size="small" style="margin-left:10px">兑换</el-button>
</div>
</el-col> </el-col>
<el-col class="_trip_xiangqing _coupon_box"> <el-col class="_trip_xiangqing _coupon_box">
<p style="width:100%">优惠券</p> <p style="width:100%">优惠券</p>
...@@ -416,6 +421,7 @@ export default { ...@@ -416,6 +421,7 @@ export default {
data () { data () {
let that=this let that=this
return { return {
ActivateCode:'',
value: "1", value: "1",
input10: "", input10: "",
radio: "1", radio: "1",
...@@ -552,6 +558,17 @@ export default { ...@@ -552,6 +558,17 @@ export default {
},err => {}); },err => {});
}, },
methods: { methods: {
GetCode(){
this.apiJavaPost('/api/b2b/user/updateUseCouponBycode',{ActivateCode:this.ActivateCode},res=>{
if(res.data.resultCode==1){
this.Success("兑换码激活成功!");
this.getUserCanUseCouponList();
}else{
this.Error("该兑换码无效!");
}
},null)
},
goShenqing: function () { goShenqing: function () {
let dom = document.querySelector("#blankLink") let dom = document.querySelector("#blankLink")
dom.href=`http://${window.location.host}/#/PsSystem/${1}` dom.href=`http://${window.location.host}/#/PsSystem/${1}`
...@@ -889,7 +906,6 @@ export default { ...@@ -889,7 +906,6 @@ export default {
CouponsUseScope: 2, CouponsUseScope: 2,
} }
this.apiJavaPost('/api/b2b/user/getUserCanUseCouponList',msg,res=>{ this.apiJavaPost('/api/b2b/user/getUserCanUseCouponList',msg,res=>{
console.log(res);
if(res.data.resultCode==1){ if(res.data.resultCode==1){
let data = res.data.data; let data = res.data.data;
data.forEach(x=>{ data.forEach(x=>{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment