lhl 1 ano atrás
pai
commit
4db195de34

+ 1 - 1
components/productWindow/index.vue

@@ -350,7 +350,7 @@
 						this.deliveryName = list[0].name;
 						this.deliveryAddress = list[0].detailed_address+'\xa0';
 						this.distance = '距您'+list[0].range+'km';
-						this.$emit('onstoreId',list[0]);
+						// this.$emit('onstoreId',list[0]);
 					})
 					.catch(err => {
 						this.$util.Tips({

+ 6 - 2
main.js

@@ -15,11 +15,15 @@ import Cache from './utils/cache'
 import util from 'utils/util'
 import configs from './config/app.js'
 import socket from './libs/new_chat.js'
-import io from './utils/io.js'
+// #ifdef APP-PLUS
+import io from './utils/io.js'
+Vue.prototype.$io = io
+// #endif
+
 Vue.prototype.$util = util;
 Vue.prototype.$config = configs;
 Vue.prototype.$Cache = Cache;
-Vue.prototype.$io = io
+
 Vue.prototype.$eventHub = new Vue();
 Vue.prototype.$socket = new socket();
 Vue.config.productionTip = false

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "易博优购",
     "appid" : "__UNI__331F6F8",
     "description" : "易博优购",
-    "versionName" : "1.5.1",
-    "versionCode" : 151,
+    "versionName" : "1.5.2",
+    "versionCode" : 152,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 9 - 5
pages/goods_details/index.vue

@@ -585,7 +585,7 @@
 			specs,
 			discount,
 			countDown,
-			homeList
+			homeList
 		},
 		directives: {
 			trigger: {
@@ -780,7 +780,10 @@
 			// #ifndef MP
 			that.navH = 96;
 			// #endif
-			that.id = options.id;
+			that.id = options.id;
+			if(options.store_id) {
+				that.store_id = options.store_id;
+			}
 			that.isShow = options.isShow;
 			that.promotions_type = options.promotions_type || 0;
 			that.fromType = options.fromType;
@@ -967,7 +970,8 @@
 				this.addressId = row.id
 			},
 			// 获取自提地址id
-			onstoreId(row) {
+			onstoreId(row) {
+				console.log('获取自提地址id',row.id)
 				this.store_id = row.id;
 				this.store_name = row.name;
 			},
@@ -1877,9 +1881,9 @@
 			getCartCount: function(isAnima) {
 				let that = this;
 				const isLogin = that.isLogin;
-				let id = uni.getStorageSync('user_store_id') || 0;
+				// let id = uni.getStorageSync('user_store_id') || 0;
 				if (isLogin) {
-					getCartCounts(0,id).then(res => {
+					getCartCounts(0,that.store_id).then(res => {
 						that.CartCount = res.data.count;
 						this.$store.commit('indexData/setCartNum', that.CartCount > 99 ? '...' : that
 							.CartCount + '')

+ 4 - 2
pages/order_addcart/order_addcart.vue

@@ -919,7 +919,8 @@
 			},
 			getCartNum: function() {
 				let that = this;
-				let id = uni.getStorageSync('user_store_id') || 0;
+				let id = uni.getStorageSync('user_store_id') || 0;
+				// let id = 0;
 				getCartCounts(0,id).then(res => {
 					this.$store.commit('indexData/setCartNum', res.data.count > 99 ? '..' : res.data.count)
 					if (res.data.count > 0) {
@@ -956,7 +957,8 @@
 					status: 1,
 					latitude: uni.getStorageSync('user_latitude'),
 					longitude: uni.getStorageSync('user_longitude'),
-					store_id: uni.getStorageSync('user_store_id'),
+					// store_id: uni.getStorageSync('user_store_id')
+					store_id: 0
 				}
 				getCartList(data).then(res => {
 					this.getInvalidList();

+ 1 - 1
pages/store_cate/store_cate1.vue

@@ -758,7 +758,7 @@
       goDetail(item) {
         goShopDetail(item, this.uid).then(res => {
           uni.navigateTo({
-            url: `/pages/goods_details/index?id=${item.id}&fromType=1`
+            url: `/pages/goods_details/index?id=${item.id}&fromType=1&store_id=${this.info.id}`
           });
         });
       },