diff --git a/common/api/shop.js b/common/api/shop.js
index aea37d9..fb05bd6 100644
--- a/common/api/shop.js
+++ b/common/api/shop.js
@@ -294,8 +294,8 @@ export default {
})
},
// 搜索发现列表
- searchwordlist() {
- return vm.$u.post('ShopSearch/searchwordlist')
+ searchwordlist({type}) {
+ return vm.$u.post('ShopSearch/searchWordList',{type})
},
// 提交试穿订单
saveGoodsTry({ member_name, member_mobile, area_info, address_detail, goods_id, num, store_id, appointment_time }) {
@@ -332,6 +332,13 @@ export default {
fav_id: fid,
type: type
})
+ },
+ //店铺列表
+ storeList({ page, name_search }) {
+ return vm.$u.post('shop/storeList',{
+ page,
+ name_search: name_search
+ })
}
}
}
diff --git a/pageB/follow/index.vue b/pageB/follow/index.vue
index 479d97c..32aa774 100644
--- a/pageB/follow/index.vue
+++ b/pageB/follow/index.vue
@@ -5,7 +5,7 @@
输入达人名称
-
+
@@ -76,7 +76,7 @@ export default {
},
searchValue() {
uni.navigateTo({
- url: '/pageB/search/index'
+ url: '/pageB/search/index?type=1'
})
},
},
diff --git a/pageB/sdetails/index.vue b/pageB/sdetails/index.vue
index 9830acb..b75e7b0 100644
--- a/pageB/sdetails/index.vue
+++ b/pageB/sdetails/index.vue
@@ -98,7 +98,7 @@
-
+
参与{{ involvemenGroupInfo[0].member_nickname }}的拼团
@@ -443,15 +443,25 @@ export default {
* @params {Number} ifcart 结算方式 1:购物车 0:直接结算(立即购买/拼团/秒杀)
**/
settlementOrder({type, num = this.goodsNumber, ifcart = 0} = {}) {
- if(!this.showSpec) {
- this.showSpec = true;
- return false;
- }
- if(!this.quanxuan) {
- this.$refs.uToast.show({
- title: '请选择规格'
- })
- return false;
+ if(type != 'involvement') {
+ if(!this.showSpec) {
+ this.showSpec = true;
+ return false;
+ }
+ if(!this.showSpec) {
+ this.showSpec = true;
+ return false;
+ }
+ // 如果没有规格设规格已全选
+ if(this.goodsInfo.spec_value == null) {
+ this.quanxuan = true;
+ }
+ if(!this.quanxuan) {
+ this.$refs.uToast.show({
+ title: '请选择规格'
+ })
+ return false;
+ }
}
if(!this.debounce) return;
this.debounce = false;
@@ -516,6 +526,8 @@ export default {
},
xuanze(id){
// console.log(id)
+ // 选择完规格后设商品type = 1
+ this.type = 1;
this.getGoodsDetails(this.glist[id])
this.id = this.glist[id];
},
diff --git a/pageB/search/index.vue b/pageB/search/index.vue
index 9cab438..816dc2e 100644
--- a/pageB/search/index.vue
+++ b/pageB/search/index.vue
@@ -13,11 +13,14 @@ export default {
name:"search",
data(){
return{
+ type: '', // 1 商家达人社区 2 商品
keyword: "",
searchwordlist: [],
}
},
- created() {
+ // type: 2 商品 1: 其他
+ onLoad(option) {
+ this.type = option.type;
this.getWordList();
},
// 点击搜索按钮
@@ -34,8 +37,10 @@ export default {
},
methods:{
getWordList() {
- this.$u.api.searchwordlist().then(res => {
- this.searchwordlist = res.data;
+ this.$u.api.searchwordlist({type:this.type}).then(res => {
+ console.log(res)
+ this.searchwordlist = res.data;
+
})
},
search(value){
@@ -44,14 +49,22 @@ export default {
this.$u.toast('搜索内容不可为空');
return false;
}
- this.$u.route({
- url: "/pageB/search/out",
- params: {
- value: value,
- type: "shop",
- order: 'goods_salenum'
- }
- })
+ let params = {
+ value: value,
+ type: this.type,
+ }
+ if(this.type == 2) {
+ this.$u.route({
+ url: "/pageB/search/out",
+ params: params,
+ })
+ }else{
+ this.$u.route({
+ url: "/pageB/search/searchGoods",
+ params: params,
+ })
+ }
+
}
}
}
diff --git a/pageB/search/out.vue b/pageB/search/out.vue
index c471d84..19e24cf 100644
--- a/pageB/search/out.vue
+++ b/pageB/search/out.vue
@@ -1,59 +1,296 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ 店铺
+
+ 达人
+
+ 社区
+
+
+
+
+
+ {{ goods.store_name }}
+ {{ goods.store_description }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pageB/search/searchGoods.vue b/pageB/search/searchGoods.vue
index 10661a6..f61b3fe 100644
--- a/pageB/search/searchGoods.vue
+++ b/pageB/search/searchGoods.vue
@@ -36,26 +36,50 @@ export default {
goodsList: [],
scrollHeight: '',
loadStatus: 'loadmore',
- timer: true, // 防止上拉加载短时间内多次调用
+ timer: true, // 防止上拉加载短时间内多次调用,
+ value:""
}
},
watch: {
current(value) {
this.page = 1;
- this.goodsListByClassId({ laod: 'reload' });
+ this.ShopSearch({ laod: 'reload' });
},
priceOrderAsc(value) {
this.page = 1;
- this.goodsListByClassId({ laod: 'reload' });
+ this.ShopSearch({ laod: 'reload' });
}
},
onLoad(option) {
- this.cid = option.cid;
- this.goodsListByClassId({ load: 'reload' });
+ this.value = option.value
this.setViewHeight();
- this.setTitle(option.cname);
+ this.ShopSearch()
+ },
+ onNavigationBarSearchInputConfirmed(value) {
+ this.value = value.text
+ this.ShopSearch()
},
methods: {
+ setNavSearchInput(keyword) {
+ console.log(keyword);
+ // #ifdef APP-PLUS
+ let webView = this.$mp.page.$getAppWebview();
+ webView.setTitleNViewSearchInputText(keyword);
+ // #endif
+ // #ifdef H5
+ let inputSearch=document.querySelector('.uni-input-input[type=search]');
+ const evt = new InputEvent('input', {
+ inputType: 'insertText',
+ data: keyword,
+ dataTransfer: null,
+ isComposing: false
+ });
+ if(inputSearch){
+ inputSearch.value = keyword;
+ inputSearch.dispatchEvent(evt);
+ }
+ // #endif
+ },
setOrderSort() {
let sort = '';
if(this.current == 0) {
@@ -69,10 +93,12 @@ export default {
return sort;
},
// 排序方式 goods_salenum:销量 evaluation_count:评价 goods_price_asc:价格从低到高 goods_price_desc:价格从高到低
- async goodsListByClassId({ load = 'reload' } = {}) {
+ async ShopSearch({ load = 'reload' } = {}) {
+ console.log(this.value);
+ this.setNavSearchInput(this.value);
const sort = this.setOrderSort();
- const res = await this.$u.api.goodsListByClassId({
- gc_id: this.cid,
+ const res = await this.$u.api.ShopSearch({
+ keyword: this.value,
page: this.page,
order: sort,
})
@@ -88,7 +114,7 @@ export default {
if(!this.timer) return false;
this.loadStatus = "loading";
this.page++;
- this.goodsListByClassId({ load: 'loadmore' }).then(length => {
+ this.ShopSearch({ load: 'loadmore' }).then(length => {
if(length == 0) {
this.page--;
this.loadStatus = 'nomore';
@@ -101,22 +127,17 @@ export default {
})
},
switchCurrent(current) {
+ this.ShopSearch()
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
- });
+ this.scrollHeight = res.windowHeight - res.windowWidth / 750 * 90 + 'px';
},
toDetailsPage(id) {
this.$u.route('/pageB/sdetails/index', {
- id: id,
- type: 1 // 商品详情 商品类型 1普通 2拼团 3秒杀 4优惠券
+ id: id
});
}
}
diff --git a/pageC/classify/goods.vue b/pageC/classify/goods.vue
index 10661a6..7a6821d 100644
--- a/pageC/classify/goods.vue
+++ b/pageC/classify/goods.vue
@@ -106,7 +106,7 @@ export default {
},
setViewHeight() {
const res = uni.getSystemInfoSync();
- this.scrollHeight = res.windowHeight - (90 / 2) + 'px';
+ this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * 90 + 'px';
},
setTitle(title) {
uni.setNavigationBarTitle({
diff --git a/pageC/classify/index.vue b/pageC/classify/index.vue
index 4e8b34f..ac65825 100644
--- a/pageC/classify/index.vue
+++ b/pageC/classify/index.vue
@@ -50,15 +50,18 @@
this.getMenuItemTop()
},
onNavigationBarButtonTap(e) {
- if(e.index == 0) this.$u.route('/pageB/search/index');
+ if(e.index == 0) this.$u.route('/pageB/search/index',{ type: 2 });
},
onNavigationBarSearchInputClicked() {
- this.$u.route('/pageB/search/index');
+ this.$u.route('/pageB/search/index', { type: 2 });
},
methods: {
toSearchPage() {
this.$u.route({
- url: "pageB/search/index"
+ url: "pageB/search/index",
+ prarms: {
+ type: 2
+ }
})
},
// 获取分类列表
diff --git a/pageC/components/merchant/image-top.vue b/pageC/components/merchant/image-top.vue
index 2435234..fc02c84 100644
--- a/pageC/components/merchant/image-top.vue
+++ b/pageC/components/merchant/image-top.vue
@@ -1,16 +1,17 @@
-
+
@@ -21,6 +22,6 @@ export default {
return {
}
},
- props:['url']
+ props:['url'],
}
\ No newline at end of file
diff --git a/pageC/components/merchant/list-item.vue b/pageC/components/merchant/list-item.vue
index 4897cbd..1affed0 100644
--- a/pageC/components/merchant/list-item.vue
+++ b/pageC/components/merchant/list-item.vue
@@ -1,17 +1,18 @@
-
+
diff --git a/pageC/groupBuy/index.vue b/pageC/groupBuy/index.vue
index 94c6265..9b3ad21 100644
--- a/pageC/groupBuy/index.vue
+++ b/pageC/groupBuy/index.vue
@@ -104,7 +104,7 @@ export default {
},
setViewHeight() {
const res = uni.getSystemInfoSync();
- this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
+ this.swiperHeight = res.windowHeight - (res.windowWidth / 750) * 88 + 'px';
},
}
};
diff --git a/pageC/merchant/classifyGoods.vue b/pageC/merchant/classifyGoods.vue
index 469cf36..d6e2ce5 100644
--- a/pageC/merchant/classifyGoods.vue
+++ b/pageC/merchant/classifyGoods.vue
@@ -125,7 +125,7 @@ export default {
},
setViewHeight() {
const res = uni.getSystemInfoSync();
- this.scrollHeight = res.windowHeight - 90 / 2 + 'px';
+ this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * 90 + 'px';
// console.log(this.scrollHeight);
},
toDetailsPage(id) {
diff --git a/pageC/merchant/goods.vue b/pageC/merchant/goods.vue
index 7fa1e8c..964ae95 100644
--- a/pageC/merchant/goods.vue
+++ b/pageC/merchant/goods.vue
@@ -115,7 +115,7 @@ export default {
setViewHeight() {
const res = uni.getSystemInfoSync();
const otherHeight = 347 + 140 + 20 + 98;
- this.scrollHeight = res.windowHeight - otherHeight / 2 + 'px';
+ this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * otherHeight + 'px';
// console.log(this.scrollHeight);
},
toDetailsPage(id) {
diff --git a/pageC/merchant/index.vue b/pageC/merchant/index.vue
index 1871373..83921d5 100644
--- a/pageC/merchant/index.vue
+++ b/pageC/merchant/index.vue
@@ -38,12 +38,12 @@
-
-
-
+
+
+
-
-
+
+
@@ -109,6 +109,12 @@ export default {
// if(e.index == 0) this.show = true;
},
methods: {
+ toDetailsPage(id) {
+ // console.log(11);
+ this.$u.route('pageB/photo/index', {
+ id: id
+ });
+ },
switchCurrent(current) {
this.cur = current;
if(current == 0) {
@@ -123,15 +129,15 @@ export default {
uni.stopPullDownRefresh();
})
},
- getStoreImgVideoList() {
- this.$u.api.getStoreImgVideoList({ id: this.sid }).then((res)=>{
- if(res.data.length) {
- this.indextop = [res.data[0], res.data[1]];
- this.indexlist = res.data.slice(2,);
- }
- uni.stopPullDownRefresh();
- })
- },
+ // getStoreImgVideoList() {
+ // this.$u.api.getStoreImgVideoList({ id: this.sid }).then((res)=>{
+ // if(res.data.length) {
+ // this.indextop = [res.data[0], res.data[1]];
+ // this.indexlist = res.data.slice(2,);
+ // }
+ // uni.stopPullDownRefresh();
+ // })
+ // },
attentionMember() {
this.$u.api.attentionMember({ member_id: this.info.member_id }).then(res => {
if(res.errCode == 0) {
@@ -149,13 +155,15 @@ export default {
uni.stopPullDownRefresh();
if (res.errCode == 0) {
// this.articleList = res.data.list;
- if(res.data.list.length > 0) {
- this.indextop = [res.data.list[0]]
- this.indextop = [res.data.list[0], res.data.list[1]];
- }
- if(res.data.list.length > 1) {
- this.indextop.push(res.data.list[1]);
- this.indexlist.push(...res.data.list.slice(2,));
+ if(JSON.stringify(res.data) != '[]') {
+ if(res.data.list.length > 0) {
+ this.indextop = [res.data.list[0]]
+ // this.indextop = [res.data.list[0], res.data.list[1]];
+ }
+ if(res.data.list.length > 1) {
+ this.indextop.push(res.data.list[1]);
+ this.indexlist.push(...res.data.list.slice(2,));
+ }
}
}
})
@@ -288,9 +296,23 @@ export default {
.video-image {
padding-bottom: 98rpx;
}
- > view {
- margin-top: 20rpx;
+ .container-top {
+ > view {
+ margin-bottom: 10rpx;
+ }
}
+ .container-bottom {
+ margin-top: 20rpx;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ .bottom-item {
+ margin-bottom: 10rpx;
+ }
+ }
+ // > view {
+ // margin-top: 20rpx;
+ // }
}
.tabbar {
border-top: 1rpx #DBDADA solid;
diff --git a/pageE/mine/EditUserInfo.vue b/pageE/mine/EditUserInfo.vue
index 87e8342..ffe3365 100644
--- a/pageE/mine/EditUserInfo.vue
+++ b/pageE/mine/EditUserInfo.vue
@@ -98,8 +98,37 @@ export default {
},
onNavigationBarButtonTap(e) {
if( e.index == 0 ) uni.navigateBack();
+ if( e.index == 1 ) this.customers();
},
methods: {
+ customers(){
+ function Friend(uuid, name, avatar,time = "", text = "",date = "") {
+ this.uuid = uuid;
+ this.name = name;
+ this.avatar = avatar;
+ this.online = false;
+ this.unReadMessage = 0;
+ this.text = text;
+ this.time = time;
+ this.date = date
+ }
+ // console.log(123)
+ this.$u.api.getAtwillUserInfo({
+ id: 1 // 平台店铺 id
+ }).then((res)=>{
+ // console.log(res)
+ let user = new Friend(res.data.member_id,res.data.member_nickname,res.data.member_avatar)
+ this.$u.route({
+ url:"/pageD/privateChat/privateChat",
+ params:{
+ id:JSON.stringify(user)
+ }
+
+ })
+ }).catch((err)=>{
+ console.log(err)
+ })
+ },
changeAvatar() {
const url = this.$u.http.config.baseUrl + '/Upload/uploadfile';
uni.chooseImage({
diff --git a/pageE/mine/Integral.vue b/pageE/mine/Integral.vue
index b0378de..ec34744 100644
--- a/pageE/mine/Integral.vue
+++ b/pageE/mine/Integral.vue
@@ -40,7 +40,7 @@ export default {
setIntegralHeight() {
const res = uni.getSystemInfoSync();
// console.log(res.windowHeight);
- this.integralHeight = res.windowHeight - 251 / 2 + 'px';
+ this.integralHeight = res.windowHeight - (res.windowWidth / 750) * 251 + 'px';
},
getMemberPointsStat() {
this.$u.api.getMemberPointsStat().then((res)=>{
diff --git a/pageE/mine/MedalIntroduction.vue b/pageE/mine/MedalIntroduction.vue
index 1265c43..2d6d74d 100644
--- a/pageE/mine/MedalIntroduction.vue
+++ b/pageE/mine/MedalIntroduction.vue
@@ -3,7 +3,7 @@
- 了解勋章
+ {{ title }}
@@ -18,6 +18,7 @@ export default {
data() {
return {
nodes: '',
+ title: '',
}
},
created() {
@@ -27,7 +28,8 @@ export default {
getMemberPointsStat() {
this.$u.api.getMemberPointsStat().then((res)=>{
if (res.errCode == 0) {
- const nodes = res.data.grade_rule;
+ this.title = res.data.grade_rule.document_title;
+ const nodes = res.data.grade_rule.document_content;
this.nodes = common.unescapeHTML(nodes);
}
})
diff --git a/pageE/mine/MemberServe.vue b/pageE/mine/MemberServe.vue
index 2f94ac3..3e9a2a5 100644
--- a/pageE/mine/MemberServe.vue
+++ b/pageE/mine/MemberServe.vue
@@ -101,9 +101,9 @@ export default {
},
getMemberPointsStat() {
this.$u.api.getMemberPointsStat().then((res)=>{
- if (res.errCode == 0) {
+ if(res.errCode == 0) {
this.memberInfo = res.data;
- this.nodes = common.unescapeHTML(this.memberInfo.points_rule);
+ this.nodes = common.unescapeHTML(this.memberInfo.points_rule.document_content);
}
})
},
@@ -117,9 +117,9 @@ export default {
setViewHeight() {
const res = uni.getSystemInfoSync();
// console.log(res.windowHeight);
- this.richHeight = res.windowHeight - (88 + 250) / 2 + 'px';
+ this.richHeight = res.windowHeight - (88 + 250) * (res.windowWidth / 750) + 'px';
// console.log(this.richHeight);
- this.swiperHeight = res.windowHeight - 88 / 2 + 'px';
+ this.swiperHeight = res.windowHeight - (res.windowWidth / 750) * 88 + 'px';
},
viewProgress() {
this.$u.route({
diff --git a/pageE/mine/MemberServeCoupon.vue b/pageE/mine/MemberServeCoupon.vue
index 61a3c3b..a20dac1 100644
--- a/pageE/mine/MemberServeCoupon.vue
+++ b/pageE/mine/MemberServeCoupon.vue
@@ -7,11 +7,11 @@
-
+
-
-
+
+
@@ -49,7 +49,7 @@ export default {
},
watch: {
couponCurrent(index) {
- this.couponList = [];
+ // this.couponList = [];
const id = this.couponGroupList[index].gc_id;
this.getCouponList({ gc_id: id, load: 'reload' });
},
@@ -89,9 +89,10 @@ export default {
})
this.timer = true;
if(res.errCode == 0) {
- if(load == 'reload') this.couponList = res.data;
- else if(load == 'loadmore') this.couponList.push(...res.data);
+ if(load == 'reload') this.couponList[this.couponCurrent] = res.data;
+ else if(load == 'loadmore') this.couponList[this.couponCurrent].push(...res.data);
}
+ this.$forceUpdate();
return res.data.length;
},
exchangeCoupon(id) {
@@ -109,7 +110,7 @@ export default {
},
setViewHeight() {
const res = uni.getSystemInfoSync();
- this.swiperHeight = res.windowHeight - ((88 + 10 + 88) / 2) + 'px';
+ this.swiperHeight = res.windowHeight - ((88 + 10 + 88) * (res.windowWidth / 750)) + 'px';
},
},
};
diff --git a/pageE/mine/MineProgress.vue b/pageE/mine/MineProgress.vue
index 1d6957d..2140941 100644
--- a/pageE/mine/MineProgress.vue
+++ b/pageE/mine/MineProgress.vue
@@ -5,17 +5,17 @@
lv{{ memberInfo.member_level }}
- {{ memberInfo.member_exppoints | percentExp(memberInfo.next_grade_exppoints_diff) }}
+ {{ memberInfo.member_exppoints + '/' + memberInfo.next_member_level_exppoints }}
- lv{{ memberInfo.member_level + 1 }}
+ lv{{ memberInfo.next_member_level }}
经验值{{ memberInfo.member_exppoints }}
- 距离下一级还需要{{ memberInfo.next_grade_exppoints_diff }}经验值
+ 距离下一级还需要 {{ memberInfo.next_member_level_exppoints_diff }} 经验值
-
+
- 等级定义
+ {{ memberInfo.level_rule.document_title }}
-
+
- {{ item.store_name }}
+ {{ item.store_name }}
-
-
+
+
{{ item.goods_name }}
@@ -34,6 +34,22 @@ export default {
this.getBrowseList();
},
methods: {
+ viewStoreDetails(sid) {
+ this.$u.route({
+ url: 'pageC/merchant/index',
+ params: {
+ id: sid,
+ }
+ })
+ },
+ viewGoodsDetails(id) {
+ this.$u.route({
+ url: 'pageB/sdetails/index',
+ params: {
+ id: id,
+ }
+ })
+ },
async getBrowseList () {
const res = await this.$u.api.getBrowseList({ page: this.page });
this.timer = false;
diff --git a/pageE/tool/SendWash.vue b/pageE/tool/SendWash.vue
index dd42526..e07c7e8 100644
--- a/pageE/tool/SendWash.vue
+++ b/pageE/tool/SendWash.vue
@@ -44,7 +44,7 @@
确认完成
-
+
去评价
@@ -192,7 +192,7 @@ export default {
},
setViewHeight() {
const res = uni.getSystemInfoSync();
- this.swiperHeight = res.windowHeight - (88 / 2) + 'px';
+ this.swiperHeight = res.windowHeight - (88 * (res.windowWidth / 750)) + 'px';
},
toComment(id) {
this.$u.route('/pageE/tool/washComment', {
diff --git a/pageE/tool/WashOrder.vue b/pageE/tool/WashOrder.vue
index 1584581..1682981 100644
--- a/pageE/tool/WashOrder.vue
+++ b/pageE/tool/WashOrder.vue
@@ -175,7 +175,7 @@