Compare commits
106 Commits
lxb
...
720af35b11
| Author | SHA1 | Date | |
|---|---|---|---|
| 720af35b11 | |||
|
|
1b5bf33166 | ||
|
|
c4c11781fb | ||
| e1519b8d68 | |||
| 0057bcd28e | |||
| 9881ea099d | |||
|
b0f224d79b
|
|||
|
045f6e6e01
|
|||
|
09a7dbdf5c
|
|||
| a47238a7a4 | |||
|
|
0a2441b1a9 | ||
| c035566fe4 | |||
|
|
ef4a4010ff | ||
| df29f86630 | |||
|
|
7b9bee2f1e | ||
| 42d39fb4c3 | |||
|
|
6ed05ecf31 | ||
|
|
692495f108 | ||
| 8cd7c3d0a0 | |||
| 5343196342 | |||
| dbb7a91330 | |||
| fe9a54987e | |||
| f6c6ffa176 | |||
| 396bb37c94 | |||
| 13bdc08c86 | |||
| 43845b4810 | |||
|
|
cc934696d1 | ||
|
|
afc7731781 | ||
| 1f9299602e | |||
| 2fd62acb73 | |||
| f69a82ace5 | |||
|
|
1f5af9d92b | ||
| 20ba2e4e8f | |||
| 2a946145e9 | |||
|
e354152beb
|
|||
| f83048e5c6 | |||
| 20b1c0da43 | |||
|
35e0c39d1d
|
|||
| 1e9f442b7b | |||
|
|
48b7219954 | ||
| 715793414f | |||
| 0a52842e35 | |||
| 0ee518854c | |||
| 4416b76d96 | |||
| 5e22f0429c | |||
|
|
38f92c6766 | ||
|
95f893a277
|
|||
| f63594706f | |||
| d54a378a9e | |||
| 6a361e3245 | |||
|
b070a559dc
|
|||
|
b146783790
|
|||
|
335f4c5564
|
|||
| 0bc6be9b9f | |||
| 0266a556d9 | |||
|
|
51cd6f8261 | ||
| af768bff80 | |||
| c118eced7f | |||
|
|
11865d4068 | ||
| bb4f3b2918 | |||
|
8727ae913d
|
|||
|
1da6974fe3
|
|||
|
bd996de410
|
|||
| 7ae10c200d | |||
|
|
8a213ba094 | ||
| 1c16a85e18 | |||
| 4ef16728f9 | |||
| 680fa48e85 | |||
| 854976c8f0 | |||
| 223dd51db7 | |||
|
|
5b31193750 | ||
| 865e2a741a | |||
| 48722ef768 | |||
| ff7c6b358d | |||
| c9c7e08a8d | |||
|
|
f30c4f4922 | ||
|
|
ea10c99cd1 | ||
| ba2cab7950 | |||
|
2ec14481fd
|
|||
|
b9b8384011
|
|||
|
|
d817d0c28b | ||
| cdd0105acb | |||
| 6d00107944 | |||
| 04adc72d92 | |||
| 120e062fcd | |||
| 2851c8e0b2 | |||
|
|
8bb1cdfd39 | ||
| f21df2f107 | |||
|
ee08038a64
|
|||
| 280915560d | |||
|
41f4050768
|
|||
| b12a3c1722 | |||
|
4004f3715b
|
|||
| 208f27aa93 | |||
| 6eabd3a575 | |||
|
2ea9b89acc
|
|||
| 100f31c6f9 | |||
|
b2d284f666
|
|||
| dbafe8b4c1 | |||
| 185f5979b6 | |||
| 410a7850e6 | |||
| c931e87209 | |||
| 94636380f1 | |||
| 5abb3f2496 | |||
| a1b14b4f5e | |||
| dd71a0f32a |
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
|||||||
/node_modules/*
|
/node_modules/*
|
||||||
unpackage
|
unpackage
|
||||||
manifest.json
|
manifest.json
|
||||||
|
deming.keystore
|
||||||
40
App.vue
@@ -1,6 +1,44 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {}
|
import { mapMutations, mapState } from 'vuex';
|
||||||
|
export default {
|
||||||
|
computed: {
|
||||||
|
...mapState(["hasLogin"])
|
||||||
|
},
|
||||||
|
onLaunch() {
|
||||||
|
// 缓存token
|
||||||
|
uni.getStorage({
|
||||||
|
key: "token",
|
||||||
|
success: (res) => {
|
||||||
|
this.loginIn(res.data);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 刷新token
|
||||||
|
if (this.hasLogin) {
|
||||||
|
this.refreshToken_function();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
...mapMutations(['loginIn']),
|
||||||
|
// 刷新token
|
||||||
|
refreshToken_function(){
|
||||||
|
this.$u.api.refreshToken({}).then((res) => {
|
||||||
|
// console.log(res);
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
let token = res.data.token;
|
||||||
|
uni.setStorageSync('token', token);//存储toke值
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
/* #ifndef APP-PLUS-NVUE */
|
||||||
@import "/static/css/normalize";
|
@import "/static/css/normalize";
|
||||||
|
/* 顶部自定义导航留白 */
|
||||||
|
.status_bar {
|
||||||
|
width: 100%;
|
||||||
|
height: var(--status-bar-height);
|
||||||
|
}
|
||||||
|
/* #endif */
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -81,6 +81,14 @@ export default {
|
|||||||
getGoodsClassRecommend() {
|
getGoodsClassRecommend() {
|
||||||
return vm.$u.post('Goods/getGoodsClassRecommend');
|
return vm.$u.post('Goods/getGoodsClassRecommend');
|
||||||
},
|
},
|
||||||
|
// goodsListByClassId
|
||||||
|
goodsListByClassId({ gc_id, page, order }) {
|
||||||
|
return vm.$u.post('goods/goodsListByClassId', {
|
||||||
|
gc_id: gc_id,
|
||||||
|
page: page,
|
||||||
|
order: order,
|
||||||
|
});
|
||||||
|
},
|
||||||
// 商品推荐
|
// 商品推荐
|
||||||
getGoodsRecommend({page, gc_id}){
|
getGoodsRecommend({page, gc_id}){
|
||||||
return vm.$u.post('Goods/getGoodsRecommend', {
|
return vm.$u.post('Goods/getGoodsRecommend', {
|
||||||
@@ -165,10 +173,17 @@ export default {
|
|||||||
goods_id: id
|
goods_id: id
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getStoreGoodsList({ id, page = 0}){
|
getStoreGoodsList({ id, page, order, gc_id }){
|
||||||
return vm.$u.post('Store/getStoreGoodsList', {
|
return vm.$u.post('Store/getStoreGoodsList', {
|
||||||
id: id,
|
id: id,
|
||||||
page:page
|
page: page,
|
||||||
|
order: order,
|
||||||
|
gc_id: gc_id,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getStoreClassifyList({ id }) {
|
||||||
|
return vm.$u.post('Store/getStoreClassifyList', {
|
||||||
|
id: id
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getStoreImgVideoList({id}){
|
getStoreImgVideoList({id}){
|
||||||
@@ -253,13 +268,56 @@ export default {
|
|||||||
tabLiveList(){
|
tabLiveList(){
|
||||||
return vm.$u.post('Specialci/tabLiveList')
|
return vm.$u.post('Specialci/tabLiveList')
|
||||||
},
|
},
|
||||||
|
// 商城-活动广告
|
||||||
|
getStoreActivity() {
|
||||||
|
return vm.$u.post('adv/storeActivity')
|
||||||
|
},
|
||||||
// 获取图文视频详情
|
// 获取图文视频详情
|
||||||
articleInfo({article_id}){
|
articleInfo({article_id}){
|
||||||
return vm.$u.post('article/articleInfo',{article_id})
|
return vm.$u.post('article/articleInfo',{article_id})
|
||||||
},
|
},
|
||||||
getStoreInfo({id}){
|
getStoreInfo({id}){
|
||||||
return vm.$u.post('Store/getStoreInfo',{id})
|
return vm.$u.post('Store/getStoreInfo',{id})
|
||||||
}
|
},
|
||||||
|
// 评论标签+数量
|
||||||
|
getEvaluateSpec({ id }) {
|
||||||
|
return vm.$u.post('Specialci/getEvaluateSpec', {
|
||||||
|
goods_id: id,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取商品评论
|
||||||
|
getAllEvalue({ goods_id, page, type }) {
|
||||||
|
return vm.$u.post('Specialci/getAllEvalue', {
|
||||||
|
goods_id: goods_id,
|
||||||
|
page: page,
|
||||||
|
type: type,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 搜索发现列表
|
||||||
|
searchwordlist() {
|
||||||
|
return vm.$u.post('ShopSearch/searchwordlist')
|
||||||
|
},
|
||||||
|
// 提交试穿订单
|
||||||
|
saveGoodsTry({ member_name, member_mobile, area_info, address_detail, goods_id, num, store_id, appointment_time }) {
|
||||||
|
return vm.$u.post('Order/saveGoodsTry', {
|
||||||
|
member_name: member_name,
|
||||||
|
member_mobile: member_mobile,
|
||||||
|
area_info: area_info,
|
||||||
|
address_detail: address_detail,
|
||||||
|
goods_id: goods_id,
|
||||||
|
num: num,
|
||||||
|
store_id: store_id,
|
||||||
|
appointment_time: appointment_time,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 达人上架商品
|
||||||
|
goodsShelves({live_id}){
|
||||||
|
return vm.$u.post('Specialci/goodsShelves',{live_id})
|
||||||
|
},
|
||||||
|
//
|
||||||
|
addFavoriteStore({ id }) {
|
||||||
|
return vm.$u.post('member/addFavoriteStore',{ fid: id })
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -175,9 +175,10 @@ export default {
|
|||||||
return vm.$u.post('Member/getFavoritesList', params);
|
return vm.$u.post('Member/getFavoritesList', params);
|
||||||
},
|
},
|
||||||
// 取消收藏(商品/店铺)
|
// 取消收藏(商品/店铺)
|
||||||
removeFavorite({ id }) {
|
removeFavorite({ id, type }) {
|
||||||
return vm.$u.post('Member/removeFavorite', {
|
return vm.$u.post('Member/removeFavorite', {
|
||||||
id: id,
|
fav_id: id,
|
||||||
|
type: type,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 设置-用户信息
|
// 设置-用户信息
|
||||||
@@ -230,15 +231,22 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 订单列表
|
// 订单列表
|
||||||
getOrderList({ page, type, refund_state }) {
|
getOrderList({ page, type }) {
|
||||||
let params = { page: page };
|
let params = { page: page };
|
||||||
if(type >= 0 || typeof type == 'string') Object.assign(params, {state_type: type});
|
if(type > 0) Object.assign(params, {type: type});
|
||||||
if(refund_state) Object.assign(params, {refund_state: refund_state});
|
|
||||||
return vm.$u.post('Order/orderList', params);
|
return vm.$u.post('Order/orderList', params);
|
||||||
},
|
},
|
||||||
// 售后列表
|
// 售后列表
|
||||||
getAfterSaleList({ page }) {
|
// getAfterSaleList({ page }) {
|
||||||
return vm.$u.post('order/afterSaleList', { page: page });
|
// return vm.$u.post('order/afterSaleList', { page: page });
|
||||||
|
// },
|
||||||
|
// 试穿列表
|
||||||
|
goodsTryOrderList() {
|
||||||
|
return vm.$u.post('order/goodsTryOrderList');
|
||||||
|
},
|
||||||
|
// 试穿订单确认完成
|
||||||
|
goodsTryConfirm({ id }) {
|
||||||
|
return vm.$u.post('order/goodsTryConfirm', { id: id });
|
||||||
},
|
},
|
||||||
// 订单详情
|
// 订单详情
|
||||||
getOrderInfo({ order_id }) {
|
getOrderInfo({ order_id }) {
|
||||||
@@ -250,6 +258,15 @@ export default {
|
|||||||
if(msg) Object.assign(params, {msg: msg});
|
if(msg) Object.assign(params, {msg: msg});
|
||||||
return vm.$u.post('Order/buyer_cancel', params);
|
return vm.$u.post('Order/buyer_cancel', params);
|
||||||
},
|
},
|
||||||
|
// add_refund
|
||||||
|
refundOrder({ order_id, goods_id, refund_amount, refund_type = 1 } = {}) {
|
||||||
|
return vm.$u.post('order/add_refund', {
|
||||||
|
order_id: order_id,
|
||||||
|
goods_id: goods_id,
|
||||||
|
refund_amount: refund_amount,
|
||||||
|
refund_type: refund_type,
|
||||||
|
});
|
||||||
|
},
|
||||||
// 删除订单
|
// 删除订单
|
||||||
deleteOrder({ order_id }) {
|
deleteOrder({ order_id }) {
|
||||||
return vm.$u.post('order/order_delete', { order_id: order_id });
|
return vm.$u.post('order/order_delete', { order_id: order_id });
|
||||||
@@ -262,6 +279,9 @@ export default {
|
|||||||
getOrderEvaluateInfo({ id }) {
|
getOrderEvaluateInfo({ id }) {
|
||||||
return vm.$u.post('Order/getOrderEvaluateInfo', { id: id });
|
return vm.$u.post('Order/getOrderEvaluateInfo', { id: id });
|
||||||
},
|
},
|
||||||
|
orderLogistics({ id }) {
|
||||||
|
return vm.$u.post('Order/orderLogistics', { order_id: id });
|
||||||
|
},
|
||||||
// 订单评价/修改评价
|
// 订单评价/修改评价
|
||||||
updateOrderEvaluate({ id, content, scores_one, scores_two, scores_three, file }) {
|
updateOrderEvaluate({ id, content, scores_one, scores_two, scores_three, file }) {
|
||||||
let params = {
|
let params = {
|
||||||
@@ -326,6 +346,70 @@ export default {
|
|||||||
code: code,
|
code: code,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 送洗列表-平台订单 实体店订单
|
||||||
|
sendLaundryOrderList({ type, page }) {
|
||||||
|
return vm.$u.post('member/sendLaundryOrderList', {
|
||||||
|
type: type,
|
||||||
|
page: page,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 送洗-获取衣服类型
|
||||||
|
getClothesTypeList() {
|
||||||
|
return vm.$u.post('member/getClothesTypeList');
|
||||||
|
},
|
||||||
|
// 送洗评价
|
||||||
|
sendOrderComment({ id, comment }) {
|
||||||
|
return vm.$u.post('member/sendOrderComment', {
|
||||||
|
id: id,
|
||||||
|
comment: comment,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 送洗确认完成
|
||||||
|
sendLaundryOrderConfirm({ id }) {
|
||||||
|
return vm.$u.post('member/sendOrderConfirm', {
|
||||||
|
id: id,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 提交送洗
|
||||||
|
sendLaundrySave({
|
||||||
|
type,
|
||||||
|
tid,
|
||||||
|
condition,
|
||||||
|
member_name,
|
||||||
|
member_phone,
|
||||||
|
area_info,
|
||||||
|
address_info,
|
||||||
|
goods_name,
|
||||||
|
order_id,
|
||||||
|
goods_id,
|
||||||
|
goods_images,
|
||||||
|
}) {
|
||||||
|
return vm.$u.post('member/sendLaundrySave', {
|
||||||
|
type: type,
|
||||||
|
tid: tid,
|
||||||
|
condition: condition,
|
||||||
|
member_name: member_name,
|
||||||
|
member_phone: member_phone,
|
||||||
|
area_info: area_info,
|
||||||
|
address_info: address_info,
|
||||||
|
goods_name: goods_name,
|
||||||
|
order_id: order_id,
|
||||||
|
goods_id: goods_id,
|
||||||
|
goods_images: goods_images,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 送洗评论列表
|
||||||
|
sendCommentList() {
|
||||||
|
return vm.$u.post('member/sendCommentList');
|
||||||
|
},
|
||||||
|
// 发现收藏列表
|
||||||
|
articleCollectList() {
|
||||||
|
return vm.$u.post('article/articleCollectList');
|
||||||
|
},
|
||||||
|
// 关注用户列表
|
||||||
|
attentionMemberList() {
|
||||||
|
return vm.$u.post('member/attentionMemberList');
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,8 +3,8 @@ const install = (Vue, vm) => {
|
|||||||
Vue.prototype.$u.http.setConfig({
|
Vue.prototype.$u.http.setConfig({
|
||||||
baseUrl: 'https://dmmall.sdbairui.com/api',
|
baseUrl: 'https://dmmall.sdbairui.com/api',
|
||||||
loadingText: '努力加载中~',
|
loadingText: '努力加载中~',
|
||||||
loadingTime: 800
|
loadingTime: 800,
|
||||||
|
// originalData: true
|
||||||
});
|
});
|
||||||
|
|
||||||
// 请求拦截,配置Token等参数
|
// 请求拦截,配置Token等参数
|
||||||
@@ -18,6 +18,28 @@ const install = (Vue, vm) => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 响应拦截,如配置,每次请求结束都会执行本方法
|
||||||
|
Vue.prototype.$u.http.interceptor.response = (res) => {
|
||||||
|
if(parseInt(res.errCode) == 0) {
|
||||||
|
// res为服务端返回值,可能有errCode,result等字段
|
||||||
|
// 这里对res.result进行返回,将会在this.$u.post(url).then(res => {})的then回调中的res的到
|
||||||
|
// 如果配置了originalData为true,请留意这里的返回值
|
||||||
|
return res;
|
||||||
|
} else if(res.errCode == 401) {
|
||||||
|
// 假设201为token失效,这里跳转登录
|
||||||
|
vm.$u.toast('验证失败,请重新登录');
|
||||||
|
setTimeout(() => {
|
||||||
|
// 此为uView的方法,详见路由相关文档
|
||||||
|
vm.$u.route('/pageA/login/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,9 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
|
import {
|
||||||
|
mapMutations
|
||||||
|
} from 'vuex';
|
||||||
|
|
||||||
Vue.use(Vuex)
|
Vue.use(Vuex)
|
||||||
|
|
||||||
const store = new Vuex.Store({
|
const store = new Vuex.Store({
|
||||||
@@ -12,10 +16,12 @@ const store = new Vuex.Store({
|
|||||||
pintuangroup_headid: '', // 拼团团长id 有为开团 无为参团
|
pintuangroup_headid: '', // 拼团团长id 有为开团 无为参团
|
||||||
groupbuyInfo: {}, // 秒杀详情
|
groupbuyInfo: {}, // 秒杀详情
|
||||||
loadmore: {}, // 下拉加载返回的数据
|
loadmore: {}, // 下拉加载返回的数据
|
||||||
|
hasLogin: false, // 登录状态
|
||||||
|
token: "" // 储存token
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
getOrderAddress(state) {
|
getOrderAddress(state) {
|
||||||
return state.orderAddress;
|
return state.orderAddress || {};
|
||||||
},
|
},
|
||||||
getGoodsType(state) {
|
getGoodsType(state) {
|
||||||
return state.goodsDetails.type;
|
return state.goodsDetails.type;
|
||||||
@@ -25,6 +31,26 @@ const store = new Vuex.Store({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
|
// 登录
|
||||||
|
loginIn(state, token) {
|
||||||
|
state.hasLogin = true;
|
||||||
|
state.token = token;
|
||||||
|
uni.setStorage({
|
||||||
|
key: "token",
|
||||||
|
data: token
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 退出登录
|
||||||
|
logout(state) {
|
||||||
|
state.hasLogin = false;
|
||||||
|
state.token = "";
|
||||||
|
uni.removeStorage({
|
||||||
|
key: "token"
|
||||||
|
})
|
||||||
|
uni.removeStorage({
|
||||||
|
key: "user_info"
|
||||||
|
})
|
||||||
|
},
|
||||||
setOrderType(state, type) {
|
setOrderType(state, type) {
|
||||||
state.orderType = type;
|
state.orderType = type;
|
||||||
},
|
},
|
||||||
@@ -48,7 +74,7 @@ const store = new Vuex.Store({
|
|||||||
},
|
},
|
||||||
setLoadMore(state, info) {
|
setLoadMore(state, info) {
|
||||||
state.loadmore = info;
|
state.loadmore = info;
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
export default store;
|
export default store;
|
||||||
115
components/comment/index.vue
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
<template>
|
||||||
|
<view class="comment-item">
|
||||||
|
<view class="user">
|
||||||
|
<u-avatar :src="content.member_avatar" class="avatar" size="60"></u-avatar>
|
||||||
|
<text class="name">{{ content.geval_frommembername }}</text>
|
||||||
|
<u-rate v-if="reply" :disabled='true' :count="count" v-model="rate" size="23" active-color="#FF780F" inactive-color="#F0EDF1" gutter="10"></u-rate>
|
||||||
|
</view>
|
||||||
|
<view class="content">
|
||||||
|
<view class="text">{{ content.geval_content }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="image-container">
|
||||||
|
<image :src="src" v-for="(src, index) in content.geval_image" :key="index"></image>
|
||||||
|
</view>
|
||||||
|
<view class="reply" v-if="reply && content.geval_explain">
|
||||||
|
<view class="title">掌柜回复:</view>
|
||||||
|
<view class="content u-line-4">{{ content.geval_explain }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="time" v-if="reply">
|
||||||
|
<image src="/static/image/common/20.png"></image>
|
||||||
|
<view class="value">{{ content.geval_addtime }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
/*
|
||||||
|
* @description 显示评价
|
||||||
|
* @property {Boolean} reply 是否显示回复/时间/评分
|
||||||
|
**/
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
count: 5,
|
||||||
|
rate: 0,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
content: Object,
|
||||||
|
reply: Boolean,
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
if(this.content.hasOwnProperty('scores_two')) this.rate = this.content.scores_two;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.comment-item {
|
||||||
|
background-color: #ffffff;
|
||||||
|
.user {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
.name {
|
||||||
|
margin: 0 20rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: rgba(153,153,153,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
.text {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
line-height: 40rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
> image {
|
||||||
|
width: 210rpx;
|
||||||
|
height: 210rpx;
|
||||||
|
border-radius: 10px;
|
||||||
|
&:not(:nth-child(3n)) {
|
||||||
|
margin-right: 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.image-container {
|
||||||
|
margin: 20rpx 0;
|
||||||
|
> image {
|
||||||
|
width: 210rpx;
|
||||||
|
height: 210rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
&:not(:nth-child(3n)) {
|
||||||
|
margin-right: 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.reply {
|
||||||
|
padding: 30rpx;
|
||||||
|
background: rgba(240,238,238,1);
|
||||||
|
border-radius: 10rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: rgba(102,102,102,1);
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
.title {
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
line-height: 36rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.time {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
> image {
|
||||||
|
width: 28rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
margin-right: 12rpx;
|
||||||
|
}
|
||||||
|
.value {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: rgba(153,153,153,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,24 +1,38 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="daren-item" @click="toDetailsPage">
|
<view class="daren-item">
|
||||||
<image class="head" :src="info.member_avatar"></image>
|
<image class="head" @click="toDetailsPage" :src="info.member_avatar"></image>
|
||||||
<text class="name">{{ info.member_nickname }}</text>
|
<text class="name">{{ info.member_nickname }}</text>
|
||||||
<text class="zhuangtai">状态: {{ info.live_status == 1 ? '正在直播' : '未开播' }}</text>
|
<text class="zhuangtai">状态: {{ info.live_status == 1 ? '正在直播' : '未开播' }}</text>
|
||||||
<view class="guanzhu" @tap="changeType(info.member_id)" v-if="info.is_attention == 1">关注</view>
|
<view class="guanzhu action" @tap="changeType(info.member_id)" v-if="info.is_attention == 1">已关注</view>
|
||||||
<view class="guanzhu action" @tap="changeType(info.member_id)" v-else >未关注</view>
|
<view class="guanzhu" @tap="changeType(info.member_id)" v-else >未关注</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { mapState } from 'vuex';
|
||||||
export default {
|
export default {
|
||||||
name:"daren-item",
|
name:"daren-item",
|
||||||
props: {
|
props: {
|
||||||
info: Object,
|
info: Object,
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(["login","hasLogin"]),
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
info(newVal, old) {
|
||||||
|
// console.log(newVal);
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toDetailsPage() {
|
toDetailsPage() {
|
||||||
// 判断是否登录
|
// console.log();
|
||||||
const toke = uni.getStorageSync('token');
|
if (this.hasLogin) {
|
||||||
if (toke) {
|
this.$u.route({
|
||||||
console.log(toke);
|
url: "/pageB/details/index",
|
||||||
|
params: {
|
||||||
|
id: this.info.member_id
|
||||||
|
}
|
||||||
|
});
|
||||||
}else{
|
}else{
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pageA/login/login'
|
url: '/pageA/login/login'
|
||||||
@@ -32,8 +46,8 @@ export default {
|
|||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
changeType:function(type){
|
changeType:function(type){
|
||||||
console.log("111")
|
// console.log("111")
|
||||||
this.$emit("pChangeType",type)
|
this.$emit("pChangeType",type);
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -80,6 +94,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.action{
|
.action{
|
||||||
background: #f3f3f3;
|
background: #f3f3f3;
|
||||||
|
color: #FF780F;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -37,12 +37,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.video-item{
|
.video-item{
|
||||||
margin-top: 20rpx;
|
flex-shrink: 0;
|
||||||
width: 335rpx;
|
width: 335rpx;
|
||||||
box-shadow:0 3rpx 7rpx 0 rgba(153, 153, 153, 0.35);
|
|
||||||
padding-bottom: 20rpx;
|
padding-bottom: 20rpx;
|
||||||
border-radius: 20rpx;
|
margin-top: 20rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
box-shadow:0 3rpx 7rpx 0 rgba(153, 153, 153, 0.35);
|
||||||
.head{
|
.head{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 334rpx;
|
height: 334rpx;
|
||||||
@@ -50,10 +51,10 @@
|
|||||||
.title{
|
.title{
|
||||||
margin:0 auto;
|
margin:0 auto;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
font-size: 22rpx;
|
font-size: 28rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 30rpx;
|
line-height: 48rpx;
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
text-overflow:ellipsis;
|
text-overflow:ellipsis;
|
||||||
@@ -105,14 +106,15 @@
|
|||||||
.action {
|
.action {
|
||||||
z-index: 19;
|
z-index: 19;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0rpx;
|
right: -10rpx;
|
||||||
bottom: 55rpx;
|
bottom: 60rpx;
|
||||||
// width: 234rpx;
|
// width: 234rpx;
|
||||||
|
border-radius: 6rpx;
|
||||||
background: rgba(255,255,255,1);
|
background: rgba(255,255,255,1);
|
||||||
box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(35,24,21,0.12);
|
box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(35,24,21,0.12);
|
||||||
border-radius: 6rpx;
|
|
||||||
.bubble {
|
.bubble {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
border-radius: 20rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
&::after {
|
&::after {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -128,9 +130,9 @@
|
|||||||
box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(35,24,21,0.12);
|
box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(35,24,21,0.12);
|
||||||
}
|
}
|
||||||
> view {
|
> view {
|
||||||
padding: 9rpx 12rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
border-bottom: 2rpx #ECECEC solid;
|
border-bottom: 2rpx #ECECEC solid;
|
||||||
}
|
}
|
||||||
@@ -141,17 +143,17 @@
|
|||||||
}
|
}
|
||||||
> image {
|
> image {
|
||||||
&:first-child {
|
&:first-child {
|
||||||
@include image-class($width: 21rpx, $height: 22rpx, $right: 12rpx);
|
@include image-class($width: 30rpx, $height: 30rpx, $right: 12rpx);
|
||||||
}
|
}
|
||||||
&:nth-child(2) {
|
&:nth-child(2) {
|
||||||
@include image-class($width: 22rpx, $height: 22rpx, $right: 12rpx);
|
@include image-class($width: 30rpx, $height: 30rpx, $right: 12rpx);
|
||||||
}
|
}
|
||||||
&:last-child {
|
&:last-child {
|
||||||
@include image-class($width: 24rpx, $height: 20rpx, $right: 9rpx);
|
@include image-class($width: 30rpx, $height: 30rpx, $right: 9rpx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
> text {
|
> text {
|
||||||
font-size: 20rpx;
|
font-size: 24rpx;
|
||||||
color: rgba(51,51,51,1);
|
color: rgba(51,51,51,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -194,27 +196,40 @@ export default {
|
|||||||
// console.log(this.item);
|
// console.log(this.item);
|
||||||
this.show = -1;
|
this.show = -1;
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
item(newVal, old) {
|
||||||
|
// console.log(newVal);
|
||||||
|
this.item = newVal;
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showAction() {
|
showAction() {
|
||||||
this.show = this.show > 0 ? -1 : this.item.article_id;
|
this.show = this.show > 0 ? -1 : this.item.article_id;
|
||||||
},
|
},
|
||||||
|
// 点赞
|
||||||
articleLike() {
|
articleLike() {
|
||||||
|
this.item.is_like = !this.item.is_like;
|
||||||
this.$u.api.articleLike({
|
this.$u.api.articleLike({
|
||||||
article_id: this.item.article_id,
|
article_id: this.item.article_id,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.$emit("getArticlelist");
|
this.$u.toast(res.message);
|
||||||
|
// this.$emit("getArticlelist");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 收藏
|
||||||
articleCollect() {
|
articleCollect() {
|
||||||
|
this.item.is_collect = !this.item.is_collect;
|
||||||
this.$u.api.articleCollect({
|
this.$u.api.articleCollect({
|
||||||
article_id: this.item.article_id,
|
article_id: this.item.article_id,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
console.log(res);
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.$emit("getArticlelist");
|
this.$u.toast(res.message);
|
||||||
|
// this.$emit("getArticlelist");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -225,6 +240,7 @@ export default {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
|
this.$u.toast(res.message);
|
||||||
this.$emit("getArticlelist");
|
this.$emit("getArticlelist");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -233,7 +249,6 @@ export default {
|
|||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pageB/photo/index?id=' + id
|
url: '/pageB/photo/index?id=' + id
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="zhibo">
|
<view class="zhibo" @click="zhibo">
|
||||||
<image class="head"></image>
|
<image class="head" :src="image"></image>
|
||||||
<view class="user">
|
<view class="user">
|
||||||
<view class="name">
|
<view class="name">
|
||||||
<image></image>
|
<image></image>
|
||||||
<text>这是名字</text>
|
<text class="u-line-1" style="width:130rpx">{{name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="pingbi">
|
<view class="pingbi">
|
||||||
<image></image>
|
<image></image>
|
||||||
<text>屏蔽用户</text>
|
<text>1屏蔽用户</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -70,6 +70,19 @@ export default {
|
|||||||
return {
|
return {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
zhibo(){
|
||||||
|
this.$u.route({
|
||||||
|
url:"/pages/zhibo/index",
|
||||||
|
params:{
|
||||||
|
url:this.url,
|
||||||
|
id:this.zid,
|
||||||
|
rid:this.rid
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props:['name','image','url','zid','rid']
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="notice">
|
<view class="notice">
|
||||||
<view v-for="(item,index) in notice">
|
<view v-for="(item,index) in notice" :key="index">
|
||||||
<view class="time_notice">2020-05-14 20:11</view>
|
<view class="time_notice">2020-05-14 20:11</view>
|
||||||
<view class="notice_view">
|
<view class="notice_view">
|
||||||
<image :src="item.url" mode="aspectFill" ></image>
|
<image :src="item.url" mode="aspectFill" ></image>
|
||||||
<view class="text_view">{{item.content}}</view>
|
<view class="text_view">{{item.content}}</view>
|
||||||
<view class="notice_list">
|
<view class="notice_list">
|
||||||
<text>查看详情</text>
|
<text>查看详情</text>
|
||||||
<view> > </view>
|
<u-icon name="arrow-right" color="#666"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -15,7 +15,6 @@
|
|||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.notice {
|
.notice {
|
||||||
background: #ECECEC;
|
|
||||||
.notice_view{
|
.notice_view{
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
height: 489rpx;
|
height: 489rpx;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view id="info_title">
|
<view id="info_title">
|
||||||
<view>
|
<view>
|
||||||
<view class="url_info" v-for="(item,index) in list" :key="index" @click="route_skip(index)">
|
<view class="url_info" v-for="(item,index) in information" :key="index" @click="route_skip(index)">
|
||||||
<image :src="item.url"></image>
|
<image :src="item.url"></image>
|
||||||
<text>{{item.text}}</text>
|
<text>{{item.text}}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -56,33 +56,15 @@
|
|||||||
props:['information'],
|
props:['information'],
|
||||||
name: "info_title",
|
name: "info_title",
|
||||||
data() {
|
data() {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
list: [{
|
|
||||||
id: 0,
|
|
||||||
url: '../../static/pageD/info(11).png',
|
|
||||||
text: '公告/资讯'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 0,
|
|
||||||
url: '../../static/pageD/info(6).png',
|
|
||||||
text: '活动消息'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 0,
|
|
||||||
url: '../../static/pageD/info(14).png',
|
|
||||||
text: '交易物流'
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 0,
|
|
||||||
url: '../../static/pageD/info(15).png',
|
|
||||||
text: '关注消息'
|
|
||||||
},
|
|
||||||
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
information(newVal, old) {
|
||||||
|
console.log(newVal);
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 点击顶部的标题模块跳转
|
// 点击顶部的标题模块跳转
|
||||||
route_skip(index) {
|
route_skip(index) {
|
||||||
|
|||||||
@@ -42,17 +42,6 @@ export default {
|
|||||||
// this.loadStatus = "nomore";
|
// this.loadStatus = "nomore";
|
||||||
// this.tpage--;
|
// this.tpage--;
|
||||||
// })
|
// })
|
||||||
// this.$parent.callback({ page: this.tpage }).then(length => {
|
|
||||||
// if(length == 0) {
|
|
||||||
// this.tpage--;
|
|
||||||
// this.status = 'nomore';
|
|
||||||
// } else {
|
|
||||||
// this.status = 'loading';
|
|
||||||
// }
|
|
||||||
// }).catch(() => {
|
|
||||||
// this.loadStatus = "nomore";
|
|
||||||
// this.tpage--;
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -68,7 +68,8 @@
|
|||||||
this.$refs.uCode.start();
|
this.$refs.uCode.start();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
} else {
|
} else {
|
||||||
this.$u.toast('倒计时结束后再发送');
|
// this.$u.toast('倒计时结束后再发送');
|
||||||
|
console.log("倒计时结束后再发送");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
<view>
|
<view>
|
||||||
<input type="text" placeholder="手机号" maxlength="11" v-model="phone" />
|
<input type="text" placeholder="手机号" maxlength="11" v-model="phone" />
|
||||||
</view>
|
</view>
|
||||||
<view class="area" @click="show=true">
|
<view class="area">
|
||||||
<input type="text" placeholder="省市区" v-model="address" disabled />
|
<input type="text" placeholder="省市区" v-model="address" disabled @click="show=true" />
|
||||||
<view>
|
<!-- <view @click="chooseArea">
|
||||||
<image src="/static/image/mine/24.png"></image>
|
<image src="/static/image/mine/24.png"></image>
|
||||||
<text>定位</text>
|
<text>定位</text>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<input type="text" placeholder="详细地址" v-model="area" />
|
<input type="text" placeholder="详细地址" v-model="area" />
|
||||||
@@ -49,6 +49,7 @@ export default {
|
|||||||
area: '', // 详细地址
|
area: '', // 详细地址
|
||||||
area_id: '', // 地区id 省
|
area_id: '', // 地区id 省
|
||||||
city_id: '', // 城市id
|
city_id: '', // 城市id
|
||||||
|
debounce: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@@ -78,8 +79,20 @@ export default {
|
|||||||
},
|
},
|
||||||
// 判断是不是编辑页面 调用接口
|
// 判断是不是编辑页面 调用接口
|
||||||
confirmBtn() {
|
confirmBtn() {
|
||||||
|
if(!this.debounce) return;
|
||||||
|
this.debounce = false;
|
||||||
this.info ? this.editAddress() : this.addAddress();
|
this.info ? this.editAddress() : this.addAddress();
|
||||||
},
|
},
|
||||||
|
// chooseArea() {
|
||||||
|
// uni.chooseLocation({
|
||||||
|
// success: function (res) {
|
||||||
|
// console.log('位置名称:' + res.name);
|
||||||
|
// console.log('详细地址:' + res.address);
|
||||||
|
// console.log('纬度:' + res.latitude);
|
||||||
|
// console.log('经度:' + res.longitude);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// },
|
||||||
// 验证
|
// 验证
|
||||||
validateValue() {
|
validateValue() {
|
||||||
if(this.$u.test.isEmpty(this.name)) {
|
if(this.$u.test.isEmpty(this.name)) {
|
||||||
@@ -118,20 +131,13 @@ export default {
|
|||||||
// latitude,
|
// latitude,
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
uni.redirectTo({
|
this.$refs.uToast.show({
|
||||||
url: '/pageE/more/Address'
|
title: res.message,
|
||||||
});
|
type: 'success',
|
||||||
// this.$refs.uToast.show({
|
back: true,
|
||||||
// title: res.message,
|
})
|
||||||
// type: 'success',
|
|
||||||
// // url: '/pageE/more/Address',
|
|
||||||
// callback() {
|
|
||||||
// uni.redirectTo({
|
|
||||||
// url: '/pageE/more/Address'
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
} else {
|
} else {
|
||||||
|
this.debounce = true;
|
||||||
this.showToast(res.message, 'warning');
|
this.showToast(res.message, 'warning');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -151,20 +157,13 @@ export default {
|
|||||||
// latitude,
|
// latitude,
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
uni.redirectTo({
|
this.$refs.uToast.show({
|
||||||
url: '/pageE/more/Address'
|
title: res.message,
|
||||||
});
|
type: 'success',
|
||||||
// this.$refs.uToast.show({
|
back: true,
|
||||||
// title: res.message,
|
})
|
||||||
// type: 'success',
|
|
||||||
// // url: '/pageE/more/Address',
|
|
||||||
// callback() {
|
|
||||||
// uni.redirectTo({
|
|
||||||
// url: '/pageE/more/Address'
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
} else {
|
} else {
|
||||||
|
this.debounce = true;
|
||||||
this.showToast(res.message, 'warning');
|
this.showToast(res.message, 'warning');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -3,22 +3,22 @@
|
|||||||
<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" margin-top="300"></u-empty>
|
<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" margin-top="300"></u-empty>
|
||||||
<u-swipe-action
|
<u-swipe-action
|
||||||
v-for="(item, index) in list" :key="index"
|
v-for="(item, index) in list" :key="index"
|
||||||
:index='index'
|
:index='item.fav_id'
|
||||||
:show="item.show"
|
:show="item.show"
|
||||||
:options="options"
|
:options="options"
|
||||||
@click="removeFavorite"
|
@click="removeFavorite"
|
||||||
@open="open"
|
@open="open"
|
||||||
>
|
>
|
||||||
<view class="item u-border-bottom">
|
<view class="item u-border-bottom">
|
||||||
<image src="@/pageE/static/mine/23.png"></image>
|
<image :src="item.goods_image"></image>
|
||||||
<!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 -->
|
<!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 -->
|
||||||
<view class="title-wrap">
|
<view class="title-wrap">
|
||||||
<view class="item-top u-line-2">木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子</view>
|
<view class="item-top u-line-2">{{ item.goods_name }}</view>
|
||||||
<view class="item-bottom">
|
<view class="item-bottom">
|
||||||
<view class="item-price">¥99</view>
|
<view class="item-price">¥{{ item.favlog_price }}</view>
|
||||||
<view class="item-date">
|
<view class="item-date">
|
||||||
<image src="@/pageE/static/mine/26.png"></image>
|
<image src="@/pageE/static/mine/26.png"></image>
|
||||||
<view>2020-05-17</view>
|
<view>{{ item.fav_time }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -30,20 +30,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [
|
list: [],
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
show: false,
|
|
||||||
}
|
|
||||||
],
|
|
||||||
show: false,
|
show: false,
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
@@ -61,17 +48,18 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getGoodsFavoritesList() {
|
getGoodsFavoritesList() {
|
||||||
this.$u.api.getFavoritesList().then(res => {
|
this.$u.api.getFavoritesList().then(res => {
|
||||||
if(res.errCode == 0) {}
|
if(res.errCode == 0) {
|
||||||
|
this.list = res.data;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
removeFavorite(id) {
|
removeFavorite(id) {
|
||||||
this.$u.api.removeFavorite({
|
this.$u.api.removeFavorite({
|
||||||
id: id
|
id: id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
this.$u.toast(res.message);
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.getGoodsFavoritesList();
|
this.getGoodsFavoritesList();
|
||||||
} else {
|
|
||||||
this.$u.toast(res.message);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="comment">
|
<view class="comment">
|
||||||
<view class="user-info">
|
<view class="user-info">
|
||||||
<image src="@/pageE/static/mine/23.png" class="user-avatar"></image>
|
<image :src="info.member_avatar" class="user-avatar"></image>
|
||||||
<view class="user-name">***雪</view>
|
<view class="user-name">{{ info.member_nickname }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="user-comment">
|
<view class="user-comment">
|
||||||
<view class="text u-line-2">宝贝收到了和卖家描述的一样,质量不错,很漂亮一直想买这样的杯子,这个蓝色的稍微有点小瑕疵,不过自己用没问题没问题没问题</view>
|
<view class="text u-line-2">{{ info.comment }}</view>
|
||||||
<view class="image">
|
<view class="image">
|
||||||
<image v-for="(src, index) in ImageList" :key="index" :src="src" mode="aspectFit"></image>
|
<image v-for="(src, index) in info.images" :key="index" :src="src" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -15,14 +15,10 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {}
|
||||||
ImageList: [
|
},
|
||||||
require('@/pageE/static/mine/23.png'),
|
props: {
|
||||||
require('@/pageE/static/mine/23.png'),
|
info: Object,
|
||||||
require('@/pageE/static/mine/23.png'),
|
|
||||||
require('@/pageE/static/mine/23.png')
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -12,32 +12,37 @@
|
|||||||
<image :src="goods.goods_image"></image>
|
<image :src="goods.goods_image"></image>
|
||||||
<view class="goods-text">
|
<view class="goods-text">
|
||||||
<view class="goods-name u-line-2">{{ goods.goods_name }}</view>
|
<view class="goods-name u-line-2">{{ goods.goods_name }}</view>
|
||||||
<view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40">XL;红色条纹XL;红色条纹XL;红色条纹</view>
|
<view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec">
|
||||||
<view class="goods-time u-line-1" v-if="order.order_state == 10 || order.order_state == 10">距离结束:23:23:38</view>
|
<text v-for="(spec, index) in goods.goods_spec" :key="index">{{ spec + ';' }}</text>
|
||||||
<view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价:¥99.00,实付款¥99</view>
|
</view>
|
||||||
|
<view class="goods-time u-line-1" v-if="order.view_type == 1">结束时间:{{ order.end_time | date('yyyy-mm-dd hh:MM') }}</view>
|
||||||
|
<view class="goods-price u-line-1" v-if="order.order_state == 20 || order.order_state == 40">总价:¥{{ goods.goods_price }},实付款¥{{ goods.goods_pay_price }}</view>
|
||||||
<view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40">
|
<view class="goods-date" v-if="order.order_state == 20 || order.order_state == 40">
|
||||||
<image src="@/pageE/static/mine/26.png"></image>
|
<image src="@/pageE/static/mine/26.png"></image>
|
||||||
<view>{{ order.add_time | date }}</view>
|
<view>{{ order.add_time | date('yyyy-mm-dd hh:MM') }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-btn" v-if="[10, 30, 20, 40].indexOf(order.order_state) >= 0">
|
<view class="order-btn" v-if="[1, 2, 3, 4, 8].indexOf(order.view_type) >= 0">
|
||||||
<view class="logistics" v-if="order.order_state == 30">确认收货</view>
|
<!-- @click="toOtherPage('RefundOrder')" -->
|
||||||
<view class="logistics" v-if="order.order_state == 30" @click="toOtherPage('Logistics')">查看物流</view>
|
<view class="cancel" v-if="order.view_type == 3 || order.view_type == 2">申请退款</view>
|
||||||
<view class="comment" v-if="order.order_state == 40 && order.evaluation_state == 0" @click="toOtherPage('Comment')">立即评价</view>
|
<view class="cancel" v-if="order.view_type == 3" @click="toOtherPage('Logistics')">查看物流</view>
|
||||||
<view class="calcel" v-if="order.order_state == 10" @click="cancelOrder">取消支付</view>
|
<view class="logistics" v-if="order.view_type == 3" @click="confirmReceive">确认收货</view>
|
||||||
<view class="payment" v-if="order.order_state == 10">立即支付</view>
|
<view class="comment" v-if="order.view_type == 4" @click="toOtherPage('Comment')">立即评价</view>
|
||||||
<view class="service" v-if="order.order_state == 20">联系官方客服</view>
|
<view class="cancel" v-if="order.view_type == 1" @click="cancelOrder">取消支付</view>
|
||||||
<view class="submit" v-if="order.order_state == 20">提交官方审核</view>
|
<view class="payment" v-if="order.view_type == 1" @click="payNow(order.pay_sn, order.order_amount,order.order_id)">立即支付</view>
|
||||||
|
<view class="service" v-if="order.view_type == 8">联系官方客服</view>
|
||||||
|
<view class="submit" v-if="order.view_type == 8">提交官方审核</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import common from '@/static/js/common.js';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
state: '', // 1: 待收货 2: 待评价 3: 交易成功 4: 已取消 5: 已退款 6: 待支付, 7: 售后
|
state: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@@ -49,33 +54,34 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
viewState() {
|
viewState() {
|
||||||
let state;
|
let state;
|
||||||
switch (this.order.order_state) {
|
switch (this.order.view_type) {
|
||||||
case 0: // 已取消
|
case 1:
|
||||||
state = '已取消';
|
|
||||||
break;
|
|
||||||
case 10: // 未付款
|
|
||||||
state = '待支付';
|
state = '待支付';
|
||||||
break;
|
break;
|
||||||
case 20: // 已付款
|
case 2:
|
||||||
state = '交易成功';
|
state = '待发货';
|
||||||
break;
|
break;
|
||||||
case 30: // 已发货
|
case 3:
|
||||||
state = '待收货';
|
state = '待收货';
|
||||||
break;
|
break;
|
||||||
case 40: // 已收货
|
case 4:
|
||||||
if(this.order.evaluation_state == 0) state = '待评价';
|
state = '待评价';
|
||||||
else state = '交易成功'
|
break;
|
||||||
|
case 5:
|
||||||
|
state = '交易成功';
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
state = '待退款';
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
state = '已退款';
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
state = '拼团中';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(this.order.refund_state) state = '已退款';
|
|
||||||
// 申请退款
|
|
||||||
if(this.order.refund_data) {
|
|
||||||
if([1, 2].indexOf(this.order.refund_data.refund_state) >= 0) state = '待退款';
|
|
||||||
if(this.order.refund_data.refund_state == 3) state = '已退款';
|
|
||||||
}
|
|
||||||
|
|
||||||
this.state = state;
|
this.state = state;
|
||||||
},
|
},
|
||||||
cancelOrder() {
|
cancelOrder() {
|
||||||
@@ -83,8 +89,19 @@ export default {
|
|||||||
order_id: this.order.order_id,
|
order_id: this.order.order_id,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.$emit("refreshOrderList", { reload: 'again' });
|
this.$emit("refreshOrderList");
|
||||||
}
|
}
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
confirmReceive() {
|
||||||
|
this.$u.api.confirmReceive({
|
||||||
|
order_id: this.order.order_id,
|
||||||
|
}).then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.$emit("refreshOrderList");
|
||||||
|
}
|
||||||
|
this.$u.toast(res.message);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toOtherPage(url) {
|
toOtherPage(url) {
|
||||||
@@ -92,6 +109,13 @@ export default {
|
|||||||
oid: this.order.order_id,
|
oid: this.order.order_id,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
payNow(pay_sn, order_amount, id) {
|
||||||
|
this.$u.route('/pageC/cart/cashier', {
|
||||||
|
pay_sn: pay_sn,
|
||||||
|
price: order_amount,
|
||||||
|
order_id: id
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -114,6 +138,7 @@ export default {
|
|||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
margin-right: 15rpx;
|
margin-right: 15rpx;
|
||||||
|
background-color: aquamarine;
|
||||||
}
|
}
|
||||||
.store-name {
|
.store-name {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
@@ -146,6 +171,7 @@ export default {
|
|||||||
line-height: 38rpx;
|
line-height: 38rpx;
|
||||||
}
|
}
|
||||||
.goods-sku {
|
.goods-sku {
|
||||||
|
display: inline-block;
|
||||||
max-width: 230rpx;
|
max-width: 230rpx;
|
||||||
background: rgba(236,236,236,1);
|
background: rgba(236,236,236,1);
|
||||||
border-radius: 6rpx;
|
border-radius: 6rpx;
|
||||||
@@ -193,7 +219,7 @@ export default {
|
|||||||
.logistics, .comment, .payment {
|
.logistics, .comment, .payment {
|
||||||
@include btn-class($width: 160rpx, $color: rgba(255,119,15,1));
|
@include btn-class($width: 160rpx, $color: rgba(255,119,15,1));
|
||||||
}
|
}
|
||||||
.calcel {
|
.cancel {
|
||||||
@include btn-class($width: 160rpx, $color: rgba(155,153,153,1));
|
@include btn-class($width: 160rpx, $color: rgba(155,153,153,1));
|
||||||
}
|
}
|
||||||
.service {
|
.service {
|
||||||
|
|||||||
192
components/mine/order-item/try.vue
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
<template>
|
||||||
|
<view class="order-item">
|
||||||
|
<view class="order-title">
|
||||||
|
<view class="store-info">
|
||||||
|
<image :src="order.store_avatar"></image>
|
||||||
|
<view class="store-name">{{ order.store_name }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="order-status">{{ state }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="goods-info">
|
||||||
|
<view class="goods-item">
|
||||||
|
<image :src="order.goods_image"></image>
|
||||||
|
<view class="goods-text">
|
||||||
|
<view class="goods-name u-line-2">{{ order.goods_name }}</view>
|
||||||
|
<!-- <view class="goods-sku u-line-1" v-if="order.order_state !== 20 && order.order_state !== 40 && goods.goods_spec">
|
||||||
|
<text v-for="(spec, index) in goods.goods_spec" :key="index">{{ spec + ';' }}</text>
|
||||||
|
</view> -->
|
||||||
|
<!-- <view class="goods-time u-line-1" v-if="order.order_state == 10 || order.order_state == 10">结束时间:{{ order.add_time * 1000 | date('yyyy-mm-dd hh:MM') }}</view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="order-btn" v-if="order.goods_try_order_status == 20">
|
||||||
|
<view class="logistics" @click="confirmOrder">确认完成</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import common from '@/static/js/common.js';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
state: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
order: Object
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.viewState();
|
||||||
|
},
|
||||||
|
filters: {},
|
||||||
|
methods: {
|
||||||
|
// "goods_try_order_status": 0, 试穿订单状态 0:待处理订单 20:同意 40:拒绝此订单 50:完成
|
||||||
|
viewState() {
|
||||||
|
let state;
|
||||||
|
switch (this.order.goods_try_order_status) {
|
||||||
|
case 0:
|
||||||
|
state = '等待商家回复';
|
||||||
|
break;
|
||||||
|
case 20:
|
||||||
|
state = '商家已接单';
|
||||||
|
break;
|
||||||
|
case 40:
|
||||||
|
state = '商家已拒绝';
|
||||||
|
break;
|
||||||
|
case 50:
|
||||||
|
state = '订单已结束';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
this.state = state;
|
||||||
|
},
|
||||||
|
confirmOrder() {
|
||||||
|
this.$u.api.goodsTryConfirm({
|
||||||
|
id: this.order.goods_try_id,
|
||||||
|
}).then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.$emit("refreshOrderList");
|
||||||
|
}
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toOtherPage(url) {
|
||||||
|
this.$u.route('/pageE/order/' + url, {
|
||||||
|
oid: this.order.order_id,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.order-item {
|
||||||
|
width: 690rpx;
|
||||||
|
background: rgba(255,255,255,1);
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
.order-title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
.store-info {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
> image {
|
||||||
|
width: 50rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-right: 15rpx;
|
||||||
|
background-color: aquamarine;
|
||||||
|
}
|
||||||
|
.store-name {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.order-status {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(255,120,15,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goods-info {
|
||||||
|
.goods-item {
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 28rpx;
|
||||||
|
> image {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 180rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
margin-right: 30rpx;
|
||||||
|
}
|
||||||
|
.goods-text {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
.goods-name {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
line-height: 38rpx;
|
||||||
|
}
|
||||||
|
.goods-sku {
|
||||||
|
max-width: 230rpx;
|
||||||
|
background: rgba(236,236,236,1);
|
||||||
|
border-radius: 6rpx;
|
||||||
|
padding: 10rpx 15rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: rgba(153,153,153,1);
|
||||||
|
}
|
||||||
|
.goods-time {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: rgba(255,49,49,1);
|
||||||
|
}
|
||||||
|
.goods-price {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: rgba(253,211,96,1);
|
||||||
|
}
|
||||||
|
.goods-date {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: rgba(153,153,153,1);
|
||||||
|
> image {
|
||||||
|
width: 24rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
margin-right: 21rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.order-btn {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
@mixin btn-class($width, $color) {
|
||||||
|
width: $width;
|
||||||
|
height: 60rpx;
|
||||||
|
border: 2rpx solid $color;
|
||||||
|
color: $color;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
padding: 15rpx 23rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
&:not(:last-child) {
|
||||||
|
margin-right: 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.logistics, .comment, .payment {
|
||||||
|
@include btn-class($width: 160rpx, $color: rgba(255,119,15,1));
|
||||||
|
}
|
||||||
|
.calcel {
|
||||||
|
@include btn-class($width: 160rpx, $color: rgba(155,153,153,1));
|
||||||
|
}
|
||||||
|
.service {
|
||||||
|
@include btn-class($width: 216rpx, $color: rgba(155,153,153,1));
|
||||||
|
}
|
||||||
|
.submit {
|
||||||
|
@include btn-class($width: 216rpx, $color: rgba(255,119,15,1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<view v-if="type" id="video_mp4">
|
<view v-if="type" id="video_mp4">
|
||||||
<view class="page-body">
|
<view class="page-body">
|
||||||
<view class="page-section">
|
<view class="page-section">
|
||||||
<video id="myVideo" :src=" 'https://' + vide0_url" :controls="controls" :autoplay="autoplayes" :loop="loop" @error="videoErrorCallback"
|
<video id="myVideo" enable-progress-gesture="false" :src=" 'https://' + vide0_url" autoplay controls="false" @error="videoErrorCallback" @timeupdate="timeupdate"
|
||||||
enable-danmu danmu-btn></video>
|
enable-danmu danmu-btn></video>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -17,11 +17,12 @@
|
|||||||
<view class="uni-padding-wrap">
|
<view class="uni-padding-wrap">
|
||||||
<view class="page-section swiper">
|
<view class="page-section swiper">
|
||||||
<view class="page-section-spacing">
|
<view class="page-section-spacing">
|
||||||
<swiper class="swiper" :indicator-dots="true" :style="{height:heightOut+'px'}" :autoplay="false" :interval="3000" :duration="1000">
|
<swiper class="swiper" :indicator-dots="true" :style="{height:heightOut+'px'}" :autoplay="false" :interval="3000" :duration="1000" @animationfinish="">
|
||||||
<swiper-item v-for="item in list" >
|
<swiper-item v-for="(item,index) in list" :key="index">
|
||||||
<view class="swiper-item uni-bg-red">
|
<view class="swiper-item uni-bg-red">
|
||||||
<image :src=" 'https://' + item.launch_path"></image>
|
<image :src=" 'https://' + item.launch_path"></image>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="btn-init" v-if="parseInt(index) == 2" @click="goNext">立即体验</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
@@ -48,13 +49,12 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
remaining: 4,
|
remaining: 7,
|
||||||
type: true,
|
type: true,
|
||||||
banner: false,
|
banner: false,
|
||||||
protocol: false,
|
protocol: false,
|
||||||
heightOut: '',
|
heightOut: '',
|
||||||
imgurl: [],
|
imgurl: [],
|
||||||
loop: 'true',
|
|
||||||
vide0_url: '',
|
vide0_url: '',
|
||||||
agreement: { // 用户协议内容
|
agreement: { // 用户协议内容
|
||||||
document_title: "",
|
document_title: "",
|
||||||
@@ -67,28 +67,16 @@
|
|||||||
src: '',
|
src: '',
|
||||||
inputValue: '',
|
inputValue: '',
|
||||||
controls: false,
|
controls: false,
|
||||||
autoplayes: true,
|
|
||||||
list: [],
|
list: [],
|
||||||
danmuList: [{
|
|
||||||
text: '第 1s 出现的弹幕',
|
|
||||||
color: '#ff0000',
|
|
||||||
time: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: '第 3s 出现的弹幕',
|
|
||||||
color: '#ff00ff',
|
|
||||||
time: 3
|
|
||||||
}
|
|
||||||
],
|
|
||||||
background: ['color1', 'color2', 'color3'],
|
background: ['color1', 'color2', 'color3'],
|
||||||
indicatorDots: true,
|
indicatorDots: true,
|
||||||
autoplay: true,
|
|
||||||
interval: 2000,
|
interval: 2000,
|
||||||
duration: 500
|
duration: 500,
|
||||||
|
swiper_index: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onReady: function(res) {
|
onReady: function(res) {
|
||||||
this.videoContext = uni.createVideoContext('myVideo')
|
this.videoContext = uni.createVideoContext('myVideo');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
apiwelcome() {
|
apiwelcome() {
|
||||||
@@ -110,7 +98,6 @@
|
|||||||
let vide0_url = res.data.start_page[0].launch_path
|
let vide0_url = res.data.start_page[0].launch_path
|
||||||
this.list = data_image;
|
this.list = data_image;
|
||||||
this.vide0_url = vide0_url;
|
this.vide0_url = vide0_url;
|
||||||
console.log(this.list)
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 3秒倒计时
|
// 3秒倒计时
|
||||||
@@ -120,7 +107,7 @@
|
|||||||
if (this.remaining <= 0) {
|
if (this.remaining <= 0) {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
console.log("完了")
|
console.log("完了")
|
||||||
this.type = !this.type
|
this.type = !this.type;
|
||||||
this.banner = !this.banner;
|
this.banner = !this.banner;
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
@@ -142,19 +129,32 @@
|
|||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
that.heightOut = res.windowHeight;
|
that.heightOut = res.windowHeight;
|
||||||
console.log('666666666666666' + that.heightOut)
|
console.log(that.heightOut)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 立即体验
|
||||||
|
goNext() {
|
||||||
|
this.protocol = true;
|
||||||
|
this.banner = false;
|
||||||
|
},
|
||||||
// 我同意
|
// 我同意
|
||||||
to_agree() {
|
to_agree() {
|
||||||
|
uni.setStorage({
|
||||||
|
key: 'launchFlag',
|
||||||
|
data: true,
|
||||||
|
success: function() {
|
||||||
|
console.log('点击存储launchFlag');
|
||||||
|
}
|
||||||
|
});
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pageA/login/login'
|
url: '/pageA/login/login'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 视频引入
|
// 视频引入
|
||||||
bindInputBlur: function(e) {
|
bindInputBlur: function(e) {
|
||||||
this.inputValue = e.target.value
|
this.inputValue = e.target.value;
|
||||||
|
console.log(e.target.value);
|
||||||
},
|
},
|
||||||
bindButtonTap: function() {
|
bindButtonTap: function() {
|
||||||
var that = this
|
var that = this
|
||||||
@@ -174,8 +174,10 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
videoErrorCallback: function(e) {
|
videoErrorCallback: function(e) {
|
||||||
console.log('视频错误信息:')
|
console.log('视频错误信息:',e);
|
||||||
console.log(e.target.errMsg)
|
},
|
||||||
|
timeupdate(e) {
|
||||||
|
console.log(e);
|
||||||
},
|
},
|
||||||
getRandomColor: function() {
|
getRandomColor: function() {
|
||||||
const rgb = []
|
const rgb = []
|
||||||
@@ -185,34 +187,12 @@
|
|||||||
rgb.push(color)
|
rgb.push(color)
|
||||||
}
|
}
|
||||||
return '#' + rgb.join('')
|
return '#' + rgb.join('')
|
||||||
},
|
|
||||||
changeIndicatorDots(e) {
|
|
||||||
this.indicatorDots = !this.indicatorDots
|
|
||||||
},
|
|
||||||
changeAutoplay(e) {
|
|
||||||
this.autoplay = !this.autoplay
|
|
||||||
},
|
|
||||||
intervalChange(e) {
|
|
||||||
this.interval = e.target.value
|
|
||||||
},
|
|
||||||
durationChange(e) {
|
|
||||||
this.duration = e.target.value
|
|
||||||
},
|
|
||||||
refreshToken_function(){
|
|
||||||
this.$u.api.refreshToken({}).then((res) => {
|
|
||||||
console.log(res)
|
|
||||||
if (res.errCode == 0) {
|
|
||||||
let token = res.data.token;
|
|
||||||
uni.setStorageSync('token', token);//存储toke值
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.refreshToken_function()
|
|
||||||
// 3秒倒计时调用
|
// 3秒倒计时调用
|
||||||
this.remaining_time()
|
this.remaining_time();
|
||||||
this.apiwelcome()
|
this.apiwelcome();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -221,34 +201,41 @@
|
|||||||
.uni-padding-wrap{
|
.uni-padding-wrap{
|
||||||
// height: 400rpx;
|
// height: 400rpx;
|
||||||
}
|
}
|
||||||
.welcome_jumpes {
|
.btn-init {
|
||||||
width: 94rpx;
|
z-index: 1000;
|
||||||
height: 36rpx;
|
|
||||||
opacity: 0.5;
|
|
||||||
border-radius: 18rpx;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 37rpx;
|
bottom: 100rpx;
|
||||||
top: 66rpx;
|
right: 30%;
|
||||||
|
width: 300rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
background-color: #007AFF;
|
||||||
|
}
|
||||||
|
.welcome_jumpes {
|
||||||
|
z-index: 100;
|
||||||
|
position: absolute;
|
||||||
|
top: 80rpx;
|
||||||
|
right: 60rpx;
|
||||||
|
width: 100rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 35rpx;
|
line-height: 40rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #C4CAC6;
|
background-color: rgba(0,0,0,0.5);
|
||||||
z-index: 10;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#myVideo {
|
#myVideo {
|
||||||
position: absolute;
|
width: 100%;
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
top: 0;
|
|
||||||
margin: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uni-video {
|
uni-video {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-video-container {
|
.uni-video-container {
|
||||||
@@ -257,8 +244,8 @@
|
|||||||
|
|
||||||
.welcome_images {
|
.welcome_images {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
height: 100%
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uni-swiper,
|
uni-swiper,
|
||||||
@@ -266,7 +253,7 @@
|
|||||||
uni-image {
|
uni-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// position: fixed;
|
// position: fixed;
|
||||||
height: 100%
|
height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
uni-image {
|
uni-image {
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
<view class="label">
|
<view class="label">
|
||||||
<u-tabs-swiper ref="group" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="88"></u-tabs-swiper>
|
<u-tabs-swiper ref="group" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="88"></u-tabs-swiper>
|
||||||
</view>
|
</view>
|
||||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish" style="height: 130px">
|
<swiper :current="swiperCurrent" @animationfinish="animationfinish" style="height: 260rpx">
|
||||||
<swiper-item class="swiper-item list" v-for="(_, i) in classifyList" :key="i">
|
<swiper-item class="swiper-item list" v-for="(_, i) in classifyList" :key="i">
|
||||||
<!-- 最多显示3个 -->
|
<!-- 最多显示3个 -->
|
||||||
<sitem :info="info" v-for="(info, index) in groupList.slice(0, 3)" :key="index"></sitem>
|
<sitem :info="info" v-for="(info, index) in groupList.slice(0, 3)" :key="index"></sitem>
|
||||||
<u-empty text="暂无拼团商品" mode="list" color="#000" v-if="!groupList.length"></u-empty>
|
<u-empty text="暂无拼团商品" mode="list" color="#000" v-if="!groupList.length" style="margin: 0 auto;"></u-empty>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
@@ -23,17 +23,41 @@ export default {
|
|||||||
components:{
|
components:{
|
||||||
sitem
|
sitem
|
||||||
},
|
},
|
||||||
props: {
|
|
||||||
groupList: Array,
|
|
||||||
classifyList: Array,
|
|
||||||
},
|
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
current: 0,
|
current: -1,
|
||||||
swiperCurrent: 0,
|
swiperCurrent: 0,
|
||||||
|
groupList: [], // 拼团商品
|
||||||
|
classifyList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
current(value) {
|
||||||
|
this.getPinTuanList(this.classifyList[value].gc_id);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getGoodsClass();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获取优惠券拼团分类
|
||||||
|
getGoodsClass() {
|
||||||
|
this.$u.api.getGoodsClass().then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.classifyList = res.data;
|
||||||
|
this.current = 0;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 拼团列表
|
||||||
|
getPinTuanList(id) {
|
||||||
|
this.$u.api.getPinTuanList({
|
||||||
|
page: 0,
|
||||||
|
gc_id: id,
|
||||||
|
}).then(res => {
|
||||||
|
this.groupList = res.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
tabsChange(index) {
|
tabsChange(index) {
|
||||||
this.swiperCurrent = index;
|
this.swiperCurrent = index;
|
||||||
},
|
},
|
||||||
@@ -52,7 +76,9 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.group{
|
.group{
|
||||||
|
background-color: #ffffff;
|
||||||
.top {
|
.top {
|
||||||
|
padding: 0 30rpx;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -67,18 +93,15 @@ export default {
|
|||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// .label{
|
|
||||||
// display: flex;
|
|
||||||
// font-size: 24rpx;
|
|
||||||
// color: #999;
|
|
||||||
// >text{
|
|
||||||
// margin-right: 34rpx;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
.list {
|
.list {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
> view {
|
||||||
margin-top: 21rpx;
|
&:not(:nth-child(3n)) {
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="item" @click="toDetailsPage">
|
<view class="item" @click="toDetailsPage">
|
||||||
<image class="head" :src="info.pintuan_image"></image>
|
<image class="head" :src="info.pintuan_image" mode="widthFix"></image>
|
||||||
<text class="title u-line-1">{{ info.pintuan_goods_name }}</text>
|
<text class="title u-line-1">{{ info.pintuan_goods_name }}</text>
|
||||||
<view class="price">
|
<view class="price">
|
||||||
<view>¥{{ info.pintuan_goods_price }}</view>
|
<view>¥{{ info.pintuan_goods_price }}</view>
|
||||||
@@ -16,19 +16,26 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toDetailsPage() {
|
toDetailsPage() {
|
||||||
this.$u.api.getPinTuanDetails({
|
// this.$u.api.getPinTuanDetails({
|
||||||
pintuan_id: this.info.pintuan_id,
|
// pintuan_id: this.info.pintuan_id,
|
||||||
}).then(res => {
|
// }).then(res => {
|
||||||
if(res.errCode == 0) {
|
// if(res.errCode == 0) {
|
||||||
const goods = {
|
// const goods = {
|
||||||
goods: res.data.data,
|
// goods: res.data.data,
|
||||||
type: 2,
|
// type: 2,
|
||||||
}
|
// }
|
||||||
this.$store.commit('setGoodsDetails', goods);
|
// this.$store.commit('setGoodsDetails', goods);
|
||||||
this.$store.commit('setGoodsId', this.info.pintuan_id);
|
// this.$store.commit('setGoodsId', this.info.pintuan_id);
|
||||||
|
// this.$u.route({
|
||||||
|
// url: 'pageB/sdetails/index',
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: 'pageB/sdetails/index',
|
url: 'pageB/sdetails/index',
|
||||||
})
|
params: {
|
||||||
|
id: this.info.pintuan_id,
|
||||||
|
type: 2,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -40,9 +47,9 @@ export default {
|
|||||||
width: 210rpx;
|
width: 210rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
.head{
|
.head{
|
||||||
width: 210rpx;
|
width: 150rpx;
|
||||||
height: 131rpx;
|
height: 150rpx;
|
||||||
border-radius: 6rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
.title{
|
.title{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|||||||
@@ -1,33 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="top">
|
<view class="top">商品推荐</view>
|
||||||
商品推荐
|
|
||||||
</view>
|
|
||||||
<view>
|
<view>
|
||||||
<u-tabs-swiper ref="uTabs" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="60"></u-tabs-swiper>
|
<u-tabs-swiper ref="uTabs" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="60"></u-tabs-swiper>
|
||||||
</view>
|
</view>
|
||||||
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" :style="{height: swiperHeight}">
|
<swiper class="swiper-box" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" :style="{height: swiperHeight}">
|
||||||
<swiper-item class="swiper-item" v-for="(_, index) in classifyList" :key="index">
|
<swiper-item class="swiper-item" v-for="(_, index) in classifyList" :key="index">
|
||||||
<!-- <scroll-view scroll-y style="height: 800rpx;width: 100%;"> -->
|
|
||||||
<view class="goods-item">
|
<view class="goods-item">
|
||||||
<item v-for="item in goodsList" :key="item.goods_id" :info="item"></item>
|
<item v-for="item in goodsList" :key="item.goods_id" :info="item"></item>
|
||||||
</view>
|
</view>
|
||||||
<u-empty text="暂无商品" mode="list" color="#000" v-if="!goodsList.length"></u-empty>
|
<u-empty text="暂无商品" mode="list" color="#000" v-if="!goodsList.length"></u-empty>
|
||||||
<!-- </scroll-view> -->
|
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<!-- 加载更多 -->
|
<!-- 加载更多 -->
|
||||||
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20"></u-loadmore>
|
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" @loadmore="loadMore" v-if="goodsList.length>=pageSize"></u-loadmore>
|
||||||
<!-- <loadmore ref="loadmore" @callback="getGoodsRecommend" bgColor="#FFF" :page="page"></loadmore> -->
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import item from "./item";
|
import item from "./item";
|
||||||
import loadmore from "@/components/loadmore/index";
|
|
||||||
export default {
|
export default {
|
||||||
name:"list",
|
name:"list",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
pageSize: 12,
|
||||||
current: -1,
|
current: -1,
|
||||||
swiperCurrent: 0,
|
swiperCurrent: 0,
|
||||||
goodsList: [],
|
goodsList: [],
|
||||||
@@ -40,10 +35,11 @@ export default {
|
|||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
item,
|
item,
|
||||||
loadmore
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
current(index) {
|
current(index) {
|
||||||
|
this.page = 1;
|
||||||
|
this.goodsList = [];
|
||||||
const id = this.classifyList[index].gc_id;
|
const id = this.classifyList[index].gc_id;
|
||||||
this.getGoodsRecommend({gc_id: id});
|
this.getGoodsRecommend({gc_id: id});
|
||||||
}
|
}
|
||||||
@@ -61,27 +57,24 @@ export default {
|
|||||||
page: this.page,
|
page: this.page,
|
||||||
reload: false,
|
reload: false,
|
||||||
}).then(length => {
|
}).then(length => {
|
||||||
console.log(length);
|
// console.log(length);
|
||||||
if(length == 0) {
|
if(length == 0) {
|
||||||
this.page--;
|
this.page--;
|
||||||
this.loadStatus = 'nomore';
|
this.loadStatus = 'nomore';
|
||||||
} else {
|
} else {
|
||||||
this.loadStatus = 'loading';
|
this.loadStatus = 'loadmore';
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loadStatus = "nomore";
|
this.loadStatus = "nomore";
|
||||||
this.page--;
|
this.page--;
|
||||||
})
|
})
|
||||||
// this.$refs.loadmore.reachBottom();
|
|
||||||
// this.getGoodsRecommend(this.classifyList[this.current].gc_id);
|
|
||||||
},
|
},
|
||||||
getGoodsClassRecommend(gc_id) {
|
getGoodsClassRecommend() {
|
||||||
this.$u.api.getGoodsClassRecommend().then(res => {
|
this.$u.api.getGoodsClassRecommend().then(res => {
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
// 初始化 current
|
// 初始化 current
|
||||||
this.current = 0;
|
this.current = 0;
|
||||||
this.classifyList = res.data.gc_recommend;
|
this.classifyList = res.data.gc_recommend;
|
||||||
// this.getGoodsRecommend(this.classifyList[0].gc_id);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -90,7 +83,9 @@ export default {
|
|||||||
page: page,
|
page: page,
|
||||||
gc_id: gc_id,
|
gc_id: gc_id,
|
||||||
})
|
})
|
||||||
|
// this.swiperCurrent = this.current;
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
|
this.timer = true;
|
||||||
if(reload) this.goodsList = res.data.goodsList;
|
if(reload) this.goodsList = res.data.goodsList;
|
||||||
else this.goodsList.push(...res.data.goodsList);
|
else this.goodsList.push(...res.data.goodsList);
|
||||||
// console.log(this.goodsList);
|
// console.log(this.goodsList);
|
||||||
@@ -100,11 +95,14 @@ export default {
|
|||||||
},
|
},
|
||||||
setSwiperHeight() {
|
setSwiperHeight() {
|
||||||
// height: 230px, margin-bottom: 13
|
// height: 230px, margin-bottom: 13
|
||||||
this.swiperHeight = Math.ceil(this.goodsList.length / 2) * (230 + 13) + 'px';
|
const height = Math.ceil(this.goodsList.length / 2) * (540 + 26);
|
||||||
|
this.swiperHeight = height == 0 ? '230rpx' : height + 'rpx';
|
||||||
|
// this.swiperHeight = Math.ceil(this.goodsList.length / 2) * (270 + 13) + 'px';
|
||||||
},
|
},
|
||||||
// tabs通知swiper切换
|
// tabs通知swiper切换
|
||||||
tabsChange(index) {
|
tabsChange(index) {
|
||||||
this.swiperCurrent = index;
|
this.current = index;
|
||||||
|
// this.getGoodsRecommend({ gc_id: this.classifyList[this.current].gc_id });
|
||||||
},
|
},
|
||||||
// swiper-item左右移动,通知tabs的滑块跟随移动
|
// swiper-item左右移动,通知tabs的滑块跟随移动
|
||||||
transition(e) {
|
transition(e) {
|
||||||
@@ -116,14 +114,19 @@ export default {
|
|||||||
animationfinish(e) {
|
animationfinish(e) {
|
||||||
let current = e.detail.current;
|
let current = e.detail.current;
|
||||||
this.$refs.uTabs.setFinishCurrent(current);
|
this.$refs.uTabs.setFinishCurrent(current);
|
||||||
this.swiperCurrent = current;
|
|
||||||
this.current = current;
|
this.current = current;
|
||||||
|
this.swiperCurrent = current;
|
||||||
|
// this.getGoodsRecommend({ gc_id: this.classifyList[this.current].gc_id });
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.list{
|
.list{
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 30rpx {
|
||||||
|
top: 0;
|
||||||
|
};
|
||||||
.top {
|
.top {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
@@ -131,27 +134,20 @@ export default {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
// .label{
|
.swiper-box {
|
||||||
// display: flex;
|
height: 100%;
|
||||||
// color: #999;
|
margin-bottom: 10rpx;
|
||||||
// flex-wrap: wrap;
|
.swiper-item {
|
||||||
// >text{
|
height: 100%;
|
||||||
// margin-right: 34rpx;
|
|
||||||
// margin-bottom: 10rpx;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// .item{
|
|
||||||
// display: flex;
|
|
||||||
// flex-wrap: wrap;
|
|
||||||
// justify-content: space-between;
|
|
||||||
// margin-top: 20rpx;
|
|
||||||
|
|
||||||
// }
|
|
||||||
.goods-item {
|
.goods-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-top: 20rpx;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="item" @click="toDetailsPage">
|
<view class="item" @click="toDetailsPage">
|
||||||
<image :src="info.goods_image" class="img"></image>
|
<image :src="info.goods_image" mode="aspectFill" class="img"></image>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<text class="title u-line-1">{{ info.goods_name }}</text>
|
<text class="title u-line-2">{{ info.goods_name }}</text>
|
||||||
<text class="jianjie u-line-2">{{ info.goods_advword }}</text>
|
<text class="jianjie u-line-1">{{ info.goods_advword }}</text>
|
||||||
<text class="price">¥{{ info.goods_price }}</text>
|
<text class="price">¥{{ info.goods_price }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -16,18 +16,25 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toDetailsPage() {
|
toDetailsPage() {
|
||||||
this.$u.api.getGoodsDetails({ id: this.info.goods_id }).then(res => {
|
// this.$u.api.getGoodsDetails({ id: this.info.goods_id }).then(res => {
|
||||||
if (res.errCode == 0) {
|
// if (res.errCode == 0) {
|
||||||
const goods = {
|
// const goods = {
|
||||||
goods: res.data,
|
// goods: res.data,
|
||||||
type: 1,
|
// type: 1,
|
||||||
}
|
// }
|
||||||
this.$store.commit('setGoodsDetails', goods);
|
// this.$store.commit('setGoodsDetails', goods);
|
||||||
this.$store.commit('setGoodsId', this.info.goods_id);
|
// this.$store.commit('setGoodsId', this.info.goods_id);
|
||||||
|
// this.$u.route({
|
||||||
|
// url: 'pageB/sdetails/index',
|
||||||
|
// })
|
||||||
|
// // console.log(this.goodsInfo.mobile_body);
|
||||||
|
// }
|
||||||
|
// })
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: 'pageB/sdetails/index',
|
url: 'pageB/sdetails/index',
|
||||||
})
|
params: {
|
||||||
// console.log(this.goodsInfo.mobile_body);
|
id: this.info.goods_id,
|
||||||
|
type: 1,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -37,13 +44,13 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.item{
|
.item{
|
||||||
width: 330rpx;
|
width: 330rpx;
|
||||||
height: 460rpx;
|
height: 510rpx;
|
||||||
margin-bottom: 26rpx;
|
margin-bottom: 26rpx;
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
border-radius: 10rpx 10rpx 0rpx 0rpx;
|
border-radius: 10rpx 10rpx 0rpx 0rpx;
|
||||||
.img{
|
.img{
|
||||||
width: 330rpx;
|
width: 330rpx;
|
||||||
height: 272rpx;
|
height: 300rpx;
|
||||||
background: rgba(245,245,245,1);
|
background: rgba(245,245,245,1);
|
||||||
border-radius: 10rpx 10rpx 0rpx 0rpx;
|
border-radius: 10rpx 10rpx 0rpx 0rpx;
|
||||||
margin-bottom: 24rpx;
|
margin-bottom: 24rpx;
|
||||||
@@ -55,6 +62,7 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
.title{
|
.title{
|
||||||
|
line-height: 40rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-bottom: 13rpx;
|
margin-bottom: 13rpx;
|
||||||
@@ -63,6 +71,7 @@ export default {
|
|||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
line-height: 38rpx;
|
||||||
}
|
}
|
||||||
.price{
|
.price{
|
||||||
color: #FF3131;
|
color: #FF3131;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export default {
|
|||||||
props: ['recommendData', 'type'],
|
props: ['recommendData', 'type'],
|
||||||
created() {
|
created() {
|
||||||
this.info = this.recommendData;
|
this.info = this.recommendData;
|
||||||
console.log(this.recommendData);
|
// console.log(this.recommendData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<text>¥{{ info.goods_price }}</text>
|
<text>¥{{ info.goods_price }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image class="img" :src="info.groupbuy_image1"></image>
|
<image class="img" :src="info.pintuan_image" @click="toDetailsPage"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -35,23 +35,30 @@ export default {
|
|||||||
props: ['recommendData', 'type'],
|
props: ['recommendData', 'type'],
|
||||||
created() {
|
created() {
|
||||||
this.info = this.recommendData;
|
this.info = this.recommendData;
|
||||||
console.log(this.recommendData);
|
// console.log(this.recommendData);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toDetailsPage() {
|
toDetailsPage() {
|
||||||
this.$u.api.getPinTuanDetails({
|
// this.$u.api.getPinTuanDetails({
|
||||||
pintuan_id: this.recommendData.pintuan_id
|
// pintuan_id: this.recommendData.pintuan_id
|
||||||
}).then(res => {
|
// }).then(res => {
|
||||||
if(res.errCode == 0) {
|
// if(res.errCode == 0) {
|
||||||
const goods = {
|
// const goods = {
|
||||||
goods: res.data.data,
|
// goods: res.data.data,
|
||||||
type: 2,
|
// type: 2,
|
||||||
}
|
// }
|
||||||
this.$store.commit('setGoodsDetails', goods);
|
// this.$store.commit('setGoodsDetails', goods);
|
||||||
this.$store.commit('setGoodsId', this.recommendData.pintuan_id);
|
// this.$store.commit('setGoodsId', this.recommendData.pintuan_id);
|
||||||
|
// this.$u.route({
|
||||||
|
// url: 'pageB/sdetails/index',
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: 'pageB/sdetails/index',
|
url: 'pageB/sdetails/index',
|
||||||
})
|
params: {
|
||||||
|
id: this.recommendData.pintuan_id,
|
||||||
|
type: 2,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -60,6 +67,9 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.recommend{
|
.recommend{
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
.top {
|
.top {
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -75,6 +85,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.connect{
|
.connect{
|
||||||
|
padding: 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.user {
|
.user {
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.seckill{
|
.seckill{
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 30rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
.top{
|
.top{
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -26,20 +26,27 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
spikeGoods() {
|
spikeGoods() {
|
||||||
// console.log(this.item.groupbuy_id);
|
// console.log(this.item.groupbuy_id);
|
||||||
this.$u.api.getSpikeInfo({
|
// this.$u.api.getSpikeInfo({
|
||||||
groupbuy_id: this.item.groupbuy_id
|
// groupbuy_id: this.item.groupbuy_id
|
||||||
}).then(res => {
|
// }).then(res => {
|
||||||
if(res.errCode == 0) {
|
// if(res.errCode == 0) {
|
||||||
const goods = {
|
// const goods = {
|
||||||
goods: res.data.goodsInfo,
|
// goods: res.data.goodsInfo,
|
||||||
type: 3, // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
// type: 3, // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||||
}
|
// }
|
||||||
this.$store.commit('setGoodsDetails', goods);
|
// this.$store.commit('setGoodsDetails', goods);
|
||||||
this.$store.commit('setGroupbuyInfo', res.data.groupbuyInfo);
|
// this.$store.commit('setGroupbuyInfo', res.data.groupbuyInfo);
|
||||||
this.$store.commit('setGoodsId', this.item.groupbuy_id);
|
// this.$store.commit('setGoodsId', this.item.groupbuy_id);
|
||||||
|
// this.$u.route({
|
||||||
|
// url: 'pageB/sdetails/index',
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: 'pageB/sdetails/index',
|
url: 'pageB/sdetails/index',
|
||||||
})
|
params: {
|
||||||
|
id: this.item.groupbuy_id,
|
||||||
|
type: 3,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="shop-item">
|
<view class="shop-item" @click="toClassifyPage">
|
||||||
<image :src="info.goodscn_pic"></image>
|
<image :src="info.goodscn_pic"></image>
|
||||||
<text class="u-line-1">{{ info.gc_name }}</text>
|
<text class="">{{ info.gc_name }}</text>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -9,24 +9,34 @@ export default {
|
|||||||
name:"shopItem",
|
name:"shopItem",
|
||||||
props: {
|
props: {
|
||||||
info: Object,
|
info: Object,
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toClassifyPage() {
|
||||||
|
this.$u.route('pageC/classify/goods', {
|
||||||
|
cid: this.info.gc_id,
|
||||||
|
cname: this.info.gc_name,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.shop-item{
|
.shop-item{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 20%;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
>image{
|
>image{
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
>text{
|
>text{
|
||||||
width: 80rpx;
|
width: 100rpx;
|
||||||
|
margin-top: 14rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-top: 14rpx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -42,37 +42,51 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
spikeGoods() {
|
spikeGoods() {
|
||||||
// console.log(this.item.groupbuy_id);
|
// console.log(this.item.groupbuy_id);
|
||||||
this.$u.api.getSpikeInfo({
|
// this.$u.api.getSpikeInfo({
|
||||||
groupbuy_id: this.item.groupbuy_id
|
// groupbuy_id: this.item.groupbuy_id
|
||||||
}).then(res => {
|
// }).then(res => {
|
||||||
if(res.errCode == 0) {
|
// if(res.errCode == 0) {
|
||||||
const goods = {
|
// const goods = {
|
||||||
goods: res.data.goodsInfo,
|
// goods: res.data.goodsInfo,
|
||||||
type: 3, // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
// type: 3, // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||||
}
|
// }
|
||||||
this.$store.commit('setGoodsDetails', goods);
|
// this.$store.commit('setGoodsDetails', goods);
|
||||||
this.$store.commit('setGroupbuyInfo', res.data.groupbuyInfo);
|
// this.$store.commit('setGroupbuyInfo', res.data.groupbuyInfo);
|
||||||
this.$store.commit('setGoodsId', this.item.groupbuy_id);
|
// this.$store.commit('setGoodsId', this.item.groupbuy_id);
|
||||||
|
// this.$u.route({
|
||||||
|
// url: 'pageB/sdetails/index',
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: 'pageB/sdetails/index',
|
url: 'pageB/sdetails/index',
|
||||||
})
|
params: {
|
||||||
|
id: this.item.groupbuy_id,
|
||||||
|
type: 3,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toDetailsPage() {
|
toDetailsPage() {
|
||||||
this.$u.api.getPinTuanDetails({
|
// this.$u.api.getPinTuanDetails({
|
||||||
pintuan_id: this.item.pintuan_id
|
// pintuan_id: this.item.pintuan_id
|
||||||
}).then(res => {
|
// }).then(res => {
|
||||||
if(res.errCode == 0) {
|
// if(res.errCode == 0) {
|
||||||
const goods = {
|
// const goods = {
|
||||||
goods: res.data.data,
|
// goods: res.data.data,
|
||||||
type: 2,
|
// type: 2,
|
||||||
}
|
// }
|
||||||
this.$store.commit('setGoodsDetails', goods);
|
// this.$store.commit('setGoodsDetails', goods);
|
||||||
this.$store.commit('setGoodsId', this.item.pintuan_id);
|
// this.$store.commit('setGoodsId', this.item.pintuan_id);
|
||||||
|
// this.$u.route({
|
||||||
|
// url: 'pageB/sdetails/index',
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: 'pageB/sdetails/index',
|
url: 'pageB/sdetails/index',
|
||||||
})
|
params: {
|
||||||
|
id: this.item.pintuan_id,
|
||||||
|
type: 2,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export default {
|
|||||||
num = this.couponList.length
|
num = this.couponList.length
|
||||||
? this.couponList.length > 4 ? 4 : this.couponList.length
|
? this.couponList.length > 4 ? 4 : this.couponList.length
|
||||||
: 1
|
: 1
|
||||||
this.swiperHeight = (97 + 10) * num - 10 + 'px';
|
this.swiperHeight = (200 + 20) * num + 'rpx';
|
||||||
},
|
},
|
||||||
toCouponPage() {
|
toCouponPage() {
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
@@ -93,8 +93,11 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.coupon-swiper {
|
.coupon-swiper {
|
||||||
|
background-color: #ffffff;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
.top {
|
.top {
|
||||||
padding-top: 30rpx;
|
padding: 0 30rpx;
|
||||||
|
height: 90rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -109,12 +112,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.swiper-coupon-item {
|
.swiper-coupon-item {
|
||||||
|
padding: 0 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
// padding: 30rpx {
|
|
||||||
// top: 0;
|
|
||||||
// };
|
|
||||||
.coupon-item {
|
.coupon-item {
|
||||||
|
height: 200rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
5
main.js
@@ -1,11 +1,12 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import App from './App'
|
import App from './App'
|
||||||
|
import IMService from './static/imservice.js'
|
||||||
import uView from "uview-ui";
|
import uView from "uview-ui";
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
Vue.use(uView);
|
Vue.use(uView);
|
||||||
App.mpType = 'app'
|
App.mpType = 'app'
|
||||||
|
Vue.prototype.imService = new IMService();
|
||||||
|
Vue.prototype.a = 1;
|
||||||
import store from '@/common/store/index.js'
|
import store from '@/common/store/index.js'
|
||||||
|
|
||||||
Vue.prototype.$store = store;
|
Vue.prototype.$store = store;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "deming",
|
"name" : "德铭阳光",
|
||||||
"appid" : "__UNI__62A680B",
|
"appid" : "__UNI__EBFF00A",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.0",
|
"versionName" : "1.0.0",
|
||||||
"versionCode" : "100",
|
"versionCode" : "100",
|
||||||
@@ -18,7 +18,14 @@
|
|||||||
},
|
},
|
||||||
/* 模块配置 */
|
/* 模块配置 */
|
||||||
"modules" : {
|
"modules" : {
|
||||||
"OAuth" : {}
|
"OAuth" : {},
|
||||||
|
"Share" : {},
|
||||||
|
"Push" : {},
|
||||||
|
"Maps" : {},
|
||||||
|
"LivePusher" : {},
|
||||||
|
"Payment" : {},
|
||||||
|
"VideoPlayer" : {},
|
||||||
|
"Speech" : {}
|
||||||
},
|
},
|
||||||
/* 应用发布信息 */
|
/* 应用发布信息 */
|
||||||
"distribute" : {
|
"distribute" : {
|
||||||
@@ -37,6 +44,7 @@
|
|||||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
|
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
|
||||||
@@ -46,8 +54,10 @@
|
|||||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
|
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||||
]
|
],
|
||||||
|
"abiFilters" : [ "armeabi-v7a", "x86" ]
|
||||||
},
|
},
|
||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
"ios" : {},
|
"ios" : {},
|
||||||
@@ -57,6 +67,78 @@
|
|||||||
"oauth" : {
|
"oauth" : {
|
||||||
"qq" : {
|
"qq" : {
|
||||||
"appid" : "101884160"
|
"appid" : "101884160"
|
||||||
|
},
|
||||||
|
"apple" : {},
|
||||||
|
"weixin" : {
|
||||||
|
"appid" : "wx556db1531ec35dc7",
|
||||||
|
"appsecret" : "f441fc15dd21543871a818f40ce92016",
|
||||||
|
"UniversalLinks" : "https://demo.dcloud.net.cn/ulink/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"maps" : {
|
||||||
|
"amap" : {
|
||||||
|
"appkey_ios" : "eafe430aa31fa033dcf45a0e87032653",
|
||||||
|
"appkey_android" : "8045e8a4cd6d544690c786265b248f91"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"share" : {
|
||||||
|
"weixin" : {
|
||||||
|
"appid" : "wx556db1531ec35dc7",
|
||||||
|
"UniversalLinks" : "https://demo.dcloud.net.cn/ulink/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"speech" : {
|
||||||
|
"ifly" : {}
|
||||||
|
},
|
||||||
|
"payment" : {
|
||||||
|
"alipay" : {},
|
||||||
|
"weixin" : {
|
||||||
|
"appid" : "wx556db1531ec35dc7",
|
||||||
|
"UniversalLinks" : "https://demo.dcloud.net.cn/ulink/"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"splashscreen" : {
|
||||||
|
"androidStyle" : "default",
|
||||||
|
"android" : {
|
||||||
|
"hdpi" : "static/app/start/480x762.png",
|
||||||
|
"xhdpi" : "static/app/start/720x1242.png",
|
||||||
|
"xxhdpi" : "static/app/start/1080x1882.png"
|
||||||
|
},
|
||||||
|
"iosStyle" : "storyboard",
|
||||||
|
"ios" : {
|
||||||
|
"storyboard" : "static/CustomStoryboard.zip"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"icons" : {
|
||||||
|
"android" : {
|
||||||
|
"hdpi" : "static/app/icon/72x72.png",
|
||||||
|
"xhdpi" : "static/app/icon/96x96.png",
|
||||||
|
"xxhdpi" : "static/app/icon/144x144.png",
|
||||||
|
"xxxhdpi" : "static/app/icon/192x192.png"
|
||||||
|
},
|
||||||
|
"ios" : {
|
||||||
|
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||||
|
"iphone" : {
|
||||||
|
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||||
|
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||||
|
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||||
|
"spotlight@3x" : "unpackage/res/icons/120x120.png",
|
||||||
|
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||||
|
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||||
|
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||||
|
"notification@3x" : "unpackage/res/icons/60x60.png"
|
||||||
|
},
|
||||||
|
"ipad" : {
|
||||||
|
"app" : "unpackage/res/icons/76x76.png",
|
||||||
|
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||||
|
"notification" : "unpackage/res/icons/20x20.png",
|
||||||
|
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||||
|
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||||
|
"settings" : "unpackage/res/icons/29x29.png",
|
||||||
|
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||||
|
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||||
|
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,21 +8,22 @@
|
|||||||
<view class="title">手机登录</view>
|
<view class="title">手机登录</view>
|
||||||
<view class="labales">
|
<view class="labales">
|
||||||
<!-- <text></text> -->
|
<!-- <text></text> -->
|
||||||
<input type="tel" placeholder="请输入您的手机号" v-model="member_mobile" />
|
<input type="tel" placeholder="请输入您的手机号" maxlength="11" v-model="member_mobile" />
|
||||||
</view>
|
</view>
|
||||||
<view class="labales">
|
<view class="labales">
|
||||||
<!-- <text></text> -->
|
<!-- <text></text> -->
|
||||||
<input type="tel" placeholder="请输入验证码" v-model="sms_code" />
|
<input type="number" placeholder="请输入验证码" maxlength="6" v-model="sms_code" />
|
||||||
<!-- <text class="identifying" @click="getCode">{{text}}</text> -->
|
<!-- <text class="identifying" @click="getCode">{{text}}</text> -->
|
||||||
<identifying @tochange="tochange" :smslog_type="smslog_type" :member_mobile="member_mobile"></identifying>
|
<identifying @tochange="tochange" :smslog_type="smslog_type" :member_mobile="member_mobile"></identifying>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 服务协议 -->
|
<!-- 服务协议 -->
|
||||||
<view class="pact">
|
<view class="pact" v-if="0">
|
||||||
<view>
|
<view>
|
||||||
<view></view>
|
<view></view>
|
||||||
<text>我已详细阅读并同意</text>
|
<text>我已详细阅读并同意</text>
|
||||||
<text class="pact_text" v-for="(item,index) in pact_text" :key="index" @click="pact_click(index)"> {{item.text}} </text>
|
<text class="pact_text" v-for="(item,index) in pact_text" :key="index" @click="pact_click(index)"> {{item.text}}
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<u-checkbox-group @change="checkboxGroupChange" size="27">
|
<u-checkbox-group @change="checkboxGroupChange" size="27">
|
||||||
<u-checkbox @change="checkboxChange" v-model="item.checked" v-for="(item, index) in list" :key="index" :name="item.name"
|
<u-checkbox @change="checkboxChange" v-model="item.checked" v-for="(item, index) in list" :key="index" :name="item.name"
|
||||||
@@ -37,16 +38,17 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- denglu QQ weixin -->
|
<!-- denglu QQ weixin -->
|
||||||
<view class="buttones">
|
<view class="buttones">
|
||||||
<view @click="loginOn">{{login}}</view>
|
<view @click="loginOn" class="btn">{{login}}</view>
|
||||||
|
<view class="a-go" @click="goIndex">暂不登录</view>
|
||||||
</view>
|
</view>
|
||||||
<u-mask :show="show" @click="show = false">
|
<u-mask :show="show" @click="show = false">
|
||||||
<view class="warp">
|
<view class="warp">
|
||||||
<view class="rect" @tap.stop>
|
<view class="rect" @tap.stop>
|
||||||
<view class="rect_view" @click="rect_qq()">
|
<view class="rect_view" @click="loginOther(1)">
|
||||||
<image src="../../static/pageA/qq.png" class="image"></image>
|
<image src="../../static/pageA/qq.png" class="image"></image>
|
||||||
<view>QQ登录</view>
|
<view>QQ登录</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="rect_view">
|
<view class="rect_view" @click="loginOther(2)">
|
||||||
<image src="../../static/pageA/weixin.png" class="image"></image>
|
<image src="../../static/pageA/weixin.png" class="image"></image>
|
||||||
<view>微信登录</view>
|
<view>微信登录</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -60,6 +62,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import identifying from '@/components/logininput/identifying'
|
import identifying from '@/components/logininput/identifying'
|
||||||
|
import {
|
||||||
|
mapMutations
|
||||||
|
} from 'vuex';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -89,20 +94,35 @@
|
|||||||
}, {
|
}, {
|
||||||
"id": '3',
|
"id": '3',
|
||||||
"text": "《使用协议》"
|
"text": "《使用协议》"
|
||||||
},
|
}, ],
|
||||||
|
temp_url: "", // 上个页面路径
|
||||||
]
|
pagesArr: ["pages/mine/index"], // 特殊路径
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
// 数据的请求
|
// 数据的请求
|
||||||
this.apiwelcome()
|
this.apiwelcome();
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
let pages = getCurrentPages();
|
||||||
|
let prePage = pages[pages.length - 2];
|
||||||
|
this.temp_url = prePage.route;
|
||||||
|
// console.log(this.temp_url);
|
||||||
|
},
|
||||||
|
// 切断正常返回
|
||||||
|
onBackPress(e) {
|
||||||
|
console.log(1, e);
|
||||||
|
if (this.pagesArr.includes(this.temp_url) && !this.hasLogin) {
|
||||||
|
uni.switchTab({
|
||||||
|
url: '../../pages/index/index'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapMutations(['loginIn']),
|
||||||
apiwelcome() {
|
apiwelcome() {
|
||||||
this.$u.api.sendSmsCode({
|
this.$u.api.sendSmsCode({}).then((res) => {
|
||||||
|
|
||||||
}).then((res) => {
|
|
||||||
console.log(res)
|
console.log(res)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -115,6 +135,7 @@
|
|||||||
},
|
},
|
||||||
// 用户登录
|
// 用户登录
|
||||||
loginOn() {
|
loginOn() {
|
||||||
|
let me = this;
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
// url: '/pageE/zhibo/index'
|
// url: '/pageE/zhibo/index'
|
||||||
// });
|
// });
|
||||||
@@ -159,34 +180,29 @@
|
|||||||
})
|
})
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
uni.setStorageSync('token', res.data.token);//存储一个字符传值
|
me.loginIn(res.data.token); //存储一个字符传值
|
||||||
|
// 缓存用户的信息
|
||||||
|
uni.setStorageSync('user_info',res.data);
|
||||||
|
|
||||||
|
if (res.data.member.has_labels) {
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pageA/topick/topick'
|
url: '/pageA/topick/topick'
|
||||||
})
|
})
|
||||||
// 缓存用户的信息
|
}
|
||||||
// uni.setStorageSync({
|
|
||||||
// key: 'user_info',
|
|
||||||
// data: res.data,
|
|
||||||
// success: function() {
|
|
||||||
// console.log('success');
|
|
||||||
// // 跳转首页
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url : '/pageA/topick/topick'
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 存储接口请求所需token
|
// 存储接口请求所需token
|
||||||
uni.setStorageSync('token', res.data.token);//存储一个字符传值
|
|
||||||
// // 注册返回参数
|
// // 注册返回参数
|
||||||
// this.$refs.uToast.show({
|
// this.$refs.uToast.show({
|
||||||
// title: res.message,
|
// title: res.message,
|
||||||
// type: 'success',
|
// type: 'success',
|
||||||
// url: '/pageA/topick/topick'
|
// url: '/pageA/topick/topick'
|
||||||
// })
|
// })
|
||||||
}
|
} else {
|
||||||
if (res.errCode == 1) {
|
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
type: 'error'
|
type: 'error'
|
||||||
@@ -195,40 +211,75 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// qq授权登录
|
// qq授权登录
|
||||||
rect_qq() {
|
loginOther(type) {
|
||||||
console.log("授权Q")
|
var me = this;
|
||||||
var vm = this;
|
|
||||||
uni.getProvider({
|
uni.getProvider({
|
||||||
service: 'oauth',
|
service: 'oauth',
|
||||||
success: function(res) {
|
success: (res) => {
|
||||||
console.log('qq', res) //weixin
|
if (type == 1) {
|
||||||
if (~res.provider.indexOf('qq')) {
|
|
||||||
uni.login({
|
uni.login({
|
||||||
provider: 'qq',
|
provider: 'qq',
|
||||||
success: function(loginRes) {
|
success: (qqres) => {
|
||||||
console.log(loginRes)
|
console.log(qqres);
|
||||||
this.getApplogin(loginRes)
|
uni.getUserInfo({
|
||||||
vm.$HTTP({
|
provider: 'qq',
|
||||||
method: 'GET',
|
success: (data) => {
|
||||||
baseURL: 'https://graph.qq.com/user/get_user_info',
|
console.log(data);
|
||||||
url: '',
|
this.$u.api.qqLogin({
|
||||||
data: {
|
member_qqopenid: data.userInfo.openId,
|
||||||
openid: loginRes.authResult.openid,
|
member_nickname: data.userInfo.nickName,
|
||||||
access_token: loginRes.authResult.access_token,
|
member_avatar: data.userInfo.avatarUrl,
|
||||||
appid: '101884160'
|
}).then(res => {
|
||||||
|
console.log(res.errCode);
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.loginIn(res.data.token);
|
||||||
|
this.show = false;
|
||||||
|
uni.switchTab({
|
||||||
|
url: "../../pages/index/index"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
load: true
|
fail: (e) => {
|
||||||
}).then((data) => {
|
console.log(e);
|
||||||
console.log(data)
|
|
||||||
|
|
||||||
}, (err) => {
|
|
||||||
console.log(err)
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log("错误")
|
uni.login({
|
||||||
|
provider: 'weixin',
|
||||||
|
success: (wxres) => {
|
||||||
|
console.log(wxres);
|
||||||
|
uni.getUserInfo({
|
||||||
|
provider: 'weixin',
|
||||||
|
success: (data) => {
|
||||||
|
console.log(data);
|
||||||
|
this.$u.api.wechatLogin({
|
||||||
|
member_wxopenid: data.userInfo.openId,
|
||||||
|
member_nickname: data.userInfo.nickName,
|
||||||
|
member_avatar: data.userInfo.avatarUrl,
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.loginIn(res.data.token);
|
||||||
|
this.show = false;
|
||||||
|
uni.switchTab({
|
||||||
|
url: "../../pages/index/index"
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail: (e) => {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: (e) => {
|
||||||
|
console.log(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -238,10 +289,6 @@
|
|||||||
url: '/pageA/register/register'
|
url: '/pageA/register/register'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 授权登录
|
|
||||||
getApplogin() {
|
|
||||||
console.log("11")
|
|
||||||
},
|
|
||||||
// 选中某个复选框时,由checkbox时触发
|
// 选中某个复选框时,由checkbox时触发
|
||||||
checkboxChange(e) {
|
checkboxChange(e) {
|
||||||
//console.log(e);
|
//console.log(e);
|
||||||
@@ -255,6 +302,11 @@
|
|||||||
},
|
},
|
||||||
tochange() {
|
tochange() {
|
||||||
|
|
||||||
|
},
|
||||||
|
goIndex() {
|
||||||
|
uni.switchTab({
|
||||||
|
url: "/pages/index/index"
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -296,10 +348,12 @@
|
|||||||
width: 630rpx;
|
width: 630rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-checkbox__icon-wrap .u-icon {
|
.u-checkbox__icon-wrap .u-icon {
|
||||||
width: 26rpx !important;
|
width: 26rpx !important;
|
||||||
height: 26rpx;
|
height: 26rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.more_Login text {
|
.more_Login text {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
@@ -397,7 +451,8 @@
|
|||||||
height: 22rpx;
|
height: 22rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttones > view {
|
.buttones {
|
||||||
|
.btn {
|
||||||
width: 628rpx;
|
width: 628rpx;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
background: rgba(255, 120, 15, 1) !important;
|
background: rgba(255, 120, 15, 1) !important;
|
||||||
@@ -411,6 +466,13 @@
|
|||||||
border-color: rgba(255, 120, 15, 1) !important;
|
border-color: rgba(255, 120, 15, 1) !important;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.a-go {
|
||||||
|
margin-top: 24rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #f2f2f2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.warp {
|
.warp {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export default {
|
|||||||
console.log(option)
|
console.log(option)
|
||||||
// 协议类型调用不同的的协议
|
// 协议类型调用不同的的协议
|
||||||
let typeIindex = option.index;
|
let typeIindex = option.index;
|
||||||
this.typeIndexRquest(typeIindex)
|
this.typeIndexRquest(typeIindex);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
typeIndexRquest(typeIindex){
|
typeIndexRquest(typeIindex){
|
||||||
@@ -28,16 +28,22 @@ export default {
|
|||||||
this.$u.api.documentInfo({
|
this.$u.api.documentInfo({
|
||||||
document_code: 'agreement'
|
document_code: 'agreement'
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
console.log(res)
|
// console.log(res.data.document_title);
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: res.data.document_title
|
||||||
|
})
|
||||||
let data = common.unescapeHTML(res.data.document_content);
|
let data = common.unescapeHTML(res.data.document_content);
|
||||||
this.document_content = data
|
this.document_content = data;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(typeIindex == 1){
|
if(typeIindex == 1){
|
||||||
this.$u.api.documentInfo({
|
this.$u.api.documentInfo({
|
||||||
document_code: 'privacy'
|
document_code: 'privacy'
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
console.log(res)
|
// console.log(res.data.document_title);
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: res.data.document_title
|
||||||
|
})
|
||||||
let data = common.unescapeHTML(res.data.document_content);
|
let data = common.unescapeHTML(res.data.document_content);
|
||||||
this.document_content = data
|
this.document_content = data
|
||||||
})
|
})
|
||||||
@@ -46,7 +52,10 @@ export default {
|
|||||||
this.$u.api.documentInfo({
|
this.$u.api.documentInfo({
|
||||||
document_code: 'use'
|
document_code: 'use'
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
console.log(res)
|
// console.log(res.data.document_title);
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: res.data.document_title
|
||||||
|
})
|
||||||
let data = common.unescapeHTML(res.data.document_content);
|
let data = common.unescapeHTML(res.data.document_content);
|
||||||
this.document_content = data
|
this.document_content = data
|
||||||
})
|
})
|
||||||
@@ -62,10 +71,14 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.packlist{}
|
.packlist{}
|
||||||
.packlist > view{
|
.packlist > view{
|
||||||
width:676px;
|
|
||||||
font-size:26rpx;
|
|
||||||
color: #333;
|
|
||||||
width: 90%;
|
width: 90%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
padding: 16upx 0;
|
||||||
|
font-size: 26upx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.rict_type {
|
||||||
|
text-indent: 1rem;
|
||||||
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -8,11 +8,11 @@
|
|||||||
<view class="title">手机注册</view>
|
<view class="title">手机注册</view>
|
||||||
<view class="labales phones">
|
<view class="labales phones">
|
||||||
<!-- <text></text> -->
|
<!-- <text></text> -->
|
||||||
<input type="tel" placeholder="请输入您的手机号" v-model="member_mobile" />
|
<input type="tel" placeholder="请输入您的手机号" maxlength="11" v-model="member_mobile" />
|
||||||
</view>
|
</view>
|
||||||
<view class="labales">
|
<view class="labales">
|
||||||
<!-- <text></text> -->
|
<!-- <text></text> -->
|
||||||
<input type="tel" placeholder="请输入验证码" v-model="sms_code" />
|
<input type="tel" placeholder="请输入验证码" maxlength="6" v-model="sms_code" />
|
||||||
<!-- <text class="identifying" @click="apiwelcome()">获取验证码</text> -->
|
<!-- <text class="identifying" @click="apiwelcome()">获取验证码</text> -->
|
||||||
<!-- 验证码接口的引入 -->
|
<!-- 验证码接口的引入 -->
|
||||||
<identifying @tochange="tochange" :smslog_type="smslog_type" :member_mobile="member_mobile" ></identifying>
|
<identifying @tochange="tochange" :smslog_type="smslog_type" :member_mobile="member_mobile" ></identifying>
|
||||||
@@ -24,17 +24,18 @@
|
|||||||
<text class="pact_text" v-for="(item,index) in pact_text" :key="index" @click="pact_click(index)"> {{item.text}} </text>
|
<text class="pact_text" v-for="(item,index) in pact_text" :key="index" @click="pact_click(index)"> {{item.text}} </text>
|
||||||
<u-checkbox-group @change="checkboxGroupChange" size="27">
|
<u-checkbox-group @change="checkboxGroupChange" size="27">
|
||||||
<u-checkbox @change="checkboxChange" v-model="item.checked" v-for="(item, index) in list" :key="index" :name="item.name"
|
<u-checkbox @change="checkboxChange" v-model="item.checked" v-for="(item, index) in list" :key="index" :name="item.name"
|
||||||
shape="circle" size="14" active-color="#19BE6B" ></u-checkbox>
|
shape="circle" size="30" active-color="#19BE6B" ></u-checkbox>
|
||||||
</u-checkbox-group>
|
</u-checkbox-group>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 注册 -->
|
<!-- 注册 -->
|
||||||
<view class="more_Login">
|
<view class="more_Login">
|
||||||
<text></text>
|
<text></text>
|
||||||
<text class="other" @click="mask_u">其他方式登录</text>
|
<!-- <text class="other" @click="mask_u">其他方式登录</text> -->
|
||||||
</view>
|
</view>
|
||||||
<!-- denglu QQ weixin -->
|
<!-- denglu QQ weixin -->
|
||||||
<view class="u-btn" @click="loginIn">{{login}}</view>
|
<view class="u-btn" @click="loginIns">{{login}}</view>
|
||||||
|
<view class="go-login" @click="goLogin">已有账号,立即登录</view>
|
||||||
<u-mask :show="show" @click="show = false">
|
<u-mask :show="show" @click="show = false">
|
||||||
<view class="warp">
|
<view class="warp">
|
||||||
<view class="rect" @tap.stop>
|
<view class="rect" @tap.stop>
|
||||||
@@ -56,7 +57,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import identifying from '@/components/logininput/identifying'
|
import identifying from '@/components/logininput/identifying';
|
||||||
|
import {
|
||||||
|
mapMutations
|
||||||
|
} from 'vuex';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -67,6 +71,7 @@
|
|||||||
value: '',
|
value: '',
|
||||||
login: '注册',
|
login: '注册',
|
||||||
show: false,
|
show: false,
|
||||||
|
is_check: null,
|
||||||
member_mobile: '', //手机号
|
member_mobile: '', //手机号
|
||||||
smslog_type : '1',//状态
|
smslog_type : '1',//状态
|
||||||
sms_code : '', //验证码
|
sms_code : '', //验证码
|
||||||
@@ -89,6 +94,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapMutations(['loginIn']),
|
||||||
// 协议跳转
|
// 协议跳转
|
||||||
pact_click(index){
|
pact_click(index){
|
||||||
console.log(index)
|
console.log(index)
|
||||||
@@ -97,25 +103,33 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 用户注册
|
// 用户注册
|
||||||
loginIn(){
|
loginIns(){
|
||||||
|
let me = this;
|
||||||
let type_phone = this.$u.test.mobile( this.member_mobile)
|
let type_phone = this.$u.test.mobile( this.member_mobile)
|
||||||
if( this.member_mobile == ''){
|
if( this.member_mobile == ''){
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: '手机号不能为空',
|
title: '手机号不能为空!',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (type_phone == false) {
|
if (type_phone == false) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: '手机号格式不正确',
|
title: '手机号格式不正确!',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if( this.sms_code == ''){
|
if( this.sms_code == ''){
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: '验证码不能为空',
|
title: '验证码不能为空!',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (this.is_check) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '请同意协议!',
|
||||||
type: 'error'
|
type: 'error'
|
||||||
})
|
})
|
||||||
return false;
|
return false;
|
||||||
@@ -129,18 +143,16 @@
|
|||||||
|
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
if(res.errCode == 0){
|
if(res.errCode == 0){
|
||||||
|
//存储一个字符传值
|
||||||
|
me.loginIn(res.data.token);
|
||||||
// 缓存用户的信息
|
// 缓存用户的信息
|
||||||
uni.setStorage({
|
uni.setStorageSync('user_info',res.data);
|
||||||
key: 'token',
|
|
||||||
data: res.data.token,
|
|
||||||
success: function () {
|
|
||||||
console.log('success');
|
|
||||||
// 跳转选择页面
|
// 跳转选择页面
|
||||||
|
if (uni.getStorageSync("token")) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pageA/topick/topick'
|
url: '/pageA/topick/topick'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
|
||||||
// 注册返回参数
|
// 注册返回参数
|
||||||
// this.$refs.uToast.show({
|
// this.$refs.uToast.show({
|
||||||
// title: res.message,
|
// title: res.message,
|
||||||
@@ -165,20 +177,25 @@
|
|||||||
},
|
},
|
||||||
// 选中某个复选框时,由checkbox时触发
|
// 选中某个复选框时,由checkbox时触发
|
||||||
checkboxChange(e) {
|
checkboxChange(e) {
|
||||||
//console.log(e);
|
// console.log(e,1);
|
||||||
|
this.is_check = e.value;
|
||||||
|
console.log(this.is_check);
|
||||||
},
|
},
|
||||||
// 选中任一checkbox时,由checkbox-group触发
|
// 选中任一checkbox时,由checkbox-group触发
|
||||||
checkboxGroupChange(e) {
|
checkboxGroupChange(e) {
|
||||||
// console.log(e);
|
// console.log(e,2);
|
||||||
},
|
},
|
||||||
mask_u() {
|
mask_u() {
|
||||||
this.show = !this.show
|
this.show = !this.show
|
||||||
},
|
},
|
||||||
|
goLogin() {
|
||||||
|
this.$u.route("/pageA/login/login");
|
||||||
|
},
|
||||||
// 注册接口
|
// 注册接口
|
||||||
tochange() {
|
tochange() {
|
||||||
// console.log("调用父组件的方法")
|
// console.log("调用父组件的方法")
|
||||||
// console.log('2222',this._data.member_mobile)
|
// console.log('2222',this._data.member_mobile)
|
||||||
let member_mobile = this._data.member_mobile
|
let member_mobile = this._data.member_mobile;
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -314,6 +331,12 @@
|
|||||||
border-color: rgba(255, 120, 15, 1) !important;
|
border-color: rgba(255, 120, 15, 1) !important;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.go-login {
|
||||||
|
margin-top: 26rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
.warp {
|
.warp {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 标签 -->
|
<!-- 标签 -->
|
||||||
<view class="tab_lable">
|
<view class="tab_lable">
|
||||||
<view :class="{'cur': rSelect.indexOf(index)!=-1}" v-for="(item,index) in tab_lables" :key="index" @click="tapClick(index)">{{item.name}}</view>
|
<view :class="{'cur': rSelect.indexOf(index)!=-1}" v-for="(item,index) in tab_lables" :key="index" @click="tapClick(index,item.id)">{{item.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 提交按钮 -->
|
<!-- 提交按钮 -->
|
||||||
<view class="submites" @click="toHomePage">{{submites}}</view>
|
<view class="submites" @click="toHomePage">{{submites}}</view>
|
||||||
@@ -30,12 +30,12 @@
|
|||||||
show: false,
|
show: false,
|
||||||
tab_lables: [],
|
tab_lables: [],
|
||||||
submites: '选好了进入首页',
|
submites: '选好了进入首页',
|
||||||
rSelect:[]
|
rSelect: [],
|
||||||
|
list: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
// 标签的列表展示
|
// 标签的列表展示
|
||||||
console.log("11111222")
|
|
||||||
this.$u.api.labelList({
|
this.$u.api.labelList({
|
||||||
|
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
@@ -44,8 +44,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted(){
|
mounted() {},
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
// 选中某个复选框时,由checkbox时触发
|
// 选中某个复选框时,由checkbox时触发
|
||||||
checkboxChange(e) {
|
checkboxChange(e) {
|
||||||
@@ -59,19 +58,36 @@
|
|||||||
this.show = !this.show
|
this.show = !this.show
|
||||||
},
|
},
|
||||||
// 点击切换颜色
|
// 点击切换颜色
|
||||||
tapClick(index) {
|
tapClick(index, id) {
|
||||||
console.log(index)
|
// console.log(index);
|
||||||
if (this.rSelect.indexOf(index) == -1) {
|
if (this.rSelect.indexOf(index) == -1) {
|
||||||
console.log(index) //打印下标
|
if (this.rSelect.length > 9) {
|
||||||
this.rSelect.push(index); //选中添加到数组里
|
this.$u.toast("只能选择10个标签!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
this.rSelect.push(index); // 选中状态
|
||||||
|
this.list.push(id); //选中添加到数组里
|
||||||
} else {
|
} else {
|
||||||
this.rSelect.splice(this.rSelect.indexOf(index), 1); //取消
|
this.rSelect.splice(this.rSelect.indexOf(index), 1); //取消
|
||||||
|
this.list.splice(this.rSelect.indexOf(id), 1); //取消
|
||||||
}
|
}
|
||||||
|
// console.log(this.rSelect);
|
||||||
|
console.log(this.list);
|
||||||
},
|
},
|
||||||
toHomePage() {
|
toHomePage() {
|
||||||
|
this.$u.post("StartUp/addLabel", {
|
||||||
|
label_ids: this.list
|
||||||
|
}).then(res => {
|
||||||
|
// console.log(res);
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
// this.$u.toast(res.message);
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -360,6 +376,7 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 选中的样式
|
// 选中的样式
|
||||||
.cur {
|
.cur {
|
||||||
background-color: #ff5d00 !important;
|
background-color: #ff5d00 !important;
|
||||||
|
|||||||
@@ -1,31 +1,61 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="welcome">
|
<view class="welcome">
|
||||||
<!-- 倒计时(跳过) -->
|
<!-- 倒计时(跳过) -->
|
||||||
<remaining></remaining>
|
<remaining v-if="guidePages"></remaining>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
mapState
|
||||||
|
} from 'vuex';
|
||||||
import remaining from '@/components/remaining/remaining';
|
import remaining from '@/components/remaining/remaining';
|
||||||
export default {
|
export default {
|
||||||
|
computed: {
|
||||||
|
...mapState(['hasLogin', 'token'])
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
guidePages: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
this.loadExecution();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
loadExecution() {
|
||||||
},
|
/**
|
||||||
mounted(){
|
* 获取本地存储中launchFlag的值
|
||||||
},
|
* 若存在,说明不是首次启动,直接进入首页;
|
||||||
components:{}
|
* 若不存在,说明是首次启动,进入引导页;
|
||||||
|
*/
|
||||||
|
// 获取本地存储中launchFlag标识
|
||||||
|
const value = uni.getStorageSync('launchFlag') || "";
|
||||||
|
// console.log(value, this.hasLogin);
|
||||||
|
if (value) {
|
||||||
|
this.guidePages = false;
|
||||||
|
if (this.hasLogin) {
|
||||||
|
uni.switchTab({
|
||||||
|
url: '../../pages/index/index'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// launchFlag=true直接跳转到首页
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '../../pageA/login/login'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// launchFlag!=true显示引导页
|
||||||
|
this.guidePages = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.welcome {}
|
.welcome {}
|
||||||
|
|
||||||
.welcome_jumpes {
|
.welcome_jumpes {
|
||||||
width: 90rpx;
|
width: 90rpx;
|
||||||
height: 35rpx;
|
height: 35rpx;
|
||||||
@@ -40,6 +70,7 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
background: #C4CAC6;
|
background: #C4CAC6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.welcome_images {
|
.welcome_images {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|||||||
126
pageB/comment/index.vue
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
<template>
|
||||||
|
<scroll-view scroll-y class="comment" @scrolltolower="loadMore">
|
||||||
|
<view class="label-list">
|
||||||
|
<view v-for="(label, index) in evaluateSpec" :key="index" :class="{'active': current == index}" @click="current=index">{{ index + '(' + label + ')' }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="comment-container">
|
||||||
|
<view v-for="(item, index) in evalueList" :key="index" class="itme">
|
||||||
|
<comment :reply="true" :content="item"></comment>
|
||||||
|
</view>
|
||||||
|
<u-empty text="暂无评论" mode="list" v-if="!evalueList.length" margin-top="120" color="#333"></u-empty>
|
||||||
|
</view>
|
||||||
|
<!-- 加载更多 -->
|
||||||
|
<u-loadmore :status="loadStatus" bgColor="#EEEBEE" margin-top="20" margin-bottom="20" v-if="evalueList.length >= 12"></u-loadmore>
|
||||||
|
</scroll-view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import comment from "@/components/comment/index";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
id: Number,
|
||||||
|
current: '全部',
|
||||||
|
page: 0,
|
||||||
|
evalueList: [],
|
||||||
|
evaluateSpec: {},
|
||||||
|
loadStatus: 'loadmore',
|
||||||
|
timer: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
comment
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.id = option.id;
|
||||||
|
// this.getAllEvalue();
|
||||||
|
this.getEvaluateSpec();
|
||||||
|
},
|
||||||
|
onNavigationBarButtonTap(e) {
|
||||||
|
if(e.index == 0) this.$u.route('/pageC/cart/index');
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
current(value) {
|
||||||
|
this.page = 0;
|
||||||
|
this.getAllEvalue({ type: value });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
loadMore() {
|
||||||
|
if(this.evalueList.length < 12) return false;
|
||||||
|
if(!this.timer) return false;
|
||||||
|
this.loadStatus = "loading";
|
||||||
|
this.page++;
|
||||||
|
this.getAllEvalue({ type: this.current, load: 'more' }).then(length => {
|
||||||
|
if(length == 0) {
|
||||||
|
this.page--;
|
||||||
|
this.loadStatus = 'nomore';
|
||||||
|
} else {
|
||||||
|
this.loadStatus = 'loading';
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadStatus = "nomore";
|
||||||
|
this.page--;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getEvaluateSpec() {
|
||||||
|
this.$u.api.getEvaluateSpec({
|
||||||
|
id: this.id,
|
||||||
|
}).then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.evaluateSpec = res.data;
|
||||||
|
this.getAllEvalue();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async getAllEvalue({ type, load } = {}) {
|
||||||
|
let params = {
|
||||||
|
goods_id: this.id,
|
||||||
|
page: this.page,
|
||||||
|
}
|
||||||
|
if(type) Object.assign(params, { type: type });
|
||||||
|
const res = await this.$u.api.getAllEvalue(params);
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
if(load) this.evalueList.push(...res.data);
|
||||||
|
else this.evalueList = res.data;
|
||||||
|
} else {
|
||||||
|
this.evalueList = [];
|
||||||
|
}
|
||||||
|
return res.data.length;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.comment {
|
||||||
|
height: calc(100vh - var(--window-top));
|
||||||
|
background-color: #EEEBEE;
|
||||||
|
padding-bottom: 30rpx;
|
||||||
|
.label-list {
|
||||||
|
padding: 30rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
margin-bottom: 14rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
> view {
|
||||||
|
box-sizing: content-box;
|
||||||
|
padding: 16rpx 20rpx;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
margin: 0 20rpx 20rpx 0;
|
||||||
|
background: rgba(236,236,236,1);
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: rgba(153,153,153,1);
|
||||||
|
}
|
||||||
|
.active {
|
||||||
|
background: rgba(255,120,15,1);
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.comment-container {
|
||||||
|
.itme {
|
||||||
|
padding: 30rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,27 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="userinfo">
|
<view class="userinfo">
|
||||||
|
|
||||||
<view class="user">
|
<view class="user">
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<image></image>
|
<view class="avatar">
|
||||||
<view>
|
<image :src="item.member_avatar"></image>
|
||||||
<text>达人昵称</text>
|
|
||||||
<text>关注数量</text>
|
|
||||||
</view>
|
</view>
|
||||||
|
<view class="box">
|
||||||
|
<view class="name">{{ item.member_nickname }}</view>
|
||||||
|
<view class="num">
|
||||||
|
<text>粉丝数:{{ item.fans_num }}</text>
|
||||||
|
<text>评论数:{{ item.comment_num }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="guanzhu">关注</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="profile">个性签名</view>
|
</view>
|
||||||
|
<view class="btn" :class="[ is_follow ? 'btn-follow' : 'btn-unfollow' ]" @click="following">{{ is_follow ? "已关注" : "关注" }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="profile" :class="{'u-line-2': is_open }" @click="openPro">
|
||||||
|
个性签名:{{ item.recommend ? item.recommend : "对方很懒没有留下任何东西~~" }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
image{
|
|
||||||
background-color: #0f0;
|
|
||||||
}
|
|
||||||
.userinfo{
|
.userinfo{
|
||||||
height: 261rpx;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
// height: 261rpx;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
.user{
|
.user{
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -31,53 +33,92 @@ image{
|
|||||||
.info{
|
.info{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
>image{
|
.avatar {
|
||||||
|
&>image{
|
||||||
width: 140rpx;
|
width: 140rpx;
|
||||||
height: 140rpx;
|
height: 140rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|
||||||
}
|
}
|
||||||
>view{
|
}
|
||||||
margin-left: 40rpx;
|
.box {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 79rpx;
|
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
>text:first-child{
|
height: 79rpx;
|
||||||
|
margin-left: 40rpx;
|
||||||
|
color: #333;
|
||||||
|
.name {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color:#333;
|
|
||||||
}
|
}
|
||||||
>text:last-child{
|
.num {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #333;
|
& > :first-child {
|
||||||
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.guanzhu{
|
}
|
||||||
|
.btn{
|
||||||
width: 140rpx;
|
width: 140rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color:#fff;
|
|
||||||
line-height: 60rpx;
|
line-height: 60rpx;
|
||||||
border-radius: 30rpx;
|
|
||||||
background-color: #FF780F;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
color:#fff;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
}
|
||||||
|
.btn-follow {
|
||||||
|
background-color: #007AFF;
|
||||||
|
}
|
||||||
|
.btn-unfollow {
|
||||||
|
background-color: #FF780F;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.profile{
|
.profile{
|
||||||
margin-top: 19rpx;
|
margin-top: 20rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-left: 14rpx;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name:"userinfo",
|
name:"userinfo",
|
||||||
|
props: ["list"],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
|
item: {},
|
||||||
|
is_open: true,
|
||||||
|
is_follow: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
list(newVal, old) {
|
||||||
|
// console.log(newVal);
|
||||||
|
this.item = newVal;
|
||||||
|
this.is_follow = newVal.is_attention;
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 打开个性
|
||||||
|
openPro() {
|
||||||
|
this.is_open = !this.is_open;
|
||||||
|
},
|
||||||
|
// 关注
|
||||||
|
following() {
|
||||||
|
this.$u.api.attentionMember({
|
||||||
|
member_id: this.item.member_id
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.is_follow = !this.is_follow;
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="tloos">
|
<!-- 普通商品 tool -->
|
||||||
|
<view class="tloos" v-if="type == 1">
|
||||||
<view class="navs">
|
<view class="navs">
|
||||||
<image src="/static/image/common/18.png"></image>
|
<image src="/static/image/common/18.png"></image>
|
||||||
店铺
|
店铺
|
||||||
@@ -13,6 +14,28 @@
|
|||||||
<view class="button" style="background:rgba(253,211,96,1);" @click="buy(2)">加入购物车</view>
|
<view class="button" style="background:rgba(253,211,96,1);" @click="buy(2)">加入购物车</view>
|
||||||
<view class="button" style="background:rgba(255,120,15,1);" @click="buy(1)">立即购买</view>
|
<view class="button" style="background:rgba(255,120,15,1);" @click="buy(1)">立即购买</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 拼团 tool -->
|
||||||
|
<view class="group-tool" v-if="type==2">
|
||||||
|
<view class="launch" @click="settlementOrder">发起拼团</view>
|
||||||
|
<view class="involvement" @click="showGroupUser=true">参与拼团</view>
|
||||||
|
</view>
|
||||||
|
<!-- 秒杀 tool -->
|
||||||
|
<view class="spike-tool" v-if="type==3">
|
||||||
|
<view class="left">
|
||||||
|
<view>
|
||||||
|
<image src="/static/image/common/18.png"></image>
|
||||||
|
<text>店铺</text>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<image src="/static/image/common/19.png"></image>
|
||||||
|
<text>客服</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="btn" v-if="groupbuyInfo.groupbuy_state == 20 && groupbuyInfo.inventory > groupbuyInfo.groupbuy_buy_quantity" @click="spikeGoods">立即秒杀</view>
|
||||||
|
<view class="btn" :class="{'cannot': groupbuyInfo.groupbuy_state == 32 || groupbuyInfo.inventory == groupbuyInfo.groupbuy_buy_quantity}" v-else>
|
||||||
|
{{ groupbuyInfo.groupbuy_state == 32 ? '时间已结束' : (groupbuyInfo.inventory > groupbuyInfo.groupbuy_buy_quantity ? '立即秒杀' : '已售空') }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<u-popup v-model="show" mode="bottom">
|
<u-popup v-model="show" mode="bottom">
|
||||||
<scroll-view scroll-y="true" class="popup">
|
<scroll-view scroll-y="true" class="popup">
|
||||||
<view>
|
<view>
|
||||||
@@ -40,9 +63,9 @@
|
|||||||
import guige from "./guige"
|
import guige from "./guige"
|
||||||
export default {
|
export default {
|
||||||
name:"tloos",
|
name:"tloos",
|
||||||
props: ['id', 'info'],
|
props: ['id', 'info', 'type'],
|
||||||
components:{
|
components:{
|
||||||
guige
|
guige,
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
@@ -107,6 +130,69 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.group-tool {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 98rpx;
|
||||||
|
display: flex;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: rgba(255,255,255,1);
|
||||||
|
z-index: 99;
|
||||||
|
.launch {
|
||||||
|
flex: 1;
|
||||||
|
background: rgba(253,211,96,1);
|
||||||
|
line-height: 98rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.involvement {
|
||||||
|
flex: 1;
|
||||||
|
background: rgba(255,120,15,1);
|
||||||
|
line-height: 98rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.spike-tool {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 98rpx;
|
||||||
|
display: flex;
|
||||||
|
z-index: 99;
|
||||||
|
.left {
|
||||||
|
width: 190rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
> view {
|
||||||
|
text-align: center;
|
||||||
|
> image {
|
||||||
|
width: 35rpx;
|
||||||
|
height: 35rpx;
|
||||||
|
margin-bottom: 15rpx;
|
||||||
|
}
|
||||||
|
> text {
|
||||||
|
display: block;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: rgba(102,102,102,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
flex: 1;
|
||||||
|
height: 98rpx;
|
||||||
|
line-height: 98rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: rgba(255,255,255,1);
|
||||||
|
background: rgba(255,120,15,1);
|
||||||
|
}
|
||||||
|
.cannot {
|
||||||
|
background: rgba(221,221,221,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
.tloos{
|
.tloos{
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -2,10 +2,17 @@
|
|||||||
<u-popup v-model="show" mode="bottom" length="782" border-radius="20">
|
<u-popup v-model="show" mode="bottom" length="782" border-radius="20">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<text>全部商品</text>
|
<text>全部商品</text>
|
||||||
<image></image>
|
<u-icon name="close" color="#999999" :size="30" @click="toggerList"></u-icon>
|
||||||
|
</view>
|
||||||
|
<scroll-view :scroll-y="true" class="scroll-box">
|
||||||
|
<view v-for="(item,index) in cartList" :key="index" class="item">
|
||||||
|
<image :src="item.goods_image" mode="aspectFill"></image>
|
||||||
|
<view>
|
||||||
|
<text class="title">{{ item.goods_advword }}</text>
|
||||||
|
<text class="name">{{ item.goods_name }}{{ item.goods_name }}{{ item.goods_name }}{{ item.goods_name }}{{ item.goods_name }}</text>
|
||||||
|
<text class="price">{{ item.goods_promotion_price }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view :scroll-y="true" style="padding:0 30rpx;height:692rpx">
|
|
||||||
<sitem v-for="i in 10"></sitem>
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
</template>
|
</template>
|
||||||
@@ -13,20 +20,24 @@
|
|||||||
import sitem from "./item"
|
import sitem from "./item"
|
||||||
export default {
|
export default {
|
||||||
name:'shoplist',
|
name:'shoplist',
|
||||||
|
props: ['list'],
|
||||||
components:{
|
components:{
|
||||||
sitem
|
sitem
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
show: true
|
show: true,
|
||||||
|
cartList: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toggerList() {
|
||||||
|
this.show = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
image{
|
|
||||||
background-color: #0f0;
|
|
||||||
}
|
|
||||||
.top{
|
.top{
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -39,9 +50,41 @@ image{
|
|||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
>image{
|
}
|
||||||
width: 33rpx;
|
.scroll-box {
|
||||||
height: 33rpx;
|
.item {
|
||||||
|
display: flex;
|
||||||
|
padding: 20rpx;
|
||||||
|
border-bottom: 1px solid #ECECEC;
|
||||||
|
& > image {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 160rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
margin-right: 14rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
& > view {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
color: #333;
|
||||||
|
font-size: 28rpx;
|
||||||
|
.title {
|
||||||
|
}
|
||||||
|
.name {
|
||||||
|
width: 500rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
}
|
||||||
|
.price {
|
||||||
|
color: #FF3131;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,51 +1,89 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="shopone">
|
|
||||||
<image></image>
|
|
||||||
<view>
|
<view>
|
||||||
<text>sadas</text>
|
<u-popup v-model="is_comment" mode="bottom" border-radius="10" height="700rpx">
|
||||||
<text>dasadas</text>
|
<view class="top">
|
||||||
<text>dsadas</text>
|
<text>评论</text>
|
||||||
|
<u-icon name="arrow-down" color="#333" size="28" @click="close"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
|
<scroll-view class="scroll-box" scroll-y="true" >
|
||||||
|
<view></view>
|
||||||
|
</scroll-view>
|
||||||
|
<view class="editing">
|
||||||
|
<input type="text" value="" />
|
||||||
|
<text>发送</text>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "shopone",
|
||||||
|
props: ['comment'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
is_comment: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onReady() {
|
||||||
|
this.getComment(); // 获取评论
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
comment(newValue,old) {
|
||||||
|
console.log(newValue,old);
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getComment() {
|
||||||
|
this.$u.post("Specialci/getAllEvalue", {
|
||||||
|
goods_id: goods_id,
|
||||||
|
page: 1
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.is_comment = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
image{
|
.top {
|
||||||
background-color: #0f0;
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 88rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
|
background-color: #ECECEC;
|
||||||
|
& > text {
|
||||||
|
margin-right: 280rpx;
|
||||||
|
color: #333;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.shopone{
|
|
||||||
width: 442rpx;
|
|
||||||
height: 200rpx;
|
|
||||||
background:rgba(0,0,0,0.4);
|
|
||||||
padding: 20rpx;
|
|
||||||
display: flex;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
>image{
|
|
||||||
width: 160rpx;
|
|
||||||
height: 160rpx;
|
|
||||||
}
|
}
|
||||||
>view{
|
.scroll-box {
|
||||||
margin-left: 20rpx;
|
margin: 88rpx 0 100rpx 0;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.editing {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
>text{
|
width: 100%;
|
||||||
font-size: 24rpx;
|
height: 90rpx;
|
||||||
color: #fff;
|
padding: 0 30rpx;
|
||||||
line-height: 36rpx;
|
background-color: #ECECEC;
|
||||||
}
|
& > input {
|
||||||
>text:first-child{
|
width: 80%;
|
||||||
font-size: 28rpx;
|
height: 60rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
}
|
border-radius: 30rpx;
|
||||||
>text:last-child{
|
background-color: #fff;
|
||||||
font-size: 28rpx;
|
|
||||||
color: #FF3131;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name:"shopone"
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,30 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="userinfo">
|
<view class="userinfo">
|
||||||
<view class="userhead">
|
<view class="userhead">
|
||||||
<image :src="list.member_avatar"></image>
|
<image :src="item.member_avatar"></image>
|
||||||
<text>+</text>
|
<text class="follow" v-if="!is_follow" @click="following(item.member_id)">+</text>
|
||||||
|
<u-icon v-else name="checkmark" color="#ffffff" :size="28" class="follow" @click="following(item.member_id)"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="zan">
|
<!-- 点赞 -->
|
||||||
<image></image>
|
<view class="operat zan">
|
||||||
<text>{{list.like_num}}</text>
|
<u-icon name="thumb-up-fill" :color=" is_like ? '#FF7807' : '#ffffff' " :size="50" @click="likeType(item.article_id)"></u-icon>
|
||||||
|
<text>{{item.like_num}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="shoucang">
|
<!-- 收藏 -->
|
||||||
<image></image>
|
<view class="operat shoucang">
|
||||||
<text>{{list.collect_num}}</text>
|
<u-icon name="star-fill" :color=" is_collect ? '#FF7807' : '#ffffff' " :size="50" @click="collecting(item.article_id)"></u-icon>
|
||||||
|
<text>{{item.collect_num}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="pinglun">
|
<!-- 评论 -->
|
||||||
<image></image>
|
<view class="operat pinglun">
|
||||||
<text>{{list.comment_num}}</text>
|
<u-icon name="more-circle-fill" :color=" is_content ? '#FF7807' : '#ffffff' " :size="50" @click="editing()"></u-icon>
|
||||||
|
<text>{{item.comment_num}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="gouwu">
|
<!-- 购物车 -->
|
||||||
<image></image>
|
<view class="operat gouwu">
|
||||||
|
<u-icon name="shopping-cart-fill" :color=" is_cart ? '#FF7807' : '#ffffff' " :size="50" @click="carting()"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
image{
|
|
||||||
background-color: #0f0;
|
|
||||||
}
|
|
||||||
.userinfo{
|
.userinfo{
|
||||||
width: 110rpx;
|
width: 110rpx;
|
||||||
height: 570rpx;
|
height: 570rpx;
|
||||||
@@ -32,41 +34,39 @@ image{
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
>view{
|
.userhead{
|
||||||
display: flex;
|
position: relative;
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #fff;
|
|
||||||
>text{
|
|
||||||
margin-top: 17rpx;
|
|
||||||
}
|
|
||||||
>image{
|
|
||||||
width: 50rpx;
|
|
||||||
height: 50rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
>view:first-child{
|
|
||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
>image{
|
&>image{
|
||||||
width: 110rpx;
|
width: 110rpx;
|
||||||
height: 110rpx;
|
height: 110rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border: 2rpx solid #fff;
|
border: 2rpx solid #fff;
|
||||||
|
|
||||||
}
|
}
|
||||||
>text{
|
.follow {
|
||||||
|
position: absolute;
|
||||||
|
top: 90rpx;
|
||||||
|
left: 35%;
|
||||||
width: 36rpx;
|
width: 36rpx;
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
font-size: 36rpx;
|
|
||||||
background-color: #FF780F;
|
|
||||||
position: absolute;
|
|
||||||
top: 75rpx;
|
|
||||||
border-radius: 50%;
|
|
||||||
line-height: 36rpx;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
line-height: 36rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
color: #fff;
|
||||||
|
background-color: #FF780F;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.operat {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
& > text {
|
||||||
|
margin-top: 10rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -74,11 +74,82 @@ image{
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name:'userinfo',
|
name:'userinfo',
|
||||||
|
props:['list','cart','comment'],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
|
is_follow: this.list.is_attention || false,
|
||||||
|
is_like: this.list.is_like || false,
|
||||||
|
is_collect: this.list.is_collect || false,
|
||||||
|
is_content: false,
|
||||||
|
is_cart: false,
|
||||||
|
item: this.list || {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props:['list']
|
watch: {
|
||||||
|
list(newValue,old) {
|
||||||
|
// console.log(newValue,old);
|
||||||
|
this.item = newValue || {};
|
||||||
|
this.is_follow = this.list.is_attention || false;
|
||||||
|
this.is_like = this.list.is_like || false;
|
||||||
|
this.is_collect = this.list.is_collect || false;
|
||||||
|
},
|
||||||
|
cart(newValue,old) {
|
||||||
|
// console.log(newValue,old);
|
||||||
|
this.is_cart = newValue;
|
||||||
|
},
|
||||||
|
comment(newValue,old) {
|
||||||
|
// console.log(newValue,old);
|
||||||
|
this.is_content = newValue;
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 关注
|
||||||
|
following(id) {
|
||||||
|
this.is_follow = !this.is_follow;
|
||||||
|
this.$u.api.attentionMember({member_id: id}).then(res => {
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 点赞
|
||||||
|
likeType(id) {
|
||||||
|
// console.log(id);
|
||||||
|
this.is_like = !this.is_like;
|
||||||
|
this.$u.post("article/articleLike",{article_id: id}).then(res => {
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
// console.log(res);
|
||||||
|
this.list.like_num = res.data.num;
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 收藏
|
||||||
|
collecting(id) {
|
||||||
|
this.is_collect = !this.is_collect;
|
||||||
|
this.$u.post("article/articleCollect",{article_id: id}).then(res => {
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
// console.log(res);
|
||||||
|
this.list.collect_num = res.data.num;
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 评论
|
||||||
|
editing() {
|
||||||
|
this.is_content = !this.is_content;
|
||||||
|
// console.log(this.is_content);
|
||||||
|
this.$emit("openCart",{ comment: this.is_content, cart: this.is_cart});
|
||||||
|
},
|
||||||
|
// 购物车
|
||||||
|
carting() {
|
||||||
|
this.is_cart = !this.is_cart;
|
||||||
|
// console.log(this.is_cart);
|
||||||
|
this.$emit("openCart",{ comment: this.is_content, cart: this.is_cart});
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="details">
|
<view class="details">
|
||||||
<view style="border-top: 1rpx solid #ececec;"></view>
|
<view style="border-top: 1rpx solid #ececec;"></view>
|
||||||
<userinfo></userinfo>
|
<userinfo :list="userInfo"></userinfo>
|
||||||
<view style="border-top: 20rpx solid #ececec;"></view>
|
<view style="border-top: 20rpx solid #ececec;"></view>
|
||||||
<u-tabs :is-scroll="false" bar-width="70" ref="tabs" :list="list" :current="num" :bar-style="{
|
<u-tabs :is-scroll="false" bar-width="70" ref="tabs" :list="list" :current="num" :bar-style="{
|
||||||
'background-color':'#FF780F',
|
'background-color':'#FF780F',
|
||||||
@@ -13,39 +13,15 @@
|
|||||||
}"
|
}"
|
||||||
:bold="false"
|
:bold="false"
|
||||||
@change="dianji"
|
@change="dianji"
|
||||||
:show-bar="false"></u-tabs>
|
:show-bar="false">
|
||||||
<swiper class="card" @change="dianji" :current="num">
|
</u-tabs>
|
||||||
<swiper-item>
|
<scroll-view class="scroll-box" scroll-y="true">
|
||||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view class="list">
|
<videoItem v-for="item in listInfo" :key="item.article_id" :item="item"
|
||||||
<view >
|
@getArticlelist="getArticlelist"></videoItem>
|
||||||
<videoItem v-for="item in 10"></videoItem>
|
<view class="no-data" v-show="!listInfo && !page">暂无数据</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-left:20rpx">
|
|
||||||
<videoItem v-for="item in 10"></videoItem>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
|
||||||
<swiper-item>
|
|
||||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
|
||||||
<view class="box">
|
|
||||||
<view class="list">
|
|
||||||
<view >
|
|
||||||
<zhiboItem v-for="item in 10"></zhiboItem>
|
|
||||||
</view>
|
|
||||||
<view style="margin-left:20rpx">
|
|
||||||
<zhiboItem v-for="item in 10"></zhiboItem>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</scroll-view>
|
|
||||||
</swiper-item>
|
|
||||||
</swiper>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -61,39 +37,85 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.scroll-box {
|
||||||
|
// display: flex;
|
||||||
|
padding: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.box {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
.no-data {
|
||||||
|
margin: 100rpx auto 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import videoItem from "@/components/index/video-item/index"
|
|
||||||
import zhiboItem from "@/components/index/zhibo-item/index"
|
|
||||||
import userinfo from "../components/details/userinfo"
|
import userinfo from "../components/details/userinfo"
|
||||||
|
import videoItem from "@/components/index/video-item/index"
|
||||||
export default {
|
export default {
|
||||||
name:"details",
|
// name:"details",
|
||||||
components:{
|
components:{
|
||||||
userinfo,
|
userinfo,
|
||||||
videoItem,
|
videoItem
|
||||||
zhiboItem
|
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
list:[
|
list:[
|
||||||
{
|
{
|
||||||
name: '短视频'
|
|
||||||
}, {
|
|
||||||
name: '图文'
|
name: '图文'
|
||||||
|
}, {
|
||||||
|
name: '短视频'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
num:0
|
num: 0,
|
||||||
|
userInfo: {}, // 用户信息
|
||||||
|
listInfo: [], // 列表详情
|
||||||
|
member_id: 0,
|
||||||
|
page: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
// console.log(option);
|
||||||
|
this.member_id = option.id;
|
||||||
|
this.getUserInfo(option.id);
|
||||||
|
this.getArticlelist();
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
// 获取信息
|
||||||
|
getUserInfo(id) {
|
||||||
|
this.$u.post("MemberExpert/expertInfo",{member_id: id}).then(res => {
|
||||||
|
// console.log(res);
|
||||||
|
this.userInfo = res.data.info;
|
||||||
|
// console.log(this.userInfo);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取列表
|
||||||
|
getArticlelist() {
|
||||||
|
this.$u.api.getArticlelist({
|
||||||
|
page: this.page,
|
||||||
|
is_video_img: this.num + 1,
|
||||||
|
member_id: this.member_id,
|
||||||
|
}).then(res => {
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
// console.log(res);
|
||||||
|
this.listInfo = res.data.list;
|
||||||
|
console.log(this.listInfo);
|
||||||
|
} else {
|
||||||
|
console.log(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
dianji(a){
|
dianji(a){
|
||||||
console.log(a)
|
console.log(a);
|
||||||
if(typeof a == "object"){
|
if(typeof a == "object"){
|
||||||
this.num = a.detail.current
|
this.num = a.detail.current
|
||||||
}else{
|
}else{
|
||||||
this.num = a
|
this.num = a
|
||||||
}
|
}
|
||||||
|
this.getArticlelist();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,72 +1,130 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="photo">
|
<view class="photo">
|
||||||
|
<view class="status_bar"></view>
|
||||||
<view class="back">
|
<view class="back">
|
||||||
<image></image>
|
<u-icon name="close" color="#999999" :size="30" @click="goBack"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<swiper class="swiper">
|
<swiper class="swiper" circular autoplay @change="changeSwiper">
|
||||||
<swiper-item>
|
<swiper-item v-for="(simg,sindex) in list.photo" :key="sindex">
|
||||||
<image :src="list.article_pic"></image>
|
<image :src="simg.url" mode="widthFix" @tap="viewImage" :data-url="simg.url"></image>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
<!-- <swiper-item>
|
|
||||||
<image></image>
|
|
||||||
</swiper-item> -->
|
|
||||||
|
|
||||||
</swiper>
|
</swiper>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<view class="item">
|
<view class="item" :style="{ width: photo_len * 20 + 100 + 'rpx' }">
|
||||||
<text>图片</text>
|
<text>图片</text>
|
||||||
<view v-for="(item,index) in 4" :key="index" :style="{'background-color':index == 2 ? '#fff' : '#ede8e8'}"></view>
|
<view v-for="(item,index) in list.photo" :key="index" :style="{'background-color':index == swiper_id ? '#fff' : '#ede8e8'}"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="username">自己黑的哈万岁哦划u将</view>
|
<view class="username">@{{ list.member_nickname }}</view>
|
||||||
<view class="title">hasjdhajskhj</view>
|
<view class="title">{{ list.article_title }}</view>
|
||||||
<view class="info u-line-2">asdjhasjdkasljdklasjkl</view>
|
<view class="info">{{ list.article_content }}</view>
|
||||||
|
<view class="box">
|
||||||
|
<view class="label" v-for="(label,id) in list.label" :key="id">{{ label.name }}</view>
|
||||||
</view>
|
</view>
|
||||||
<userinfo class="userinfo" :list="list"></userinfo>
|
</view>
|
||||||
<shpoone class="shpoone"></shpoone>
|
<!-- 用户操作 -->
|
||||||
<shoplist></shoplist>
|
<userinfo class="userinfo" :list="list" :cart="cart_type" :comment="is_comment" @openCart="openPopup"></userinfo>
|
||||||
|
<!-- 评论 -->
|
||||||
|
<u-popup v-model="is_comment" class="pl" mode="bottom" border-radius="10" height="700rpx">
|
||||||
|
<view class="top">
|
||||||
|
<text>评论</text>
|
||||||
|
<u-icon name="arrow-down" color="#333" size="28" @click="is_comment=false"></u-icon>
|
||||||
|
</view>
|
||||||
|
<scroll-view class="scroll-box" scroll-y="true" @scrolltolower="scrollBottom">
|
||||||
|
<block v-for="(item,index) in commentList" :key="index" v-if="commentList.length">
|
||||||
|
<view class="box">
|
||||||
|
<image :src="item.member_avatar" mode="aspectFill"></image>
|
||||||
|
<view class="info">
|
||||||
|
<text>{{ item.member_nickname }}</text>
|
||||||
|
<text class="time">{{ item.create_time }}</text>
|
||||||
|
</view>
|
||||||
|
<text class="reply" @click="openKeyInput(item,index)">回复</text>
|
||||||
|
</view>
|
||||||
|
<view class="content">
|
||||||
|
{{ item.content }}
|
||||||
|
</view>
|
||||||
|
<view class="child-content">
|
||||||
|
<view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<!-- <view class="more-reply" v-if="item.reply_count">展开更多回复<u-icon name="arrow-down"></u-icon></view> -->
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<view class="no-data" v-else>111</view>
|
||||||
|
</scroll-view>
|
||||||
|
<view class="editing" @click="openKeyInput">
|
||||||
|
<input type="text" value="" :placeholder="edit_text" disabled="disabled" />
|
||||||
|
<text>发送</text>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
<!-- 评论box -->
|
||||||
|
<u-popup v-model="is_edit" mode="bottom" border-radius="10" height="100rpx">
|
||||||
|
<view class="edit-box">
|
||||||
|
<input type="text" :placeholder="edit_text_other" :focus="is_focus" @focus="focus" v-model="send_value" autofocus>
|
||||||
|
<text @click="sendComment">发送</text>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
<!-- 购物车 -->
|
||||||
|
<u-popup v-if="cart_len > 1" class="cart" v-model="cart_type" mode="bottom" length="782" border-radius="20">
|
||||||
|
<view class="top">
|
||||||
|
<text>全部商品</text>
|
||||||
|
<u-icon name="close" color="#999999" :size="30" @click="cart_type = false"></u-icon>
|
||||||
|
</view>
|
||||||
|
<scroll-view :scroll-y="true" class="scroll-box">
|
||||||
|
<view v-for="(item,index) in list.goods" :key="index" class="item" @click="gotoInfo(item.goods_id)">
|
||||||
|
<image :src="item.goods_image" mode="aspectFill"></image>
|
||||||
|
<view>
|
||||||
|
<text class="title">{{ item.goods_advword }}</text>
|
||||||
|
<text class="name">{{ item.goods_name }}</text>
|
||||||
|
<text class="price">{{ item.goods_promotion_price }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</u-popup>
|
||||||
|
<!-- 单个 -->
|
||||||
|
<view class="good-one" v-else v-show="cart_type">
|
||||||
|
<view class="box" v-for="(item,index) in list.goods" :key="index" @click="gotoInfo(item.goods_id)">
|
||||||
|
<image :src="item.goods_image" mode="aspectFill"></image>
|
||||||
|
<view>
|
||||||
|
<view class="title u-line-1">{{ item.goods_advword }}</view>
|
||||||
|
<view class="content u-line-2">{{ item.goods_name }}</view>
|
||||||
|
<view class="price">¥{{ item.goods_promotion_price }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <shoplist :list="list.goods" v-show="list.goods.length > 1 && cart_type" @hideCart="hideCart"></shoplist> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.photo{
|
.photo{
|
||||||
height: 100vh;
|
|
||||||
background-color: #ececec;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: #000000;
|
||||||
.back{
|
.back{
|
||||||
padding-top: 28rpx;
|
padding-top: 28rpx;
|
||||||
padding-right: 31rpx;
|
padding-right: 31rpx;
|
||||||
>image{
|
text-align: right;
|
||||||
width: 31rpx;
|
|
||||||
height: 31rpx;
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.swiper{
|
.swiper{
|
||||||
width: 100%;
|
width: 750rpx;
|
||||||
height: 702rpx;
|
height: 700rpx;
|
||||||
margin-top: 102rpx;
|
margin-top: 140rpx;
|
||||||
image{
|
image{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.bottom{
|
.bottom{
|
||||||
width: 100%;
|
margin-top: 180rpx;
|
||||||
height: 270rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: flex-start;
|
|
||||||
padding: 20rpx 30rpx;
|
padding: 20rpx 30rpx;
|
||||||
|
background-color: #fff;
|
||||||
.item{
|
.item{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
padding: 8rpx 16rpx;
|
padding: 8rpx 16rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: #999;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
|
background:rgba(153,153,153,.5);
|
||||||
>view{
|
>view{
|
||||||
width: 12rpx;
|
width: 12rpx;
|
||||||
height: 12rpx;
|
height: 12rpx;
|
||||||
@@ -75,68 +133,384 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.username{
|
.username{
|
||||||
|
margin: 20rpx 0;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-top: 20rpx;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.title{
|
.title{
|
||||||
font-size: 26rpx;
|
font-size: 28rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-top: 23rpx;
|
line-height: 46rpx;
|
||||||
}
|
}
|
||||||
.info{
|
.info{
|
||||||
|
margin: 20rpx 0;
|
||||||
|
line-height: 1.2;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
line-height: 42rpx;
|
}
|
||||||
margin-top: 20rpx;
|
.box {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
.label {
|
||||||
|
padding: 6rpx 10rpx;
|
||||||
|
margin: 0 10rpx 10rpx 0;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
background-color: #000000;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.userinfo{
|
.userinfo{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
right: 30rpx;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-285rpx);
|
transform: translateY(-285rpx);
|
||||||
right: 30rpx;
|
|
||||||
}
|
}
|
||||||
.shpoone{
|
.pl {
|
||||||
position: absolute;
|
.top {
|
||||||
top: 50%;
|
z-index: 1000;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 88rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
|
background-color: #ECECEC;
|
||||||
|
& > text {
|
||||||
|
margin-right: 280rpx;
|
||||||
|
color: #333;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.scroll-box {
|
||||||
|
z-index: 99;
|
||||||
|
margin: 88rpx 0 150rpx 0;
|
||||||
|
height: 100%;
|
||||||
|
.box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 20rpx;
|
||||||
|
& > image {
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
.info {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 60rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #333;
|
||||||
|
.time {
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.reply {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
padding: 0 20rpx 10rpx 90rpx;
|
||||||
|
}
|
||||||
|
.child-content {
|
||||||
|
margin: 6rpx 90rpx 6rpx;
|
||||||
|
.more-reply {
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.no-data {
|
||||||
|
margin-top: 100rpx;
|
||||||
|
}
|
||||||
|
.editing {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
height: 88rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
border-top: 1px solid #ececec;
|
||||||
|
background-color: #fff;
|
||||||
|
& > input {
|
||||||
|
width: 80%;
|
||||||
|
height: 50rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 弹出输入框
|
||||||
|
.edit-box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 90rpx;
|
||||||
|
& > input {
|
||||||
|
width: 80%;
|
||||||
|
padding: 4rpx 20rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.cart {
|
||||||
|
.top{
|
||||||
|
z-index: 1000;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
height: 88rpx;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
border-bottom: 1rpx solid #ececec;
|
||||||
|
background-color: #fff;
|
||||||
|
>text{
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.scroll-box {
|
||||||
|
margin-top: 88rpx;
|
||||||
|
.item {
|
||||||
|
display: flex;
|
||||||
|
padding: 20rpx;
|
||||||
|
border-bottom: 1px solid #ECECEC;
|
||||||
|
& > image {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 160rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
margin-right: 14rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
& > view {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
color: #333;
|
||||||
|
font-size: 28rpx;
|
||||||
|
.title {
|
||||||
|
}
|
||||||
|
.name {
|
||||||
|
width: 500rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
}
|
||||||
|
.price {
|
||||||
|
color: #FF3131;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.good-one{
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
|
position: absolute;
|
||||||
right: 139rpx;
|
right: 139rpx;
|
||||||
|
top: 54%;
|
||||||
transform: translateY(100rpx);
|
transform: translateY(100rpx);
|
||||||
|
.box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 440rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
background-color: rgba(0,0,0,0.5);
|
||||||
|
& > image {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 160rpx;
|
||||||
|
height: 100%;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
& > view {
|
||||||
|
width: 200rpx;
|
||||||
|
}
|
||||||
|
.title {}
|
||||||
|
.content {
|
||||||
|
height: 60rpx;
|
||||||
|
margin: 10rpx 0;
|
||||||
|
line-height: 30rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
.price {
|
||||||
|
color: #FF3131;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import userinfo from "../components/userinfo/index"
|
import userinfo from "../components/userinfo/index" // 点赞组件
|
||||||
import shpoone from "../components/shpoone/index"
|
import contentBox from "../components/shpoone/index" // 评论
|
||||||
import shoplist from "../components/shoplist/index"
|
// import shoplist from "../components/shoplist/index" // 商品列表
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name:"photo",
|
name:"photo",
|
||||||
onLoad(e) {
|
|
||||||
console.log('dhdhdhdhd',e)
|
|
||||||
},
|
|
||||||
components:{
|
components:{
|
||||||
userinfo,
|
userinfo
|
||||||
shpoone,
|
|
||||||
shoplist
|
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
list:{}
|
list:{},
|
||||||
|
swiper_id: "",
|
||||||
|
page: 1, //
|
||||||
|
cart_type: false, // 显示购物车
|
||||||
|
is_comment: false, // 显示评论
|
||||||
|
is_focus: false, // 聚焦
|
||||||
|
is_edit: false, // 输入框
|
||||||
|
send_value: "", // 输入的值
|
||||||
|
cartList: [],
|
||||||
|
cart_len: 0,
|
||||||
|
photo_len: 0,
|
||||||
|
edit_text: "有爱评论,说点好听的 ~",
|
||||||
|
edit_text_other: "有爱评论,说点好听的 ~",
|
||||||
|
commentList: [], // 评论
|
||||||
|
allList: {}, // 全部子评论
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
onLoad(option){
|
||||||
|
this.article_id = option.id;
|
||||||
|
this.articleInfo(this.article_id);
|
||||||
|
},
|
||||||
|
// 监听返回按钮
|
||||||
|
onBackPress() {
|
||||||
|
if (this.cart_type) {
|
||||||
|
this.cart_type = !this.cart_type;
|
||||||
|
} else if (this.is_comment) {
|
||||||
|
this.is_comment = !this.is_comment;
|
||||||
|
} else if (this.is_edit) {
|
||||||
|
this.is_edit = !this.is_edit;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
// 发现详情
|
||||||
articleInfo(article_id){
|
articleInfo(article_id){
|
||||||
this.$u.api.articleInfo({article_id}).then((res)=>{
|
this.$u.api.articleInfo({article_id}).then((res)=>{
|
||||||
console.log(res)
|
this.list = res.data.info;
|
||||||
this.list = res.data.info
|
this.cart_len = res.data.info.goods.length;
|
||||||
|
this.photo_len = res.data.info.photo.length;
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
// 改变swiper
|
||||||
|
changeSwiper(e) {
|
||||||
|
// console.log(e.detail.current);
|
||||||
|
this.swiper_id = e.detail.current; // 储存swiper id
|
||||||
|
},
|
||||||
|
// 更改购物车状态
|
||||||
|
openPopup(data) {
|
||||||
|
// console.log(data);
|
||||||
|
this.cart_type = data.cart;
|
||||||
|
this.is_comment = data.comment;
|
||||||
|
if (this.is_comment) {
|
||||||
|
this.getComment(this.article_id,0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(o){
|
// 获取评论
|
||||||
this.id = o.id
|
getComment(id,page) {
|
||||||
this.articleInfo(this.id)
|
this.$u.post("article/articleCommentList",{
|
||||||
|
article_id: id,
|
||||||
|
page: page,
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.commentList = res.data;
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 打开评论输入
|
||||||
|
openKeyInput(data,index) {
|
||||||
|
console.log(data);
|
||||||
|
this.is_edit = true;
|
||||||
|
this.is_focus = true;
|
||||||
|
this.comment_id = index;
|
||||||
|
if (data.id) {
|
||||||
|
this.edit_text_other = "回复@" + data.member_nickname;
|
||||||
|
this.pid = data.id;
|
||||||
|
this.reply_id = data.member_id;
|
||||||
|
} else {
|
||||||
|
this.edit_text_other = "有爱评论,说点好听的 ~";
|
||||||
|
this.pid = "";
|
||||||
|
this.reply_id = "";
|
||||||
|
}
|
||||||
|
// console.log(this.pid, this.edit_text_other);
|
||||||
|
},
|
||||||
|
// 发布评论
|
||||||
|
sendComment() {
|
||||||
|
this.$u.post("article/articleAddComment",{
|
||||||
|
article_id: this.article_id,
|
||||||
|
content: this.send_value,
|
||||||
|
pid: this.pid,
|
||||||
|
reply_id: this.reply_id,
|
||||||
|
}).then(res => {
|
||||||
|
// console.log(res.data.data);
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.is_edit = false;
|
||||||
|
if (res.data.data.pid) {
|
||||||
|
this.commentList[this.comment_id].reply_count = true;
|
||||||
|
this.allList[this.comment_id].unshift(res.data.data);
|
||||||
|
} else {
|
||||||
|
this.commentList.unshift(res.data.data);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 预览图片
|
||||||
|
viewImage(e) {
|
||||||
|
let arr = [];
|
||||||
|
this.list.photo.forEach(item => {
|
||||||
|
arr.push(item.url);
|
||||||
|
})
|
||||||
|
uni.previewImage({
|
||||||
|
urls: arr,
|
||||||
|
current: e.currentTarget.dataset.url,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 评论滚动到底部
|
||||||
|
scrollBottom(e) {
|
||||||
|
console.log(e);
|
||||||
|
},
|
||||||
|
// 跳转到商品
|
||||||
|
gotoInfo(id) {
|
||||||
|
console.log(id);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pageB/sdetails/index?id=" + id + "&type=" + 1,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goBack() {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
})
|
||||||
|
},
|
||||||
|
focus() {
|
||||||
|
setTimeout(function(){
|
||||||
|
uni.showSoftKeybord;
|
||||||
|
}, 200)
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -9,14 +9,18 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="num">剩余数量{{ groupbuyInfo.inventory - groupbuyInfo.groupbuy_buy_quantity }}件</view>
|
<view class="num">剩余数量{{ groupbuyInfo.inventory - groupbuyInfo.groupbuy_buy_quantity }}件</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right" v-if="!isSpike">
|
||||||
<view class="title">秒杀倒计时</view>
|
<view class="title">秒杀倒计时</view>
|
||||||
<view class="time">{{ spikeTime }}</view>
|
<view class="time">{{ spikeTime }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="right" v-else>
|
||||||
|
<view class="title">时间已结束</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="title u-line-2">
|
<view class="title u-line-2">
|
||||||
<text>{{ goodsInfo.store_name }}</text>{{ goodsInfo.goods_name }}
|
<text class="store-name">{{ goodsInfo.store_name }}</text>
|
||||||
|
<text class="goods-name">{{ goodsInfo.goods_name }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="pic">
|
<view class="pic">
|
||||||
<text>¥{{ goodsInfo.goods_price }}</text>
|
<text>¥{{ goodsInfo.goods_price }}</text>
|
||||||
@@ -25,10 +29,20 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="hr"></view>
|
<view class="hr"></view>
|
||||||
<!-- <navs :value="领券"></navs> -->
|
<!-- <navs :value="领券"></navs> -->
|
||||||
<navs :value="'产品规格'"></navs>
|
<navs :value="'产品规格'" @click.native="showSpec=true"></navs>
|
||||||
<!-- <navs :value="'产品颜色'"></navs> -->
|
<!-- <navs :value="'产品颜色'"></navs> -->
|
||||||
<!-- <navs :value="'选择尺码'"></navs> -->
|
<!-- <navs :value="'选择尺码'"></navs> -->
|
||||||
<!-- <navs v-for="(value, index) in goodsInfo.spec_name" :value="value" :key="index"></navs> -->
|
<view class="comment">
|
||||||
|
<view class="title">
|
||||||
|
<view class="left">商品评价({{ evaluate.evaluate_num }})</view>
|
||||||
|
<view class="right" @click="viewComment">
|
||||||
|
<text>查看全部</text>
|
||||||
|
<image src="/static/image/common/1.png"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<comment :reply="false" :content="evaluate" v-if="evaluate.evaluate_num"></comment>
|
||||||
|
<view class="comment-none" v-else>暂无评价</view>
|
||||||
|
</view>
|
||||||
<view class="hr"></view>
|
<view class="hr"></view>
|
||||||
<view class="group-user" v-if="groupUser.length">
|
<view class="group-user" v-if="groupUser.length">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
@@ -39,7 +53,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<view class="left" @click="showGroupUser=true">
|
<view class="left" @click="showGroupUser=true" v-if="user_suc.length">
|
||||||
<view class="avatar">
|
<view class="avatar">
|
||||||
<image v-for="(user, i) in user_suc" :src="user[0].member_avatar" :key="i"></image>
|
<image v-for="(user, i) in user_suc" :src="user[0].member_avatar" :key="i"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -62,7 +76,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-popup v-model="showGroupUser" mode="center">
|
<u-popup v-model="showGroupUser" mode="center" z-index="10078">
|
||||||
<view class="launch-container">
|
<view class="launch-container">
|
||||||
<view class="title u-line-1">正在拼团</view>
|
<view class="title u-line-1">正在拼团</view>
|
||||||
<scroll-view class="launch-view">
|
<scroll-view class="launch-view">
|
||||||
@@ -71,6 +85,7 @@
|
|||||||
<image class="avatar" :src="user[0].member_avatar"></image>
|
<image class="avatar" :src="user[0].member_avatar"></image>
|
||||||
<view class="name u-line-1">{{ user[0].member_nickname }}</view>
|
<view class="name u-line-1">{{ user[0].member_nickname }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="pintuan-none" v-if="!groupUser.length">暂无拼团</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<image class="close" src="/static/image/common/17.png" @click="showGroupUser=false"></image>
|
<image class="close" src="/static/image/common/17.png" @click="showGroupUser=false"></image>
|
||||||
@@ -96,16 +111,51 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="rich">
|
<view class="rich">
|
||||||
<rich-text :nodes="goodsInfo.mobile_body"></rich-text>
|
<rich-text :nodes="goodsInfo.mobile_body"></rich-text>
|
||||||
|
</view>
|
||||||
|
<!-- 选择规格数量 -->
|
||||||
|
<u-popup v-model="showSpec" mode="bottom">
|
||||||
|
<scroll-view scroll-y="true" class="spec-popup">
|
||||||
|
<view>
|
||||||
|
<view class="head">
|
||||||
|
<image class="image" :src="goodsInfo.goods_image"></image>
|
||||||
|
<view class="info">
|
||||||
|
<text class="u-line-2">{{goodsInfo.goods_name}}</text>
|
||||||
|
<text>¥{{goodsInfo.goods_price}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<guige @sel="self" ref="guige" v-for="(item,index) in goodsInfo.spec_value" :key="index" :title="goodsInfo.spec_name[index]" :item="item"></guige>
|
||||||
|
<view class="num">
|
||||||
|
<text>购买数量</text>
|
||||||
|
<u-number-box v-model="goodsNumber" @change="valChange"></u-number-box>
|
||||||
|
</view>
|
||||||
|
<view style="height:100rpx"></view>
|
||||||
|
</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
</scroll-view>
|
||||||
|
</u-popup>
|
||||||
|
<!-- 普通商品 tool -->
|
||||||
|
<view class="tloos" v-if="type == 1">
|
||||||
|
<view class="navs" @click="toOthersPage('pageC/merchant/index?id=' + storeInfo.store_id)">
|
||||||
|
<image src="/static/image/common/18.png"></image>
|
||||||
|
店铺
|
||||||
|
</view>
|
||||||
|
<view class="navs" style="margin-right:30rpx">
|
||||||
|
<image src="/static/image/common/19.png"></image>
|
||||||
|
客服
|
||||||
|
</view>
|
||||||
|
<view class="button" style="background:rgba(253,211,96,0.6);" v-if="goodsInfo.goods_try == 1" @click="tryDress">试穿试送</view>
|
||||||
|
<view class="button" style="background:rgba(253,211,96,1);" @click="addCart">加入购物车</view>
|
||||||
|
<view class="button" style="background:rgba(255,120,15,1);" @click="settlementOrder">立即购买</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 拼团 tool -->
|
<!-- 拼团 tool -->
|
||||||
<view class="group-tool" v-if="type==2">
|
<view class="group-tool" v-if="type==2">
|
||||||
<view class="launch" @click="settlementOrder">发起拼团</view>
|
<view class="launch" @click="settlementOrder">发起拼团</view>
|
||||||
<view class="involvement" @click="showGroupUser=true">参与拼团</view>
|
<view class="involvement" @click="showGroupUser=true">参与拼团</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 秒杀 -->
|
<!-- 秒杀 tool -->
|
||||||
<view class="spike-tool" v-if="type==3">
|
<view class="spike-tool" v-if="type==3">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view>
|
<view @click="toOthersPage('pageC/merchant/index?id=' + storeInfo.store_id)">
|
||||||
<image src="/static/image/common/18.png"></image>
|
<image src="/static/image/common/18.png"></image>
|
||||||
<text>店铺</text>
|
<text>店铺</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -119,99 +169,93 @@
|
|||||||
{{ groupbuyInfo.groupbuy_state == 32 ? '时间已结束' : (groupbuyInfo.inventory > groupbuyInfo.groupbuy_buy_quantity ? '立即秒杀' : '已售空') }}
|
{{ groupbuyInfo.groupbuy_state == 32 ? '时间已结束' : (groupbuyInfo.inventory > groupbuyInfo.groupbuy_buy_quantity ? '立即秒杀' : '已售空') }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 普通商品 tool -->
|
<!-- <tloos @buy="buy" @xuanze="xuanze" :id="id" :info="goodsInfo" :type="type"></tloos> -->
|
||||||
<tloos @buy="buy" @xuanze="xuanze" :id="goodsInfo.goods_commonid" :info="goodsInfo" v-if="type==1"></tloos>
|
|
||||||
<u-toast ref="uToast" />
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
/*
|
import comment from "@/components/comment/index";
|
||||||
* 详情是请求完存在store的,在这里从store取值
|
import navs from "../components/sdetails/navs";
|
||||||
**/
|
import guige from "../components/sdetails/guige"
|
||||||
import navs from "../components/sdetails/navs"
|
import tloos from "../components/sdetails/tloos";
|
||||||
import tloos from "../components/sdetails/tloos"
|
|
||||||
export default {
|
export default {
|
||||||
name: "sdetails",
|
name: "sdetails",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [], // 轮播图列表
|
list: [], // 轮播图列表
|
||||||
goodsInfo: {},
|
goodsInfo: {}, // 商品信息
|
||||||
info:{},
|
storeInfo: {},
|
||||||
glist:[],
|
glist: [], // 规格列表
|
||||||
id:0, // 商品id
|
id: 0, // 商品id/秒杀id/拼团 id
|
||||||
type: '', // 商品类型 商品详情 1普通 2拼团 3秒杀 4优惠券
|
type: '', // 商品类型 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||||
groupUser: [], // 拼团用户
|
groupUser: [], // 拼团用户
|
||||||
user_suc: [], // 拼团成功用户
|
user_suc: [], // 拼团成功用户
|
||||||
avatarWidth: '',
|
|
||||||
pintuan_id: '', // 拼团id
|
|
||||||
showGroupUser: false, // 拼团
|
showGroupUser: false, // 拼团
|
||||||
showInvolvementUser: false, // 参团
|
showInvolvementUser: false, // 参团
|
||||||
involvemenGroupInfo: [], // 参团的人
|
involvemenGroupInfo: [], // 参团的人
|
||||||
groupbuyInfo: {}, // 秒杀详情
|
groupbuyInfo: {}, // 秒杀详情
|
||||||
spikeTime: '',
|
spikeTime: '',
|
||||||
timer: '', // 时间定时器
|
isSpike: false, // 是否超过秒杀时间
|
||||||
|
timer: '', // 秒杀时间定时器
|
||||||
|
spec_id: '', // 规格 id, 下单用的
|
||||||
|
evaluate: {}, // 评价内容
|
||||||
|
showSpec: false, // 是否显示选择规格
|
||||||
|
goodsNumber: 1,
|
||||||
|
sel: "", // 拼接的规格
|
||||||
|
quanxuan: false, // 规格是否选择
|
||||||
|
debounce: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
comment,
|
||||||
navs,
|
navs,
|
||||||
tloos
|
tloos,
|
||||||
|
guige,
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
sel(value){
|
||||||
|
this.xuanze(value);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
// this.init();
|
||||||
|
// console.log(option);
|
||||||
|
this.type = Number(option.type);
|
||||||
|
this.id = option.id;
|
||||||
|
this.getGoodsDetails(this.id);
|
||||||
|
this.setTitle();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// if(this.pintuan_id) {
|
this.debounce = true;
|
||||||
// this.$u.api.getPinTuanDetails({
|
this.showSpec = false;
|
||||||
// pintuan_id: this.pintuan_id
|
this.showGroupUser = false;
|
||||||
// }).then(res => {
|
this.showInvolvementUser = false;
|
||||||
// if(res.errCode == 0) {
|
|
||||||
// const goods = {
|
|
||||||
// goods: res.data.data,
|
|
||||||
// type: 2,
|
|
||||||
// }
|
|
||||||
// this.$store.commit('setGoodsDetails', goods);
|
|
||||||
// this.$store.commit('setGoodsId', this.pintuan_id);
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
onLoad() {
|
onNavigationBarButtonTap(e) {
|
||||||
this.init();
|
if(e.index == 0) this.$u.route('/pageC/cart/index');
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
setSwiperList(list) {
|
||||||
this.id = this.$store.state.goods_id;
|
let img = [];
|
||||||
this.type = this.$store.getters.getGoodsType;
|
list.forEach(item => {
|
||||||
const info = this.$store.getters.getGoodsInfo;
|
|
||||||
if(this.type == 2) {
|
|
||||||
this.user_suc = info.user_suc;
|
|
||||||
this.groupUser = info.user;
|
|
||||||
this.pintuan_id = info.pintuan_id;
|
|
||||||
}
|
|
||||||
if (this.type == 3) {
|
|
||||||
this.groupbuyInfo = this.$store.state.groupbuyInfo;
|
|
||||||
this.setSpikeTime();
|
|
||||||
}
|
|
||||||
// console.log(this.groupbuyInfo);
|
|
||||||
this.goodsInfo = info.goods;
|
|
||||||
// 设置轮播图
|
|
||||||
let list = [];
|
|
||||||
info.goods_image[0].forEach(item => {
|
|
||||||
let temp = {
|
let temp = {
|
||||||
image: item
|
image: item[1]
|
||||||
}
|
}
|
||||||
list.push(temp);
|
img.push(temp);
|
||||||
})
|
})
|
||||||
this.list = list;
|
this.list = img;
|
||||||
this.setTitle();
|
|
||||||
},
|
},
|
||||||
spikeGoods() {
|
spikeGoods() {
|
||||||
this.settlementOrder()
|
this.settlementOrder()
|
||||||
},
|
},
|
||||||
setSpikeTime() {
|
setSpikeTime(time) {
|
||||||
const time = this.groupbuyInfo.groupbuy_endtime;
|
// const time = this.groupbuyInfo.groupbuy_endtime;
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
let spikeTime = time * 1000 - new Date().getTime();
|
let spikeTime = time * 1000 - new Date().getTime();
|
||||||
|
if(spikeTime <= 0) this.isSpike = true;
|
||||||
// 计算天数
|
// 计算天数
|
||||||
const days = Math.floor(spikeTime/(24*3600*1000));
|
const days = Math.floor(spikeTime/(24*3600*1000));
|
||||||
//计算出小时数
|
//计算出小时数
|
||||||
@@ -229,61 +273,114 @@ export default {
|
|||||||
// console.log(this.spikeTime);
|
// console.log(this.spikeTime);
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
buy(info){
|
addCart() {
|
||||||
if(info.type == 2){ // 加入购物车
|
|
||||||
this.$u.api.addCart({
|
this.$u.api.addCart({
|
||||||
goods_id: this.id,
|
goods_id: this.id,
|
||||||
quantity: info.value,
|
quantity: this.goodsNumber,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
type: res.errCode == 0 ? 'success' : 'warning',
|
type: res.errCode == 0 ? 'success' : 'warning',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else if (info.type == 1) { // 支付
|
},
|
||||||
this.settlementOrder({num: info.value});
|
purchase() {
|
||||||
}
|
this.settlementOrder();
|
||||||
},
|
},
|
||||||
getGoodsDetails(id) {
|
getGoodsDetails(id) {
|
||||||
this.id = id;
|
switch (this.type) {
|
||||||
|
case 1:
|
||||||
|
this.ordinaryDetails(id);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
this.pinTuanDetails(id);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
this.spikeGoodsDetails(id);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 普通商品详情
|
||||||
|
ordinaryDetails(id) {
|
||||||
this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
|
this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
|
this.evaluate = res.data.goods_evaluate_info;
|
||||||
this.goodsInfo = res.data.goods;
|
this.goodsInfo = res.data.goods;
|
||||||
let list = [];
|
this.storeInfo = res.data.store;
|
||||||
res.data.goods_image[0].forEach(item => {
|
this.setSwiperList(res.data.goods_image);
|
||||||
let temp = {
|
|
||||||
image: item
|
|
||||||
}
|
|
||||||
list.push(temp);
|
|
||||||
})
|
|
||||||
this.list = list;
|
|
||||||
this.info = res.data.goods;
|
|
||||||
this.glist = res.data.spec_list;
|
this.glist = res.data.spec_list;
|
||||||
// console.log(this.goodsInfo.mobile_body);
|
// console.log(this.goodsInfo.mobile_body);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 下单
|
// 拼团详情
|
||||||
|
pinTuanDetails(id) {
|
||||||
|
this.$u.api.getPinTuanDetails({
|
||||||
|
pintuan_id: id
|
||||||
|
}).then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.evaluate = res.data.data.goods_evaluate_info;
|
||||||
|
this.goodsInfo = res.data.data.goods;
|
||||||
|
this.setSwiperList(res.data.data.goods_image);
|
||||||
|
this.glist = res.data.data.spec_list;
|
||||||
|
this.user_suc = res.data.data.user_suc;
|
||||||
|
this.groupUser =res.data.data.user;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 秒杀详情
|
||||||
|
spikeGoodsDetails(id) {
|
||||||
|
this.$u.api.getSpikeInfo({
|
||||||
|
groupbuy_id: id
|
||||||
|
}).then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.groupbuyInfo = res.data.groupbuyInfo;
|
||||||
|
this.evaluate = res.data.goodsInfo.goods_evaluate_info;
|
||||||
|
this.goodsInfo = res.data.goodsInfo.goods;
|
||||||
|
this.setSwiperList(res.data.goodsInfo.goods_image);
|
||||||
|
this.setSpikeTime(res.data.groupbuyInfo.groupbuy_endtime);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 试穿
|
||||||
|
tryDress() {
|
||||||
|
this.$u.route({
|
||||||
|
url: '/pageB/triedDress/index',
|
||||||
|
params: {
|
||||||
|
id: this.id,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
/*
|
/*
|
||||||
* @params {Number} type 拼团或者开团
|
* @description 下单 订单步骤1:展示结算数据
|
||||||
|
* @params {Number} type involvement 拼团或者 默认开团
|
||||||
|
* @params {Number} num 数量
|
||||||
|
* @params {Number} ifcart 结算方式 1:购物车 0:直接结算(立即购买/拼团/秒杀)
|
||||||
**/
|
**/
|
||||||
settlementOrder({type, num = 1} = {}) {
|
settlementOrder({type, num = this.goodsNumber, ifcart = 0} = {}) {
|
||||||
// ifcart 结算方式 1:购物车 0:直接结算(立即购买/拼团/秒杀)
|
if(!this.debounce) return;
|
||||||
|
this.debounce = false;
|
||||||
let params = {
|
let params = {
|
||||||
ifcart: 0,
|
ifcart: ifcart,
|
||||||
cart_id: [this.goodsInfo.goods_id + '|' + num],
|
cart_id: [this.goodsInfo.goods_id + '|' + num],
|
||||||
}
|
}
|
||||||
if(this.type == 2) {
|
if(this.type == 2) {
|
||||||
if(type == 'involvement') {
|
if(type == 'involvement') {
|
||||||
Object.assign(params, {
|
Object.assign(params, {
|
||||||
pintuan_id: this.pintuan_id,
|
pintuan_id: this.id,
|
||||||
pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id
|
pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
const userId = uni.getStorageSync('user_info').member.member_id;
|
const userId = uni.getStorageSync('user_info').member.member_id;
|
||||||
this.$store.commit('setGroupHeadId', userId);
|
this.$store.commit('setGroupHeadId', userId);
|
||||||
Object.assign(params, {
|
Object.assign(params, {
|
||||||
pintuan_id: this.pintuan_id,
|
pintuan_id: this.id,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -294,19 +391,47 @@ export default {
|
|||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: '/pageC/cart/ConfirmOrder'
|
url: '/pageC/cart/ConfirmOrder'
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.debounce = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 参团
|
||||||
involvemenGroup(user) {
|
involvemenGroup(user) {
|
||||||
this.involvemenGroupInfo = user;
|
this.involvemenGroupInfo = user;
|
||||||
this.showGroupUser = false;
|
this.showGroupUser = false;
|
||||||
this.showInvolvementUser = true;
|
this.showInvolvementUser = true;
|
||||||
// console.log(this.involvemenGroupInfo);
|
// console.log(this.involvemenGroupInfo);
|
||||||
},
|
},
|
||||||
xuanze(id){
|
valChange(e) {
|
||||||
console.log(id)
|
// console.log(this.value)
|
||||||
// this.getGoodsDetails(this.glist[id])
|
|
||||||
},
|
},
|
||||||
|
self(){
|
||||||
|
// console.log(this.$refs.guige)
|
||||||
|
let index = 0;
|
||||||
|
let arr = [];
|
||||||
|
for(let i in this.goodsInfo.spec_value){
|
||||||
|
// console.log(i)
|
||||||
|
// console.log(this.$refs.guige[index++].select)
|
||||||
|
// index++;
|
||||||
|
let sel = this.$refs.guige[index++].select
|
||||||
|
if(sel != 0){
|
||||||
|
arr.push(sel)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// console.log(arr.length)
|
||||||
|
if(arr.length == index){
|
||||||
|
this.sel = arr.join("|")
|
||||||
|
this.quanxuan = true
|
||||||
|
// console.log(this.sel)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
xuanze(id){
|
||||||
|
// console.log(id)
|
||||||
|
this.getGoodsDetails(this.glist[id])
|
||||||
|
this.id = this.glist[id];
|
||||||
|
},
|
||||||
|
// 设置页面标题
|
||||||
setTitle() {
|
setTitle() {
|
||||||
let title = '';
|
let title = '';
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
@@ -329,6 +454,17 @@ export default {
|
|||||||
title: title
|
title: title
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
toOthersPage(url) {
|
||||||
|
this.$u.route(url);
|
||||||
|
},
|
||||||
|
viewComment() {
|
||||||
|
this.$u.route({
|
||||||
|
url: 'pageB/comment/index',
|
||||||
|
params: {
|
||||||
|
id: this.goodsInfo.goods_id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -336,6 +472,7 @@ export default {
|
|||||||
.sdetails {
|
.sdetails {
|
||||||
padding-bottom: 98rpx;
|
padding-bottom: 98rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
background-color: #EEEBEE;
|
||||||
.spike-view {
|
.spike-view {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 396rpx;
|
top: 396rpx;
|
||||||
@@ -397,18 +534,25 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.info {
|
.info {
|
||||||
|
background:rgba(255,255,255,1);
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
.title{
|
.title{
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
>text{
|
.store-name {
|
||||||
padding: 13rpx;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color:#fff;
|
|
||||||
margin-right: 13rpx;
|
|
||||||
background-color: #FF780F;
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border-radius: 25rpx;
|
padding: 8rpx 10rpx;
|
||||||
|
margin: 0 10rpx 4rpx 0;
|
||||||
|
vertical-align: middle;
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
background-color: #FF780F;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
.goods-name {
|
||||||
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.pic{
|
.pic{
|
||||||
@@ -424,12 +568,42 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.comment {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
background:rgba(255,255,255,1);
|
||||||
|
padding: 30rpx;
|
||||||
|
.title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
.left {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
}
|
||||||
|
.right {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: rgba(153,153,153,1);
|
||||||
|
> image {
|
||||||
|
width: 8rpx;
|
||||||
|
height: 16rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.comment-none {
|
||||||
|
font-size: 26rpx;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
.hr {
|
.hr {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 20rpx;
|
height: 20rpx;
|
||||||
background-color: #ececec;
|
background-color: #ececec;
|
||||||
}
|
}
|
||||||
.group-user {
|
.group-user {
|
||||||
|
background: rgba(255,255,255,1);
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
.top {
|
.top {
|
||||||
margin-bottom: 28rpx;
|
margin-bottom: 28rpx;
|
||||||
@@ -580,6 +754,11 @@ export default {
|
|||||||
margin-right: 80rpx;
|
margin-right: 80rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.pintuan-none {
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #333;
|
||||||
|
margin: 100rpx auto 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -685,7 +864,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: rgba(255,255,255,1);
|
color: rgba(255,255,255,1);
|
||||||
z-index: 99;
|
z-index: 10076;
|
||||||
.launch {
|
.launch {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
background: rgba(253,211,96,1);
|
background: rgba(253,211,96,1);
|
||||||
@@ -706,7 +885,7 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
z-index: 99;
|
z-index: 10076;
|
||||||
.left {
|
.left {
|
||||||
width: 190rpx;
|
width: 190rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -739,5 +918,82 @@ export default {
|
|||||||
background: rgba(221,221,221,1);
|
background: rgba(221,221,221,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.tloos{
|
||||||
|
background-color: #fff;
|
||||||
|
display: flex;
|
||||||
|
position: fixed;
|
||||||
|
height: 98rpx;
|
||||||
|
width: 100%;
|
||||||
|
bottom:0;
|
||||||
|
border-top: 1rpx solid #ececec;
|
||||||
|
z-index: 10076;
|
||||||
|
.navs{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #666;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
>image{
|
||||||
|
width: 35rpx;
|
||||||
|
height: 35rpx;
|
||||||
|
margin-bottom: 15rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
.button{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 98rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.spec-popup {
|
||||||
|
padding: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
max-height: 750rpx;
|
||||||
|
.head{
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
.image{
|
||||||
|
width: 195rpx;
|
||||||
|
height: 195rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.info{
|
||||||
|
display: flex;
|
||||||
|
padding: 21rpx 0;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-left: 27rpx;
|
||||||
|
flex-direction: column;
|
||||||
|
>text:first-child{
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
>text:last-child{
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #ff3131;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.num{
|
||||||
|
height: 84rpx;
|
||||||
|
display: flex;
|
||||||
|
border-bottom: #ececec solid 2rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
>text{
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,19 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="search">
|
<view class="search">
|
||||||
<view class="sosuo">
|
|
||||||
<image></image>
|
|
||||||
<u-search placeholder="搜索您需要的商品" v-model="keyword" height="60" :action-style="{
|
|
||||||
'font-size':'32rpx',
|
|
||||||
'color':'#FF780F',
|
|
||||||
'overflow':'unset'
|
|
||||||
}"
|
|
||||||
@search="search"
|
|
||||||
></u-search>
|
|
||||||
</view>
|
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="title">搜索发现</view>
|
<view class="title">搜索发现</view>
|
||||||
<view class="label">
|
<view class="label">
|
||||||
<text>这是标签</text>
|
<text v-for="(label, index) in searchwordlist" :key="index" @click="search(label.word)">{{ label.word }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -23,17 +13,43 @@ export default {
|
|||||||
name:"search",
|
name:"search",
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
keyword:""
|
keyword: "",
|
||||||
|
searchwordlist: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getWordList();
|
||||||
|
},
|
||||||
|
// 点击搜索按钮
|
||||||
|
onNavigationBarButtonTap(e) {
|
||||||
|
if(e.index == 0) this.search(this.keyword);
|
||||||
|
},
|
||||||
|
// 输入框文本变化
|
||||||
|
onNavigationBarSearchInputChanged(e) {
|
||||||
|
this.keyword = e.text;
|
||||||
|
},
|
||||||
|
// 点击键盘搜索按钮
|
||||||
|
onNavigationBarSearchInputConfirmed(value) {
|
||||||
|
this.search(this.keyword);
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
getWordList() {
|
||||||
|
this.$u.api.searchwordlist().then(res => {
|
||||||
|
this.searchwordlist = res.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
search(value){
|
search(value){
|
||||||
// console.log(value)
|
// console.log(value)
|
||||||
|
if(!value) {
|
||||||
|
this.$u.toast('搜索内容不可为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: "/pageB/search/out",
|
url: "/pageB/search/out",
|
||||||
params: {
|
params: {
|
||||||
value,
|
value: value,
|
||||||
type:"shop"
|
type: "shop",
|
||||||
|
order: 'goods_salenum'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -67,6 +83,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.label{
|
.label{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
> text {
|
> text {
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
margin-right: 30rpx;
|
margin-right: 30rpx;
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="out">
|
<view class="out">
|
||||||
<view class="sosuo">
|
<u-tabs-swiper v-if="type == 'dianpu'" @change="tabsChange" :show-bar="false" :bold="false" :font-size="32"
|
||||||
<image></image>
|
active-color="#FF780F" ref="uTabs" :list="list" :is-scroll="false" style="border-bottom: 1px solid #ececec;flex-shrink:0"
|
||||||
<u-search placeholder="搜索您需要的商品" v-model="keyword" height="60" :show-action="false"></u-search>
|
height="88"></u-tabs-swiper>
|
||||||
</view>
|
<swiper v-if="type == 'dianpu'" class="swiper" :current="swiperCurrent" @transition="transition"
|
||||||
<u-tabs-swiper v-if="type == 'dianpu'" @change="tabsChange" :show-bar="false" :bold="false" :font-size="32" active-color="#FF780F" ref="uTabs" :list="list" :is-scroll="false" style="border-bottom: 1px solid #ececec;flex-shrink:0" height="88"></u-tabs-swiper>
|
@animationfinish="animationfinish">
|
||||||
<swiper v-if="type == 'dianpu'" class="swiper" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
|
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<scroll-view :scroll-y="true" style="height:100%">
|
<scroll-view :scroll-y="true" style="height:100%">
|
||||||
<view style="padding-top:30rpx">
|
<view style="padding-top:30rpx">
|
||||||
@@ -16,48 +15,32 @@
|
|||||||
<swiper-item>
|
<swiper-item>
|
||||||
<scroll-view :scroll-y="true" style="height:100%">
|
<scroll-view :scroll-y="true" style="height:100%">
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<darenItem style="margin-top:20rpx;margin-right:23rpx;box-shadow:0rpx 3rpx 7rpx 0rpx rgba(153, 153, 153, 0.35);" v-for="item in 50"></darenItem>
|
<!-- <darenItem style="margin-top:20rpx;margin-right:23rpx;box-shadow:0rpx 3rpx 7rpx 0rpx rgba(153, 153, 153, 0.35);" v-for="item in 50"></darenItem> -->
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view v-else style=" display: flex;flex-direction: column;height: calc(100vh - 88rpx);">
|
<view v-else style=" display: flex;flex-direction: column;height: calc(100vh - 88rpx);">
|
||||||
<view class="select">
|
<view class="select">
|
||||||
<view @click="sx(0)" data-type="xl">销量</view>
|
<view @click="sx(0)" class="xz" data-type="xl">销量</view>
|
||||||
<view class="xz" @click="sx(1)">
|
<view class="xz" @click="sx(1)">
|
||||||
<text>价格</text>
|
<text>价格</text>
|
||||||
<view class="jiage">
|
<view class="jiage">
|
||||||
<view class="top"></view>
|
<view class="top topxz"></view>
|
||||||
<view class="bottom bottomxz"></view>
|
<view class="bottom bottomxz"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view data-type="hp" @click="sx(2)">好评</view>
|
<view data-type="hp" @click="sx(2)">好评</view>
|
||||||
</view>
|
</view>
|
||||||
<swiper class="swiper" :current="swiperCurrent" @change="huadong">
|
<view class="swiper" :current="swiperCurrent" @change="huadong">
|
||||||
<swiper-item>
|
|
||||||
<scroll-view :scroll-y="true" style="height:100%">
|
<scroll-view :scroll-y="true" style="height:100%">
|
||||||
<view style="padding-top:30rpx">
|
<view style="padding-top:30rpx">
|
||||||
<shop v-for="(i,j) in shoplist[0]" :key="j" :name="i.goods_name" :id="i.goods_id" :commonid="i.goods_commonid" :image="i.goods_image"></shop>
|
<shop v-for="(i,j) in shoplist" :key="j" :name="i.goods_name" :id="i.goods_id" :commonid="i.goods_commonid"
|
||||||
|
:image="i.goods_image"></shop>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
|
||||||
<swiper-item>
|
|
||||||
<scroll-view :scroll-y="true" style="height:100%">
|
|
||||||
<view class="list">
|
|
||||||
<!-- <darenItem style="margin-top:20rpx;margin-right:23rpx;box-shadow:0rpx 3rpx 7rpx 0rpx rgba(153, 153, 153, 0.35);" v-for="item in 50"></darenItem> -->
|
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
|
||||||
</swiper-item>
|
|
||||||
<swiper-item>
|
|
||||||
<scroll-view :scroll-y="true" style="height:100%">
|
|
||||||
D
|
|
||||||
</scroll-view>
|
|
||||||
</swiper-item>
|
|
||||||
</swiper>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -65,6 +48,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
|
||||||
.sosuo {
|
.sosuo {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
@@ -80,11 +64,14 @@
|
|||||||
margin-right: 24rpx;
|
margin-right: 24rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.swiper {
|
.swiper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
@@ -92,6 +79,7 @@
|
|||||||
padding-left: 30rpx;
|
padding-left: 30rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.select {
|
.select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 89rpx;
|
height: 89rpx;
|
||||||
@@ -101,14 +89,17 @@
|
|||||||
padding: 0 40rpx;
|
padding: 0 40rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
>view {
|
>view {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
display: flex;
|
display: flex;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|
||||||
.jiage {
|
.jiage {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
width: 12rpx;
|
width: 12rpx;
|
||||||
border-bottom: 12rpx solid #707070;
|
border-bottom: 12rpx solid #707070;
|
||||||
@@ -116,20 +107,24 @@
|
|||||||
border-right: 11rpx solid #fff;
|
border-right: 11rpx solid #fff;
|
||||||
margin-bottom: 2rpx;
|
margin-bottom: 2rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom {
|
.bottom {
|
||||||
width: 12rpx;
|
width: 12rpx;
|
||||||
border-top: 12rpx solid #707070;
|
border-top: 12rpx solid #707070;
|
||||||
border-left: 11rpx solid #fff;
|
border-left: 11rpx solid #fff;
|
||||||
border-right: 11rpx solid #fff;
|
border-right: 11rpx solid #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topxz {
|
.topxz {
|
||||||
border-bottom: 12rpx solid #FF780F;
|
border-bottom: 12rpx solid #FF780F;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottomxz {
|
.bottomxz {
|
||||||
border-top: 12rpx solid #FF780F;
|
border-top: 12rpx solid #FF780F;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.xz {
|
.xz {
|
||||||
color: #FF780F;
|
color: #FF780F;
|
||||||
}
|
}
|
||||||
@@ -148,13 +143,11 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list:[
|
list: [{
|
||||||
{
|
|
||||||
name: "店铺"
|
name: "店铺"
|
||||||
}, {
|
}, {
|
||||||
name: "达人"
|
name: "达人"
|
||||||
}
|
}],
|
||||||
],
|
|
||||||
current: 0,
|
current: 0,
|
||||||
swiperCurrent: 0,
|
swiperCurrent: 0,
|
||||||
keyword: "",
|
keyword: "",
|
||||||
@@ -162,6 +155,11 @@ export default {
|
|||||||
shoplist: []
|
shoplist: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad(o) {
|
||||||
|
this.type = o.type
|
||||||
|
this.keyword = o.value
|
||||||
|
this.search()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
tabsChange(index) {
|
tabsChange(index) {
|
||||||
this.swiperCurrent = index;
|
this.swiperCurrent = index;
|
||||||
@@ -184,15 +182,12 @@ export default {
|
|||||||
console.log(e.detail.current)
|
console.log(e.detail.current)
|
||||||
},
|
},
|
||||||
search() {
|
search() {
|
||||||
this.$u.api.ShopSearch({keyword:this.keyword}).then((res)=>{
|
this.$u.api.ShopSearch({
|
||||||
this.shoplist[0] = res.data.data
|
keyword: this.keyword
|
||||||
|
}).then((res) => {
|
||||||
|
this.shoplist = res.data.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(o){
|
|
||||||
this.type = o.type
|
|
||||||
this.keyword = o.value
|
|
||||||
this.search()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
BIN
pageB/static/cart.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
298
pageB/triedDress/index.vue
Normal file
@@ -0,0 +1,298 @@
|
|||||||
|
<template>
|
||||||
|
<view class="tried">
|
||||||
|
<view class="user-info">
|
||||||
|
<view>
|
||||||
|
<label for="name">试穿人:</label>
|
||||||
|
<input type="text" id="name" placeholder="" v-model="name" />
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<label for="phone">手机号:</label>
|
||||||
|
<input type="text" id="phone" placeholder="" maxlength="11" v-model="phone" />
|
||||||
|
</view>
|
||||||
|
<view class="area" @click="show=true">
|
||||||
|
<label for="address">省市区:</label>
|
||||||
|
<input type="text" id="address" placeholder="" v-model="address" disabled />
|
||||||
|
<!-- <view>
|
||||||
|
<image src="/static/image/mine/24.png"></image>
|
||||||
|
<text>定位</text>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<label for="area">详细地址:</label>
|
||||||
|
<input type="text" id="area" placeholder="" v-model="area" />
|
||||||
|
</view>
|
||||||
|
<view @click="showTime=true">
|
||||||
|
<label for="time">预约时间:</label>
|
||||||
|
<input type="text" id="time" placeholder="" disabled v-model="time" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-picker mode="time" v-model="showTime" :params="params" @confirm="chooseDate"></u-picker>
|
||||||
|
<view class="goods-container">
|
||||||
|
<view class="store">
|
||||||
|
<image :src="store.store_avatar"></image>
|
||||||
|
<text>{{ store.store_name }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="goods">
|
||||||
|
<image :src="goodsInfo.goods_image"></image>
|
||||||
|
<view class="right">
|
||||||
|
<view class="name u-line-2">{{ goodsInfo.goods_name }}</view>
|
||||||
|
<u-number-box v-model="number" bg-color="#FFFFFF" :min="1" :input-width="38" :input-height="38" color="#FF780F"></u-number-box>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="edit-btn" @click="confirmBtn">确认试穿</view>
|
||||||
|
<u-select v-model="show"
|
||||||
|
mode="mutil-column-auto"
|
||||||
|
:list="areaList"
|
||||||
|
value-name="area_id"
|
||||||
|
label-name="area_name"
|
||||||
|
child-name="_child"
|
||||||
|
@confirm="setArea">
|
||||||
|
</u-select>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: false,
|
||||||
|
areaList: [],
|
||||||
|
checked: false, // 是否设为默认地址
|
||||||
|
name: '',
|
||||||
|
phone: '',
|
||||||
|
address: '', // 选择地址
|
||||||
|
area: '', // 详细地址
|
||||||
|
time: '',
|
||||||
|
showTime: false,
|
||||||
|
number: 1, // 商品数量
|
||||||
|
area_id: '', // 地区id 省
|
||||||
|
city_id: '', // 城市id
|
||||||
|
goodsInfo: {},
|
||||||
|
store: {},
|
||||||
|
params: {
|
||||||
|
year: true,
|
||||||
|
month: true,
|
||||||
|
day: true,
|
||||||
|
hour: true,
|
||||||
|
minute: true,
|
||||||
|
second: false
|
||||||
|
},
|
||||||
|
debounce: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getAreaData();
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.ordinaryDetails(option.id);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
verification() {
|
||||||
|
if(this.$u.test.isEmpty(this.name)) {
|
||||||
|
this.$u.toast('姓名不可为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(this.$u.test.isEmpty(this.phone)) {
|
||||||
|
this.$u.toast('手机号不可为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(!this.$u.test.mobile(this.phone)) {
|
||||||
|
this.$u.toast('请正确填写手机号');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(this.$u.test.isEmpty(this.address)) {
|
||||||
|
this.$u.toast('地址不可为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(this.$u.test.isEmpty(this.area)) {
|
||||||
|
this.$u.toast('详细地址不可为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(this.$u.test.isEmpty(this.time)) {
|
||||||
|
this.$u.toast('预约时间不可为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(new Date(this.time) < new Date()) {
|
||||||
|
this.$u.toast('预约时间错误');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(this.number > this.goodsInfo.goods_storage) {
|
||||||
|
this.$u.toast('库存不足');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
chooseDate(e) {
|
||||||
|
let time = e.year + '/' + e.month + '/' + e.day + ' ' + e.hour + ':' + e.minute;
|
||||||
|
this.time = time;
|
||||||
|
},
|
||||||
|
confirmBtn() {
|
||||||
|
if(!this.debounce) return;
|
||||||
|
if(!this.verification()) return false;
|
||||||
|
this.debounce = false;
|
||||||
|
this.$u.api.saveGoodsTry({
|
||||||
|
member_name: this.name,
|
||||||
|
member_mobile: this.phone,
|
||||||
|
area_info: this.address,
|
||||||
|
address_detail: this.area,
|
||||||
|
goods_id: this.goodsInfo.goods_id,
|
||||||
|
num: this.number,
|
||||||
|
store_id: this.store.store_id,
|
||||||
|
appointment_time: new Date(this.time),
|
||||||
|
}).then(res => {
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
back: true,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: 'error',
|
||||||
|
})
|
||||||
|
this.debounce = true;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getAreaData() {
|
||||||
|
this.$u.api.getArea().then((res)=>{
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.areaList = res.data;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
setArea(area) {
|
||||||
|
// console.log(area);
|
||||||
|
this.area_id = area[0].value;
|
||||||
|
this.city_id = area[1].value;
|
||||||
|
let temp = '';
|
||||||
|
area.forEach(e => {
|
||||||
|
temp += e.label + ' ';
|
||||||
|
});
|
||||||
|
this.address = temp;
|
||||||
|
},
|
||||||
|
ordinaryDetails(id) {
|
||||||
|
this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.goodsInfo = res.data.goods;
|
||||||
|
this.store = res.data.store;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.tried {
|
||||||
|
.user-info {
|
||||||
|
border-top: 1rpx solid rgba(235,235,235,1);
|
||||||
|
> view {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 98rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
border-bottom: 2rpx solid rgba(235,235,235,1);
|
||||||
|
font-size: 30rpx;
|
||||||
|
> label {
|
||||||
|
width: 150rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
> input {
|
||||||
|
flex: 1;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.area {
|
||||||
|
padding: 0 30rpx;
|
||||||
|
display: flex;
|
||||||
|
> input {
|
||||||
|
padding: 30rpx 0;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
> view {
|
||||||
|
margin-left: 30rpx;
|
||||||
|
width: 50rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: rgba(255,120,15,1);
|
||||||
|
> image {
|
||||||
|
width: 26rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goods-container {
|
||||||
|
padding: 30rpx;
|
||||||
|
.store {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
> image {
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-right: 16rpx;
|
||||||
|
background-color: antiquewhite;
|
||||||
|
}
|
||||||
|
> text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goods {
|
||||||
|
display: flex;
|
||||||
|
> image {
|
||||||
|
width: 180rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
margin-right: 30rpx;
|
||||||
|
background-color: aquamarine;
|
||||||
|
}
|
||||||
|
.right {
|
||||||
|
flex: 1;
|
||||||
|
.name {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
line-height: 44rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
/deep/ .u-numberbox {
|
||||||
|
border: 1rpx solid rgba(217,215,215,1);
|
||||||
|
.u-icon-minus, .u-icon-plus {
|
||||||
|
width: 38rpx;
|
||||||
|
.u-icon {
|
||||||
|
.u-icon__icon {
|
||||||
|
font-size: 11rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.u-number-input {
|
||||||
|
margin: 0;
|
||||||
|
border: 1rpx solid rgba(229,229,229,1) {
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.edit-btn {
|
||||||
|
margin: 122rpx auto 0;
|
||||||
|
width: 690rpx;
|
||||||
|
height: 98rpx;
|
||||||
|
background: rgba(255,119,15,1);
|
||||||
|
border-radius: 49rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color:rgba(255,255,255,1);
|
||||||
|
line-height: 98rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="order">
|
<view class="order">
|
||||||
<view class="info-address" @click="changeAddress">
|
<view class="info-address" @click="changeAddress" v-if="JSON.stringify(addressInfo) != '{}'">
|
||||||
<image src="../static/image/2.png" class="address-icon"></image>
|
<image src="../static/image/2.png" class="address-icon"></image>
|
||||||
<view class="address">
|
<view class="address">
|
||||||
<view class="user-info">
|
<view class="user-info">
|
||||||
@@ -11,11 +11,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<image src="../static/image/1.png" class="right"></image>
|
<image src="../static/image/1.png" class="right"></image>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-else class="address-none" @click="changeAddress">请选择地址</view>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<view v-for="(item, index) in orderInfo.store_cart_list" :key="index">
|
<view v-for="(item, index) in orderInfo.store_cart_list" :key="index">
|
||||||
<view class="goods-info">
|
<view class="goods-info">
|
||||||
<view class="store">
|
<view class="store">
|
||||||
<image class="avatar" :src="item[0].store_avatar"></image>
|
<image class="avatar" :src="orderInfo.store_list[index].store_avatar"></image>
|
||||||
<view>{{ item[0].store_name }}</view>
|
<view>{{ item[0].store_name }}</view>
|
||||||
<image src="../static/image/1.png" class="right"></image>
|
<image src="../static/image/1.png" class="right"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -68,13 +69,13 @@
|
|||||||
<u-popup v-model="couponStatus" mode="bottom">
|
<u-popup v-model="couponStatus" mode="bottom">
|
||||||
<scroll-view class="coupon-choose" scroll-y style="height: 800rpx;" v-if="this.couponType.type == 1">
|
<scroll-view class="coupon-choose" scroll-y style="height: 800rpx;" v-if="this.couponType.type == 1">
|
||||||
<view class="title">优惠券详情</view>
|
<view class="title">优惠券详情</view>
|
||||||
<view class="text">店铺优惠券</view>
|
<view class="text">平台优惠券</view>
|
||||||
<Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_all_list" :key="index"></Coupon>
|
<Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_all_list" :key="index"></Coupon>
|
||||||
<u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_all_list.length"></u-empty>
|
<u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_all_list.length"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<scroll-view class="coupon-choose" scroll-y style="height: 800rpx;" v-if="this.couponType.type == 2">
|
<scroll-view class="coupon-choose" scroll-y style="height: 800rpx;" v-if="this.couponType.type == 2">
|
||||||
<view class="title">优惠券详情</view>
|
<view class="title">优惠券详情</view>
|
||||||
<view class="text">平台优惠券</view>
|
<view class="text">店铺优惠券</view>
|
||||||
<Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_list[this.couponType.store_id]" :key="index"></Coupon>
|
<Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_list[this.couponType.store_id]" :key="index"></Coupon>
|
||||||
<u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_list[this.couponType.store_id].length"></u-empty>
|
<u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_list[this.couponType.store_id].length"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@@ -121,7 +122,7 @@ export default {
|
|||||||
choiceCoupon: {}, // 使用的平台优惠券
|
choiceCoupon: {}, // 使用的平台优惠券
|
||||||
goodsClass: [],
|
goodsClass: [],
|
||||||
orderType: '', // 订单类型 1 普通订单 2 拼团订单 3 秒杀订单 4 优惠券 5 购物车订单
|
orderType: '', // 订单类型 1 普通订单 2 拼团订单 3 秒杀订单 4 优惠券 5 购物车订单
|
||||||
|
debounce: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -147,16 +148,20 @@ export default {
|
|||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.orderType = this.$store.state.orderType;
|
this.orderType = this.$store.state.orderType;
|
||||||
this.orderInfo = this.$store.state.orderInfo;
|
this.orderInfo = this.$store.state.orderInfo;
|
||||||
console.log(this.orderType);
|
// console.log(this.orderType);
|
||||||
console.log(this.orderInfo);
|
// console.log(this.orderInfo);
|
||||||
this.getGoodsClass();
|
this.getGoodsClass();
|
||||||
|
this.setTotalPrice();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.debounce = true;
|
||||||
|
this.storeCoupon = {};
|
||||||
|
this.choiceCoupon = {};
|
||||||
// 判断是不是从选择地址页面返回
|
// 判断是不是从选择地址页面返回
|
||||||
if(JSON.stringify(this.$store.state.orderAddress) == '{}') {
|
if(JSON.stringify(this.$store.state.orderAddress) == '{}') {
|
||||||
this.$store.commit('updateAddress', this.orderInfo.address_info);
|
if(this.orderInfo.address_info) this.$store.commit('updateAddress', this.orderInfo.address_info);
|
||||||
} else {
|
} else {
|
||||||
this.addressInfo = this.$store.state.orderAddress;
|
if(this.$store.getters.getOrderAddress) this.addressInfo = this.$store.state.orderAddress;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@@ -165,22 +170,8 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
'$store.state.orderAddress'(value) {
|
'$store.state.orderAddress'(value) {
|
||||||
this.addressInfo = value;
|
this.addressInfo = value;
|
||||||
this.getFreight();
|
if(JSON.stringify(value) != '{}') this.getFreight();
|
||||||
},
|
},
|
||||||
// storeCoupon: {
|
|
||||||
// deep: true,
|
|
||||||
// handler() {
|
|
||||||
// console.log(222);
|
|
||||||
// this.setTotalPrice(); // 计算总价
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// choiceCoupon: {
|
|
||||||
// deep: true,
|
|
||||||
// handler() {
|
|
||||||
// console.log(111);
|
|
||||||
// this.setTotalPrice(); // 计算总价
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 如果有pintuangroup_headid为参团不然为开团
|
// 如果有pintuangroup_headid为参团不然为开团
|
||||||
@@ -200,14 +191,24 @@ export default {
|
|||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.sendOrder(0);
|
this.sendOrder(0);
|
||||||
} else {
|
} else {
|
||||||
|
this.debounce = true;
|
||||||
this.$u.toast(res.message);
|
this.$u.toast(res.message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
intermediate() {
|
intermediate() {
|
||||||
if(this.orderType == 2) this.withImmediate();
|
if(!this.debounce) return;
|
||||||
else this.sendOrder(1);
|
this.debounce = false;
|
||||||
|
if(this.orderType == 2) {
|
||||||
|
// this.sendOrder(0);
|
||||||
|
this.withImmediate();
|
||||||
|
} else if(this.orderType == 1) {
|
||||||
|
this.sendOrder(0);
|
||||||
|
} else {
|
||||||
|
this.sendOrder(1);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
// @params {Number} ifcart 是否是购物车商品
|
||||||
sendOrder(ifcart) {
|
sendOrder(ifcart) {
|
||||||
// 拼接后端需要的数据形式
|
// 拼接后端需要的数据形式
|
||||||
let id = [], temp = '';
|
let id = [], temp = '';
|
||||||
@@ -236,28 +237,38 @@ export default {
|
|||||||
if(JSON.stringify(this.choiceCoupon) != '{}') {
|
if(JSON.stringify(this.choiceCoupon) != '{}') {
|
||||||
coupon.push(0 + '|' + this.choiceCoupon.voucher_id)
|
coupon.push(0 + '|' + this.choiceCoupon.voucher_id)
|
||||||
}
|
}
|
||||||
|
// 验证是否选择地址
|
||||||
|
if(!this.addressInfo || JSON.stringify(this.addressInfo) == '{}') {
|
||||||
|
this.$u.toast('收货地址不能为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
let params = {
|
let params = {
|
||||||
ifcart: ifcart,
|
ifcart: ifcart,
|
||||||
cart_id: id,
|
cart_id: id,
|
||||||
address_id: this.addressInfo.address_id,
|
address_id: this.addressInfo.address_id,
|
||||||
buy_city_id: this.addressInfo.city_id,
|
buy_city_id: this.addressInfo.city_id,
|
||||||
voucher_id: coupon,
|
|
||||||
}
|
}
|
||||||
|
if(coupon.length) Object.assign(params, { voucher_id: coupon });
|
||||||
if(this.orderType == 2) {
|
if(this.orderType == 2) {
|
||||||
Object.assign(params, { pintuan_id: this.orderInfo.pintuan_id })
|
Object.assign(params, { pintuan_id: this.orderInfo.pintuan_id });
|
||||||
if(this.orderInfo.pintuangroup_id) Object.assign(params, { pintuangroup_id: this.orderInfo.pintuangroup_id })
|
if(this.orderInfo.pintuangroup_id) Object.assign(params, { pintuangroup_id: this.orderInfo.pintuangroup_id });
|
||||||
}
|
}
|
||||||
// console.log(params);
|
// console.log(params);
|
||||||
this.$u.api.sendOrder(params).then(res => {
|
this.$u.api.sendOrder(params).then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
|
// this.withImmediate();
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
|
type: 'redirect',
|
||||||
url: '/pageC/cart/cashier',
|
url: '/pageC/cart/cashier',
|
||||||
params: {
|
params: {
|
||||||
|
ifcart: params.ifcart,
|
||||||
pay_sn: res.data.pay_sn,
|
pay_sn: res.data.pay_sn,
|
||||||
price: res.data.order_total_amount,
|
price: res.data.order_total_amount,
|
||||||
|
order_id: res.data.order_list[0].order_id,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
this.debounce = true;
|
||||||
this.$u.toast(res.message);
|
this.$u.toast(res.message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -297,6 +308,7 @@ export default {
|
|||||||
},
|
},
|
||||||
setTotalPrice() {
|
setTotalPrice() {
|
||||||
const goods = this.orderInfo.store_goods_total;
|
const goods = this.orderInfo.store_goods_total;
|
||||||
|
// console.log(this.freight);
|
||||||
const freight = this.freight;
|
const freight = this.freight;
|
||||||
let price = 0;
|
let price = 0;
|
||||||
// 商品价格加上运费
|
// 商品价格加上运费
|
||||||
@@ -391,6 +403,14 @@ export default {
|
|||||||
height: 22rpx;
|
height: 22rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.address-none {
|
||||||
|
height: 150rpx;
|
||||||
|
line-height: 150rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
background:rgba(255,255,255,1);
|
||||||
|
text-align: center;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
.main {
|
.main {
|
||||||
margin-bottom: 50rpx;
|
margin-bottom: 50rpx;
|
||||||
> view {
|
> view {
|
||||||
@@ -407,8 +427,8 @@ export default {
|
|||||||
width: 60rpx;
|
width: 60rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border: 1rpx solid #000;
|
|
||||||
margin-right: 15rpx;
|
margin-right: 15rpx;
|
||||||
|
background-color: aquamarine;
|
||||||
}
|
}
|
||||||
> view {
|
> view {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
<image :src="item.icon"></image>
|
<image :src="item.icon"></image>
|
||||||
<text class="name">{{ item.pay_way }}</text>
|
<text class="name">{{ item.pay_way }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="radio-view" :class="pay_way == item.name ? 'active' : 'default'">
|
<view class="" :class="pay_way == item.name ? 'active' : 'default'">
|
||||||
<u-radio :name="item.name" active-color="#FF780F" :disabled="item.disabled"></u-radio>
|
<u-radio class="radio-view" shape="circle" :name="item.name" active-color="#FF780F" :disabled="item.disabled"></u-radio>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
@@ -39,13 +39,18 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
pay_way: 'wxpay_app',
|
pay_way: 'wxpay_app',
|
||||||
pay_sn: '',
|
|
||||||
price: '',
|
price: '',
|
||||||
|
pay_sn: '',
|
||||||
|
ifcart: '',
|
||||||
|
order_id: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.pay_sn = option.pay_sn;
|
console.log(option);
|
||||||
|
this.ifcart = option.ifcart;
|
||||||
this.price = option.price;
|
this.price = option.price;
|
||||||
|
this.pay_sn = option.pay_sn;
|
||||||
|
this.order_id = option.order_id;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
radioGroupChange(e) {
|
radioGroupChange(e) {
|
||||||
@@ -54,29 +59,44 @@ export default {
|
|||||||
// getProvider() {
|
// getProvider() {
|
||||||
// uni.getProvider({service: 'payment'})
|
// uni.getProvider({service: 'payment'})
|
||||||
// },
|
// },
|
||||||
// 支付宝支付
|
payOrder(provider, orderInfo) {
|
||||||
payByAlipay (orderInfo) {
|
let me = this;
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
provider: 'alipay',
|
provider: provider,
|
||||||
orderInfo: orderInfo, //支付宝订单数据
|
orderInfo: orderInfo, //订单数据
|
||||||
success: function (res) {
|
success: (res) => {
|
||||||
console.log('success:' + JSON.stringify(res));
|
console.log('success:' + JSON.stringify(res));
|
||||||
},
|
this.$u.toast("支付成功!");
|
||||||
fail: function (err) {
|
setTimeout(function(){
|
||||||
console.log('fail:' + JSON.stringify(err));
|
if (Boolean(parseInt(me.ifcart))) {
|
||||||
|
me.$u.route({
|
||||||
|
type: 'redirect',
|
||||||
|
url: '/pageE/order/Index',
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
me.$u.route({
|
||||||
|
type: 'redirect',
|
||||||
|
url: '/pageE/order/Details?oid=' + me.order_id,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
},2000)
|
||||||
},
|
},
|
||||||
// 微信支付
|
fail: (err) => {
|
||||||
payByWxpay (orderInfo) {
|
|
||||||
uni.requestPayment({
|
|
||||||
provider: 'wxpay',
|
|
||||||
orderInfo: orderInfo, //微信订单数据
|
|
||||||
success: function (res) {
|
|
||||||
console.log('success:' + JSON.stringify(res));
|
|
||||||
},
|
|
||||||
fail: function (err) {
|
|
||||||
console.log('fail:' + JSON.stringify(err));
|
console.log('fail:' + JSON.stringify(err));
|
||||||
|
this.$u.toast("支付失败,支付已取消!");
|
||||||
|
setTimeout(function(){
|
||||||
|
if (Boolean(parseInt(me.ifcart))) {
|
||||||
|
me.$u.route({
|
||||||
|
type: 'redirect',
|
||||||
|
url: '/pageE/order/Index',
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
me.$u.route({
|
||||||
|
type: 'redirect',
|
||||||
|
url: '/pageE/order/Details?oid=' + me.order_id,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},2000)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -86,11 +106,15 @@ export default {
|
|||||||
payment_code: this.pay_way,
|
payment_code: this.pay_way,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
// this.$u.toast(res.message);
|
let orderInfo, provider;
|
||||||
// uni.navigateBack();
|
if(res.data.payment_code == 'wxpay_app') {
|
||||||
const orderInfo = JSON.parse(res.data.content);
|
provider = 'wxpay';
|
||||||
console.log(orderInfo);
|
orderInfo = JSON.parse(res.data.content);
|
||||||
this.pay_way == 'wxpay_app' ? this.payByWxpay(orderInfo) : this.payByAlipay(orderInfo);
|
} else if(res.data.payment_code == 'alipay_app') {
|
||||||
|
provider = 'alipay';
|
||||||
|
orderInfo = res.data.content;
|
||||||
|
}
|
||||||
|
this.payOrder(provider, orderInfo);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -125,15 +149,18 @@ export default {
|
|||||||
/deep/ .u-radio-group {
|
/deep/ .u-radio-group {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
.radio-view {
|
.u-radio__icon-wrap {
|
||||||
padding: 6rpx;
|
width: 30rpx !important;
|
||||||
border-radius: 50%;
|
height: 30rpx !important;
|
||||||
|
padding: 4rpx;
|
||||||
|
border: 1px solid #FF780F;
|
||||||
}
|
}
|
||||||
.active {
|
.active {
|
||||||
border: 2rpx solid rgba(255,120,15,1);
|
|
||||||
}
|
}
|
||||||
.default {
|
.default {
|
||||||
border: 2rpx solid rgba(219,219,219,1);
|
}
|
||||||
|
.radio-view {
|
||||||
|
|
||||||
}
|
}
|
||||||
.u-radio {
|
.u-radio {
|
||||||
.u-icon {
|
.u-icon {
|
||||||
@@ -145,13 +172,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.pay-item {
|
.pay-item {
|
||||||
height: 98rpx;
|
|
||||||
background: rgba(255,255,255,1);
|
|
||||||
padding: 24rpx 30rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
height: 98rpx;
|
||||||
|
padding: 24rpx 30rpx;
|
||||||
margin-bottom: 2rpx;
|
margin-bottom: 2rpx;
|
||||||
|
background: rgba(255,255,255,1);
|
||||||
.pay-way {
|
.pay-way {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ export default {
|
|||||||
checkedAll: false,
|
checkedAll: false,
|
||||||
checkedGoods: [],
|
checkedGoods: [],
|
||||||
totalPrice: '0.00',
|
totalPrice: '0.00',
|
||||||
|
debounce: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -73,7 +74,12 @@ export default {
|
|||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.debounce = true;
|
||||||
|
this.getCartList();
|
||||||
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
this.debounce = true;
|
||||||
this.getCartList();
|
this.getCartList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -88,6 +94,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 结算
|
// 结算
|
||||||
settlementOrder() {
|
settlementOrder() {
|
||||||
|
if(!this.debounce) return;
|
||||||
|
this.debounce = false;
|
||||||
if(!this.checkedGoods.length) return false;
|
if(!this.checkedGoods.length) return false;
|
||||||
// 拼接后端需要的数据形式
|
// 拼接后端需要的数据形式
|
||||||
let id = [], temp = '';
|
let id = [], temp = '';
|
||||||
@@ -105,12 +113,16 @@ export default {
|
|||||||
this.$u.route({
|
this.$u.route({
|
||||||
url: '/pageC/cart/ConfirmOrder'
|
url: '/pageC/cart/ConfirmOrder'
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
this.debounce = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getCartList() {
|
getCartList() {
|
||||||
this.$u.api.getCartTreeList().then(res => {
|
this.$u.api.getCartTreeList().then(res => {
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
let list = res.data.store_cart_list;
|
let list = res.data.store_cart_list;
|
||||||
list.forEach((item, l_index) => {
|
list.forEach((item, l_index) => {
|
||||||
// 判断有无 checked 属性,如果有取值再赋值, 没有给默认值 false
|
// 判断有无 checked 属性,如果有取值再赋值, 没有给默认值 false
|
||||||
|
|||||||
193
pageC/classify/goods.vue
Normal file
@@ -0,0 +1,193 @@
|
|||||||
|
<template>
|
||||||
|
<view class="classify-goods">
|
||||||
|
<view class="tab-container">
|
||||||
|
<view class="salenum" :class="{ 'current' : current == 0 }" @click="switchCurrent(0)">销量</view>
|
||||||
|
<view class="price" :class="{ 'current' : current == 1 }" @click="switchCurrent(1)">
|
||||||
|
<view class="text">价格</view>
|
||||||
|
<view class="icon">
|
||||||
|
<u-icon name="arrow-up-fill" :color="(current == 1 && priceOrderAsc) ? '#FF780F' : '#333333'" size="22"></u-icon>
|
||||||
|
<u-icon name="arrow-down-fill" :color="(current == 1 && !priceOrderAsc) ? '#FF780F' : '#333333'" size="22"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="evaluation" :class="{ 'current' : current == 2 }" @click="switchCurrent(2)">好评</view>
|
||||||
|
</view>
|
||||||
|
<scroll-view scroll-y class="goods-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore">
|
||||||
|
<view v-for="goods in goodsList" :key="goods.goods_id" class="goods-item" @click="toDetailsPage(goods.goods_id)">
|
||||||
|
<image :src="goods.goods_image"></image>
|
||||||
|
<view class="right">
|
||||||
|
<view class="name u-line-1">{{ goods.goods_name }}</view>
|
||||||
|
<view class="briefing u-line-2">{{ goods.goods_advword }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
|
||||||
|
<u-empty mode="list" v-if="!goodsList.length"></u-empty>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageSize: 12,
|
||||||
|
cid: '',
|
||||||
|
page: 1,
|
||||||
|
current: 0,
|
||||||
|
priceOrderAsc: true, // 是否升序
|
||||||
|
goodsList: [],
|
||||||
|
scrollHeight: '',
|
||||||
|
loadStatus: 'loadmore',
|
||||||
|
timer: true, // 防止上拉加载短时间内多次调用
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
current(value) {
|
||||||
|
this.page = 1;
|
||||||
|
this.goodsListByClassId({ laod: 'reload' });
|
||||||
|
},
|
||||||
|
priceOrderAsc(value) {
|
||||||
|
this.page = 1;
|
||||||
|
this.goodsListByClassId({ laod: 'reload' });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.cid = option.cid;
|
||||||
|
this.goodsListByClassId({ load: 'reload' });
|
||||||
|
this.setViewHeight();
|
||||||
|
this.setTitle(option.cname);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
setOrderSort() {
|
||||||
|
let sort = '';
|
||||||
|
if(this.current == 0) {
|
||||||
|
sort = 'goods_salenum';
|
||||||
|
} else if (this.current == 1) {
|
||||||
|
if(this.priceOrderAsc) sort = 'goods_price_asc';
|
||||||
|
else sort = 'goods_price_desc';
|
||||||
|
} else if (this.current == 2) {
|
||||||
|
sort = 'evaluation_count';
|
||||||
|
}
|
||||||
|
return sort;
|
||||||
|
},
|
||||||
|
// 排序方式 goods_salenum:销量 evaluation_count:评价 goods_price_asc:价格从低到高 goods_price_desc:价格从高到低
|
||||||
|
async goodsListByClassId({ load = 'reload' } = {}) {
|
||||||
|
const sort = this.setOrderSort();
|
||||||
|
const res = await this.$u.api.goodsListByClassId({
|
||||||
|
gc_id: this.cid,
|
||||||
|
page: this.page,
|
||||||
|
order: sort,
|
||||||
|
})
|
||||||
|
this.timer = true;
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
if(load == 'reload') this.goodsList = res.data.data;
|
||||||
|
else if(load == 'loadmore') this.goodsList.push(...res.data.data);
|
||||||
|
}
|
||||||
|
return res.data.data.length;
|
||||||
|
},
|
||||||
|
loadMore() {
|
||||||
|
if(this.goodsList.length < this.pageSize) return false;
|
||||||
|
if(!this.timer) return false;
|
||||||
|
this.loadStatus = "loading";
|
||||||
|
this.page++;
|
||||||
|
this.goodsListByClassId({ load: 'loadmore' }).then(length => {
|
||||||
|
if(length == 0) {
|
||||||
|
this.page--;
|
||||||
|
this.loadStatus = 'nomore';
|
||||||
|
} else {
|
||||||
|
this.loadStatus = 'loading';
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadStatus = "nomore";
|
||||||
|
this.page--;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
switchCurrent(current) {
|
||||||
|
if(current == 1 && this.current == 1) this.priceOrderAsc = !this.priceOrderAsc;
|
||||||
|
this.current = current;
|
||||||
|
},
|
||||||
|
setViewHeight() {
|
||||||
|
const res = uni.getSystemInfoSync();
|
||||||
|
this.scrollHeight = res.windowHeight - (90 / 2) + 'px';
|
||||||
|
},
|
||||||
|
setTitle(title) {
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: title
|
||||||
|
});
|
||||||
|
},
|
||||||
|
toDetailsPage(id) {
|
||||||
|
this.$u.route('/pageB/sdetails/index', {
|
||||||
|
id: id,
|
||||||
|
type: 1 // 商品详情 商品类型 1普通 2拼团 3秒杀 4优惠券
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.classify-goods {
|
||||||
|
.tab-container {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 30rpx 40rpx;
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
> view {
|
||||||
|
height: 30rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
|
flex: 1;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
}
|
||||||
|
.salenum {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.price {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
.text {
|
||||||
|
margin-right: 5rpx;
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.evaluation {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.current {
|
||||||
|
color: rgba(255,120,15,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.goods-container {
|
||||||
|
.goods-item {
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 690rpx;
|
||||||
|
display: flex;
|
||||||
|
background-color: #F5F5F5;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
align-items: center;
|
||||||
|
> image {
|
||||||
|
width: 220rpx;
|
||||||
|
height: 170rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-right: 30rpx;
|
||||||
|
}
|
||||||
|
.right {
|
||||||
|
width: 418rpx;
|
||||||
|
.name {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
.briefing {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(102,102,102,1);
|
||||||
|
line-height: 36rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<text>{{item.gc_name}}</text>
|
<text>{{item.gc_name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-container">
|
<view class="item-container">
|
||||||
<view class="thumb-box" v-for="(item1, index1) in item._child" :key="index1">
|
<view class="thumb-box" v-for="(item1, index1) in item._child" :key="index1" @click="toClassifyPage(item1.gc_id, item1.gc_name)">
|
||||||
<image class="item-menu-image" :src="item1.img" mode=""></image>
|
<image class="item-menu-image" :src="item1.img" mode=""></image>
|
||||||
<view class="item-menu-name">{{item1.gc_name}}</view>
|
<view class="item-menu-name">{{item1.gc_name}}</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -49,7 +49,18 @@
|
|||||||
onReady() {
|
onReady() {
|
||||||
this.getMenuItemTop()
|
this.getMenuItemTop()
|
||||||
},
|
},
|
||||||
|
onNavigationBarButtonTap(e) {
|
||||||
|
if(e.index == 0) this.$u.route('/pageB/search/index');
|
||||||
|
},
|
||||||
|
onNavigationBarSearchInputClicked() {
|
||||||
|
this.$u.route('/pageB/search/index');
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
toSearchPage() {
|
||||||
|
this.$u.route({
|
||||||
|
url: "pageB/search/index"
|
||||||
|
})
|
||||||
|
},
|
||||||
// 获取分类列表
|
// 获取分类列表
|
||||||
getClassifyList() {
|
getClassifyList() {
|
||||||
this.$u.api.getGoodsClassifyList().then(res => {
|
this.$u.api.getGoodsClassifyList().then(res => {
|
||||||
@@ -161,6 +172,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 10)
|
}, 10)
|
||||||
|
},
|
||||||
|
toClassifyPage(id, name) {
|
||||||
|
this.$u.route('pageC/classify/goods', {
|
||||||
|
cid: id,
|
||||||
|
cname: name,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
</view>
|
</view>
|
||||||
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" :style="{height: swiperHeight}">
|
<swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish" :style="{height: swiperHeight}">
|
||||||
<swiper-item class="swiper-item" v-for="(_, index) in tabList" :key="index">
|
<swiper-item class="swiper-item" v-for="(_, index) in tabList" :key="index">
|
||||||
<scroll-view scroll-y style="height: 800rpx;width: 100%;" @scrolltolower="onreachBottom">
|
<scroll-view scroll-y style="width: 100%;" @scrolltolower="onreachBottom">
|
||||||
<SpecialGoods v-for="(item, index) in pinTuanList" :key="index" :item="item" type='group'></SpecialGoods>
|
<SpecialGoods v-for="(item, index) in pinTuanList" :key="index" :item="item" type='group'></SpecialGoods>
|
||||||
<!-- <loadmore ref="loadmore" @callback="getPinTuanList" bgColor="#FFF"></loadmore> -->
|
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" v-if="pinTuanList.length>=pageSize" @loadmore="onreachBottom"></u-loadmore>
|
||||||
<u-empty text="暂无商品" mode="list" color="#000" v-if="!pinTuanList.length"></u-empty>
|
<u-empty text="暂无商品" mode="list" color="#000" v-if="!pinTuanList.length"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
@@ -15,22 +15,22 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import loadmore from "@/components/loadmore/index";
|
|
||||||
import SpecialGoods from "../../components/shop/special-shop/index";
|
import SpecialGoods from "../../components/shop/special-shop/index";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
pageSize: 12,
|
||||||
tabList: [],
|
tabList: [],
|
||||||
current: -1,
|
current: -1,
|
||||||
swiperCurrent: 0,
|
swiperCurrent: 0,
|
||||||
page: 0,
|
page: 0,
|
||||||
pinTuanList: [],
|
pinTuanList: [],
|
||||||
swiperHeight: '',
|
swiperHeight: '',
|
||||||
timer: '', // 限制下拉刷新
|
timer: true, // 限制下拉刷新
|
||||||
|
loadStatus: 'loadmore',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
loadmore,
|
|
||||||
SpecialGoods,
|
SpecialGoods,
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@@ -39,8 +39,7 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
current(index) {
|
current(index) {
|
||||||
// console.log(this.tabList);
|
this.getPinTuanList({ id: this.tabList[index].gc_id, load: 'reload' });
|
||||||
this.getPinTuanList({id: this.tabList[index].gc_id });
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -54,14 +53,39 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 拼团列表
|
// 拼团列表
|
||||||
async getPinTuanList({ id, page }) {
|
async getPinTuanList({ id, page, load }) {
|
||||||
const res = await this.$u.api.getPinTuanList({
|
const res = await this.$u.api.getPinTuanList({
|
||||||
page: this.page,
|
page: this.page,
|
||||||
gc_id: id,
|
gc_id: id,
|
||||||
})
|
})
|
||||||
this.pinTuanList = res.data;
|
this.timer = true;
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
if(load == 'reload') this.pinTuanList = res.data;
|
||||||
|
else if(load == 'loadmore') this.pinTuanList.push(...res.data);
|
||||||
|
}
|
||||||
return res.data.length;
|
return res.data.length;
|
||||||
},
|
},
|
||||||
|
// scroll-view到底部加载更多
|
||||||
|
onreachBottom() {
|
||||||
|
if(!this.timer) return false;
|
||||||
|
this.loadStatus = "loading";
|
||||||
|
this.page++;
|
||||||
|
this.getPinTuanList({
|
||||||
|
id: this.tabList[this.current].gc_id,
|
||||||
|
load: 'loadmore',
|
||||||
|
}).then(length => {
|
||||||
|
console.log(length);
|
||||||
|
if(length == 0) {
|
||||||
|
this.page--;
|
||||||
|
this.loadStatus = 'nomore';
|
||||||
|
} else {
|
||||||
|
this.loadStatus = 'loadmore';
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadStatus = "nomore";
|
||||||
|
this.page--;
|
||||||
|
})
|
||||||
|
},
|
||||||
// tabs通知swiper切换
|
// tabs通知swiper切换
|
||||||
tabsChange(index) {
|
tabsChange(index) {
|
||||||
this.swiperCurrent = index;
|
this.swiperCurrent = index;
|
||||||
@@ -78,24 +102,6 @@ export default {
|
|||||||
this.swiperCurrent = current;
|
this.swiperCurrent = current;
|
||||||
this.current = current;
|
this.current = current;
|
||||||
},
|
},
|
||||||
// scroll-view到底部加载更多
|
|
||||||
onreachBottom() {
|
|
||||||
this.$$refs.loadmore.reachBottom();
|
|
||||||
// if(!this.timer) return false;
|
|
||||||
// this.loadStatus = "loading";
|
|
||||||
// this.page++;
|
|
||||||
// this.getPinTuanList().then(length => {
|
|
||||||
// if(length == 0) {
|
|
||||||
// this.page--;
|
|
||||||
// this.status = 'nomore';
|
|
||||||
// } else {
|
|
||||||
// this.status = 'loading';
|
|
||||||
// }
|
|
||||||
// }).catch(() => {
|
|
||||||
// this.loadStatus = "nomore";
|
|
||||||
// this.page--;
|
|
||||||
// })
|
|
||||||
},
|
|
||||||
setViewHeight() {
|
setViewHeight() {
|
||||||
const res = uni.getSystemInfoSync();
|
const res = uni.getSystemInfoSync();
|
||||||
this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
|
this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
|
||||||
|
|||||||
215
pageC/merchant/classifyGoods.vue
Normal file
@@ -0,0 +1,215 @@
|
|||||||
|
<template>
|
||||||
|
<view class="classify-goods">
|
||||||
|
<view class="tab-container">
|
||||||
|
<view class="overall" :class="{ 'current' : current == 0 }" @click="switchCurrent(0)">综合</view>
|
||||||
|
<view class="salenum" :class="{ 'current' : current == 1 }" @click="switchCurrent(1)">销量</view>
|
||||||
|
<view class="new" :class="{ 'current' : current == 2 }" @click="switchCurrent(2)">新品</view>
|
||||||
|
<view class="price" :class="{ 'current' : current == 3 }" @click="switchCurrent(3)">
|
||||||
|
<view class="text">价格</view>
|
||||||
|
<view class="icon">
|
||||||
|
<u-icon name="arrow-up-fill" :color="(current == 3 && priceOrderAsc) ? '#FF780F' : '#333333'" size="22"></u-icon>
|
||||||
|
<u-icon name="arrow-down-fill" :color="(current == 3 && !priceOrderAsc) ? '#FF780F' : '#333333'" size="22"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<scroll-view scroll-y class="scroll-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore">
|
||||||
|
<view class="goods-container">
|
||||||
|
<view v-for="goods in goodsList" :key="goods.goods_id" class="goods-view" @click="toDetailsPage(goods.goods_id)">
|
||||||
|
<goodsItem :info="goods"></goodsItem>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
|
||||||
|
<u-empty mode="list" v-if="!goodsList.length"></u-empty>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import goodsItem from "@/components/shop/list/item"
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageSize: 15,
|
||||||
|
cid: '',
|
||||||
|
page: 1,
|
||||||
|
current: 0,
|
||||||
|
priceOrderAsc: true, // 是否升序
|
||||||
|
goodsList: [],
|
||||||
|
scrollHeight: '',
|
||||||
|
loadStatus: 'loadmore',
|
||||||
|
timer: true, // 防止上拉加载短时间内多次调用
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
goodsItem
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
current(value) {
|
||||||
|
this.page = 1;
|
||||||
|
this.goodsList = [];
|
||||||
|
this.getStoreGoodsList({ laod: 'reload' });
|
||||||
|
},
|
||||||
|
priceOrderAsc(value) {
|
||||||
|
this.page = 1;
|
||||||
|
this.getStoreGoodsList({ laod: 'reload' });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
if(option.cid == 'all') {
|
||||||
|
this.current = 0;
|
||||||
|
this.cid = 0;
|
||||||
|
} else if(option.cid == 'new') {
|
||||||
|
this.current = 2;
|
||||||
|
this.cid = 0;
|
||||||
|
} else {
|
||||||
|
this.cid = option.cid;
|
||||||
|
}
|
||||||
|
this.setTitle(option.name);
|
||||||
|
this.sid = option.sid;
|
||||||
|
this.setViewHeight();
|
||||||
|
this.getStoreGoodsList({ load: 'reload' });
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
setOrderSort() {
|
||||||
|
let sort = '';
|
||||||
|
if(this.current == 0) {
|
||||||
|
sort = 'goods_sort';
|
||||||
|
} else if(this.current == 1) {
|
||||||
|
sort = 'goods_salenum';
|
||||||
|
} else if(this.current == 2) {
|
||||||
|
sort = 'goods_addtime';
|
||||||
|
} else if(this.current == 3) {
|
||||||
|
if(this.priceOrderAsc) sort = 'goods_price_asc';
|
||||||
|
else sort = 'goods_price_desc';
|
||||||
|
}
|
||||||
|
return sort;
|
||||||
|
},
|
||||||
|
// 排序方式 goods_salenum:销量 evaluation_count:评价 goods_price_asc:价格从低到高 goods_price_desc:价格从高到低
|
||||||
|
async getStoreGoodsList({ load = 'reload' } = {}) {
|
||||||
|
const sort = this.setOrderSort();
|
||||||
|
let params = {
|
||||||
|
id: this.sid,
|
||||||
|
page: this.page,
|
||||||
|
order: sort,
|
||||||
|
};
|
||||||
|
console.log(this.cid);
|
||||||
|
if(this.cid) Object.assign(params, { gc_id: this.cid })
|
||||||
|
const res = await this.$u.api.getStoreGoodsList(params);
|
||||||
|
this.timer = true;
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.pageSize = res.data.per_page;
|
||||||
|
if(load == 'reload') this.goodsList = res.data.data;
|
||||||
|
else if(load == 'loadmore') this.goodsList.push(...res.data.data);
|
||||||
|
}
|
||||||
|
return res.data.data.length;
|
||||||
|
},
|
||||||
|
loadMore() {
|
||||||
|
if(this.goodsList.length < this.pageSize) return false;
|
||||||
|
if(!this.timer) return false;
|
||||||
|
this.loadStatus = "loading";
|
||||||
|
this.page++;
|
||||||
|
this.getStoreGoodsList({ load: 'loadmore' }).then(length => {
|
||||||
|
if(length == 0) {
|
||||||
|
this.page--;
|
||||||
|
this.loadStatus = 'nomore';
|
||||||
|
} else {
|
||||||
|
this.loadStatus = 'loading';
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadStatus = "nomore";
|
||||||
|
this.page--;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
switchCurrent(current) {
|
||||||
|
if(current == 3 && this.current == 3) this.priceOrderAsc = !this.priceOrderAsc;
|
||||||
|
this.current = current;
|
||||||
|
},
|
||||||
|
setViewHeight() {
|
||||||
|
const res = uni.getSystemInfoSync();
|
||||||
|
this.scrollHeight = res.windowHeight - 90 / 2 + 'px';
|
||||||
|
// console.log(this.scrollHeight);
|
||||||
|
},
|
||||||
|
toDetailsPage(id) {
|
||||||
|
this.$u.route('/pageB/sdetails/index', {
|
||||||
|
id: id,
|
||||||
|
type: 1 // 商品详情 商品类型 1普通 2拼团 3秒杀 4优惠券
|
||||||
|
});
|
||||||
|
},
|
||||||
|
setTitle(title){
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: title
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.classify-goods {
|
||||||
|
width: 100%;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
.tab-container {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 30rpx 40rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
> view {
|
||||||
|
height: 30rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
}
|
||||||
|
.price {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
.text {
|
||||||
|
margin-right: 5rpx;
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.current {
|
||||||
|
color: rgba(255,120,15,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.scroll-container {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
.goods-container {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
// .goods-view {
|
||||||
|
// margin: 0 auto;
|
||||||
|
// width: 690rpx;
|
||||||
|
// display: flex;
|
||||||
|
// background-color: #F5F5F5;
|
||||||
|
// margin-bottom: 30rpx;
|
||||||
|
// align-items: center;
|
||||||
|
// > image {
|
||||||
|
// width: 220rpx;
|
||||||
|
// height: 170rpx;
|
||||||
|
// flex-shrink: 0;
|
||||||
|
// margin-right: 30rpx;
|
||||||
|
// }
|
||||||
|
// .right {
|
||||||
|
// width: 418rpx;
|
||||||
|
// .name {
|
||||||
|
// font-size: 30rpx;
|
||||||
|
// color: rgba(51,51,51,1);
|
||||||
|
// margin-bottom: 20rpx;
|
||||||
|
// }
|
||||||
|
// .briefing {
|
||||||
|
// font-size: 28rpx;
|
||||||
|
// color: rgba(102,102,102,1);
|
||||||
|
// line-height: 36rpx;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -3,14 +3,14 @@
|
|||||||
<view class="top">
|
<view class="top">
|
||||||
<image :src="info.store_avatar"></image>
|
<image :src="info.store_avatar"></image>
|
||||||
<view class="name">{{info.store_name}}</view>
|
<view class="name">{{info.store_name}}</view>
|
||||||
<view class="info">创建时间:{{store_addtime|date}} | {{info.live_store_address}}</view>
|
<view class="info">创建时间:{{ info.store_addtime | date('yyyy年mm月dd日') }} | {{ info.live_store_address || '暂无地址' }}</view>
|
||||||
<view class="num">
|
<view class="num">
|
||||||
<view>
|
<view>
|
||||||
<view class="value">{{info.store_collect}}</view>
|
<view class="value">{{info.store_collect}}</view>
|
||||||
<view class="title">粉丝数</view>
|
<view class="title">粉丝数</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="value">23435</view>
|
<view class="value">{{ info.evaluatecount }}</view>
|
||||||
<view class="title">评价</view>
|
<view class="title">评价</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
@@ -22,9 +22,9 @@
|
|||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<view>工商执照</view>
|
<view>工商执照</view>
|
||||||
<image></image>
|
<u-icon name="arrow-down" color="#999999" size="28"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="image-list">
|
<view class="image-list" v-if="info.business_licence_number_electronic">
|
||||||
<image :src="info.business_licence_number_electronic"></image>
|
<image :src="info.business_licence_number_electronic"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -37,9 +37,9 @@ export default {
|
|||||||
info:{}
|
info:{}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(){
|
onLoad(option){
|
||||||
this.$u.api.getStoreInfo({id:1}).then((res)=>{
|
this.$u.api.getStoreInfo({id: option.id}).then((res)=>{
|
||||||
console.log(res)
|
// console.log(res)
|
||||||
this.info = res.data
|
this.info = res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -113,11 +113,6 @@ export default {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: rgba(51,51,51,1);
|
color: rgba(51,51,51,1);
|
||||||
}
|
}
|
||||||
> image {
|
|
||||||
width: 24rpx;
|
|
||||||
height: 14rpx;
|
|
||||||
background-color: aqua;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.image-list {
|
.image-list {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
|||||||
200
pageC/merchant/goods.vue
Normal file
@@ -0,0 +1,200 @@
|
|||||||
|
<template>
|
||||||
|
<view class="classify-goods">
|
||||||
|
<view class="tab-container">
|
||||||
|
<view class="overall" :class="{ 'current' : current == 0 }" @click="switchCurrent(0)">综合</view>
|
||||||
|
<view class="salenum" :class="{ 'current' : current == 1 }" @click="switchCurrent(1)">销量</view>
|
||||||
|
<view class="new" :class="{ 'current' : current == 2 }" @click="switchCurrent(2)">新品</view>
|
||||||
|
<view class="price" :class="{ 'current' : current == 3 }" @click="switchCurrent(3)">
|
||||||
|
<view class="text">价格</view>
|
||||||
|
<view class="icon">
|
||||||
|
<u-icon name="arrow-up-fill" :color="(current == 3 && priceOrderAsc) ? '#FF780F' : '#333333'" size="22"></u-icon>
|
||||||
|
<u-icon name="arrow-down-fill" :color="(current == 3 && !priceOrderAsc) ? '#FF780F' : '#333333'" size="22"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<scroll-view scroll-y class="scroll-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore">
|
||||||
|
<view class="goods-container">
|
||||||
|
<view v-for="goods in goodsList" :key="goods.goods_id" class="goods-view" @click="toDetailsPage(goods.goods_id)">
|
||||||
|
<goodsItem :info="goods"></goodsItem>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
|
||||||
|
<u-empty mode="list" v-if="!goodsList.length"></u-empty>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import goodsItem from "@/components/shop/list/item"
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pageSize: 15,
|
||||||
|
cid: '',
|
||||||
|
page: 1,
|
||||||
|
current: 0,
|
||||||
|
priceOrderAsc: true, // 是否升序
|
||||||
|
goodsList: [],
|
||||||
|
scrollHeight: '',
|
||||||
|
loadStatus: 'loadmore',
|
||||||
|
timer: true, // 防止上拉加载短时间内多次调用
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
goodsItem
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
sid: String
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
current(value) {
|
||||||
|
this.page = 1;
|
||||||
|
this.goodsList = [];
|
||||||
|
this.getStoreGoodsList({ laod: 'reload' });
|
||||||
|
},
|
||||||
|
priceOrderAsc(value) {
|
||||||
|
this.page = 1;
|
||||||
|
this.getStoreGoodsList({ laod: 'reload' });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.setViewHeight();
|
||||||
|
this.getStoreGoodsList({ load: 'reload' });
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
setOrderSort() {
|
||||||
|
let sort = '';
|
||||||
|
if(this.current == 0) {
|
||||||
|
sort = 'goods_sort';
|
||||||
|
} else if(this.current == 1) {
|
||||||
|
sort = 'goods_salenum';
|
||||||
|
} else if(this.current == 2) {
|
||||||
|
sort = 'goods_addtime';
|
||||||
|
} else if(this.current == 3) {
|
||||||
|
if(this.priceOrderAsc) sort = 'goods_price_asc';
|
||||||
|
else sort = 'goods_price_desc';
|
||||||
|
}
|
||||||
|
return sort;
|
||||||
|
},
|
||||||
|
// 排序方式 goods_salenum:销量 evaluation_count:评价 goods_price_asc:价格从低到高 goods_price_desc:价格从高到低
|
||||||
|
async getStoreGoodsList({ load = 'reload' } = {}) {
|
||||||
|
const sort = this.setOrderSort();
|
||||||
|
const res = await this.$u.api.getStoreGoodsList({
|
||||||
|
id: this.sid,
|
||||||
|
page: this.page,
|
||||||
|
order: sort,
|
||||||
|
})
|
||||||
|
this.timer = true;
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.pageSize = res.data.per_page;
|
||||||
|
if(load == 'reload') this.goodsList = res.data.data;
|
||||||
|
else if(load == 'loadmore') this.goodsList.push(...res.data.data);
|
||||||
|
}
|
||||||
|
return res.data.data.length;
|
||||||
|
},
|
||||||
|
loadMore() {
|
||||||
|
if(this.goodsList.length < this.pageSize) return false;
|
||||||
|
if(!this.timer) return false;
|
||||||
|
this.loadStatus = "loading";
|
||||||
|
this.page++;
|
||||||
|
this.getStoreGoodsList({ load: 'loadmore' }).then(length => {
|
||||||
|
if(length == 0) {
|
||||||
|
this.page--;
|
||||||
|
this.loadStatus = 'nomore';
|
||||||
|
} else {
|
||||||
|
this.loadStatus = 'loading';
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadStatus = "nomore";
|
||||||
|
this.page--;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
switchCurrent(current) {
|
||||||
|
if(current == 1 && this.current == 1) this.priceOrderAsc = !this.priceOrderAsc;
|
||||||
|
this.current = current;
|
||||||
|
},
|
||||||
|
setViewHeight() {
|
||||||
|
const res = uni.getSystemInfoSync();
|
||||||
|
const otherHeight = 347 + 140 + 20 + 98;
|
||||||
|
this.scrollHeight = res.windowHeight - otherHeight / 2 + 'px';
|
||||||
|
// console.log(this.scrollHeight);
|
||||||
|
},
|
||||||
|
toDetailsPage(id) {
|
||||||
|
this.$u.route('/pageB/sdetails/index', {
|
||||||
|
id: id,
|
||||||
|
type: 1 // 商品详情 商品类型 1普通 2拼团 3秒杀 4优惠券
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.classify-goods {
|
||||||
|
width: 100%;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
.tab-container {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 30rpx 40rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
> view {
|
||||||
|
height: 30rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
}
|
||||||
|
.price {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
.text {
|
||||||
|
margin-right: 5rpx;
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.current {
|
||||||
|
color: rgba(255,120,15,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.scroll-container {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
.goods-container {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
// .goods-view {
|
||||||
|
// margin: 0 auto;
|
||||||
|
// width: 690rpx;
|
||||||
|
// display: flex;
|
||||||
|
// background-color: #F5F5F5;
|
||||||
|
// margin-bottom: 30rpx;
|
||||||
|
// align-items: center;
|
||||||
|
// > image {
|
||||||
|
// width: 220rpx;
|
||||||
|
// height: 170rpx;
|
||||||
|
// flex-shrink: 0;
|
||||||
|
// margin-right: 30rpx;
|
||||||
|
// }
|
||||||
|
// .right {
|
||||||
|
// width: 418rpx;
|
||||||
|
// .name {
|
||||||
|
// font-size: 30rpx;
|
||||||
|
// color: rgba(51,51,51,1);
|
||||||
|
// margin-bottom: 20rpx;
|
||||||
|
// }
|
||||||
|
// .briefing {
|
||||||
|
// font-size: 28rpx;
|
||||||
|
// color: rgba(102,102,102,1);
|
||||||
|
// line-height: 36rpx;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="merchant">
|
<view class="merchant">
|
||||||
<view v-if="show">
|
<!-- <view v-if="show" class="show-hide">
|
||||||
<view>
|
<view>
|
||||||
<image></image>
|
<image></image>
|
||||||
<view>消息</view>
|
<view>消息</view>
|
||||||
@@ -13,67 +13,70 @@
|
|||||||
<image></image>
|
<image></image>
|
||||||
<view>我的</view>
|
<view>我的</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="top" :style="{'background-image':'url(' + info.store_banner + ')'}">
|
<view class="top" :style="{'background-image':'url(' + info.store_banner + ')'}">
|
||||||
<image :src="info.store_avatar"></image>
|
<image :src="info.store_avatar"></image>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="name u-line-1">{{info.store_name}}</view>
|
<view class="name u-line-1">{{info.store_name}}</view>
|
||||||
<view class="num">粉丝数:{{info.store_collect}}</view>
|
<view class="num">粉丝数:{{info.store_collect}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">
|
<view class="btn" @click="attentionMember">
|
||||||
<image></image>
|
<image src="/static/image/shop/8.png"></image>
|
||||||
<view>{{ 0 ? "关注" : "已关注" }}</view>
|
<view>{{ info.is_attention == 0 ? "关注" : "已关注" }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="follow">
|
<view class="follow" v-if="info.attention_member && info.attention_member.length">
|
||||||
<view class="title">关注</view>
|
<view class="title">关注</view>
|
||||||
<scroll-view scroll-x class="list">
|
<scroll-view scroll-x class="list">
|
||||||
<view class="list-items">
|
<view class="list-items">
|
||||||
<view v-for="(item, index) in 9" :key="index" class="item">
|
<view v-for="(item, index) in info.attention_member" :key="index" class="item">
|
||||||
<image></image>
|
<image :src="item.friend_frommavatar"></image>
|
||||||
<view class="nickname u-line-1">用户昵称</view>
|
<view class="nickname u-line-1">{{ item.friend_frommname }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<view class="classify" v-if="cur==0">
|
<view class="video-image" v-if="cur==0 && indextop.length">
|
||||||
<view v-for="item in indextop" :key="item.id">
|
<view v-for="item in indextop" :key="item.id">
|
||||||
<videoTop :url="item.url" v-if="item.type == 2"></videoTop>
|
<videoTop :url="item.url" v-if="item.type == 2"></videoTop>
|
||||||
<imageTop v-else :url="item.url"></imageTop>
|
<imageTop v-else :url="item.url"></imageTop>
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;flex-wrap: wrap;">
|
<view style="display: flex;flex-wrap: wrap;" v-if="indexlist.length">
|
||||||
<listitem :style="{'margin-left': index%2 == 1 ? '20rpx':'0'}" v-for="(item,index) in indexlist" :key="item.id" :type="item.type" :url="item.url"></listitem>
|
<listitem :style="{'margin-left': index%2 == 1 ? '20rpx':'0'}" v-for="(item,index) in indexlist" :key="item.id" :type="item.type" :url="item.url"></listitem>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<!-- 商品筛选排序未完成 -->
|
<!-- 商品筛选排序未完成 -->
|
||||||
<view class="item" v-if="cur==1">
|
<view class="item" v-if="cur==1">
|
||||||
<item v-for="item in list" :key="item.gc_id" :info="item" class="item"></item>
|
<!-- <item v-for="item in list" :key="item.gc_id" :info="item" class="item"></item> -->
|
||||||
|
<goods :sid="sid"></goods>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tabbar">
|
<view class="tabbar">
|
||||||
<view @click="cur=0">
|
<view @click="switchCurrent(0)">
|
||||||
<image></image>
|
<image src="/static/image/shop/9.png"></image>
|
||||||
<view>商品分类</view>
|
<view>商品分类</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="cur=1">
|
<view @click="switchCurrent(1)">
|
||||||
<image></image>
|
<image src="/static/image/shop/10.png" v-if="cur != 1"></image>
|
||||||
<view>商品列表</view>
|
<image src="/static/image/shop/13.png" v-else></image>
|
||||||
|
<view :style="{ color: cur == 1 ? '#FF780F' : '#999999' }">商品列表</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toDetailsPage">
|
<view @click="switchCurrent(2)">
|
||||||
<image></image>
|
<image src="/static/image/shop/11.png"></image>
|
||||||
<view>店铺信息</view>
|
<view>店铺信息</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view @click="switchCurrent(3)">
|
||||||
<image></image>
|
<image src="/static/image/shop/12.png"></image>
|
||||||
<view>联系客服</view>
|
<view>联系客服</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import item from "@/components/shop/list/item"
|
// import item from "@/components/shop/list/item"
|
||||||
|
import goods from "./goods"
|
||||||
import videoTop from "../components/merchant/video-top"
|
import videoTop from "../components/merchant/video-top"
|
||||||
import imageTop from "../components/merchant/image-top"
|
import imageTop from "../components/merchant/image-top"
|
||||||
import listitem from "../components/merchant/list-item"
|
import listitem from "../components/merchant/list-item"
|
||||||
@@ -81,6 +84,7 @@ import listitem from "../components/merchant/list-item"
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
sid: '',
|
||||||
show: false,
|
show: false,
|
||||||
cur: 0,
|
cur: 0,
|
||||||
list:[],
|
list:[],
|
||||||
@@ -90,38 +94,64 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
components:{
|
components:{
|
||||||
item,
|
goods,
|
||||||
videoTop,
|
videoTop,
|
||||||
imageTop,
|
imageTop,
|
||||||
listitem
|
listitem
|
||||||
},
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.getStoreInfo();
|
||||||
|
this.getStoreImgVideoList();
|
||||||
|
},
|
||||||
|
onNavigationBarButtonTap(e) {
|
||||||
|
// console.log(e.index);
|
||||||
|
if(e.index == 1) this.$u.route('/pageC/cart/index');
|
||||||
|
// if(e.index == 0) this.show = true;
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toDetailsPage() {
|
switchCurrent(current) {
|
||||||
uni.navigateTo({
|
this.cur = current;
|
||||||
url: './details'
|
if(current == 0) {
|
||||||
});
|
this.$u.route('/pageC/merchant/storeClassify', { id: this.sid });
|
||||||
|
} else if(current == 2) {
|
||||||
|
this.$u.route('./details', { id: this.sid });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(){
|
getStoreInfo() {
|
||||||
this.$u.api.getStoreGoodsList({id:1}).then((res)=>{
|
this.$u.api.getStoreInfo({ id: this.sid }).then((res)=>{
|
||||||
// console.log(res.data)
|
this.info = res.data;
|
||||||
this.list= res.data.list
|
uni.stopPullDownRefresh();
|
||||||
})
|
})
|
||||||
this.$u.api.getStoreImgVideoList({id:1}).then((res)=>{
|
},
|
||||||
console.log(res.data)
|
getStoreImgVideoList() {
|
||||||
this.indextop = [res.data[0],res.data[1]]
|
this.$u.api.getStoreImgVideoList({ id: this.sid }).then((res)=>{
|
||||||
this.indexlist = res.data.slice(2,)
|
if(res.data.length) {
|
||||||
|
this.indextop = [res.data[0], res.data[1]];
|
||||||
|
this.indexlist = res.data.slice(2,);
|
||||||
|
}
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
})
|
})
|
||||||
this.$u.api.getStoreInfo({id:1}).then((res)=>{
|
},
|
||||||
console.log(res)
|
attentionMember() {
|
||||||
this.info = res.data
|
this.$u.api.attentionMember({ member_id: this.info.member_id }).then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.getStoreInfo();
|
||||||
|
}
|
||||||
|
this.$u.toast(res.message);
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onLoad(option){
|
||||||
|
this.sid = option.id;
|
||||||
|
console.log(this.sid);
|
||||||
|
this.getStoreInfo();
|
||||||
|
this.getStoreImgVideoList();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.merchant {
|
.merchant {
|
||||||
min-height: 100vh;
|
// min-height: 100vh;
|
||||||
background-color: #ECECEC;
|
background-color: #ECECEC;
|
||||||
padding-top: calc(350rpx - var(--window-top));
|
padding-top: calc(350rpx - var(--window-top));
|
||||||
.top {
|
.top {
|
||||||
@@ -168,7 +198,6 @@ export default {
|
|||||||
height: 28rpx;
|
height: 28rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-right: 14rpx;
|
margin-right: 14rpx;
|
||||||
background-color: aqua;
|
|
||||||
}
|
}
|
||||||
> view {
|
> view {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -230,13 +259,18 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.main{
|
.main{
|
||||||
|
.video-image {
|
||||||
padding-bottom: 98rpx;
|
padding-bottom: 98rpx;
|
||||||
}
|
}
|
||||||
|
> view {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
.tabbar {
|
.tabbar {
|
||||||
border-top: 1rpx #DBDADA solid;
|
border-top: 1rpx #DBDADA solid;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
background: rgb(95, 64, 64);
|
background: rgba(251,251,251,1);
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 10rpx 55rpx;
|
padding: 10rpx 55rpx;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -251,7 +285,6 @@ export default {
|
|||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
margin-bottom: 15rpx;
|
margin-bottom: 15rpx;
|
||||||
background-color: aqua;
|
|
||||||
}
|
}
|
||||||
> view {
|
> view {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
@@ -259,12 +292,5 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.item{
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: space-between;
|
|
||||||
// margin-top: 20rpx;
|
|
||||||
padding:25rpx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
88
pageC/merchant/storeClassify.vue
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
<template>
|
||||||
|
<view class="classify">
|
||||||
|
<view class="item-view" @click="viewGoods({ type: 'all', name: '全部宝贝' })">
|
||||||
|
<view>全部宝贝</view>
|
||||||
|
<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
|
||||||
|
</view>
|
||||||
|
<view class="item-view" @click="viewGoods({ type: 'new', name: '新品上架' })">
|
||||||
|
<view>新品上架</view>
|
||||||
|
<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
|
||||||
|
</view>
|
||||||
|
<view class="classify-container">
|
||||||
|
<view v-for="classifyA in classifyList" :key="classifyA.gc_parent_id" class="classify-view">
|
||||||
|
<view class="title">{{ classifyA.gc_parent_name }}</view>
|
||||||
|
<view class="classifyA-view">
|
||||||
|
<view v-for="classifyB in classifyA.gc_child" :key="classifyB.gc_id" class="classifyB-item u-line-1" @click="viewGoods({ type: classifyB.gc_parent_id, name: classifyB.gc_parent_name })">{{ classifyB.gc_parent_name }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
classifyList: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.sid = option.id;
|
||||||
|
this.getStoreClassifyList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
viewGoods({ type, name }) {
|
||||||
|
console.log(11);
|
||||||
|
this.$u.route('pageC/merchant/classifyGoods', { sid: this.sid, cid: type, name: name });
|
||||||
|
},
|
||||||
|
getStoreClassifyList() {
|
||||||
|
this.$u.api.getStoreClassifyList({ id: this.sid }).then(res => {
|
||||||
|
this.classifyList = res.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.classify {
|
||||||
|
padding-top: 20rpx;
|
||||||
|
background-color: #ECECEC;
|
||||||
|
min-height: calc(100vh - var(--window-top));
|
||||||
|
.item-view {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 35rpx 30rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.classify-container {
|
||||||
|
.classify-view {
|
||||||
|
padding: 30rpx 35rpx;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
.title {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
margin-bottom: 34rpx;
|
||||||
|
}
|
||||||
|
.classifyA-view {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
.classifyB-item {
|
||||||
|
width: 335rpx;
|
||||||
|
height: 74rpx;
|
||||||
|
line-height: 74rpx;
|
||||||
|
background: rgba(255,241,230,1);
|
||||||
|
padding: 0 20rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -32,6 +32,9 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
page {
|
||||||
|
background-color: #ECECEC;
|
||||||
|
}
|
||||||
.sousuo {
|
.sousuo {
|
||||||
height: 113rpx;
|
height: 113rpx;
|
||||||
border: 1px #f00 solid;
|
border: 1px #f00 solid;
|
||||||
|
|||||||
@@ -67,6 +67,34 @@ export default {
|
|||||||
onLoad() {
|
onLoad() {
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
},
|
},
|
||||||
|
// 监听头像裁剪
|
||||||
|
created() {
|
||||||
|
// uni.$on('uAvatarCropper', path => {
|
||||||
|
// const url = this.$u.http.config.baseUrl + '/Upload/uploadfile';
|
||||||
|
// this.avatar = path;
|
||||||
|
// // 可以在此上传到服务端
|
||||||
|
// // uni.uploadFile({
|
||||||
|
// // url: 'http://www.example.com/upload',
|
||||||
|
// // filePath: path,
|
||||||
|
// // name: 'file',
|
||||||
|
// // complete: (res) => {
|
||||||
|
// // console.log(res);
|
||||||
|
// // }
|
||||||
|
// // });
|
||||||
|
// common.uploadFile({
|
||||||
|
// url: url,
|
||||||
|
// name: 'avatar',
|
||||||
|
// filePath: path
|
||||||
|
// }).then(result => {
|
||||||
|
// // console.log(result);
|
||||||
|
// this.$set(this, 'avatar', result.file_path);
|
||||||
|
// // this.avatar = result.file_path;
|
||||||
|
// this.uploadPath = result.file_name;
|
||||||
|
// }, error => {
|
||||||
|
// this.$u.toast(error);
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
},
|
||||||
onNavigationBarButtonTap(e) {
|
onNavigationBarButtonTap(e) {
|
||||||
if( e.index == 0 ) uni.navigateBack();
|
if( e.index == 0 ) uni.navigateBack();
|
||||||
},
|
},
|
||||||
@@ -85,7 +113,7 @@ export default {
|
|||||||
filePath: res.tempFilePaths[0]
|
filePath: res.tempFilePaths[0]
|
||||||
}).then(result => {
|
}).then(result => {
|
||||||
// console.log(result);
|
// console.log(result);
|
||||||
this.$set(this, 'avatar', result.file_path);
|
// this.$set(this, 'avatar', result.file_path);
|
||||||
// this.avatar = result.file_path;
|
// this.avatar = result.file_path;
|
||||||
this.uploadPath = result.file_name;
|
this.uploadPath = result.file_name;
|
||||||
}, error => {
|
}, error => {
|
||||||
@@ -94,6 +122,17 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 头像裁剪
|
||||||
|
// chooseAvatar() {
|
||||||
|
// this.$u.route({
|
||||||
|
// url: '/uview-ui/components/u-avatar-cropper/u-avatar-cropper',
|
||||||
|
// params: {
|
||||||
|
// destWidth: 300,
|
||||||
|
// rectWidth: 200,
|
||||||
|
// fileType: 'jpg',
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// },
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
this.$u.api.getMemberInfo().then(res => {
|
this.$u.api.getMemberInfo().then(res => {
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
@@ -103,7 +142,7 @@ export default {
|
|||||||
userInfo.member_mobile,
|
userInfo.member_mobile,
|
||||||
userInfo.member_birthday,
|
userInfo.member_birthday,
|
||||||
userInfo.member_sex,
|
userInfo.member_sex,
|
||||||
userInfo.member_avatar,
|
userInfo.member_avatar + '?' + new Date().getTime(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -117,6 +156,7 @@ export default {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
|
// this.$u.toast(res.message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,23 +1,89 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="collection">
|
<view class="collection">
|
||||||
<view class="item-box" v-for="(item, index) in 5" :key="index">
|
<view class="container">
|
||||||
<videoItem></videoItem>
|
<view class="item-box" v-for="(item, index) in articleList" :key="index" @click="toDetailsPage(item.article_id)">
|
||||||
|
<view class="video-item" v-if="item">
|
||||||
|
<image class="head" :src="item.article_pic" v-if="item.type == 1"></image>
|
||||||
|
<view class="header_fist" v-else>
|
||||||
|
<view class="backes"></view>
|
||||||
|
<image class="head" :src="item.article_pic"></image>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="title u-line-1">{{ item.article_title }}</view>
|
||||||
|
<view class="jianjie u-line-1">{{ item.article_content }}</view>
|
||||||
|
<view class="user">
|
||||||
|
<view class="info">
|
||||||
|
<image :src="item.member_avatar"></image>
|
||||||
|
<text>{{ item.member_nickname }}</text>
|
||||||
|
</view>
|
||||||
|
<view @click.stop="delArticle(item.article_id)">
|
||||||
|
<u-icon name="trash" color="#333" size="36"></u-icon>
|
||||||
|
</view>
|
||||||
|
<!-- <image src="/static/image/common/4.png" @click.stop="showAction(item)"></image> -->
|
||||||
|
<!-- <view class="action" v-if="show == item.article_id">
|
||||||
|
<view class="bubble">
|
||||||
|
<view @click.stop="delArticle(item.article_id)">
|
||||||
|
<image src="/static/image/common/8.png"></image>
|
||||||
|
<text>删除</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<view class="layer" v-if="show == item.article_id" @click.stop="show=-1"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-empty mode="list" v-if="!articleList.length" color="#000" img-width="200" font-size="30" margin-top="120"></u-empty>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import videoItem from "@/components/index/video-item/index"
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {
|
||||||
|
show: -1,
|
||||||
|
articleList: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.articleCollectList();
|
||||||
|
},
|
||||||
|
// 下拉刷新
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.articleCollectList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showAction(item) {
|
||||||
|
this.show = this.show > 0 ? -1 : item.article_id;
|
||||||
|
},
|
||||||
|
articleCollectList() {
|
||||||
|
this.$u.api.articleCollectList().then(res => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.articleList = res.data;
|
||||||
|
} else {
|
||||||
|
this.articleList = [];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
delArticle(id) {
|
||||||
|
this.$u.api.articleCollect({ article_id: id }).then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.articleCollectList();
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toDetailsPage(id) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pageB/photo/index?id=' + id
|
||||||
|
});
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
videoItem
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.collection {
|
.collection {
|
||||||
|
.container {
|
||||||
border-top: 1rpx solid #ECECEC;
|
border-top: 1rpx solid #ECECEC;
|
||||||
padding: 21rpx 30rpx 0;
|
padding: 21rpx 30rpx 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -26,6 +92,143 @@ export default {
|
|||||||
&:not(:nth-child(2n)) {
|
&:not(:nth-child(2n)) {
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
|
.video-item{
|
||||||
|
height: 540rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
width: 335rpx;
|
||||||
|
box-shadow:0 3rpx 7rpx 0 rgba(153, 153, 153, 0.35);
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
.head{
|
||||||
|
width: 100%;
|
||||||
|
height: 334rpx;
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
margin:0 auto;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 30rpx;
|
||||||
|
width: 300rpx;
|
||||||
|
}
|
||||||
|
.jianjie{
|
||||||
|
// height: 60rpx;
|
||||||
|
margin:0 auto;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #666;
|
||||||
|
line-height: 30rpx;
|
||||||
|
width: 300rpx;
|
||||||
|
margin-left: 18rpx;
|
||||||
|
}
|
||||||
|
.user{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin:0 auto;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
width: 300rpx;
|
||||||
|
position: relative;
|
||||||
|
.info {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
>image{
|
||||||
|
width: 38rpx;
|
||||||
|
height: 38rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
|
||||||
|
}
|
||||||
|
>text{
|
||||||
|
font-size: 20rpx;
|
||||||
|
color:#333;
|
||||||
|
margin-left: 9rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>image{
|
||||||
|
width: 37rpx;
|
||||||
|
height: 8rpx;
|
||||||
|
}
|
||||||
|
.action {
|
||||||
|
z-index: 19;
|
||||||
|
position: absolute;
|
||||||
|
right: 0rpx;
|
||||||
|
bottom: 55rpx;
|
||||||
|
// width: 234rpx;
|
||||||
|
background: rgba(255,255,255,1);
|
||||||
|
box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(35,24,21,0.12);
|
||||||
|
border-radius: 6rpx;
|
||||||
|
.bubble {
|
||||||
|
position: relative;
|
||||||
|
background-color: #fff;
|
||||||
|
&::after {
|
||||||
|
position: absolute;
|
||||||
|
right: 10rpx;
|
||||||
|
bottom: 0;
|
||||||
|
content: '';
|
||||||
|
width: 60rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
background-color: inherit;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
margin-top: -10rpx;
|
||||||
|
z-index: -1;
|
||||||
|
box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(35,24,21,0.12);
|
||||||
|
}
|
||||||
|
> view {
|
||||||
|
padding: 9rpx 12rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
&:not(:last-child) {
|
||||||
|
border-bottom: 2rpx #ECECEC solid;
|
||||||
|
}
|
||||||
|
@mixin image-class($width, $height, $right) {
|
||||||
|
width: $width;
|
||||||
|
height: $height;
|
||||||
|
margin-right: $right;
|
||||||
|
}
|
||||||
|
> image {
|
||||||
|
&:first-child {
|
||||||
|
@include image-class($width: 21rpx, $height: 22rpx, $right: 12rpx);
|
||||||
|
}
|
||||||
|
&:nth-child(2) {
|
||||||
|
@include image-class($width: 22rpx, $height: 22rpx, $right: 12rpx);
|
||||||
|
}
|
||||||
|
&:last-child {
|
||||||
|
@include image-class($width: 24rpx, $height: 20rpx, $right: 9rpx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
> text {
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.layer {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: 9;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.header_fist{
|
||||||
|
position: relative;
|
||||||
|
.backes{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
background: rgba(0,0,0,0.6);
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -3,11 +3,11 @@
|
|||||||
<view class="integral-top">
|
<view class="integral-top">
|
||||||
<view>
|
<view>
|
||||||
<view class="title">总积分</view>
|
<view class="title">总积分</view>
|
||||||
<view class="value">{{ memberInfo.member_points }}</view>
|
<view class="value">{{ memberInfo.member_points || 0 }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="title">经验值</view>
|
<view class="title">经验值</view>
|
||||||
<view class="value">{{ memberInfo.member_exppoints }}</view>
|
<view class="value">{{ memberInfo.member_exppoints || 0 }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="viewProgress">
|
<view @click="viewProgress">
|
||||||
<view class="title">预计进度</view>
|
<view class="title">预计进度</view>
|
||||||
|
|||||||
@@ -13,11 +13,25 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import common from '@/static/js/common.js';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
nodes: '<h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1>'
|
nodes: '',
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getMemberPointsStat();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getMemberPointsStat() {
|
||||||
|
this.$u.api.getMemberPointsStat().then((res)=>{
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
const nodes = res.data.grade_rule;
|
||||||
|
this.nodes = common.unescapeHTML(nodes);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -3,20 +3,11 @@
|
|||||||
<u-tabs-swiper ref="coupon" :list="couponGroupList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="couponCurrent" font-size="24" :show-bar="false" @change="couponTabsChange" height="88" ></u-tabs-swiper>
|
<u-tabs-swiper ref="coupon" :list="couponGroupList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="couponCurrent" font-size="24" :show-bar="false" @change="couponTabsChange" height="88" ></u-tabs-swiper>
|
||||||
<swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{ height: swiperHeight }">
|
<swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{ height: swiperHeight }">
|
||||||
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
|
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
|
||||||
<scroll-view scroll-y style="height: 100%;">
|
<scroll-view scroll-y style="height: 100%;" @scrolltolower="onreachBottom">
|
||||||
<view v-for="(coupon, index) in couponList" :key="index" class="coupon-item">
|
<view v-for="(coupon, index) in couponList" :key="index" class="coupon-item">
|
||||||
<!-- <img src="../static/mine/23.png" />
|
|
||||||
<view class="coupon-main">
|
|
||||||
<view class="coupon-title">萌店十元优惠券</view>
|
|
||||||
<view class="coupon-date">
|
|
||||||
<img src="../static/mine/26.png" />
|
|
||||||
<view>2020.05.17-2020.06.17</view>
|
|
||||||
</view>
|
|
||||||
<view class="coupon-integral">299积分</view>
|
|
||||||
</view>
|
|
||||||
<view class="coupon-btn">兑换</view> -->
|
|
||||||
<Coupon :couponInfo="coupon" :status='0' :type="0" @exchange="exchangeCoupon($event)"></Coupon>
|
<Coupon :couponInfo="coupon" :status='0' :type="0" @exchange="exchangeCoupon($event)"></Coupon>
|
||||||
</view>
|
</view>
|
||||||
|
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" v-if="couponList.length>=pageSize" @loadmore="onreachBottom"></u-loadmore>
|
||||||
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty>
|
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
@@ -28,12 +19,15 @@ import Coupon from "@/components/mine/coupon/index";
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
pageSize: 12,
|
||||||
swiperHeight: '',
|
swiperHeight: '',
|
||||||
couponCurrent: 0,
|
couponCurrent: 0,
|
||||||
swiperCouponCurrent: 0,
|
swiperCouponCurrent: 0,
|
||||||
couponGroupList: [],
|
couponGroupList: [],
|
||||||
couponList: [],
|
couponList: [],
|
||||||
page: 0,
|
page: 0,
|
||||||
|
loadStatus: 'loadmore',
|
||||||
|
timer: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -46,32 +40,51 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
couponCurrent(index) {
|
couponCurrent(index) {
|
||||||
const id = this.couponGroupList[index].gc_id;
|
const id = this.couponGroupList[index].gc_id;
|
||||||
this.getCouponList({ gc_id: id });
|
this.getCouponList({ gc_id: id, load: 'reload' });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onreachBottom() {
|
||||||
|
if(!this.timer) return false;
|
||||||
|
this.loadStatus = "loading";
|
||||||
|
this.page++;
|
||||||
|
this.getCouponList({
|
||||||
|
gc_id: this.couponGroupList[this.couponCurrent].gc_id,
|
||||||
|
load: 'loadmore',
|
||||||
|
}).then(length => {
|
||||||
|
if(length == 0) {
|
||||||
|
this.page--;
|
||||||
|
this.loadStatus = 'nomore';
|
||||||
|
} else {
|
||||||
|
this.loadStatus = 'loading';
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadStatus = "nomore";
|
||||||
|
this.page--;
|
||||||
|
})
|
||||||
|
},
|
||||||
getGoodsClass() {
|
getGoodsClass() {
|
||||||
this.$u.api.getGoodsClass().then(res => {
|
this.$u.api.getGoodsClass().then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.couponGroupList = res.data;
|
this.couponGroupList = res.data;
|
||||||
this.getCouponList(this.couponGroupList[0].gc_id);
|
this.getCouponList({ gc_id: this.couponGroupList[0].gc_id, load: 'reload' });
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getCouponList({ gc_id }) {
|
async getCouponList({ gc_id, load }) {
|
||||||
this.$u.api.getCouponList({
|
const res = await this.$u.api.getCouponList({
|
||||||
page: this.page,
|
page: this.page,
|
||||||
gc_id: gc_id,
|
gc_id: gc_id,
|
||||||
}).then(res => {
|
|
||||||
if(res.errCode == 0) {
|
|
||||||
this.couponList = res.data;
|
|
||||||
} else {
|
|
||||||
this.couponList = [];
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
this.timer = true;
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
if(load == 'reload') this.couponList = res.data;
|
||||||
|
else if(load == 'loadmore') this.couponList.push(...res.data);
|
||||||
|
}
|
||||||
|
return res.data.length;
|
||||||
},
|
},
|
||||||
exchangeCoupon(id) {
|
exchangeCoupon(id) {
|
||||||
console.log(id);
|
// console.log(id);
|
||||||
|
|
||||||
},
|
},
|
||||||
couponTabsChange(index) {
|
couponTabsChange(index) {
|
||||||
|
|||||||
@@ -1,58 +1,104 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="concerns">
|
<view class="concerns">
|
||||||
<u-index-list :scrollTop="scrollTop">
|
<view class="concerns-container">
|
||||||
<view v-for="(item, index) in indexList" :key="index">
|
<view v-for="(info, index) in list" :key="index">
|
||||||
<u-index-anchor :index="item" class="anchor-class" />
|
<view class="daren-item">
|
||||||
<view class="list-cell">
|
<image class="head" :src="info.friend_tomavatar"></image>
|
||||||
<image src="../static/mine/23.png"></image>
|
<text class="name">{{ info.friend_tomname || '' }}</text>
|
||||||
<view>阿迪达斯</view>
|
<view class="guanzhu" @click="changeType(info.friend_tomid)" v-if="info.friend_followstate == 1">取消关注</view>
|
||||||
</view>
|
|
||||||
<view class="list-cell">
|
|
||||||
列表2
|
|
||||||
</view>
|
|
||||||
<view class="list-cell">
|
|
||||||
列表3
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-index-list>
|
</view>
|
||||||
|
<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" margin-top="120"></u-empty>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
scrollTop: 0,
|
list: []
|
||||||
indexList: ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
onShow() {
|
||||||
this.scrollTop = e.scrollTop;
|
this.attentionMemberList();
|
||||||
|
},
|
||||||
|
// 下拉刷新
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.attentionMemberList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
attentionMemberList() {
|
||||||
|
this.$u.api.attentionMemberList().then(res => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.list = res.data;
|
||||||
|
} else {
|
||||||
|
this.list = [];
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
changeType(id) {
|
||||||
|
console.log(id);
|
||||||
|
this.$u.api.attentionMember({
|
||||||
|
member_id: id
|
||||||
|
}).then(res => {
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
this.attentionMemberList();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.concerns {
|
.concerns {
|
||||||
// padding: 35rpx 30rpx 0;
|
.concerns-container {
|
||||||
// .u-index-anchor {
|
padding: 30rpx;
|
||||||
// background-color: #ffffff !important;
|
|
||||||
// }
|
|
||||||
.list-cell {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
box-sizing: border-box;
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
&:not(:nth-child(3n)) {
|
||||||
width: 100%;
|
margin-right: 20rpx;
|
||||||
overflow: hidden;
|
}
|
||||||
margin: 50rpx 0;
|
.daren-item{
|
||||||
padding: 0 30rpx;
|
width: 215rpx;
|
||||||
> image {
|
height: 282rpx;
|
||||||
width: 70rpx;
|
display: flex;
|
||||||
height: 70rpx;
|
flex-direction: column;
|
||||||
border-radius: 10rpx;
|
align-items: center;
|
||||||
margin-right: 30rpx;
|
background-color: #fff;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
.head{
|
||||||
|
width: 80rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
background-color: #0f0;
|
||||||
|
}
|
||||||
|
.name{
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: 400;
|
||||||
|
margin-top: 23rpx;
|
||||||
|
}
|
||||||
|
.zhuangtai{
|
||||||
|
font-size:22rpx;
|
||||||
|
color: #999;
|
||||||
|
margin-top: 19rpx;
|
||||||
|
}
|
||||||
|
.guanzhu{
|
||||||
|
width: 130rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
background-color: #EDEDED;
|
||||||
|
font-size: 26rpx;
|
||||||
|
line-height: 50rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 19rpx;
|
||||||
|
border-radius: 25rpx;
|
||||||
|
}
|
||||||
|
.action{
|
||||||
|
background: #f3f3f3;
|
||||||
}
|
}
|
||||||
> view {
|
|
||||||
font-size: 30rpx;
|
|
||||||
color: rgba(102,102,102,1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="information">
|
<view class="information">
|
||||||
<view class="info-avatar">
|
<view class="info-avatar">
|
||||||
<u-avatar :src="userInfo.member_avatar" :size="120"></u-avatar>
|
<u-avatar :src="userInfo.member_avatar + '?' + new Date().getTime()" :size="120"></u-avatar>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
<view class="title">昵称</view>
|
<view class="title">昵称</view>
|
||||||
|
|||||||
@@ -1,73 +1,65 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="progress">
|
<view class="progress" v-if="memberInfo">
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="line-progress">
|
<view class="line-progress">
|
||||||
<view class="rank-value">lv1</view>
|
<view class="rank-value">lv{{ memberInfo.member_level }}</view>
|
||||||
<view class="line-box">
|
<view class="line-box">
|
||||||
<u-line-progress :percent="70" :show-percent="false" inactive-color="#FFFFFF" active-color="#F1A36B" height="30"></u-line-progress>
|
<u-line-progress :percent="percent" :show-percent="false" inactive-color="#FFFFFF" active-color="#F1A36B" height="30" :striped="true" :striped-active="true"></u-line-progress>
|
||||||
<text>78/99</text>
|
<text>{{ memberInfo.member_exppoints }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="rank-value">lv2</view>
|
<view class="rank-value">lv{{ memberInfo.member_level + 1 }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="exp-value">经验值<span>78</span></view>
|
<view class="exp-value">经验值<span>{{ memberInfo.member_exppoints }}</span></view>
|
||||||
<view class="distance">距离下一级还需要21经验值</view>
|
<view class="distance">距离下一级还需要{{ memberInfo.next_grade_exppoints_diff }}经验值</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="body">
|
<view class="body">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<image src="/static/image/mine/34.png"></image>
|
<image src="/static/image/mine/34.png"></image>
|
||||||
<text>等级定义</text>
|
<text>等级定义</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="rank-list">
|
<!-- <view class="rank-list">
|
||||||
<view v-for="(rank, index) in rank" :key="index" class="list-item">
|
<view v-for="(rank, index) in rank" :key="index" class="list-item">
|
||||||
<view class="rank-value">lv{{ rank.level }}</view>
|
<view class="rank-value">lv{{ rank.level }}</view>
|
||||||
<view class="rank-interval"><span>经验值:</span>{{ rank.max == '--' ? rank.min + '及以上' : rank.min + '~' + rank.max }}</view>
|
<view class="rank-interval"><span>经验值:</span>{{ rank.max == '--' ? rank.min + '及以上' : rank.min + '~' + rank.max }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<view class="rich">
|
||||||
|
<rich-text :nodes="nodes"></rich-text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import common from '@/static/js/common.js';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
rank: [
|
percent: 0,
|
||||||
{
|
memberInfo: {},
|
||||||
level: 1,
|
nodes: '',
|
||||||
min: 50,
|
|
||||||
max: 99,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
level: 2,
|
|
||||||
min: 100,
|
|
||||||
max: 199,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
level: 3,
|
|
||||||
min: 200,
|
|
||||||
max: 399,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
level: 4,
|
|
||||||
min: 400,
|
|
||||||
max: 999,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
level: 5,
|
|
||||||
min: 1000,
|
|
||||||
max: 1999,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
level: 6,
|
|
||||||
min: 2000,
|
|
||||||
max: 4999,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
level: 7,
|
|
||||||
min: 5000,
|
|
||||||
max: '--',
|
|
||||||
}
|
}
|
||||||
]
|
},
|
||||||
|
filters: {
|
||||||
|
percentExp(value, rank) {
|
||||||
|
// console.log(rank);
|
||||||
|
let result = '0/0';
|
||||||
|
if(rank) result = value + '/' + rank.max;
|
||||||
|
return result;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getMemberPointsStat();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getMemberPointsStat() {
|
||||||
|
this.$u.api.getMemberPointsStat().then((res)=>{
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.memberInfo = res.data;
|
||||||
|
this.nodes = common.unescapeHTML(res.data.points_rule);
|
||||||
|
// console.log(this.percent);
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -126,6 +118,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.body {
|
.body {
|
||||||
|
margin-top: 60rpx;
|
||||||
.title {
|
.title {
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -134,39 +127,43 @@ export default {
|
|||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: rgba(51,51,51,1);
|
color: rgba(51,51,51,1);
|
||||||
border-bottom: #ECECEC 1rpx solid;
|
// border-bottom: #ECECEC 1rpx solid;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
> image {
|
> image {
|
||||||
width: 29rpx;
|
width: 29rpx;
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.rank-list {
|
.rich {
|
||||||
padding: 30rpx;
|
padding: 0 60rpx;
|
||||||
.list-item {
|
|
||||||
margin-bottom: 40rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
.rank-value {
|
|
||||||
color: #FFF;
|
|
||||||
height: 30rpx;
|
|
||||||
line-height: 30rpx;
|
|
||||||
box-sizing: content-box;
|
|
||||||
background:rgba(255,213,101,1);
|
|
||||||
border-radius: 6rpx;
|
|
||||||
padding: 0 10rpx;
|
|
||||||
margin-right: 15rpx;
|
|
||||||
}
|
|
||||||
.rank-interval {
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #999999;
|
|
||||||
> span {
|
|
||||||
margin-right: 10rpx;
|
|
||||||
color: rgba(51,51,51,1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// .rank-list {
|
||||||
|
// padding: 30rpx;
|
||||||
|
// .list-item {
|
||||||
|
// margin-bottom: 40rpx;
|
||||||
|
// display: flex;
|
||||||
|
// align-items: center;
|
||||||
|
// .rank-value {
|
||||||
|
// color: #FFF;
|
||||||
|
// height: 30rpx;
|
||||||
|
// line-height: 30rpx;
|
||||||
|
// box-sizing: content-box;
|
||||||
|
// background:rgba(255,213,101,1);
|
||||||
|
// border-radius: 6rpx;
|
||||||
|
// padding: 0 10rpx;
|
||||||
|
// margin-right: 15rpx;
|
||||||
|
// }
|
||||||
|
// .rank-interval {
|
||||||
|
// font-size: 28rpx;
|
||||||
|
// color: #999999;
|
||||||
|
// > span {
|
||||||
|
// margin-right: 10rpx;
|
||||||
|
// color: rgba(51,51,51,1);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -3,20 +3,20 @@
|
|||||||
<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" margin-top="300"></u-empty>
|
<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" margin-top="300"></u-empty>
|
||||||
<u-swipe-action
|
<u-swipe-action
|
||||||
v-for="(item, index) in list" :key="index"
|
v-for="(item, index) in list" :key="index"
|
||||||
:index='index'
|
:index='item.store_id'
|
||||||
:show="item.show"
|
:show="item.show"
|
||||||
:options="options"
|
:options="options"
|
||||||
@click="removeFavorite"
|
@click="removeFavorite"
|
||||||
@open="open"
|
@open="open"
|
||||||
>
|
>
|
||||||
<view class="item u-border-bottom">
|
<view class="item u-border-bottom" @click="toDetailsPage(item.store_id)">
|
||||||
<image src="@/pageE/static/mine/23.png"></image>
|
<image :src="item.store_avatar"></image>
|
||||||
<!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 -->
|
<!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 -->
|
||||||
<view class="title-wrap">
|
<view class="title-wrap">
|
||||||
<view class="item-name u-line-1">胖胖定制此层wrap在此为必写的,否则可能会出现标题定位错误</view>
|
<view class="item-name u-line-1">{{ item.store_name }}</view>
|
||||||
<view class="item-date">
|
<view class="item-date">
|
||||||
<image src="@/pageE/static/mine/26.png"></image>
|
<image src="@/pageE/static/mine/26.png"></image>
|
||||||
<view>2020-05-17</view>
|
<view>{{ item.fav_time | date }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -46,19 +46,27 @@ export default {
|
|||||||
getStoreFavoritesList() {
|
getStoreFavoritesList() {
|
||||||
this.$u.api.getFavoritesList({
|
this.$u.api.getFavoritesList({
|
||||||
type: 2 // 店铺 type: 2
|
type: 2 // 店铺 type: 2
|
||||||
|
}).then(res => {
|
||||||
|
this.list = res.data;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
removeFavorite(id = 18) {
|
removeFavorite(id) {
|
||||||
|
console.log(id);
|
||||||
this.$u.api.removeFavorite({
|
this.$u.api.removeFavorite({
|
||||||
id: id
|
id: id,
|
||||||
|
type: 'store'
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
this.$u.toast(res.message);
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.getStoreFavoritesList();
|
this.getStoreFavoritesList();
|
||||||
} else {
|
|
||||||
this.$u.toast(res.message);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
toDetailsPage(id) {
|
||||||
|
this.$u.route('pageC/merchant/index', {
|
||||||
|
id: id
|
||||||
|
});
|
||||||
|
},
|
||||||
open(index) {
|
open(index) {
|
||||||
// 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
|
// 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
|
||||||
// 原本为'false',再次设置为'false'会无效
|
// 原本为'false',再次设置为'false'会无效
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getPolicyList();
|
this.getPolicyList();
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.getPolicyList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getPolicyList () {
|
getPolicyList () {
|
||||||
@@ -24,6 +27,7 @@ export default {
|
|||||||
page: this.page,
|
page: this.page,
|
||||||
tid: 2 // 1:使用帮助列表 2: 售后政策列表
|
tid: 2 // 1:使用帮助列表 2: 售后政策列表
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
this.policyList = res.data.helpList;
|
this.policyList = res.data.helpList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="write-complaints">
|
<view class="write-complaints">
|
||||||
<view class="main-container">
|
<view class="main-container">
|
||||||
<textarea auto-height placeholder="发表您的意见吧,我们会做得更好." maxlength="200" v-model="text" />
|
<textarea auto-height placeholder="发表您的意见吧,我们会做得更好" maxlength="200" v-model="text" />
|
||||||
<u-upload
|
<u-upload
|
||||||
ref="uUpload"
|
ref="uUpload"
|
||||||
:custom-btn="true"
|
:custom-btn="true"
|
||||||
@@ -12,9 +12,10 @@
|
|||||||
:form-data="formData"
|
:form-data="formData"
|
||||||
:name="name"
|
:name="name"
|
||||||
@on-uploaded="setImageList"
|
@on-uploaded="setImageList"
|
||||||
|
@on-error="uploadError"
|
||||||
>
|
>
|
||||||
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
||||||
<img src="../static/mine/27.png" />
|
<image src="../static/mine/27.png"></image>
|
||||||
</view>
|
</view>
|
||||||
</u-upload>
|
</u-upload>
|
||||||
</view>
|
</view>
|
||||||
@@ -37,12 +38,21 @@ export default {
|
|||||||
name: 'common', // 其他图片
|
name: 'common', // 其他图片
|
||||||
},
|
},
|
||||||
imageList: [],
|
imageList: [],
|
||||||
|
debounce: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.debounce = true;
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit() {
|
submit() {
|
||||||
|
if(!this.debounce) return;
|
||||||
|
this.debounce = false;
|
||||||
this.$refs.uUpload.upload();
|
this.$refs.uUpload.upload();
|
||||||
},
|
},
|
||||||
|
uploadError() {
|
||||||
|
this.debounce = true;
|
||||||
|
},
|
||||||
setImageList(lists) {
|
setImageList(lists) {
|
||||||
// console.log(lists);
|
// console.log(lists);
|
||||||
let imageList = [];
|
let imageList = [];
|
||||||
@@ -78,6 +88,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
this.debounce = true;
|
||||||
this.$u.toast(res.message);
|
this.$u.toast(res.message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -102,7 +113,7 @@ export default {
|
|||||||
background: rgba(236,236,236,1);
|
background: rgba(236,236,236,1);
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
> img {
|
> image {
|
||||||
margin-top: 48rpx;
|
margin-top: 48rpx;
|
||||||
width: 54rpx;
|
width: 54rpx;
|
||||||
height: 49rpx;
|
height: 49rpx;
|
||||||
|
|||||||
@@ -1,78 +1,173 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="comment">
|
<view class="comment">
|
||||||
<view class="main-container">
|
<view class="main-container">
|
||||||
<textarea @blur="bindTextAreaBlur" auto-height placeholder="发表你的评价吧,收货时心情如何?" maxlength="200" />
|
<view class="goods-comment" v-for="(goods, index) in goodsList" :key="index">
|
||||||
<u-upload
|
<CommentView :goods="goods" :index="index" @setLocalImage="setLocalImage" @setContent="setContent" @setDescribe="setDescribe"></CommentView>
|
||||||
ref="uUpload"
|
|
||||||
@on-uploaded="onUploaded"
|
|
||||||
:custom-btn="true"
|
|
||||||
:max-count="count"
|
|
||||||
:auto-upload="false"
|
|
||||||
>
|
|
||||||
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
|
||||||
<img src="../static/mine/27.png" />
|
|
||||||
</view>
|
</view>
|
||||||
</u-upload>
|
|
||||||
</view>
|
</view>
|
||||||
|
<view class="order-rate">
|
||||||
<view class="rate">
|
<view class="rate">
|
||||||
<view>
|
|
||||||
<view class="title">物流评分</view>
|
<view class="title">物流评分</view>
|
||||||
<u-rate :count="5" active-color="#FF780F" inactive-color="#CCCCCC" v-model="logistics" gutter="20" size="32"></u-rate>
|
<u-rate :count="5" active-color="#FF780F" inactive-color="#CCCCCC" v-model="logistics" gutter="20" size="32"></u-rate>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view class="rate">
|
||||||
<view class="title">服务态度</view>
|
<view class="title">服务态度</view>
|
||||||
<u-rate :count="5" v-model="service" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate>
|
<u-rate :count="5" v-model="service" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
|
||||||
<view class="title">描述相符</view>
|
|
||||||
<u-rate :count="5" v-model="describe" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="write-btn" @click="submitComment">发表意见</view>
|
||||||
<view class="write-btn" @click="addOrderEvaluate">发表意见</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import CommentView from './commentItem';
|
||||||
|
import common from '@/static/js/common.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
orderId: '',
|
orderId: '',
|
||||||
count: 4, // 最大图片数量
|
count: 3, // 最大图片数量
|
||||||
logistics: 5,
|
logistics: 0, // 物流服务
|
||||||
service: 5,
|
service: 0, // 服务态度
|
||||||
describe: 5,
|
describe: [],
|
||||||
content: '',
|
content: [],
|
||||||
|
imageList: [], // 本地图片路径
|
||||||
|
goodsList: [],
|
||||||
|
uploadImageList: [], // 线上图片名字
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
CommentView
|
||||||
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.orderId = option.oid;
|
this.orderId = option.oid;
|
||||||
|
this.getOrderInfo(option.oid);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
setLocalImage({ list, index }) {
|
||||||
|
this.imageList[index] = list;
|
||||||
|
},
|
||||||
|
setContent({ content, index }) {
|
||||||
|
this.content[index] = content;
|
||||||
|
},
|
||||||
|
setDescribe({ describe, index }) {
|
||||||
|
this.describe[index] = describe;
|
||||||
|
},
|
||||||
|
uploadImage() {
|
||||||
|
let allPromise = [];
|
||||||
|
this.imageList.forEach((img, index) => {
|
||||||
|
this.uploadImageList[index] = [];
|
||||||
|
img.forEach(filePath => {
|
||||||
|
let promise = common.uploadFile({
|
||||||
|
url: this.$u.http.config.baseUrl + '/Upload/uploadfile',
|
||||||
|
name: 'common',
|
||||||
|
filePath: filePath,
|
||||||
|
})
|
||||||
|
promise.then(result => {
|
||||||
|
this.uploadImageList[index].push(result.file_name);
|
||||||
|
})
|
||||||
|
allPromise.push(promise);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
Promise.all(allPromise).then(() => {
|
||||||
|
this.addOrderEvaluate();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 设初始值
|
||||||
|
setModelKey(data) {
|
||||||
|
data.forEach(() => {
|
||||||
|
this.content.push('');
|
||||||
|
this.describe.push(0);
|
||||||
|
this.imageList.push([]);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getOrderInfo(id) {
|
||||||
|
this.$u.api.getOrderInfo({
|
||||||
|
order_id: id,
|
||||||
|
}).then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.goodsList = res.data.extend_order_goods;
|
||||||
|
// this.goodsList = [{
|
||||||
|
// "rec_id": 14,
|
||||||
|
// "order_id": 13,
|
||||||
|
// "goods_id": 39,
|
||||||
|
// "goods_name": "自然堂 水润保湿两件套 补水保湿套装",
|
||||||
|
// "goods_price": "69.40",
|
||||||
|
// "goods_num": 1,
|
||||||
|
// "goods_image": "1_2017092202443553519.jpg",
|
||||||
|
// "goods_pay_price": "43.40",
|
||||||
|
// "store_id": 1,
|
||||||
|
// "buyer_id": 3,
|
||||||
|
// "goods_type": "1",
|
||||||
|
// "promotions_id": 0,
|
||||||
|
// "commis_rate": 0,
|
||||||
|
// "gc_id": 30
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// "rec_id": 13,
|
||||||
|
// "order_id": 13,
|
||||||
|
// "goods_id": 113,
|
||||||
|
// "goods_name": "舒思盾经络按摩仪数码家用多功能针灸穴位电子理疗腰椎颈椎电疗仪",
|
||||||
|
// "goods_price": "168.00",
|
||||||
|
// "goods_num": 1,
|
||||||
|
// "goods_image": "1_2017092901414663050.jpg",
|
||||||
|
// "goods_pay_price": "106.00",
|
||||||
|
// "store_id": 1,
|
||||||
|
// "buyer_id": 3,
|
||||||
|
// "goods_type": "1",
|
||||||
|
// "promotions_id": 0,
|
||||||
|
// "commis_rate": 0,
|
||||||
|
// "gc_id": 72
|
||||||
|
// }];
|
||||||
|
this.setModelKey(this.goodsList);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
verifyParams() {
|
verifyParams() {
|
||||||
if(this.$u.test.isEmpty(this.content)) {
|
this.goodsList.forEach((_, index) => {
|
||||||
|
if(this.$u.test.isEmpty(this.content[index])) {
|
||||||
this.$u.toast('内容不可为空');
|
this.$u.toast('内容不可为空');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
})
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
submitComment() {
|
||||||
|
// console.log(this.content);
|
||||||
|
// console.log(this.describe);
|
||||||
|
// console.log(this.imageList);
|
||||||
|
this.uploadImage();
|
||||||
|
// this.goodsList.forEach((_, index) => {
|
||||||
|
|
||||||
|
// })
|
||||||
|
},
|
||||||
addOrderEvaluate() {
|
addOrderEvaluate() {
|
||||||
if(!this.verifyParams()) return false;
|
if(!this.verifyParams()) return false;
|
||||||
console.log(this.logistics);
|
let files = [];
|
||||||
console.log(this.service);
|
// console.log(this.uploadImageList);
|
||||||
console.log(this.describe);
|
this.uploadImageList.forEach((item, index) => {
|
||||||
this.$u.api.updateOrderEvaluate({
|
files[index] = '';
|
||||||
|
// console.log(item);
|
||||||
|
item.forEach((img, idx) => {
|
||||||
|
if(idx < item.length-1) {
|
||||||
|
files[index] += img + ',';
|
||||||
|
} else {
|
||||||
|
files[index] += img;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
let params = {
|
||||||
id: this.orderId,
|
id: this.orderId,
|
||||||
content: this.content,
|
content: this.content,
|
||||||
scores_one: this.logistics,
|
scores_one: this.logistics,
|
||||||
scores_two: this.service,
|
scores_two: this.service,
|
||||||
scores_three: this.describe,
|
scores_three: this.describe,
|
||||||
file: '',
|
file: files,
|
||||||
}).then(res => {
|
};
|
||||||
|
console.log(params);
|
||||||
|
this.$u.api.updateOrderEvaluate(params).then(res => {
|
||||||
|
this.$u.toast(res.message);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
bindTextAreaBlur(event) {
|
|
||||||
this.content = event.detail.value;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -81,9 +176,40 @@ export default {
|
|||||||
min-height: calc(100vh - var(--window-top));
|
min-height: calc(100vh - var(--window-top));
|
||||||
background-color: #ECECEC;
|
background-color: #ECECEC;
|
||||||
.main-container {
|
.main-container {
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
.goods-comment {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 30rpx;
|
||||||
|
.goods-info {
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
> image {
|
||||||
|
width: 113rpx;
|
||||||
|
height: 106rpx;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
background-color: antiquewhite;
|
||||||
|
}
|
||||||
|
.goods-text {
|
||||||
|
.goods-name {
|
||||||
|
width: 530rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(0,0,51,1);
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
.goods-spec {
|
||||||
|
max-width: 300rpx;
|
||||||
|
box-sizing: content-box;
|
||||||
|
padding: 10rpx 15rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: rgba(153,153,153,1);
|
||||||
|
background:rgba(236,236,236,1);
|
||||||
|
border-radius: 6rpx;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
textarea {
|
textarea {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
margin-bottom: 60rpx;
|
margin-bottom: 60rpx;
|
||||||
@@ -94,17 +220,18 @@ export default {
|
|||||||
background: rgba(236,236,236,1);
|
background: rgba(236,236,236,1);
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
> img {
|
> image {
|
||||||
margin-top: 48rpx;
|
margin-top: 48rpx;
|
||||||
width: 54rpx;
|
width: 54rpx;
|
||||||
height: 49rpx;
|
height: 49rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.rate {
|
.rate {
|
||||||
background-color: #ffffff;
|
// background-color: #ffffff;
|
||||||
padding: 33rpx 30rpx;
|
// padding: 33rpx 30rpx;
|
||||||
> view {
|
// > view {
|
||||||
display: flex;
|
display: flex;
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
margin-bottom: 35rpx;
|
margin-bottom: 35rpx;
|
||||||
@@ -114,7 +241,11 @@ export default {
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: rgba(51,51,51,1);
|
color: rgba(51,51,51,1);
|
||||||
}
|
}
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
.order-rate {
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 33rpx 30rpx;
|
||||||
}
|
}
|
||||||
.write-btn {
|
.write-btn {
|
||||||
margin: 120rpx auto 0;
|
margin: 120rpx auto 0;
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="details" v-if="orderInfo.extend_store">
|
<view class="details" v-if="orderInfo.extend_store">
|
||||||
<view class="status" v-if="state">
|
<view class="status" v-if="orderstate">
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<view class="status-text">{{ s_object[state].text }}</view>
|
<view class="status-text">{{ s_object[orderstate].text }}</view>
|
||||||
<view class="time" v-if="state == '2'">距离结束22:22:22</view>
|
<view class="time" v-if="orderInfo.view_type == 1 || orderInfo.view_type == 9">距离结束:{{ countdown }}</view>
|
||||||
</view>
|
</view>
|
||||||
<image :src="s_object[state].image"></image>
|
<image :src="s_object[orderstate].image"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="info-address">
|
<view class="info-address">
|
||||||
@@ -67,13 +67,16 @@
|
|||||||
<view>创建时间:{{ orderInfo.add_time | date}}</view>
|
<view>创建时间:{{ orderInfo.add_time | date}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" v-if="['1', '2', '6'].indexOf(state) >= 0">
|
<view class="btn" v-if="['1', '2', '4', '6'].indexOf(orderstate) >= 0">
|
||||||
<view class="logistics" v-if="state == '1'" @click="toOtherPage('Logistics')">查看物流</view>
|
<!-- @click="toOtherPage('RefundOrder')" -->
|
||||||
<view class="comment" v-if="state == '2'" @click="toOtherPage('Comment')">立即评价</view>
|
<view class="cancel" v-if="orderstate == '4' || orderstate == '1'">申请退款</view>
|
||||||
<view class="cancel" v-if="state == '6'" @click="cancelOrder">取消支付</view>
|
<view class="cancel" v-if="orderstate == '1'" @click="toOtherPage('Logistics')">查看物流</view>
|
||||||
<view class="payment" v-if="state == '6'">立即支付</view>
|
<view class="logistics" v-if="orderstate == '1'" @click="confirmReceive">确认收货</view>
|
||||||
<view class="service" v-if="state == '7'">联系官方客服</view>
|
<view class="comment" v-if="orderstate == '2'" @click="toOtherPage('Comment')">立即评价</view>
|
||||||
<view class="submit" v-if="state == '7'">提交官方审核</view>
|
<view class="cancel" v-if="orderstate == '6'" @click="cancelOrder">取消支付</view>
|
||||||
|
<view class="payment" v-if="orderstate == '6'" @click="payNow">立即支付</view>
|
||||||
|
<view class="service" v-if="orderstate == '7'">联系官方客服</view>
|
||||||
|
<view class="submit" v-if="orderstate == '7'">提交官方审核</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -81,7 +84,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
state: '', // 1: 待收货 2: 待评价 3: 交易成功 4: 已取消 5: 已退款 6: 待支付 7: 待退款 8: 已退款
|
orderstate: '', // 1: 待收货 2: 待评价 3: 交易成功 4: 已取消 5: 已退款 6: 待支付 7: 待退款 8: 已退款
|
||||||
s_object: {
|
s_object: {
|
||||||
'1': {
|
'1': {
|
||||||
text: '待收货',
|
text: '待收货',
|
||||||
@@ -96,8 +99,8 @@ export default {
|
|||||||
image: '../static/mine/31.png',
|
image: '../static/mine/31.png',
|
||||||
},
|
},
|
||||||
'4': {
|
'4': {
|
||||||
text: '已取消',
|
text: '待发货',
|
||||||
image: '../static/mine/33.png',
|
image: '../static/mine/36.png',
|
||||||
},
|
},
|
||||||
'5': {
|
'5': {
|
||||||
text: '已退款',
|
text: '已退款',
|
||||||
@@ -111,47 +114,89 @@ export default {
|
|||||||
text: '待退款',
|
text: '待退款',
|
||||||
image: '../static/mine/34.png',
|
image: '../static/mine/34.png',
|
||||||
},
|
},
|
||||||
|
'8': {
|
||||||
|
text: '拼团中',
|
||||||
|
image: '../static/mine/37.png',
|
||||||
},
|
},
|
||||||
current: 0,
|
},
|
||||||
orderInfo: {}
|
orderInfo: {},
|
||||||
|
oid: '',
|
||||||
|
timer: '',
|
||||||
|
countdown: '', // 倒计时
|
||||||
|
isSpike: false, // 倒计时是否结束
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.setTitle();
|
this.setTitle();
|
||||||
|
this.oid = option.oid;
|
||||||
this.getOrderInfo(option.oid);
|
this.getOrderInfo(option.oid);
|
||||||
},
|
},
|
||||||
|
// 下拉刷新
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.getOrderInfo(this.oid);
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
clearInterval(this.timer);
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
viewState(value) {
|
viewState(value) {
|
||||||
let state;
|
let state;
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case 0: // 已取消
|
case 1:
|
||||||
state = '4';
|
|
||||||
break;
|
|
||||||
case 10: // 未付款
|
|
||||||
state = '6';
|
state = '6';
|
||||||
break;
|
break;
|
||||||
case 20: // 已付款
|
case 2:
|
||||||
state = '3';
|
state = '4';
|
||||||
break;
|
break;
|
||||||
case 30: // 已发货
|
case 3:
|
||||||
state = '1';
|
state = '1';
|
||||||
break;
|
break;
|
||||||
case 40: // 已收货
|
case 4:
|
||||||
if(this.orderInfo.evaluation_state == 0) state = '2';
|
state = '2';
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
state = '7';
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
state = '5';
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
state = '8';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(this.orderInfo.refund_state) state = '5';
|
this.orderstate = state;
|
||||||
// 申请退款
|
},
|
||||||
if(this.orderInfo.refund_list) {
|
setSpikeTime(time) {
|
||||||
const refund = this.orderInfo.refund_list[this.orderInfo.extend_order_common.order_id];
|
// console.log(time);
|
||||||
if(this.orderInfo.refund_list) {
|
this.timer = setInterval(() => {
|
||||||
if([1, 2].indexOf(refund.refund_state) >= 0) state = '7';
|
let spikeTime = time * 1000 - new Date().getTime();
|
||||||
if(refund.refund_state == 3) state = '8';
|
// console.log(spikeTime);
|
||||||
}
|
if(spikeTime <= 0) {
|
||||||
}
|
this.isSpike = true;
|
||||||
this.state = state;
|
this.countdown = '00:00:00'
|
||||||
|
clearInterval(this.timer);
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
// 计算天数
|
||||||
|
const days = Math.floor(spikeTime/(24*3600*1000));
|
||||||
|
//计算出小时数
|
||||||
|
const leave1 = spikeTime % (24*3600*1000) // 计算天数后剩余的毫秒数
|
||||||
|
let hours = Math.floor(leave1/(3600*1000));
|
||||||
|
//计算相差分钟数
|
||||||
|
const leave2 = leave1 % (3600*1000) // 计算小时数后剩余的毫秒数
|
||||||
|
let minutes = Math.floor(leave2 / (60*1000))
|
||||||
|
//计算相差秒数
|
||||||
|
const leave3 = leave2 % (60*1000) // 计算分钟数后剩余的毫秒数
|
||||||
|
let seconds = Math.round(leave3 / 1000)
|
||||||
|
// 把天数算在小时里
|
||||||
|
hours = days * 24 + hours;
|
||||||
|
if(hours < 10) hours = '0' + hours;
|
||||||
|
if(minutes < 10) minutes = '0' + minutes;
|
||||||
|
if(seconds < 10) seconds = '0' + seconds;
|
||||||
|
this.countdown = hours + ':' + minutes + ':' + seconds;
|
||||||
|
}, 1000)
|
||||||
},
|
},
|
||||||
getOrderInfo(id) {
|
getOrderInfo(id) {
|
||||||
this.$u.api.getOrderInfo({
|
this.$u.api.getOrderInfo({
|
||||||
@@ -159,9 +204,16 @@ export default {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.orderInfo = res.data;
|
this.orderInfo = res.data;
|
||||||
this.viewState(this.orderInfo.order_state);
|
this.viewState(this.orderInfo.view_type);
|
||||||
|
this.setTitle(this.orderInfo.view_type);
|
||||||
|
if(res.data.view_type == 1) this.setSpikeTime(res.data.end_time);
|
||||||
|
else if(res.data.view_type == 9) this.setSpikeTime(res.data.pintuangroup_endtime);
|
||||||
}
|
}
|
||||||
|
uni.stopPullDownRefresh(); // 结束刷新
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
applyRefund() {
|
||||||
|
|
||||||
},
|
},
|
||||||
cancelOrder() {
|
cancelOrder() {
|
||||||
this.$u.api.cancelOrder({
|
this.$u.api.cancelOrder({
|
||||||
@@ -172,18 +224,35 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
setTitle(){
|
confirmReceive() {
|
||||||
|
this.$u.api.confirmReceive({
|
||||||
|
order_id: this.order.order_id,
|
||||||
|
}).then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.getOrderInfo(this.oid);
|
||||||
|
}
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
setTitle(value){
|
||||||
let title = '';
|
let title = '';
|
||||||
switch (this.current) {
|
switch (value) {
|
||||||
case '1':
|
case 1:
|
||||||
title = "支付成功"
|
title = "支付成功"
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
title = "订单详情"
|
title = "订单详情"
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
uni.setNavigationBarTitle({
|
// uni.setNavigationBarTitle({
|
||||||
title: title
|
// title: title
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
payNow() {
|
||||||
|
this.$u.route('/pageC/cart/cashier', {
|
||||||
|
pay_sn: this.orderInfo.pay_sn,
|
||||||
|
price: this.orderInfo.order_amount,
|
||||||
|
order_id: this.orderInfo.order_id,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
toOtherPage(url) {
|
toOtherPage(url) {
|
||||||
@@ -286,6 +355,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.store-goods {
|
.store-goods {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
> image {
|
> image {
|
||||||
width: 180rpx;
|
width: 180rpx;
|
||||||
height: 160rpx;
|
height: 160rpx;
|
||||||
@@ -294,6 +364,7 @@ export default {
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.goods-info {
|
.goods-info {
|
||||||
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="order">
|
<view class="order">
|
||||||
<view>
|
<view>
|
||||||
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="26" @change="tabsChange" height="88" :gutter="30"></u-tabs-swiper>
|
<u-tabs-swiper ref="tabs" :list="list" active-color="#FF780F" :current="current" font-size="26" @change="tabsChange" height="88" :gutter="30"></u-tabs-swiper>
|
||||||
</view>
|
</view>
|
||||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
|
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
|
||||||
<swiper-item class="swiper-item" v-for="(item, index) in list" :key="index">
|
<swiper-item class="swiper-item" v-for="(item, index) in list" :key="index">
|
||||||
<scroll-view scroll-y style="height: 100%;" @scrolltolower="reachBottom">
|
<scroll-view scroll-y style="height: 100%;" @scrolltolower="reachBottom">
|
||||||
<view>
|
<view>
|
||||||
<view class="item-container" v-for="order in orderList" :key="order.order_id">
|
<view class="item-container" v-for="order in orderList" :key="order.order_id">
|
||||||
<OrderItem :order="order" @refreshOrderList="getOrderList"></OrderItem>
|
<OrderItem :order="order" @refreshOrderList="refreshOrderList" v-if="current != 4"></OrderItem>
|
||||||
|
<TryOrderItem :order="order" @refreshOrderList="refreshOrderList" v-else></TryOrderItem>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-empty text="暂无订单" mode="order" color="#000000" v-if="!orderList.length"></u-empty>
|
<u-empty text="暂无订单" mode="order" color="#000000" v-if="!orderList.length"></u-empty>
|
||||||
@@ -20,6 +21,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import OrderItem from '@/components/mine/order-item/index'
|
import OrderItem from '@/components/mine/order-item/index'
|
||||||
|
import TryOrderItem from '@/components/mine/order-item/try'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -28,18 +30,20 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
name: '待支付'
|
name: '待支付'
|
||||||
}, {
|
}, {
|
||||||
name: '已取消'
|
name: '待发货'
|
||||||
}, {
|
}, {
|
||||||
name: '待收货'
|
name: '待收货'
|
||||||
}, {
|
}, {
|
||||||
name: '试穿试送'
|
name: '试穿试送'
|
||||||
},{
|
},{
|
||||||
name: '待评价'
|
name: '拼团中'
|
||||||
}, {
|
}, {
|
||||||
name: '售后'
|
name: '售后'
|
||||||
|
}, {
|
||||||
|
name: '待评价'
|
||||||
}],
|
}],
|
||||||
orderList: [],
|
orderList: [],
|
||||||
loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
|
loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
|
||||||
page: 0,
|
page: 0,
|
||||||
current: Number,
|
current: Number,
|
||||||
swiperCurrent: 0,
|
swiperCurrent: 0,
|
||||||
@@ -48,13 +52,21 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
OrderItem
|
OrderItem,
|
||||||
|
TryOrderItem,
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
current(value) {
|
current(value, origin) {
|
||||||
|
if((origin == 4 && value != 4) || (value == 4 && origin != 4)) {
|
||||||
|
this.orderList = [];
|
||||||
|
}
|
||||||
this.page = 0;
|
this.page = 0;
|
||||||
// again 重新请求列表 不然往列表里添加
|
// reload 重新请求列表 loadmore 往列表里添加
|
||||||
value == 6 ? this.getAfterSaleList({ reload: 'again' }): this.getOrderList({ reload: 'again' });
|
if(value == 4) {
|
||||||
|
this.goodsTryOrderList({ load: 'reload' });
|
||||||
|
} else {
|
||||||
|
this.getOrderList({ load: 'reload' });
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
@@ -62,26 +74,35 @@ export default {
|
|||||||
this.current = current;
|
this.current = current;
|
||||||
this.swiperCurrent = this.current;
|
this.swiperCurrent = this.current;
|
||||||
this.setViewHeight();
|
this.setViewHeight();
|
||||||
|
},
|
||||||
|
// 下拉刷新
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.refreshOrderList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setOrderType() {
|
setOrderType() {
|
||||||
let type;
|
let type;
|
||||||
// state_type 订单状态:0:已取消 10:未付款 20:已付款 30:已发货 40:已收货
|
|
||||||
switch (this.current) {
|
switch (this.current) {
|
||||||
case 1:
|
case 1:
|
||||||
type = 10; // 待支付
|
type = 1; // 待支付
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
type = 0; // 已取消
|
type = 2; // 待发货
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
type = 30; // 待收货
|
type = 3; // 待收货
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
type = -1; // 试穿试送
|
type = -1; // 试穿试送
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
type = 'state_noeval'; // 待评价
|
type = 9; // 拼团中
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
type = 8; // 售后
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
type = 4; // 待评价
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
type = -1;
|
type = -1;
|
||||||
@@ -89,27 +110,54 @@ export default {
|
|||||||
}
|
}
|
||||||
return type;
|
return type;
|
||||||
},
|
},
|
||||||
async getOrderList({ reload = '' } = {}) {
|
refreshOrderList() {
|
||||||
|
this.page = 0;
|
||||||
|
// if(this.current == 6) {
|
||||||
|
// this.getAfterSaleList({ load: 'reload' });
|
||||||
|
// } else
|
||||||
|
if(this.current == 4) {
|
||||||
|
this.goodsTryOrderList({ load: 'reload' });
|
||||||
|
} else {
|
||||||
|
this.getOrderList({ load: 'reload' });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 普通
|
||||||
|
async getOrderList({ load = 'loadmore' } = {}) {
|
||||||
const type = this.setOrderType();
|
const type = this.setOrderType();
|
||||||
const res = await this.$u.api.getOrderList({
|
const res = await this.$u.api.getOrderList({
|
||||||
page: this.page,
|
page: this.page,
|
||||||
type: type,
|
type: type,
|
||||||
})
|
})
|
||||||
this.timer = true;
|
this.timer = true;
|
||||||
|
uni.stopPullDownRefresh(); // 结束刷新
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
if(reload) this.orderList = res.data;
|
if(load == 'reload') this.orderList = res.data;
|
||||||
else this.orderList.push(...res.data);
|
else if(load == 'loadmore') this.orderList.push(...res.data);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
async getAfterSaleList({ reload = '' } = {}) {
|
// 售后
|
||||||
|
async getAfterSaleList({ load = 'loadmore' } = {}) {
|
||||||
const res = await this.$u.api.getAfterSaleList({
|
const res = await this.$u.api.getAfterSaleList({
|
||||||
page: this.page,
|
page: this.page,
|
||||||
})
|
})
|
||||||
this.timer = true;
|
this.timer = true;
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
if(reload) this.orderList = res.data;
|
if(load == 'reload') this.orderList = res.data;
|
||||||
else this.orderList.push(...res.data);
|
else if(load == 'loadmore') this.orderList.push(...res.data);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
},
|
||||||
|
// 试穿
|
||||||
|
async goodsTryOrderList({ load = 'loadmore' } = {}) {
|
||||||
|
const res = await this.$u.api.goodsTryOrderList({
|
||||||
|
page: this.page,
|
||||||
|
})
|
||||||
|
uni.stopPullDownRefresh(); // 结束刷新
|
||||||
|
this.timer = true;
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
if(load == 'reload') this.orderList = res.data.list;
|
||||||
|
else if(load == 'loadmore') this.orderList.push(...res.data.list);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
@@ -121,7 +169,9 @@ export default {
|
|||||||
this.loadStatus.splice(this.current, 1, "loading");
|
this.loadStatus.splice(this.current, 1, "loading");
|
||||||
this.page++;
|
this.page++;
|
||||||
let promise;
|
let promise;
|
||||||
if(this.current == 6) promise = this.getAfterSaleList();
|
// if(this.current == 6) promise = this.getAfterSaleList();
|
||||||
|
// else
|
||||||
|
if(this.current == 4) promise = this.goodsTryOrderList();
|
||||||
else promise = this.getOrderList();
|
else promise = this.getOrderList();
|
||||||
promise.then(res => {
|
promise.then(res => {
|
||||||
this.loadStatus.splice(this.current, 1, "nomore");
|
this.loadStatus.splice(this.current, 1, "nomore");
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="logistics">
|
<view class="logistics">
|
||||||
<view class="logistics-info">
|
<view class="logistics-info">
|
||||||
<view class="express">
|
<!-- <view class="express">
|
||||||
<image src="../static/mine/23.png"></image>
|
<image src="../static/mine/23.png"></image>
|
||||||
<view class="dispatcher-info">
|
<view class="dispatcher-info">
|
||||||
<view>派件员:xxx</view>
|
<view>派件员:xxx</view>
|
||||||
<view>手机:123456789</view>
|
<view>手机:123456789</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="express-status">
|
<view class="express-status">
|
||||||
<image src="../static/mine/23.png"></image>
|
<image :src="expressInfo.goods_image"></image>
|
||||||
<view>
|
<view>
|
||||||
<view class="status">物流状态:已签收</view>
|
<view class="status">物流状态:{{ expressInfo.is_check }}</view>
|
||||||
<view>承运来源:百世快递</view>
|
<view>承运来源:{{ expressInfo.express_name || '' }}</view>
|
||||||
<view>运单编号:3253463464777</view>
|
<view>运单编号:{{ expressInfo.shipping_code || '' }}</view>
|
||||||
<view>官方电话:4009-565-656</view>
|
<view>官方电话:{{ expressInfo.express_phone || '' }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -22,8 +22,8 @@
|
|||||||
<view class="title">物流跟踪</view>
|
<view class="title">物流跟踪</view>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<view v-for="(item, index) in list" :key="index" class="logistics-item">
|
<view v-for="(item, index) in list" :key="index" class="logistics-item">
|
||||||
<view class="info u-line-2">{{ item.address }}</view>
|
<view class="info u-line-2">{{ item.content }}</view>
|
||||||
<view class="date">{{ item.date }}</view>
|
<view class="date">{{ item.kd_time }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -33,24 +33,24 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [
|
list: [],
|
||||||
{
|
expressInfo: {},
|
||||||
address: '[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务',
|
|
||||||
date: '2019-12-25 09:38:21'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
address: '[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务',
|
|
||||||
date: '2019-12-25 09:38:21'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
address: '[北京市]【已签收,本人签收】,感谢使用百事快递,期待再次为您服务',
|
|
||||||
date: '2019-12-15 09:38:20'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
address: '卖家已发货',
|
|
||||||
date: '2019-12-15 09:38:20'
|
|
||||||
}
|
}
|
||||||
]
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.getOrderLogistics(option.oid);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getOrderLogistics(id) {
|
||||||
|
this.$u.api.orderLogistics({ id: id }).then(res => {
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.expressInfo = res.data.express_info;
|
||||||
|
this.list = res.data.express_list;
|
||||||
|
} else {
|
||||||
|
this.list = [];
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
142
pageE/order/RefundOrder.vue
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
<template>
|
||||||
|
<view class="refund">
|
||||||
|
<view class="radios-container">
|
||||||
|
<u-radio-group v-model="value" @change="radioChange">
|
||||||
|
<label class="radio-view" v-for="(item, index) in goodsList" :key="index">
|
||||||
|
<view class="radio">
|
||||||
|
<u-radio color="#F0AD4E" :name="item.goods_id" active-color="#FF780F" icon-size="34" shape="circle"></u-radio>
|
||||||
|
</view>
|
||||||
|
<view class="store_info">
|
||||||
|
<view class="info_img">
|
||||||
|
<image :src="item.goods_image" mode="">
|
||||||
|
</view>
|
||||||
|
<view class="info_txt">
|
||||||
|
<view class="content u-line-2">
|
||||||
|
{{ item.goods_name }}
|
||||||
|
</view>
|
||||||
|
<view class="much">
|
||||||
|
<text>¥{{ item.goods_pay_price }}</text>
|
||||||
|
<text>x{{ item.goods_num }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</label>
|
||||||
|
</u-radio-group>
|
||||||
|
</view>
|
||||||
|
<view class="refund-details">
|
||||||
|
<view class="goods-number">
|
||||||
|
<view>选择数量</view>
|
||||||
|
<view></view>
|
||||||
|
</view>
|
||||||
|
<view class="refund-price">
|
||||||
|
<view>
|
||||||
|
<view>退款金额</view>
|
||||||
|
<view>¥99.00</view>
|
||||||
|
</view>
|
||||||
|
<view>若退款成功,将退还给您¥99.00</view>
|
||||||
|
</view>
|
||||||
|
<view class="refund-text">
|
||||||
|
<view>申请说明</view>
|
||||||
|
<u-input v-model="refundText" type="textarea" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="submit-btn">提交申请</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
goodsList: [],
|
||||||
|
value: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.getOrderInfo(option.oid);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
radioChange(e){
|
||||||
|
console.log(e)
|
||||||
|
},
|
||||||
|
getOrderInfo(id) {
|
||||||
|
this.$u.api.getOrderInfo({
|
||||||
|
order_id: id,
|
||||||
|
}).then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
// this.orderInfo = res.data;
|
||||||
|
this.goodsList = res.data.extend_order_goods;
|
||||||
|
console.log(this.goodsList);
|
||||||
|
}
|
||||||
|
// uni.stopPullDownRefresh(); // 结束刷新
|
||||||
|
})
|
||||||
|
},
|
||||||
|
applyRefund() {
|
||||||
|
let params = {
|
||||||
|
order_id: this.order.order_id,
|
||||||
|
// goods_id: goods_id,
|
||||||
|
// refund_amount: refund_amount,
|
||||||
|
}
|
||||||
|
this.$u.api.refundOrder(params).then(res => {
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.refund {
|
||||||
|
min-height: calc(100vh - var(--window-top));
|
||||||
|
background-color: #EDEDED;
|
||||||
|
.radios-container {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
.radio-view {
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
padding: 26rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 1rpx;
|
||||||
|
.radio {
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
.store_info {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
width: 100%;
|
||||||
|
.info_img{
|
||||||
|
>image{
|
||||||
|
width: 180rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
background-color: aqua;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.info_txt{
|
||||||
|
padding-left: 30rpx;
|
||||||
|
padding-right: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
width: 100%;
|
||||||
|
.content{
|
||||||
|
height: 74rpx;
|
||||||
|
line-height: 37rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color:rgba(51,51,51,1);
|
||||||
|
}
|
||||||
|
.much{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.refund-details {
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
.goods-number {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
138
pageE/order/commentItem.vue
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
<template>
|
||||||
|
<view class="comment-item-view">
|
||||||
|
<view class="view-container">
|
||||||
|
<view class="goods-info">
|
||||||
|
<image :src="goods.goods_image"></image>
|
||||||
|
<view class="goods-text">
|
||||||
|
<view class="goods-name u-line-1">{{ goods.goods_name }}</view>
|
||||||
|
<!-- <view class="goods-spec u-line-1">{{ }}</view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="rate">
|
||||||
|
<view class="title">描述相符</view>
|
||||||
|
<u-rate :count="5" v-model="describe" active-color="#FF780F" inactive-color="#CCCCCC" gutter="20" size="32"></u-rate>
|
||||||
|
</view>
|
||||||
|
<u-input v-model="content" type="textarea" height="100" :auto-height="true" placeholder="发表你的评价吧,收货时心情如何?" />
|
||||||
|
<u-upload
|
||||||
|
:ref="'upload' + index"
|
||||||
|
:custom-btn="true"
|
||||||
|
:max-count="count"
|
||||||
|
:auto-upload="false"
|
||||||
|
:action="action"
|
||||||
|
:header="header"
|
||||||
|
:form-data="formData"
|
||||||
|
:name="fileName"
|
||||||
|
@on-list-change="setImageList"
|
||||||
|
>
|
||||||
|
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
||||||
|
<image src="../static/mine/27.png"></image>
|
||||||
|
</view>
|
||||||
|
</u-upload>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
count: 3,
|
||||||
|
action: this.$u.http.config.baseUrl + '/Upload/uploadfile',
|
||||||
|
header: {
|
||||||
|
"authorization": 'Bearer' + " " + uni.getStorageSync('token')
|
||||||
|
},
|
||||||
|
fileName: 'common', // 与formData name 一样
|
||||||
|
formData: {
|
||||||
|
name: 'common', // 其他图片
|
||||||
|
},
|
||||||
|
content: '',
|
||||||
|
describe: '',
|
||||||
|
imageList: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
goods: Object,
|
||||||
|
index: Number
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
content(value) {
|
||||||
|
this.$emit('setContent', { content: value, index: this.index });
|
||||||
|
},
|
||||||
|
describe(value) {
|
||||||
|
this.$emit('setDescribe', { describe: value, index: this.index });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
setImageList(lists) {
|
||||||
|
// console.log(lists);
|
||||||
|
this.imageList = [];
|
||||||
|
lists.forEach(item => {
|
||||||
|
this.imageList.push(item.url);
|
||||||
|
})
|
||||||
|
console.log(this.imageList);
|
||||||
|
this.$emit('setLocalImage', { list: this.imageList, index: this.index });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.comment-item-view {
|
||||||
|
.view-container {
|
||||||
|
.goods-info {
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
> image {
|
||||||
|
width: 113rpx;
|
||||||
|
height: 106rpx;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
background-color: antiquewhite;
|
||||||
|
}
|
||||||
|
.goods-text {
|
||||||
|
.goods-name {
|
||||||
|
width: 530rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(0,0,51,1);
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
.goods-spec {
|
||||||
|
max-width: 300rpx;
|
||||||
|
box-sizing: content-box;
|
||||||
|
padding: 10rpx 15rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: rgba(153,153,153,1);
|
||||||
|
background:rgba(236,236,236,1);
|
||||||
|
border-radius: 6rpx;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
textarea {
|
||||||
|
width: 100% !important;
|
||||||
|
margin-bottom: 60rpx;
|
||||||
|
}
|
||||||
|
.slot-btn {
|
||||||
|
width: 140rpx;
|
||||||
|
height: 140rpx;
|
||||||
|
background: rgba(236,236,236,1);
|
||||||
|
border-radius: 10rpx;
|
||||||
|
text-align: center;
|
||||||
|
> image {
|
||||||
|
margin-top: 48rpx;
|
||||||
|
width: 54rpx;
|
||||||
|
height: 49rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rate {
|
||||||
|
display: flex;
|
||||||
|
&:not(:last-child) {
|
||||||
|
margin-bottom: 35rpx;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
margin-right: 25rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -14,16 +14,15 @@
|
|||||||
<view>退出登录</view>
|
<view>退出登录</view>
|
||||||
<image src="../static/mine/21.png"></image>
|
<image src="../static/mine/21.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<u-action-sheet
|
<u-action-sheet v-model="sheetStatus" :list="list" :tips="tips" :border-radius="20" @click="choiceOption">
|
||||||
v-model="sheetStatus"
|
|
||||||
:list="list"
|
|
||||||
:tips="tips"
|
|
||||||
:border-radius="20"
|
|
||||||
@click="choiceOption">
|
|
||||||
</u-action-sheet>
|
</u-action-sheet>
|
||||||
|
<u-modal v-model="show" show-confirm-button show-cancel-button :content="content" @confirm="loginOut"></u-modal>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
mapMutations
|
||||||
|
} from 'vuex';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -34,8 +33,7 @@ export default {
|
|||||||
fontSize: 24
|
fontSize: 24
|
||||||
},
|
},
|
||||||
sheetStatus: false,
|
sheetStatus: false,
|
||||||
list: [
|
list: [{
|
||||||
{
|
|
||||||
text: '换个账号登录',
|
text: '换个账号登录',
|
||||||
color: '#FF780F',
|
color: '#FF780F',
|
||||||
fontSize: 28
|
fontSize: 28
|
||||||
@@ -46,8 +44,7 @@ export default {
|
|||||||
fontSize: 28
|
fontSize: 28
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
settingList: [
|
settingList: [{
|
||||||
{
|
|
||||||
title: '个人信息',
|
title: '个人信息',
|
||||||
link: '../mine/MineInfo'
|
link: '../mine/MineInfo'
|
||||||
},
|
},
|
||||||
@@ -71,19 +68,30 @@ export default {
|
|||||||
title: '帮助与反馈',
|
title: '帮助与反馈',
|
||||||
link: './feedback'
|
link: './feedback'
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
|
content: "是否退出登录!",
|
||||||
|
show: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapMutations(['logout']),
|
||||||
|
// 退出登录选择 0:切换账号 | 1:退出登录
|
||||||
choiceOption(index) {
|
choiceOption(index) {
|
||||||
console.log(index);
|
console.log(index);
|
||||||
|
if (index == 1) {
|
||||||
// console.log(`点击了第${index + 1}项,内容为:${this.list[index].text}`)
|
this.show = true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
toNextPage(url, ...params) {
|
toNextPage(url, ...params) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: url
|
url: url
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
loginOut() {
|
||||||
|
this.logout();
|
||||||
|
uni.redirectTo({
|
||||||
|
url: "../../pageA/login/login",
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -92,6 +100,7 @@ export default {
|
|||||||
.setting {
|
.setting {
|
||||||
min-height: calc(100vh - var(--window-top));
|
min-height: calc(100vh - var(--window-top));
|
||||||
background-color: #ECECEC;
|
background-color: #ECECEC;
|
||||||
|
|
||||||
.list-item {
|
.list-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -102,6 +111,7 @@ export default {
|
|||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: rgba(51, 51, 51, 1);
|
color: rgba(51, 51, 51, 1);
|
||||||
|
|
||||||
>image {
|
>image {
|
||||||
width: 14rpx;
|
width: 14rpx;
|
||||||
height: 24rpx;
|
height: 24rpx;
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 155 KiB |
BIN
pageE/static/mine/36.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
pageE/static/mine/37.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
@@ -3,7 +3,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88"></u-tabs-swiper>
|
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88"></u-tabs-swiper>
|
||||||
</view>
|
</view>
|
||||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
|
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
|
||||||
<swiper-item class="swiper-item">
|
<swiper-item class="swiper-item">
|
||||||
<scroll-view scroll-y class="order-list" @scrolltolower="reachBottom">
|
<scroll-view scroll-y class="order-list" @scrolltolower="reachBottom">
|
||||||
<u-empty text="暂无订单" mode="order" color="#000000" v-if="!orderList.length"></u-empty>
|
<u-empty text="暂无订单" mode="order" color="#000000" v-if="!orderList.length"></u-empty>
|
||||||
@@ -14,9 +14,9 @@
|
|||||||
<view class="order-status">{{ item.status }}</view>
|
<view class="order-status">{{ item.status }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-name">美甲人姓名:{{ item.manicure_name }}</view>
|
<view class="order-name">美甲人姓名:{{ item.manicure_name }}</view>
|
||||||
<view class="order-date">时间:{{ item.manicure_time | dateFormat }}</view>
|
<view class="order-date">时间:{{ item.manicure_time | date }}</view>
|
||||||
</view>
|
</view>
|
||||||
<u-loadmore :status="loadStatus" bgColor="#ECECEC" margin-bottom="20"></u-loadmore>
|
<u-loadmore :status="loadStatus" bgColor="#ECECEC" margin-bottom="20" v-if="orderList.length>=pageSize"></u-loadmore>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
pageSize: 1,
|
||||||
list: [{
|
list: [{
|
||||||
name: '我的订单'
|
name: '我的订单'
|
||||||
}, {
|
}, {
|
||||||
@@ -42,56 +43,58 @@ export default {
|
|||||||
page: 1,
|
page: 1,
|
||||||
orderList: [],
|
orderList: [],
|
||||||
loadStatus: 'loadmore',
|
loadStatus: 'loadmore',
|
||||||
|
timer: true,
|
||||||
|
swiperHeight: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.getManicureList({ load: 'reload' });
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.setViewHeight();
|
||||||
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.current = 0;
|
this.current = 0;
|
||||||
this.swiperCurrent = 0;
|
this.swiperCurrent = 0;
|
||||||
this.getManicureList().then(order => {
|
this.getManicureList({ load: 'reload' });
|
||||||
// console.log(order);
|
|
||||||
|
|
||||||
this.orderList = this.orderList.concat(order);
|
|
||||||
// console.log(this.orderList);
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
filters: {
|
|
||||||
dateFormat(value) {
|
|
||||||
let date = new Date(value * 1000);
|
|
||||||
let year, month, day;
|
|
||||||
year = date.getFullYear();
|
|
||||||
month = date.getMonth() + 1;
|
|
||||||
day = date.getDate();
|
|
||||||
return year + "-" + month + "-" + day;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getManicureList() {
|
async getManicureList({ load }) {
|
||||||
let res = await this.$u.api.getManicureList({
|
const res = await this.$u.api.getManicureList({
|
||||||
page: this.page
|
page: this.page
|
||||||
})
|
})
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
this.timer = true;
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
return res.data.list;
|
if(load == 'reload') this.orderList = res.data.list;
|
||||||
|
else if(load == 'loadmore') this.orderList.push(...res.data.list);
|
||||||
}
|
}
|
||||||
|
return res.data.list.length;
|
||||||
},
|
},
|
||||||
// 加载更多
|
// 加载更多
|
||||||
reachBottom() {
|
reachBottom() {
|
||||||
// 修改当前的 loadStatus
|
if(!this.timer) return false;
|
||||||
this.loadStatus = "loading";
|
this.loadStatus = "loading";
|
||||||
this.page++;
|
this.page++;
|
||||||
this.getManicureList().then(order => {
|
this.getManicureList({ load: 'loadmore' }).then(length => {
|
||||||
if (!order.length) {
|
if(length == 0) {
|
||||||
// 如果没有数据page-1
|
|
||||||
this.page--;
|
this.page--;
|
||||||
this.loadStatus = "nomore";
|
this.loadStatus = 'nomore';
|
||||||
} else {
|
} else {
|
||||||
this.orderList = this.orderList.concat(order);
|
this.loadStatus = 'loading';
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadStatus = "nomore";
|
||||||
|
this.page--;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
setViewHeight() {
|
||||||
|
const res = uni.getSystemInfoSync();
|
||||||
|
this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
|
||||||
|
},
|
||||||
tabsChange(index) {
|
tabsChange(index) {
|
||||||
this.swiperCurrent = index;
|
this.swiperCurrent = index;
|
||||||
this.toApplyPage(index);
|
// this.toApplyPage(index);
|
||||||
},
|
},
|
||||||
animationfinish(e) {
|
animationfinish(e) {
|
||||||
let current = e.detail.current;
|
let current = e.detail.current;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
name: '',
|
name: '',
|
||||||
time: '',
|
time: '',
|
||||||
address: '四川省攀枝花市银江镇',
|
address: '',
|
||||||
params: {
|
params: {
|
||||||
year: true,
|
year: true,
|
||||||
month: true,
|
month: true,
|
||||||
@@ -65,14 +65,11 @@ export default {
|
|||||||
time: new Date(this.time)
|
time: new Date(this.time)
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
uni.redirectTo({
|
this.$refs.uToast.show({
|
||||||
url: '/pageE/tool/Manicure'
|
title: res.message,
|
||||||
});
|
type: 'success',
|
||||||
// this.$refs.uToast.show({
|
back: true,
|
||||||
// title: res.message,
|
})
|
||||||
// type: 'success',
|
|
||||||
// url: '/pageE/tool/Manicure'
|
|
||||||
// })
|
|
||||||
} else {
|
} else {
|
||||||
this.showToast(res.message, 'error');
|
this.showToast(res.message, 'error');
|
||||||
}
|
}
|
||||||
@@ -90,7 +87,7 @@ export default {
|
|||||||
},
|
},
|
||||||
chooseDate(e) {
|
chooseDate(e) {
|
||||||
// let time = e.year + '年' + e.month + '月' + e.day + '日' + e.hour + '时' + e.minute + '分'
|
// let time = e.year + '年' + e.month + '月' + e.day + '日' + e.hour + '时' + e.minute + '分'
|
||||||
let time = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute
|
let time = e.year + '/' + e.month + '/' + e.day + ' ' + e.hour + ':' + e.minute
|
||||||
this.time = time
|
this.time = time
|
||||||
},
|
},
|
||||||
showToast(message, type) {
|
showToast(message, type) {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export default {
|
|||||||
const res = await this.$u.api.getBrowseList({ page: this.page });
|
const res = await this.$u.api.getBrowseList({ page: this.page });
|
||||||
this.timer = false;
|
this.timer = false;
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.historyList = res.data.storeInfo;
|
this.historyList.push(...res.data.storeInfo);
|
||||||
}
|
}
|
||||||
return res.data.storeInfo.length;
|
return res.data.storeInfo.length;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,27 +2,51 @@
|
|||||||
<view class="wash">
|
<view class="wash">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88"></u-tabs-swiper>
|
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88"></u-tabs-swiper>
|
||||||
|
<u-icon name="arrow-down-fill" :color="current == 0 ? '#FF780F' : '#333333'" size="17" class="order-icon" :style="{ left: list[0].name == '平台历史订单' ? '236rpx' : '252rpx' }"></u-icon>
|
||||||
|
<view class="popup" v-if="showPopup" @click="onTap">
|
||||||
|
<view class="popup_cont" @click="replaces(1)">
|
||||||
|
实体店历史订单
|
||||||
</view>
|
</view>
|
||||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
|
<view class="popup_cont" @click="replaces(2)">
|
||||||
|
平台历史订单
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
|
||||||
<swiper-item class="swiper-item">
|
<swiper-item class="swiper-item">
|
||||||
<scroll-view scroll-y class="order-list">
|
<scroll-view scroll-y class="order-list" @scrolltolower="loadmore">
|
||||||
<view v-for="(item, index) in 6" :key="index" class="order-item">
|
<view v-for="(item, index) in orderList" :key="index" class="order-item">
|
||||||
<view class="order-title">
|
<view class="order-title">
|
||||||
<view class="order-text">订单状态</view>
|
<view class="order-text">订单状态</view>
|
||||||
<view class="order-status">已预约</view>
|
<view class="order-status">{{ item.order_status | viewStatus }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-info">
|
<view class="order-info">
|
||||||
<image src="../static/mine/23.png"></image>
|
<image :src="item.goods_image"></image>
|
||||||
<view>
|
<view v-if="item.deliver_goods_type == 2 && item.order_status == 20">
|
||||||
<view>骑手名字:xxx</view>
|
<view>骑手名字:{{ item.takeawayer_name || '' }}</view>
|
||||||
<view>联系方式:123456789</view>
|
<view>联系方式:{{ item.takeawayer_mobile || '' }}</view>
|
||||||
<view>所属公司:xx公司</view>
|
<view>所属公司:{{ item.company || '' }}</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="item.order_status == 0">
|
||||||
|
<view>正在等待接单</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="item.order_status == 40">
|
||||||
|
<view>商家已拒绝</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="item.order_status == 50">
|
||||||
|
<view>交易已完成</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="item.deliver_goods_type == 1 && item.order_status == 20">
|
||||||
|
<view>商家在正路途中,请耐心等待</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="send-btn">
|
<view class="send-btn" v-if="item.order_status == 20 || item.order_status == 50">
|
||||||
<view class="btn" v-if="btn_show">
|
<view class="btn" v-if="item.order_status == 20" @click="sendLaundryOrderConfirm(item.laundry_id)">
|
||||||
确认完成
|
确认完成
|
||||||
</view>
|
</view>
|
||||||
|
<view class="btn" v-if="item.order_status == 50" @click="toComment(item.laundry_id)">
|
||||||
|
去评价
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@@ -34,24 +58,16 @@
|
|||||||
</swiper-item>
|
</swiper-item>
|
||||||
<swiper-item class="swiper-item">
|
<swiper-item class="swiper-item">
|
||||||
<scroll-view scroll-y class="comment">
|
<scroll-view scroll-y class="comment">
|
||||||
<view v-for="(item, index) in 3" :key="index" class="comment-item">
|
<view v-for="(comment, index) in commentList" :key="index" class="comment-item">
|
||||||
<Comment></Comment>
|
<Comment :info="comment"></Comment>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view class="popup" v-if="showPopup" @click="onTap">
|
|
||||||
<view class="popup_cont" @click="replaces(1)">
|
|
||||||
实体店历史订单
|
|
||||||
</view>
|
|
||||||
<view class="popup_cont" @click="replaces(2)">
|
|
||||||
平台历史订单
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Comment from '@/components/mine/comment/index'
|
import Comment from '@/components/mine/comment/index';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -65,44 +81,136 @@ export default {
|
|||||||
}],
|
}],
|
||||||
current: 0,
|
current: 0,
|
||||||
swiperCurrent: 0,
|
swiperCurrent: 0,
|
||||||
btn_show:true
|
btn_show:true,
|
||||||
|
page: 1,
|
||||||
|
orderList: [],
|
||||||
|
timer: true,
|
||||||
|
commentList: [],
|
||||||
|
swiperHeight: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Comment
|
Comment
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
viewStatus(status) {
|
||||||
|
let state;
|
||||||
|
switch (status) {
|
||||||
|
case 0:
|
||||||
|
state = '等待接单';
|
||||||
|
break;
|
||||||
|
case 20:
|
||||||
|
state = '已接单';
|
||||||
|
break;
|
||||||
|
case 40:
|
||||||
|
state = '交易失败';
|
||||||
|
break;
|
||||||
|
case 50:
|
||||||
|
state = '交易成功';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
current(index) {
|
||||||
|
if(index == 1) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pageE/tool/WashOrder'
|
||||||
|
});
|
||||||
|
this.showPopup = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.sendLaundryOrderList();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.current = 0;
|
this.current = 0;
|
||||||
this.swiperCurrent = 0;
|
this.swiperCurrent = 0;
|
||||||
this.showPopup= false
|
this.showPopup = false;
|
||||||
|
this.sendLaundryOrderList();
|
||||||
|
this.sendCommentList();
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.setViewHeight();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async sendLaundryOrderList({ load = 'reload' } = {}) {
|
||||||
|
let type = this.list[0].name == '平台历史订单' ? 1 : 2;
|
||||||
|
const res = await this.$u.api.sendLaundryOrderList({
|
||||||
|
type: type,
|
||||||
|
page: this.page,
|
||||||
|
})
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
this.timer = false;
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
// this.orderList = res.data.list;
|
||||||
|
// console.log(...res.data.list);
|
||||||
|
if(load == 'loadmore') this.orderList = this.orderList.concat(res.data.list);
|
||||||
|
else if(load == 'reload') this.orderList = res.data.list;
|
||||||
|
} else {
|
||||||
|
this.orderList = [];
|
||||||
|
}
|
||||||
|
return res.data.list.length;
|
||||||
|
},
|
||||||
|
sendLaundryOrderConfirm(id) {
|
||||||
|
this.$u.api.sendLaundryOrderConfirm({ id: id }).then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.sendLaundryOrderList();
|
||||||
|
}
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
loadmore() {
|
||||||
|
if(!this.timer) return false;
|
||||||
|
this.loadStatus = "loading";
|
||||||
|
this.page++;
|
||||||
|
this.sendLaundryOrderList({ load: 'loadmore' }).then(length => {
|
||||||
|
if(length == 0) {
|
||||||
|
this.page--;
|
||||||
|
this.status = 'nomore';
|
||||||
|
} else {
|
||||||
|
this.status = 'loading';
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadStatus = "nomore";
|
||||||
|
this.page--;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 送洗评论列表
|
||||||
|
sendCommentList() {
|
||||||
|
this.$u.api.sendCommentList().then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.commentList = res.data.list;
|
||||||
|
} else {
|
||||||
|
this.commentList = [];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
setViewHeight() {
|
||||||
|
const res = uni.getSystemInfoSync();
|
||||||
|
this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
|
||||||
|
},
|
||||||
|
toComment(id) {
|
||||||
|
this.$u.route('/pageE/tool/washComment', {
|
||||||
|
id: id
|
||||||
|
});
|
||||||
|
},
|
||||||
tabsChange(index) {
|
tabsChange(index) {
|
||||||
this.swiperCurrent = index;
|
this.swiperCurrent = index;
|
||||||
this.toApplyPage(index);
|
if (index == 0){
|
||||||
|
this.showPopup = !this.showPopup;
|
||||||
|
} else {
|
||||||
|
this.showPopup = false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
animationfinish(e) {
|
animationfinish(e) {
|
||||||
let current = e.detail.current;
|
let current = e.detail.current;
|
||||||
this.swiperCurrent = current;
|
this.swiperCurrent = current;
|
||||||
this.current = current;
|
this.current = current;
|
||||||
this.toApplyPage(current);
|
|
||||||
},
|
|
||||||
toApplyPage(index) {
|
|
||||||
console.log(index)
|
|
||||||
var that = this;
|
|
||||||
if(index == 1) {
|
|
||||||
this.showPopup = false
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pageE/tool/WashOrder'
|
|
||||||
});
|
|
||||||
}else if(index ==0){
|
|
||||||
this.history();
|
|
||||||
}else{
|
|
||||||
this.showPopup = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
history(){
|
|
||||||
this.showPopup = true;
|
|
||||||
},
|
},
|
||||||
replaces(e){
|
replaces(e){
|
||||||
if(e == 1){
|
if(e == 1){
|
||||||
@@ -110,6 +218,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$set(this.list,0,{name: '平台历史订单'} )
|
this.$set(this.list,0,{name: '平台历史订单'} )
|
||||||
}
|
}
|
||||||
|
this.sendLaundryOrderList();
|
||||||
},
|
},
|
||||||
onTap(){
|
onTap(){
|
||||||
this.showPopup = false
|
this.showPopup = false
|
||||||
@@ -125,10 +234,43 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
> uni-swiper {
|
> uni-swiper {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 85vh;
|
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
|
position: relative;
|
||||||
|
.order-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(0, -50%);
|
||||||
|
z-index: 9;
|
||||||
|
}
|
||||||
|
.popup{
|
||||||
|
width: 100%;
|
||||||
|
height: calc(calc(100vh - 88rpx) - var(--window-top));
|
||||||
|
position: absolute;
|
||||||
|
top: 88rpx;
|
||||||
|
left: 0;
|
||||||
|
z-index: 9;
|
||||||
|
background-color: rgba(0, 0, 0, 0.4);
|
||||||
|
transform: scale(1);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: top;
|
||||||
|
align-items: center;
|
||||||
|
transition-duration: 0.3s;
|
||||||
|
.popup_cont{
|
||||||
|
border-top: 1px solid RGBA(239, 236, 240, 1);
|
||||||
|
background-color: #fff;
|
||||||
|
width: 100%;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
font-size:28rpx;
|
||||||
|
font-family:PingFang SC;
|
||||||
|
font-weight:400;
|
||||||
|
color:rgba(102,102,102,1);
|
||||||
|
padding-left: 41rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.swiper-item {
|
.swiper-item {
|
||||||
padding-top: 20rpx;
|
padding-top: 20rpx;
|
||||||
@@ -140,7 +282,7 @@ export default {
|
|||||||
.order-item {
|
.order-item {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
height: 362rpx;
|
// height: 362rpx;
|
||||||
background: rgba(255,255,255,1);
|
background: rgba(255,255,255,1);
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
@@ -183,7 +325,6 @@ export default {
|
|||||||
.btn{
|
.btn{
|
||||||
width: 154rpx;
|
width: 154rpx;
|
||||||
height: 54rpx;
|
height: 54rpx;
|
||||||
background: RGBA(255, 254, 255, 1);
|
|
||||||
border-radius: 49rpx;
|
border-radius: 49rpx;
|
||||||
transform: translate(-50%, 0);
|
transform: translate(-50%, 0);
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
@@ -204,35 +345,5 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.popup{
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
top: 88px;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
z-index: 2;
|
|
||||||
background-color: rgba(0, 0, 0, 0.4);
|
|
||||||
transform: scale(1);
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: top;
|
|
||||||
align-items: center;
|
|
||||||
transition-duration: 0.3s;
|
|
||||||
|
|
||||||
.popup_cont{
|
|
||||||
border-top: 1px solid RGBA(239, 236, 240, 1);
|
|
||||||
background-color: #fff;
|
|
||||||
width: 100%;
|
|
||||||
height: 80rpx;
|
|
||||||
line-height: 80rpx;
|
|
||||||
font-size:28rpx;
|
|
||||||
font-family:PingFang SC;
|
|
||||||
font-weight:400;
|
|
||||||
color:rgba(102,102,102,1);
|
|
||||||
padding-left: 41rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -3,12 +3,13 @@
|
|||||||
<view>
|
<view>
|
||||||
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88"></u-tabs-swiper>
|
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88"></u-tabs-swiper>
|
||||||
</view>
|
</view>
|
||||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish">
|
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ minHeight: swiperHeight }">
|
||||||
<swiper-item class="swiper-item">
|
<swiper-item class="swiper-item">
|
||||||
|
<scroll-view scroll-y="true" style="height: 100%;">
|
||||||
<view class="order-info">
|
<view class="order-info">
|
||||||
<view class="order-name" @click="order()">
|
<view class="order-name" @click="showPopup=true">
|
||||||
<view class="title titles" >
|
<view class="title titles" >
|
||||||
<text>选择订单:</text>
|
<text>选择订单:</text>
|
||||||
<image src="../../static/image/shop/2.png" mode=""></image>
|
<image src="../../static/image/shop/2.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<u-icon name="arrow-dwon" color="#2979ff" size="28"></u-icon>
|
<u-icon name="arrow-dwon" color="#2979ff" size="28"></u-icon>
|
||||||
@@ -16,268 +17,454 @@
|
|||||||
<view class="choose-info" v-if="choose">
|
<view class="choose-info" v-if="choose">
|
||||||
<view class="store">
|
<view class="store">
|
||||||
<view>
|
<view>
|
||||||
<image src="../../static/image/mine/23.png" mode=""></image>胖胖的店
|
<image :src="checkedGoods.store.store_avatar"></image>{{ checkedGoods.store.store_name }}
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
订单编号:2222222222222
|
订单编号:{{ checkedGoods.order_sn }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="store_info">
|
<view class="store_info">
|
||||||
<view class="info_img">
|
<view class="info_img">
|
||||||
<image src="../../static/image/mine/23.png" mode="">
|
<image :src="checkedGoods.goods.goods_image" mode="">
|
||||||
</view>
|
</view>
|
||||||
<view class="info_txt">
|
<view class="info_txt">
|
||||||
<view class="content">
|
<view class="content u-line-2">
|
||||||
木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子
|
{{ checkedGoods.goods.goods_name }}
|
||||||
</view>
|
</view>
|
||||||
<view class="much">
|
<view class="much">
|
||||||
<text>¥99</text>
|
<text>¥{{ checkedGoods.goods.goods_pay_price }}</text>
|
||||||
<text>x1</text>
|
<text>x{{ checkedGoods.goods.goods_num }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-name">
|
<view class="order-view order-phone">
|
||||||
<view class="title">送洗人:</view>
|
<view class="title">衣服状况:</view>
|
||||||
|
<input type="text" v-model="goodsStatus" />
|
||||||
|
</view>
|
||||||
|
<view class="order-view order-type" @click="showClothesType=true">
|
||||||
|
<view class="title">商品类型:</view>
|
||||||
|
<input type="text" v-model="type.label" disabled />
|
||||||
|
</view>
|
||||||
|
<view class="order-view order-name">
|
||||||
|
<view class="title">送洗人:</view>
|
||||||
<input type="text" v-model="name" />
|
<input type="text" v-model="name" />
|
||||||
</view>
|
</view>
|
||||||
<view class="order-phone">
|
<view class="order-view order-phone">
|
||||||
<view class="title">手机号:</view>
|
<view class="title">手机号:</view>
|
||||||
<input type="text" v-model="phone" />
|
<input type="text" v-model="phone" maxlength="11" />
|
||||||
</view>
|
</view>
|
||||||
<view class="order-area">
|
<view class="order-view order-area" @click="showAddress=true">
|
||||||
<view class="title">省市区:</view>
|
<view class="title">省市区:</view>
|
||||||
<input type="text" v-model="area" />
|
<input type="text" v-model="area" disabled />
|
||||||
<view class="location">
|
<!-- <view class="location">
|
||||||
<image src="../static/mine/28.png"></image>
|
<image src="../static/mine/28.png"></image>
|
||||||
<view>定位</view>
|
<view>定位</view>
|
||||||
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="order-view order-address">
|
||||||
<view class="order-address">
|
<view class="title">详细地址:</view>
|
||||||
<view class="title">详细地址:</view>
|
|
||||||
<input type="text" v-model="address" />
|
<input type="text" v-model="address" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="upload-image">
|
<view class="upload-image">
|
||||||
<view class="title">上传商品图片</view>
|
<view class="title">上传商品图片</view>
|
||||||
<u-upload
|
<u-upload
|
||||||
ref="uUpload"
|
ref="platform"
|
||||||
@on-uploaded="onUploaded"
|
|
||||||
:custom-btn="true"
|
:custom-btn="true"
|
||||||
:max-count="count"
|
:max-count="count"
|
||||||
|
:action="uaction"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
|
:header="uheader"
|
||||||
|
:form-data="uformData"
|
||||||
|
:name="uname"
|
||||||
|
@on-uploaded="setImageList"
|
||||||
>
|
>
|
||||||
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
||||||
<img src="../static/mine/27.png" />
|
<image src="../static/mine/27.png"></image>
|
||||||
</view>
|
</view>
|
||||||
</u-upload>
|
</u-upload>
|
||||||
</view>
|
</view>
|
||||||
<view class="wash-btn" @click="reset()">确认送洗</view>
|
<view class="wash-btn" @click="submitImage">确认送洗</view>
|
||||||
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
<swiper-item class="swiper-item">
|
<swiper-item class="swiper-item">
|
||||||
<view class="order-info">
|
<view class="order-info">
|
||||||
<view class="order-name">
|
<view class="order-view order-name">
|
||||||
<view class="title">商品名称:</view>
|
<view class="title">商品名称:</view>
|
||||||
|
<input type="text" v-model="goodsName" />
|
||||||
|
</view>
|
||||||
|
<view class="order-view order-phone">
|
||||||
|
<view class="title">衣服状况:</view>
|
||||||
|
<input type="text" v-model="goodsStatus" />
|
||||||
|
</view>
|
||||||
|
<view class="order-view order-phone" @click="showClothesType=true">
|
||||||
|
<view class="title">商品类型:</view>
|
||||||
|
<input type="text" v-model="type.label" disabled />
|
||||||
|
</view>
|
||||||
|
<view class="order-view order-name">
|
||||||
|
<view class="title">送洗人:</view>
|
||||||
<input type="text" v-model="name" />
|
<input type="text" v-model="name" />
|
||||||
</view>
|
</view>
|
||||||
<view class="order-phone">
|
<view class="order-view order-phone">
|
||||||
<view class="title">商品类型:</view>
|
<view class="title">手机号:</view>
|
||||||
<input type="text" v-model="name" />
|
<input type="text" v-model="phone" maxlength="11" />
|
||||||
</view>
|
</view>
|
||||||
<view class="order-phone">
|
<view class="order-view order-area" @click="showAddress=true">
|
||||||
<view class="title">衣服状况:</view>
|
<view class="title">省市区:</view>
|
||||||
<input type="text" v-model="name" />
|
<input type="text" v-model="area" disabled />
|
||||||
</view>
|
<!-- <view class="location">
|
||||||
<view class="order-name">
|
|
||||||
<view class="title">送洗人:</view>
|
|
||||||
<input type="text" v-model="name" />
|
|
||||||
</view>
|
|
||||||
<view class="order-area">
|
|
||||||
<view class="title">省市区:</view>
|
|
||||||
<input type="text" v-model="area" />
|
|
||||||
<view class="location">
|
|
||||||
<image src="../static/mine/28.png"></image>
|
<image src="../static/mine/28.png"></image>
|
||||||
<view>定位</view>
|
<view>定位</view>
|
||||||
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="order-view order-address">
|
||||||
<view class="order-address">
|
<view class="title">详细地址:</view>
|
||||||
<view class="title">详细地址:</view>
|
|
||||||
<input type="text" v-model="address" />
|
<input type="text" v-model="address" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="upload-image">
|
<view class="upload-image">
|
||||||
<view class="title">上传商品图片</view>
|
<view class="title">上传商品图片</view>
|
||||||
<u-upload
|
<u-upload
|
||||||
ref="uUpload"
|
ref="physical"
|
||||||
@on-uploaded="onUploaded"
|
|
||||||
:custom-btn="true"
|
:custom-btn="true"
|
||||||
:max-count="count"
|
:max-count="count"
|
||||||
|
:action="uaction"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
|
:header="uheader"
|
||||||
|
:form-data="uformData"
|
||||||
|
:name="uname"
|
||||||
|
@on-uploaded="setImageList"
|
||||||
>
|
>
|
||||||
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
||||||
<img src="../static/mine/27.png" />
|
<image src="../static/mine/27.png"></image>
|
||||||
</view>
|
</view>
|
||||||
</u-upload>
|
</u-upload>
|
||||||
</view>
|
</view>
|
||||||
<view class="wash-btn">确认送洗</view>
|
<view class="wash-btn" @click="submitImage">确认送洗</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view class="popup" v-if="showPopup">
|
<u-select v-model="showClothesType" :list="typeList" value-name="id" label-name="name" @confirm="confirmType" mode="single-column"></u-select>
|
||||||
<view class="popup_cont" >
|
<u-select v-model="showAddress"
|
||||||
|
mode="mutil-column-auto"
|
||||||
|
:list="areaList"
|
||||||
|
value-name="area_id"
|
||||||
|
label-name="area_name"
|
||||||
|
child-name="_child"
|
||||||
|
@confirm="setArea"
|
||||||
|
:safe-area-inset-bottom="true">
|
||||||
|
</u-select>
|
||||||
|
<u-popup v-model="showPopup" mode="bottom" border-radius="20">
|
||||||
|
<view class="order-popup">
|
||||||
<view class="check">
|
<view class="check">
|
||||||
<text>选择订单</text>
|
<text>选择订单</text>
|
||||||
<image src="../../static/image/common/17.png" @click="close()"></image>
|
<u-icon name="close" color="#A29FA3" size="32"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<swiper style="height: 1000px;" vertical="true">
|
|
||||||
<swiper-item class="swiper-item">
|
|
||||||
<scroll-view scroll-y class="order-list">
|
<scroll-view scroll-y class="order-list">
|
||||||
<view v-for="(items, index) in 3" :key="items.index">
|
<u-radio-group v-model="value" @change="radioChange">
|
||||||
|
<view v-for="(items, index) in orderList" :key="index" class="order-item">
|
||||||
<view class="store">
|
<view class="store">
|
||||||
<view>
|
<view class="name">
|
||||||
<image src="../../static/image/mine/23.png" mode=""></image>胖胖的店
|
<image :src="items.extend_store.store_avatar" mode=""></image>
|
||||||
|
<text>{{ items.store_name }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view class="order-sn">
|
||||||
订单编号:2222222222222
|
订单编号:{{ items.order_sn }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="checkd">
|
<view class="checkd">
|
||||||
<radio-group @change="er">
|
<label class="radio-view" v-for="(item, index) in items.extend_order_goods" :key="index">
|
||||||
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in checkLidt" :key="index">
|
|
||||||
<view class="radio">
|
<view class="radio">
|
||||||
<radio color="#F0AD4E" :value="item.id" :checked="a==item.id"/>
|
<u-radio color="#F0AD4E" :name="items.order_id + ' ' + item.goods_id" active-color="#FF780F" icon-size="34" shape="circle"></u-radio>
|
||||||
</view>
|
</view>
|
||||||
<view class="store_info">
|
<view class="store_info">
|
||||||
<view class="info_img">
|
<view class="info_img">
|
||||||
<image src="../../static/image/mine/23.png" mode="">
|
<image :src="item.goods_image" mode="">
|
||||||
</view>
|
</view>
|
||||||
<view class="info_txt">
|
<view class="info_txt">
|
||||||
<view class="content">
|
<view class="content u-line-2">
|
||||||
木糖少女小紫薯西装领连衣裙夏季新款女装夏收腰格子格纹裙子
|
{{ item.goods_name }}
|
||||||
</view>
|
</view>
|
||||||
<view class="much">
|
<view class="much">
|
||||||
<text>¥99</text>
|
<text>¥{{ item.goods_pay_price }}</text>
|
||||||
<text>x1</text>
|
<text>x{{ item.goods_num }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</label>
|
</label>
|
||||||
</radio-group>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</u-radio-group>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
<view class="order-btn" @click="confirm">确认</view>
|
||||||
</swiper>
|
|
||||||
<view class="bottom_btn" style="width: 100%;background-color: #fff;">
|
|
||||||
<view class="wash-btn" @click="confirm()">确认</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
items: [],
|
// items: [],
|
||||||
count: 4, // 最大图片数量
|
count: 4, // 最大图片数量
|
||||||
name: '',
|
type: {}, // 商品类型
|
||||||
phone: '',
|
name: '', // 送洗人
|
||||||
area: '',
|
phone: '', // 手机号
|
||||||
address: '',
|
area: '', // 省市区
|
||||||
|
goodsStatus: '', // 衣服状况
|
||||||
|
address: '', // 详细地址
|
||||||
|
goodsName: '', // 商品名称
|
||||||
list: [{
|
list: [{
|
||||||
name: '平台历史订单'
|
name: '平台历史订单'
|
||||||
}, {
|
}, {
|
||||||
name: '实体店历史订单'
|
name: '实体店历史订单'
|
||||||
}],
|
}],
|
||||||
|
typeList: [], // 商品类型列表
|
||||||
|
orderList: [], // 商品列表
|
||||||
|
page: 0,
|
||||||
current: 0,
|
current: 0,
|
||||||
swiperCurrent: 0,
|
swiperCurrent: 0,
|
||||||
|
areaList: [], // 地址列表
|
||||||
|
showClothesType: false,
|
||||||
|
showAddress: false,
|
||||||
showPopup : false,
|
showPopup : false,
|
||||||
a:"",
|
swiperHeight: '',
|
||||||
checkLidt:[
|
value: '', // radio
|
||||||
{id:'1'},
|
checkedGoods: {}, // 选中的商品
|
||||||
{id:'2'},
|
choose: false, // 是否选择了商品
|
||||||
{id:'3'}
|
filesArr: [], // 选择的图片
|
||||||
]
|
uploadImage: [], // 图片名称(后台返回)列表
|
||||||
|
uaction: this.$u.http.config.baseUrl + '/Upload/uploadfile', // 下面是上传图片的参数
|
||||||
|
uheader: {
|
||||||
|
"authorization": 'Bearer' + " " + uni.getStorageSync('token')
|
||||||
|
},
|
||||||
|
uname: 'common', // 与formData name 一样
|
||||||
|
uformData: {
|
||||||
|
name: 'common', // 其他图片
|
||||||
|
},
|
||||||
|
debounce: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
onShow() {
|
onShow() {
|
||||||
this.current = 0;
|
this.debounce = true;
|
||||||
this.swiperCurrent = 0;
|
// this.current = 0;
|
||||||
|
// this.swiperCurrent = 0;
|
||||||
this.showPopup = false;
|
this.showPopup = false;
|
||||||
this.choose = false
|
this.choose = false;
|
||||||
},
|
},
|
||||||
submit() {
|
onLoad() {
|
||||||
this.$refs.uUpload.upload();
|
this.getOrderList();
|
||||||
|
this.setViewHeight();
|
||||||
|
this.getAreaData();
|
||||||
|
this.getClothesTypeList();
|
||||||
},
|
},
|
||||||
onUploaded(list) {
|
methods: {
|
||||||
console.log(list)
|
getClothesTypeList() {
|
||||||
},tabsChange(index) {
|
this.$u.api.getClothesTypeList().then(res => {
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.typeList = res.data.typeList;
|
||||||
|
} else {
|
||||||
|
this.typeList = [];
|
||||||
|
}
|
||||||
|
console.log(this.typeList);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
confirmType(e) {
|
||||||
|
console.log(e);
|
||||||
|
this.type = e[0];
|
||||||
|
},
|
||||||
|
async getOrderList({ load = 'reload' } = {}) {
|
||||||
|
const res = await this.$u.api.getOrderList({
|
||||||
|
page: this.page,
|
||||||
|
// type: '40',
|
||||||
|
})
|
||||||
|
this.timer = true;
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
if(load == 'reload') this.orderList = res.data;
|
||||||
|
else this.orderList.push(...res.data);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
},
|
||||||
|
submitImage() {
|
||||||
|
if(!this.debounce) return;
|
||||||
|
this.debounce = false;
|
||||||
|
this.current == 0 ? this.$refs.platform.upload() : this.$refs.physical.upload();
|
||||||
|
},
|
||||||
|
tabsChange(index) {
|
||||||
this.swiperCurrent = index;
|
this.swiperCurrent = index;
|
||||||
},
|
},
|
||||||
er(e){
|
setImageList(lists) {
|
||||||
console.log(e)
|
// console.log(lists);
|
||||||
this.a =e.detail.value;
|
let imageList = [];
|
||||||
console.log(this.a)
|
lists.forEach(res => {
|
||||||
|
if(res.response.errCode == 0) imageList.push(res.response.data.file_name);
|
||||||
|
})
|
||||||
|
// console.log(imageList);
|
||||||
|
this.filesArr = imageList;
|
||||||
|
// console.log(this.filesArr);
|
||||||
|
this.confirmSend();
|
||||||
|
},
|
||||||
|
validationParams() {
|
||||||
|
if (this.current == 1) {
|
||||||
|
if(this.$u.test.isEmpty(this.goodsName)) {
|
||||||
|
this.showToast('商品名称不能为空', 'warning');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(this.current == 0) {
|
||||||
|
if(JSON.stringify(this.checkedGoods) == '{}') {
|
||||||
|
this.showToast('订单不能为空', 'warning');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(this.$u.test.isEmpty(this.goodsStatus)) {
|
||||||
|
this.showToast('衣服状况不能为空', 'warning');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(JSON.stringify(this.type) == '{}') {
|
||||||
|
this.showToast('商品类型不能为空', 'warning');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(this.$u.test.isEmpty(this.name)) {
|
||||||
|
this.showToast('送洗人不能为空', 'warning');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(this.$u.test.isEmpty(this.phone)) {
|
||||||
|
this.showToast('手机号不能为空', 'warning');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(!this.$u.test.mobile(this.phone)) {
|
||||||
|
this.showToast('手机号错误', 'warning');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(this.$u.test.isEmpty(this.area)) {
|
||||||
|
this.showToast('地址不能为空', 'warning');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(this.$u.test.isEmpty(this.address)) {
|
||||||
|
this.showToast('详细地址不能为空', 'warning');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
confirmSend() {
|
||||||
|
if(!this.validationParams()) return false;
|
||||||
|
let params = {
|
||||||
|
tid: this.type.value,
|
||||||
|
member_name: this.name,
|
||||||
|
area_info: this.area,
|
||||||
|
address_info: this.address,
|
||||||
|
goods_images: this.filesArr,
|
||||||
|
member_phone: this.phone,
|
||||||
|
condition: this.goodsStatus,
|
||||||
|
}
|
||||||
|
if(this.current == 0) {
|
||||||
|
Object.assign(params, {
|
||||||
|
type: 1,
|
||||||
|
order_id: this.checkedGoods.order_id,
|
||||||
|
goods_id: this.checkedGoods.goods.goods_id,
|
||||||
|
});
|
||||||
|
} else if(this.current == 1) {
|
||||||
|
Object.assign(params, {
|
||||||
|
type: 2,
|
||||||
|
goods_name: this.goodsName,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// console.log(params);
|
||||||
|
this.$u.api.sendLaundrySave(params).then(res => {
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
type: 'success',
|
||||||
|
back: true,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.message);
|
||||||
|
this.debounce = true;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
radioChange(e){
|
||||||
|
const ids = e.split(" ");
|
||||||
|
console.log(ids)
|
||||||
|
let checkedGoods = {};
|
||||||
|
this.orderList.forEach(order => {
|
||||||
|
if(order.order_id == ids[0]) {
|
||||||
|
Object.assign(checkedGoods, { store: order.extend_store });
|
||||||
|
Object.assign(checkedGoods, { order_sn: order.order_sn });
|
||||||
|
Object.assign(checkedGoods, { order_id: order.order_id });
|
||||||
|
order.extend_order_goods.forEach(goods => {
|
||||||
|
if(goods.goods_id == ids[1]) {
|
||||||
|
Object.assign(checkedGoods, { goods: goods });
|
||||||
|
this.checkedGoods = checkedGoods;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
setArea(area) {
|
||||||
|
// console.log(area);
|
||||||
|
this.area_id = area[0].value;
|
||||||
|
this.city_id = area[1].value;
|
||||||
|
let temp = '';
|
||||||
|
area.forEach(e => {
|
||||||
|
temp += e.label;
|
||||||
|
});
|
||||||
|
this.area = temp;
|
||||||
|
},
|
||||||
|
getAreaData() {
|
||||||
|
this.$u.api.getArea().then((res)=>{
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.areaList = res.data;
|
||||||
|
} else {
|
||||||
|
this.areaList = [];
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
animationfinish(e) {
|
animationfinish(e) {
|
||||||
|
// 可重新提交订单
|
||||||
|
this.debounce = true;
|
||||||
let current = e.detail.current;
|
let current = e.detail.current;
|
||||||
this.swiperCurrent = current;
|
this.swiperCurrent = current;
|
||||||
this.current = current;
|
this.current = current;
|
||||||
this.toApplyPage(current);
|
|
||||||
},
|
},
|
||||||
order(){
|
setViewHeight() {
|
||||||
this.showPopup = true;
|
const res = uni.getSystemInfoSync();
|
||||||
|
// this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
|
||||||
|
this.swiperHeight = res.windowHeight + 'px';
|
||||||
},
|
},
|
||||||
toApplyPage(index) {
|
confirm(e){
|
||||||
console.log(index)
|
|
||||||
if(index == 1) {
|
|
||||||
this.showPopup = false;
|
this.showPopup = false;
|
||||||
this.choose = false
|
if(JSON.stringify(this.checkedGoods) != '{}'){
|
||||||
}
|
this.choose = true;
|
||||||
},
|
|
||||||
// replaces(){
|
|
||||||
// if(this.list[0].name=='实体店历史订单'){
|
|
||||||
// this.$set(this.list,0,{name: '平台历史订单'} )
|
|
||||||
// }else{
|
|
||||||
// this.$set(this.list,0,{name: '实体店历史订单'} )
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
confirm(){
|
|
||||||
this.showPopup = false;
|
|
||||||
if(this.a ==''){
|
|
||||||
this.choose =false
|
|
||||||
}else{
|
}else{
|
||||||
this.choose = true
|
this.choose = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
close(){
|
close(){
|
||||||
this.showPopup = false
|
this.showPopup = false
|
||||||
},
|
},
|
||||||
reset(){
|
showToast(message, type) {
|
||||||
this.choose = false
|
this.$refs.uToast.show({
|
||||||
|
title: message,
|
||||||
|
type: type,
|
||||||
|
})
|
||||||
},
|
},
|
||||||
radioChange: function(evt) {
|
|
||||||
for (let i = 0; i < this.items.length; i++) {
|
|
||||||
if (this.items[i].value === evt.target.value) {
|
|
||||||
this.current = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.wash-order {
|
.wash-order {
|
||||||
|
height: calc(100vh - 1rpx);
|
||||||
|
overflow: hidden;
|
||||||
border-top: 1rpx solid #ECECEC;
|
border-top: 1rpx solid #ECECEC;
|
||||||
> uni-swiper {
|
> uni-swiper {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 95vh;
|
// height: 95vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-info {
|
.order-info {
|
||||||
|
|
||||||
.choose-info{
|
.choose-info{
|
||||||
display: flex;flex-wrap: wrap;
|
display: flex;flex-wrap: wrap;
|
||||||
height: 335rpx;
|
height: 335rpx;
|
||||||
@@ -288,16 +475,12 @@ export default {
|
|||||||
height:60rpx;
|
height:60rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
padding-right:13rpx
|
margin-right: 12rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-family:PingFang SC;
|
|
||||||
font-weight:400;
|
|
||||||
color:rgba(51,51,51,1);
|
color:rgba(51,51,51,1);
|
||||||
line-height: 60rpx;
|
line-height: 60rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
.store_info{
|
.store_info{
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -308,6 +491,8 @@ export default {
|
|||||||
>image {
|
>image {
|
||||||
width: 180rpx;
|
width: 180rpx;
|
||||||
height: 160rpx;
|
height: 160rpx;
|
||||||
|
background-color: aqua;
|
||||||
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.info_txt {
|
.info_txt {
|
||||||
@@ -317,7 +502,8 @@ export default {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.content {
|
.content {
|
||||||
line-height: 44rpx;
|
height: 74rpx;
|
||||||
|
line-height: 37rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color:rgba(51,51,51,1);
|
color:rgba(51,51,51,1);
|
||||||
}
|
}
|
||||||
@@ -363,12 +549,10 @@ export default {
|
|||||||
>image{
|
>image{
|
||||||
width: 27rpx;
|
width: 27rpx;
|
||||||
height: 12rpx;
|
height: 12rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
> input {
|
> input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: right;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -385,6 +569,17 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.order-view {
|
||||||
|
.title {
|
||||||
|
width: 140rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
> input {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.upload-image {
|
.upload-image {
|
||||||
padding: 35rpx 30rpx;
|
padding: 35rpx 30rpx;
|
||||||
@@ -399,7 +594,7 @@ export default {
|
|||||||
background: rgba(236,236,236,1);
|
background: rgba(236,236,236,1);
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
> img {
|
> image {
|
||||||
width: 54rpx;
|
width: 54rpx;
|
||||||
height: 49rpx;
|
height: 49rpx;
|
||||||
margin-top: 48rpx;
|
margin-top: 48rpx;
|
||||||
@@ -417,119 +612,68 @@ export default {
|
|||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
background: rgba(255,120,15,1);
|
background: rgba(255,120,15,1);
|
||||||
border-radius: 49rpx;
|
border-radius: 49rpx;
|
||||||
position: absolute;
|
margin: 30rpx auto 30rpx;
|
||||||
bottom: 40rpx;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, 0);
|
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
color:rgba(255,255,255,1);
|
color:rgba(255,255,255,1);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 98rpx;
|
line-height: 98rpx;
|
||||||
}
|
}
|
||||||
.popup{
|
.order-popup {
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
z-index: 2;
|
|
||||||
background-color: rgba(0, 0, 0, 0.4);
|
|
||||||
transform: scale(1);
|
|
||||||
align-items: center;
|
|
||||||
transition-duration: 0.3s;
|
|
||||||
|
|
||||||
.popup_cont{
|
|
||||||
border-top: 1px solid RGBA(239, 236, 240, 1);
|
|
||||||
background-color: #fff;
|
|
||||||
width: 100%;
|
|
||||||
height: 1072rpx;
|
|
||||||
line-height: 80rpx;
|
|
||||||
font-size:28rpx;
|
|
||||||
font-family:PingFang SC;
|
|
||||||
font-weight:400;
|
|
||||||
color:rgba(102,102,102,1);
|
|
||||||
transform: scale(1);
|
|
||||||
position: fixed;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
bottom: 0px;
|
|
||||||
left: 0px;
|
|
||||||
right: 0px;
|
|
||||||
/* top: 0px; */
|
|
||||||
transition-duration: 0.3s;
|
|
||||||
border-radius:20px 20px 0px 0px;
|
|
||||||
> uni-swiper {
|
|
||||||
flex: 1;
|
|
||||||
height: 100vh;
|
|
||||||
|
|
||||||
.order-list{
|
|
||||||
height: 60vh;
|
|
||||||
padding-bottom: 140rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.check{
|
.check{
|
||||||
|
padding: 30rpx;
|
||||||
|
border-bottom: 1rpx solid rgba(236, 236, 236, 1);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
> text {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
font-family:PingFang SC;
|
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: rgba(51,51,51,1);
|
color: rgba(51,51,51,1);
|
||||||
height:88rpx;
|
|
||||||
width: 100%;
|
|
||||||
padding-left: 30rpx;
|
|
||||||
border-bottom: 1px solid rgba(236, 236, 236, 1);
|
|
||||||
|
|
||||||
>image{
|
|
||||||
width: 32rpx;
|
|
||||||
height: 32rpx;
|
|
||||||
vertical-align: middle;
|
|
||||||
float: right;
|
|
||||||
padding-top: 30rpx;
|
|
||||||
padding-right:30rpx
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.order-list {
|
||||||
|
height: 60vh;
|
||||||
|
padding: 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.order-item {
|
||||||
|
margin-bottom: 30rpx;
|
||||||
.store {
|
.store {
|
||||||
>view{
|
.name {
|
||||||
padding-left: 30rpx;
|
margin-bottom: 20rpx;
|
||||||
padding-top: 30rpx;
|
font-size: 28rpx;
|
||||||
|
color:rgba(51,51,51,1);
|
||||||
> image {
|
> image {
|
||||||
width: 60rpx;
|
width: 60rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
padding-right:13rpx
|
margin-right: 13rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.order-sn {
|
||||||
font-size:28rpx;
|
margin-bottom: 20rpx;
|
||||||
font-family:PingFang SC;
|
font-size: 24rpx;
|
||||||
font-weight:400;
|
color: rgba(153,153,153,1);
|
||||||
color:rgba(51,51,51,1);
|
}
|
||||||
line-height: 60rpx;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.checkd {
|
.checkd {
|
||||||
>radio-group .uni-list-cell{
|
.radio-view {
|
||||||
display: flex;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.radio{
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-left: 30rpx;
|
margin-bottom: 20rpx;
|
||||||
|
.radio {
|
||||||
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
.store_info {
|
.store_info {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.info_img{
|
.info_img{
|
||||||
>image{
|
>image{
|
||||||
width: 180rpx;
|
width: 180rpx;
|
||||||
height: 160rpx;
|
height: 160rpx;
|
||||||
|
background-color: aqua;
|
||||||
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.info_txt{
|
.info_txt{
|
||||||
@@ -539,7 +683,8 @@ export default {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.content{
|
.content{
|
||||||
line-height: 44rpx;
|
height: 74rpx;
|
||||||
|
line-height: 37rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color:rgba(51,51,51,1);
|
color:rgba(51,51,51,1);
|
||||||
}
|
}
|
||||||
@@ -554,4 +699,17 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.order-btn {
|
||||||
|
width: 690rpx;
|
||||||
|
height: 98rpx;
|
||||||
|
background: rgba(255,120,15,1);
|
||||||
|
border-radius: 49rpx;
|
||||||
|
line-height: 98rpx;
|
||||||
|
text-align: center;
|
||||||
|
margin: 0 auto 40rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: rgba(255,255,255,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
98
pageE/tool/washComment.vue
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
<template>
|
||||||
|
<view class="comment">
|
||||||
|
<view class="main-container">
|
||||||
|
<u-input v-model="content" type="textarea" height="300" maxlength="200" />
|
||||||
|
<!-- <u-upload
|
||||||
|
ref="uUpload"
|
||||||
|
@on-uploaded="onUploaded"
|
||||||
|
:custom-btn="true"
|
||||||
|
:max-count="count"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
|
||||||
|
<image src="../static/mine/27.png"></image>
|
||||||
|
</view>
|
||||||
|
</u-upload> -->
|
||||||
|
</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
<view class="write-btn" @click="addWashEvaluate">发表评价</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
washId: '',
|
||||||
|
// count: 4, // 最大图片数量
|
||||||
|
content: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.washId = option.id;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
verifyParams() {
|
||||||
|
if(this.$u.test.isEmpty(this.content)) {
|
||||||
|
this.$u.toast('内容不可为空');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
addWashEvaluate() {
|
||||||
|
if(!this.verifyParams()) return false;
|
||||||
|
this.$u.api.sendOrderComment({
|
||||||
|
id: this.washId,
|
||||||
|
comment: this.content,
|
||||||
|
}).then(res => {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
back: true,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
bindTextAreaBlur(event) {
|
||||||
|
this.content = event.detail.value;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.comment {
|
||||||
|
min-height: calc(100vh - var(--window-top));
|
||||||
|
background-color: #ECECEC;
|
||||||
|
border-top: 1rpx solid #ffffff;
|
||||||
|
.main-container {
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 30rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
// textarea {
|
||||||
|
// width: 100% !important;
|
||||||
|
// height: 500rpx;
|
||||||
|
// margin-bottom: 60rpx;
|
||||||
|
// }
|
||||||
|
// .slot-btn {
|
||||||
|
// width: 140rpx;
|
||||||
|
// height: 140rpx;
|
||||||
|
// background: rgba(236,236,236,1);
|
||||||
|
// border-radius: 10rpx;
|
||||||
|
// text-align: center;
|
||||||
|
// > img {
|
||||||
|
// margin-top: 48rpx;
|
||||||
|
// width: 54rpx;
|
||||||
|
// height: 49rpx;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
.write-btn {
|
||||||
|
margin: 120rpx auto 0;
|
||||||
|
width: 690rpx;
|
||||||
|
height: 98rpx;
|
||||||
|
background: rgba(255,120,15,1);
|
||||||
|
border-radius: 46rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: rgba(255,255,255,1);
|
||||||
|
text-align: center;
|
||||||
|
line-height: 98rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
207
pages.json
@@ -80,10 +80,11 @@
|
|||||||
{
|
{
|
||||||
"root": "pageB",
|
"root": "pageB",
|
||||||
"pages": [
|
"pages": [
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "follow/index",
|
"path": "follow/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "推荐达人列表",
|
"navigationBarTitleText": "推荐达人",
|
||||||
"app-plus":{
|
"app-plus":{
|
||||||
"titleNView":{
|
"titleNView":{
|
||||||
"backgroundColor":"#ffffff"
|
"backgroundColor":"#ffffff"
|
||||||
@@ -94,7 +95,7 @@
|
|||||||
{
|
{
|
||||||
"path": "details/index",
|
"path": "details/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "达人详情",
|
||||||
"app-plus":{
|
"app-plus":{
|
||||||
"titleNView":{
|
"titleNView":{
|
||||||
"backgroundColor":"#ffffff"
|
"backgroundColor":"#ffffff"
|
||||||
@@ -106,6 +107,26 @@
|
|||||||
"path": "sdetails/index",
|
"path": "sdetails/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "商品详情",
|
"navigationBarTitleText": "商品详情",
|
||||||
|
"app-plus":{
|
||||||
|
"titleNView":{
|
||||||
|
"backgroundColor":"#ffffff",
|
||||||
|
"buttons": [
|
||||||
|
{
|
||||||
|
"type":"none",
|
||||||
|
"text":"\ue636",
|
||||||
|
"float":"right",
|
||||||
|
"fontSize":"18",
|
||||||
|
"fontSrc": "/static/fonts/cart.ttf"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "triedDress/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "试穿订单",
|
||||||
"app-plus":{
|
"app-plus":{
|
||||||
"titleNView":{
|
"titleNView":{
|
||||||
"backgroundColor":"#ffffff"
|
"backgroundColor":"#ffffff"
|
||||||
@@ -113,28 +134,90 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "comment/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "商品评价",
|
||||||
|
"app-plus":{
|
||||||
|
"titleNView":{
|
||||||
|
"backgroundColor":"#ffffff",
|
||||||
|
"buttons": [
|
||||||
|
{
|
||||||
|
"type":"none",
|
||||||
|
"text":"\ue636",
|
||||||
|
"float":"right",
|
||||||
|
"fontSize":"18",
|
||||||
|
"fontSrc": "/static/fonts/cart.ttf"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "search/index",
|
"path": "search/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"app-plus": {
|
||||||
"navigationStyle": "custom"
|
"titleNView": {
|
||||||
|
"titleColor": "#333333",
|
||||||
|
"backgroundColor": "#FFFFFF",
|
||||||
|
"buttons": [
|
||||||
|
{
|
||||||
|
"type":"none",
|
||||||
|
"text":"搜索",
|
||||||
|
"float":"right",
|
||||||
|
"fontSize":"16",
|
||||||
|
"color": "#FF780F"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"searchInput": {
|
||||||
|
"align": "left",
|
||||||
|
"borderRadius": "15px",
|
||||||
|
"placeholder": "搜索您需要的商品",
|
||||||
|
"backgroundColor": "rgb(236,236,236)",
|
||||||
|
"placeholderColor": "#999999",
|
||||||
|
"disabled": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "search/out",
|
"path": "search/out",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"app-plus": {
|
||||||
"navigationStyle": "custom"
|
"titleNView": {
|
||||||
|
"titleColor": "#333333",
|
||||||
|
"backgroundColor": "#FFFFFF",
|
||||||
|
"buttons": [
|
||||||
|
{
|
||||||
|
"type":"none",
|
||||||
|
"text":"搜索",
|
||||||
|
"float":"right",
|
||||||
|
"fontSize":"16",
|
||||||
|
"color": "#FF780F"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"searchInput": {
|
||||||
|
"align": "left",
|
||||||
|
"borderRadius": "15px",
|
||||||
|
"placeholder": "搜索您需要的商品",
|
||||||
|
"backgroundColor": "rgb(236,236,236)",
|
||||||
|
"placeholderColor": "#999999",
|
||||||
|
"disabled": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "photo/index",
|
"path": "photo/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"app-plus": {
|
||||||
|
"softinputMode": "adjustResize"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -167,11 +250,23 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "classify/goods",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "分类商品列表",
|
||||||
|
"app-plus": {
|
||||||
|
"titleNView": {
|
||||||
|
"titleColor": "#333333",
|
||||||
|
"backgroundColor": "#FFFFFF"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "cart/index",
|
"path": "cart/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
"navigationBarTitleText": "购物车",
|
"navigationBarTitleText": "购物车",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleSize": "36px",
|
"titleSize": "36px",
|
||||||
@@ -206,23 +301,28 @@
|
|||||||
{
|
{
|
||||||
"path": "merchant/index",
|
"path": "merchant/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleSize": "36px",
|
"titleSize": "36px",
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"titleColor": "#333333",
|
"titleColor": "#333333",
|
||||||
"backgroundColor": "rgba(255,255,255,0)",
|
"backgroundColor": "rgba(255,255,255,0)",
|
||||||
"buttons": [
|
"buttons": [
|
||||||
|
// {
|
||||||
|
// "type":"none",
|
||||||
|
// "text":"\ue62b",
|
||||||
|
// "float":"right",
|
||||||
|
// "fontSize":"20",
|
||||||
|
// "fontSrc": "/static/fonts/more.ttf",
|
||||||
|
// "color": "#FFFFFF"
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
"type":"none",
|
"type":"none",
|
||||||
"text":"...",
|
"text":"\ue636",
|
||||||
"float":"right",
|
"float":"right",
|
||||||
"fontSize":"16"
|
"fontSize":"22",
|
||||||
},
|
"fontSrc": "/static/fonts/cart.ttf",
|
||||||
{
|
"color": "#FFFFFF"
|
||||||
"type":"none",
|
|
||||||
"text":"\ue582",
|
|
||||||
"float":"right",
|
|
||||||
"fontSize":"16"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"searchInput": {
|
"searchInput": {
|
||||||
@@ -250,6 +350,32 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "merchant/storeClassify",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "商品分类",
|
||||||
|
"app-plus": {
|
||||||
|
"titleSize": "36px",
|
||||||
|
"titleNView": {
|
||||||
|
"titleColor": "#333333",
|
||||||
|
"backgroundColor": "#FFFFFF"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "merchant/classifyGoods",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"app-plus": {
|
||||||
|
"titleSize": "36px",
|
||||||
|
"titleNView": {
|
||||||
|
"titleColor": "#333333",
|
||||||
|
"backgroundColor": "#FFFFFF"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "cart/ConfirmOrder",
|
"path": "cart/ConfirmOrder",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -475,7 +601,7 @@
|
|||||||
"buttons": [
|
"buttons": [
|
||||||
{
|
{
|
||||||
"type":"none",
|
"type":"none",
|
||||||
"text":"写意见",
|
"text":"投诉",
|
||||||
"float":"right",
|
"float":"right",
|
||||||
"fontSize":"14"
|
"fontSize":"14"
|
||||||
}
|
}
|
||||||
@@ -539,6 +665,7 @@
|
|||||||
{
|
{
|
||||||
"path": "tool/Manicure",
|
"path": "tool/Manicure",
|
||||||
"style": {
|
"style": {
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
"navigationBarTitleText": "美甲",
|
"navigationBarTitleText": "美甲",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleSize": "36px",
|
"titleSize": "36px",
|
||||||
@@ -565,6 +692,7 @@
|
|||||||
{
|
{
|
||||||
"path": "tool/SendWash",
|
"path": "tool/SendWash",
|
||||||
"style": {
|
"style": {
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
"navigationBarTitleText": "送洗",
|
"navigationBarTitleText": "送洗",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleSize": "36px",
|
"titleSize": "36px",
|
||||||
@@ -575,6 +703,19 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "tool/washComment",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "送洗评价",
|
||||||
|
"app-plus": {
|
||||||
|
"titleSize": "36px",
|
||||||
|
"titleNView": {
|
||||||
|
"titleColor": "#333333",
|
||||||
|
"backgroundColor": "#FFFFFF"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "tool/WashOrder",
|
"path": "tool/WashOrder",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -604,6 +745,7 @@
|
|||||||
{
|
{
|
||||||
"path": "mine/ImageTextCollection",
|
"path": "mine/ImageTextCollection",
|
||||||
"style": {
|
"style": {
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
"navigationBarTitleText": "图文收藏",
|
"navigationBarTitleText": "图文收藏",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleSize": "36px",
|
"titleSize": "36px",
|
||||||
@@ -630,6 +772,7 @@
|
|||||||
{
|
{
|
||||||
"path": "mine/MineConcerns",
|
"path": "mine/MineConcerns",
|
||||||
"style": {
|
"style": {
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
"navigationBarTitleText": "我的关注",
|
"navigationBarTitleText": "我的关注",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleSize": "36px",
|
"titleSize": "36px",
|
||||||
@@ -767,6 +910,7 @@
|
|||||||
{
|
{
|
||||||
"path": "order/Index",
|
"path": "order/Index",
|
||||||
"style": {
|
"style": {
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
"navigationBarTitleText": "我的订单",
|
"navigationBarTitleText": "我的订单",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleSize": "36px",
|
"titleSize": "36px",
|
||||||
@@ -780,6 +924,7 @@
|
|||||||
{
|
{
|
||||||
"path": "order/Details",
|
"path": "order/Details",
|
||||||
"style": {
|
"style": {
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
"navigationBarTitleText": "订单详情",
|
"navigationBarTitleText": "订单详情",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleSize": "36px",
|
"titleSize": "36px",
|
||||||
@@ -818,6 +963,19 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "order/RefundOrder",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "申请退款",
|
||||||
|
"app-plus": {
|
||||||
|
"titleSize": "36px",
|
||||||
|
"titleNView": {
|
||||||
|
"titleColor": "#333333",
|
||||||
|
"backgroundColor": "#FFFFFF"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -829,9 +987,17 @@
|
|||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/zhibo/index",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -855,6 +1021,7 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/mine/index",
|
"path": "pages/mine/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
"navigationBarTitleText": "我的",
|
"navigationBarTitleText": "我的",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleSize": "36px",
|
"titleSize": "36px",
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="status_bar"></view>
|
||||||
<view class="index">
|
<view class="index">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="sosuo"></view>
|
<view class="sosuo"></view>
|
||||||
@@ -19,7 +21,7 @@
|
|||||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<!-- <indexad style="width:690rpx"></indexad> -->
|
<!-- <indexad style="width:690rpx"></indexad> -->
|
||||||
<u-swiper mode="dot" :list="indexImageSwiper" name="adv_code"></u-swiper>
|
<u-swiper mode="dot" :list="indexImageSwiper" name="adv_code" @click="clickFImage"></u-swiper>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view>
|
<view>
|
||||||
<videoItem v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id" :item="item"
|
<videoItem v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id" :item="item"
|
||||||
@@ -36,17 +38,18 @@
|
|||||||
<swiper-item>
|
<swiper-item>
|
||||||
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
<scroll-view style="width:100%;height:100%" scroll-y="true">
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code"></u-swiper>
|
<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code" @click="clickSImage($event, 2)"></u-swiper>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view>
|
<view>
|
||||||
<zhiboItem v-for="item in 10"></zhiboItem>
|
<zhiboItem v-for="item in tabLiveLists.filter((_, index) => !(index&1))" :zid="item.live_id" :rid="item.chatroom_id"
|
||||||
|
:key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url"></zhiboItem>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-left:20rpx">
|
<view style="margin-left:20rpx">
|
||||||
<zhiboItem v-for="item in 10"></zhiboItem>
|
<zhiboItem v-for="item in tabLiveLists.filter((_, index) => index&1)" :zid="item.live_id" :rid="item.chatroom_id"
|
||||||
|
:key="item.live_id" :name="item.store_name" :image="item.cover_img" :url="item.url"></zhiboItem>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
@@ -58,7 +61,7 @@
|
|||||||
<view></view>
|
<view></view>
|
||||||
<text>推荐达人</text>
|
<text>推荐达人</text>
|
||||||
</view>
|
</view>
|
||||||
<image class="right" src="/static/image/common/1.png"></image>
|
<u-icon name="arrow-right" color="#666" size="28"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="tuijianlist">
|
<view class="tuijianlist">
|
||||||
<!-- <darenItem style="margin-right:23rpx"></darenItem>
|
<!-- <darenItem style="margin-right:23rpx"></darenItem>
|
||||||
@@ -66,24 +69,20 @@
|
|||||||
<darenItem v-for="item in recommendList.slice(0,3)" :key="item.id" :info="item" v-on:pChangeType="changeType"></darenItem>
|
<darenItem v-for="item in recommendList.slice(0,3)" :key="item.id" :info="item" v-on:pChangeType="changeType"></darenItem>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list">
|
<view class="rec-list">
|
||||||
<view>
|
<view class="rec-box">
|
||||||
<!-- <videoItem isguanzhu="true" v-for="item in 10"></videoItem> -->
|
<!-- {{ fansList }} -->
|
||||||
<videoItem isguanzhu="true" v-for="item in articleList.filter((_, index) => !(index&1))" :key="item.article_id"
|
<videoItem isguanzhu="true" v-for="item in fansList" :key="item.article_id"
|
||||||
:item="item" @getArticlelist="getArticlelist"></videoItem>
|
:item="item"></videoItem>
|
||||||
</view>
|
<view class="no-data" v-show="!fansList.length">您还没有关注哦,赶紧去点点关注!</view>
|
||||||
<view style="margin-left:20rpx">
|
|
||||||
<!-- <videoItem isguanzhu="true" v-for="item in 10"></videoItem> -->
|
|
||||||
<videoItem isguanzhu="true" v-for="item in articleList.filter((_, index) => index&1)" :key="item.article_id"
|
|
||||||
:item="item" @getArticlelist="getArticlelist"></videoItem>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -178,6 +177,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.rec-list {
|
||||||
|
width: 100%;
|
||||||
|
.rec-box {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
.no-data {
|
||||||
|
margin: 200rpx auto 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
@@ -203,6 +213,8 @@
|
|||||||
recommendList: [], // 推荐达人
|
recommendList: [], // 推荐达人
|
||||||
indexImageSwiper: [],
|
indexImageSwiper: [],
|
||||||
zhiboImageSwiper: [],
|
zhiboImageSwiper: [],
|
||||||
|
tabLiveLists: [],
|
||||||
|
fansList: [], // 关注的发现列表
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -217,13 +229,21 @@
|
|||||||
this.getSwiper();
|
this.getSwiper();
|
||||||
this.getZhiBoSwiper();
|
this.getZhiBoSwiper();
|
||||||
this.tabLiveList();
|
this.tabLiveList();
|
||||||
|
this.getFollowList();
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.getArticlelist();
|
||||||
|
// this.getManicureList({ load: 'reload' });
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 列表
|
||||||
tabLiveList() {
|
tabLiveList() {
|
||||||
this.$u.api.tabLiveList().then((res) => {
|
this.$u.api.tabLiveList().then((res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
|
this.tabLiveLists = res.data;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 轮播图
|
||||||
getSwiper() {
|
getSwiper() {
|
||||||
this.$u.api.getIndexSwiper().then(res => {
|
this.$u.api.getIndexSwiper().then(res => {
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
@@ -231,14 +251,16 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 关注
|
||||||
changeType(member_id) {
|
changeType(member_id) {
|
||||||
console.log(member_id);
|
console.log(member_id);
|
||||||
this.$emit("pChangeType")
|
// this.$emit("pChangeType");
|
||||||
this.$u.api.attentionMember({
|
this.$u.api.attentionMember({
|
||||||
member_id: member_id
|
member_id: member_id
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.getRecommendList();
|
this.getRecommendList();
|
||||||
|
this.getFollowList(); // 刷新发现的列表
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getZhiBoSwiper() {
|
getZhiBoSwiper() {
|
||||||
@@ -248,25 +270,29 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 切换导航
|
||||||
dianji(a) {
|
dianji(a) {
|
||||||
// console.log(a)
|
console.log(a);
|
||||||
if (typeof a == "object") {
|
if (typeof a == "object") {
|
||||||
this.num = a.detail.current
|
this.num = a.detail.current
|
||||||
} else {
|
} else {
|
||||||
this.num = a
|
this.num = a
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 发现别表
|
||||||
getArticlelist() {
|
getArticlelist() {
|
||||||
this.$u.api.getArticlelist({
|
this.$u.api.getArticlelist({
|
||||||
page: this.page,
|
page: this.page,
|
||||||
is_video_img: 0, // 查询视频1 图文2 都查0
|
is_video_img: 0, // 查询视频1 图文2 都查0
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log('37647744ghj',res)
|
// uni.stopPullDownRefresh();
|
||||||
|
// console.log('37647744ghj', res)
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
this.articleList = res.data.list;
|
this.articleList = res.data.list;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 达人列表
|
||||||
getRecommendList() {
|
getRecommendList() {
|
||||||
this.$u.api.getRecommendList().then(res => {
|
this.$u.api.getRecommendList().then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
@@ -275,12 +301,59 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 关注发现列表
|
||||||
|
getFollowList() {
|
||||||
|
this.$u.post("article/attentionArticleList",{
|
||||||
|
page: 0,
|
||||||
|
}).then(res => {
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
this.fansList = res.data.list;
|
||||||
|
}
|
||||||
|
// console.log(res);
|
||||||
|
})
|
||||||
|
},
|
||||||
toSearchPage() {
|
toSearchPage() {
|
||||||
console.log("22");
|
console.log("22");
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pageB/follow/index'
|
url: '/pageB/follow/index'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
clickFImage(index) {
|
||||||
|
const item = this.indexImageSwiper[index];
|
||||||
|
console.log(item);
|
||||||
|
this.activityLink({
|
||||||
|
type: item.url_type,
|
||||||
|
id: item.info_id
|
||||||
|
});
|
||||||
|
},
|
||||||
|
clickSImage(index) {
|
||||||
|
const item = this.zhiboImageSwiper[index];
|
||||||
|
console.log(item);
|
||||||
|
this.activityLink({
|
||||||
|
type: item.url_type,
|
||||||
|
id: item.info_id
|
||||||
|
});
|
||||||
|
},
|
||||||
|
activityLink({
|
||||||
|
type,
|
||||||
|
id
|
||||||
|
}) {
|
||||||
|
console.log(type,id);
|
||||||
|
if (type == 0) return false;
|
||||||
|
// type 1 商品详情页, 2 店铺详情页
|
||||||
|
const url = type == 1 ? 'pageB/sdetails/index' : 'pageC/merchant/index';
|
||||||
|
let params = {
|
||||||
|
id: id
|
||||||
|
};
|
||||||
|
// type: 1 // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||||
|
if (type == 1) Object.assign(params, {
|
||||||
|
type: 1
|
||||||
|
});
|
||||||
|
this.$u.route({
|
||||||
|
url: url,
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<!-- 正文内容 -->
|
<!-- 正文内容 -->
|
||||||
</view>
|
</view>
|
||||||
<view class="sousuo"></view>
|
<!-- <view class="sousuo"></view> -->
|
||||||
<view class="backes">
|
<view class="backes">
|
||||||
<titles :information="information_dles"></titles>
|
<titles :information="information_dles"></titles>
|
||||||
</view>
|
</view>
|
||||||
@@ -18,11 +18,11 @@
|
|||||||
<view id="information">
|
<view id="information">
|
||||||
<view class="information_dl" v-for="(item,index) in information_dl" :key="index" >
|
<view class="information_dl" v-for="(item,index) in information_dl" :key="index" >
|
||||||
<view>
|
<view>
|
||||||
<image :src="item.url"></image>
|
<image :src="item.avatar"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="title">{{item.title}}</view>
|
<view class="title">{{item.name}}</view>
|
||||||
<view class="contentes">{{item.contentes}}</view>
|
<view class="contentes">{{item.text}}</view>
|
||||||
<view class="times">{{item.title}}</view>
|
<view class="times">{{item.time}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -31,8 +31,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapState } from 'vuex';
|
||||||
import titles from "@/components/informations/titles/titles"
|
import titles from "@/components/informations/titles/titles"
|
||||||
export default {
|
export default {
|
||||||
|
computed: {
|
||||||
|
...mapState(["hasLogin,token"])
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
information_dles : [{
|
information_dles : [{
|
||||||
@@ -42,14 +46,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
url: '../../static/pageD/info(6).png',
|
url: '../../static/pageD/info(13).png',
|
||||||
text: '活动消息'
|
text: '活动消息'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
url: '../../static/pageD/info(14).png',
|
url: '../../static/pageD/info(14).png',
|
||||||
text: '交易物流'
|
text: '交易物流'
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
@@ -59,7 +62,8 @@
|
|||||||
|
|
||||||
],
|
],
|
||||||
// 通知消息
|
// 通知消息
|
||||||
information_dl: [{
|
information_dl: [
|
||||||
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
url: '../../static/pageD/info(11).png',
|
url: '../../static/pageD/info(11).png',
|
||||||
text: '通知消息',
|
text: '通知消息',
|
||||||
@@ -87,11 +91,39 @@
|
|||||||
show: false
|
show: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onShow(){
|
||||||
|
this.information_dl = this.imService.friends;
|
||||||
|
this.imService.onFriendListChange=this.onFriendListChange;
|
||||||
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
// /消息模块的请求
|
// /消息模块的请求
|
||||||
this.messageIndex()
|
if (this.hasLogin) {
|
||||||
|
this.messageIndex();
|
||||||
|
}
|
||||||
|
if(this.$store.state.hasLogin){
|
||||||
|
const user = uni.getStorageSync('user_info');
|
||||||
|
console.log(user)
|
||||||
|
this.imService.login(user.member.member_id,user.member.member_nickname,user.member.member_avatar)
|
||||||
|
this.imService.connectIM()
|
||||||
|
let that = this
|
||||||
|
setTimeout(function(){
|
||||||
|
that.imService.disconnect()
|
||||||
|
console.log("guanbi")
|
||||||
|
},1000)
|
||||||
|
setTimeout(function(){
|
||||||
|
console.log("lianjie")
|
||||||
|
that.imService.connectIM()
|
||||||
|
},2000)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onFriendListChange(onlineFriends) {
|
||||||
|
//todo:比较垃圾的处理方式,因为Uniapp的基于MAP的双向绑定在H5端不稳定,H5端偶尔会抽风
|
||||||
|
// 下边这一行删掉,有时候页面可以更新,有时候不行,大家有优雅的方式,也欢迎跟我们沟通
|
||||||
|
this.information_dl = this.imService.friends;
|
||||||
|
|
||||||
|
this.$forceUpdate();
|
||||||
|
},
|
||||||
// 选中某个复选框时,由checkbox时触发
|
// 选中某个复选框时,由checkbox时触发
|
||||||
checkboxChange(e) {
|
checkboxChange(e) {
|
||||||
//console.log(e);
|
//console.log(e);
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
<view class="mine">
|
<view class="mine">
|
||||||
<view class="mine-top">
|
<view class="mine-top">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar" :size="110"></u-avatar>
|
<u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar + '?' + new Date().getTime()" :size="110"></u-avatar>
|
||||||
<view class="user-info">
|
<view class="user-info">
|
||||||
<view class="info-left">
|
<view class="info-left">
|
||||||
<view class="user-nickname">{{ userInfo.member_nickname }}</view>
|
<view class="user-nickname">{{ userInfo.member_nickname }}</view>
|
||||||
<view class="user-medal" @click="toOtherPage('/mine/MedalIntroduction')">
|
<view class="user-medal" @click="toOtherPage('/mine/MedalIntroduction')">
|
||||||
<img src="/static/image/mine/13.png" />
|
<image src="/static/image/mine/13.png"></image>
|
||||||
<view class="rank-title">勋章</view>
|
<view class="rank-title">{{ userInfo.member_grade_name }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-right">
|
<view class="info-right">
|
||||||
@@ -19,24 +19,24 @@
|
|||||||
<view class="member-service" @click="toOtherPage('/mine/MemberServe')">会员服务</view>
|
<view class="member-service" @click="toOtherPage('/mine/MemberServe')">会员服务</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<view @click="toOtherPage('/mine/GoodsCollection')">
|
<!-- <view @click="toOtherPage('/mine/GoodsCollection')">
|
||||||
<view>{{ userInfo.member_fav_goods_num || 0 }}</view>
|
<view>{{ userInfo.member_fav_goods_num || 0 }}</view>
|
||||||
<view>商品收藏</view>
|
<view>商品收藏</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view @click="toOtherPage('/mine/StoreCollection')">
|
<!-- <view @click="toOtherPage('/mine/StoreCollection')">
|
||||||
<view>{{ userInfo.member_fav_store_num }}</view>
|
<view>{{ userInfo.member_fav_store_num || 0 }}</view>
|
||||||
<view>店铺收藏</view>
|
<view>店铺收藏</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view @click="toOtherPage('/mine/ImageTextCollection')">
|
<view @click="toOtherPage('/mine/ImageTextCollection')">
|
||||||
<view>9</view>
|
<view>{{ userInfo.member_fav_article_num || 0 }}</view>
|
||||||
<view>图文收藏</view>
|
<view>图文收藏</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toOtherPage('/mine/Integral')">
|
<view @click="toOtherPage('/mine/Integral')">
|
||||||
<view>{{ userInfo ? userInfo.member_points : 0 }}</view>
|
<view>{{ userInfo.member_points || 0 }}</view>
|
||||||
<view>积分数</view>
|
<view>积分数</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toOtherPage('/mine/MineConcerns')">
|
<view @click="toOtherPage('/mine/MineConcerns')">
|
||||||
<view>{{ userInfo.member_snsfrend_num }}</view>
|
<view>{{ userInfo.member_snsfrend_num || 0 }}</view>
|
||||||
<view>关注</view>
|
<view>关注</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -47,53 +47,57 @@
|
|||||||
<view class="title-text">我的订单</view>
|
<view class="title-text">我的订单</view>
|
||||||
<view class="more" @click="toOtherPage('/order/Index')">
|
<view class="more" @click="toOtherPage('/order/Index')">
|
||||||
<view>查看全部订单</view>
|
<view>查看全部订单</view>
|
||||||
<img src="/static/image/mine/21.png" />
|
<image src="/static/image/mine/21.png"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view @click="toOtherPage('/order/Index?current=1')">
|
<view @click="toOtherPage('/order/Index?current=1')">
|
||||||
<img src="/static/image/mine/6.png" />
|
<image src="/static/image/mine/6.png"></image>
|
||||||
<view>待支付</view>
|
<view>待支付</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toOtherPage('/order/Index?current=2')">
|
<view @click="toOtherPage('/order/Index?current=2')">
|
||||||
<img src="/static/image/mine/14.png" />
|
<image src="/static/image/mine/35.png"></image>
|
||||||
<view>已取消</view>
|
<view>待发货</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toOtherPage('/order/Index?current=3')">
|
<view @click="toOtherPage('/order/Index?current=3')">
|
||||||
<img src="/static/image/mine/2.png" />
|
<image src="/static/image/mine/2.png"></image>
|
||||||
<view>待收货</view>
|
<view>待收货</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toOtherPage('/order/Index?current=4')">
|
<view @click="toOtherPage('/order/Index?current=4')">
|
||||||
<img src="/static/image/mine/1.png" />
|
<image src="/static/image/mine/1.png"></image>
|
||||||
<view>试穿试送</view>
|
<view>试穿试送</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toOtherPage('/order/Index?current=5')">
|
<view @click="toOtherPage('/order/Index?current=5')">
|
||||||
<img src="/static/image/mine/3.png" />
|
<image src="/static/image/mine/37.png"></image>
|
||||||
<view>待评价</view>
|
<view>拼团中</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toOtherPage('/order/Index?current=6')">
|
<view @click="toOtherPage('/order/Index?current=6')">
|
||||||
<img src="/static/image/mine/9.png" />
|
<image src="/static/image/mine/9.png"></image>
|
||||||
<view>售后</view>
|
<view>售后</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view @click="toOtherPage('/order/Index?current=7')">
|
||||||
|
<image src="/static/image/mine/3.png"></image>
|
||||||
|
<view>待评价</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tool">
|
<view class="tool">
|
||||||
<view class="title">我的工具</view>
|
<view class="title">我的工具</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view @click="toOtherPage('/tool/SendWash')">
|
<view @click="toOtherPage('/tool/SendWash')">
|
||||||
<img src="/static/image/mine/20.png" />
|
<image src="/static/image/mine/20.png"></image>
|
||||||
<view>送洗</view>
|
<view>送洗</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toOtherPage('/tool/Manicure')">
|
<view @click="toOtherPage('/tool/Manicure')">
|
||||||
<img src="/static/image/mine/19.png" />
|
<image src="/static/image/mine/19.png"></image>
|
||||||
<view>美甲</view>
|
<view>美甲</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toOtherPage('/tool/MineHistory')">
|
<view @click="toOtherPage('/tool/MineHistory')">
|
||||||
<img src="/static/image/mine/18.png" />
|
<image src="/static/image/mine/18.png"></image>
|
||||||
<view>足迹</view>
|
<view>足迹</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toOtherPage('/tool/MineCoupon')">
|
<view @click="toOtherPage('/tool/MineCoupon')">
|
||||||
<img src="/static/image/mine/25.png" />
|
<image src="/static/image/mine/25.png"></image>
|
||||||
<view>优惠券</view>
|
<view>优惠券</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -102,19 +106,19 @@
|
|||||||
<view class="title">更多工具</view>
|
<view class="title">更多工具</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view @click="toOtherPage('/more/Address')">
|
<view @click="toOtherPage('/more/Address')">
|
||||||
<img src="/static/image/mine/17.png" />
|
<image src="/static/image/mine/17.png"></image>
|
||||||
<view>收货地址</view>
|
<view>收货地址</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toOtherPage('/more/AfterSalesHelp')">
|
<view @click="toOtherPage('/more/AfterSalesHelp')">
|
||||||
<img src="/static/image/mine/9.png" />
|
<image src="/static/image/mine/9.png"></image>
|
||||||
<view>售后政策</view>
|
<view>售后政策</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toOtherPage('/more/MineHelp')">
|
<view @click="toOtherPage('/more/MineHelp')">
|
||||||
<img src="/static/image/mine/16.png" />
|
<image src="/static/image/mine/16.png"></image>
|
||||||
<view>使用帮助</view>
|
<view>使用帮助</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toOtherPage('/more/Complaints')">
|
<view @click="toOtherPage('/more/Complaints')">
|
||||||
<img src="/static/image/mine/15.png" />
|
<image src="/static/image/mine/15.png"></image>
|
||||||
<view>投诉意见</view>
|
<view>投诉意见</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -124,7 +128,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapState } from 'vuex';
|
||||||
export default {
|
export default {
|
||||||
|
computed: {
|
||||||
|
...mapState(['hasLogin', 'token'])
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
@@ -136,6 +144,16 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
// 尝试登录
|
||||||
|
if (!this.hasLogin) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "../../pageA/login/login"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.getUserInfo();
|
||||||
|
},
|
||||||
|
// 下拉刷新
|
||||||
|
onPullDownRefresh() {
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
},
|
},
|
||||||
onNavigationBarButtonTap() {
|
onNavigationBarButtonTap() {
|
||||||
@@ -144,6 +162,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
this.$u.api.getMemberInfo().then(res => {
|
this.$u.api.getMemberInfo().then(res => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
// this.userInfo = res.data.MemberArray;
|
// this.userInfo = res.data.MemberArray;
|
||||||
this.$set(this, 'userInfo', res.data.MemberArray);
|
this.$set(this, 'userInfo', res.data.MemberArray);
|
||||||
@@ -160,7 +179,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.mine {
|
.mine {
|
||||||
min-height: calc(calc(100vh - var(--window-top)) - 50px);
|
min-height: calc(calc(100vh - var(--window-top)));
|
||||||
background: #ECECEC;
|
background: #ECECEC;
|
||||||
.mine-top {
|
.mine-top {
|
||||||
// width: 100%;
|
// width: 100%;
|
||||||
@@ -189,10 +208,11 @@ export default {
|
|||||||
border-radius: 13rpx;
|
border-radius: 13rpx;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 17rpx 0 10rpx;
|
padding: 0 17rpx 0 10rpx;
|
||||||
> img {
|
> image {
|
||||||
margin-right: 9rpx;
|
margin-right: 9rpx;
|
||||||
width: 20rpx;
|
width: 20rpx;
|
||||||
height: 22rpx;
|
height: 22rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.rank-title {
|
.rank-title {
|
||||||
font-size: 16rpx;
|
font-size: 16rpx;
|
||||||
@@ -228,8 +248,10 @@ export default {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
// justify-content: space-between;
|
||||||
|
justify-content: flex-start;
|
||||||
> view {
|
> view {
|
||||||
|
margin-right: 80rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color:rgba(51,51,51,1);
|
color:rgba(51,51,51,1);
|
||||||
@@ -240,7 +262,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.mine-container {
|
.mine-container {
|
||||||
@mixin common-mine($content-padding-top, $content-padding-bottom, $image-height) {
|
@mixin image-size($image-width, $image-height) {
|
||||||
|
> image {
|
||||||
|
width: $image-width !important;
|
||||||
|
height: $image-height !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@mixin common-mine($content-padding-top, $content-padding-bottom, $image-width, $image-height) {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 690rpx;
|
width: 690rpx;
|
||||||
background: rgba(255,255,255,1);
|
background: rgba(255,255,255,1);
|
||||||
@@ -270,9 +298,11 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
> view {
|
> view {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
> img {
|
> image {
|
||||||
|
width: $image-width;
|
||||||
height: $image-height;
|
height: $image-height;
|
||||||
margin-bottom: 15rpx;
|
margin-bottom: 15rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
> view {
|
> view {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
@@ -285,31 +315,50 @@ export default {
|
|||||||
@include common-mine(
|
@include common-mine(
|
||||||
$content-padding-top: 22rpx,
|
$content-padding-top: 22rpx,
|
||||||
$content-padding-bottom: 30rpx,
|
$content-padding-bottom: 30rpx,
|
||||||
$image-height: 36rpx
|
$image-height: 36rpx,
|
||||||
|
$image-width: 36rpx
|
||||||
);
|
);
|
||||||
.title {
|
.title {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
.more {
|
.more {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
> img {
|
> image {
|
||||||
|
width: 19rpx;
|
||||||
height: 19rpx;
|
height: 19rpx;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.content {
|
.content {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
> view {
|
> view:nth-child(1){
|
||||||
text-align: center;
|
@include image-size($image-width: 33rpx, $image-height: 36rpx);
|
||||||
};
|
}
|
||||||
|
> view:nth-child(2){
|
||||||
|
@include image-size($image-width: 38rpx, $image-height: 32rpx);
|
||||||
|
}
|
||||||
|
> view:nth-child(3){
|
||||||
|
@include image-size($image-width: 41rpx, $image-height: 33rpx);
|
||||||
|
}
|
||||||
|
> view:nth-child(4){
|
||||||
|
@include image-size($image-width: 40rpx, $image-height: 35rpx);
|
||||||
|
}
|
||||||
|
> view:nth-child(5){
|
||||||
|
@include image-size($image-width: 37rpx, $image-height: 37rpx);
|
||||||
|
}
|
||||||
|
> view:nth-child(6){
|
||||||
|
@include image-size($image-width: 33rpx, $image-height: 35rpx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.tool {
|
.tool {
|
||||||
@include common-mine(
|
@include common-mine(
|
||||||
$content-padding-top: 8rpx,
|
$content-padding-top: 8rpx,
|
||||||
$content-padding-bottom: 25rpx,
|
$content-padding-bottom: 25rpx,
|
||||||
$image-height: 71rpx
|
$image-height: 71rpx,
|
||||||
|
$image-width: 71rpx
|
||||||
);
|
);
|
||||||
.content {
|
.content {
|
||||||
> view:not(:last-child) {
|
> view:not(:last-child) {
|
||||||
@@ -321,7 +370,8 @@ export default {
|
|||||||
@include common-mine(
|
@include common-mine(
|
||||||
$content-padding-top: 8rpx,
|
$content-padding-top: 8rpx,
|
||||||
$content-padding-bottom: 48rpx,
|
$content-padding-bottom: 48rpx,
|
||||||
$image-height: 71rpx
|
$image-height: 71rpx,
|
||||||
|
$image-width: 71rpx
|
||||||
);
|
);
|
||||||
.content {
|
.content {
|
||||||
> view:not(:last-child) {
|
> view:not(:last-child) {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<view>
|
||||||
|
<view class="status_bar"></view>
|
||||||
<scroll-view class="shop" scroll-y @scrolltolower="onreachBottom">
|
<scroll-view class="shop" scroll-y @scrolltolower="onreachBottom">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<image src="/static/image/shop/1.png" class="local"></image>
|
<image src="/static/image/shop/1.png" class="local"></image>
|
||||||
@@ -7,11 +9,13 @@
|
|||||||
<image src="/static/image/shop/2.png"></image>
|
<image src="/static/image/shop/2.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view @click="sousuo">
|
<view @click="sousuo">
|
||||||
<u-search placeholder="" v-model="keyword" :show-action="false" bg-color="#fff" border-color="#999999" :disabled="true"></u-search>
|
<u-search placeholder="输入您喜欢的宝贝" v-model="keyword" :show-action="false" bg-color="#fff" border-color="#999999" :disabled="true"></u-search>
|
||||||
</view>
|
</view>
|
||||||
<image src="/static/image/shop/3.png" class="mnue" @click="toClassifyPage"></image>
|
<image src="/static/image/shop/3.png" class="mnue" @click="toClassifyPage"></image>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="swiper-image">
|
||||||
<u-swiper :list="list" mode="dot" @click="clickImage"></u-swiper>
|
<u-swiper :list="list" mode="dot" @click="clickImage"></u-swiper>
|
||||||
|
</view>
|
||||||
<view class="chengnuo">
|
<view class="chengnuo">
|
||||||
<view>
|
<view>
|
||||||
<image src="/static/image/shop/4.png"></image>
|
<image src="/static/image/shop/4.png"></image>
|
||||||
@@ -31,38 +35,36 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fenlei">
|
<view class="fenlei">
|
||||||
<shopitem v-for="item in goodsClassify" :key="item.gc_id" :info="item" class="item"></shopitem>
|
<shopitem v-for="item in goodsClassify" :key="item.gc_id" :info="item"></shopitem>
|
||||||
</view>
|
</view>
|
||||||
<view class="hr" style="margin-top:80rpx"></view>
|
|
||||||
<!-- 秒杀 -->
|
<!-- 秒杀 -->
|
||||||
<recommend v-if="JSON.stringify(recommendedSpike) != '{}'" :recommendData="recommendedSpike" type="spike"></recommend>
|
<recommend v-if="JSON.stringify(recommendedSpike) != '{}'" :recommendData="recommendedSpike" type="spike"></recommend>
|
||||||
<view v-if="JSON.stringify(recommendedSpike) != '{}'" class="hr" style="margin-top:40rpx"></view>
|
|
||||||
<!-- 秒杀列表 -->
|
<!-- 秒杀列表 -->
|
||||||
<seckill v-if="spikeList.length" :list="spikeList" :time="seckillTime"></seckill>
|
<seckill v-if="spikeList.length" :list="spikeList" :time="seckillTime"></seckill>
|
||||||
<view v-if="spikeList.length" class="hr" style="margin-top:40rpx"></view>
|
|
||||||
<!-- 拼团推荐 -->
|
<!-- 拼团推荐 -->
|
||||||
<pintuan v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush"></pintuan>
|
<pintuan v-if="JSON.stringify(pinTuanPush) != '{}'" :recommendData="pinTuanPush"></pintuan>
|
||||||
<view class="hr" style="margin-top:40rpx" v-if="JSON.stringify(pinTuanPush) != '{}'"></view>
|
|
||||||
<!-- 拼团列表 -->
|
<!-- 拼团列表 -->
|
||||||
<group :groupList="pinTuanList" :classifyList="couponGroupList"></group>
|
<group></group>
|
||||||
<image class="lingquan"></image>
|
<view class="activity-view">
|
||||||
|
<image class="lingquan" :src="activityInfo.adv_code" @click="activityLink({ type: activityInfo.url_type, id: activityInfo.info_id })"></image>
|
||||||
|
</view>
|
||||||
<youhq></youhq>
|
<youhq></youhq>
|
||||||
<view class="hr" style="margin-top:40rpx"></view>
|
|
||||||
<list ref="recommendGoods"></list>
|
<list ref="recommendGoods"></list>
|
||||||
<view class="cart" @click="toCartPage">
|
<view class="cart" @click="toCartPage">
|
||||||
<image src="/static/image/common/3.png"></image>
|
<image src="/static/image/common/3.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<u-picker mode="region" :params="areaParams" v-model="chooseArea" @confirm="setArea"></u-picker>
|
<u-picker mode="selector" :range="areaList" v-model="chooseArea" range-key="area_name" @confirm="setArea"></u-picker>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import shopitem from "@/components/shop/shop-item/index"
|
import shopitem from "@/components/shop/shop-item/index";
|
||||||
import recommend from "@/components/shop/recommend/index"
|
import recommend from "@/components/shop/recommend/index";
|
||||||
import pintuan from "@/components/shop/recommend/pintuan"
|
import pintuan from "@/components/shop/recommend/pintuan";
|
||||||
import seckill from "@/components/shop/seckill/index"
|
import seckill from "@/components/shop/seckill/index";
|
||||||
import group from "@/components/shop/group/index"
|
import group from "@/components/shop/group/index";
|
||||||
import youhq from "@/components/shop/youhq/index"
|
import youhq from "@/components/shop/youhq/index";
|
||||||
import list from "../../components/shop/list/index"
|
import list from "@/components/shop/list/index";
|
||||||
export default {
|
export default {
|
||||||
name: "shop",
|
name: "shop",
|
||||||
components: {
|
components: {
|
||||||
@@ -78,31 +80,30 @@ export default {
|
|||||||
return {
|
return {
|
||||||
area: "请选择",
|
area: "请选择",
|
||||||
chooseArea: false,
|
chooseArea: false,
|
||||||
areaParams: {
|
|
||||||
province: true,
|
|
||||||
city: true,
|
|
||||||
area: false
|
|
||||||
},
|
|
||||||
keyword: "",
|
keyword: "",
|
||||||
list: [],
|
list: [],
|
||||||
goodsClassify: [], // 商品分类
|
goodsClassify: [], // 商品分类
|
||||||
classifyList: [],
|
// classifyList: [],
|
||||||
recommendedSpike: {}, // 秒杀推荐
|
recommendedSpike: {}, // 秒杀推荐
|
||||||
spikeList: [], // 全部秒杀列表
|
spikeList: [], // 全部秒杀列表
|
||||||
seckillTime: {}, // 秒杀时间
|
seckillTime: {}, // 秒杀时间
|
||||||
couponGroupList: [], // 优惠券拼团分类
|
// couponGroupList: [], // 优惠券拼团分类
|
||||||
pinTuanList: [], // 拼团商品
|
|
||||||
pinTuanPush: {}, // 拼团推荐
|
pinTuanPush: {}, // 拼团推荐
|
||||||
|
activityInfo: {},
|
||||||
|
areaList: [], // 位置信息
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getShopTopList();
|
this.getShopTopList();
|
||||||
|
this.getLocation(); // 获取定位
|
||||||
|
this.getStoreActivity();
|
||||||
|
// this.area = uni.getStorageSync("address") || "请选择";
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getRecommendedSpike();
|
this.getRecommendedSpike();
|
||||||
this.getSpikeList();
|
this.getSpikeList();
|
||||||
this.getGoodsClass();
|
|
||||||
this.getPinTuanPush();
|
this.getPinTuanPush();
|
||||||
|
this.getAllLoaction(); // 获取位置
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
sousuo() {
|
sousuo() {
|
||||||
@@ -111,6 +112,27 @@ export default {
|
|||||||
url: "pageB/search/index"
|
url: "pageB/search/index"
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 获取定位
|
||||||
|
getLocation() {
|
||||||
|
uni.getLocation({
|
||||||
|
type: 'wgs84',
|
||||||
|
geocode: true,
|
||||||
|
success: (res) => {
|
||||||
|
// console.log(res.address);
|
||||||
|
this.area = res.address.city;
|
||||||
|
},
|
||||||
|
fail: (e) => {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 获取位置
|
||||||
|
getAllLoaction() {
|
||||||
|
this.$u.api.getAreaList({pid: 0}).then(res => {
|
||||||
|
// console.log(res);
|
||||||
|
this.areaList = res.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
getShopTopList() {
|
getShopTopList() {
|
||||||
this.$u.api.getShopTopList().then((res) => {
|
this.$u.api.getShopTopList().then((res) => {
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
@@ -141,18 +163,11 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取优惠券拼团分类
|
|
||||||
getGoodsClass() {
|
|
||||||
this.$u.api.getGoodsClass().then(res => {
|
|
||||||
if(res.errCode == 0) {
|
|
||||||
this.couponGroupList = res.data;
|
|
||||||
this.getPinTuanList(this.couponGroupList[0].gc_id);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 全部秒杀
|
// 全部秒杀
|
||||||
getSpikeList() {
|
getSpikeList() {
|
||||||
this.$u.api.getSpikeList({ page: 0 }).then(res => {
|
this.$u.api.getSpikeList({
|
||||||
|
page: 0
|
||||||
|
}).then(res => {
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
this.spikeList = res.data.list;
|
this.spikeList = res.data.list;
|
||||||
this.seckillTime = {
|
this.seckillTime = {
|
||||||
@@ -162,15 +177,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 拼团列表
|
|
||||||
getPinTuanList(id) {
|
|
||||||
this.$u.api.getPinTuanList({
|
|
||||||
page: 0,
|
|
||||||
gc_id: id,
|
|
||||||
}).then(res => {
|
|
||||||
this.pinTuanList = res.data;
|
|
||||||
})
|
|
||||||
},
|
|
||||||
clickImage(index) {
|
clickImage(index) {
|
||||||
console.log(index);
|
console.log(index);
|
||||||
console.log(this.list[index]);
|
console.log(this.list[index]);
|
||||||
@@ -180,8 +186,8 @@ export default {
|
|||||||
this.$refs.recommendGoods.loadMore();
|
this.$refs.recommendGoods.loadMore();
|
||||||
},
|
},
|
||||||
setArea(e) {
|
setArea(e) {
|
||||||
// console.log(e);
|
console.log(e);
|
||||||
this.area = e.city.label;
|
this.area = this.areaList[e[0]].area_name;
|
||||||
},
|
},
|
||||||
toCartPage() {
|
toCartPage() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -193,6 +199,25 @@ export default {
|
|||||||
url: '/pageC/classify/index'
|
url: '/pageC/classify/index'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getStoreActivity() {
|
||||||
|
this.$u.api.getStoreActivity().then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.activityInfo = res.data;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
activityLink({ type, id }) {
|
||||||
|
if(type == 0 || type == 2) return false;
|
||||||
|
// type 1 商品详情页, 2 店铺详情页
|
||||||
|
const url = type == 1 ? 'pageB/sdetails/index' : '';
|
||||||
|
let params = { id: id };
|
||||||
|
// type: 1 // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||||
|
if(type == 1) Object.assign(params, { type: 1 });
|
||||||
|
this.$u.route({
|
||||||
|
url: url,
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -200,17 +225,28 @@ export default {
|
|||||||
.shop {
|
.shop {
|
||||||
height: calc(100vh - var(--window-top));
|
height: calc(100vh - var(--window-top));
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0 33rpx 100rpx;
|
background-color: #F0EDF1;
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
|
padding: 0 30rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
.local {
|
.local {
|
||||||
width: 31rpx;
|
width: 31rpx;
|
||||||
height: 37rpx;
|
height: 37rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.swiper-image {
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 0 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.add {
|
.add {
|
||||||
width: 115rpx;
|
width: 115rpx;
|
||||||
height: 25rpx;
|
height: 25rpx;
|
||||||
@@ -221,31 +257,40 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin-left: 14rpx;
|
margin-left: 14rpx;
|
||||||
margin-right: 37rpx;
|
margin-right: 37rpx;
|
||||||
|
|
||||||
>text {
|
>text {
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
>image {
|
>image {
|
||||||
width: 24rpx;
|
width: 24rpx;
|
||||||
height: 15rpx;
|
height: 15rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mnue {
|
.mnue {
|
||||||
|
background-color: #ffffff;
|
||||||
width: 35rpx;
|
width: 35rpx;
|
||||||
height: 26rpx;
|
height: 26rpx;
|
||||||
margin-left: 36rpx;
|
margin-left: 36rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chengnuo {
|
.chengnuo {
|
||||||
|
padding: 30rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 24rpx;
|
|
||||||
>view {
|
>view {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
>image {
|
>image {
|
||||||
width: 23rpx;
|
width: 23rpx;
|
||||||
height: 23rpx;
|
height: 23rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
>text {
|
>text {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
@@ -253,31 +298,25 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.fenlei {
|
.fenlei {
|
||||||
display: flex;
|
display: flex;
|
||||||
// justify-content: space-between;
|
|
||||||
margin-top: 30rpx;
|
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
> view {
|
padding: 30rpx;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 20rpx;
|
||||||
&:not(:nth-child(5n)) {
|
background-color: #ffffff;
|
||||||
margin-right: 70rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.hr{
|
|
||||||
width: 750rpx;
|
|
||||||
margin-left: -33rpx;
|
|
||||||
height: 20rpx;
|
|
||||||
background-color: #ececec;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.activity-view {
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
text-align: center;
|
||||||
.lingquan {
|
.lingquan {
|
||||||
width: 750rpx;
|
|
||||||
height: 177rpx;
|
|
||||||
margin-left: -33rpx;
|
|
||||||
margin-top: 29rpx;
|
|
||||||
background-color: #ececec;
|
background-color: #ececec;
|
||||||
|
width: 688rpx;
|
||||||
|
height: 138rpx;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.cart {
|
.cart {
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -291,6 +330,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
>image {
|
>image {
|
||||||
width: 56rpx;
|
width: 56rpx;
|
||||||
height: 54rpx;
|
height: 54rpx;
|
||||||
|
|||||||
543
pages/zhibo/index.nvue
Normal file
@@ -0,0 +1,543 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<video :src="url" class="vodio" autoplay="true" :show-fullscreen-btn="false" :show-play-btn="false" :enable-progress-gesture="false" :show-center-play-btn="false" :show-progress="false" :controls="false" :style="{'height':height}">
|
||||||
|
|
||||||
|
</video>
|
||||||
|
<view class="user" :style="{'top': top}">
|
||||||
|
<view class="back"></view>
|
||||||
|
<image class="head" :src="info.member_avatar"></image>
|
||||||
|
<view class="userinfo">
|
||||||
|
<text class="name">{{info.member_nickname}}</text>
|
||||||
|
<text class="info">{{info.live_desc}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="guanzhu" @click="guanzhu"><text style="color:#fff;font-size:24rpx">{{info.is_attention == 1 ? '已关注' : '关注'}}</text></view>
|
||||||
|
</view>
|
||||||
|
<view class="userlist" :style="{'top': top + 10 * rpx}">
|
||||||
|
<image class="userlistitem" v-for="(i,j) in room.onlineUsers.users.slice(0,3)" :src="i.avatar" :style="{'right': (-j * 15 * rpx) + 'px'}" :key="j"></image>
|
||||||
|
</view>
|
||||||
|
<view class="hot" :style="{'top': top + 10 * rpx}">
|
||||||
|
<text class="hottext">{{room.onlineUsers.users.length}}</text>
|
||||||
|
</view>
|
||||||
|
<image class="cart" src="../../static/cart.png" @click="show = true">
|
||||||
|
|
||||||
|
</image>
|
||||||
|
<view class="danmufasongbox" @click="danmu = true">
|
||||||
|
<view class="danmufasongboxback"></view>
|
||||||
|
<image src="../../static/danmu.png" class="danmubianji"></image>
|
||||||
|
<text style="font-size:26rpx;color:#fff;margin-left:20rpx">想说点什么</text>
|
||||||
|
</view>
|
||||||
|
<image class="liketap" src="../../static/like.png" @click="">
|
||||||
|
|
||||||
|
<view class="danmuinputbox" v-if="danmu">
|
||||||
|
<input type="text" focus="true" style="width:600rpx;margin-left:30rpx;font-size:26rpx" maxlength="20" @blur="danmu=false" v-model="danmutext">
|
||||||
|
<view class="danmufasong" @click="sendMessage(room.MessageType.CHAT,danmutext)">
|
||||||
|
<text style="font-size:24rpx;color:#fff">发送</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<div class="danmulist">
|
||||||
|
<text class="danmuitem" v-for="(i,j) in danmulist" :key="j">{{i.senderNickname}}:{{i.content}}</text>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<image class="closeimg" src="../../static/close.png" :style="{'top': top + 30 * rpx}" @click="back"></image>
|
||||||
|
</image>
|
||||||
|
<div class="bottom" :style="{'height':height + 'px'}" v-if="show" @click="show = false">
|
||||||
|
<div class="tanchuceng" @click="zuzhi">
|
||||||
|
<div class="heads">
|
||||||
|
<div style="flex-direction: row;align-items:center">
|
||||||
|
<text class="title">全部商品</text>
|
||||||
|
<text class="num">{{list.length}}件</text>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="add">
|
||||||
|
<text style="font-size:28rpx;color: #fff;text-align:center">添加/管理商品</text>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
<list class="list">
|
||||||
|
<cell class="item" v-for="(i,j) in list" :key="j" @click="xuanzhong(j)">
|
||||||
|
<image class="shopimg" :src="i.goods_image"></image>
|
||||||
|
<div class="infos">
|
||||||
|
<div>
|
||||||
|
<text style="font-size:26rpx;colro:#333;margin-top:12rpx;lines:1;text-overflow:ellipsis">{{i.goods_name}}</text>
|
||||||
|
<text style="font-size:24rpx;color:#333;margin-top:14rpx;lines:1;text-overflow:ellipsis">{{i.goods_advword}}</text>
|
||||||
|
</div>
|
||||||
|
<div style="flex-direction: row; align-items: flex-end;">
|
||||||
|
<text style="font-size:28rpx;color:#FF3131">¥{{i.goods_price}}</text>
|
||||||
|
<text style="font-size:26rpx;color:#999">¥{{i.goods_marketprice}}</text>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- <image :src="'../../static/image/release/' + (i.putaway == 1 ? 'on' : 'off') + '.png'" style="width:55rpx;height:35rpx;margin-top:120rpx;margin-left:150rpx"></image> -->
|
||||||
|
</cell>
|
||||||
|
</list>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.vodio{
|
||||||
|
width: 750rpx;
|
||||||
|
}
|
||||||
|
.infos{
|
||||||
|
height: 160rpx;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
width: 404rpx;
|
||||||
|
}
|
||||||
|
.shopimg{
|
||||||
|
width: 160rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
background-color: #0f0;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
.heads{
|
||||||
|
width: 750rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
border-bottom-width: 2rpx;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #ECECEC;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
font-size: 30rpx;
|
||||||
|
color:#333;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
}
|
||||||
|
.tanchuceng{
|
||||||
|
width: 750rpx;
|
||||||
|
height: 782rpx;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
border-top-left-radius:20rpx;
|
||||||
|
border-top-left-radius:20rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
transition: bottom 0.5s;
|
||||||
|
z-index: 20;
|
||||||
|
|
||||||
|
}
|
||||||
|
.item{
|
||||||
|
width: 690rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
border-bottom-width: 2rpx;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #ECECEC;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.list{
|
||||||
|
width: 750rpx;
|
||||||
|
height: 694rpx;
|
||||||
|
padding-left: 30rpx;
|
||||||
|
padding-right: 30rpx;
|
||||||
|
}
|
||||||
|
.add{
|
||||||
|
width: 221rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
background-color: #FF780F;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
justify-content: center;
|
||||||
|
margin-right: 30rpx;
|
||||||
|
}
|
||||||
|
.num{
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #FF3131;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
}
|
||||||
|
.bottom{
|
||||||
|
width: 750rpx;
|
||||||
|
position: fixed;
|
||||||
|
top:0;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
.cart{
|
||||||
|
width: 50rpx;
|
||||||
|
height: 46rpx;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 36rpx;
|
||||||
|
right: 154rpx;
|
||||||
|
}
|
||||||
|
.hottext{
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.hot{
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background-color: rgb(104, 104, 104);
|
||||||
|
position: fixed;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
right: 86rpx;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.userlistitem{
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
position: relative;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
}
|
||||||
|
.userlist{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row-reverse;
|
||||||
|
width: 150rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
position: fixed;
|
||||||
|
right: 156rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
.name {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #fff;
|
||||||
|
lines: 1;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.info {
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #fff;
|
||||||
|
margin-top: 6rpx;
|
||||||
|
lines: 1;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.userinfo {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 100rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
.guanzhu {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
background-color: #ff780f;
|
||||||
|
border-radius: 25rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.head {
|
||||||
|
width: 70rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
border-radius: 35rpx;
|
||||||
|
}
|
||||||
|
.back {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
background-color: #000;
|
||||||
|
opacity: 0.2;
|
||||||
|
width: 308rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
border-radius: 35rpx;
|
||||||
|
}
|
||||||
|
.user {
|
||||||
|
position: fixed;
|
||||||
|
left: 30rpx;
|
||||||
|
width: 308rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border-radius: 35rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
.video {
|
||||||
|
width: 750rpx;
|
||||||
|
}
|
||||||
|
.liketap{
|
||||||
|
width: 55rpx;
|
||||||
|
height: 57rpx;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 30rpx;
|
||||||
|
right: 54rpx;
|
||||||
|
}
|
||||||
|
.closeimg{
|
||||||
|
width: 31rpx;
|
||||||
|
height: 31rpx;
|
||||||
|
position: fixed;
|
||||||
|
right: 31rpx;
|
||||||
|
}
|
||||||
|
.danmufasongbox{
|
||||||
|
width: 308rpx;
|
||||||
|
height: 58rpx;
|
||||||
|
position: fixed;
|
||||||
|
left: 30rpx;
|
||||||
|
bottom: 30rpx;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.danmufasongboxback{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 308rpx;
|
||||||
|
height: 58rpx;
|
||||||
|
background-color: #0f0;
|
||||||
|
opacity: 0.4;
|
||||||
|
border-radius: 29rpx;
|
||||||
|
}
|
||||||
|
.danmubianji{
|
||||||
|
width: 27rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
.danmuinputbox{
|
||||||
|
position: fixed;
|
||||||
|
bottom:0;
|
||||||
|
height: 100rpx;
|
||||||
|
width: 750rpx;
|
||||||
|
z-index: 9999;
|
||||||
|
background-color: #fff;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
.danmufasong{
|
||||||
|
width: 85rpx;
|
||||||
|
height: 51rpx;
|
||||||
|
background-color: #FF780F;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
}
|
||||||
|
.danmulist{
|
||||||
|
position: fixed;
|
||||||
|
left: 30rpx;
|
||||||
|
bottom: 118rpx;
|
||||||
|
}
|
||||||
|
.danmuitem{
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #fff;
|
||||||
|
flex-direction: column-reverse;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const ChatRoomService =require('../../static/chatservice');
|
||||||
|
export default {
|
||||||
|
name: "zhibo",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
url: "",
|
||||||
|
top: 0,
|
||||||
|
height: 0,
|
||||||
|
rpx:0,
|
||||||
|
show:false,
|
||||||
|
list:[],
|
||||||
|
id:0,
|
||||||
|
info:{},
|
||||||
|
danmutext:"",
|
||||||
|
danmu:false,
|
||||||
|
room:{},
|
||||||
|
chatRoomService:{},
|
||||||
|
danmulist:[]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(a) {
|
||||||
|
|
||||||
|
this.url = a.url;
|
||||||
|
this.id = a.id
|
||||||
|
console.log(this.url);
|
||||||
|
let that = this;
|
||||||
|
|
||||||
|
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success(a) {
|
||||||
|
console.log(a.windowHeight);
|
||||||
|
that.height = a.windowHeight;
|
||||||
|
// that.start()
|
||||||
|
that.top = a.statusBarHeight + 5;
|
||||||
|
that.rpx = (a.windowWidth / 750)
|
||||||
|
console.log(that.rpx)
|
||||||
|
},
|
||||||
|
});
|
||||||
|
// this.$u.api.goodsShelves({live_id:this.id}).then((res)=>{
|
||||||
|
// console.log(res)
|
||||||
|
// })
|
||||||
|
const token = uni.getStorageSync('token');
|
||||||
|
console.log(token,that.id)
|
||||||
|
uni.request({
|
||||||
|
url:"https://dmmall.sdbairui.com/api/Specialci/goodsShelves",
|
||||||
|
data:{
|
||||||
|
live_id:that.id
|
||||||
|
},
|
||||||
|
method:"POST",
|
||||||
|
header:{
|
||||||
|
"Authorization" : 'Bearer' + " " + token
|
||||||
|
},
|
||||||
|
success(res){
|
||||||
|
console.log(res)
|
||||||
|
that.list= res.data.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
setInterval(function(){
|
||||||
|
uni.request({
|
||||||
|
url:"https://dmmall.sdbairui.com/api/Specialci/goodsShelves",
|
||||||
|
data:{
|
||||||
|
live_id:that.id
|
||||||
|
},
|
||||||
|
method:"POST",
|
||||||
|
header:{
|
||||||
|
"Authorization" : 'Bearer' + " " + token
|
||||||
|
},
|
||||||
|
success(res){
|
||||||
|
console.log(res)
|
||||||
|
that.list= res.data.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},6 * 1000)
|
||||||
|
uni.request({
|
||||||
|
url:"https://dmmall.sdbairui.com/api/Specialci/livingUserInfo",
|
||||||
|
data:{
|
||||||
|
live_id:that.id
|
||||||
|
},
|
||||||
|
method:"POST",
|
||||||
|
header:{
|
||||||
|
"Authorization" : 'Bearer' + " " + token
|
||||||
|
},
|
||||||
|
success(res){
|
||||||
|
console.log(res)
|
||||||
|
that.info = res.data.data
|
||||||
|
// that.list= res.data.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
//当前用户
|
||||||
|
try {
|
||||||
|
uni.request({
|
||||||
|
url:"https://dmmall.sdbairui.com/api/Member/MemberInfo",
|
||||||
|
method:"POST",
|
||||||
|
header:{
|
||||||
|
'Authorization' : 'Bearer' + " " + token
|
||||||
|
},
|
||||||
|
success(res){
|
||||||
|
console.log(res,111)
|
||||||
|
var currentUser = {
|
||||||
|
id : res.data.data.MemberArray.member_mobile + "",
|
||||||
|
nickname : res.data.data.MemberArray.member_nickname,
|
||||||
|
avatar: res.data.data.MemberArray.member_avatar
|
||||||
|
};
|
||||||
|
|
||||||
|
var room = {
|
||||||
|
id : a.rid + "",
|
||||||
|
name : a.rid + ""
|
||||||
|
};
|
||||||
|
console.log(room,currentUser)
|
||||||
|
//构造chatRoomService
|
||||||
|
that.chatRoomService = new ChatRoomService(room, currentUser);
|
||||||
|
|
||||||
|
that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
|
||||||
|
that.chatRoomService.connectGoEasyIM();
|
||||||
|
|
||||||
|
//获取当前聊天室数据
|
||||||
|
that.room = that.chatRoomService.room;
|
||||||
|
setTimeout(function() {
|
||||||
|
that.chatRoomService.quitRoom();
|
||||||
|
that.chatRoomService = {}
|
||||||
|
|
||||||
|
}, 1000);
|
||||||
|
setTimeout(function(){
|
||||||
|
that.chatRoomService = new ChatRoomService(room, currentUser);
|
||||||
|
|
||||||
|
that.chatRoomService.initialWhenNewMessage(that.whenNewMessage);
|
||||||
|
that.chatRoomService.connectGoEasyIM();
|
||||||
|
|
||||||
|
//获取当前聊天室数据
|
||||||
|
that.room = that.chatRoomService.room;
|
||||||
|
console.log(that.room.onlineUsers)
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
console.log("错误")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
onBackPress () {//返回取消订阅
|
||||||
|
//断开连接
|
||||||
|
this.chatRoomService.quitRoom();
|
||||||
|
},
|
||||||
|
beforeDestroy () {
|
||||||
|
this.chatRoomService.quitRoom();
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
sendMessage (messageType, content) {//发送消息
|
||||||
|
console.log(123)
|
||||||
|
if(content == "" && messageType == 0) return;
|
||||||
|
var message = {
|
||||||
|
senderNickname : this.room.currentUser.nickname ,
|
||||||
|
type : messageType,
|
||||||
|
content : content
|
||||||
|
}
|
||||||
|
this.chatRoomService.sendMessages(this.room.id, message);
|
||||||
|
this.danmutext = ""
|
||||||
|
},
|
||||||
|
whenNewMessage (message) {//新消息监听
|
||||||
|
// if(message.type == this.room.MessageType.PROP){
|
||||||
|
// this.propAnimation(parseInt(message.content))
|
||||||
|
// }
|
||||||
|
// setTimeout(() => {
|
||||||
|
// this.contentPosition = 'message-box'+(this.room.messages.length-1);
|
||||||
|
// }, 300)
|
||||||
|
console.log(message)
|
||||||
|
this.danmulist.push(message)
|
||||||
|
|
||||||
|
if(this.danmulist.length > 7){
|
||||||
|
this.danmulist = this.danmulist.slice(this.danmulist.length - 7)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
back(){
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
},
|
||||||
|
guanzhu(){
|
||||||
|
const token = uni.getStorageSync('token');
|
||||||
|
let that = this
|
||||||
|
console.log(token)
|
||||||
|
uni.request({
|
||||||
|
url:"https://dmmall.sdbairui.com/api/member/attentionMember",
|
||||||
|
data:{
|
||||||
|
member_id:that.info.user_id
|
||||||
|
},
|
||||||
|
method:"POST",
|
||||||
|
header:{
|
||||||
|
"Authorization" : 'Bearer' + " " + token
|
||||||
|
},
|
||||||
|
success(res){
|
||||||
|
console.log(res)
|
||||||
|
uni.request({
|
||||||
|
url:"https://dmmall.sdbairui.com/api/Specialci/livingUserInfo",
|
||||||
|
data:{
|
||||||
|
live_id:that.id
|
||||||
|
},
|
||||||
|
method:"POST",
|
||||||
|
header:{
|
||||||
|
"Authorization" : 'Bearer' + " " + token
|
||||||
|
},
|
||||||
|
success(res){
|
||||||
|
console.log(res)
|
||||||
|
that.info = res.data.data
|
||||||
|
// that.list= res.data.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// that.list= res.data.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
xuanzhong(i){
|
||||||
|
let that = this
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pageB/sdetails/index?id=${that.list[i].goods_id}&type=1`
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
zuzhi(event){
|
||||||
|
event.stopPropagation();
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
BIN
static/CustomStoryboard.zip
Normal file
BIN
static/app/icon/144x144.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
static/app/icon/192x192.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
static/app/icon/72x72.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |