From 7ee4b810ff68da49c1648f0486b87712cefb4512 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=98=E7=BF=94=E5=AE=87-=E6=97=85=E7=AE=A1=E5=AE=B6?=
<7682361+meliuxy_456@user.noreply.gitee.com>
Date: Thu, 9 Dec 2021 15:59:22 +0800
Subject: [PATCH] up
---
.../packageBuy/pages/buyMember/buyMember.vue | 17 +-
packages/packageBuy/pages/detail/detail.vue | 821 ++++++++++++++----
.../packageBuy/pages/packageInfo/index.vue | 154 +++-
.../pages/shopDetail/shopDetail.vue | 56 +-
.../packageOrder/pages/myOrder/myOrder.vue | 4 +-
.../pages/applyReg/applyReg.vue | 3 +-
pages/member/member.vue | 25 +-
utils/weixin.js | 43 +-
8 files changed, 892 insertions(+), 231 deletions(-)
diff --git a/packages/packageBuy/pages/buyMember/buyMember.vue b/packages/packageBuy/pages/buyMember/buyMember.vue
index 30d45ad..c2b338c 100644
--- a/packages/packageBuy/pages/buyMember/buyMember.vue
+++ b/packages/packageBuy/pages/buyMember/buyMember.vue
@@ -33,7 +33,7 @@
- 建卡医院*
+ 建卡医院
{{arrHospital[hindex]}}
@@ -57,6 +57,8 @@
-->
+
+
立即支付
@@ -137,18 +139,12 @@
this.alert('请输入具体街道/地址')
return
}
- if (weixin.isNull(this.info.hospital) || this.hindex == 0) {
- this.alert('请输入具体建卡医院')
- return
- }
weixin.request({
api: '/api/member/order-add',
method: 'POST',
data: this.info,
- utilSuccess: r => {
- console.log(r.data.total)
- console.log(r.data.total)
+ utilSuccess: r => {
if (parseFloat(r.data.total) == 0) {
uni.navigateTo({
url: '../buyMemberSuccess/buyMemberSuccess?id=' +
@@ -187,6 +183,7 @@
}
},
utilFail: r => {
+ weixin.alert(r)
console.log(r);
}
@@ -221,6 +218,10 @@
}
+
diff --git a/packages/packageBuy/pages/packageInfo/index.vue b/packages/packageBuy/pages/packageInfo/index.vue
index 739e285..17055b7 100644
--- a/packages/packageBuy/pages/packageInfo/index.vue
+++ b/packages/packageBuy/pages/packageInfo/index.vue
@@ -6,12 +6,15 @@
- ¥{{packages.price}}{{packages.name}}
+
+
+ ¥{{packages.price}}
+ 免费
+ {{packages.name}}
-
+
@@ -20,12 +23,14 @@
-
+
- {{mod.product_type.name}}{{((mod.num!=""&&mod.num!=undefined)? mod.num:"1")}} {{((mod.unit!=""&&mod.unit!=undefined)? mod.unit:"次")}}
+ {{mod.product_type.name}}{{((mod.num!=""&&mod.num!=undefined)? mod.num:"1")}}{{((mod.unit!=""&&mod.unit!=undefined)? mod.unit:"次")}}
+
@@ -34,18 +39,40 @@
- {{packages.content}}
+
+
+
-
-
-
+
+
@@ -92,7 +119,9 @@
sharePath: "",
scare: 1,
shareHeight: 500,
- id: ""
+ domain: "",
+ id: "",
+ promotion_id: ""
}
},
onLoad(option) {
@@ -103,11 +132,21 @@
this.id = option.id;
this.getPackages();
}
+ const scene = decodeURIComponent(option.scene);
+ if (!weixin.isNull(scene)) {
+ console.log(scene)
+ this.id = weixin.getParam(scene, "id");
+ this.promotion_id = weixin.getParam(scene, "promotion_id");
+ uni.setStorageSync("base_promotion_id", this.promotion_id);
+ this.getPackages();
+ }
weixin.getOpenidInfo(info => {
this.user_info = info
}, false)
this.scare = windowWidth / 375;
+ console.log(weixin.getBaseUrl())
+ this.domain = weixin.getBaseUrl();
},
onShow() {
if (this.checkLogin()) {
@@ -117,11 +156,12 @@
onShareAppMessage() {
return {
title: this.packages.name,
- path: 'packages/packageBuy/pages/packageInfo/index?id='+this.id+'&promotion_id=' + this.user_info.id,
+ path: 'packages/packageBuy/pages/packageInfo/index?id=' + this.id + '&promotion_id=' + this.user_info.id,
imageUrl: this.img
}
},
methods: {
+
shareOpen() {
uni.showLoading({
title: '加载中'
@@ -138,19 +178,18 @@
});
},
getAvatar: function() {
- let userProfile = uni.getStorageSync('user_profile');
- if(!weixin.isNull(userProfile)){
- uni.getImageInfo({
- src: userProfile.avatarUrl, // 头像
- success: rlogo => {
- this.imgAvatar = rlogo.path;
- this.draw();
- }
- });
- }
- else{
- this.imgAvatar="../../../../static/avatar.jpg";
- this.draw();
+ let userProfile = uni.getStorageSync('user_profile');
+ if (!weixin.isNull(userProfile)) {
+ uni.getImageInfo({
+ src: userProfile.avatarUrl, // 头像
+ success: rlogo => {
+ this.imgAvatar = rlogo.path;
+ this.draw();
+ }
+ });
+ } else {
+ this.imgAvatar = "../../../../static/avatar.jpg";
+ this.draw();
}
},
draw: function() {
@@ -161,7 +200,7 @@
method: 'GET',
data: {
path: 'packages/packageBuy/pages/packageInfo/index',
- scene: 'id='+this.id+'&promotion_id=' + this.user_info.id
+ scene: 'id=' + this.id + '&promotion_id=' + this.user_info.id
},
success: r => {
if (r.data.status === 1) {
@@ -290,8 +329,8 @@
if (this.checkLogin()) {
let package_id = this.id;
- uni.navigateTo({
- url:"../buyMember/buyMember?package_id=" + package_id
+ uni.navigateTo({
+ url: "../buyMember/buyMember?package_id=" + package_id
});
}
},
@@ -340,7 +379,62 @@
padding-bottom: 160rpx;
}
-