更新
This commit is contained in:
parent
18d5c6494d
commit
d0e4a8b096
@ -140,3 +140,22 @@ export function getNavigation(data) {
|
||||
export function applet(data) {
|
||||
return request.get(`applet`, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定小程序账号
|
||||
* @param data object 小程序用户登陆信息
|
||||
*/
|
||||
export function bindMp(data) {
|
||||
return request.post("auth/bindMp", data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 绑定极光id
|
||||
* @param data object 小程序用户登陆信息
|
||||
*/
|
||||
export function bindJG(data) {
|
||||
return request.post("auth/bindJg", data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
@ -350,7 +350,9 @@
|
||||
<view class="goods_list">
|
||||
<view class="goods" v-for="(item, index) in goodsList" :key="index" @click="goStore(item.mer_id)">
|
||||
<view class="avatar">
|
||||
<u--image style="width: 100%;height: 100%;" :src="item.mer_avatar">
|
||||
<!-- <image style="width: 100%;height: 100%;" :src="item.mer_avatar" mode="aspectFill" lazy-load>
|
||||
</image> -->
|
||||
<u--image width="160rpx" height="160rpx" :src="item.mer_avatar" mode="aspectFill">
|
||||
<template v-slot:loading>
|
||||
<u-loading-icon color="#999" size="15" />
|
||||
</template>
|
||||
|
@ -1117,12 +1117,14 @@ import { Toast } from "../../../libs/uniApi";
|
||||
// #ifdef APP-PLUS
|
||||
jpushModule.initJPushService()
|
||||
jpushModule.getRegistrationID(result => {
|
||||
|
||||
if (result.registerID) {
|
||||
|
||||
bindJG({
|
||||
phone: this.account,
|
||||
jg_register_id: result.registerID
|
||||
}).then(res=>{
|
||||
console.log("绑定成功", res);
|
||||
}).catch(err=>{
|
||||
console.log("绑定失败", err);
|
||||
})
|
||||
}
|
||||
})
|
||||
|
@ -379,6 +379,9 @@
|
||||
onPageScroll() {
|
||||
uni.$emit('scroll');
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getProductslist(true, true);
|
||||
},
|
||||
onReachBottom() {
|
||||
this.getProductslist();
|
||||
},
|
||||
@ -443,7 +446,10 @@
|
||||
})
|
||||
this.cate_change_children = 0;
|
||||
if (this.tabsCurr == 1) this.where.mer_cate_id = this.store_category[e].store_category_id;
|
||||
else this.where.cate_id = this.store_category[e].store_category_id
|
||||
else {
|
||||
this.where.cate_pid = this.store_category[e].store_category_id;
|
||||
this.where.cate_id = "";
|
||||
}
|
||||
this.getProductslist(true);
|
||||
},
|
||||
changeChildrenCate(e) {
|
||||
@ -474,7 +480,7 @@
|
||||
store_category_id: ''
|
||||
})
|
||||
},
|
||||
getProductslist(reLoad = false) {
|
||||
getProductslist(reLoad = false, stop=false) {
|
||||
if (reLoad) {
|
||||
this.where.page = 1;
|
||||
this.hostProduct = [];
|
||||
@ -483,6 +489,7 @@
|
||||
if (this.isLoading == -1) return;
|
||||
this.isLoading = 1;
|
||||
getProductslist(this.where, true).then(res => {
|
||||
if(stop) uni.stopPullDownRefresh();
|
||||
if (reLoad) this.hostProduct = [];
|
||||
this.hostProduct = [...this.hostProduct, ...res.data.list];
|
||||
this.isLoading = 0;
|
||||
|
@ -117,8 +117,10 @@ function baseRequest(url, method, data, {
|
||||
url: '/pages/error/index'
|
||||
})
|
||||
reject(res.data);
|
||||
} else
|
||||
} else {
|
||||
console.error("请求失败", res)
|
||||
reject(res.data.message || '系统错误');
|
||||
}
|
||||
},
|
||||
fail: (message) => {
|
||||
reject('请求失败');
|
||||
|
Loading…
x
Reference in New Issue
Block a user