Merge pull request 'xbx' (#40) from xbx into master

Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/40
This commit is contained in:
luyuan 2020-07-03 09:10:59 +08:00
commit 6dfe6ca7c3
7 changed files with 140 additions and 7 deletions

View File

@ -109,6 +109,12 @@ export default {
goods_id: id
});
},
getStoreGoodsList({ id, page = 0}){
return vm.$u.post('Store/getStoreGoodsList', {
id: id,
page:page
});
}
}
}

6
package-lock.json generated
View File

@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"uview-ui": {
"version": "1.3.68",
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.3.68.tgz",
"integrity": "sha512-fwszoohFC1HLvIqwwnXPRytT52qGy0viGEzyJtVwemNBAu5z6Ddjwe9ORqsrlQQo7PSvHdyCNHWrSLGzoyKKoQ=="
"version": "1.4.3",
"resolved": "https://registry.npm.taobao.org/uview-ui/download/uview-ui-1.4.3.tgz?cache=0&sync_timestamp=1593581462515&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuview-ui%2Fdownload%2Fuview-ui-1.4.3.tgz",
"integrity": "sha1-iZXwicmK50MPu87vgbDDTBmm8eE="
}
}
}

View File

@ -13,6 +13,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"uview-ui": "^1.3.68"
"uview-ui": "^1.4.3"
}
}

View File

@ -115,6 +115,9 @@
},
//
loginOn() {
// uni.navigateTo({
// url: '/pageE/zhibo/index'
// });
console.log("登录")
// console.log(this.member_mobile)
// console.log(this.sms_code)

View File

@ -40,8 +40,9 @@
<view class="classify" v-if="cur==0">
111
</view>
<view class="list" v-if="cur==1">
222
<!-- 商品筛选排序未完成 -->
<view class="item" v-if="cur==1">
<item v-for="item in list" :key="item.gc_id" :info="item" class="item"></item>
</view>
</view>
<view class="tabbar">
@ -65,13 +66,18 @@
</view>
</template>
<script>
import item from "@/components/shop/list/item"
export default {
data() {
return {
show: false,
cur: 0
cur: 0,
list:[]
}
},
components:{
item
},
methods: {
toDetailsPage() {
uni.navigateTo({
@ -79,6 +85,12 @@ export default {
});
}
},
onLoad(){
this.$u.api.getStoreGoodsList({id:1}).then((res)=>{
console.log(res.data)
this.list= res.data.list
})
}
};
</script>
<style lang="scss" scoped>
@ -191,6 +203,9 @@ export default {
}
}
}
.main{
padding-bottom: 98rpx;
}
.tabbar {
border-top: 1rpx #DBDADA solid;
width: 100%;
@ -218,5 +233,12 @@ export default {
}
}
}
.item{
display: flex;
flex-wrap: wrap;
justify-content: space-between;
// margin-top: 20rpx;
padding:25rpx;
}
}
</style>

101
pageE/zhibo/index.nvue Normal file
View File

@ -0,0 +1,101 @@
<template>
<view>
<live-pusher id='livePusher' ref="livePusher" class="livePusher" url=""
mode="SD" :muted="true" :enable-camera="true" :auto-focus="true" :beauty="0" whiteness="0"
aspect="9:16" @statechange="statechange" @netstatus="netstatus" @error = "error"
style="width:750rpx;height:750rpx"></live-pusher>
<button class="btn" @click="start">开始推流</button>
<button class="btn" @click="pause">暂停推流</button>
<button class="btn" @click="resume">resume</button>
<button class="btn" @click="stop">停止推流</button>
<button class="btn" @click="snapshot">快照</button>
<button class="btn" @click="startPreview">开启摄像头预览</button>
<button class="btn" @click="stopPreview">关闭摄像头预览</button>
<button class="btn" @click="switchCamera">切换摄像头</button>
</view>
</template>
<script>
export default {
data: {
fil: true
},
onReady() {
// 注意需要在onReady中 或 onLoad 延时
this.context = uni.createLivePusherContext("livePusher", this);
},
methods: {
statechange(e) {
console.log("statechange:" + JSON.stringify(e));
},
netstatus(e) {
console.log("netstatus:" + JSON.stringify(e));
},
error(e) {
console.log("error:" + JSON.stringify(e));
},
start: function() {
this.context.start({
success: (a) => {
console.log("livePusher.start:" + JSON.stringify(a));
}
});
},
close: function() {
this.context.close({
success: (a) => {
console.log("livePusher.close:" + JSON.stringify(a));
}
});
},
snapshot: function() {
this.context.snapshot({
success: (e) => {
console.log(JSON.stringify(e));
}
});
},
resume: function() {
this.context.resume({
success: (a) => {
console.log("livePusher.resume:" + JSON.stringify(a));
}
});
},
pause: function() {
this.context.pause({
success: (a) => {
console.log("livePusher.pause:" + JSON.stringify(a));
}
});
},
stop: function() {
this.context.stop({
success: (a) => {
console.log(JSON.stringify(a));
}
});
},
switchCamera: function() {
this.context.switchCamera({
success: (a) => {
console.log("livePusher.switchCamera:" + JSON.stringify(a));
}
});
},
startPreview: function() {
this.context.startPreview({
success: (a) => {
console.log("livePusher.startPreview:" + JSON.stringify(a));
}
});
},
stopPreview: function() {
this.context.stopPreview({
success: (a) => {
console.log("livePusher.stopPreview:" + JSON.stringify(a));
}
});
}
}
}
</script>

View File

@ -218,6 +218,7 @@ export default {
},
getRecommendList() {
this.$u.api.getRecommendList().then(res => {
console.log(res)
if(res.errCode == 0) {
this.recommendList = res.data.list;
}