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

修改一些bug

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