Commit 30dc7441 by 谢中龙

修改bug

parent 0c88743f
......@@ -17,7 +17,7 @@ App({
// 默认 false
wx.setStorageSync('reLoginErr', false)
try {
this.isFromQiyeConsoleIn(e);
this.isFromQiyeConsoleIn(this.options);
let res = wx.getSystemInfoSync(); // 获取当前运行环境
config.pixelRate = res.windowWidth / 750;
......@@ -85,6 +85,8 @@ App({
onShow: function (options = {}) {
//检查是不是有更新
this.checkForUpdate();
// console.log('this.options----', this.options)
const baseUserInfo = wx.getStorageSync('_baseUserInfo')
// 获取当前会员是否是体验者
......
......@@ -50,9 +50,22 @@ Component({
tapLink: (url) => { // 点击超链接时的回调函数
// url 就是 HTML 富文本中 a 标签的 href 属性值
// 这里可以自定义点击事件逻辑,比如页面跳转
wx.navigateTo({
url
})
console.log(url)
if(url){
//跳转到web页面
if(url.indexOf('http:') > -1 || url.indexOf('https') > -1){
let enCodeUrl = encodeURIComponent(url);
let sharePath = `/subPackage/page/pages/h5/h5page?url=${enCodeUrl}`
wx.navigateTo({
url: sharePath,
})
}
else{
wx.navigateTo({
url: url,
})
}
}
}
}
this.data.config = config
......
......@@ -150,7 +150,7 @@ wxService.page({
//选择门店去
onTapSelectStore(){
wx.navigateTo({
url: '/subPackage/page/pages/chooseStore/chooseStore',
url: '/subPackage/page/pages/chooseStore/chooseStore?isFrom=order',
});
},
//订单备注输入
......
......@@ -511,10 +511,10 @@
"query": ""
},
{
"id": -1,
"id": 70,
"name": "选择门店",
"pathName": "subPackage/page/pages/chooseStore/chooseStore",
"query": "",
"query": "isFrom=guid",
"scene": null
},
{
......
......@@ -25,7 +25,7 @@
<view class='main-container'>
<!-- 优惠券 -->
<view class='mg-b-40'>
<view class='header'>优惠券</view>
<view class='header'>发券中心</view>
<view class='status-bar'>
<view class='status-items'>
<view
......@@ -65,7 +65,7 @@
</view>
<!-- 爆款推荐 -->
<view class='mg-b-40'>
<view class='header'>爆款推荐</view>
<view class='header'>商城热卖</view>
<view class='status-bar'>
<view class='status-items'>
<view class='status-bar-item {{item.active ? "active" : ""}}'
......
{
"navigationBarTitleText": "更多优惠券",
"navigationBarTitleText": "发券中心",
"enablePullDownRefresh" : true,
"usingComponents": {}
}
\ No newline at end of file
{
"navigationBarTitleText": "更多商品",
"navigationBarTitleText": "商城热卖",
"enablePullDownRefresh": true,
"usingComponents": {}
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
<view class='main-container'>
<!-- 优惠券 -->
<view class='mg-b-40'>
<view class='header'>优惠券</view>
<view class='header'>发券中心</view>
<view class='status-bar'>
<view class='status-items'>
<view class='status-bar-item {{item.active ? "active" : ""}}'
......@@ -39,7 +39,7 @@
</view>
<!-- 爆款推荐 -->
<view class='mg-b-40'>
<view class='header'>爆款推荐</view>
<view class='header'>商城热卖</view>
<view class='status-bar'>
<view class='status-items'>
<view class='status-bar-item {{item.active ? "active" : ""}}'
......
......@@ -21,23 +21,41 @@ wxService.page({
// iconPath: '/assets/imgs/location.png'
// }
],
storeList : []
storeList : [],
isFrom : '',
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.data.isFrom = options.isFrom;
this.setData({
isFrom : this.data.isFrom
});
wx.hideShareMenu();
},
//去下单
onTapToOrder(e){
let item = e.currentTarget.dataset.item;
wx.setStorageSync('choosedStoreInfo', item);
wx.navigateBack({
delta : 1
});
if (this.data.isFrom == 'order'){
wx.setStorageSync('choosedStoreInfo', item);
wx.navigateBack({
delta: 1
});
}
else{
let latitude = item.latitude;
let longitude = item.longitude;
wx.openLocation({
latitude: latitude,
longitude: longitude,
name: item.fullname ? item.fullname : item.name,
address: item.storeFullAddress
});
}
},
/**
......
{
"navigationBarTitleText": "选择门店",
"navigationBarTitleText": "附近门店",
"enablePullDownRefresh": true,
"usingComponents": {
"empty": "../../../../component/empty/empty"
......
......@@ -37,7 +37,9 @@
<view style="margin-top:5rpx;">{{item.storeFullAddress}}</view>
<view style="margin-top:5rpx;">营业时间:{{item.businessTimeText}}</view>
</view>
<view class="rg-to-buy" bindtap="onTapToOrder" data-item="{{item}}">去下单</view>
<view class="rg-to-buy" bindtap="onTapToOrder" data-item="{{item}}">
{{isFrom == 'order' ? '去下单' : '去导航'}}
</view>
</view>
</view>
<!-- 空时 -->
......
......@@ -20,13 +20,14 @@ wxService.page({
*/
onLoad: function (options) {
let url = options.url;
console.log(options)
if (url) {
url = decodeURIComponent(url);
this.data.title = options.title;
wx.setNavigationBarTitle({
title: this.data.title,
});
if (this.data.title){
wx.setNavigationBarTitle({
title: this.data.title,
});
}
this.setData({
path: url
......
......@@ -86,7 +86,6 @@ const html2json = (html, bindName) => {
}
nodeStyles = []
if (attrs.length) {
node.attr = {}
attrs.map((item) => {
......
......@@ -41,7 +41,7 @@ const parse = ({ bind = 'wxParserData', html, target, enablePreviewImage = true,
})
}
}
// debugger
// 点击超链接
if (Object.prototype.toString.call(tapLink) === '[object Function]') {
that.tapWxParserA = (e) => {
......
......@@ -118,10 +118,13 @@
.wxParser-video {
text-align: center;
margin: 10rpx 0; }
margin: 10rpx 0;
padding: 0 20rpx;
}
.wxParser-video-video {
width: 100%; }
width: 100%;
}
.wxParser-audio {
text-align: center;
......
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