lhl 9 月之前
父节点
当前提交
618d74eab2

+ 4 - 1
App.vue

@@ -4,7 +4,7 @@
  */
 import { mapMutations,mapState } from 'vuex';
 // #ifdef H5
-import { weixindata, setRouter } from './utils/wxAuthorized';
+import { weixindata, setRouter ,shareLoad} from './utils/wxAuthorized';
 // #endif
 // #ifdef H5
 	import weixinObj from "@/plugin/jweixin-module/index.js";
@@ -109,6 +109,9 @@ export default {
 		}
 		// #endif
 		// this.getAddress()
+		// #ifdef H5
+		// shareLoad()
+		// #endif
 	},
 	onShow: function() {
 		// 加载拦截

+ 1 - 1
pages.json

@@ -22,7 +22,7 @@
 		{
 			"path": "pages/index/gift",
 			"style": {
-				"navigationBarTitleText": ""
+				"navigationBarTitleText": "商品列表"
 			}
 		},
 		// {

+ 6 - 0
pages/cart/cart.vue

@@ -95,6 +95,11 @@
 		saveUrl,
 		interceptor
 	} from '@/utils/loginUtils.js';
+	// #ifdef H5
+	import {
+		shareLoad
+	} from '@/utils/wxAuthorized';
+	// #endif
 	export default {
 		components: {
 			uniNumberBox
@@ -115,6 +120,7 @@
 			}
 			// #ifdef H5
 			weixinObj.hideAllNonBaseMenuItem();
+			shareLoad()
 			// #endif
 			
 		},

+ 8 - 0
pages/category/category.vue

@@ -19,6 +19,11 @@
 
 <script>
 import { getCategoryList } from '@/api/product.js';
