Commit 46ea4c0b authored by leiqingsong's avatar leiqingsong

更换了一次请求url,变成正式的

parent a58777c4
......@@ -5,5 +5,5 @@ NODE_ENV = development
VUE_APP_TITLE = 亿百分-dev
VUE_APP_OY_API = /api/
VUE_APP_API_A = http://139.155.48.151:8085
VUE_APP_API_B = http://139.155.48.151:8084
VUE_APP_API_A = http://175.31.197.83:8085
VUE_APP_API_B = http://175.31.197.83:8084
......@@ -5,5 +5,5 @@ NODE_ENV = development
VUE_APP_TITLE = 亿百分-dev
VUE_APP_OY_API = http://111.26.165.55:8010/crminterface.ashx
VUE_APP_API_A = http://139.155.48.151:8085
VUE_APP_API_B = http://139.155.48.151:8084
VUE_APP_API_A = http://175.31.197.83:8085
VUE_APP_API_B = http://175.31.197.83:8084
......@@ -5,5 +5,5 @@ NODE_ENV = production
VUE_APP_TITLE = 亿百分-prod
VUE_APP_OY_API = http://111.26.165.55:8010/crminterface.ashx
VUE_APP_API_A = http://139.155.48.151:8085
VUE_APP_API_B = http://139.155.48.151:8084
VUE_APP_API_A = http://175.31.197.83:8085
VUE_APP_API_B = http://175.31.197.83:8084
......@@ -135,8 +135,8 @@
const showQRInfo = () => {
$.ajax({
type: 'GET',
url: `http://139.155.48.151:8084/admin/auth/stall/getByOyStallCode?oyStallCode=${oyStallCode}`,
// url: `http://139.155.48.151:8084/admin/auth/stall/getByOyStallCode?oyStallCode=1`,
url: `http://175.31.197.83:8084/admin/auth/stall/getByOyStallCode?oyStallCode=${oyStallCode}`,
// url: `http://175.31.197.83:8084/admin/auth/stall/getByOyStallCode?oyStallCode=1`,
success: function (data) {
console.log(data,'data')
var str = "";
......
......@@ -50,7 +50,7 @@
// let pageUri = `${nowUrl}&detailid=${voucherId}&actionid=${activeId}&unionid=${unionId}`;
let pageUri = `${nowUrl}`;
pageUri = pageUri.split('&').slice(0, 5).join('&')
let pageUrl = `http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
let pageUrl = `http://175.31.197.83:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
// document.getElementById('uri').innerHTML = 'Uri=' + String(pageUri)
......
......@@ -217,7 +217,7 @@
// let pageUri = `${nowUrl}&detailid=${voucherId}&actionid=${activeId}&unionid=${unionId}`;
let pageUri = `${nowUrl}`;
pageUri = pageUri.split('&').slice(0, 5).join('&')
let pageUrl = `http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
let pageUrl = `http://175.31.197.83:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
// document.getElementById('uri').innerHTML = 'Uri=' + String(pageUri)
......
......@@ -55,7 +55,7 @@
// let pageUri = `${nowUrl}&detailid=${voucherId}&actionid=${activeId}&unionid=${unionId}`;
let storecode = "181"
let pageUri = `pages/user/register/register?storeCode=${storecode}`;
let pageUrl = `http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
let pageUrl = `http://175.31.197.83:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
$.ajax({
type: "POST",
......
<template>
<div id="app">
<router-view/>
<router-view />
</div>
</template>
<script>
import { getXToken } from './utils/aCommon'
getXToken()
import { getXToken } from "./utils/aCommon";
getXToken();
export default {
name: 'App'
}
name: "App",
};
</script>
<style lang="scss">
/*@import '~@/assets/style/public.scss';*/
/*@import '~@/assets/style/public.scss';*/
</style>
<template>
<div id="loading" v-if="show">
<van-loading type="spinner" size="80px"></van-loading>
</div>
</template>
<script>
export default {
name: "loading",
// props: ["show"],
data() {
return {
show: false
};
}
};
</script>
<style lang="scss">
#loading {
position: fixed;
top: 50%;
left: 45%;
z-index: 100;
}
</style>
......@@ -5,7 +5,7 @@ import router from './router'
import store from './store'
import './lib/rem';
import Vant from 'vant';
import { Toast } from 'vant';
import { Toast, Loading } from 'vant';
import 'vant/lib/index.css';
import vConsole from 'vconsole'
......@@ -13,6 +13,8 @@ Vue.prototype.$vConsole= new vConsole()
Vue.config.productionTip = false
Vue.use(Vant)
Vue.use(Toast)
Vue.use(Loading);
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
......
......@@ -12,7 +12,7 @@ let INFO = {
// agentId: '1000015',
corpId: 'ww4df265003b43fa0d',
agentId: '1000033',
// url: 'http://139.155.48.151:8085',
// url: 'http://175.31.197.83:8085',
url: envConfig.appBaseUrlA,
}
......
......@@ -2,7 +2,8 @@ import axios from 'axios'
import md5 from "js-md5"
import qs from 'qs'
let BASE_API = "http://139.155.48.151:8084"
// let BASE_API = "http://175.31.197.83:8084"
let BASE_API = "http://175.31.197.83:8084"
const zlog = console.log.bind(console)
// ztest
......
......@@ -2,7 +2,7 @@ import axios from 'axios'
import envConfig from '@/config/env-config'
export function wxRequest(inUrl, data = {}, header = {}, method = 'post') {
// let URL = `http://172.16.0.111:8081${url}`
// let URL = `http://139.155.48.151:8081${url}`
// let URL = `http://175.31.197.83:8081${url}`
// Z-BasicInfo
let INFO = {
......@@ -10,7 +10,7 @@ export function wxRequest(inUrl, data = {}, header = {}, method = 'post') {
// agentId: '1000015',
corpId: 'ww4df265003b43fa0d',
agentId: '1000033',
// url: 'http://139.155.48.151:8085' + inUrl,
// url: 'http://175.31.197.83:8085' + inUrl,
url: envConfig.appBaseUrlA + inUrl,
}
......
......@@ -77,6 +77,7 @@
</div>
</template>
<div
v-if="show_share"
class="btn-share"
:style="active_type === 'coupon'? 'bottom: 0': ''"
@click="handleShare"
......@@ -123,6 +124,7 @@ export default {
components: { wxAuth },
data() {
return {
show_share: true,
goOn: false,
env: "",
userIcon: "/img/photo.png",
......@@ -196,12 +198,15 @@ export default {
? decodeURIComponent(this.$route.query.headurl)
: "";
this.env = window.navigator.userAgent.toLowerCase();
// 微信端才做验证
console.log("env", this.env);
if (
this.env.match(/MicroMessenger/i) !== "micromessenger" ||
this.env.match(/MicroMessenger/i) == "micromessenger" &&
this.env.match(/wxwork/i) == "wxwork"
) {
this.show_share = true;
} else if (this.env.match(/MicroMessenger/i) == "micromessenger") {
this.show_share = false;
console.log("验证");
// 1.获取code
if (this.$route.query.unionid === undefined) {
this.getUnionid();
......@@ -230,6 +235,7 @@ export default {
// on cancel
return false;
});
return false;
}
this.isMember = true;
this.userBaseInfo.vipId = res.data.vipId;
......@@ -273,6 +279,24 @@ export default {
this.$toast("请在微信端领取!");
return false;
}
if (!this.isMember) {
console.log("非会员");
Dialog.confirm({
title: "提示",
message:
"当前活动为会员才可参加,尚未找到您的会员信息,是否前往注册?"
})
.then(() => {
// on confirm
let url = "http://oysales.oywanhao.com/register";
window.location.href = url;
})
.catch(() => {
// on cancel
return false;
});
return false;
}
// 会员领取
let params = {
couponId: this.awardGood.activityPrize
......@@ -341,13 +365,29 @@ export default {
},
Start_Game() {
// 在微信端打开 会有身份验证 路径中会带上 unionid
if (
this.env.match(/MicroMessenger/i) !== "micromessenger" ||
this.env.match(/wxwork/i) == "wxwork"
) {
this.$toast("请在微信端参与活动!");
if (this.$route.query.unionid === undefined) {
this.$toast("请在微信端参与抽奖活动");
return false;
}
if (!this.isMember) {
console.log("非会员");
Dialog.confirm({
title: "提示",
message:
"当前活动为会员才可参加,尚未找到您的会员信息,是否前往注册?"
})
.then(() => {
// on confirm
let url = "http://oysales.oywanhao.com/register";
window.location.href = url;
})
.catch(() => {
// on cancel
return false;
});
return false;
}
// console.log('111');
if (this.game_end) {
this.$toast("活动已结束");
return false;
......@@ -428,6 +468,7 @@ export default {
);
} else if (env.match(/micromessenger/i) == "micromessenger") {
console.log("微信客户端");
this.show_share = false;
let id = this.getUrlParams("id");
let type = this.getUrlParams("active_type");
let wx_url = `http://oysales.oywanhao.com:8087/activeDetail?id=${id}&active_type=${type}`;
......
......@@ -159,6 +159,7 @@ import * as API_Active from "@/api/active";
export default {
data() {
return {
create_times: 1,
minStartDate: null,
minEndDate: null,
checked_coupon: {},
......@@ -191,7 +192,9 @@ export default {
totalLimit_show: false
};
},
created() {},
created() {
},
methods: {
openStartTime() {
this.startShow = true;
......@@ -242,7 +245,7 @@ export default {
file.forEach(e => {
let params = new FormData();
params.append("file", e.file);
let url = "http://139.155.48.151:8084/admin/auth/util/saveImg";
let url = "http://175.31.197.83:8084/admin/auth/util/saveImg";
axios.post(url, params).then(res => {
let img_url = JSON.parse(JSON.stringify(res.data.data.imgPath));
this.fileList.push(img_url);
......@@ -251,14 +254,14 @@ export default {
} else {
let params = new FormData();
params.append("file", file.file);
let url = "http://139.155.48.151:8084/admin/auth/util/saveImg";
let url = "http://175.31.197.83:8084/admin/auth/util/saveImg";
axios.post(url, params).then(res => {
this.fileList.push(JSON.parse(JSON.stringify(res.data.data.imgPath)));
});
}
},
getCoupons() {
let id = sessionStorage.getItem("oyStallCode") || 1;
let id = sessionStorage.getItem("oyStallCode");
API_Active.getAllCouponsByOyStallCode(id).then(res => {
if (res.data.length === 0 || !res.data.length) {
this.$toast("您所在店铺没有优惠券,请先去创建");
......@@ -298,12 +301,17 @@ export default {
async getImgUrl(file) {
let params = new FormData();
params.append("file", file);
let url = "http://139.155.48.151:8084/admin/auth/util/saveImg";
let url = "http://175.31.197.83:8084/admin/auth/util/saveImg";
const img = await axios.post(url, params);
let urls = img.data.data.imgPath;
return urls;
},
handleCreate() {
if (--this.create_times < 0) {
this.$toast("已经过提交申请了,请等待处理!");
return false;
}
if (
this.title === "" ||
this.startTime1 == "" ||
......@@ -347,6 +355,7 @@ export default {
};
console.log("params", params);
API_Active.createActive(params).then(res => {
this.create_times = 1;
if (res.result === "fail") {
this.$toast(res.errorMsg);
return false;
......@@ -408,7 +417,7 @@ export default {
let template_id = this.$route.query.templateId;
this.getTemplateDate(template_id);
}
this.getCoupons();
// this.getCoupons();
}
};
</script>
......
......@@ -338,6 +338,7 @@ import { Toast } from "vant";
export default {
data() {
return {
create_times: 1,
remain_probability: 100,
can_create: true,
minStartDate: null,
......@@ -427,8 +428,10 @@ export default {
// 限制 vant stepper 输入长度
handleProbalitity(val) {
if (val.length > 2) {
document.getElementsByClassName('pro-input')[0].getElementsByTagName('input')[0].maxLength = 3;
this.$toast('最多输入3位,且最大值为100');
document
.getElementsByClassName("pro-input")[0]
.getElementsByTagName("input")[0].maxLength = 3;
this.$toast("最多输入3位,且最大值为100");
}
},
openStartTime() {
......@@ -528,15 +531,22 @@ export default {
this.show = false;
},
getCoupons() {
let id = sessionStorage.getItem("oyStallCode") || 1;
let id = sessionStorage.getItem("oyStallCode");
API_Active.getAllCouponsByOyStallCode(id).then(res => {
let temp = [];
res.data.forEach(i => {
let item = i;
item.name = i.name + ' ID:' + i.id;
temp.push(item);
})
this.coupons = temp;
if (res.data.length === 0 || !res.data.length) {
this.$toast("您所在店铺没有优惠券,请先去创建");
setTimeout(() => {
this.$router.push("/");
}, 500);
} else {
let temp = [];
res.data.forEach(i => {
let item = i;
item.name = i.name + " ID:" + i.id;
temp.push(item);
});
this.coupons = temp;
}
});
},
afterImgRead(file) {
......@@ -545,7 +555,7 @@ export default {
file.forEach(e => {
let params = new FormData();
params.append("file", e.file);
let url = "http://139.155.48.151:8084/admin/auth/util/saveImg";
let url = "http://175.31.197.83:8084/admin/auth/util/saveImg";
axios.post(url, params).then(res => {
let img_url = JSON.parse(JSON.stringify(res.data.data.imgPath));
// imgs.push(img_url);
......@@ -555,7 +565,7 @@ export default {
} else {
let params = new FormData();
params.append("file", file.file);
let url = "http://139.155.48.151:8084/admin/auth/util/saveImg";
let url = "http://175.31.197.83:8084/admin/auth/util/saveImg";
axios.post(url, params).then(res => {
this.fileList.push(JSON.parse(JSON.stringify(res.data.data.imgPath)));
});
......@@ -584,7 +594,7 @@ export default {
async getImgUrl(file) {
let params = new FormData();
params.append("file", file);
let url = "http://139.155.48.151:8084/admin/auth/util/saveImg";
let url = "http://175.31.197.83:8084/admin/auth/util/saveImg";
const img = await axios.post(url, params);
let urls = img.data.data.imgPath;
return urls;
......@@ -593,7 +603,8 @@ export default {
// console.log(val);
},
handleCreate() {
if (!this.can_create) {
if (--this.create_times < 0) {
this.$toast("已经过提交申请了,请等待处理!");
return false;
}
if (
......@@ -633,7 +644,7 @@ export default {
validate = false;
break;
}
if (this.prizeList[i].total_limit < this.prizeList[i].preLimit) {
this.$toast("总发放数量应大于等于每日发放数量");
validate = false;
......@@ -705,12 +716,12 @@ export default {
activityPrizes: params_prizeList
};
API_Active.createActive(params).then(res => {
this.create_times = 1;
if (res.result === "fail") {
this.$toast(res.errorMsg);
return false;
}
Toast.success("创建成功");
this.can_create = true;
setTimeout(() => {
this.$router.push({
name: "createSuccess",
......
......@@ -77,7 +77,7 @@ export default {
return new Promise((resolve, reject) => {
axios({
url:
"http://139.155.48.151:8085/workWx/auth/contact/listExternalContacts?userId=" + this.userId,
"http://175.31.197.83:8085/workWx/auth/contact/listExternalContacts?userId=" + this.userId,
method: "get",
headers: headerData
})
......@@ -111,7 +111,7 @@ export default {
}
return new Promise((resolve, reject) => {
axios({
url: "http://139.155.48.151:8085/workWx/auth/contact/getCustomerInfoByOyStallCode?oyStallCode=" + this.oyStallCode,
url: "http://175.31.197.83:8085/workWx/auth/contact/getCustomerInfoByOyStallCode?oyStallCode=" + this.oyStallCode,
method: "get",
headers: headerData
})
......@@ -144,7 +144,7 @@ export default {
return new Promise((resolve, reject) => {
axios({
url:
"http://139.155.48.151:8085/workWx/auth/contact/getUserBehaviorData",
"http://175.31.197.83:8085/workWx/auth/contact/getUserBehaviorData",
method: "post",
headers: {
"Content-Type": "application/json",
......
......@@ -113,7 +113,7 @@ export default {
ImageExtend: {
name: "file", // 图片参数名
// size: 3,
action: "http://139.155.48.151:8084/admin/auth/util/saveImg",
action: "http://175.31.197.83:8084/admin/auth/util/saveImg",
response: res => {
console.log(res.data.imgPath,'富文本');
......@@ -202,7 +202,7 @@ export default {
let params = new FormData()
params.append("file", file)
let url = "http://139.155.48.151:8084/admin/auth/util/saveImg"
let url = "http://175.31.197.83:8084/admin/auth/util/saveImg"
const img = await axios.post(url, params)
let urls = img.data.data.imgPath;
console.log(urls, "urls");
......
......@@ -13,23 +13,23 @@
readonly
style="font-size:14px;"
@touchstart.native.stop="codeShow = true"
/>
/>
<van-number-keyboard
v-model="addForm.cxcode"
:show="codeShow"
@blur="codeShow = false"
/>
</div>
</template>
</div>
</template>
</van-cell>
<van-cell title="商户类型" style="font-size:14px;">
<van-cell title="商户类型" style="font-size:14px;">
<template slot="default">
<div class="npbr">
<van-field
class="right"
v-model="cxsh"
placeholder="选择商户类型"
readonly="readonly"
readonly="readonly"
@click="cxshShow = true"
/>
<van-popup v-model="cxshShow" position="bottom" :overlay="true">
......@@ -55,7 +55,7 @@
/>
</template>
</van-cell>
<van-cell title="优惠券类型" style="font-size:14px;">
<van-cell title="优惠券类型" style="font-size:14px;">
<template slot="default">
<div class="npbr">
<van-field
......@@ -154,11 +154,16 @@
:show="unitShow"
@blur="unitShow = false"
/>
</div>
</div>
</template>
</van-cell>
<van-cell title="总限制次数" style="font-size:14px;" class="js">
<van-stepper v-model="addForm.limitOfUse" step="1" :show-plus="false" :show-minus="false" />
<van-stepper
v-model="addForm.limitOfUse"
step="1"
:show-plus="false"
:show-minus="false"
/>
</van-cell>
<van-cell title="总限制提示" style="font-size:14px;">
<template slot="default">
......@@ -170,17 +175,28 @@
/>
</template>
</van-cell>
<van-cell title="编码券使用上限(次)" style="font-size:14px;" class="js" >
<van-cell title="编码券使用上限(次)" style="font-size:14px;" class="js">
<van-stepper v-model="addForm.usageMax" step="1" :show-plus="false" :show-minus="false" />
</van-cell>
</van-cell-group>
<div class="title">编码券使用规则明细</div>
<van-cell-group class="all">
<van-cell title="销售金额" style="font-size:14px;" class="js">
<van-stepper v-model="addForm.salesAmount" step="1" :min="addForm.usageAmount" :show-plus="false" :show-minus="false" />
<van-stepper
v-model="addForm.salesAmount"
step="1"
:min="addForm.usageAmount"
:show-plus="false"
:show-minus="false"
/>
</van-cell>
<van-cell title="用券金额" style="font-size:14px;" class="js">
<van-stepper v-model="addForm.usageAmount" step="1" :show-plus="false" :show-minus="false" />
<van-stepper
v-model="addForm.usageAmount"
step="1"
:show-plus="false"
:show-minus="false"
/>
</van-cell>
</van-cell-group>
</div>
......@@ -193,10 +209,11 @@
</template>
<script>
import { addCoupon } from "@/api/sidebar/voucher"
export default {
import { addCoupon } from "@/api/sidebar/voucher";
export default {
data() {
return {
create_times: 1,
minStartDate: null,
minEndDate: null,
allLimitShow: false,
......@@ -210,159 +227,166 @@ export default {
endShow: false,
typeShow: false,
salesAmountShow: false,
usageAmountShow:false,
usageAmountShow: false,
unitShow: false,
beginDate: '',
endDate: '',
cxsh: '',
beginDate: "",
endDate: "",
cxsh: "",
cxshShow: false,
codeShow: false,
//
addForm: {
cxcode: '',
cxsh: '',
cxcode: "",
cxsh: "",
name: "",
begin_date: '',
end_date: '',
type: '',
unit: '',
instruction: '',
limitOfUse: '',
couponIds: '',
remind: '',
usageMax: '',
salesAmount: '',
usageAmount: '',
deptId: '',
cxcode: '',
begin_date: "",
end_date: "",
type: "",
unit: "",
instruction: "",
limitOfUse: "",
couponIds: "",
remind: "",
usageMax: "",
salesAmount: "",
usageAmount: "",
deptId: "",
couponId: 126
},
typeList: ['现金券'],
storeList: [
{"keyId":'CS',"text":"超市"},
{"keyId":'BG',"text":"百购"},
{"keyId":'BH',"text":"百货"}
typeList: ["现金券"],
storeList: [
{ keyId: "CS", text: "超市" },
{ keyId: "BG", text: "百购" },
{ keyId: "BH", text: "百货" }
]
};
},
mounted() {
this.addForm.deptId = sessionStorage.getItem("oyStallCode")
this.minStartDate = new Date((new Date()/1000+3600)*1000)
this.minEndDate = new Date((new Date()/1000+86400)*1000)
this.addForm.deptId = sessionStorage.getItem("oyStallCode");
this.minStartDate = new Date((new Date() / 1000 + 3600) * 1000);
this.minEndDate = new Date((new Date() / 1000 + 86400) * 1000);
},
methods: {
timeFormat(time) {
let year = 1900 + time.getYear();
let month = "0" + (time.getMonth() + 1);
let date = "0" + time.getDate();
let hour = time.getHours()
let minute = time.getMinutes()
let hour = time.getHours();
let minute = time.getMinutes();
return (
year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
year +
"-" +
month.substring(month.length - 2, month.length) +
"-" +
date.substring(date.length - 2, date.length)
);
},
startTimeChange(e) {
let startTimeArr = e.getValues();
console.log(startTimeArr,'startTimeArr')
this.beginDate = `${startTimeArr[0]}-${startTimeArr[1]}-${startTimeArr[2]}`;
this.addForm.begin_date = this.beginDate
let startTimeArr = e.getValues();
console.log(startTimeArr, "startTimeArr");
this.beginDate = `${startTimeArr[0]}-${startTimeArr[1]}-${startTimeArr[2]}`;
this.addForm.begin_date = this.beginDate;
},
handleStartTime(value) {
this.addForm.begin_date = this.beginDate = this.timeFormat(value)
this.addForm.begin_date = this.beginDate = this.timeFormat(value);
this.startShow = false;
},
handleEndTime(value) {
this.addForm.end_date = this.endDate = this.timeFormat(value);
this.endShow = false;
},
endTimeChange(e) {
endTimeChange(e) {
let endTimeArr = e.getValues();
this.addForm.end_date = this.endDate = `${endTimeArr[0]}-${endTimeArr[1]}-${endTimeArr[2]}`
this.addForm.end_date = this.endDate = `${endTimeArr[0]}-${endTimeArr[1]}-${endTimeArr[2]}`;
},
onConfirm(val,index) {
this.typeShow = false
this.addForm.type = val
onConfirm(val, index) {
this.typeShow = false;
this.addForm.type = val;
},
// 商户类型确定
onConfirms(val,index) {
this.cxshShow = false
this.cxsh = val.text
this.addForm.cxsh = val.keyId
onConfirms(val, index) {
this.cxshShow = false;
this.cxsh = val.text;
this.addForm.cxsh = val.keyId;
},
// 商户类型修改
handleStoreTypeChange(picker, value, index) {
this.cxshShow = false
this.cxsh = value.text
this.addForm.cxsh = value.keyId
this.cxshShow = false;
this.cxsh = value.text;
this.addForm.cxsh = value.keyId;
},
handleCancel() {
this.$router.push('coupon')
this.$router.push("coupon");
},
handleSave() {
if(!this.addForm.cxcode ){
this.$toast("请输入欧亚活动编码")
return false
}
if(!this.addForm.cxsh){
this.$toast("请选择商户类型")
return false
}
if(!this.addForm.name ){
this.$toast("请输入优惠券名称")
return false
}
if(!this.addForm.type){
this.$toast("请选择优惠券类型")
return false
}
if(!this.addForm.unit){
this.$toast("请输入优惠券金额")
return false
}
if(!this.beginDate){
this.$toast("请输入开始时间")
return false
if (--this.create_times < 0) {
this.$toast("已经过提交申请了,请等待处理!");
return false;
}
if(!this.endDate){
this.$toast("请输入结束时间")
return false
if (!this.addForm.cxcode) {
this.$toast("请输入欧亚活动编码");
return false;
}
if (!this.addForm.cxsh) {
this.$toast("请选择商户类型");
return false;
}
if (!this.addForm.name) {
this.$toast("请输入优惠券名称");
return false;
}
if (!this.addForm.type) {
this.$toast("请选择优惠券类型");
return false;
}
if (!this.addForm.unit) {
this.$toast("请输入优惠券金额");
return false;
}
if (!this.beginDate) {
this.$toast("请输入开始时间");
return false;
}
if (!this.endDate) {
this.$toast("请输入结束时间");
return false;
}
if (!this.addForm.couponIds) {
this.$toast("请输入优惠券ID");
return false;
}
if (!this.addForm.limitOfUse) {
this.$toast("请输入总限制次数");
return false;
}
if (!this.addForm.remind) {
this.$toast("请输入限制提示");
return false;
}
if (!this.addForm.usageMax) {
this.$toast("请输入编码券使用上限");
return false;
}
if (!this.addForm.salesAmount) {
this.$toast("请输入销售金额");
return false;
}
if (!this.addForm.usageAmount) {
this.$toast("请输入用券金额");
return false;
}
if(!this.addForm.couponIds){
this.$toast("请输入优惠券ID")
return false
}
if(!this.addForm.limitOfUse){
this.$toast("请输入总限制次数")
return false
}
if(!this.addForm.remind ){
this.$toast("请输入限制提示")
return false
}
if(!this.addForm.usageMax){
this.$toast("请输入编码券使用上限")
return false
}
if(!this.addForm.salesAmount){
this.$toast("请输入销售金额")
return false
}
if(!this.addForm.usageAmount){
this.$toast("请输入用券金额")
return false
}
addCoupon(this.addForm).then(res => {
console.log(res,'res')
if(res.errorCode == "fail") {
this.$toast("活动创建失败!")
}else {
this.$router.push('coupon')
}
})
this.create_times = 1;
console.log(res, "res");
if (res.errorCode == "fail") {
this.$toast("活动创建失败!");
} else {
this.$router.push("coupon");
}
});
}
}
};
</script>
<style></style>
......@@ -402,7 +426,8 @@ export default {
font-weight: bold;
color: #fff;
}
.btn-l,.btn-y {
.btn-l,
.btn-y {
display: flex;
align-items: center;
height: 100%;
......
......@@ -256,7 +256,6 @@ export default {
},
handleMore() {
this.active_limit += 3;
console.log(this.currentActives.length);
if (this.active_limit >= this.currentActives.length) {
this.finished = true;
}
......@@ -286,7 +285,7 @@ export default {
}
return new Promise((resolve, reject) => {
axios({
url: "http://139.155.48.151:8085/workWx/auth/user/get?userId=" + this.zcache.userId,
url: "http://175.31.197.83:8085/workWx/auth/user/get?userId=" + this.zcache.userId,
method: "get",
headers: headerData
})
......@@ -313,7 +312,7 @@ export default {
return new Promise((resolve, reject) => {
axios({
url:
"http://139.155.48.151:8085/workWx/auth/contact/listExternalContacts?userId=" + this.zcache.userId,
"http://175.31.197.83:8085/workWx/auth/contact/listExternalContacts?userId=" + this.zcache.userId,
method: "get",
headers: headerData
})
......@@ -355,7 +354,8 @@ export default {
}
return new Promise((resolve, reject) => {
axios({
url: "http://139.155.48.151:8085/workWx/auth/contact/getCustomerInfoByOyStallCode?oyStallCode=" + this.oyStallCode,
// 139.155.48.151
url: "http://175.31.197.83:8085/workWx/auth/contact/getCustomerInfoByOyStallCode?oyStallCode=" + this.oyStallCode,
method: "get",
headers: headerData
})
......@@ -400,8 +400,9 @@ export default {
JsonStr.end_time = timeNow;
return new Promise((resolve, reject) => {
axios({
url:
"http://139.155.48.151:8085/workWx/auth/contact/getUserBehaviorData",
// url:
// "http://175.31.197.83:8085/workWx/auth/contact/getUserBehaviorData",
url: "http://175.31.197.83:8085/workWx/auth/contact/getUserBehaviorData",
method: "post",
headers: {
"Content-Type": "application/json",
......@@ -579,7 +580,7 @@ export default {
};
this.zcache.userInfoResOld = "PostData:" + JSON.stringify(postData);
axios({
url: "http://139.155.48.151:8085/workWx/auth/oauth2/getUserInfo?code=" + this.zcache.code,
url: "http://175.31.197.83:8085/workWx/auth/oauth2/getUserInfo?code=" + this.zcache.code,
method: "post",
headers: headerData
})
......
......@@ -34,7 +34,7 @@ export default {
getAcessToken() {
let _this = this;
axios({
url: "http://139.155.48.151:8085/workWx/auth/oauth2/getAccessToken",
url: "http://175.31.197.83:8085/workWx/auth/oauth2/getAccessToken",
method: "get"
}).then(res => {
_this.accessToken = res.data.data;
......@@ -75,7 +75,7 @@ export default {
let activeId = _this.activeId? _this.activeId : ""
let unionId = _this.unionId? _this.unionId : ""
let pageUri = `${nowUrl}&detailid=${voucherId}&actionid=${activeId}&unionid=${unionId}`;
let pageUrl = `http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
let pageUrl = `http://175.31.197.83:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
$.ajax({
type: "POST",
url: pageUrl,
......
import axios from 'axios'
import md5 from "js-md5"
let BASE_API = "http://139.155.48.151:8084"
let BASE_API = "http://175.31.197.83:8084"
const zlog = console.log.bind(console)
......
......@@ -5,5 +5,5 @@ NODE_ENV = development
VUE_APP_TITLE = 亿百分-dev
VUE_APP_OY_API = /api/
VUE_APP_API_A = http://139.155.48.151:8085
VUE_APP_API_A = http://175.31.197.83:8085
VUE_APP_API_B = http://111.26.165.55:8010/crminterface.ashx
......@@ -5,5 +5,5 @@ NODE_ENV = development
VUE_APP_TITLE = 亿百分-dev
VUE_APP_OY_API = http://111.26.165.55:8010/crminterface.ashx
VUE_APP_API_A = http://139.155.48.151:8085
VUE_APP_API_A = http://175.31.197.83:8085
VUE_APP_API_B = http://111.26.165.55:8010/crminterface.ashx
......@@ -5,5 +5,5 @@ NODE_ENV = production
VUE_APP_TITLE = 亿百分-prod
VUE_APP_OY_API = http://111.26.165.55:8010/crminterface.ashx
VUE_APP_API_A = http://139.155.48.151:8085
VUE_APP_API_A = http://175.31.197.83:8085
VUE_APP_API_B = http://111.26.165.55:8010/crminterface.ashx
......@@ -50,7 +50,7 @@
// let pageUri = `${nowUrl}&detailid=${voucherId}&actionid=${activeId}&unionid=${unionId}`;
let pageUri = `${nowUrl}`;
pageUri = pageUri.split('&').slice(0, 5).join('&')
let pageUrl = `http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
let pageUrl = `http://175.31.197.83:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
// document.getElementById('uri').innerHTML = 'Uri=' + String(pageUri)
......
......@@ -65,7 +65,7 @@
}
const nowUrl= GetQueryString('Url')
alert(`nowurl--->${nowUrl}`)
let pageUrl = `http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${nowUrl}`
let pageUrl = `http://175.31.197.83:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${nowUrl}`
$.ajax({
type: "POST",
......
......@@ -217,7 +217,7 @@
// let pageUri = `${nowUrl}&detailid=${voucherId}&actionid=${activeId}&unionid=${unionId}`;
let pageUri = `${nowUrl}`;
pageUri = pageUri.split('&').slice(0, 5).join('&')
let pageUrl = `http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
let pageUrl = `http://175.31.197.83:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
// document.getElementById('uri').innerHTML = 'Uri=' + String(pageUri)
......
......@@ -88,7 +88,7 @@
}
// let storecode = "181"
let pageUri = `pages/user/register/register?storeCode=${storecode}`
let pageUrl = `http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
let pageUrl = `http://175.31.197.83:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
$.ajax({
type: "POST",
......
......@@ -12,7 +12,7 @@ let INFO = {
// agentId: '1000015',
corpId: 'ww4df265003b43fa0d',
agentId: '1000032',
// url: 'http://139.155.48.151:8085',
// url: 'http://175.31.197.83:8085',
url: envConfig.appBaseUrlA,
}
......
import axios from 'axios'
import md5 from "js-md5"
let BASE_API = "http://139.155.48.151:8084"
let BASE_API = "http://175.31.197.83:8084"
const zlog = console.log.bind(console)
// ztest
......
......@@ -2,7 +2,7 @@ import axios from 'axios'
import envConfig from '@/config/env-config'
export function wxRequest(inUrl, data = {}, header = {}, method = 'post') {
// let URL = `http://172.16.0.111:8081${url}`
// let URL = `http://139.155.48.151:8081${url}`
// let URL = `http://175.31.197.83:8081${url}`
// Z-BasicInfo
let INFO = {
......@@ -10,7 +10,7 @@ export function wxRequest(inUrl, data = {}, header = {}, method = 'post') {
// agentId: '1000015',
corpId: 'ww4df265003b43fa0d',
agentId: '100003',
// url: 'http://139.155.48.151:8085' + inUrl,
// url: 'http://175.31.197.83:8085' + inUrl,
url: envConfig.appBaseUrlA + inUrl,
}
......
......@@ -135,7 +135,7 @@
};
this.zcache.userInfoResOld = "PostData:" + JSON.stringify(postData);
axios({
url: "http://139.155.48.151:8085/workWx/auth/oauth2/getUserInfo?code=" + this.zcache.code,
url: "http://175.31.197.83:8085/workWx/auth/oauth2/getUserInfo?code=" + this.zcache.code,
method: "post",
headers: headerData,
})
......
......@@ -34,7 +34,7 @@ export default {
getAcessToken() {
let _this = this;
axios({
url: "http://139.155.48.151:8085/workWx/auth/oauth2/getAccessToken",
url: "http://175.31.197.83:8085/workWx/auth/oauth2/getAccessToken",
method: "get"
}).then(res => {
_this.accessToken = res.data.data;
......@@ -48,7 +48,7 @@ export default {
let activeId = _this.activeId? _this.activeId : ""
let unionId = _this.unionId? _this.unionId : ""
let pageUri = `${nowUrl}&detailid=${voucherId}&actionid=${activeId}&unionid=${unionId}`;
let pageUrl = `http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
let pageUrl = `http://175.31.197.83:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=${pageUri}`;
$.ajax({
type: "POST",
url: pageUrl,
......
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