wenxingxing 11 часов назад
Родитель
Сommit
88998daa5f

+ 1 - 5
pages.json

@@ -4138,7 +4138,6 @@
 					"path": "storeOrderDetail",
 					"style": {
 						"navigationBarTitleText": "服务详情",
-						"navigationStyle": "custom",
 						"enablePullDownRefresh": false
 					}
 				},
@@ -4230,10 +4229,7 @@
 				{
 					"path": "managerOrder/productList",
 					"style": {
-						"navigationBarTitleText": "商品列表",
-						"app-plus": {
-							"titleNView": false
-						}
+						"navigationBarTitleText": "商品列表"
 					}
 				},
 				{

+ 40 - 23
pages/shopping/productDetails.vue

@@ -27,6 +27,10 @@
 					<text class="label">零售价</text>
 					<text class="old">¥{{product.otPrice}}</text>
 				</view>
+				<view class="share-box" @tap="handleOpenShare">
+					<text class="text">分享</text>
+					<u-icon name="share-fill" color="#FF233C" size="18"></u-icon>
+				</view>
 				<!-- <view class="share-box" v-if="userinfo.isShow==1&&isuser==false">
 					<text class="text">分享</text>
 					<image src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/share1.png" mode="">
@@ -294,30 +298,43 @@ import CustomToast from '@/components/custom-toast.vue';
 				this.isuser = true
 			}
 		},
-		//发送给朋友
-		onShareAppMessage(res) {
-			if (this.$isLogin()) {
-				var user = JSON.parse(uni.getStorageSync('userInfo'))
-				return {
-					title: this.product.productName,
-					path: '/pages/shopping/productDetails?productId=' + this.product.productId + "&userId=" + user.userId,
-					imageUrl: '/static/logo.jpg' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
-				}
-			}
-		},
-		//分享到朋友圈
-		onShareTimeline(res) {
-			if (this.$isLogin()) {
-				var user = JSON.parse(uni.getStorageSync('userInfo'))
-				return {
-					title: this.product.productName,
-					query: 'productId=' + this.product.productId + "&userId=" + user.userId, //页面参数
-					imageUrl: '/static/logo.jpg' //分享图标,路径可以是本地文件路径、代码包文件路径或者网络图片路径.支持PNG及JPG。显示图片长宽比是 5:4
-				}
-			}
-
-		},
 		methods: {
+			handleOpenShare() {
+				//#ifdef H5
+					uni.showToast({
+						title: '请使用APP操作',
+						icon: 'none'
+					});				
+				//#endif
+				
+				//#ifdef APP-PLUS
+				uni.share({
+					provider: "weixin",
+					scene: 'WXSceneSession',
+					type: 5,
+					imageUrl: 'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/app/vip/share.png', //分享封面图片
+					title: this.product.productName, // 分享标题
+					miniProgram: {
+						id: getApp().globalData.miniprogamId,
+						path: '/pages/shopping/productDetails?productId=' + this.product.productId + "&userId=" + this.userinfo.userId,
+						type: 0, //0-正式版; 1-测试版; 2-体验版。 默认值为0。
+						webUrl: "http://uniapp.dcloud.io"
+					},
+					success: function(res) {
+						uni.showToast({
+							title: "分享成功",
+							icon: 'none'
+						});
+					},
+					fail: function(err) {
+						// 此处是调起微信分享失败的回调
+					},
+					complete: (e) => {
+						console.log("WXSceneSession", e)
+					}
+				});
+				//#endif
+			},
 			getuser() {
 				getUserInfo().then(
 					res => {

+ 11 - 11
pages_company/managerOrder/productDetails.vue

@@ -531,17 +531,17 @@ import CustomToast from '@/components/custom-toast.vue';
 			// 加入购物车
 			addCart(type) {
 				if (type == 'buy') {
-					let userInfoStr = uni.getStorageSync('userInfo');
-					if(Object.prototype.toString.call(userInfoStr) == '[object String]'){
-						userInfoStr = userInfoStr!=''?JSON.parse(userInfoStr):''
-					}
-					//console.log('userInfoStr.phone',userInfoStr.phone)
-					if (!userInfoStr || !userInfoStr.maOpenId|| !userInfoStr.phone) {
-						uni.navigateTo({
-							url: '/pages/auth/login'
-						});
-						return;
-					}
+					// let userInfoStr = uni.getStorageSync('userInfo');
+					// if(Object.prototype.toString.call(userInfoStr) == '[object String]'){
+					// 	userInfoStr = userInfoStr!=''?JSON.parse(userInfoStr):''
+					// }
+					// //console.log('userInfoStr.phone',userInfoStr.phone)
+					// if (!userInfoStr || !userInfoStr.maOpenId|| !userInfoStr.phone) {
+					// 	uni.navigateTo({
+					// 		url: '/pages/auth/login'
+					// 	});
+					// 	return;
+					// }
 				}
 				if(this.$isLogin()){
 					this.type = type;

+ 4 - 1
pages_company/managerOrder/productList.vue

@@ -2,6 +2,9 @@
 	<view class="content">
 		<view class="top-fixed">
 			<!-- 搜索框 -->
+			<view>
+				<view :style="{height: statusBarHeight}"></view>
+			</view>
 			<view class="search-cont">
 				<view class="inner">
 					<image class="icon-search" src="https://jnlzjk-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/search.png" mode=""></image>
@@ -67,6 +70,7 @@
 		mixins: [MescrollMixin], 
 		data() {
 			return {
+				statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
 				downOption: {
 					auto: false, 
 					use:true,
@@ -202,7 +206,6 @@
 	.top-fixed{
 		width: 100%;
 		position: fixed;
-		top: 0;
 		left: 0;
 		z-index: 10;
 	}

+ 3 - 3
pages_company/storeOrderDetail.vue

@@ -6,7 +6,7 @@
 			</image>
 			<view class="top-inner">
 				<!-- 这里是状态栏 -->
-				<view class="fixed-top-box">
+				<!-- <view class="fixed-top-box">
 					<view class="status_bar" :style="{height: statusBarHeight}"></view>
 					<view class="back-box" @click="back">
 						<image src="https://zkzh-2025.oss-cn-beijing.aliyuncs.com/shop/images/back_white.png" mode="">
@@ -14,10 +14,10 @@
 						<text class="title">订单详情</text>
 						<text></text>
 					</view>
-				</view>
+				</view> -->
 
 				<!-- 顶部固定后站位元素 -->
-				<view style="padding-bottom: 88upx;">
+				<view>
 					<view :style="{height: statusBarHeight}"></view>
 				</view>
 				<!-- 订单状态 -->

+ 1 - 1
pages_company/storeProductPackage.vue

@@ -197,7 +197,7 @@
 	.top-fixed{
 		width: 100%;
 		position: fixed;
-		top: 0;
+		// top: 0;
 		left: 0;
 		z-index: 10;
 		.search-cont{