提交 df3b9ffd 编写于 作者: D devil

细节优化

上级 840f1bc0
......@@ -208,7 +208,7 @@ class BuyService
$where['c.user_id'] = $params['user']['id'];
$field = 'c.*, g.inventory_unit, g.is_shelves, g.is_delete_time, g.buy_min_number, g.buy_max_number, g.model';
$data = Db::name('Cart')->alias('c')->join(['__GOODS__'=>'g'], 'g.id=c.goods_id')->where($where)->field($field)->order('c.id desc')->select();
$data = Db::name('Cart')->alias('c')->leftJoin(['__GOODS__'=>'g'], 'g.id=c.goods_id')->where($where)->field($field)->order('c.id desc')->select();
// 数据处理
if(!empty($data))
......
......@@ -276,7 +276,6 @@ class GoodsCommentsService
$v['upd_time_date'] = empty($v['upd_time']) ? null : date('Y-m-d', $v['upd_time']);
}
}
//print_r($data);
return DataReturn('处理成功', 0, $data);
}
......
......@@ -276,8 +276,10 @@ button.colorpicker-submit:active {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.15);
box-shadow: inset 0 3px 5px rgba(255, 255, 255, 0.15);
}
button.colorpicker-submit {
padding-right: 10px;
}
button.colorpicker-submit img {
margin-right: 7px;
width: 14px;
height: 14px;
float: right;
......
......@@ -85,5 +85,16 @@ Page({
// 事件
category_event(e) {
my.navigateTo({url: '/pages/goods-search/goods-search?category_id='+e.target.dataset.value});
}
},
// 自定义分享
onShareAppMessage() {
var user = app.get_user_cache_info() || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
return {
title: app.data.application_title,
desc: app.data.application_describe,
path: '/pages/goods-category/goods-category?referrer=' + user_id
};
},
});
\ No newline at end of file
.goods-photo .swiper-item {
height: 65vh !important;
height: 55vh !important;
display: block;
}
......@@ -243,12 +243,12 @@
}
.goods-video video {
width: 100%;
height: 65vh;
height: 55vh;
}
.goods-video-submit {
position: absolute;
left: 30rpx;
top: calc(65vh - 110rpx);
top: calc(55vh - 110rpx);
z-index: 2;
}
.goods-video-submit image {
......
......@@ -189,4 +189,16 @@ Page({
});
this.get_data_list(1);
},
// 自定义分享
onShareAppMessage() {
var user = app.get_user_cache_info() || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
return {
title: app.data.application_title,
desc: app.data.application_describe,
path: '/pages/goods-search/goods-search?referrer=' + user_id
};
},
});
......@@ -199,10 +199,12 @@ Page({
// 自定义分享
onShareAppMessage() {
var user = app.get_user_cache_info() || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
return {
title: app.data.application_title,
desc: app.data.application_describe,
path: '/pages/index/index?share=index'
path: '/pages/index/index?referrer=' + user_id
};
},
......
......@@ -101,4 +101,15 @@ Page({
});
},
// 自定义分享
onShareAppMessage() {
var user = app.get_user_cache_info() || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
return {
title: app.data.application_title,
desc: app.data.application_describe,
path: '/pages/goods-category/goods-category?referrer=' + user_id
};
},
});
\ No newline at end of file
.goods-photo .swiper-item, swiper {
height: 65vh !important;
height: 55vh !important;
display: block;
}
......@@ -241,12 +241,12 @@
}
.goods-video video {
width: 100%;
height: 65vh;
height: 55vh;
}
.goods-video-submit {
position: absolute;
left: 30rpx;
top: calc(65vh - 110rpx);
top: calc(55vh - 110rpx);
z-index: 2;
}
.goods-video-submit image, .cover-goods-video-close {
......
......@@ -201,4 +201,15 @@ Page({
});
},
// 自定义分享
onShareAppMessage() {
var user = app.get_user_cache_info() || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
return {
title: app.data.application_title,
desc: app.data.application_describe,
path: '/pages/goods-search/goods-search?referrer=' + user_id
};
},
});
\ No newline at end of file
......@@ -186,10 +186,12 @@ Page({
// 自定义分享
onShareAppMessage() {
var user = app.get_user_cache_info() || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
return {
title: app.data.application_title,
desc: app.data.application_describe,
path: '/pages/index/index?share=index'
path: '/pages/index/index?referrer=' + user_id
};
},
......
......@@ -88,5 +88,16 @@ Page({
// 事件
category_event(e) {
qq.navigateTo({ url: '/pages/goods-search/goods-search?category_id=' + e.currentTarget.dataset.value});
}
},
// 自定义分享
onShareAppMessage() {
var user = app.get_user_cache_info() || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
return {
title: app.data.application_title,
desc: app.data.application_describe,
path: '/pages/goods-category/goods-category?referrer=' + user_id
};
},
});
\ No newline at end of file
.goods-photo .swiper-item, swiper {
height: 65vh !important;
height: 55vh !important;
display: block;
}
......@@ -242,12 +242,12 @@
}
.goods-video video {
width: 100%;
height: 65vh;
height: 55vh;
}
.goods-video-submit {
position: absolute;
left: 30rpx;
top: calc(65vh - 110rpx);
top: calc(55vh - 110rpx);
z-index: 2;
}
.goods-video-submit image {
......
......@@ -190,4 +190,16 @@ Page({
});
this.get_data_list(1);
},
// 自定义分享
onShareAppMessage() {
var user = app.get_user_cache_info() || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
return {
title: app.data.application_title,
desc: app.data.application_describe,
path: '/pages/goods-search/goods-search?referrer=' + user_id
};
},
});
......@@ -183,10 +183,12 @@ Page({
// 自定义分享
onShareAppMessage() {
var user = app.get_user_cache_info() || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
return {
title: app.data.application_title,
desc: app.data.application_describe,
path: '/pages/index/index?share=index'
path: '/pages/index/index?referrer=' + user_id
};
},
......
......@@ -88,5 +88,16 @@ Page({
// 事件
category_event(e) {
tt.navigateTo({ url: '/pages/goods-search/goods-search?category_id=' + e.currentTarget.dataset.value});
}
},
// 自定义分享
onShareAppMessage() {
var user = app.get_user_cache_info() || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
return {
title: app.data.application_title,
desc: app.data.application_describe,
path: '/pages/goods-category/goods-category?referrer=' + user_id
};
},
});
\ No newline at end of file
.goods-photo .swiper-item, swiper {
height: 65vh !important;
height: 55vh !important;
display: block;
}
......@@ -242,12 +242,12 @@
}
.goods-video video {
width: 100%;
height: 65vh;
height: 55vh;
}
.goods-video-submit {
position: absolute;
left: 30rpx;
top: calc(65vh - 110rpx);
top: calc(55vh - 110rpx);
z-index: 2;
}
.goods-video-submit image {
......
......@@ -190,4 +190,16 @@ Page({
});
this.get_data_list(1);
},
// 自定义分享
onShareAppMessage() {
var user = app.get_user_cache_info() || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
return {
title: app.data.application_title,
desc: app.data.application_describe,
path: '/pages/goods-search/goods-search?referrer=' + user_id
};
},
});
......@@ -184,10 +184,12 @@ Page({
// 自定义分享
onShareAppMessage() {
var user = app.get_user_cache_info() || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
return {
title: app.data.application_title,
desc: app.data.application_describe,
path: '/pages/index/index?share=index'
path: '/pages/index/index?referrer=' + user_id
};
},
......
......@@ -68,7 +68,7 @@ App({
// 请求地址
request_url: "{{request_url}}",
request_url: 'http://shopxo.com/',
// request_url: 'https://dev.shopxo.net/',
request_url: 'https://dev.shopxo.net/',
// 基础信息
application_title: "{{application_title}}",
......
......@@ -87,5 +87,16 @@ Page({
// 事件
category_event(e) {
wx.navigateTo({ url: '/pages/goods-search/goods-search?category_id=' + e.currentTarget.dataset.value});
}
},
// 自定义分享
onShareAppMessage() {
var user = app.get_user_cache_info() || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
return {
title: app.data.application_title,
desc: app.data.application_describe,
path: '/pages/goods-category/goods-category?referrer=' + user_id
};
},
});
\ No newline at end of file
.goods-photo .swiper-item, swiper {
height: 65vh !important;
height: 55vh !important;
display: block;
}
......@@ -241,12 +241,12 @@
}
.goods-video video {
width: 100%;
height: 65vh;
height: 55vh;
}
.goods-video-submit {
position: absolute;
left: 30rpx;
top: calc(65vh - 110rpx);
top: calc(55vh - 110rpx);
z-index: 2;
}
.goods-video-submit image {
......
......@@ -190,4 +190,15 @@ Page({
});
this.get_data_list(1);
},
// 自定义分享
onShareAppMessage() {
var user = app.get_user_cache_info() || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
return {
title: app.data.application_title,
desc: app.data.application_describe,
path: '/pages/goods-search/goods-search?referrer=' + user_id
};
},
});
......@@ -184,10 +184,12 @@ Page({
// 自定义分享
onShareAppMessage() {
var user = app.get_user_cache_info() || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
return {
title: app.data.application_title,
desc: app.data.application_describe,
path: '/pages/index/index?share=index'
path: '/pages/index/index?referrer=' + user_id
};
},
......
......@@ -88,71 +88,55 @@ Page({
// 进入直播
player_event(e) {
if ((this.data.detail || null) != null)
{
if (this.data.detail.status == 1 || this.data.detail.status == 2) {
var room_id = this.data.detail.id
var params = encodeURIComponent(JSON.stringify({type: 'detail'}));
wx.navigateTo({
url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${this.data.detail.id}&custom_params=${params}`
});
}
} else {
app.showToast('数据有误');
if (this.data.detail.status == 1 || this.data.detail.status == 2) {
var room_id = this.data.detail.id
var params = encodeURIComponent(JSON.stringify({type: 'detail'}));
wx.navigateTo({
url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${this.data.detail.id}&custom_params=${params}`
});
}
},
// 海报分享
share_event() {
var user = app.get_user_info(this, 'poster_event');
if (user != false) {
// 用户未绑定用户则转到登录页面
if (app.user_is_need_login(user)) {
wx.navigateTo({
url: "/pages/login/login?event_callback=poster_event"
});
return false;
} else {
wx.showLoading({ title: '生成中...' });
wx.request({
url: app.get_request_url('poster', 'index', 'weixinliveplayer'),
method: 'POST',
data: { "id": this.data.detail.id },
dataType: 'json',
success: (res) => {
wx.hideLoading();
if (res.data.code == 0) {
wx.previewImage({
current: res.data.data,
urls: [res.data.data]
});
} else {
app.showToast(res.data.msg);
}
},
fail: () => {
wx.hideLoading();
app.showToast("服务器请求出错");
}
});
share_poster_event() {
wx.showLoading({ title: '生成中...' });
wx.request({
url: app.get_request_url('poster', 'index', 'weixinliveplayer'),
method: 'POST',
data: { "id": this.data.detail.id },
dataType: 'json',
success: (res) => {
wx.hideLoading();
if (res.data.code == 0) {
wx.previewImage({
current: res.data.data,
urls: [res.data.data]
});
} else {
app.showToast(res.data.msg);
}
},
fail: () => {
wx.hideLoading();
app.showToast("服务器请求出错");
}
}
});
},
// 自定义分享
onShareAppMessage() {
var user = app.get_user_cache_info() || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
if ((this.data.detail || null) == null)
if ((this.data.detail || null) != null)
{
var did = this.data.detail.id;
var name = this.data.detail.name;
} else {
var did = 0;
var name = '';
var name = app.data.application_title;
}
return {
title: app.data.application_title + name,
title: name,
desc: app.data.application_describe,
path: '/pages/plugins/weixinliveplayer/detail/detail?id=' + did + '&referrer=' + user_id
};
......
......@@ -8,12 +8,12 @@
<!-- 基础信息 -->
<view class="bg-white base">
<view class="item">
<image class="item-icon" src="/images/plugins/weixinliveplayer/status-icon.png" mode="widthFix" />
<image class="item-icon dis-block fl" src="/images/plugins/weixinliveplayer/detail-status-icon.png" mode="widthFix" />
<text class="cr-888">直播状态</text>
<view class="fr more status-{{detail.status}}">{{detail.status_name}}</view>
</view>
<view class="item br-t item-time">
<image class="item-icon" src="/images/plugins/weixinliveplayer/time-icon.png" mode="widthFix" />
<image class="item-icon dis-block fl" src="/images/plugins/weixinliveplayer/detail-time-icon.png" mode="widthFix" />
<text class="cr-888">开播时间</text>
<view class="fr time">
<view class="start-time">{{detail.start_time}}</view>
......@@ -24,13 +24,17 @@
<!-- 导航 -->
<view class="nav wh-auto">
<button type="primary" class="share-submit fl" hover-class="none" bindtap="share_event">
<image class="item-icon" src="/images/plugins/weixinliveplayer/share-icon.png" mode="widthFix" />
<button type="primary" class="share-friend-submit fl" hover-class="none" open-type="share" hover-class="none">
<image class="item-icon" src="/images/plugins/weixinliveplayer/nav-share-friend-icon.png" mode="widthFix" />
<text>分享</text>
</button>
<button type="default" class="player-submit fr {{detail.status == 1 || detail.status == 2 ? '' : 'disabled'}}" hover-class="none" bindtap="player_event">
<image class="item-icon" src="/images/plugins/weixinliveplayer/player-icon.png" mode="widthFix" />
<text>{{detail.status_name}}</text>
<button type="primary" class="share-poster-submit fl" hover-class="none" bindtap="share_poster_event">
<image class="item-icon" src="/images/plugins/weixinliveplayer/nav-share-poster-icon.png" mode="widthFix" />
<text>海报</text>
</button>
<button type="default" class="player-submit fr" hover-class="none" bindtap="player_event">
<image class="item-icon" src="/images/plugins/weixinliveplayer/nav-player-icon.png" mode="widthFix" />
<text>进入直播</text>
</button>
</view>
......
......@@ -16,7 +16,7 @@
padding: 15rpx 10rpx 0 10rpx;
}
.base .item {
line-height: 50rpx;
line-height: 38rpx;
padding: 20rpx 0;
}
.base .item .item-icon {
......@@ -40,6 +40,9 @@
.base .item-time {
line-height: 75rpx;
}
.base .item-time .item-icon {
margin-top: 20rpx;
}
.base .item-time .time {
line-height: 38rpx;
}
......@@ -61,22 +64,29 @@
height: 100rpx;
}
.nav button {
width: 50%;
height: 100% !important;
border-radius: 0;
font-size: 32rpx;
line-height: 100rpx;
color: #fff;
}
.nav button image {
width: 40rpx;
height: 40rpx !important;
width: 32rpx;
height: 32rpx !important;
vertical-align: middle;
margin-right: 10rpx;
}
.nav button.share-friend-submit,
.nav button.share-poster-submit {
width: 30%;
}
.nav button.share-friend-submit {
background: #1bad18;
}
.nav button.share-poster-submit {
background: #6367f0;
}
.nav button.player-submit {
width: 40%;
background: #d2364c;
color: #fff;
}
.nav button.disabled {
background: #ffc5cd;
}
\ No newline at end of file
......@@ -10,15 +10,10 @@ Page({
banner_list: [],
},
onLoad(params) {
// 启动参数处理
params = app.launch_params_handle(params);
onShow() {
this.init();
},
onShow() {},
init() {
// 获取数据
this.get_data_list();
......@@ -89,8 +84,9 @@ Page({
onShareAppMessage() {
var user = app.get_user_cache_info() || null;
var user_id = (user != null && (user.id || null) != null) ? user.id : 0;
var name = ((this.data.data_base || null) != null && (this.data.data_base.application_name || null) != null) ? this.data.data_base.application_name : app.data.application_title;
return {
title: app.data.application_title,
title: name,
desc: app.data.application_describe,
path: '/pages/plugins/weixinliveplayer/index/index?referrer=' + user_id
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册