分享二维码,开启商铺
This commit is contained in:
parent
df3b370421
commit
62db07a644
@ -4,6 +4,7 @@ export default {
|
||||
genderKV:{
|
||||
MALE:'先生',FEMALE:'女士'
|
||||
},
|
||||
shareQRCode:()=>request.get('/api/user/qr_code'),
|
||||
getPhoneByCode(code){
|
||||
return request.post('/api/user/send-code',{})
|
||||
},
|
||||
|
||||
6
app.json
6
app.json
@ -45,6 +45,12 @@
|
||||
"iconPath": "assets/icon/tabs/tab1.png",
|
||||
"selectedIconPath": "assets/icon/tabs/tab1-active.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/shop/index/index",
|
||||
"text": "商家",
|
||||
"iconPath": "assets/icon/tabs/tab2.png",
|
||||
"selectedIconPath": "assets/icon/tabs/tab2-active.png"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/order/index/index",
|
||||
"text": "订单",
|
||||
|
||||
BIN
assets/icon/help/qrcode.png
Normal file
BIN
assets/icon/help/qrcode.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
assets/icon/shop/phone-black.png
Normal file
BIN
assets/icon/shop/phone-black.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1007 B |
@ -5,6 +5,7 @@ Component({
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
width:String,
|
||||
titleText:{
|
||||
type:String,
|
||||
value:''
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
<page-container model:show="{{_show}}" wx:if="{{show}}" position="center"
|
||||
class="custom-modal-view" bind:afterleave="afterLeave"
|
||||
custom-style="background-color:transparent;left:27px;width:calc(100vw - 54px);height:200px;{{dynamicsStyle}}">
|
||||
custom-style="background-color:transparent;left:{{width?'calc((100vw - '+width+')/2)':'27px'}};width:{{width||'calc(100vw - 54px)'}};height:200px;{{dynamicsStyle}}">
|
||||
<view class="custom-modal-view-overlay" wx:if="{{!overlayClose}}"></view>
|
||||
<view class="modal-view-main" id="modalViewMain">
|
||||
<view class="title {{titleTextCenter?'center':''}}">
|
||||
@ -14,7 +14,7 @@
|
||||
<input wx:if="{{editable&&useInput}}" model:value="{{content}}" cursor-spacing="140px"
|
||||
focus="{{show&&autoFocus}}" class="content-input"
|
||||
placeholder="{{contentPlaceholder}}"/>
|
||||
<textarea class="content-textarea {{contentMessage?'error':''}}" model:value="{{content}}" row="3" wx:elif="{{editable}}" focus="{{show&&autoFocus}}"
|
||||
<textarea class="content-textarea {{contentMessage?'error':''}}" model:value="{{content}}" row="3" wx:elif="{{editable}}" focus="{{show&&autoFocus}}" disable-default-padding
|
||||
placeholder="{{contentPlaceholder}}" focus="{{contentFocus}}" animation="{{contentAnimation}}" cursor-spacing="200rpx"></textarea>
|
||||
<view class="content-text" wx:elif="{{content}}">{{content}}</view>
|
||||
|
||||
|
||||
@ -50,6 +50,7 @@
|
||||
.nav-bar-content .share{
|
||||
width:30rpx;height:34rpx;
|
||||
padding:12rpx 28rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.nav-bar-content .center{
|
||||
flex:1;
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
<label class="detail">{{shop.gift_points_rate_text}}</label>
|
||||
</view>
|
||||
</view>
|
||||
<view class="promation">
|
||||
<view class="coupon" wx:if="{{shop.featured_product}}">
|
||||
<view class="promation" wx:if="{{shop.featured_product}}">
|
||||
<view class="coupon">
|
||||
<label class="tag">[{{shop.featured_product.promotion_text}}]</label>
|
||||
<label class="detail">{{shop.featured_product.product_name}}</label>
|
||||
</view>
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
.shop-item{
|
||||
display: flex;
|
||||
}
|
||||
.shop-item:first-child{
|
||||
margin-top:0;
|
||||
}
|
||||
.shop-item .logo{
|
||||
width:180rpx;height:180rpx;
|
||||
border-radius: 18rpx;
|
||||
@ -11,12 +14,12 @@
|
||||
}
|
||||
.shop-item .line1{
|
||||
line-height: 1.4;
|
||||
font-size:34rpx;
|
||||
font-size:32rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
.shop-item .line2{
|
||||
line-height: 1.4;
|
||||
font-size: 26rpx;
|
||||
font-size: 24rpx;
|
||||
display: flex;
|
||||
color:#888888;
|
||||
margin-top:14rpx;
|
||||
@ -38,7 +41,7 @@
|
||||
}
|
||||
.shop-item .promation.buy .coupon::before{
|
||||
content: '买';
|
||||
background-color:#ff0000;
|
||||
background-color:#FF8C12;
|
||||
}
|
||||
.shop-item .promation .coupon::before{
|
||||
content: '券';
|
||||
@ -49,7 +52,7 @@
|
||||
color:#fff;
|
||||
}
|
||||
.shop-item .promation.buy .tag{
|
||||
color:#ff0000;
|
||||
color:#FF8C12;
|
||||
}
|
||||
.shop-item .promation .tag{
|
||||
font-weight: 500;
|
||||
|
||||
@ -44,4 +44,5 @@
|
||||
width:100%;
|
||||
text-align: center;
|
||||
color:#999999;
|
||||
opacity: .1;
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
const app = getApp();
|
||||
import userApi from '../../../api/user';
|
||||
|
||||
Page({
|
||||
|
||||
@ -9,9 +10,12 @@ Page({
|
||||
userInfo:{},
|
||||
refresherTriggered:true,
|
||||
bgHeight:'100%',
|
||||
appConfig:{}
|
||||
},
|
||||
appConfig:{},
|
||||
|
||||
isShowQRCode:false,
|
||||
|
||||
shareQRCodeUrl:''
|
||||
},
|
||||
goToCouponList(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/my/coupon/index',
|
||||
@ -50,6 +54,16 @@ Page({
|
||||
},
|
||||
shareFriend(){
|
||||
|
||||
},
|
||||
showQRCode(){
|
||||
userApi.shareQRCode().then((data)=>{
|
||||
this.setData({
|
||||
shareQRCodeUrl:data.url
|
||||
})
|
||||
})
|
||||
this.setData({
|
||||
isShowQRCode:true
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"usingComponents": {
|
||||
"modal-view":"/components/modalView"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
@ -8,9 +8,7 @@
|
||||
<image class="avatar" src="{{userInfo.optimized_avatar||'/assets/icon/my/avatar.png'}}"/>
|
||||
</navigator>
|
||||
<view class="name">{{userInfo.nickname}}</view>
|
||||
<navigator class="setting" url="/pages/my/setting/index/index">
|
||||
<image src="/assets/icon/my/setting@2x.png" class="icon"/>
|
||||
</navigator>
|
||||
<image src="/assets/icon/help/qrcode.png" class="qrcode" bind:tap="showQRCode"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -81,3 +79,9 @@
|
||||
</view>
|
||||
<view class="scroll-view-dispatch"></view>
|
||||
</scroll-view>
|
||||
|
||||
<modal-view show="{{isShowQRCode}}" isShowCancel="{{false}}" isShowOk="{{false}}" class="modal-view-qrcode" width="256px">
|
||||
<image class="qrcode" src="{{shareQRCodeUrl}}" show-menu-by-longpress/>
|
||||
<view class="weui-loading" wx:if="{{!shareQRCodeUrl}}"></view>
|
||||
<view class="tips">邀请好友丨扫码体验</view>
|
||||
</modal-view>
|
||||
@ -29,17 +29,8 @@
|
||||
flex:1;
|
||||
margin-left:30rpx;
|
||||
}
|
||||
.user-info .content .setting{
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
width:66rpx;height:66rpx;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding:18rpx 16rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.user-info .content .setting .icon{
|
||||
width:36rpx;height:30rpx;
|
||||
.user-info .content .qrcode{
|
||||
width:56rpx;height:56rpx;
|
||||
}
|
||||
|
||||
.property{
|
||||
@ -99,3 +90,24 @@
|
||||
.cell.is-button:hover{
|
||||
background-color: #fff;
|
||||
}
|
||||
.modal-view-qrcode{
|
||||
position: relative;
|
||||
}
|
||||
.modal-view-qrcode .modal-view-main{
|
||||
padding:36rpx;
|
||||
}
|
||||
.modal-view-qrcode .qrcode{
|
||||
width:220px;height: 220px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.modal-view-qrcode .weui-loading{
|
||||
position: absolute;
|
||||
left:50%;top:44%;
|
||||
margin-left: -0.5em;
|
||||
}
|
||||
.modal-view-qrcode .tips{
|
||||
font-size:32rpx;
|
||||
color: #222222;
|
||||
text-align: center;
|
||||
margin-top:26rpx;
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
<!-- <nav-bar class="nav-bar"/> -->
|
||||
|
||||
<!-- <view class="tab-bar">
|
||||
<view class="tab-bar">
|
||||
<view class="item-container {{tabIndex==0?'current':''}}" bind:tap="changeTab" data-index="0">
|
||||
<view class="item">配送订单</view>
|
||||
</view>
|
||||
@ -10,7 +10,7 @@
|
||||
<view class="item-container {{tabIndex==2?'current':''}}" bind:tap="changeTab" data-index="2">
|
||||
<view class="item">商品订单</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <swiper style="height:{{scrollViewHeight*2}}rpx"> -->
|
||||
|
||||
<!-- 跑腿列表 -->
|
||||
|
||||
@ -67,6 +67,19 @@ Page({
|
||||
});
|
||||
});
|
||||
},
|
||||
navToMap(){
|
||||
wx.openLocation({
|
||||
name:this.data.detail.name,
|
||||
address:this.data.detail.address,
|
||||
latitude: this.data.detail.latitude,
|
||||
longitude: this.data.detail.longitude,
|
||||
})
|
||||
},
|
||||
makePhoneCall(){
|
||||
wx.makePhoneCall({
|
||||
phoneNumber:this.data.detail.phone,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
|
||||
@ -2,6 +2,5 @@
|
||||
"usingComponents": {
|
||||
"nav-bar":"/components/navbar",
|
||||
"merchant-order":"/components/merchantOrder"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
<nav-bar background="#fff" share back></nav-bar>
|
||||
<!-- <nav-bar background="#fff" share back></nav-bar> -->
|
||||
<view class="page-container shop-info">
|
||||
<view class="head">
|
||||
<view class="left">
|
||||
@ -13,18 +13,18 @@
|
||||
<view class="l1">{{detail.address}}</view>
|
||||
<view class="l2" wx:if="{{detail.distance}}">距离{{detail.distance}}</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="right" bind:tap="navToMap">
|
||||
<view class="icon-con">
|
||||
<image class="icon" src="/assets/icon/shop/location@2x.png"/>
|
||||
</view>
|
||||
<view class="text">地图</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="icon-con">
|
||||
<image class="icon" src="/assets/icon/shop/phone@2x.png"/>
|
||||
</view>
|
||||
<view class="text">导航</view>
|
||||
</view>
|
||||
<view class="right" bind:tap="makePhoneCall">
|
||||
<view class="icon-con">
|
||||
<image class="icon" src="/assets/icon/shop/phone-black.png"/>
|
||||
</view>
|
||||
<view class="text">电话</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
@ -69,26 +69,28 @@
|
||||
text-overflow:ellipsis;
|
||||
overflow: hidden;
|
||||
margin-top:6rpx;
|
||||
color:#555555;
|
||||
}
|
||||
.shop-info .address .l2{
|
||||
font-size: 24rpx;
|
||||
color: #888888;
|
||||
font-size: 26rpx;
|
||||
color: #222222;
|
||||
margin-top:40rpx
|
||||
}
|
||||
.shop-info .address .right{
|
||||
font-size:22rpx;
|
||||
color: #888888;
|
||||
font-size:26rpx;
|
||||
color: #555555;
|
||||
text-align: center;
|
||||
margin-left: 44rpx;
|
||||
}
|
||||
.shop-info .address .icon-con{
|
||||
padding:8rpx;
|
||||
padding:10rpx;
|
||||
background: rgba(153, 153, 153, 0.1);
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.shop-info .address .icon{
|
||||
width:30rpx;height:30rpx;
|
||||
width:26rpx;height:26rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.shop-info .address .right .text{
|
||||
margin-top:26rpx;
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
<view class="custom-scroll-view">
|
||||
<view>
|
||||
<nav-bar/>
|
||||
<navigator class="consume" url="/pages/my/money/index">
|
||||
<view class="consume" url="/pages/my/money/index">
|
||||
<view class="title">蜂蜜 (克)</view>
|
||||
<view class="point">{{userInfo.points}}</view>
|
||||
<view class="tips">取快递自动抵扣</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<button wx:for="{{categories}}" wx:key="index" class="item" size="mini"
|
||||
bind:tap="changeTab" data-index="{{index}}" data-cid="{{item.id}}"
|
||||
@ -11,9 +13,8 @@
|
||||
{{item.name}}
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<list-view class="shop-list" bind:refresh="refreshList"
|
||||
bind:loadMore="loadList" height="{{scrollViewHeight}}"
|
||||
</view>
|
||||
<list-view class="main shop-list" bind:refresh="refreshList" bind:loadMore="loadList"
|
||||
refresher-triggered="{{pager.refreshTrigger}}"
|
||||
show-load-more="{{!(shopList.length==0&&pager.loadAll)}}"
|
||||
loading="{{pager.loading}}" load-all="{{pager.loadAll}}">
|
||||
@ -24,3 +25,4 @@
|
||||
<view class="title">暂无该分类商铺</view>
|
||||
</view>
|
||||
</list-view>
|
||||
</view>
|
||||
@ -4,15 +4,15 @@
|
||||
background: linear-gradient(270deg, #FFDB00 0%, #FFC300 60%);
|
||||
box-shadow: 0px 6px 6px 0px rgba(0, 0, 0, 0.06);
|
||||
margin:20rpx;
|
||||
padding:40rpx 30rpx;
|
||||
padding:34rpx 0 32rpx 30rpx;
|
||||
position:relative;
|
||||
}
|
||||
.consume .title{
|
||||
font-size: 32rpx;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
.consume .point{
|
||||
font-size: 70rpx;
|
||||
margin-top:40rpx;
|
||||
margin-top:50rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
.consume .tips{
|
||||
@ -22,7 +22,7 @@
|
||||
background-color: var(--main-color);
|
||||
line-height: 40rpx;
|
||||
font-size: 22rpx;
|
||||
padding:0 16rpx;
|
||||
padding:0 12rpx 0 24rpx;
|
||||
}
|
||||
|
||||
.btns{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user