+// #ifdef H5
+	import {
+		shareLoad
+	} from '@/utils/wxAuthorized';
+	// #endif
 export default {
 	data() {
 		return {
@@ -30,6 +35,9 @@ export default {
 	},
 	onLoad() {
 		this.loadData();
+		// #ifdef H5
+		shareLoad()
+		// #endif
 	},
 	// 监听导航栏输入框点击事件
 	onNavigationBarSearchInputClicked(e) {

+ 25 - 1
pages/index/gift.vue

@@ -13,7 +13,7 @@
 					<view class="hot-price">
 						<view class="price">
 							<text>¥{{ jfitem.price * 1 }}</text>
-							<text class="ot-pirce">¥{{jfitem.ot_price}}</text>
+							<text class="ot-pirce" v-if="jfitem.ot_price*1 >jfitem.price * 1 ">¥{{jfitem.ot_price}}</text>
 						</view>
 					</view>
 				</view>
@@ -24,6 +24,12 @@
 </template>
 
 <script>
+	// #ifdef H5
+	import {
+		weixindata,
+		shareLoad
+	} from '@/utils/wxAuthorized';
+	// #endif
 	import empty from '@/components/empty.vue'
 	import {
 		getBargainList,
@@ -57,6 +63,9 @@
 				})
 			}
 			this.getGoodList()
+			// #ifdef H5
+			this.shareDate()
+			// #endif
 		},
 		onShow() {
 
@@ -68,6 +77,21 @@
 			this.getGoodList('down')
 		},
 		methods: {
+			// #ifdef H5
+			// 加载微信html5页面分享方法
+			shareDate() {
+				// let obj = this;
+				// 保存分享人id链接
+				// let url = window.location.href + '&spread=' + this.userInfo.uid;
+				// 判断是否微信浏览器
+				// let bool = uni.getStorageSync('weichatBrowser') || '';
+				// if (bool) {
+				// 	// 过滤微信强制添加的链接地址
+				// 	url = url.replace(/[\?,&]from=singlemessage/g, '');
+				// }
+				shareLoad();
+			},
+			// #endif
 			navto(url) {
 				uni.navigateTo({
 					url,

+ 3 - 1
pages/index/index.vue

@@ -49,6 +49,7 @@
 								<text>¥{{ jfitem.price * 1 }}</text>
 								<text class="ot-pirce">¥{{jfitem.ot_price}}</text>
 							</view>
+							<image src="../../static/icon/gobuy.png" mode="" style="width: 60rpx;height:50rpx;"></image>
 						</view>
 					</view>
 
@@ -232,6 +233,7 @@
 			}
 			// #endif
 			// #ifdef H5
+			shareLoad()
 			if (option.spread) {
 				// 存储小程序邀请人
 				uni.setStorage({
@@ -248,7 +250,7 @@
 		onHide() {},
 		methods: {
 			gogogo(item) {
-				let url = item.link + '&tit=' + item.tit
+				let url = item.link + '&tit=' + item.tit + '&isgift=0'
 				if(url.indexOf('http') != -1 ) {
 					// #ifdef H5
 					window.location.href = url

+ 9 - 8
pages/order/order.vue

@@ -59,6 +59,7 @@
 							<!-- <button v-if="item._status._title == '待评价'" class="action-btn">评价</button> -->
 							<button v-if="item._status._title == '待收货'" @click.stop="orderTake(item, index)" class="action-btn">确认收货</button>
 							<!-- <button v-if="item._status._title == '未发货'" class="action-btn" @click.stop="orderRefund(item)">申请退款</button> -->
+							<button v-if="tabCurrentIndex != 4 && tabCurrentIndex != 2" class="action-btn" @click.stop="orderRefund(item)">申请退款</button>
 						</view>
 					</view>
 
@@ -114,14 +115,14 @@ export default {
 					page: 1, //当前页数
 					limit: 10 //每次信息条数
 				},
-				// {
-				// 	state: 4,
-				// 	text: '已完成',
-				// 	loadingType: 'more',
-				// 	orderList: [],
-				// 	page: 1, //当前页数
-				// 	limit: 10 //每次信息条数
-				// }
+				{
+					state: 5,
+					text: '退款',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}
 			]
 		};
 	},

+ 1 - 1
pages/order/orderDetail.vue

@@ -134,7 +134,7 @@
 					<text class="title" v-if="item.delivery_type == 'send'">送货人员:</text>
 					<view class="text">{{ item.delivery_name }}</view>
 				</view>
-				<view v-if="status._type != 1 && status._type != 0" class="buttom-right" @click="towuliu(item)">查看物流</view>
+				<!-- <view v-if="status._type != 1 && status._type != 0" class="buttom-right" @click="towuliu(item)">查看物流</view> -->
 			</view>
 			<view class="item flex">
 				<view class="title-left flex">

+ 9 - 1
pages/product/list.vue

@@ -21,7 +21,7 @@
 		<view class="goods-list">
 			<view v-for="(item, index) in goodsList" :key="index" class="goods-item" @click="navToDetailPage(item)">
 				<view class="image-wrapper"><image :src="item.image" mode="aspectFill"></image></view>
-				<text class="title clamp">{{ item.title }}</text>
+				<text class="title clamp">{{ item.store_name }}</text>
 				<view class="price-box">
 					<text class="price">{{ item.price }}</text>
 					<text>已售 {{ item.sales }}</text>
@@ -49,6 +49,11 @@
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 import { getProducts } from '@/api/product.js';
 import { getCategoryList } from '@/api/product.js';
+	// #ifdef H5
+	import {
+		shareLoad
+	} from '@/utils/wxAuthorized';
+	// #endif
 export default {
 	components: {
 		uniLoadMore
@@ -77,6 +82,9 @@ export default {
 		this.cateId = options.tid;
 		this.loadCateList(options.fid, options.sid);
 		this.loadData();
+		// #ifdef H5
+		shareLoad()
+		// #endif
 	},
 	onPageScroll(e) {
 		//兼容iOS端下拉时顶部漂移

+ 8 - 3
pages/product/product.vue

@@ -260,6 +260,9 @@
 				this.groupGoods();
 				return;
 			}
+			
+		},
+		onShow() {
 			if (this.goodsType == 0) {
 				// 加载普通商品详情
 				this.goodsDetail();
@@ -318,6 +321,10 @@
 					if (obj.goodsObjact.is_pack == 1 || obj.goodsObjact.is_one == 1) {
 						obj.goodsNumberMax = 1
 					}
+					// #ifdef H5
+					
+					obj.shareDate();
+					// #endif
 					// 保存默认选中的对象
 					obj.specSelected = []; //初始化默认选择对象
 					for (let i = 0; i < obj.specList.length; i++) {
@@ -334,9 +341,7 @@
 					obj.uniqueId = obj.productValue[str].unique;
 					obj.goodIntegral = obj.productValue[str].integral
 
-					// #ifdef H5
-					obj.shareDate();
-					// #endif
+					
 				});
 			},
 			// #ifdef H5

+ 19 - 0
pages/user/user.vue

@@ -134,6 +134,16 @@
 			</view>
 			<image src="../../static/icon/back.png" mode="" class="right-img"></image>
 		</view>
+		<!-- #ifdef MP -->
+		<button open-type="contact" plain="true" class="user-list flex" style="border: none;background-color: #fff;">
+			<image src="../../static/icon/u5.png" mode="" class="left-img"></image>
+			<view class="" style="text-align: left;">
+				客服
+			</view>
+			<image src="../../static/icon/back.png" mode="" class="right-img"></image>
+		</button>
+		<!-- #endif -->
+		<!-- #ifdef H5 -->
 		<view class="user-list flex" @click="openKf()">
 			<image src="../../static/icon/u5.png" mode="" class="left-img"></image>
 			<view class="">
@@ -141,6 +151,7 @@
 			</view>
 			<image src="../../static/icon/back.png" mode="" class="right-img"></image>
 		</view>
+		<!-- #endif -->
 		<view class="user-list flex" @click="navTo('/pages/set/set')">
 			<image src="../../static/icon/u6.png" mode="" class="left-img"></image>
 			<view class="">
@@ -218,6 +229,11 @@
 		saveUrl,
 		interceptor
 	} from '@/utils/loginUtils.js';
+	// #ifdef H5
+	import {
+		shareLoad
+	} from '@/utils/wxAuthorized';
+	// #endif
 	let startY = 0,
 		moveY = 0,
 		pageAtTop = true;
@@ -247,6 +263,9 @@
 			// 	this.loadBaseData();
 			// }
 			this.loadBaseData();
+			// #ifdef H5
+			shareLoad()
+			// #endif
 		},
 		filters: {
 			phone(e) {

二进制
static/icon/gobuy.png


+ 2 - 1
utils/wxAuthorized.js

@@ -155,6 +155,7 @@ export function shareLoad(config) {
 					share({}).then(({
 						data
 					}) => {
+						console.log(data,'fenxiang')
 						shareData = data.data
 						shareFun()
 					});
@@ -187,7 +188,7 @@ function shareFun(config) {
 		} else {
 			const userInfo = uni.getStorageSync('userInfo')
 			console.log(userInfo);
-			const url = window.location.href + '?spread=' + userInfo.uid;
+			let url = window.location.href + '?spread=' + userInfo.uid;
 			url = url.replace(/[\?,&]{0,1}from=singlemessage/g, '');
 			mess = {
 				title: shareData.title,