xbx #75
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
.vscode
|
.vscode
|
||||||
/node_modules/*
|
/node_modules/*
|
||||||
unpackage
|
unpackage
|
||||||
|
manifest.json
|
@ -249,6 +249,17 @@ export default {
|
|||||||
type: type,
|
type: type,
|
||||||
status: status,
|
status: status,
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
// 获取直播列表
|
||||||
|
tabLiveList(){
|
||||||
|
return vm.$u.post('Specialci/tabLiveList')
|
||||||
|
},
|
||||||
|
// 获取图文视频详情
|
||||||
|
articleInfo({article_id}){
|
||||||
|
return vm.$u.post('article/articleInfo',{article_id})
|
||||||
|
},
|
||||||
|
getStoreInfo({id}){
|
||||||
|
return vm.$u.post('Store/getStoreInfo',{id})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,59 +4,20 @@ const install = (Vue, vm) => {
|
|||||||
baseUrl: 'https://dmmall.sdbairui.com/api',
|
baseUrl: 'https://dmmall.sdbairui.com/api',
|
||||||
loadingText: '努力加载中~',
|
loadingText: '努力加载中~',
|
||||||
loadingTime: 800
|
loadingTime: 800
|
||||||
// ......
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 请求拦截,配置Token等参数
|
// 请求拦截,配置Token等参数
|
||||||
Vue.prototype.$u.http.interceptor.request = (config) => {
|
Vue.prototype.$u.http.interceptor.request = (config) => {
|
||||||
// 引用token
|
|
||||||
// 方式一,存放在vuex的token,假设使用了uView封装的vuex方式
|
|
||||||
// 见:https://uviewui.com/components/globalVariable.html
|
|
||||||
// config.header.token = vm.token;
|
|
||||||
|
|
||||||
// 方式二,如果没有使用uView封装的vuex方法,那么需要使用$store.state获取
|
|
||||||
// config.header.token = vm.$store.state.token;
|
|
||||||
|
|
||||||
// 方式三,如果token放在了globalData,通过getApp().globalData获取
|
|
||||||
// config.header.token = getApp().globalData.username;
|
|
||||||
|
|
||||||
// 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的
|
|
||||||
// 所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值
|
|
||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
// console.log(token);
|
|
||||||
// config.header.token = token;
|
|
||||||
config.header.Authorization = 'Bearer' + " " + token;
|
|
||||||
// config.header.Token = 'xxxxxx';
|
|
||||||
|
|
||||||
// 可以对某个url进行特别处理,此url参数为this.$u.get(url)中的url值
|
config.header.Authorization = 'Bearer' + " " + token;
|
||||||
// if(config.url == '/user/login') config.header.noToken = true;
|
|
||||||
// 最后需要将config进行return
|
|
||||||
return config;
|
return config;
|
||||||
// 如果return一个false值,则会取消本次请求
|
|
||||||
// if(config.url == '/user/rest') return false; // 取消某次请求
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// // 响应拦截,判断状态码是否通过
|
|
||||||
// Vue.prototype.$u.http.interceptor.response = (res) => {
|
|
||||||
// if(res.code == 200) {
|
|
||||||
// // res为服务端返回值,可能有code,result等字段
|
|
||||||
// // 这里对res.result进行返回,将会在this.$u.post(url).then(res => {})的then回调中的res的到
|
|
||||||
// // 如果配置了originalData为true,请留意这里的返回值
|
|
||||||
// return res.result;
|
|
||||||
// } else if(res.code == 201) {
|
|
||||||
// // 假设201为token失效,这里跳转登录
|
|
||||||
// vm.$u.toast('验证失败,请重新登录');
|
|
||||||
// setTimeout(() => {
|
|
||||||
// // 此为uView的方法,详见路由相关文档
|
|
||||||
// vm.$u.route('/pages/user/login')
|
|
||||||
// }, 1500)
|
|
||||||
// return false;
|
|
||||||
// } else {
|
|
||||||
// // 如果返回false,则会调用Promise的reject回调,
|
|
||||||
// // 并将进入this.$u.post(url).then().catch(res=>{})的catch回调中,res为服务端的返回值
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="video-item" v-if="item" @click="toDetailsPage()" data-article_id="item.article_id" >
|
<view class="video-item" v-if="item" @click="toDetailsPage(item.article_id)">
|
||||||
<image class="head" :src="item.article_pic" v-if="item.type == 1" ></image>
|
<image class="head" :src="item.article_pic" v-if="item.type == 1" ></image>
|
||||||
<view class="header_fist" v-else>
|
<view class="header_fist" v-else>
|
||||||
<view class="backes"></view>
|
<view class="backes"></view>
|
||||||
@ -15,17 +15,17 @@
|
|||||||
<image src="/static/image/common/4.png" @click.stop="showAction"></image>
|
<image src="/static/image/common/4.png" @click.stop="showAction"></image>
|
||||||
<view class="action" v-if="show == item.article_id">
|
<view class="action" v-if="show == item.article_id">
|
||||||
<view class="bubble">
|
<view class="bubble">
|
||||||
<view @click="articleLike">
|
<view @click.stop="articleLike">
|
||||||
<image src="/static/image/common/5.png" v-if="item.is_like == 0"></image>
|
<image src="/static/image/common/5.png" v-if="item.is_like == 0"></image>
|
||||||
<image src="/static/image/common/8.png" v-else></image>
|
<image src="/static/image/common/8.png" v-else></image>
|
||||||
<text>点赞</text>
|
<text>点赞</text>
|
||||||
</view>
|
</view>
|
||||||
<view @click="articleCollect">
|
<view @click.stop="articleCollect">
|
||||||
<image src="/static/image/common/6.png" v-if="item.is_collect == 0"></image>
|
<image src="/static/image/common/6.png" v-if="item.is_collect == 0"></image>
|
||||||
<image src="/static/image/common/9.png" v-else></image>
|
<image src="/static/image/common/9.png" v-else></image>
|
||||||
<text>收藏</text>
|
<text>收藏</text>
|
||||||
</view>
|
</view>
|
||||||
<view @click="articleAddShield">
|
<view @click.stop="articleAddShield">
|
||||||
<image src="/static/image/common/7.png"></image>
|
<image src="/static/image/common/7.png"></image>
|
||||||
<text>屏蔽用户</text>
|
<text>屏蔽用户</text>
|
||||||
</view>
|
</view>
|
||||||
@ -229,11 +229,9 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toDetailsPage(e) {
|
toDetailsPage(id) {
|
||||||
console.log(e)
|
|
||||||
let article_id = '2'
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pageB/photo/index?article_id=' + article_id,
|
url: '/pageB/photo/index?id=' + id
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "deming",
|
"name" : "deming",
|
||||||
"appid" : "__UNI__10450AF",
|
"appid" : "__UNI__62A680B",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.0",
|
"versionName" : "1.0.0",
|
||||||
"versionCode" : "100",
|
"versionCode" : "100",
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="userinfo">
|
<view class="userinfo">
|
||||||
<view class="userhead">
|
<view class="userhead">
|
||||||
<image></image>
|
<image :src="list.member_avatar"></image>
|
||||||
<text>+</text>
|
<text>+</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="zan">
|
<view class="zan">
|
||||||
<image></image>
|
<image></image>
|
||||||
<text>123</text>
|
<text>{{list.like_num}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="shoucang">
|
<view class="shoucang">
|
||||||
<image></image>
|
<image></image>
|
||||||
<text>123</text>
|
<text>{{list.collect_num}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="pinglun">
|
<view class="pinglun">
|
||||||
<image></image>
|
<image></image>
|
||||||
<text>123</text>
|
<text>{{list.comment_num}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="gouwu">
|
<view class="gouwu">
|
||||||
<image></image>
|
<image></image>
|
||||||
@ -78,6 +78,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
props:['list']
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
@ -5,11 +5,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<swiper class="swiper">
|
<swiper class="swiper">
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<image></image>
|
<image :src="list.article_pic"></image>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
<swiper-item>
|
<!-- <swiper-item>
|
||||||
<image></image>
|
<image></image>
|
||||||
</swiper-item>
|
</swiper-item> -->
|
||||||
|
|
||||||
</swiper>
|
</swiper>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<view class="title">hasjdhajskhj</view>
|
<view class="title">hasjdhajskhj</view>
|
||||||
<view class="info u-line-2">asdjhasjdkasljdklasjkl</view>
|
<view class="info u-line-2">asdjhasjdkasljdklasjkl</view>
|
||||||
</view>
|
</view>
|
||||||
<userinfo class="userinfo"></userinfo>
|
<userinfo class="userinfo" :list="list"></userinfo>
|
||||||
<shpoone class="shpoone"></shpoone>
|
<shpoone class="shpoone"></shpoone>
|
||||||
<shoplist></shoplist>
|
<shoplist></shoplist>
|
||||||
</view>
|
</view>
|
||||||
@ -120,6 +120,23 @@ export default {
|
|||||||
userinfo,
|
userinfo,
|
||||||
shpoone,
|
shpoone,
|
||||||
shoplist
|
shoplist
|
||||||
|
},
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
list:{}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
articleInfo(article_id){
|
||||||
|
this.$u.api.articleInfo({article_id}).then((res)=>{
|
||||||
|
console.log(res)
|
||||||
|
this.list = res.data.info
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(o){
|
||||||
|
this.id = o.id
|
||||||
|
this.articleInfo(this.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="details">
|
<view class="details">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<image></image>
|
<image :src="info.store_avatar"></image>
|
||||||
<view class="name">店铺名称</view>
|
<view class="name">{{info.store_name}}</view>
|
||||||
<view class="info">创建时间:2020年04月10日 | 浙江金华市</view>
|
<view class="info">创建时间:{{store_addtime|date}} | {{info.live_store_address}}</view>
|
||||||
<view class="num">
|
<view class="num">
|
||||||
<view>
|
<view>
|
||||||
<view class="value">23435</view>
|
<view class="value">{{info.store_collect}}</view>
|
||||||
<view class="title">粉丝数</view>
|
<view class="title">粉丝数</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
@ -14,7 +14,7 @@
|
|||||||
<view class="title">评价</view>
|
<view class="title">评价</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="value">23435</view>
|
<view class="value">{{info.store_credit}}</view>
|
||||||
<view class="title">信用等级</view>
|
<view class="title">信用等级</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
<image></image>
|
<image></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="image-list">
|
<view class="image-list">
|
||||||
<image></image>
|
<image :src="info.business_licence_number_electronic"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -33,7 +33,15 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {
|
||||||
|
info:{}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(){
|
||||||
|
this.$u.api.getStoreInfo({id:1}).then((res)=>{
|
||||||
|
console.log(res)
|
||||||
|
this.info = res.data
|
||||||
|
})
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -14,11 +14,11 @@
|
|||||||
<view>我的</view>
|
<view>我的</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="top">
|
<view class="top" :style="{'background-image':'url(' + info.store_banner + ')'}">
|
||||||
<image></image>
|
<image :src="info.store_avatar"></image>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="name u-line-1">小米官方旗舰店</view>
|
<view class="name u-line-1">{{info.store_name}}</view>
|
||||||
<view class="num">粉丝数:234</view>
|
<view class="num">粉丝数:{{info.store_collect}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">
|
<view class="btn">
|
||||||
<image></image>
|
<image></image>
|
||||||
@ -85,7 +85,8 @@ export default {
|
|||||||
cur: 0,
|
cur: 0,
|
||||||
list:[],
|
list:[],
|
||||||
indexlist:[],
|
indexlist:[],
|
||||||
indextop:[]
|
indextop:[],
|
||||||
|
info:{}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components:{
|
components:{
|
||||||
@ -111,6 +112,10 @@ export default {
|
|||||||
this.indextop = [res.data[0],res.data[1]]
|
this.indextop = [res.data[0],res.data[1]]
|
||||||
this.indexlist = res.data.slice(2,)
|
this.indexlist = res.data.slice(2,)
|
||||||
})
|
})
|
||||||
|
this.$u.api.getStoreInfo({id:1}).then((res)=>{
|
||||||
|
console.log(res)
|
||||||
|
this.info = res.data
|
||||||
|
})
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -216,8 +216,14 @@
|
|||||||
this.getRecommendList();
|
this.getRecommendList();
|
||||||
this.getSwiper();
|
this.getSwiper();
|
||||||
this.getZhiBoSwiper();
|
this.getZhiBoSwiper();
|
||||||
|
this.tabLiveList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
tabLiveList(){
|
||||||
|
this.$u.api.tabLiveList().then((res)=>{
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
},
|
||||||
getSwiper() {
|
getSwiper() {
|
||||||
this.$u.api.getIndexSwiper().then(res => {
|
this.$u.api.getIndexSwiper().then(res => {
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user