Browse Source

..

feature/v1.1.0
shuiqing 7 years ago
parent
commit
8342168d33
9 changed files with 5 additions and 124 deletions
  1. 38
      pages/at_present/at_present.js
  2. 6
      pages/city/city.js
  3. 2
      pages/city/city.wxml
  4. 3
      pages/district/district.js
  5. 36
      pages/index/index.js
  6. 2
      pages/index/index.wxml
  7. 5
      pages/index/index.wxss
  8. 36
      pages/loding/loding.js
  9. 1
      pages/order/order.wxml

38
pages/at_present/at_present.js

@ -24,33 +24,15 @@ Page({
// let that = this; 
qqmapsdk = new QQMapWX({
key: 'C5KBZ-RISKD-INW4P-PWYQJ-QC6C7-BQBGC'
//正式的上线 key: 'JN7BZ-MJBK5-52SIH-QOKGH-FJE5F-IWFGG'
});
},
//  onShow: function () {
//   var that = this;
//   // 腾讯地图调用接口
//   qqmapsdk.search({
//    success: function (res) {
//    
//    },
//    fail: function (res) {
//     console.log(res);
//    },
//    complete: function (res) {
//     console.log(res);
//    }
//   })
//  },
onReady: function() {
var that = this;
wx.getLocation({
type: 'wgs84',
success: function(res) {
qqmapsdk.reverseGeocoder({
// qqmapsdk.search({
success: function(res) {
let district = res.result.address_component.district;
let city = res.result.address_component.city;
@ -124,24 +106,6 @@ Page({
},
groupTaps: function(e) {
var that = this;
//获取本地数据
// wx.getStorage({
// key: 'merchantNo',
// success: function (res) {
// if (res.data ==''){
// console.log(1111);
// }else{
// console.log(888);
// }
// // console.log(1111);
// // console.log(res.data);
// // that.setData({ merchantNo: res.data });
// // console.log(2222);
// // showOrhide:false;
// }
// });
wx.switchTab({
url: '../index/index'
})

6
pages/city/city.js

@ -21,12 +21,6 @@ Page({
})
}
});
// console.log(2)
// console.log(options.titles)
// console.log(1)
// this.setData({
// titles: options.titles
// });
var that = this
wx.request({
url: app.gw.hostUrl + '/mall/wxa/index/opencitylist',

2
pages/city/city.wxml

@ -1,5 +1,5 @@
<view class="top">
<text class="top_area">定位区域</text><text class="top_site"> {{cityName}}{{districtName}}</text>
<text class="top_area">已选区域</text><text class="top_site"> {{cityName}}{{districtName}}</text>
</view>
<view class="top_hint">已开通城市</view>
<view wx:for="{{citys.response}}" wx:for-item="citys">

3
pages/district/district.js

@ -9,12 +9,11 @@ Page({
let that = this;
// wx.getStorage({
// key: 'merchantNo',
// success: function (res) {
// that.setData({
// merchantNo: res.data
// })
// console.log(222);
// }
// });
wx.getStorage({

36
pages/index/index.js

@ -12,7 +12,6 @@ Page({
duration: 1000,
imgUrls: [],
merchantNo: '',
// bannerImage: '/images/activity_banner.png',
menu_list: [
{ name: '拼团', disabled: false, className: 'green_button' },
{ name: '秒杀', disabled: true, className: 'gray_button' },
@ -25,10 +24,6 @@ Page({
pageSize: 20,
hasMoreData: true,
img1: '/images/u40.png',
// cityId: 440100000,
// typeNum: 10,
// addrArray: { id: [440100000, 430426000], name: ['长沙', '深圳', '上海', '长沙', '武汉', '杭州', '北京'] },
addrIndex: 0,
districtName: '',
},
@ -61,9 +56,6 @@ Page({
wx.getStorage({
key: 'merchantNo',
success: function (res) {
console.log(1)
console.log(res.data)
console.log(1)
that.setData({
merchantNo: res.data
}),
@ -83,7 +75,6 @@ Page({
if (status == 0) {
var data = res.data;
var status = data.code;
// console.log(res);
that.setData({
imgUrls: data.response
})
@ -116,8 +107,7 @@ Page({
url: app.gw.hostUrl + '/mall/wxa/activity/list',
method: 'get',
data: {
merchantNo: merchantNo,
// selectedCityId: that.data.addrArray.id[that.data.addrIndex] == undefined ? 0 : that.data.addrArray.id[that.data.addrIndex],
merchantNo:merchantNo,
pageNum: that.data.pageNum,
pageSize: that.data.pageSize
},
@ -191,29 +181,6 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
// onShow: function () {
// let that = this;
// //获取本地数据
// // 获取地址
// wx.getStorage({
// key: 'districtName',
// success: function (res) {
// // console.log(res.data)
// that.setData({
// districtName: res.data
// })
// }
// });
// // 商家编号
// wx.getStorage({
// key: 'merchantNo',
// success: function (res) {
// that.setData({
// merchantNo: res.data
// })
// }
// });
// },
/**
* 生命周期函数--监听页面隐藏
@ -233,6 +200,7 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
let that = this;
this.data.pageNum = 1;
this.getActivityList();
},

2
pages/index/index.wxml

@ -3,8 +3,6 @@
<view class='header'>
<view class='top-left'>
<navigator url="../city/city" class="address"><image src='{{img1}}' mode='widthFix' class="imgs"></image> {{districtName}}</navigator>
<!-- 地址 -->
<!-- <text class='address' bindtap='districtCity'><image src='{{img1}}' mode='widthFix' class="imgs"></image> {{districtName}}</text> -->
</view>
<!-- 暂时top-right不清楚干嘛的 -->
<!-- <view class='top-right'></view> -->

5
pages/index/index.wxss

@ -21,11 +21,6 @@
width: 20rpx;
margin-right:10rpx;
}
/* .top-right {
width: 28%;
display: inline-block;
vertical-align: super;
} */
.address {
font-size: 30rpx;

36
pages/loding/loding.js

@ -51,40 +51,4 @@ Page({
}
})
},
// handler: function (e) {
// var that = this;
// if (!e.detail.authSetting['scope.userLocation']) {
// that.setData({
// ldata: false
// })
// } else {
// that.setData({
// ldata: true,
// })
// wx.getLocation({
// type: 'gcj02',
// success: function (res) {
// var latitude = res.latitude
// var longitude = res.longitude
// that.setData({
// latitude: latitude,
// longitude: longitude
// })
// wx.openLocation({
// latitude: latitude,
// longitude: longitude,
// scale: 28
// })
// }
// })
// }
// },
// btnTap(e) {
// wx.openLocation({
// latitude: this.data.latitude,
// longitude: this.data.longitude,
// scale: 28
// })
// },
});

1
pages/order/order.wxml

@ -10,7 +10,6 @@
<image class="product-img" src="{{item.goodsImgUrl}}" background-size="cover"></image>
<view class='product-msg'>
<view class='title'>{{item.goodsName}}</view>
<!-- <view class='intro'>{{item.intro}}</view> -->
</view>
</view>
<view class='line'></view>

Loading…
Cancel
Save