Commit da282d8d authored by 华国豪's avatar 华国豪 🙄

修改一些bug

parent 79931c48
......@@ -44,6 +44,7 @@ App({
companyId: wx.getStorageSync('site') ? wx.getStorageSync('site').companyId : 0,
cityId: wx.getStorageSync('site') ? wx.getStorageSync('site').cityId:262,
siteName: wx.getStorageSync('site') ? wx.getStorageSync('site').siteName :'成都站',
locaSite: false,
},
// 请求接口
$api: function (url, data) {
......
......@@ -36,11 +36,22 @@ Component({
getCityList() {
let city = "成都",
_this = this;
console.log(app.state.admin)
app.$api('b2b_get_site', {}).then(res => {
_this.setData({
cityList: res
})
console.log(_this.data.cityList)
}).catch(err => { })
if (app.state.locaSite) {
return
}
wx.getLocation({
type: 'wgs84',
success(res) {
wx.request({
url: 'http://apis.map.qq.com/ws/geocoder/v1/', //仅为示例,并非真实的接口地址
url: 'http://apis.map.qq.com/ws/geocoder/v1/',
data: {
location: `${res.latitude},${res.longitude}`,
key: '66YBZ-TC3K2-NNMUD-CC637-2W6WK-AWBM2'
......@@ -51,7 +62,8 @@ Component({
success(res) {
console.log("res")
city = res.data.result.address_component.city.replace('市', '');
app.$api('b2b_get_site', {}).then(res => {
app.state.locaSite = true
app.$api('b2b_get_site', {}).then(res => {
for (let i = 0; i < res.length; i++) {
if (city.indexOf(res[i].siteName.replace("站", "")) != -1) {
_this.setData({
......@@ -63,7 +75,6 @@ Component({
_this.setData({
cityList: res
})
console.log(_this.data.cityList)
}).catch(err => { })
}
})
......
......@@ -25,20 +25,20 @@
<view style="padding-bottom:15rpx" class="f24 c88 p30_2">{{dataList.title}}</view>
<view class="Gray30"></view>
<view class='p30_2 jf'>
<view class="jfItem">
<text class="f24 c88">积分</text>
<!-- <view class="jfItem"> -->
<!-- <text class="f24 c88">积分</text>
<view class="bg">
<image style="width:30rpx;height:30rpx;" src="/images/group/jifen.png"></image>
普通会员</view>
普通会员</view> -->
<!-- <text style="margin-left:10rpx" class="f26">最少可得29积分</text> -->
<image class="chakan" src="/images/group/chakn.png"></image>
</view>
<view bindtap="oPenServe" class="jfItem">
<!-- <image class="chakan" src="/images/group/chakn.png"></image>
</view> -->
<!-- <view bindtap="oPenServe" class="jfItem">
<text class="f24 c88">服务</text>
<image style="width:24rpx;height:24rpx;margin-left:30rpx" src="/images/group/gou.png"></image>
<text style="margin-left:10rpx" class="f26">无自费</text>
<image class="chakan" src="/images/group/chakn.png"></image>
</view>
</view> -->
</view>
<view class="Gray30"></view>
<view class="p30_2" style="padding-bottom:30rpx">
......
......@@ -13,11 +13,9 @@ Page({
*/
onLoad: function (options) {
let userInfo = wx.getStorageSync('admin')
console.log(userInfo)
this.setData({
url: "https://activity.oytour.com/html/task/home.html?customerId=" + userInfo.id + "&accountId=" + userInfo.customerAccountId + "&token=" + userInfo.token + "&secretKey=" + userInfo.secretKey
})
console.log(this.data.url)
},
/**
......
......@@ -39,14 +39,12 @@ Page({
msg:that.data.msg
})
}
that.data.msg.diningId = 1640;
that.setData({
idDes: decodeURIComponent("6jijCeixL9w%3D%0A"),
msg: that.data.msg
})
// that.data.msg.diningId = 1640;
// that.setData({
// idDes: decodeURIComponent("6jijCeixL9w%3D%0A"),
// msg: that.data.msg
// })
that.getData();
},
yD(){
let that=this;
......
......@@ -65,7 +65,8 @@ Page({
let data = {
account: this.data.account,
password: this.data.password,
code: res.code
code: res.code,
platform: 1
}
app.$api('miniProgram_customer_Login', data).then(res => {
app.state.admin = res
......@@ -143,8 +144,8 @@ Page({
id: res.id
}
})
wx.reLaunch({
url: '/pages/mine/mine'
wx.navigateBack({
delta: 1
})
}).catch(err => {
if (err.resultCode === 10007) {
......
......@@ -46,7 +46,7 @@
<view bindtap='signWx' style="margin-top:120rpx;text-align:center">
<text class='login_wx_text'>微信手机号快捷登录</text>
<text class='login_wx_text'>微信快捷登录</text>
</view>
</view>
</view>
\ No newline at end of file
......@@ -9,7 +9,8 @@
"postcss": true,
"minified": true,
"newFeature": true,
"autoAudits": false
"autoAudits": false,
"checkInvalidKey": true
},
"compileType": "miniprogram",
"libVersion": "2.7.7",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment