瀏覽代碼

2021-11-10

hwq 3 年之前
父節點
當前提交
a00d7d854a

+ 4 - 0
.hbuilderx/launch.json

@@ -14,6 +14,10 @@
      	{
      		"launchtype" : "local"
      	},
+     	"mp-weixin" : 
+     	{
+     		"launchtype" : "local"
+     	},
      	"type" : "uniCloud"
      }
     ]

+ 9 - 0
api/user.js

@@ -49,4 +49,13 @@ export function getUserInfo(data) {
 		method: 'get',
 		data
 	});
+}
+
+// 用户分享图
+export function spreadBanner(data) {
+	return request({
+		url: '/api/spread/banner',
+		method: 'get',
+		data
+	});
 }

+ 8 - 1
manifest.json

@@ -156,7 +156,14 @@
             "mode" : "history"
         },
         "devServer" : {
-            "port" : ""
+           "proxy": {
+           	"/api": {
+           		"target": "http://m.manyuanchunjia.com/api", //请求的目标域名
+           		"changeOrigin": true,
+           		// "secure": false,
+           		"pathRewrite": {}
+           	}
+           }
         },
         "optimization" : {
             "treeShaking" : {

+ 71 - 43
pages/address/addressManage.vue

@@ -127,44 +127,75 @@ export default {
 		clickMap() {
 			uni.showLoading({
 				title: '加载中'
-			});
-			let obj = this;
-			openMap().then(() => {
-				   uni.hideLoading();
-					uni.getLocation({
-						type: 'gcj02',
-						success(e) {
-							uni.chooseLocation({
-								latitude: e.latitude,
-								longitude: e.longitude,
-								success(e) {
-									obj.addressLocation = e;
-								},
-								fail(e) {
-									uni.showModal({
-										title:'地址选择错误',
-										content:JSON.parse(e)
-									})
-									console.log(e);
-								}
-							});
-						},fail(e) {
-							uni.showModal({
-								title:'定位错误',
-								content:JSON.parse(e)
-							})
-						}
-					});
-				})
+			});
+			let obj = this;
+			// #ifndef APP-PLUS
+			openMap().then(() => {
+				   uni.hideLoading();
+					uni.getLocation({
+						type: 'gcj02',
+						success(e) {
+							uni.chooseLocation({
+								latitude: e.latitude,
+								longitude: e.longitude,
+								success(e) {
+									obj.addressLocation = e;
+								},
+								fail(e) {
+									uni.showModal({
+										title:'地址选择错误',
+										content:JSON.parse(e)
+									})
+									console.log(e);
+								}
+							});
+						},fail(e) {
+							uni.showModal({
+								title:'定位错误',
+								content:JSON.parse(e)
+							})
+						}
+					});
+				})
 				.catch(e => {
-					console.log(e)
-					uni.hideLoading();
-					uni.showModal({
-						title: '提示',
-						content: '您未授权无法调用地图定位功能!',
-						showCancel: false
-					});
-				});
+					console.log(e)
+					uni.hideLoading();
+					uni.showModal({
+						title: '提示',
+						content: '您未授权无法调用地图定位功能!',
+						showCancel: false
+					});
+				});
+			// #endif
+			// #ifdef APP-PLUS
+			uni.hideLoading();
+			uni.getLocation({
+				type: 'gcj02',
+				success(e) {
+					uni.chooseLocation({
+						latitude: e.latitude,
+						longitude: e.longitude,
+						success(e) {
+							obj.addressLocation = e;
+						},
+						fail(e) {
+							uni.showModal({
+								title:'地址选择错误',
+								content:JSON.parse(e)
+							})
+							console.log(e);
+						}
+					});
+				},fail(e) {
+					uni.showModal({
+						title:'定位错误',
+						content:JSON.parse(e)
+					})
+				}
+			});
+			// uni.chooseLocation()
+			// #endif
+			
 		},
 		// 选中城市切换
 		onCityClick({ data }) {
@@ -229,14 +260,11 @@ export default {
 					city: data.address.city,
 					district: data.address.district
 				},
-				// detail: obj.addressLocation.name + ',' + data.area,
-				detail: "北京市东城区东长安街" + ',' + data.area,
+				detail: obj.addressLocation.name + ',' + data.area,
 				is_default: data.default,
 				id: data.id || '',
-				// longitude: obj.addressLocation.longitude,121.430479
-				// latitude: obj.addressLocation.latitude,28.644847
-				longitude: '116.397827',
-				latitude: '39.90374'
+				longitude: obj.addressLocation.longitude,
+				latitude: obj.addressLocation.latitude,
 			}).then(function(e) {
 				uni.showToast({
 					title: '提交成功',

+ 1 - 1
pages/index/index.vue

@@ -32,7 +32,7 @@
 					<text>全部分类</text>
 				</view>
 			</navigator>
-			<navigator :url="canChange==0 ? '/pages/shoping/list?type=5': ''">
+			<navigator :url="canChange==0 ? '/pages/shoping/list?type=5': '/pages/shoping/list'">
 				<view class="cate-item">
 					<image src="/static/icon/in1.png"></image>
 					<text>附近门店</text>

+ 2 - 2
pages/money/pay.vue

@@ -18,11 +18,11 @@
 					</view>
 					<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 1"></radio></label>
 				</view>
-				<!-- <view class="type-item b-b" @click="changePayType(2)">
+				<view class="type-item b-b" @click="changePayType(2)">
 					<text class="icon iconfont iconzhifubao"></text>
 					<view class="con"><text class="tit">支付宝支付</text></view>
 					<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 2"></radio></label>
-				</view> -->
+				</view>
 				<view class="type-item" @click="changePayType(3)" v-show="goodsType === 0">
 					<text class="icon iconfont iconyue"></text>
 					<view class="con">

+ 165 - 0
pages/shareQrCode/index.vue

@@ -1,3 +1,4 @@
+<<<<<<< HEAD
 <template>
 	<view class="content">
 		<!-- <view class="qrimg">
@@ -314,3 +315,167 @@ export default {
 	}
 }
 </style>
+=======
+<template>
+	<view class="container">
+		<image @longtap="bc_code" class="backImg" :src="backImg"></image>
+		<view class="tki-qrcode">
+			<canvas @longtap="bc_code" canvas-id="qrcode" />
+		</view>
+	</view>
+</template>
+
+<script>
+// import uQRCode from '@/components/Sansnn-uQRCode/uqrcode.js'
+import { getUserInfo,spreadBanner } from '@/api/user.js';
+export default {
+	props: {
+		qrval: {
+			// 要生成的二维码值
+			type: String,
+		}
+	},
+	data() {
+		return {
+			url: '',
+			backImg:'',
+			userInfo:''
+		};
+	},
+	onLoad() {
+		this.spread();
+		this.getInfo();
+	},
+	computed: {
+			cpSize() {
+				if(this.unit == "upx"){
+					return uni.upx2px(this.size)
+				}else{
+					return this.size
+				}
+			}
+	},
+	methods: {
+		spread(){
+			let obj = this;
+			spreadBanner({
+				type:2
+			}).then(({ data }) => {
+				obj.backImg = data[0].wap_poster;
+			});
+		},
+		getInfo(){
+			let obj = this;
+			getUserInfo({}).then(({ data }) => {
+				obj.userInfo = data;
+				// obj.loadData()
+			});
+		},
+		bc_code(){
+			let that = this;
+			console.log('保存二维码',this.backImg)
+			uni.downloadFile({           //获得二维码的临时地址
+				url:this.backImg,
+				success:(res)=>{
+					//console.log('获取url',res)
+					if(res.statusCode == 200){
+						uni.saveImageToPhotosAlbum({
+							filePath:res.tempFilePath,//传入临时地址
+							success() {
+								that.$api.msg('保存成功')//封装的提示
+							},
+							fail() {
+								that.$api.msg('保存失败')
+							}
+						})
+					}
+				}
+			})
+		},
+		//生成二维码
+		  // make() {
+			 //  let obj = this;
+		  //     uQRCode.make({
+		  //       canvasId: 'qrcode',
+		  //       componentInstance: this,
+		  //       text: obj.url,
+		  //       size: 150,
+		  //       margin: 10,
+		  //       backgroundColor: '#ffffff',
+		  //       foregroundColor: '#000000',
+		  //       fileType: 'png',
+		  //       correctLevel: uQRCode.defaults.correctLevel,
+		  //       success: res => {
+		  //         // console.log(res)
+		  //       }
+		  //     })
+		  //   },
+		// 请求载入数据
+		// async loadData() {
+		// 	let obj = this;
+		// 	obj.url = 'http://btex.frp.liuniu946.com/?id='+ obj.userInfo.invite_code;
+		// 	obj.make();
+		// },
+	},
+};
+</script>
+
+<style lang="scss">
+	page{
+		width: 100%;
+		min-height: 100%;
+		.container{
+			width: 100%;
+			height: 100%;	
+		}
+	}
+	.backImg{
+		position: absolute;
+		width: 100%;
+		height: 100%;
+	}
+.portrait{
+	width: 100%;
+	text-align: center;
+	padding-top: 80rpx;
+	padding-bottom: 30rpx;
+	image{
+		width: 250rpx;
+		height: 250rpx;
+	}
+}
+.text{
+	text-align: center;
+	width: 100%;
+	color: #FFFFFF;
+	font-size:55rpx;
+	letter-spacing:15rpx;
+}
+.uid-name{
+	padding: 50rpx 0rpx;
+	text-align: center;
+	width: 100%;
+	color: #FFFFFF;
+}
+.copy-btn{
+	color: #FFFFFF;
+	background-color: #4BA6ED;
+	border-radius: 50rpx;
+	width: 170rpx;
+	line-height: 70rpx;
+	margin: 0rpx auto;
+	text-align: center;
+}
+.tki-qrcode{
+	position: fixed;
+	bottom: 10%;
+	left: 30%;
+}
+canvas{
+	width:150px;
+	height: 150px;
+	margin: auto;
+	
+}
+</style>
+>>>>>>> 4114c25969fb9b7b2c1d4af1f04837ed1c250f54

+ 1 - 1
store/index.js

@@ -5,7 +5,7 @@ Vue.use(Vuex)
 
 const store = new Vuex.Store({
 	state: {
-		baseURL:"http://myc.frp.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置 
+		baseURL:"http://m.manyuanchunjia.com",//'http://eb.shuibo.net',//请求地址配置 
 		// baseURL:"http://cys.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置
 		loginInterceptor:true,//是否打开强制登录
 		urlFile:'/index',//项目部署所在文件夹

二進制
unpackage/cache/apk/__UNI__BDCC031_cm.apk


+ 1 - 1
unpackage/cache/apk/apkurl

@@ -1 +1 @@
-https://ide.dcloud.net.cn/build/download/9cf9d0e0-3168-11ec-b6cd-7b9b917b21ba
+https://ide.dcloud.net.cn/build/download/0ac5e9b0-3184-11ec-9899-d553ef9ce885

文件差異過大導致無法顯示
+ 0 - 0
unpackage/cache/apk/cmManifestCache.json


文件差異過大導致無法顯示
+ 0 - 0
unpackage/cache/wgt/__UNI__BDCC031/app-service.js


文件差異過大導致無法顯示
+ 0 - 0
unpackage/cache/wgt/__UNI__BDCC031/app-view.js


文件差異過大導致無法顯示
+ 0 - 0
unpackage/cache/wgt/__UNI__BDCC031/manifest.json


二進制
unpackage/release/apk/__UNI__BDCC031__20211020152336.apk


二進制
unpackage/release/apk/__UNI__BDCC031__20211020165932.apk


部分文件因文件數量過多而無法顯示