Commit 30dc7441 by 谢中龙

修改bug

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