Browse Source

Merge branch 'feature/medou/mini-v1.1.0' of ssh://47.106.79.88:10022/1hjz-3N/1hjz-mini into feature/medou/mini-v1.1.0

# Conflicts:
#	pages/index/index.js
feature/v1.1.0
shuiqing 7 years ago
parent
commit
9ce9c0372f
6 changed files with 12 additions and 15 deletions
  1. 3
      pages/activity_detail/activity_detail.js
  2. 1
      pages/at_present/at_present.js
  3. 2
      pages/city/city.js
  4. 3
      pages/district/district.js
  5. 15
      pages/index/index.js
  6. 3
      pages/loding/loding.js

3
pages/activity_detail/activity_detail.js

@ -46,7 +46,6 @@ Page({
}], }],
qrImageUrl: "", qrImageUrl: "",
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
@ -61,7 +60,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
//获取活动详情
//获取活动详情
this.getActivityDetail(); this.getActivityDetail();
}, },

1
pages/at_present/at_present.js

@ -52,7 +52,6 @@ Page({
}, },
success: function(res) { success: function(res) {
// 打印对应想得到的数据 // 打印对应想得到的数据
console.log(res)
var cityId = res.data.response[0].cityId; var cityId = res.data.response[0].cityId;
var cityName = res.data.response[0].cityName; var cityName = res.data.response[0].cityName;
var districtId = res.data.response[0].districtId; var districtId = res.data.response[0].districtId;

2
pages/city/city.js

@ -30,9 +30,7 @@ Page({
'Content-Type': 'application/x-www-form-urlencoded' 'Content-Type': 'application/x-www-form-urlencoded'
}, },
success: function (res) { success: function (res) {
console.log(res.data)
var citys = res.data; var citys = res.data;
console.log(citys);
that.setData({ that.setData({
citys citys
}); });

3
pages/district/district.js

@ -25,8 +25,6 @@ Page({
} }
}); });
cityId = options.cityId; cityId = options.cityId;
console.log(cityId);
wx.request({ wx.request({
url: app.gw.hostUrl + '/mall/wxa/index/opendistictlist', url: app.gw.hostUrl + '/mall/wxa/index/opendistictlist',
method: 'get', method: 'get',
@ -38,7 +36,6 @@ Page({
}, },
success: function (res) { success: function (res) {
var districts = res.data; var districts = res.data;
console.log(districts)
that.setData({ that.setData({
districts districts
}); });

15
pages/index/index.js

@ -1,6 +1,6 @@
//获取应用实例 //获取应用实例
const app = getApp() const app = getApp()
var merchantNo = '';
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
@ -11,7 +11,9 @@ Page({
interval: 5000, interval: 5000,
duration: 1000, duration: 1000,
imgUrls: [], imgUrls: [],
merchantNo: '',
// merchantNo: '',
// bannerImage: '/images/activity_banner.png',
menu_list: [ menu_list: [
{ name: '拼团', disabled: false, className: 'green_button' }, { name: '拼团', disabled: false, className: 'green_button' },
{ name: '秒杀', disabled: true, className: 'gray_button' }, { name: '秒杀', disabled: true, className: 'gray_button' },
@ -41,7 +43,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onShow: function (options) { onShow: function (options) {
var that = this;
let that = this;
//获取本地数据 //获取本地数据
// 获取地址 // 获取地址
wx.getStorage({ wx.getStorage({
@ -51,7 +53,9 @@ Page({
districtName: res.data districtName: res.data
}) })
} }
}); });
// 商家编号 // 商家编号
wx.getStorage({ wx.getStorage({
key: 'merchantNo', key: 'merchantNo',
@ -60,6 +64,8 @@ Page({
merchantNo: res.data merchantNo: res.data
}), }),
that.getActivityList(res.data); that.getActivityList(res.data);
merchantNo = res.data
that.getActivityList();
wx.request({ wx.request({
url: app.gw.hostUrl + '/mall/wxa/activity/banner', url: app.gw.hostUrl + '/mall/wxa/activity/banner',
method: 'get', method: 'get',
@ -100,9 +106,10 @@ Page({
}, },
getActivityList: function ( merchantNo) {
getActivityList: function () {
let that = this; let that = this;
wx.showNavigationBarLoading() //在标题栏中显示加载 wx.showNavigationBarLoading() //在标题栏中显示加载
console.log("districtName:" + that.districtName);
wx.request({ wx.request({
url: app.gw.hostUrl + '/mall/wxa/activity/list', url: app.gw.hostUrl + '/mall/wxa/activity/list',
method: 'get', method: 'get',

3
pages/loding/loding.js

@ -16,7 +16,6 @@ Page({
wx.getStorage({ wx.getStorage({
key: "merchantNo", key: "merchantNo",
success: function (res) { success: function (res) {
console.log(res.data);
if (res.data == "") { if (res.data == "") {
that.queryCartList(); that.queryCartList();
} else { } else {
@ -29,7 +28,6 @@ Page({
}); });
}, },
fail: function (res) { fail: function (res) {
console.log(res);
that.queryCartList(); that.queryCartList();
} }
}); });
@ -44,7 +42,6 @@ Page({
}); });
}, },
fail:function(error){ fail:function(error){
console.log(error);
wx.navigateTo({ wx.navigateTo({
url: '../city/city', url: '../city/city',
}) })

Loading…
Cancel
Save