|
@@ -31,13 +31,13 @@
|
|
|
<image class="nitem-image" src="../../static/index/index05.png" mode=""></image>
|
|
|
<view class="nitem-font">天天领红包</view>
|
|
|
</view>
|
|
|
- <view class="navbar-item" @click="navTo('')">
|
|
|
+ <view class="navbar-item" @click="navTo('')">
|
|
|
<image class="nitem-image" src="../../static/index/index04.png" mode=""></image>
|
|
|
<view class="nitem-font">积分商城</view>
|
|
|
</view>
|
|
|
- <view class="navbar-item" @click="navTo('/pages/product/seckill')">
|
|
|
+ <view class="navbar-item" @click="navTo('')">
|
|
|
<image class="nitem-image" src="../../static/index/index03.png" mode=""></image>
|
|
|
- <view class="nitem-font">限时秒杀</view>
|
|
|
+ <view class="nitem-font">公益</view>
|
|
|
</view>
|
|
|
<view class="navbar-item" @click="navTo('/pages/user/shareQrCode')">
|
|
|
<image class="nitem-image" src="../../static/index/index02.png" mode=""></image>
|
|
@@ -125,8 +125,11 @@ import { getUserInfo } from '@/api/user.js';
|
|
|
import { setCoupons } from '@/api/functionalUnit.js';
|
|
|
import { getBargainList } from '@/api/product.js';
|
|
|
import { interceptor } from '@/utils/loginUtils';
|
|
|
-import { mapState } from 'vuex';
|
|
|
+import { mapState, mapMutations } from 'vuex';
|
|
|
import { tabbar } from '@/utils/tabbar.js';
|
|
|
+// #ifdef H5
|
|
|
+import { weixindata } from '@/utils/wxAuthorized';
|
|
|
+// #endif
|
|
|
export default {
|
|
|
components: {
|
|
|
seckill
|
|
@@ -140,11 +143,13 @@ export default {
|
|
|
swiperHeight: 0,
|
|
|
checkid: 0,
|
|
|
titleNViewBackground: '',
|
|
|
+ longitude: 0, //经度
|
|
|
+ latitude: 0, //纬度
|
|
|
swiperCurrent: 0,
|
|
|
swiperLength: 0,
|
|
|
carouselList: [], //轮播列表
|
|
|
bastList: [], //会员礼包
|
|
|
- shoplist:[],//商店列表
|
|
|
+ shoplist: [], //商店列表
|
|
|
page: 1,
|
|
|
limit: 5,
|
|
|
actTime: new Date()
|
|
@@ -155,6 +160,7 @@ export default {
|
|
|
...mapState('user', ['hasLogin', 'userInfo'])
|
|
|
},
|
|
|
onLoad: function(option) {
|
|
|
+ this.getaddress();
|
|
|
// #ifndef MP
|
|
|
if (option.spread) {
|
|
|
// 存储其他邀请人
|
|
@@ -211,6 +217,42 @@ export default {
|
|
|
},
|
|
|
// #endif
|
|
|
methods: {
|
|
|
+ ...mapMutations(['setLat', 'setLon']),
|
|
|
+ getaddress() {
|
|
|
+ console.log('dizhi+++++++++++');
|
|
|
+ let obj = this;
|
|
|
+ uni.getLocation({
|
|
|
+ type: 'gcj02',
|
|
|
+ success: res => {
|
|
|
+ console.log(res, 123456);
|
|
|
+ obj.setLat(res.latitude);
|
|
|
+ obj.setLon(res.longitude);
|
|
|
+ },
|
|
|
+ fail: err => {
|
|
|
+ console.log(err, 'shi+++++++++++++++');
|
|
|
+ openMap().then(e => {
|
|
|
+ this.getaddress();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // weixindata().then(wxOjb => {
|
|
|
+ // console.log(wxOjb,'获取微信');
|
|
|
+ // wxOjb.getLocation({
|
|
|
+ // type: 'gcj02',
|
|
|
+ // success: res => {
|
|
|
+ // console.log(res, 123456);
|
|
|
+ // obj.setLat(res.latitude);
|
|
|
+ // obj.setLon(res.longitude);
|
|
|
+ // },
|
|
|
+ // fail: err => {
|
|
|
+ // console.log(err, 'shi+++++++++++++++');
|
|
|
+ // openMap().then(e => {
|
|
|
+ // this.getaddress();
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // });
|
|
|
+ },
|
|
|
//砍价商品推荐详情页
|
|
|
navToDetailPages(item) {
|
|
|
let id = item.product_id;
|
|
@@ -220,13 +262,13 @@ export default {
|
|
|
url: '/pages/product/product?id=' + id
|
|
|
});
|
|
|
},
|
|
|
- navTo(url){
|
|
|
- if(url == '') {
|
|
|
- this.$api.msg('暂未开通,敬请期待')
|
|
|
- }else{
|
|
|
+ navTo(url) {
|
|
|
+ if (url == '') {
|
|
|
+ this.$api.msg('暂未开通,敬请期待');
|
|
|
+ } else {
|
|
|
uni.navigateTo({
|
|
|
url
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
openSubscribe: function(e) {
|
|
@@ -659,7 +701,7 @@ export default {
|
|
|
align-items: flex-start;
|
|
|
margin-left: 20rpx;
|
|
|
padding: 13rpx 0 35rpx;
|
|
|
- border-bottom: 1px solid #EAECED;
|
|
|
+ border-bottom: 1px solid #eaeced;
|
|
|
.shopm-info {
|
|
|
max-width: 60%;
|
|
|
line-height: 1;
|
|
@@ -676,12 +718,12 @@ export default {
|
|
|
margin-left: 6rpx;
|
|
|
width: 30rpx;
|
|
|
height: 30rpx;
|
|
|
- border: 1px solid #FF4C4C;
|
|
|
+ border: 1px solid #ff4c4c;
|
|
|
border-radius: 5rpx;
|
|
|
font-size: 20rpx;
|
|
|
font-family: PingFang SC;
|
|
|
font-weight: 500;
|
|
|
- color: #FF4C4C;
|
|
|
+ color: #ff4c4c;
|
|
|
text-align: center;
|
|
|
line-height: 30rpx;
|
|
|
}
|
|
@@ -697,12 +739,12 @@ export default {
|
|
|
position: relative;
|
|
|
margin-top: 52rpx;
|
|
|
padding: 8rpx;
|
|
|
- background: #FCF3F0;
|
|
|
+ background: #fcf3f0;
|
|
|
border-radius: 16rpx 16rpx 16rpx 0px;
|
|
|
font-size: 20rpx;
|
|
|
font-family: PingFang SC;
|
|
|
font-weight: 500;
|
|
|
- color: #FF440D;
|
|
|
+ color: #ff440d;
|
|
|
}
|
|
|
}
|
|
|
.right {
|