|
@@ -5,7 +5,7 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
pageType: "bill", //选择商品页面类别 用于区分不同功能的数据
|
|
pageType: "bill", //选择商品页面类别 用于区分不同功能的数据
|
|
|
-
|
|
|
|
|
|
|
+ isCut:false,
|
|
|
productInfo: [], //商品信息
|
|
productInfo: [], //商品信息
|
|
|
classIndex: 0, //当前商品类别下标
|
|
classIndex: 0, //当前商品类别下标
|
|
|
py: "", //拼音搜索条件
|
|
py: "", //拼音搜索条件
|
|
@@ -544,15 +544,21 @@ export default {
|
|
|
* 切换左侧商品类别
|
|
* 切换左侧商品类别
|
|
|
*/
|
|
*/
|
|
|
swichClass(cur) {
|
|
swichClass(cur) {
|
|
|
|
|
+ this.isCut = true;
|
|
|
// let cur = e.currentTarget.dataset.current;
|
|
// let cur = e.currentTarget.dataset.current;
|
|
|
// if (this.classIndex == cur) {
|
|
// if (this.classIndex == cur) {
|
|
|
// return false;
|
|
// return false;
|
|
|
// } else {}
|
|
// } else {}
|
|
|
clearInterval(this.timeFun)
|
|
clearInterval(this.timeFun)
|
|
|
- this.classIndex = cur;
|
|
|
|
|
this.scroll_into_view = '';
|
|
this.scroll_into_view = '';
|
|
|
- this.$nextTick(()=>{this.scroll_into_view = 'class_'+cur;})
|
|
|
|
|
- this.scrollPushList();
|
|
|
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
|
+ this.scroll_into_view = 'class_'+cur;
|
|
|
|
|
+ this.classIndex = cur;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ this.scrollPushList();
|
|
|
//解决最后一个 ***来回*** 问题 (由于点击左侧导航,右侧锚点位置信息变化,此时滚动事件也随之滚动。)
|
|
//解决最后一个 ***来回*** 问题 (由于点击左侧导航,右侧锚点位置信息变化,此时滚动事件也随之滚动。)
|
|
|
uni.setStorageSync("resolve","last");
|
|
uni.setStorageSync("resolve","last");
|
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
@@ -564,6 +570,7 @@ export default {
|
|
|
* 滚动商品监听
|
|
* 滚动商品监听
|
|
|
* **/
|
|
* **/
|
|
|
scroll_detail(options){
|
|
scroll_detail(options){
|
|
|
|
|
+ if(this.isCut) {this.isCut = false; return;}
|
|
|
//options 为滚动信息。 options.detail.scrollTop 值为相对于scroll-view。
|
|
//options 为滚动信息。 options.detail.scrollTop 值为相对于scroll-view。
|
|
|
if(!uni.getStorageSync("resolve")){
|
|
if(!uni.getStorageSync("resolve")){
|
|
|
this.get_node_details(options);
|
|
this.get_node_details(options);
|
|
@@ -599,6 +606,7 @@ export default {
|
|
|
this.scrollPushList();
|
|
this.scrollPushList();
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
|
|
+ console.log(this.classIndex,'this.classIndex----')
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
scroll_bottom(){
|
|
scroll_bottom(){
|