lhl 2 years ago
parent
commit
e3cb77c0e8
4 changed files with 53 additions and 14 deletions
  1. 2 1
      manifest.json
  2. 42 10
      pages/shop/rent.vue
  3. 6 1
      pages/shop/shopTab.vue
  4. 3 2
      store/index.js

+ 2 - 1
manifest.json

@@ -183,7 +183,8 @@
         "devServer" : {
             "proxy" : {
                 "/api" : {
-                    "target" : "https://wx.linkaa.cn/api",
+                    // "target" : "https://wx.linkaa.cn/api",
+					"target" : "http://ltzd.frp.liuniu946.com/api",
                     // "changeOrigin": true,
                     "pathRewrite" : {
                         "/api" : "" // rewrite path

+ 42 - 10
pages/shop/rent.vue

@@ -176,15 +176,23 @@
 		<view class="ts">
 
 		</view>
-		<!-- 		<view class="btm-btn flex">
-			<view class="pay-price" >
+		<!-- <view class="btm-btn flex">
+			<view class="pay-price">
 				总计费用:<text>{{(selectTc.price*1) || ''}}</text>
 			</view>
-			<view class="pay-btn" @click="toBuy" :class="{'zfz': loading}">
-				{{loading?'支付中':'立即支付'}}
+			<view class="pay-btn" @click="toBuy" :class="{'zfz': loading}" v-if="">
+				{{loading?'支付中':''}}
 			</view>
 		</view> -->
-		<view class="btm-btn flex" v-if="!showbtn">
+		<view class="btm-btn flex" >
+			<view class="pay-price">
+				押金:<text>{{(selectTc.deposit*1) || ''}}</text>
+			</view>
+			<view class="pay-btn" @click="toBuy" :class="{'zfz': loading}">
+				{{loading?'支付中':'支付押金'}}
+			</view>
+		</view>
+<!-- 		<view class="btm-btn flex" v-if="!showbtn">
 			<view class="pay-price">
 				总计费用:<text>{{(selectTc.price*1) || ''}}</text>
 			</view>
@@ -192,19 +200,20 @@
 				获取免押二维码
 			</view>
 		</view>
-		<!-- //showbtn -->
 		<view class="btm-btn flex" v-else
-			style="text-align: center;color: #fff;background-color: #6cd9c0;justify-content: center;" @click="saveShareQrcode">
+			style="text-align: center;color: #fff;background-color: #6cd9c0;justify-content: center;"
+			@click="saveShareQrcode">
 			保存二维码
-
-		</view>
+		</view> -->
 		<uni-popup ref="mypopup" type="center" @change="mychange">
 			<view class="myj-wrap">
 				<view class="ewm-wrap">
 					<canvas :style="{ width:cw + 'rpx', height: ch+'rpx',}" canvas-id="myCanvas" id="myCanvas"
 						class="hb"></canvas>
 				</view>
-
+				<view class="bcewm" @click="saveShareQrcode">
+					保存二维码
+				</view>
 			</view>
 
 		</uni-popup>
@@ -429,6 +438,7 @@
 									that.canvasShow = false
 									that.shareQrcodeUrl = res.tempFilePath
 									that.$forceUpdate()
+									uni.hideLoading()
 									setTimeout(function() {
 										console.log(that.shareQrcodeUrl, that
 											.canvasShow)
@@ -576,6 +586,9 @@
 				if (!that.is_tj && that.selctStore.id == '') {
 					return that.$api.msg('请选择门店')
 				}
+				uni.showLoading({
+					title:'二维码生成中...'
+				})
 				that.loading = true
 				rentCreate({
 					store_id: that.is_tj ? that.userinfo.store_id : that.selctStore.id,
@@ -595,6 +608,10 @@
 					status,
 					msg
 				}) => {
+					that.val = data.result.link
+					// uni.hideLoading()
+					that.$refs.mypopup.open()
+					/**
 					if (data.status == 'ORDER_EXIST') {
 						uni.showModal({
 							title: '提示',
@@ -641,6 +658,7 @@
 						wx.requestPayment(paydata);
 						// #endif
 					}
+					**/
 				})
 			},
 			orderMoneyPay() {
@@ -1095,4 +1113,18 @@
 		border-radius: 20rpx;
 		overflow: hidden;
 	}
+	.bcewm {
+		background-color: $base-color;
+		color: #fff;
+		text-align: center;
+		height: 80rpx;
+		width: 450rpx;
+		border-radius: 40rpx;
+		margin: auto;
+		margin-top: 30rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		// margin-left: 75rpx;
+	}
 </style>

+ 6 - 1
pages/shop/shopTab.vue

@@ -125,13 +125,18 @@
 			// 获取经纬度
 			getlocation() {
 				let obj = this;
-				// #ifdef H5 || APP
+				// #ifdef H5
+				this.storeList();
+				// #endif
+				// #ifdef  APP
 				uni.getLocation({
 					type: 'gcj02',
 					success(e) {
+						console.log(e,'获取地址');
 						obj.getlocationSetInit(e)
 					},
 					fail(e) {
+						console.log(e,'获取地址失败');
 						if(e.errCode==22){
 							uni.showModal({
 								title: '定位开启错误',

+ 3 - 2
store/index.js

@@ -7,8 +7,9 @@ Vue.use(Vuex)
 const store = new Vuex.Store({
 	state: {
 		// baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置 
-		baseURL:'https://wx.linkaa.cn',//请求地址配置 
-		// baseURL:'http://dp.frp.shuibo.net',//请求地址配置 
+		// baseURL:'https://wx.linkaa.cn',//请求地址配置 
+		
+		baseURL:'http://ltzd.frp.liuniu946.com',//请求地址配置 
 		urlFile:'/index',//项目部署所在文件夹
 		hasLogin:false,
 		// #ifdef H5