shish пре 2 година
родитељ
комит
2090faf176
3 измењених фајлова са 151 додато и 7 уклоњено
  1. 96 0
      ghsApp/src/admin/custom/invitePay.vue
  2. 2 1
      ghsApp/src/pages.json
  3. 53 6
      ghsApp/src/pagesClient/member/detail.vue

+ 96 - 0
ghsApp/src/admin/custom/invitePay.vue

@@ -0,0 +1,96 @@
+<template>
+	<view class="app-content">
+		<view class="billing_box_bg">
+			<view class="top-view"> </view>
+			<view class="result-view">
+                <button v-if="showButton" class="admin-button-com big blue" style="width:45vw;" @click="showBill()">点我打开</button>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+import { getWeixinId } from "@/api/invite/index"
+export default {
+    name: "invitePay",
+	data() {
+		return {
+			getAppIdList:{},
+			showButton:false,
+			id:0,
+			salt:''
+		};
+	},
+	onLoad() {
+		let that = this
+		getWeixinId().then(res => {
+			that.getAppIdList = res.data
+			that.showButton = true
+		})
+		this.id = this.option.id?this.option.id:0
+		this.salt = this.option.salt?this.option.salt:''
+	},
+	methods: {
+		showBill() {
+			let that = this
+			console.log('admin/ghs/pay?id='+that.id+'&salt='+that.salt)
+			uni.navigateToMiniProgram({
+				//姜枫-2021.04.13
+				appId: that.getAppIdList.hd.miniAppId,
+				path: 'admin/ghs/pay?id='+that.id+'&salt='+that.salt,
+				//develop 开发版 trial 体验版 release 正式版
+				envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
+				extraData: {
+					'id': that.option.id
+				},
+				success (res) {
+				}
+			})
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.go-back{
+	width: 80%;
+	height: 80upx;
+	color: #FFFFFF;
+	margin-top: 50upx;
+	background: #3385FF;
+	border-radius: 10upx;
+	font-size:30upx;
+}
+.billing_box_bg {
+	position: relative;
+	padding: 60upx 30upx;
+	display: flex;
+	background: white;
+	flex-direction: column;
+    background-color: #f5f5f5;
+	.top-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 100%;
+		height: 299upx;
+	}
+	.result-view {
+		position: relative;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		padding: 70upx;
+		width: 100%;
+		background: #ffffff;
+		border-radius: 20upx;
+		z-index: 1;
+		.iconchenggong {
+			font-size: 170upx;
+			color: $mainColor1;
+		}
+		.result-title {
+			margin: 50upx 0 70upx;
+			font-size: 32upx;
+		}
+	}
+}
+</style>

+ 2 - 1
ghsApp/src/pages.json

@@ -59,7 +59,8 @@
 				{"path": "debtChange","style": {"navigationBarTitleText": "欠款变动明细","enablePullDownRefresh": false}},
 				{"path": "balanceChange","style": {"navigationBarTitleText": "余额变动明细","enablePullDownRefresh": false}},
 				{"path": "rechargeChange","style": {"navigationBarTitleText": "充值记录","enablePullDownRefresh": false}},
-				{"path": "addStaff","style": {"navigationBarTitleText": "帮客户添加员工"}}
+				{"path": "addStaff","style": {"navigationBarTitleText": "帮客户添加员工"}},
+				{"path": "invitePay","style": {"navigationBarTitleText": "付款结账"}}
 			]
 		},
 		{

+ 53 - 6
ghsApp/src/pagesClient/member/detail.vue

@@ -17,7 +17,6 @@
         </view>
         <view class="user-info_data order-wrap">
             <view class="total-blo">
-
               <view class="total-list" @click="pageTo({url:'/pagesArrears/details',query: {id: userInfo.id}})">
                 <view class="app-color-3">欠款</view>
                 <view class="list-num" style="color:red;">{{ parseFloat(userInfo.debtAmount) || 0 }}</view>
@@ -32,12 +31,19 @@
                 <view class="app-color-3">消费金额</view>
                 <view class="list-num">{{ parseFloat(userInfo.buyAmount) || 0 }}</view>
               </view>
-
-          </view>
+            </view>
         </view>
       </view>
       <view class="module-com user-address_bx">
-          <view class="address-tit"> 地址 </view>
+          <view class="address-tit">
+            地址 
+              <!-- #ifdef MP-WEIXIN -->
+              <button class="admin-button-com mini-btn blue" open-type="share" style="float:right;font-size:21upx;margin-right:10upx;">邀请付款</button>
+              <!-- #endif -->
+              <!-- #ifdef APP-PLUS -->
+              <button class="admin-button-com mini-btn blue" @click="inviteToPay()" style="float:right;font-size:21upx;margin-right:10upx;">邀请付款</button>
+              <!-- #endif -->
+          </view>
           <view class="address-des_bx">
             <view @click.stop="pageTo({ url: '/pagesClient/member/modify?id='+userInfo.id+'&name='+userInfo.name })">
                 <view>
@@ -196,6 +202,8 @@ import TuiListCell from '@/components/plugin/list-cell'
 import { share } from "@/mixins";
 import ModalModule from "@/components/plugin/modal"
 import { getUserDet,debt} from "@/api/member";
+import { IMGHOST } from '@/config'
+import { mapGetters } from "vuex"
 import { changeShowStock,changeWlName,changeLevel,createSeatSnFn,modifySeatSnFn } from "@/api/custom"
 import { updateDebtLimit,updateCustomBlack,changeDiscount,changeName,rechargeFn} from "@/api/custom";
 export default {
@@ -265,10 +273,23 @@ export default {
       czShow:false,
       rechargeMoney:'',
       rechargeRemark:'',
-      payWay:-1
+      payWay:-1,
+      title:'付款结账',
     };
   },
-  computed: {},
+	computed: {
+		...mapGetters({ dictInfo:"getDictionariesInfo" })
+	},
+	onShareAppMessage(res) {
+    let id = this.userInfo.ghsId ? this.userInfo.ghsId : 0
+    let salt = this.userInfo.salt?this.userInfo.salt:''
+		return {
+			title: this.title,
+			desc: "",
+			imageUrl: IMGHOST+'/custom/hit_me_pay_clear.jpg',
+			path: "admin/custom/invitePay?id="+id+'&salt='+salt,
+		}
+	},
   onLoad() {
     if(this.option.name && !this.$util.isEmpty(this.option.name)){
       uni.setNavigationBarTitle({title:this.option.name})
@@ -280,6 +301,32 @@ export default {
     this.getUserDetail()
   },
   methods: {
+		inviteToPay(){
+			let that = this
+      let id = this.userInfo.ghsId ? this.userInfo.ghsId : 0
+      let salt = this.userInfo.salt?this.userInfo.salt:''
+			let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.ghs ? that.dictInfo.miniOriginalId.current.ghs : ''
+			uni.share({
+				provider: "weixin",
+				scene: 'WXSceneSession',
+				type: 5,
+				title: that.title,
+				summary: '暂无',
+				imageUrl: IMGHOST+'/custom/hit_me_pay_clear.jpg',//图片一定要有,不然会分享失败
+				miniProgram: {
+					id: miniOriginalId,//小程序原始id,发起分享的 App 与小程序属于同一微信开放平台帐号
+					path: "admin/custom/invitePay?id="+id+'&salt='+salt,
+					type: 0,// 0-正式版; 1-测试版; 2-体验版
+					webUrl: 'https://www.wixhb.com'
+				},
+				success: function(res) {
+					//console.log(res)
+				},
+				fail: function(err) {
+					//console.log(err)
+				}
+			})
+		},
     getPayWay(){
       let that = this
       uni.showActionSheet({