Commit 44baa854 by 张立顺

方法修改

1 parent 00f48990
......@@ -60,7 +60,7 @@ class UsersApi {
/**授权手机号 */
async authUserPhone(detail, sessionId) {
if (!sessionId) {
wx.$api.showToast('缺少sessionId')
wx.p.wxApi.showToast('缺少sessionId')
Promise.reject({
errMsg: '缺少sessionId'
})
......@@ -134,7 +134,7 @@ class UsersApi {
/**授权手机号登录 */
async authStorePhone(detail, loginToken) {
if (!loginToken) {
wx.$api.showToast('缺少loginToken')
wx.p.wxApi.showToast('缺少loginToken')
Promise.reject({
errMsg: '缺少loginToken'
})
......
......@@ -106,7 +106,7 @@ Page({
let { merchantId, phone } = data
this.toPostFreeCard(merchantId, phone, data)
this.handlerCustomerId()
} else wx.$api.showToast(message)
} else wx.p.wxApi.showToast(message)
})
},
onLoad(options) {
......@@ -189,7 +189,7 @@ Page({
// wx.$storage.set('bindInfo', temp)
// wx.$router.reLaunch('/pages/tab/shopMall/index?tabIndex=1', { notIntercept: true })
} else {
wx.$api.showToast(message || '系统异常')
wx.p.wxApi.showToast(message || '系统异常')
}
})
},
......
......@@ -56,7 +56,7 @@ Page({
business_type: 1,
add_way: 104,
merchant_id: wx.p.storage.get('srcm_shopmall_merchant_id'),
guest_no: wx.$Track.getGuestNo(), //游客ID,
guest_no: wx.p.$Track.getGuestNo(), //游客ID,
user_open_id:this.shareOpenId || ''
}
this.firstEnter = false
......@@ -93,7 +93,7 @@ Page({
wx.saveImageToPhotosAlbum({
filePath: res.path,
success() {
wx.$api.showToast('保存成功')
wx.p.wxApi.showToast('保存成功')
},
fail(err) {
if (err.errMsg === 'saveImageToPhotosAlbum:fail auth deny') {
......@@ -127,7 +127,7 @@ Page({
})
.catch(() => {
wx.hideLoading()
wx.$api.showToast('图片保存失败,请重试')
wx.p.wxApi.showToast('图片保存失败,请重试')
})
},
previewImage(e) {
......@@ -301,7 +301,7 @@ Page({
params.orderGoodsList = [orderGoodsList]
goodsList.expressFee = goodsInfo.expressFee
if (!contactInfo.contactAddress && goodsInfo.deliveryType != 1) {
wx.$api.showToast('请填写收货地址')
wx.p.wxApi.showToast('请填写收货地址')
return
}
if (upgrade || isCarOwner) {
......@@ -348,8 +348,8 @@ Page({
params.cartType = 4
}
wx.p.api.shopmallApi.addShoppingcart(params).then(data => {
wx.$api.showToast('添加成功!在购物车等亲~')
wx.$Track.setTrack({
wx.p.wxApi.showToast('添加成功!在购物车等亲~')
wx.p.$Track.setTrack({
...data
},
7
......@@ -574,7 +574,7 @@ Page({
...data,
goodsId: data.id
}
// wx.$Track.setTrack(trackobj, 6)
// wx.p.$Track.setTrack(trackobj, 6)
let activeSku = null
if (data.expressFee != null) data.expressFee = wx.p.format.centsToyuan(data.expressFee)
if (isActivity) {
......
......@@ -343,7 +343,7 @@ Page({
})
.then(({ needPay, payParams }) => {
wx.hideLoading()
// wx.$Track.setTrack(
// wx.p.$Track.setTrack(
// {
// goodsList
// },
......
......@@ -257,7 +257,7 @@ Page({
}
wx.p.api.shopmallApi.delShoppingcart(para).then(res => {
wx.p.wxApi.showToast('删除成功')
wx.$Track.setTrack({
wx.p.$Track.setTrack({
id,
type: '购物车移除商品'
},
......
......@@ -78,7 +78,7 @@ Page({
this.setData({
couponInfo
})
// wx.$Track.setTrack(
// wx.p.$Track.setTrack(
// {
// couponInfo
// },
......
......@@ -40,12 +40,12 @@ Page({
wx.saveImageToPhotosAlbum({
filePath: res.path
}).then(() => {
wx.$api.showToast('保存成功')
wx.p.wxApi.showToast('保存成功')
})
})
.catch(() => {
wx.hideLoading()
wx.$api.showToast('图片保存失败,请重试')
wx.p.wxApi.showToast('图片保存失败,请重试')
})
},
authSuccess() {
......
......@@ -10,7 +10,7 @@ Page({
setCopyData(e) {
const text = e.currentTarget.dataset.title;
wx.$api.setCopyData(text, () => {
wx.$api.showToast('复制成功')
wx.p.wxApi.showToast('复制成功')
})
},
/**
......
......@@ -11,7 +11,7 @@ Page({
}) => {
wx.p.wxApi.showLoading()
if (code == '0') {
// wx.$Track.setTrack({}, 4)
// wx.p.$Track.setTrack({}, 4)
wx.$LoginStatus = true
// wx.$util.removeSystemStorage()
wx.p.storage.rm('userInfo')
......
......@@ -27,7 +27,7 @@ Page({
)
if (options.showToast) {
setTimeout(()=>{
wx.$api.showToast('原商品及品牌均已下架,您可查看其他权益商品')
wx.p.wxApi.showToast('原商品及品牌均已下架,您可查看其他权益商品')
},500)
}
},
......
......@@ -160,7 +160,7 @@ Page({
return
}
if (!this.data.rechageNum) {
wx.$api.showToast('请输入充值账号')
wx.p.wxApi.showToast('请输入充值账号')
return
}
if(this.data.isGameUse)return this.comfirmBuyItem()
......@@ -224,7 +224,7 @@ Page({
paySign: paySign,
success() {
//跳转商品详情
// wx.$api.showToast('支付成功')
// wx.p.wxApi.showToast('支付成功')
let { query, selectedItem, rechageNum } = self.data
let obj = {
...query,
......
......@@ -316,7 +316,7 @@ Page({
},
// /**获取当前位置 */
getLocation(query) {
wx.$Track.getAddressInfo().then(({ location }) => {
wx.p.$Track.getAddressInfo().then(({ location }) => {
query.lat = location.lat
query.lng = location.lng
this.toGetCommodity(query)
......
......@@ -25,7 +25,7 @@ Page({
},
setCopyData(e) {
wx.$api.setCopyData(e.currentTarget.dataset.item, () => {
wx.$api.showToast('复制成功')
wx.p.wxApi.showToast('复制成功')
})
}
})
......@@ -79,7 +79,7 @@ Page({
},
setCopyData(e) {
wx.$api.setCopyData(e.currentTarget.dataset.item, () => {
wx.$api.showToast("复制成功");
wx.p.wxApi.showToast("复制成功");
});
},
});
......@@ -21,7 +21,7 @@ Page({
this.setData({
memberInfo: res
})
wx.$Track.setTrack(
wx.p.$Track.setTrack(
{
memberInfo: res
},
......@@ -67,7 +67,7 @@ Page({
orderCode: memberInfo.orderCode,
orderSource: 3
}
wx.$Track.setTrack(
wx.p.$Track.setTrack(
{
...para,
type: '购买权益卡'
......
......@@ -49,7 +49,7 @@ Page({
// 定位
async getLocation() {
try {
const res = await wx.$Track.getAddressInfo()
const res = await wx.p.$Track.getAddressInfo()
this.toGetCommodity(res.location.lat, res.location.lng, 1)
this.setData({
currentAddress: res,
......
......@@ -83,7 +83,7 @@ Component({
categoryStyle: res[0].categoryStyle || 0
})
this.triggerEvent('showShoppingCar', res[0].categoryStyle)
console.log(res[0].id,'res[0].id');
// console.log(res[0].id,'res[0].id');
this.getCategoryGoodsList(res[0].id)
}
})
......@@ -97,7 +97,7 @@ Component({
categoryType: '2'
}
const res = await discoveryApi.getDiscoverChannelCategoryGoods(_para)
console.log(res)
// console.log(res)
if (res && res.length) {
res.forEach(el => {
el.activityPrice = centsToyuan(el.activityPrice)
......@@ -241,7 +241,7 @@ Component({
}
const res = await shopmallApi.addShoppingcart(_para)
if (res) {
wx.$api.showToast('添加成功')
wx.p.wxApi.showToast('添加成功')
this.getBuyCarList()
}
},
......
......@@ -18,7 +18,7 @@
</view>
<view wx:if="{{categoryStyle>-1}}" class="{{ categoryStyle=='2' ? 'goods_ctnr_waterfall': categoryStyle=='3' ? 'goods_ctnr_grass_B' : categoryStyle=='1' ? 'goods_ctnr_row' : 'goods_ctnr_col' }}">
<view wx:if="{{categoryStyle==0 || categoryStyle==1}}" class="goods_wrap">
<view catch:tap="toGoodsDetail" data-item="{{item}}" class="goods_box" wx:for="{{goodsList}}" wx:key="{{index}}">
<view catch:tap="toGoodsDetail" data-item="{{item}}" class="goods_box" wx:for="{{goodsList}}" wx:key="index">
<image mode="aspectFill" class="cover" src="{{item.commerceVideo ? item.coverUrl : item.goodsImage}}"/>
<view class="info {{categoryStyle?'flex_cccb':''}}">
<text class="name">{{item.goodsName}}</text>
......@@ -40,7 +40,7 @@
</view>
</view>
<view wx:elif="{{categoryStyle==3}}" class="goods_wrap">
<view catch:tap="toGoodsDetail" data-item="{{item}}" wx:for="{{goodsList}}" wx:key="{{index}}">
<view catch:tap="toGoodsDetail" data-item="{{item}}" wx:for="{{goodsList}}" wx:key="index">
<image wx:if="{{item.styleBImg}}" mode="aspectFill" class="publicity-img" src="{{item.styleBImg}}"/>
<view class="goods_box">
<video show-fullscreen-btn="{{false}}" show-play-btn="{{false}}" wx:if="{{curPlayIdx==index && (item.commerceVideo || item.goodsVideo)}}" loop id="video{{index}}" muted="{{false}}" autoplay class="cover" src="{{item.commerceVideo || item.goodsVideo}}"></video>
......@@ -61,8 +61,8 @@
</view>
</view>
<block wx:else>
<view class="{{parentIndex==0 ? 'left-box' : 'right-box'}}" wx:for-item="parentItem" wx:for-index="parentIndex" wx:for="{{['leftList','rightList']}}" wx:key="{{index}}">
<block wx:for="{{goodsList}}" wx:key="{{index}}">
<view class="{{parentIndex==0 ? 'left-box' : 'right-box'}}" wx:for-item="parentItem" wx:for-index="parentIndex" wx:for="{{['leftList','rightList']}}" wx:key="index">
<block wx:for="{{goodsList}}" wx:key="index">
<view catch:tap="toGoodsDetail" data-item="{{item}}" wx:if="{{index%2 == parentIndex}}" class="goods_box">
<image mode="widthFix" class="cover" src="{{item.commerceVideo ? item.coverUrl : item.goodsImage}}"/>
<view class="info">
......
......@@ -12,7 +12,7 @@ Page({
} = this.data
let newMerchantId = wx.$merchant_id
// debugger
console.log(newMerchantId, 'wx.$merchant_id');
// console.log(newMerchantId, 'wx.$merchant_id');
if (newMerchantId != merchantId && newMerchantId ) {
this.setData({
merchantId: newMerchantId
......
......@@ -8,11 +8,19 @@ page{
z-index: 2;
background: #ffffff;
}
.banner{
display: flex;
// align-items: center;
justify-content: center;
}
.bg {
box-sizing: border-box;
display: inline-block;
width: 690rpx;
height: 280rpx;
border-radius: 10rpx;
margin: 24rpx auto 30rpx;
margin: 24rpx auto 0;
text-align: center;
}
.layout{
padding-top: 84px;
......
......@@ -4,6 +4,8 @@
</view>
<!-- 优选 -->
<view class="layout">
<glsx-image webp class="bg" src="mall/bg.png"></glsx-image>
<view class="banner">
<glsx-image webp custom-class="bg" src="mall/bg.png"></glsx-image>
</view>
<carOwner id="currentChannel_6" bindshowShoppingCar="showShoppingCarFn" merchantid="{{merchantId}}" channelID="{{currentChannel.id}}"></carOwner>
</view>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!