lhl há 2 anos atrás
pai
commit
4967755504
6 ficheiros alterados com 117 adições e 158 exclusões
  1. 1 1
      manifest.json
  2. 8 52
      pages/index/index.vue
  3. 97 97
      pages/user/shareQrCode.vue
  4. 10 7
      pages/user/user.vue
  5. BIN
      static/img/app.png
  6. 1 1
      store/index.js

+ 1 - 1
manifest.json

@@ -128,7 +128,7 @@
         "devServer" : {
             "proxy" : {
                 "/api" : {
-                    "target" : "http://hgd.liuniu946.com/api",
+                    "target" : "http://hogendyapp.com/api",
                     // "changeOrigin": true,
                     "pathRewrite" : {
                         "/api" : "" // rewrite path

+ 8 - 52
pages/index/index.vue

@@ -115,10 +115,12 @@
 						<view class="title">已经为您定制专属客服</view>
 						<image src="../../static/img/img010.png" mode=""></image>
 					</view>
-					<view class="nocancel">客服VX:{{ text }}</view>
+					<view class="nocancel">客服VX:{{ text }}</view>
+					<view class="nocancel">客服QQ:{{ textqq }}</view>
 					<view class="comfirm-box">
-						<view class="cancel" @click="cancel">取消</view>
-						<view class="comfirm" @click="comfirm(text)">复制微信</view>
+						<!-- <view class="cancel" @click="cancel">取消</view> -->
+						<view class="comfirm" @click="comfirm(text)">复制微信</view>
+						<view class="comfirm" @click="comfirm(textqq)">复制QQ</view>
 					</view>
 				</view>
 			</view>
@@ -157,7 +159,8 @@
 	export default {
 		data() {
 			return {
-				text: 'shxsophina', //客服微信
+				text: 'shxsophina', //客服微信
+				textqq: '3561707986',
 				page: 1,
 				limitt: 20,
 				loadingType: 'more',
@@ -182,53 +185,6 @@
 		computed: {
 			...mapState('user', ['hasLogin', 'userInfo'])
 		},
-		onShareAppMessage(options) {
-			// 设置菜单中的转发按钮触发转发事件时的转发内容
-			let pages = getCurrentPages(); //获取加载的页面
-			let currentPage = pages[pages.length - 1]; //获取当前页面的对象
-			let url = currentPage.route; //当前页面url
-			let item = currentPage.options; //如果要获取url中所带的参数可以查看options
-			let shareObj = {}
-			if (this.userInfo.uid) {
-				shareObj = {
-					title: this.userInfo.nickname + '邀请您加入顺肠清', // 默认是小程序的名称(可以写slogan等)
-					path: url + '?scene=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
-					imageUrl: '',
-					success: function(res) {
-						// 转发成功之后的回调
-						if (res.errMsg == 'shareAppMessage:ok') {}
-					},
-					fail: function() {
-						// 转发失败之后的回调
-						if (res.errMsg == 'shareAppMessage:fail cancel') {
-							// 用户取消转发
-						} else if (res.errMsg == 'shareAppMessage:fail') {
-							// 转发失败,其中 detail message 为详细失败信息
-						}
-					}
-				};
-			} else {
-				shareObj = {
-					title: '顺肠清', // 默认是小程序的名称(可以写slogan等)
-					path: url, // 默认是当前页面,必须是以‘/’开头的完整路径
-					imageUrl: '',
-					success: function(res) {
-						// 转发成功之后的回调
-						if (res.errMsg == 'shareAppMessage:ok') {}
-					},
-					fail: function() {
-						// 转发失败之后的回调
-						if (res.errMsg == 'shareAppMessage:fail cancel') {
-							// 用户取消转发
-						} else if (res.errMsg == 'shareAppMessage:fail') {
-							// 转发失败,其中 detail message 为详细失败信息
-						}
-					}
-				};
-			}
-
-			return shareObj;
-		},
 		onReachBottom() {
 			console.log('到底')
 			this.getGoodList()
@@ -668,7 +624,7 @@
 
 	.popup-box {
 		width: 522rpx;
-		height: 605rpx;
+		height: 630rpx;
 		background-color: #ffffff;
 		border-radius: 20rpx;
 		position: relative;

+ 97 - 97
pages/user/shareQrCode.vue

@@ -1,98 +1,98 @@
-<template>
-	<view class="content">
-		<image src="../../static/img/sharebase.png" mode="widthFix" class="baseimg"></image>
-		<view class="erweima">
-			<tki-qrcode
-				:cid="cid"
-				ref="qrcode"
-				:val="val"
-				:size="size"
-				:unit="unit"
-				:background="background"
-				:foreground="foreground"
-				:pdground="pdground"
-				:iconSize="iconSize"
-				:lv="lv"
-				:onval="onval"
-				:loadMake="loadMake"
-				:usingComponents="usingComponents"
-				@result="qrR"
-			/>
-		</view>
-	</view>
-</template>
-<script>
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex';
-	import {
-		getUserInfo
-	} from '@/api/user.js';
-	export default {
-		data() {
-			return {
-				val: '',
-				cid: 'cid',
-				size: 150,
-				unit: '150',
-				background: '#FFFFFF',
-				foreground: '#000000',
-				pdground: '#000000',
-				icon: '',
-				iconSize: 40,
-				lv: 3,
-				onval: true,
-				loadMake: true,
-				usingComponents: true,
-			};
-		},
-		onLoad() {
-			const obj = this;
-			if(!this.userInfo.uid){
-				getUserInfo({}).then(e => {
-					// 保存返回用户数据
-					obj.setUserInfo(e.data);
-					//成功跳转首页
-					uni.switchTab({
-						url: '/pages/index/index'
-					});
-				});
-			}else{
-				this.val = 'http://hgd.liuniu946.com/appdom/index.html?spread=' + this.userInfo.uid
-			}
-		},
-		onShow() {
-		},
-		//下拉刷新
-		onPullDownRefresh() {
-	
-		},
-		computed: {
-			...mapState(['baseURL', 'urlFile']),
-			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
-		},
-		methods: {
-			qrR(res) {
-				this.src = res;
-			},
-
-		}
-	};
-</script>
-
-<style lang="scss">
-.baseimg {
-	width: 100%;
-}
-.erweima {
-	width: 300rpx;
-	position: absolute;
-	top: 948rpx;
-	left: 0;
-	right: 0;
-	margin: auto;
-	display: flex;
-	justify-content: center;
-}
+<template>
+	<view class="content">
+		<image src="../../static/img/sharebase.png" mode="widthFix" class="baseimg"></image>
+		<view class="erweima" :style="{'top': height,'width': ewidth,'height': ewidth}">
+			<tki-qrcode :cid="cid" ref="qrcode" :val="val" :size="size" :unit="unit" :background="background"
+				:foreground="foreground" :pdground="pdground" :iconSize="iconSize" :lv="lv" :onval="onval"
+				:loadMake="loadMake" :usingComponents="usingComponents" @result="qrR" />
+		</view>
+	</view>
+</template>
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		getUserInfo
+	} from '@/api/user.js';
+	export default {
+		data() {
+			return {
+				ewidth: '',
+				height: '',
+				val: '',
+				cid: 'cid',
+				size: 150,
+				unit: '150',
+				background: '#FFFFFF',
+				foreground: '#000000',
+				pdground: '#000000',
+				icon: '',
+				iconSize: 40,
+				lv: 3,
+				onval: true,
+				loadMake: true,
+				usingComponents: true,
+				bs: 0,
+			};
+		},
+		onLoad() {
+			const obj = this;
+			if (!this.userInfo.uid) {
+				getUserInfo({}).then(e => {
+					// 保存返回用户数据
+					obj.setUserInfo(e.data);
+					//成功跳转首页
+					uni.switchTab({
+						url: '/pages/index/index'
+					});
+				});
+			} else {
+				this.val = 'http://hgd.liuniu946.com/appdom/index.html?spread=' + this.userInfo.uid
+			}
+		},
+		onShow() {},
+		//下拉刷新
+		onPullDownRefresh() {
+		},
+		onReady() {
+		},
+		computed: {
+			...mapState(['baseURL', 'urlFile']),
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+		},
+		methods: {
+			qrR(res) {
+				this.src = res;
+				this.setImageHeight()
+			},
+			setImageHeight: function() {
+				var _this = this;
+				const query = uni.createSelectorQuery().in(this);
+				query.select('.baseimg').boundingClientRect(data => {
+					_this.height = (547/816)*data.height + 'px'
+					_this.ewidth = (215/816)*data.height + 'px'
+				}).exec();
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.baseimg {
+		width: 100%;
+	}
+
+	.erweima {
+		// width: 300rpx;
+		position: absolute;
+		// top: 930rpx;
+		left: 0;
+		right: 0;
+		margin: auto;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
 </style>

+ 10 - 7
pages/user/user.vue

@@ -6,13 +6,13 @@
 		</view>
 		<view class="" style="height: 150rpx;"></view>
 		<view class="user-box">
-			<view class="user-info flex">
+			<view class="user-info flex" @click="navTo('/pages/set/userinfo')">
 				<image class="avatar" :src="userInfo.avatar" mode="" v-if="userInfo.avatar"
 					></image>
-				<image class="avatar" src="../../static/error/missing-face.png" mode="" v-else></image>
+				<image class="avatar" src="../../static/img/app.png" mode="" v-else></image>
 				<view class="user-name-id">
 					<view class="user-name clamp2">{{userInfo.nickname  || '游客'}}</view>
-					<view class="user-uid">邀请码:{{userInfo.uid || ''}}</view>
+					<view class="user-uid" v-if="userInfo.uid">邀请码:{{userInfo.uid || ''}}</view>
 				</view>
 			</view>
 			<view class="flex yexq">
@@ -145,10 +145,12 @@
 						<view class="title">已经为您定制专属客服</view>
 						<image src="../../static/img/img010.png" mode=""></image>
 					</view>
-					<view class="nocancel">客服VX:{{ text }}</view>
+					<view class="nocancel">客服VX:{{ text }}</view>
+					<view class="nocancel">客服QQ:{{ textqq }}</view>
 					<view class="comfirm-box">
-						<view class="cancel" @click="cancel">取消</view>
-						<view class="comfirm" @click="comfirm(text)">复制微信</view>
+						<!-- <view class="cancel" @click="cancel">取消</view> -->
+						<view class="comfirm" @click="comfirm(text)">复制微信</view>
+						<view class="comfirm" @click="comfirm(textqq)">复制QQ</view>
 					</view>
 				</view>
 			</view>
@@ -181,7 +183,8 @@
 			uniListItem
 		},
 		data() {
-			return {
+			return {
+				textqq: '3561707986',
 				current: 2,
 				id: '', //是否已签到
 				store_name: '',

BIN
static/img/app.png


+ 1 - 1
store/index.js

@@ -6,7 +6,7 @@ Vue.use(Vuex)
 const store = new Vuex.Store({
 	state: {
 		// baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置 
-		baseURL:'http://hgd.liuniu946.com',//请求地址配置 
+		baseURL:'http://hogendyapp.com',//请求地址配置 
 		urlFile:'/index',//项目部署所在文件夹
 		userInfo: {}, //登录信息
 		loginInterceptor:false,//是否打开强制登录