diff --git a/enums/index.js b/enums/index.js
index 99bbe53..049ae48 100644
--- a/enums/index.js
+++ b/enums/index.js
@@ -3,6 +3,11 @@ const urlEnv = env === 'production' ? '' : `-${env}`
export const XAPPID = '503258978847966403'
+export const H5_URL = `http://shopkeeper${env === 'production' ? '' : '.' + env}.qniao.cn`
+
+export const H5_URL_STORE = `${H5_URL}/#/pages/store/index?share=true&`
+export const H5_URL_PAPER = `${H5_URL}/#/pages/paper-details/index?share=true&`
+
/**
* 账号类型
*/
@@ -11,7 +16,7 @@ export const accountType = {
PHONE: 2,
EMAIL: 3,
APPLEID: 4,
- CUSTOM: 5
+ CUSTOM: 5,
}
/**
@@ -22,7 +27,7 @@ export const codePurpose = {
RESET_LOGIN_PASSWORD: 2,
RESET_PHONE: 3,
BIND_BANK_CARD: 4,
- RESET_CREDIT_PASSWORD: 5
+ RESET_CREDIT_PASSWORD: 5,
}
/**
@@ -30,7 +35,7 @@ export const codePurpose = {
*/
export const verificationType = {
PHONE: 1,
- EMAIL: 2
+ EMAIL: 2,
}
/**
* 法大大企业认证状态 1:未认证 2:认证中 3:已认证 4:认证失败
@@ -39,14 +44,14 @@ export const fddEnterpriseStatus = {
UNCERTIFIED: 1,
CERTIFIED_ING: 2,
CERTIFIED_SUCCESS: 3,
- CERTIFIED_FAIL: 4
+ CERTIFIED_FAIL: 4,
}
/**
* 上传地址
*/
export const uploadUrl = {
image: `https://api-client-yyt${urlEnv}.qniao.cn/yyt-uec/file-uploading/upload/image`,
- file: `https://api-client-yyt${urlEnv}.qniao.cn/yyt-uec/file-uploading/upload/file`
+ file: `https://api-client-yyt${urlEnv}.qniao.cn/yyt-uec/file-uploading/upload/file`,
}
/**
* 结算周期:1:月结30(飞算1期),2:月结45,3:月结60(飞算2期),4:月结75,5:月结90(飞算3期)
@@ -54,24 +59,24 @@ export const uploadUrl = {
export const settlementPeriodEnum = [
{
value: 1,
- label: '月结30'
+ label: '月结30',
},
{
value: 2,
- label: '月结45'
+ label: '月结45',
},
{
value: 3,
- label: '月结60'
+ label: '月结60',
},
{
value: 4,
- label: '月结75'
+ label: '月结75',
},
{
value: 5,
- label: '月结90'
- }
+ label: '月结90',
+ },
]
/**
* 结算周期:1:1期,2:2期,3:3期
@@ -79,16 +84,16 @@ export const settlementPeriodEnum = [
export const fsSettlementPeriodEnum = [
{
value: 1,
- label: '1期'
+ label: '1期',
},
{
value: 2,
- label: '2期'
+ label: '2期',
},
{
value: 3,
- label: '3期'
- }
+ label: '3期',
+ },
]
/**
* 飞算结算方式: 1: 先息后本
@@ -96,8 +101,8 @@ export const fsSettlementPeriodEnum = [
export const fsSettlementMethodEnum = [
{
value: 1,
- label: '先息后本'
- }
+ label: '先息后本',
+ },
]
/**
@@ -107,7 +112,7 @@ export const fsAuditStatus = {
WAIT_APPLY: 0,
AUDITING: 1,
PASS: 2,
- REJECT: 3
+ REJECT: 3,
}
/**
@@ -125,7 +130,7 @@ export const supplierOrderStatusEnum = {
FINISHED: 30213,
WAIT_CLIENT_REPAY: 30217,
REPAYING: 30216,
- CANCELED: 30212
+ CANCELED: 30212,
}
/**
* 供应商订单状态 待客户确认订单/30202,待供应商确认订单/30205,待发货/30106,已发货/30107 ,待客户借款/30207,支付中/30208,待客户支付/30214,付款失败/30211,已完成/30213,待客户还款/30217,已取消/30212,还款中/30216
@@ -142,7 +147,7 @@ export const supplierOrderStatusMap = {
[supplierOrderStatusEnum.FINISHED]: '已完成',
[supplierOrderStatusEnum.WAIT_CLIENT_REPAY]: '待客户还款',
[supplierOrderStatusEnum.REPAYING]: '还款中',
- [supplierOrderStatusEnum.CANCELED]: '已取消'
+ [supplierOrderStatusEnum.CANCELED]: '已取消',
}
/**
@@ -151,13 +156,13 @@ export const supplierOrderStatusMap = {
export const paymentMethodEnum = {
WECHAT_PAY: 1,
MONTHLY_PAY: 2,
- FLY_PAY: 4
+ FLY_PAY: 4,
}
export const paymentMethodMap = {
[paymentMethodEnum.WECHAT_PAY]: '微信支付',
[paymentMethodEnum.MONTHLY_PAY]: '月结支付',
- [paymentMethodEnum.FLY_PAY]: '飞算支付'
+ [paymentMethodEnum.FLY_PAY]: '飞算支付',
}
/**
@@ -167,7 +172,7 @@ export const financeStatusEnum = {
WAIT_CLIENT_LOAN: 30181,
WAIT_FINANCE: 30182,
FINISHED: 30183,
- FAILED: 30184
+ FAILED: 30184,
}
/**
@@ -177,7 +182,7 @@ export const financeStatusMap = {
[financeStatusEnum.WAIT_CLIENT_LOAN]: '待客户借款',
[financeStatusEnum.WAIT_FINANCE]: '待融资',
[financeStatusEnum.FINISHED]: '已融资',
- [financeStatusEnum.FAILED]: '融资失败'
+ [financeStatusEnum.FAILED]: '融资失败',
}
/**
@@ -185,10 +190,10 @@ export const financeStatusMap = {
*/
export const contractTypeEnum = {
ORDER_CONTRACT: 1,
- GUARANTEE_CONTRACT: 2
+ GUARANTEE_CONTRACT: 2,
}
export const contractTypeMap = {
[contractTypeEnum.ORDER_CONTRACT]: '订单合同',
- [contractTypeEnum.GUARANTEE_CONTRACT]: '担保合同'
+ [contractTypeEnum.GUARANTEE_CONTRACT]: '担保合同',
}
diff --git a/manifest.json b/manifest.json
index 29b7a43..da9387c 100644
--- a/manifest.json
+++ b/manifest.json
@@ -28,7 +28,9 @@
"Geolocation" : {},
"FaceID" : {},
"iBeacon" : {},
- "Push" : {}
+ "Push" : {},
+ "Share" : {},
+ "Payment" : {}
},
/* 应用发布信息 */
"distribute" : {
@@ -80,8 +82,8 @@
"payment" : {
"weixin" : {
"__platform__" : [ "ios", "android" ],
- "appid" : "",
- "UniversalLinks" : ""
+ "appid" : "wxbdd9c878b33e451d",
+ "UniversalLinks" : "https://apple-app-yyt-shopkeeper.qniao.cn/"
}
},
"ad" : {},
@@ -92,7 +94,12 @@
"appkey_android" : "877848546f7f3717101a17c33e1d4df3"
}
},
- "share" : {},
+ "share" : {
+ "weixin" : {
+ "appid" : "wxbdd9c878b33e451d",
+ "UniversalLinks" : "https://apple-app-yyt-shopkeeper.qniao.cn/"
+ }
+ },
"push" : {
"unipush" : {}
}
diff --git a/pages/mall/index.vue b/pages/mall/index.vue
index 04e6ad2..2ef0312 100644
--- a/pages/mall/index.vue
+++ b/pages/mall/index.vue
@@ -75,53 +75,35 @@
-
-
- 下载海报
- 下载二维码
- 分享
+
+ 下载海报
+ 分享
-
-
+
@@ -509,58 +514,6 @@ export default {
height: 100rpx;
}
}
-.share-area {
- width: 750rpx;
- height: 100vh;
- background: #888888;
- position: fixed;
- z-index: 998;
- top: 0;
- left: 0;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- .share-content {
- width: 750rpx;
- background-color: #fff;
- border-radius: 20rpx;
- padding: 64rpx 34rpx 70rpx;
- position: relative;
- .bg {
- position: absolute;
- top: 0;
- left: 0;
- width: 750rpx;
- height: 944rpx;
- }
- .code {
- position: relative;
- z-index: 10;
- background-color: #fff;
- width: 680rpx;
- border-radius: 20rpx;
- box-shadow: 0px 3rpx 13rpx 0px rgba(0, 0, 0, 0.1);
- padding: 40rpx 70rpx 64rpx;
- .border {
- width: 540rpx;
- height: 540rpx;
- background: url('https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/qrCode-border.png') no-repeat center/cover;
- }
- }
- .down-button {
- width: 540rpx;
- height: 90rpx;
- margin: 40rpx 0 76rpx;
- background-image: linear-gradient(180deg, #6092ec 0%, #225dd4 100%);
- border-radius: 45rpx;
- .text {
- font-size: 48rpx;
- color: #ffffff;
- }
- }
- }
-}
.section_4 {
z-index: 100;
padding: 252rpx 36rpx 403rpx 95rpx;
@@ -628,11 +581,9 @@ export default {
}
.bottom-group {
padding: 0 32rpx;
- .text_18 {
- margin-left: 83rpx;
- }
.text_19 {
margin-left: 83rpx;
+ margin-right: 62rpx;
}
}
.view_3 {
@@ -644,9 +595,39 @@ export default {
white-space: nowrap;
}
}
-#posters {
- margin-top: 15px;
- padding: 60rpx 0;
- border-radius: 20rpx;
+.section_8 {
+ position: fixed;
+ z-index: 999;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ margin-top: 213rpx;
+ padding: 32rpx 0 52rpx;
+ color: rgb(0, 0, 0);
+ font-size: 24rpx;
+ line-height: 33rpx;
+ white-space: nowrap;
+ background-color: rgb(255, 255, 255);
+ border-radius: 20rpx 20rpx 0px 0px;
+ .group_20 {
+ margin: 0 32rpx;
+ .group_22 {
+ margin-left: 36rpx;
+ flex: 1 1 auto;
+ .image_15 {
+ margin-left: 4rpx;
+ }
+ .text_34 {
+ margin-top: 10rpx;
+ }
+ }
+ .text_33 {
+ margin-top: 10rpx;
+ }
+ .image_13 {
+ width: 64rpx;
+ height: 64rpx;
+ }
+ }
}
diff --git a/pages/paper-detail/index.vue b/pages/paper-detail/index.vue
index fcc57be..8ca4bc6 100644
--- a/pages/paper-detail/index.vue
+++ b/pages/paper-detail/index.vue
@@ -81,18 +81,23 @@
{{ form.otherNote }}
-
-
-
-
-
-
-
-
- 下载二维码
-
- {{ shareInfo.storeName }}
- {{ shareInfo.paperName }}
+
+
+
+
+ 下载海报
+ 分享
+
+
+
+
+
+
+ 微信
+
+
+
+ 朋友圈
@@ -100,25 +105,27 @@
@@ -245,68 +276,132 @@ export default {
background: #f7f8fa;
}
.paper-list-view {
- line-height: 40rpx;
+ padding: 0rpx 32rpx 32rpx;
}
.paper-datail-list-image {
width: 120rpx;
height: 120rpx;
- padding: 32rpx 32rpx;
+ margin-right: 24rpx;
}
}
.paper-bottom-border {
border-bottom: 2rpx solid #d8d8d8;
}
}
-.share-area {
- width: 750rpx;
- height: 100vh;
- background: #888888;
- position: fixed;
- z-index: 998;
+.section_4 {
+ z-index: 100;
+ padding: 252rpx 36rpx 403rpx 95rpx;
+ background-color: rgba(0, 0, 0, 0.5);
top: 0;
+ right: 0;
+ bottom: 0;
left: 0;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- .share-content {
- width: 750rpx;
- background-color: #fff;
+ position: absolute;
+ .image_9 {
+ align-self: flex-end;
+ width: 62rpx;
+ height: 62rpx;
+ }
+ .section_5 {
+ margin-top: 30rpx;
+ padding: 60rpx 0;
border-radius: 20rpx;
- padding: 64rpx 34rpx 70rpx;
- position: relative;
- .bg {
- position: absolute;
- top: 0;
- left: 0;
- width: 750rpx;
- height: 944rpx;
- }
- .code {
- position: relative;
- z-index: 10;
- background-color: #fff;
- width: 680rpx;
- border-radius: 20rpx;
- box-shadow: 0px 3rpx 13rpx 0px rgba(0, 0, 0, 0.1);
- padding: 40rpx 70rpx 64rpx;
- .border {
- width: 540rpx;
- height: 540rpx;
- background: url('https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/qrCode-border.png') no-repeat center/cover;
+ background-image: url('/static/imgs/mall/qrCode-bg.png');
+ background-size: 100% 100%;
+ background-repeat: no-repeat;
+ width: 560rpx;
+ .section_6 {
+ margin: 0 32rpx;
+ padding: 50rpx 56rpx 0;
+ background-color: rgb(255, 255, 255);
+ box-shadow: 0px 2rpx 10rpx 0px rgba(0, 0, 0, 0.1);
+ border-radius: 16rpx;
+ width: 496rpx;
+ .group_13 {
+ margin: 0 12rpx;
+ position: relative;
+ .image_10 {
+ width: 360rpx;
+ height: 360rpx;
+ }
+ .image_11 {
+ width: 330rpx;
+ height: 330rpx;
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
+ }
+ }
+ .group_14 {
+ padding: 40rpx 0 56rpx;
+ .text_15 {
+ color: rgb(51, 51, 51);
+ font-size: 30rpx;
+ font-weight: 500;
+ line-height: 42rpx;
+ white-space: nowrap;
+ }
+ .text_16 {
+ margin-top: 10rpx;
+ color: rgb(136, 136, 136);
+ font-size: 24rpx;
+ font-weight: 500;
+ line-height: 33rpx;
+ white-space: nowrap;
+ }
}
}
- .down-button {
- width: 540rpx;
- height: 90rpx;
- margin: 40rpx 0 76rpx;
- background-image: linear-gradient(180deg, #6092ec 0%, #225dd4 100%);
- border-radius: 45rpx;
- .text {
- font-size: 48rpx;
- color: #ffffff;
+ }
+ .bottom-group {
+ padding: 0 32rpx;
+ .text_19 {
+ margin-left: 83rpx;
+ margin-right: 62rpx;
+ }
+ }
+ .view_3 {
+ margin-top: 40rpx;
+ color: rgb(255, 255, 255);
+ font-size: 30rpx;
+ font-weight: 500;
+ line-height: 42rpx;
+ white-space: nowrap;
+ }
+}
+.section_8 {
+ position: fixed;
+ z-index: 999;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ margin-top: 213rpx;
+ padding: 32rpx 0 52rpx;
+ color: rgb(0, 0, 0);
+ font-size: 24rpx;
+ line-height: 33rpx;
+ white-space: nowrap;
+ background-color: rgb(255, 255, 255);
+ border-radius: 20rpx 20rpx 0px 0px;
+ .group_20 {
+ margin: 0 32rpx;
+ .group_22 {
+ margin-left: 36rpx;
+ flex: 1 1 auto;
+ .image_15 {
+ margin-left: 4rpx;
+ }
+ .text_34 {
+ margin-top: 10rpx;
}
}
+ .text_33 {
+ margin-top: 10rpx;
+ }
+ .image_13 {
+ width: 64rpx;
+ height: 64rpx;
+ }
}
}
diff --git a/static/imgs/general/wx-circle-icon.png b/static/imgs/general/wx-circle-icon.png
new file mode 100644
index 0000000..cdd2f3b
Binary files /dev/null and b/static/imgs/general/wx-circle-icon.png differ
diff --git a/static/imgs/general/wx-icon.png b/static/imgs/general/wx-icon.png
new file mode 100644
index 0000000..fc9cfb5
Binary files /dev/null and b/static/imgs/general/wx-icon.png differ
diff --git a/utils/hook.js b/utils/hook.js
index 023b4f9..f893362 100644
--- a/utils/hook.js
+++ b/utils/hook.js
@@ -221,22 +221,62 @@ export function screenShot() {
* @param {string} base64 图片base64
*/
export function saveImage(base64) {
- uni.saveImageToPhotosAlbum({
- filePath: base64,
- success: function () {
- uni.showToast({
- title: '保存图片成功',
- mask: false,
- duration: 1500,
- })
- },
- fail: function (err) {
- console.log(err)
- uni.showToast({
- title: '保存图片失败,请手动截图',
- mask: false,
- duration: 1500,
- })
- },
+ saveBase64ToTempFile(base64).then((url) => {
+ saveImageToPhotosAlbum(url)
+ })
+}
+
+/**
+ * 将base64保存为临时文件,并返回文件路径
+ * @param {string} base64
+ * @returns
+ */
+export function saveBase64ToTempFile(base64) {
+ return new Promise((resolve, reject) => {
+ const bitmap = new plus.nativeObj.Bitmap('img')
+ bitmap.loadBase64Data(base64, () => {
+ const url = '_doc/' + new Date().getTime() + '.png'
+ bitmap.save(
+ url,
+ {
+ overwrite: true,
+ },
+ () => {
+ bitmap.clear()
+ resolve(url)
+ },
+ (e) => {
+ reject(e)
+ }
+ )
+ })
+ })
+}
+
+/**
+ * 保存图片到相册
+ * @param {string} path 图片路径
+ */
+export function saveImageToPhotosAlbum(path) {
+ return new Promise((resolve, reject) => {
+ uni.saveImageToPhotosAlbum({
+ filePath: path,
+ success: (res) => {
+ uni.showToast({
+ title: '保存图片成功',
+ mask: false,
+ duration: 1500,
+ })
+ resolve()
+ },
+ fail: (err) => {
+ uni.showToast({
+ title: '保存图片失败,请手动截图',
+ mask: false,
+ duration: 1500,
+ })
+ resolve()
+ },
+ })
})
}