提交 54a2e748 编写于 作者: guangjun.yang's avatar guangjun.yang

Merge branch 'dev-question-bank-0916' into release

* dev-question-bank-0916:
  hasNoUsedCard与函数有冲突
  查找是否有没有绑定的卡
  查找是否有没有绑定的卡
  request拦截器
  1、开发激活/购买流程(内部逻辑) 2、部分弹框UI及交互 3、对接部分修改的接口

# Conflicts:
#	src/views/merge-detail.vue
#	src/views/share-merge-detail.vue
...@@ -11,7 +11,7 @@ const service = axios.create({ ...@@ -11,7 +11,7 @@ const service = axios.create({
// request拦截器 // request拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
if (config.data && config.data.setEntry) { if (config.data && config.data.token) {
config.headers['sysCode'] = config.data.sysCode || 10 config.headers['sysCode'] = config.data.sysCode || 10
if (config.data.token) { if (config.data.token) {
config.headers['token'] = config.data.token || 'CAF8336E76514F07BF195EFCEBE60775' config.headers['token'] = config.data.token || 'CAF8336E76514F07BF195EFCEBE60775'
......
...@@ -130,10 +130,12 @@ export default { ...@@ -130,10 +130,12 @@ export default {
let param = { let param = {
area: provinceId + "", area: provinceId + "",
cardType: 1, cardType: 1,
pageNum: 1, goodsType: 2,
pageSize: 1 cardTypeList: [1],
// pageNum: 1,
// pageSize: 1
}; };
this.POST("trade/goods/cardList", param).then(res => { this.POST("trade/goods/cardList_v2", param).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
this.showLoading = false; this.showLoading = false;
this.isShowPopup = true; this.isShowPopup = true;
......
...@@ -340,7 +340,8 @@ export default { ...@@ -340,7 +340,8 @@ export default {
cardType: 2, cardType: 2,
orderId: 0 orderId: 0
}, },
subContent: ``, subContent: "",
hasNoUsedCard: false,
}; };
}, },
components: { components: {
...@@ -444,12 +445,12 @@ export default { ...@@ -444,12 +445,12 @@ export default {
this.showChangeCard = false; this.showChangeCard = false;
}, },
// 查询是否买过类似的卡,但还没有绑定 // 查询是否买过类似的卡,但还没有绑定
async hasNoUsedCardAction() { hasNoUsedCardAction() {
let param = { let param = {
setEntry: true setEntry: true
}; };
await this.GET(`cme/projectCard/queryNoUsedCard/2`, param).then(({ data }) => { this.GET(`cme/projectCard/queryNoUsedCard/${this.project.goodsType}/${this.project.cardType}`, param).then(({ data }) => {
this.hasNoUsedCard = data.hasNoUsedCard; this.hasNoUsedCard = data.hasNoUsedCard;
if (data.hasNoUsedCard == 1) { if (data.hasNoUsedCard == 1) {
this.cmeCardModels = data.cmeCardModels[0] || {}; this.cmeCardModels = data.cmeCardModels[0] || {};
...@@ -477,8 +478,10 @@ export default { ...@@ -477,8 +478,10 @@ export default {
changeCardAction(cardKey, isInTips) { changeCardAction(cardKey, isInTips) {
let _this = this; let _this = this;
let param = { let param = {
idType: 1,
cardKey: cardKey, cardKey: cardKey,
cardType: 2, cardType: this.project.cardType || 2,
goodsType: this.project.goodsType || 2,
portalProjectId: this.projectId, portalProjectId: this.projectId,
setEntry: true setEntry: true
}; };
...@@ -667,11 +670,13 @@ export default { ...@@ -667,11 +670,13 @@ export default {
getCardInfoByProvinceId(provinceId) { getCardInfoByProvinceId(provinceId) {
let param = { let param = {
area: provinceId + "", area: provinceId + "",
cardType: 2, cardType: this.project.cardType || 2,
pageNum: 1, cardTypeList: [ this.project.cardType || 3],
pageSize: 1 goodsType: this.project.goodsType,
// pageNum: 1,
// pageSize: 1
}; };
this.POST("trade/goods/cardList", param).then(res => { this.POST("trade/goods/cardList_v2", param).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
this.showLoading = false; this.showLoading = false;
// this.isShowPopup = true; // this.isShowPopup = true;
......
...@@ -370,7 +370,8 @@ export default { ...@@ -370,7 +370,8 @@ export default {
cardType: 2, cardType: 2,
orderId: 0 orderId: 0
}, },
subContent: `` subContent: "",
hasNoUsedCard: false,
}; };
}, },
components: { components: {
...@@ -539,11 +540,11 @@ export default { ...@@ -539,11 +540,11 @@ export default {
}, },
// 查询是否买过类似的卡,但还没有绑定 // 查询是否买过类似的卡,但还没有绑定
async hasNoUsedCardAction() { hasNoUsedCardAction() {
let param = { let param = {
setEntry: true setEntry: true
}; };
await this.GET(`cme/projectCard/queryNoUsedCard/2`, param).then(({ data }) => { this.GET(`cme/projectCard/queryNoUsedCard/${this.project.goodsType}/${this.project.cardType}`, param).then(({ data }) => {
this.hasNoUsedCard = data.hasNoUsedCard; this.hasNoUsedCard = data.hasNoUsedCard;
if (data.hasNoUsedCard == 1) { if (data.hasNoUsedCard == 1) {
this.cmeCardModels = data.cmeCardModels[0] || {}; this.cmeCardModels = data.cmeCardModels[0] || {};
...@@ -556,8 +557,10 @@ export default { ...@@ -556,8 +557,10 @@ export default {
changeCardAction(cardKey, isInTips) { changeCardAction(cardKey, isInTips) {
let _this = this; let _this = this;
let param = { let param = {
idType: 1,
cardKey: cardKey, cardKey: cardKey,
cardType: 2, cardType: this.project.cardType || 2,
goodsType: this.project.goodsType || 2,
channel: 3, channel: 3,
portalProjectId: this.projectId, portalProjectId: this.projectId,
setEntry: true setEntry: true
...@@ -666,11 +669,13 @@ export default { ...@@ -666,11 +669,13 @@ export default {
getCardInfoByProvinceId(provinceId) { getCardInfoByProvinceId(provinceId) {
let param = { let param = {
area: provinceId + "", area: provinceId + "",
cardType: 2, cardType: this.project.cardType || 2,
pageNum: 1, cardTypeList: [ this.project.cardType || 3],
pageSize: 1 goodsType: this.project.goodsType,
// pageNum: 1,
// pageSize: 1
}; };
this.POST("trade/goods/cardList", param).then(res => { this.POST("trade/goods/cardList_v2", param).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
this.showLoading = false; this.showLoading = false;
this.cardInfo = (res.data && res.data[0]) || { this.cardInfo = (res.data && res.data[0]) || {
...@@ -985,12 +990,15 @@ export default { ...@@ -985,12 +990,15 @@ export default {
_this.showLoading = false; _this.showLoading = false;
}, 800); }, 800);
<<<<<<< HEAD
// 如果 hasBindCard 为false,则获取卡信息 0:未绑卡 1:已绑卡 // 如果 hasBindCard 为false,则获取卡信息 0:未绑卡 1:已绑卡
if (!_this.hasBindCard) { if (!_this.hasBindCard) {
_this.preJumper(); _this.preJumper();
_this.logged && _this.hasNoUsedCardAction(); _this.logged && _this.hasNoUsedCardAction();
} }
=======
>>>>>>> dev-question-bank-0916
// let shareUrl = encodeURIComponent(location.href); // let shareUrl = encodeURIComponent(location.href);
let shareUrl = getWebPageUrl(`cme/#/sharecoop?uuid=${this.uuid}`); let shareUrl = getWebPageUrl(`cme/#/sharecoop?uuid=${this.uuid}`);
this.wechatShare( this.wechatShare(
...@@ -1005,6 +1013,12 @@ export default { ...@@ -1005,6 +1013,12 @@ export default {
console.log("share success..."); console.log("share success...");
} }
); );
// 如果 hasBindCard 为false,则获取卡信息 0:未绑卡 1:已绑卡
if (!_this.hasBindCard) {
_this.preJumper();
_this.logged && _this.hasNoUsedCardAction();
}
} else { } else {
_this.showLoading = false; _this.showLoading = false;
_this.$router.replace("/not-found?fromPage=2"); _this.$router.replace("/not-found?fromPage=2");
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册