Merge branch 'main' of git.njrzwl.cn:wangmingchuan/yanzong_qianduan

main
yangsai@163.com 7 months ago
commit 8eee6b94a0
  1. 2
      ext.json
  2. 138
      pages/goods/list.vue
  3. 54
      pages/invite/index.vue

@ -1,6 +1,6 @@
{
"extEnable": true,
"extAppid": "wxa3127ed5c3542a28",
"extAppid": "wx9f7e94fe11dc0c23",
"ext": {
"store_id": 10048
}

@ -3,68 +3,70 @@
<mescroll-body ref="mescrollRef" :sticky="true" @init="mescrollInit" :down="{ native: true,auto: false}"
@down="downCallback" :up="upOption" @up="upCallback">
<!-- 页面头部 -->
<view class="header">
<view class="search">
<search :tips="options.search ? options.search : '搜索商品'" @event="handleSearch" />
</view>
</view>
<view class="store-sort">
<template v-if="options.categoryId">
<view class="goodsban" v-if="tabbar && tabbar.length > 0">
<scroll-view class="typeList" scroll-x="true">
<view v-for="(item,index) in tabbar" :key="index" class="bandsImg" @click="onChage(item,1,index)"
:style="{'color':item.category_id==isBanrdActive?'#F43B21':'#5A5A5A','border':item.category_id==isBanrdActive?'1rpx solid #F22029':'1rpx solid #E7E7E7'}">
<image :src="item.image?item.image.external_url:''" mode="aspectFill"></image>
<view class="typeItem">{{item.name}}</view>
</view>
</scroll-view>
</view>
<view class="goodsType" v-if="goodsType && goodsType.length > 0">
<scroll-view class="typeList" scroll-x="true">
<view v-for="(item,index) in goodsType" :key="index" class="typeItem"
@click="onChage(item,2)"
:style="{'color':isActive==item.category_id?'#F43B21':'#5A5A5A','background':isActive==item.category_id?'#FEF6F6':'#F7F8FA','border':isActive==item.category_id?'2rpx solid #F22029':'none'}">
{{item.name}}
</view>
</scroll-view>
<view class="head">
<view class="header">
<view class="search">
<search :tips="options.search ? options.search : '搜索商品'" @event="handleSearch" />
</view>
</template>
<!-- 排序标签 -->
<view class="store-box">
<view class="sort-item" :class="{ active: sortType === 'all' }" @click="handleSortType('all')">
<text>综合</text>
</view>
<view class="sort-item" :class="{ active: sortType === 'sales' }" @click="handleSortType('sales')">
<text>销量</text>
</view>
<view class="sort-item sort-item-price" :class="{ active: sortType === 'price' }"
@click="handleSortType('price')">
<text>价格</text>
<view class="price-arrow">
<view class="icon up" :class="{ active: sortType === 'price' && !sortPrice }">
<u-icon name="arrow-up-fill"
:color="!sortPrice&&sortType === 'price'?'#F43B21':'#3C3C3C'" size="17"></u-icon>
</view>
<view class="icon down" :class="{ active: sortType === 'price' && sortPrice }">
<u-icon name="arrow-down-fill"
:color="sortPrice&&sortType === 'price'?'#F43B21':'#3C3C3C'" size="17"></u-icon>
</view>
<view class="store-sort">
<template v-if="options.categoryId">
<view class="goodsban" v-if="tabbar && tabbar.length > 0">
<scroll-view class="typeList" scroll-x="true">
<view v-for="(item,index) in tabbar" :key="index" class="bandsImg" @click="onChage(item,1,index)"
:style="{'color':item.category_id==isBanrdActive?'#F43B21':'#5A5A5A','border':item.category_id==isBanrdActive?'1rpx solid #F22029':'1rpx solid #E7E7E7'}">
<image :src="item.image?item.image.external_url:''" mode="aspectFill"></image>
<view class="typeItem">{{item.name}}</view>
</view>
</scroll-view>
</view>
<view class="goodsType" v-if="goodsType && goodsType.length > 0">
<scroll-view class="typeList" scroll-x="true">
<view v-for="(item,index) in goodsType" :key="index" class="typeItem"
@click="onChage(item,2)"
:style="{'color':isActive==item.category_id?'#F43B21':'#5A5A5A','background':isActive==item.category_id?'#FEF6F6':'#F7F8FA','border':isActive==item.category_id?'2rpx solid #F22029':'none'}">
{{item.name}}
</view>
</scroll-view>
</view>
</template>
<!-- 排序标签 -->
<view class="store-box">
<view class="sort-item" :class="{ active: sortType === 'all' }" @click="handleSortType('all')">
<text>综合</text>
</view>
<view class="sort-item" :class="{ active: sortType === 'sales' }" @click="handleSortType('sales')">
<text>销量</text>
</view>
<view class="sort-item sort-item-price" :class="{ active: sortType === 'price' }"
@click="handleSortType('price')">
<text>价格</text>
<view class="price-arrow">
<view class="icon up" :class="{ active: sortType === 'price' && !sortPrice }">
<u-icon name="arrow-up-fill"
:color="!sortPrice&&sortType === 'price'?'#F43B21':'#3C3C3C'" size="17"></u-icon>
</view>
<view class="icon down" :class="{ active: sortType === 'price' && sortPrice }">
<u-icon name="arrow-down-fill"
:color="sortPrice&&sortType === 'price'?'#F43B21':'#3C3C3C'" size="17"></u-icon>
</view>
</view>
</view>
<view class="sort-item" :class="{ active: sortType === 'city' }" @click="handleSortType('city')">
<picker mode="selector" @change="multiChange" value="{{multiIndex}}" :range="multiArray"
range-key="name">
<text>类型</text>
</picker>
</view>
<!-- <view class="show-view btnOpera" @click="handleShowView">
<text class="iconfont icon-view-tile" v-if="showView"></text>
<text class="iconfont icon-view-list" v-else></text>
</view> -->
</view>
<view class="sort-item" :class="{ active: sortType === 'city' }" @click="handleSortType('city')">
<picker mode="selector" @change="multiChange" value="{{multiIndex}}" :range="multiArray"
range-key="name">
<text>类型</text>
</picker>
</view>
<!-- <view class="show-view btnOpera" @click="handleShowView">
<text class="iconfont icon-view-tile" v-if="showView"></text>
<text class="iconfont icon-view-list" v-else></text>
</view> -->
</view>
</view>
<view class="blank"></view>
<!-- 商品列表 -->
<view class="goods-list clearfix" :class="['column-' + (showView ? '1' : '2')]">
<view v-if="showView">
@ -372,9 +374,10 @@
this.keyName2 = item.name
}
}
this.list.data = []
this.$refs.uWaterfall1.clear();
this.getGoodsList()
this.list.data = []
this.list = []
this.mescroll.resetUpScroll()
},
/**
* 上拉加载的回调 (页面初始化时也会执行一次)
@ -542,7 +545,18 @@
::v-deep .u-empty {
padding: 100rpx 0;
}
.head{
width: 100%;
overflow: hidden;
background-color: #fff;
position: fixed;
z-index: 99;
width: 100%;
left: 0;
}
.blank{
height: 416rpx;
}
//
.header {
background-color: #fff;
@ -572,12 +586,8 @@
//
.store-sort {
position: sticky;
top: var(--window-top);
background-color: #fff;
color: #000;
z-index: 99;
width: 100%;
.store-box {
display: flex;
padding: 20rpx 0;

@ -71,9 +71,9 @@
<!-- -->
<view class="invite-popup" v-if="isPopup">
<view class="popup">
<image class="bg" show-menu-by-longpress src="https://www.royaum.com.cn/static/3@2x.png"></image>
<image class="code" show-menu-by-longpress :src="qrcode"></image>
<view class="qrcode">{{userInfo.user_id}}</view>
<image class="bg" show-menu-by-longpress :src="qrcode1"></image>
<!-- <image class="code" show-menu-by-longpress :src="qrcode"></image>
<view class="qrcode">{{userInfo.user_id}}</view> -->
<view class="tips">
<view class="cancle" @click="download(1)">取消</view>
<view class="sure" @click="download(2)">保存到相册</view>
@ -95,6 +95,7 @@
export default {
data() {
return {
qrcode1: "",
qrcode: "",
userInfo: {},
backgroundBg: {
@ -161,21 +162,24 @@
success: function(res) {
// H5tempFilePath base64
console.log(res.tempFilePath)
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success(data) {
that.$success('保存成功')
},
fail(err) {
if (err.errMsg ===
'saveImageToPhotosAlbum:fail auth deny'
) {
that.$toast(
'请允许访问相册后重试 (右上角菜单 - 设置 - 相册)',
3000)
}
}
})
that.qrcode1 = res.tempFilePath;
that.isPopup = true;
ctx.clearRect(0,0,702,1248);
// uni.saveImageToPhotosAlbum({
// filePath: res.tempFilePath,
// success(data) {
// that.$success('')
// },
// fail(err) {
// if (err.errMsg ===
// 'saveImageToPhotosAlbum:fail auth deny'
// ) {
// that.$toast(
// '访 ( - - )',
// 3000)
// }
// }
// })
}
})
@ -230,8 +234,8 @@
} = await newFunApi.InviteUserPoster({});
if (status == 200) {
console.log(data)
this.isPopup = true;
this.qrcode = data.imageUrl
this.qrcode = data.imageUrl;
this.createImge();
}
},
download(type) {
@ -243,7 +247,8 @@
uni.showLoading({
title: '加载中'
})
this.createImge();
app.onSaveImage(app.qrcode1)
// this.createImge();
}
return;
uni.showLoading({
@ -331,7 +336,12 @@
url: "/pages/news/user/withdrawal?balance=" + this.userInfo.withdrawal_money
})
} else if (index == 3) {
this.InviteUserPoster();
if(!this.qrcode1){
this.InviteUserPoster();
}else{
this.isPopup = true;
}
} else if (index == 4) {
uni.navigateTo({
url: "/pages/invite/rule"

Loading…
Cancel
Save