diff --git a/image/check.png b/image/check.png
new file mode 100644
index 0000000..458d1fe
Binary files /dev/null and b/image/check.png differ
diff --git a/image/close.png b/image/close.png
new file mode 100644
index 0000000..1f5e291
Binary files /dev/null and b/image/close.png differ
diff --git a/src/api/weixin/index.js b/src/api/weixin/index.js
index 5236b97..12e8525 100644
--- a/src/api/weixin/index.js
+++ b/src/api/weixin/index.js
@@ -28,3 +28,25 @@ export function getQrCode(data) {
responseType: "blob"
});
}
+// 通过后台过去公众号图片
+export function getJavaQrCode(data) {
+ return service({
+ url: "/api" + "/platformCoupon/thePublic",
+ method: "post",
+ responseType: "blob"
+ });
+}
+// 通过后台获取用户扫描的openid
+export function getJavaOpenid(data) {
+ return service({
+ url: "/api" + "/platformCoupon/openid",
+ method: "post",
+ });
+}
+// 清除后台获取的openid
+export function doDeleteJavaOpenid(data) {
+ return service({
+ url: "/api" + "/platformCoupon/gcopenid",
+ method: "post",
+ });
+}
diff --git a/src/main.js b/src/main.js
index 9def1c8..4951c73 100644
--- a/src/main.js
+++ b/src/main.js
@@ -41,7 +41,8 @@ Vue.use(animated);
Vue.use(vueEsign);
import {
- thousands
+ thousands,
+ parseTime
} from '@/utils/index.js'
// 引入高精度精算
import {
@@ -49,6 +50,7 @@ import {
} from 'decimal.js'
// 全局定义
Vue.prototype.$Decimal = Decimal
+Vue.prototype.$parseTime = parseTime
import Vue from "vue";
import Router from "vue-router";
diff --git a/src/pages/discount-coupon/issue/components/edit.vue b/src/pages/discount-coupon/issue/components/edit.vue
index 8dcf9d2..1e7d68b 100644
--- a/src/pages/discount-coupon/issue/components/edit.vue
+++ b/src/pages/discount-coupon/issue/components/edit.vue
@@ -101,6 +101,8 @@
+
+
@@ -110,10 +112,10 @@ import Tencent from './Tencent'
import Store from '@/components/mulStore/index'
import Project from '@/components/mulProject/index'
import { partten } from "@/utils/partten/index.js";
-import { getAccessToken, getTicket, getQrCode } from "@/api/weixin/index.js";
+import QrCode from "./qrCode";
export default {
name: 'Form',
- components: { ActiveImg, Tencent, Store, Project },
+ components: { ActiveImg, Tencent, Store, Project, QrCode },
data() {
return {
form: {
@@ -184,36 +186,14 @@ export default {
}
},
created() {
- this.fetchAccessToken()
+ // this.fetchAccessToken()
},
methods: {
- // ============================== 查询 ============================== //
- // 获取微信公众号access_token
- fetchAccessToken() {
- getAccessToken().then(res => {
- console.log('access_token', res);
- if (res.expires_in == 7200) {
- this.fetchTicket(res.access_token)
- }
- })
- },
- // 根据微信公众号access_token获取ticket
- fetchTicket(data) {
- getTicket(data, { "expire_seconds": 1800, "action_name": "QR_SCENE", "action_info": { "scene": { "scene_id": 1800 } } }).then(res => {
- console.log('ticket', res);
- this.fetchQrCode(res.ticket)
- })
- },
- // 通过ticket换取二维码
- fetchQrCode(data) {
- getQrCode(data).then(res => {
- console.log('QrCode', window.URL.createObjectURL(res));
- this.qrCode = window.URL.createObjectURL(res)
- })
- },
+
// ============================== 操作 ============================== //
// 编辑
handleData(row) {
+ console.log('row', row);
// 判断传过来的值中时候有id来判断当前是新增的还是编辑的数据,有id的为编辑数据
if (row.id) {
// 从管理页面过来useStoreList和projectList空所以取的是useStores和useProjects中的值,如果是从预览页面,即步骤2过来的就直接取useStoreList和projectList中的值
@@ -223,6 +203,9 @@ export default {
row.imageUrl = row.imageUrl ? row.imageUrl : partten.imagePath + row.fileLists[0].filePath + '/' + row.fileLists[0].fileName
// 因为后台需要的是一个拆开的两个时间不是一个时间数组,element的时间组件获取的值时时间数组所以需要自定义一个fixDate值来接受,新增提交时拆开,现在编辑需要重新将两个值组合回一个时间数组
row.fixDate = Array.from([row.startDate, row.endDate]);
+
+ }
+ if (row.imageUrl) {
// 展示图片,因为一开始展示页面,当前页面的子组件也是刚加载无法立马使用this.$refs获取,需要用this.$nextTick来过度一下
this.$nextTick(function () {
this.$refs.activeImg.show(row.imageUrl)
diff --git a/src/pages/discount-coupon/issue/components/qrCode.vue b/src/pages/discount-coupon/issue/components/qrCode.vue
new file mode 100644
index 0000000..ec53bac
--- /dev/null
+++ b/src/pages/discount-coupon/issue/components/qrCode.vue
@@ -0,0 +1,126 @@
+
+
+
+
+
+

+

+
{{codeNumber===2?'扫码关注成功':'二维码失效'}}
+
+
+
+
+
+
+
+
diff --git a/src/pages/discount-coupon/issue/components/styles/template.css b/src/pages/discount-coupon/issue/components/styles/template.css
index 05d4dcf..fb9641a 100644
--- a/src/pages/discount-coupon/issue/components/styles/template.css
+++ b/src/pages/discount-coupon/issue/components/styles/template.css
@@ -25,6 +25,7 @@
/* margin-bottom: 30px; */
padding: 13px;
background-color: #f8f8f8;
+ overflow-y: auto;
}
.container .box .box-item > .item .image {
height: 250px;
@@ -61,11 +62,41 @@
margin-bottom: 10px;
}
.container .box .box-item > .item .tips .tips_msg .tips_msg_item {
- color: #000;
- line-height: 18px;
+ line-height: 20px;
display: flex;
}
-.container .box .box-item > .item .tips .tips_msg .tips_msg_item .bot {
+.container
+ .box
+ .box-item
+ > .item
+ .tips
+ .tips_msg
+ .tips_msg_item
+ .tips_msg_item_title {
+ width: 64px;
+ color: #666;
+}
+.container
+ .box
+ .box-item
+ > .item
+ .tips
+ .tips_msg
+ .tips_msg_item
+ .tips_msg_item_content {
+ width: 210px;
+}
+.tips .tips_msg .tips_msg_item .tips_msg_item_titles {
+ width: 30px;
+}
+.tips .tips_msg .tips_msg_item .tips_msg_item_titles .bot {
+ width: 8px;
+ height: 8px;
+ background-color: #fc9c24;
+ margin-top: 6px;
+ border-radius: 50%;
+}
+/* .container .box .box-item > .item .tips .tips_msg .tips_msg_item .bot {
width: 25px;
padding-top: 6px;
}
@@ -75,4 +106,4 @@
border-radius: 50%;
background-color: #fc9c24;
line-height: 18px;
-}
+} */
diff --git a/src/pages/discount-coupon/issue/components/template.vue b/src/pages/discount-coupon/issue/components/template.vue
index 0d643d5..dad8fc6 100644
--- a/src/pages/discount-coupon/issue/components/template.vue
+++ b/src/pages/discount-coupon/issue/components/template.vue
@@ -14,13 +14,67 @@
分享
-
风险提示
+
优惠规则!
+
-
-
+
优惠金额:
+
+ {{form.serviceConditions===0?`满${form.fullReductionMoney}元减${form.fullKimsMoney}元`:`${form.fullKimsMoney}元无门槛代金券`}}
+
+
+ {{form.serviceConditions===0?`消费单据满${form.fullReductionMoney}元打${form.fullDiscountMoney}%折扣`:`${form.fullDiscountMoney}无门槛折扣券`}}
+
+
直接免单
+
+
+
+
分润金额:
+
+ 每一位领取人消费后可获得{{form.fixedAmount}}元分润,可提现至微信
+
+ 每一位领取人消费后可获得消费单据的{{form.orderCommission}}%分润,可提现至微信
+
+
+
+
有效日期:
+
+ {{date.startDate}} 至 {{date.endDate}}
+
+
+ 领取后{{form.startDay}}天生效,生效后{{form.endDay}}天内有效
+
+
+
+
适用门店:
+
{{form.suitableStore===0?'所有门店':storeList}}
+
+
+
+
+
适用项目:
+
{{form.suitableProject===0?'所有项目':projectList}}
-
请先点击领取优惠券后再分享,否则分享出去的优惠券领取人消费后的分润不属于您!
+
+
+
+
+
风险提示!
+
+
+
+
+ 分享被领取后,且优惠券被领取人消费了,即可获得{{form.fixedAmount}}元分润金额,并且可提现到微信
+
+ 分享被领取后,且优惠券被领取人消费了,即可获得消费单据的{{form.orderCommission}}%分润金额,并且可提现到微信
+
+
+
+
需要先领取优惠券后再分享,这样其他扔领取了您分享的优惠券并消费后才会获得分润,否则无法获得分润
@@ -37,23 +91,37 @@
+