From 599cbbfede5e74d928c987434844a74ce2002694 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期三, 11 二月 2026 15:00:57 +0800
Subject: [PATCH] 小程序
---
mini-program/pages.json | 2
mini-program/pagesA/pages/shop_points/shop_points.vue | 47 ++
mini-program/static/icon/defualt.png | 0
mini-program/utils/utils.js | 2
mini-program/pages/order/order.vue | 185 ++++++++++-
mini-program/App.vue | 70 ++++
mini-program/utils/http.interceptor.js | 1
mini-program/pages/distributor/distributor.vue | 139 ++++-----
mini-program/pagesA/pages/my-qualifications/my-qualifications.vue | 60 +++-
mini-program/pagesA/pages/order/order.vue | 213 +++++++++++--
mini-program/utils/http.api.js | 8
mini-program/pagesA/pages/my-membership/my-membership.vue | 119 +++++++
12 files changed, 669 insertions(+), 177 deletions(-)
diff --git a/mini-program/App.vue b/mini-program/App.vue
index 3c5fd55..0685b0a 100644
--- a/mini-program/App.vue
+++ b/mini-program/App.vue
@@ -175,4 +175,74 @@
}
}
}
+ .nomore{
+ margin-top: 30rpx;
+ width: 100%;
+ text-align: center;
+ font-size: 24rpx;
+ color: #666666;
+ }
+ .phone {
+ width: 100%;
+ padding-top: 40rpx;
+ box-sizing: border-box;
+ .phone-botton {
+ width: 100%;
+ height: 88rpx;
+ line-height: 88rpx;
+ text-align: center;
+ font-weight: 500;
+ font-size: 32rpx;
+ color: #FFFFFF;
+ background: #00BC12;
+ border-radius: 44rpx;
+ margin-top: 60rpx;
+ }
+ .phone-head {
+ width: 100%;
+ text-align: center;
+ justify-content: space-between;
+ margin-bottom: 40rpx;
+ text {
+ font-weight: 800;
+ font-size: 32rpx;
+ color: #222222;
+ }
+ }
+
+ .phone-item {
+ width: 100%;
+ text-align: center;
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+ // border-bottom: 1rpx solid #eeeeee;
+ line-height: 78rpx;
+ button{
+ border: 1rpx white solid;
+ display: inline;
+ width: 300rpx;
+ font-weight: 500;
+ font-size: 32rpx;
+ line-height: 32rpx;
+ color: #222222;
+ }
+ image{
+ width: 28rpx;
+ height: 28rpx;
+ margin-right: 30rpx;
+ }
+ .line{
+ width: 100%;
+ height: 1rpx;
+ background-color: #f2f2f2
+ }
+ text {
+ font-weight: 500;
+ font-size: 28rpx;
+ line-height: 28rpx;
+ color: #222222;
+ }
+ }
+ }
</style>
\ No newline at end of file
diff --git a/mini-program/pages.json b/mini-program/pages.json
index 7ee7b3e..a525c57 100644
--- a/mini-program/pages.json
+++ b/mini-program/pages.json
@@ -282,7 +282,7 @@
"path" : "pages/rich-text-page/rich-text-page",
"style" :
{
- "navigationBarTitleText" : "瀵屾枃鏈〉闈�"
+ "navigationBarTitleText" : "璇︽儏"
}
}
]
diff --git a/mini-program/pages/distributor/distributor.vue b/mini-program/pages/distributor/distributor.vue
index c4d8cc0..1be13b2 100644
--- a/mini-program/pages/distributor/distributor.vue
+++ b/mini-program/pages/distributor/distributor.vue
@@ -23,7 +23,7 @@
</view>
</view>
</view>
- <view class="user-qrcode">
+ <view class="user-qrcode" @click="openQrcode()">
<image src="/static/icon/ic_QRcode@2x.png" mode="widthFix"></image>
</view>
</view>
@@ -74,15 +74,15 @@
</view>
</view>
<view class="func">
- <view class="func-item" style="margin-bottom: 30rpx;">
+ <view class="func-item" style="margin-bottom: 30rpx;" @click="jumpGoodsList">
<image src="/static/icon/ic_shangpingl@2x.png" mode="widthFix"></image>
<text>鍟嗗搧绠$悊</text>
</view>
- <view class="func-item" style="margin-bottom: 30rpx;">
+ <view class="func-item" style="margin-bottom: 30rpx;" @click="jumpOrderList">
<image src="/static/icon/ic_dingdanguanli@2x.png" mode="widthFix"></image>
<text>璁㈠崟绠$悊</text>
</view>
- <view class="func-item" style="margin-bottom: 30rpx;">
+ <view class="func-item" style="margin-bottom: 30rpx;" @click="jumpAccount">
<image src="/static/icon/ic_xunizhanghu@2x.png" mode="widthFix"></image>
<text>铏氭嫙璐﹀彿</text>
</view>
@@ -90,15 +90,15 @@
<image src="/static/icon/ic_zitihexiao@2x.png" mode="widthFix"></image>
<text>鑷彁鏍搁攢</text>
</view>
- <view class="func-item">
+ <view class="func-item" @click="jumpZizhi">
<image src="/static/icon/ic_wodezizhi@2x.png" mode="widthFix"></image>
<text>鎴戠殑璧勮川</text>
</view>
- <view class="func-item">
+ <view class="func-item" @click="jumpMemberList">
<image src="/static/icon/ic_wodehuiyuan@2x.png" mode="widthFix"></image>
<text>鎴戠殑浼氬憳</text>
</view>
- <view class="func-item">
+ <view class="func-item" @click="openHaibao">
<image src="/static/icon/ic_zhuanshuhaibao@2x.png" mode="widthFix"></image>
<text>涓撳睘娴锋姤</text>
</view>
@@ -192,13 +192,23 @@
</view> -->
<view class="phone-item" >
<view>
- <image src="/static/icon/ic_call@2x.png" mode="widthFix" @click="contactPhoneDo()"></image>
+ <image src="/static/icon/ic_call@2x.png" mode="widthFix" @click="contactPhoneDo()" ></image>
<text>{{linkItem.linkname}} </text>
<text style="margin-left: 10px;"> {{linkItem.linkphone}}</text>
</view>
</view>
<view style="width: 100%; height: 30rpx;"></view>
<!-- <view class="phone-botton" @click="contactPhone()" >鍏抽棴</view> -->
+ </view>
+ </u-popup>
+ <u-popup :show="showQrcode" round="15" :safeAreaInsetBottom="false" mode="center" @close="openQrcode()" >
+ <view class="qrcode" >
+ <image :src="shop.programCode||''" mode="widthFix"></image>
+ </view>
+ </u-popup>
+ <u-popup :show="showHaibao" round="15" :safeAreaInsetBottom="false" mode="bottom" @close="openHaibao()" >
+ <view class="qrcode" >
+ <image :src="shop.programCode||''" mode="widthFix"></image>
</view>
</u-popup>
</view>
@@ -213,6 +223,8 @@
data() {
return {
show:false,
+ showHaibao:false,
+ showQrcode:false,
active:0,
loading:false,
showMoney:false,
@@ -240,6 +252,16 @@
this.getOrderList( );
},
methods:{
+ openQrcode(){
+ if(this.shop.programCode){
+ this.showQrcode = !this.showQrcode
+ }
+ },
+ openHaibao(){
+ if(this.shop.programCode){
+ this.showHaibao = !this.showHaibao
+ }
+ },
contactPhone(item){
this.showPhone = !this.showPhone
this.linkItem = item ||{}
@@ -333,6 +355,31 @@
url: '/pages/login/login'
})
},
+ jumpZizhi() {
+ uni.navigateTo({
+ url: '/pagesA/pages/my-qualifications/my-qualifications'
+ })
+ },
+ jumpGoodsList() {
+ uni.navigateTo({
+ url: '/pagesA/pages/product-management/product-management'
+ })
+ },
+ jumpOrderList() {
+ uni.navigateTo({
+ url: '/pagesA/pages/order/order'
+ })
+ },
+ jumpAccount() {
+ uni.navigateTo({
+ url: '/pagesA/pages/virtual-account/virtual-account'
+ })
+ },
+ jumpMemberList() {
+ uni.navigateTo({
+ url: '/pagesA/pages/my-membership/my-membership'
+ })
+ },
jumpShopIntegral() {
uni.navigateTo({
url: '/pagesA/pages/shop_points/shop_points'
@@ -398,12 +445,6 @@
width: 100%;
margin-top: 30rpx;
padding-bottom: 60rpx;
- .nomore{
- width: 100%;
- text-align: center;
- font-size: 24rpx;
- color: #666666;
- }
.list-item {
width: 100%;
padding: 30rpx;
@@ -768,68 +809,14 @@
}
}
}
- .phone {
- width: 100%;
- padding-top: 40rpx;
- box-sizing: border-box;
- .phone-botton {
- width: 100%;
- height: 88rpx;
- line-height: 88rpx;
- text-align: center;
- font-weight: 500;
- font-size: 32rpx;
- color: #FFFFFF;
- background: #00BC12;
- border-radius: 44rpx;
- margin-top: 60rpx;
- }
- .phone-head {
- width: 100%;
- text-align: center;
- justify-content: space-between;
- margin-bottom: 40rpx;
- text {
- font-weight: 800;
- font-size: 32rpx;
- color: #222222;
- }
- }
-
- .phone-item {
- width: 100%;
- text-align: center;
- display: flex;
- justify-content: center;
- flex-direction: column;
- // border-bottom: 1rpx solid #eeeeee;
- line-height: 78rpx;
- button{
- border: 1rpx white solid;
- display: inline;
- width: 300rpx;
- font-weight: 500;
- font-size: 32rpx;
- line-height: 32rpx;
- color: #222222;
- }
- image{
- width: 28rpx;
- height: 28rpx;
- margin-right: 30rpx;
- }
- .line{
- width: 100%;
- height: 1rpx;
- background-color: #f2f2f2
- }
- text {
- font-weight: 500;
- font-size: 28rpx;
- line-height: 28rpx;
- color: #222222;
- }
- }
+ }
+ .qrcode{
+ width: calc(100vw - 148rpx);
+ height: calc(100vw - 148rpx);
+ padding: 20px;
+ image{
+ width: calc(100vw - 188rpx);
+ height: calc(100vw - 188rpx);
}
}
</style>
\ No newline at end of file
diff --git a/mini-program/pages/order/order.vue b/mini-program/pages/order/order.vue
index 69a96b0..5fddb64 100644
--- a/mini-program/pages/order/order.vue
+++ b/mini-program/pages/order/order.vue
@@ -1,62 +1,115 @@
<template>
<view class="box">
<view class="cate">
- <view @click="changeRow(index)" :class="i === index ? 'cate-item active' : 'cate-item'" v-for="(item, index) in cate" :key="index">
+ <view @click="changeRow(index)" :class="active === index ? 'cate-item active' : 'cate-item'" v-for="(item, index) in cate" :key="'cate_'+index">
{{item.name}}
- <view class="cate-item-xiab" v-if="i === index"></view>
+ <view class="cate-item-xiab" v-if="active === index"></view>
</view>
</view>
<view class="list">
- <view class="list-item" v-for="(item, index) in 5" :key="index">
+ <view class="list-item" v-for="(item, index) in dataList" :key="index">
<view class="a">
<view class="a-left">
- <view class="a-left-tips">鑷彁</view>
- <text>榧庡厓鍐滄満涓�鍙风粡閿�鍟�</text>
+ <view class="a-left-tips">{{item.receiveType==1?'鑷彁':'蹇�掗厤閫�'}}</view>
+ <text>璁㈠崟鍙凤細{{item.id}}</text>
</view>
- <view class="a-right">寰呮敮浠�</view>
+ <text v-if="item.status ==0" class="a-right">寰呮敮浠�</text>
+ <text v-if="item.status ==1" class="a-right">{{item.receiveType==1?'寰呰嚜鎻�':'寰呭彂璐�'}}</text>
+ <text v-if="item.status ==2" class="a-right">寰呮敹璐�</text>
+ <text v-if="item.status ==3" class="a-right grey">浜ゆ槗瀹屾垚</text>
+ <text v-if="item.status ==4" class="a-right grey">宸插彇娑�</text>
+ <text v-if="item.status ==6" class="a-right grey">宸查��娆�</text>
</view>
<view class="b">
- <view class="b-item">
+ <view class="b-item" v-for="(item1, index1) in (item.goodsorderDetailList||[])">
<view class="b-item-image">
- <image src="/static/logo.png" mode="widthFix"></image>
+ <image :src="item1.imgurl||'/static/logo.png'" mode="widthFix"></image>
</view>
- <view class="b-item-title">涓仈鑹剧瀹介娇 閫傜敤闆锋矁/涓仈/涔呬繚鐢�</view>
+ <view class="b-item-title">{{item1.name||''}}</view>
<view class="b-item-jia">
- <text>楼499.00</text>
- <text>x1</text>
+ <text>楼{{(item1.price||0).toFixed(2)}}</text>
+ <text>x{{item1.goodsNum||0}}</text>
+ </view>
+ </view>
+ <view class="b-item" v-for="(item1, index1) in (item.goodsorderDetailList||[])">
+ <view class="b-item-image">
+ <image :src="item1.imgurl||'/static/logo.png'" mode="widthFix"></image>
+ </view>
+ <view class="b-item-title">{{item1.name||''}}</view>
+ <view class="b-item-jia">
+ <text>楼{{(item1.price||0).toFixed(2)}}</text>
+ <text>x{{item1.goodsNum||0}}</text>
</view>
</view>
</view>
<view class="c">
<view class="c-label">
- <view class="c-label-title">闇�浠樻锛�</view>
+ <view class="c-label-title">瀹炰粯娆撅細</view>
<view class="c-label-price">
- <text>998</text>
- <text>.00</text>
+ <text>{{(item.price||0).toFixed(2)}}</text>
+ <text></text>
</view>
</view>
<view class="c-btns">
- <view class="c-btns-item">鍙栨秷璁㈠崟</view>
- <view class="c-btns-item blue">绔嬪嵆鏀粯</view>
+ <view class="c-btns-item blue" @click="contactPhone(item)">鑱旂郴缁忛攢鍟�</view>
+ <view class="c-btns-item bg" >鑷彁鐮�</view>
</view>
</view>
+ <view class="d" v-if="item.memberInfo">
+ 璁㈠崟澶囨敞锛歿{item.memberInfo||''}}
+ </view>
</view>
+ <view v-if="!hasNext" class="nomore">宸插姞杞藉叏閮�</view>
</view>
+ <u-popup :show="showPhone" round="15" mode="bottom" :safeAreaInsetBottom="true" @close="contactPhone()" :closeable="true" :closeOnClickOverlay="true">
+ <view class="phone">
+ <view class="phone-head">
+ <view></view>
+ <text>鑱旂郴瀹㈡埛</text>
+ </view>
+ <!-- <view class="phone-item">
+ <view>
+ <image style="width: 36rpx;height: 36rpx" src="/static/icon/ic_kefu.png" mode="widthFix"></image>
+ <button open-type="contact" plain="true" bindcontact="handleContact">鍦ㄧ嚎瀹㈡湇</button>
+ </view>
+ <view class="line" v-if="serverPhone && serverPhone.length"></view>
+ </view> -->
+ <view class="phone-item" >
+ <view>
+ <image src="/static/icon/ic_call@2x.png" mode="widthFix" @click="contactPhoneDo()" ></image>
+ <text>{{linkItem.linkname}} </text>
+ <text style="margin-left: 10px;"> {{linkItem.linkphone}}</text>
+ </view>
+ </view>
+ <view style="width: 100%; height: 30rpx;"></view>
+ <!-- <view class="phone-botton" @click="contactPhone()" >鍏抽棴</view> -->
+ </view>
+ </u-popup>
</view>
</template>
<script>
+ import { mapState } from 'vuex'
export default {
+ computed: {
+ ...mapState(['navHeight', 'statusbarHeight','userInfo', 'token'])
+ },
data() {
return {
i: '',
+ active:0,
+ loading:false,
+ currentPage:1,
+ total:0,
+ hasNext:true,
+ dataList:[],
+ linkItem:{},
cate: [
{ name: '鍏ㄩ儴', id: '' },
{ name: '寰呮敮浠�', id: 0 },
- { name: '寰呭彂璐�/鑷彁', id: 1 },
- { name: '寰呮敹璐�', id: 2 },
- ],
- list: []
+ { name: '寰呭彂璐�/鑷彁', id: 1 ,
+ { name: '寰呮敹璐�', id: 2 }
+ ]
};
},
onLoad(options) {
@@ -64,9 +117,80 @@
this.i = Number(options.status)
}
},
+ onShow() {
+ this.shop ={}
+ this.checkUserLogin()
+ this.shop = this.shopInfo || {}
+ this.getFirstPageData()
+ },
+ onReachBottom(){
+ this.getDataList();
+ },
methods: {
+ contactPhone(item){
+ this.showPhone = !this.showPhone
+ this.linkItem = item ||{}
+ console.log("==================================",this.showPhone)
+ },
+ contactPhoneDo(){
+ if(this.linkItem.linkphone !=null && this.linkItem.linkphone!=''){
+ uni.makePhoneCall({
+ phoneNumber: this.linkItem.linkphone
+ })
+ }
+ },
changeRow(index) {
+ this.active=index
this.i = this.cate[index].id
+ this.getFirstPageData()
+ },
+ getFirstPageData(){
+ this.currentPage = 0
+ this.hasNext=true
+ this.total=0
+ this.dataList=[]
+ this.getDataList()
+ },
+ async getDataList(){
+ if(this.loading || !this.hasNext){
+ return
+ }
+ this.loading=true
+ this.currentPage = this.currentPage+1
+ if(this.currentPage == 1){
+ this.hasNext =true
+ this.dataList=[]
+ }
+ var that =this
+ let res = await that.$u.api.orderPage({
+ capacity:10,
+ model: {
+ orderStatus: this.i
+ },
+ page:this.currentPage
+ });
+ console.log(res)
+ if (res.code === 200 ) {
+ if ( res.data && res.data.page ===this.currentPage) {
+ res.data.records = res.data.records||[]
+ that.dataList.push(...res.data.records)
+ that.total=res.data.total
+ if( this.currentPage >= res.data.pageCount||0){
+ that.hasNext=false
+ }else{
+ that.hasNext=true
+ }
+ }
+ }
+ this.loading=false
+ },
+ checkUserLogin(){
+ var that =this
+ if( this.userInfo ==null || this.userInfo.id==null || this.token==null || this.token==''){
+ uni.navigateTo({
+ url: '/pages/index/index'
+ })
+ }
}
}
}
@@ -82,6 +206,7 @@
.list {
width: 100%;
padding: 22rpx 30rpx;
+ padding-bottom: 60rpx;
box-sizing: border-box;
.list-item {
width: 100%;
@@ -123,10 +248,12 @@
font-size: 26rpx;
color: #E4001D;
}
+ .grey{
+ color: #999999 !important;
+ }
}
.b {
width: 100%;
- height: 136rpx;
display: flex;
flex-direction: column;
margin-top: 22rpx;
@@ -158,6 +285,10 @@
font-size: 30rpx;
color: #222222;
margin-right: 30rpx;
+ display: -webkit-box;
+ -webkit-line-clamp: 2; /* 闄愬埗鏂囨湰涓�2琛� */
+ -webkit-box-orient: vertical;
+ overflow: hidden;
}
.b-item-jia {
flex-shrink: 0;
@@ -224,6 +355,18 @@
border: 1rpx solid #004096;
color: #004096 !important;
}
+ .bg{
+ background: #004096;
+ border-radius: 34rpx;
+ border: 1rpx solid #004096;
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #FFFFFF !important;
+ line-height: 40rpx;
+ text-align: center;
+ font-style: normal;
+ }
.c-btns-item {
padding: 0 24rpx;
box-sizing: border-box;
diff --git a/mini-program/pagesA/pages/my-membership/my-membership.vue b/mini-program/pagesA/pages/my-membership/my-membership.vue
index 2b26c80..c9f8023 100644
--- a/mini-program/pagesA/pages/my-membership/my-membership.vue
+++ b/mini-program/pagesA/pages/my-membership/my-membership.vue
@@ -4,56 +4,148 @@
<u-search
placeholder="鎼滅储浼氬憳鏄电О/鎵嬫満鍙�"
:showAction="false"
+ @search="getFirstPageData()"
bgColor="#F8F9FB"
placeholderColor="#999999"
searchIconSize="28"
height="36"
- v-model="keyword" />
+ v-model="memberInfo" />
<view class="head-cate">
<view class="head-cate-item">
- <text class="num">5,323</text>
+ <text class="num">{{totalAll}}</text>
<text class="title">浼氬憳鎬绘暟</text>
</view>
<view class="head-cate-item">
- <text class="num">3,289</text>
+ <text class="num">{{countData.orderNum||0}}</text>
<text class="title">璁㈠崟鎬绘暟</text>
</view>
<view class="head-cate-item">
<view class="price">
- <text>5,323</text>
- <text>.00</text>
+ <text>{{countData.saleTotalNum||0}}</text>
+ <text>{{countData.saleTotalFloat||'.00'}}</text>
</view>
<text class="title">璁㈠崟閲戦</text>
</view>
</view>
</view>
<view class="list">
- <view class="list-item">
+ <view class="list-item" v-for="(item,index) in dataList">
<view class="tx">
- <image src="/static/logo.png" mode="widthFix"></image>
+ <image :src="item.imgFullUrl?item.imgFullUrl:'/static/icon/defualt.png'" mode="widthFix"></image>
</view>
<view class="info">
<view class="info-a">
- <text>鏉庡┓骞�</text>
- <text>1815****5556</text>
+ <text>{{item.name || item.nickname || ''}}</text>
+ <text>{{item.phone || ''}}</text>
</view>
- <view class="info-date">鍏宠仈鏃堕棿锛�2024-04-18 19:29:01</view>
- <view class="info-num">
+ <view class="info-date">鍏宠仈鏃堕棿锛歿{item.bindShopDate || ''}}</view>
+ <!-- <view class="info-num">
<text>璁㈠崟閲忥細3</text>
<text>璁㈠崟閲戦锛毬�3678.00</text>
- </view>
+ </view> -->
</view>
</view>
+ <view v-if="!hasNext" class="nomore">宸插姞杞藉叏閮�</view>
</view>
</view>
</template>
<script>
+ import { mapState } from 'vuex'
export default {
+ computed: {
+ ...mapState(['navHeight', 'statusbarHeight','shopInfo', 'shopToken'])
+ },
data() {
return {
-
+ memberInfo:'',
+ shop:{},
+ currentPage:1,
+ totalAll:0,
+ total:0,
+ hasNext:true,
+ dataList:[],
+ countData:{},
};
+ },
+ onShow() {
+ this.shop ={}
+ this.checkShopLogin()
+ this.shop = this.shopInfo || {}
+ this.getFirstPageData()
+ this.getCountData()
+ },
+ onReachBottom(){
+ this.getDataList( );
+ },
+ methods:{
+ async getCountData(index){
+ var that =this
+ let res = await that.$u.api.saleReport({tokenType:1 })
+ if (res.code === 200) {
+ this.active = index
+ this.countData = res.data
+ this.countData.profitTotal = (this.countData.profitTotal||0.00 ).toFixed(2)
+ this.countData.saleTotal = (this.countData.saleTotal||0.00).toFixed(2)
+ this.countData.profitTotalNum = Math.floor(this.countData.profitTotal)
+ this.countData.saleTotalNum = Math.floor( this.countData.saleTotal)
+ var t1 =(this.countData.profitTotal - this.countData.profitTotalNum).toFixed(2)
+ var t2 =(this.countData.saleTotal - this.countData.saleTotalNum).toFixed(2)
+ this.countData.profitTotalFloat =( t1+'').slice(1, 4)
+ this.countData.saleTotalFloat = ( t2+'').slice(1, 4)
+ }
+ },
+ getFirstPageData(){
+ this.currentPage = 0
+ this.hasNext=true
+ this.total=0
+ this.dataList=[]
+ this.getDataList()
+ },
+ async getDataList(){
+ if(this.loading || !this.hasNext){
+ return
+ }
+ this.loading=true
+ this.currentPage = this.currentPage+1
+ if(this.currentPage == 1){
+ this.hasNext =true
+ this.dataList=[]
+ }
+ var that =this
+ let res = await that.$u.api.myCustomer({
+ capacity:10,
+ model: {
+ memberInfo: this.memberInfo
+ },
+ page:this.currentPage
+ });
+ console.log(res)
+ if (res.code === 200 ) {
+ if(res.data && this.memberInfo ==''&&this.currentPage==1){
+ this.totalAll = res.data.total||0
+ }
+ if ( res.data && res.data.page ===this.currentPage) {
+ res.data.records = res.data.records||[]
+ that.dataList.push(...res.data.records)
+ that.total=res.data.total
+ if( this.currentPage >= res.data.pageCount||0){
+ that.hasNext=false
+ }else{
+ that.hasNext=true
+ }
+ }
+ }
+ this.loading=false
+ },
+ checkShopLogin(){
+ var that =this
+ if( this.shopInfo ==null || this.shopInfo.id==null || this.shopToken==null || this.shopToken==''){
+ uni.navigateTo({
+ url: '/pages/login/login'
+ })
+ }
+ }
}
}
</script>
@@ -130,6 +222,7 @@
margin-top: 20rpx;
background-color: #ffffff;
padding: 0 30rpx;
+ padding-bottom: 60rpx;
box-sizing: border-box;
.list-item {
width: 100%;
diff --git a/mini-program/pagesA/pages/my-qualifications/my-qualifications.vue b/mini-program/pagesA/pages/my-qualifications/my-qualifications.vue
index 74222d4..941b1dd 100644
--- a/mini-program/pagesA/pages/my-qualifications/my-qualifications.vue
+++ b/mini-program/pagesA/pages/my-qualifications/my-qualifications.vue
@@ -3,32 +3,32 @@
<view class="box-info">
<view class="shop">
<view class="shop-image">
- <image src="/static/logo.png" mode="widthFix"></image>
+ <image v-if="shop.imgurl" @click="previewImage(shop.imgurl)" :src="shop.imgurl" mode="widthFix"></image>
</view>
<view class="shop-info">
- <text>榧庡厓鍐滄満涓�鍙风粡閿�鍟�</text>
- <text>鑱旂郴浜猴細鍚翠功涓�</text>
- <text>鑱旂郴鐢佃瘽锛�0551-676763678</text>
+ <text>{{shop.name || ''}}</text>
+ <text>鑱旂郴浜猴細{{shop.realname || ''}}</text>
+ <text>鑱旂郴鐢佃瘽锛歿{shop.phone || ''}}</text>
</view>
</view>
<view class="xian"></view>
<view class="info">
<view class="info-item">
<view class="info-item-label">钀ヤ笟鏃堕棿锛�</view>
- <view class="info-item-val">鍛ㄤ竴鑷冲懆浜� 09:30-17:00</view>
+ <view class="info-item-val">鍛ㄤ竴鑷冲懆浜� {{shop.startTime || ''}}</view>
</view>
<view class="info-item">
<view class="info-item-label">鐪佸競鍖猴細</view>
- <view class="info-item-val">瀹夊窘鐪佸悎鑲ュ競缁忔祹鎶�鏈紑鍙戝尯</view>
+ <view class="info-item-val">{{(shop.areas.provinceName||'') + (shop.areas.cityName||'') + (shop.areas.name||'')}}</view>
</view>
<view class="info-item">
<view class="info-item-label">闂ㄥ簵鍦板潃锛�</view>
- <view class="info-item-val">鑾茶姳璺�200鍙疯幉鑺变骇涓氬洯F鏍�401</view>
+ <view class="info-item-val">{{shop.addr || ''}}</view>
</view>
<view class="info-item">
<view class="info-item-label">钀ヤ笟鎵х収锛�</view>
<view class="info-item-image">
- <image src="/static/logo.png" mode="widthFix"></image>
+ <image v-if="shop.businessImg" @click="previewImage(shop.businessImg)" :src="shop.businessImg" mode="widthFix"></image>
</view>
</view>
</view>
@@ -38,20 +38,20 @@
<view class="info">
<view class="info-item">
<view class="info-item-label">娉曚汉濮撳悕锛�</view>
- <view class="info-item-val">寮犲厜瀹�</view>
+ <view class="info-item-val">{{shop.legalPersonName || ''}}</view>
</view>
<view class="info-item">
<view class="info-item-label">娉曚汉鐢佃瘽锛�</view>
- <view class="info-item-val">181554462589</view>
+ <view class="info-item-val">{{shop.legalPersonPhone||''}}</view>
</view>
<view class="info-item">
<view class="info-item-label">韬唤璇侊細</view>
<view class="info-item-list">
- <view class="info-item-list-image">
- <image src="/static/logo.png" mode="widthFix"></image>
+ <view class="info-item-list-image" v-if="shop.idcardImg" >
+ <image :src="shop.idcardImg" mode="widthFix" @click="previewImage(shop.idcardImg)"></image>
</view>
- <view class="info-item-list-image">
- <image src="/static/logo.png" mode="widthFix"></image>
+ <view class="info-item-list-image" v-if="shop.idcardImgBack">
+ <image :src="shop.idcardImgBack" @click="previewImage(shop.idcardImgBack)" mode="widthFix"></image>
</view>
</view>
</view>
@@ -61,11 +61,41 @@
</template>
<script>
+ import { mapState } from 'vuex'
export default {
+ computed: {
+ ...mapState(['navHeight', 'statusbarHeight','shopInfo', 'shopToken'])
+ },
data() {
return {
-
+ shop:{}
};
+ },
+ onShow() {
+ this.shop ={}
+ this.checkShopLogin()
+ this.shop = this.shopInfo || {}
+ },
+ methods:{
+ previewImage (url) {
+ if (url) {
+ uni.previewImage({
+ urls:[url]
+ })
+ }
+ },
+ async checkShopLogin(){
+ var that =this
+ if( this.shopInfo ==null || this.shopInfo.id==null || this.shopToken==null || this.shopToken==''){
+ uni.navigateTo({
+ url: '/pages/login/login'
+ })
+ }
+ let res = await that.$u.api.getShopInfo({tokenType:1 })
+ if (res.code === 200) {
+ that.shop = res.data
+ }
+ }
}
}
</script>
diff --git a/mini-program/pagesA/pages/order/order.vue b/mini-program/pagesA/pages/order/order.vue
index 9db8856..2149f3b 100644
--- a/mini-program/pagesA/pages/order/order.vue
+++ b/mini-program/pagesA/pages/order/order.vue
@@ -1,60 +1,199 @@
<template>
<view class="box">
<view class="cate">
- <view @click="i = index" :class="i === index ? 'cate-item active' : 'cate-item'" v-for="(item, index) in list" :key="index">
- {{item}}
- <view class="cate-item-xiab" v-if="i === index"></view>
+ <view @click="changeRow(index)" :class="active === index ? 'cate-item active' : 'cate-item'" v-for="(item, index) in cate" :key="'cate_'+index">
+ {{item.name}}
+ <view class="cate-item-xiab" v-if="active === index"></view>
</view>
</view>
<view class="list">
- <view class="list-item" v-for="(item, index) in 5" :key="index">
+ <view class="list-item" v-for="(item, index) in dataList" :key="index">
<view class="a">
<view class="a-left">
- <view class="a-left-tips">鑷彁</view>
- <text>榧庡厓鍐滄満涓�鍙风粡閿�鍟�</text>
+ <view class="a-left-tips">{{item.receiveType==1?'鑷彁':'蹇�掗厤閫�'}}</view>
+ <text>璁㈠崟鍙凤細{{item.id}}</text>
</view>
- <view class="a-right">寰呬粯娆撅細</view>
+ <text v-if="item.status ==0" class="a-right">寰呮敮浠�</text>
+ <text v-if="item.status ==1" class="a-right">{{item.receiveType==1?'寰呰嚜鎻�':'寰呭彂璐�'}}</text>
+ <text v-if="item.status ==2" class="a-right">寰呮敹璐�</text>
+ <text v-if="item.status ==3" class="a-right grey">浜ゆ槗瀹屾垚</text>
+ <text v-if="item.status ==4" class="a-right grey">宸插彇娑�</text>
+ <text v-if="item.status ==6" class="a-right grey">宸查��娆�</text>
</view>
<view class="b">
- <view class="b-item">
+ <view class="b-item" v-for="(item1, index1) in (item.goodsorderDetailList||[])">
<view class="b-item-image">
- <image src="/static/logo.png" mode="widthFix"></image>
+ <image :src="item1.imgurl||'/static/logo.png'" mode="widthFix"></image>
</view>
- <view class="b-item-title">涓仈鑹剧瀹介娇 閫傜敤闆锋矁/涓仈/涔呬繚鐢�</view>
+ <view class="b-item-title">{{item1.name||''}}</view>
<view class="b-item-jia">
- <text>楼499.00</text>
- <text>x1</text>
+ <text>楼{{(item1.price||0).toFixed(2)}}</text>
+ <text>x{{item1.goodsNum||0}}</text>
+ </view>
+ </view>
+ <view class="b-item" v-for="(item1, index1) in (item.goodsorderDetailList||[])">
+ <view class="b-item-image">
+ <image :src="item1.imgurl||'/static/logo.png'" mode="widthFix"></image>
+ </view>
+ <view class="b-item-title">{{item1.name||''}}</view>
+ <view class="b-item-jia">
+ <text>楼{{(item1.price||0).toFixed(2)}}</text>
+ <text>x{{item1.goodsNum||0}}</text>
</view>
</view>
</view>
<view class="c">
<view class="c-label">
- <view class="c-label-title">闇�浠樻锛�</view>
+ <view class="c-label-title">瀹炰粯娆撅細</view>
<view class="c-label-price">
- <text>998</text>
- <text>.00</text>
+ <text>{{(item.price||0).toFixed(2)}}</text>
+ <text></text>
</view>
</view>
<view class="c-btns">
- <view class="c-btns-item blue">鑱旂郴瀹㈡埛</view>
- <view class="c-btns-item bluebg">鑷彁鏍搁攢</view>
+ <view class="c-btns-item blue" @click="contactPhone(item)">鑱旂郴瀹㈡埛</view>
+ <view class="c-btns-item bg" v-if="item.status==1 && item.receiveType==1">鑷彁鏍搁攢</view>
</view>
</view>
- <view class="d">
- 璁㈠崟澶囨敞锛�11鏈�22鏃ユ潵鎷�
+ <view class="d" v-if="item.memberInfo">
+ 璁㈠崟澶囨敞锛歿{item.memberInfo||''}}
</view>
</view>
+ <view v-if="!hasNext" class="nomore">宸插姞杞藉叏閮�</view>
</view>
+ <u-popup :show="showPhone" round="15" mode="bottom" :safeAreaInsetBottom="true" @close="contactPhone()" :closeable="true" :closeOnClickOverlay="true">
+ <view class="phone">
+ <view class="phone-head">
+ <view></view>
+ <text>鑱旂郴瀹㈡埛</text>
+ </view>
+ <!-- <view class="phone-item">
+ <view>
+ <image style="width: 36rpx;height: 36rpx" src="/static/icon/ic_kefu.png" mode="widthFix"></image>
+ <button open-type="contact" plain="true" bindcontact="handleContact">鍦ㄧ嚎瀹㈡湇</button>
+ </view>
+ <view class="line" v-if="serverPhone && serverPhone.length"></view>
+ </view> -->
+ <view class="phone-item" >
+ <view>
+ <image src="/static/icon/ic_call@2x.png" mode="widthFix" @click="contactPhoneDo()" ></image>
+ <text>{{linkItem.linkname}} </text>
+ <text style="margin-left: 10px;"> {{linkItem.linkphone}}</text>
+ </view>
+ </view>
+ <view style="width: 100%; height: 30rpx;"></view>
+ <!-- <view class="phone-botton" @click="contactPhone()" >鍏抽棴</view> -->
+ </view>
+ </u-popup>
</view>
</template>
<script>
+ import { mapState } from 'vuex'
export default {
+ computed: {
+ ...mapState(['navHeight', 'statusbarHeight','shopInfo', 'shopToken'])
+ },
data() {
return {
- i: 0,
- list: ['鍏ㄩ儴', '寰呮敮浠�', '寰呰嚜鎻�']
+ i: '',
+ active:0,
+ showPhone:false,
+ loading:false,
+ currentPage:1,
+ total:0,
+ hasNext:true,
+ dataList:[],
+ shop:{},
+ linkItem:{},
+ cate: [
+ { name: '鍏ㄩ儴', id: '' },
+ { name: '寰呮敮浠�', id: 0 },
+ { name: '寰呭彂璐�/鑷彁', id: 1 }
+ ]
};
+ },
+ onLoad(options) {
+ if (options.status) {
+ this.i = Number(options.status)
+ }
+ },
+ onShow() {
+ this.shop ={}
+ this.checkShopLogin()
+ this.shop = this.shopInfo || {}
+ this.getFirstPageData()
+ },
+ onReachBottom(){
+ this.getDataList();
+ },
+ methods: {
+ contactPhone(item){
+ this.showPhone = !this.showPhone
+ this.linkItem = item ||{}
+ console.log("==================================",this.showPhone)
+ },
+ contactPhoneDo(){
+ if(this.linkItem.linkphone !=null && this.linkItem.linkphone!=''){
+ uni.makePhoneCall({
+ phoneNumber: this.linkItem.linkphone
+ })
+ }
+ },
+ changeRow(index) {
+ this.active=index
+ this.i = this.cate[index].id
+ this.getFirstPageData()
+ },
+ getFirstPageData(){
+ this.currentPage = 0
+ this.hasNext=true
+ this.total=0
+ this.dataList=[]
+ this.getDataList()
+ },
+ async getDataList(){
+ if(this.loading || !this.hasNext){
+ return
+ }
+ this.loading=true
+ this.currentPage = this.currentPage+1
+ if(this.currentPage == 1){
+ this.hasNext =true
+ this.dataList=[]
+ }
+ var that =this
+ let res = await that.$u.api.shopOrderPage({
+ capacity:10,
+ model: {
+ receiveType: 1,
+ status: this.i
+ },
+ page:this.currentPage
+ });
+ console.log(res)
+ if (res.code === 200 ) {
+ if ( res.data && res.data.page ===this.currentPage) {
+ res.data.records = res.data.records||[]
+ that.dataList.push(...res.data.records)
+ that.total=res.data.total
+ if( this.currentPage >= res.data.pageCount||0){
+ that.hasNext=false
+ }else{
+ that.hasNext=true
+ }
+ }
+ }
+ this.loading=false
+ },
+ checkShopLogin(){
+ var that =this
+ if( this.shopInfo ==null || this.shopInfo.id==null || this.shopToken==null || this.shopToken==''){
+ uni.navigateTo({
+ url: '/pages/login/login'
+ })
+ }
+ }
}
}
</script>
@@ -69,6 +208,7 @@
.list {
width: 100%;
padding: 22rpx 30rpx;
+ padding-bottom: 60rpx;
box-sizing: border-box;
.list-item {
width: 100%;
@@ -110,10 +250,12 @@
font-size: 26rpx;
color: #E4001D;
}
+ .grey{
+ color: #999999 !important;
+ }
}
.b {
width: 100%;
- height: 136rpx;
display: flex;
flex-direction: column;
margin-top: 22rpx;
@@ -145,6 +287,10 @@
font-size: 30rpx;
color: #222222;
margin-right: 30rpx;
+ display: -webkit-box;
+ -webkit-line-clamp: 2; /* 闄愬埗鏂囨湰涓�2琛� */
+ -webkit-box-orient: vertical;
+ overflow: hidden;
}
.b-item-jia {
flex-shrink: 0;
@@ -211,9 +357,17 @@
border: 1rpx solid #004096;
color: #004096 !important;
}
- .bluebg {
- background: #004096 !important;
+ .bg{
+ background: #004096;
+ border-radius: 34rpx;
+ border: 1rpx solid #004096;
+ font-family: PingFangSC, PingFang SC;
+ font-weight: 400;
+ font-size: 28rpx;
color: #FFFFFF !important;
+ line-height: 40rpx;
+ text-align: center;
+ font-style: normal;
}
.c-btns-item {
padding: 0 24rpx;
@@ -233,17 +387,6 @@
}
}
}
- }
- .d {
- width: 100%;
- padding: 20rpx;
- box-sizing: border-box;
- background: #F8F9FB;
- border-radius: 8rpx;
- font-weight: 400;
- font-size: 26rpx;
- color: #666666;
- margin-top: 24rpx;
}
}
}
diff --git a/mini-program/pagesA/pages/shop_points/shop_points.vue b/mini-program/pagesA/pages/shop_points/shop_points.vue
index abb3394..15ae9ff 100644
--- a/mini-program/pagesA/pages/shop_points/shop_points.vue
+++ b/mini-program/pagesA/pages/shop_points/shop_points.vue
@@ -4,10 +4,10 @@
<view class="info-rule" @click="jumpService">绉垎瑙勫垯</view>
<view class="head" :style="{ backgroundImage: 'url(' + backImage + ')', height: 'calc(' + (navHeight + statusbarHeight + 'px + 376rpx)') }">
<view :style="{ width: '100%', height: navHeight + statusbarHeight + 'px' }"></view>
- <view class="head-bar" :style="{ height: navHeight + statusbarHeight + 'px' }">
+ <view class="head-bar" :style="{ height: navHeight + statusbarHeight + 'px' , backgroundImage: 'url(' + backHeadImage + ')'}">
<view :style="{ width: '100%', height: statusbarHeight + 'px' }"></view>
- <view class="head-bar-nav" :style="{ height: navHeight + 'px' }" @click="openLoacing">
- <image src="/static/icon/nav_ic_bac@2x.png" mode="widthFix"></image>
+ <view class="head-bar-nav" :style="{ height: navHeight + 'px' }" >
+ <image src="/static/icon/nav_ic_bac@2x.png" mode="widthFix" @click="jumpBack"></image>
<text>鎴戠殑绉垎</text>
<image src="/static/icon/nav_ic_bac@2x.png" mode="widthFix" style="opacity: 0;"></image>
</view>
@@ -29,13 +29,14 @@
<view :class="'list-title-cate-row '+(active ==2?'active':'')" @click="changeActive(2)">鎵i櫎</view>
</view>
</view>
- <view class="list-item">
+ <view class="list-item" v-for="(item, index) in dataList" :key="index">
<view class="list-item-left">
- <text>璐拱鍟嗗搧锛岃幏寰�100绉垎</text>
- <text>2025-11-21 09:00:00</text>
+ <text>{{item.content || ''}}</text>
+ <text>{{item.createDate || ''}}</text>
</view>
- <view class="list-item-num">+100</view>
+ <view class="list-item-num" :style="item.type==1?'color:red':''">{{item.type==1?'-':'+'}}{{item.num||0}}</view>
</view>
+ <view v-if="!hasNext" class="nomore">宸插姞杞藉叏閮�</view>
</view>
</view>
</view>
@@ -56,11 +57,20 @@
hasNext:true,
dataList:[],
countData:{},
+ backHeadImage:'',
backImage: require('@/static/images/jifen_bg@2x.png')
};
},
onReachBottom(){
this.getDataList( );
+ },
+ onPageScroll(e){
+ console.log('鍏ㄥ眬椤甸潰婊氬姩', e);
+ if(e.scrollTop >= 20){
+ this.backHeadImage = this.backImage
+ }else{
+ this.backHeadImage = ''
+ }
},
onShow() {
this.shop ={}
@@ -68,12 +78,19 @@
this.active=0
this.shop = this.shopInfo || {}
this.getCountData()
- this.currentPage = 0
- this.getDataList()
+ this.getFirstPageData()
},
methods:{
+ getFirstPageData(){
+ this.currentPage = 0
+ this.hasNext=true
+ this.total=0
+ this.dataList=[]
+ this.getDataList()
+ },
changeActive(index){
- this.getCountData(index)
+ this.active=index
+ this.getFirstPageData()
},
showRule(){
console.log("==================================",this.showPhone)
@@ -96,11 +113,11 @@
this.dataList=[]
}
var that =this
- let res = await that.$u.api.shopOrderPage({
+ let res = await that.$u.api.findIntegralRecordPage({
capacity:10,
model: {
- receiveType: 1,
- status: 1
+ type: this.active === 1?0:(this.active===2?1:''),
+ userType: 1
},
page:this.currentPage
});
@@ -118,6 +135,9 @@
}
}
this.loading=false
+ },
+ jumpBack(){
+ uni.navigateBack({ delta: 1 });
},
jumpService() {
uni.navigateTo({
@@ -177,6 +197,7 @@
border-radius: 16rpx;
margin-top: 30rpx;
padding: 34rpx 30rpx;
+ padding-bottom: 60rpx;
box-sizing: border-box;
.list-title {
width: 100%;
diff --git a/mini-program/static/icon/defualt.png b/mini-program/static/icon/defualt.png
new file mode 100644
index 0000000..c261ed5
--- /dev/null
+++ b/mini-program/static/icon/defualt.png
Binary files differ
diff --git a/mini-program/utils/http.api.js b/mini-program/utils/http.api.js
index 238aea3..c2e3d1c 100644
--- a/mini-program/utils/http.api.js
+++ b/mini-program/utils/http.api.js
@@ -29,7 +29,9 @@
let saleReport = (data = {}) => vm.$u.http.post('/web/shop/saleReport', {...data,tokenType:1}); //缁忛攢鍟� - 閿�鍞槑缁�
let shopOrderPage = (data = {}) => vm.$u.http.post('/web/orders/shopOrderPage', {...data,tokenType:1}); //缁忛攢鍟� - 閿�鍞槑缁�
let getIntegralData = (params = {}) => vm.$u.http.get('/web/integral/getIntegralData', {params}); //缁忛攢鍟� - 绉垎涓庣粨绠楅噾棰濇儏鍐碉紙绉垎瑙勫垯锛�
- let getPlatformAboutUs = (params = {}) => vm.$u.http.get('web/user/getPlatformAboutUs', { params }); // 鑾峰彇绯荤粺閰嶇疆
+ let getPlatformAboutUs = (params = {}) => vm.$u.http.get('/web/account/getPlatformAboutUs', { params }); // 鑾峰彇绯荤粺閰嶇疆
+ let findIntegralRecordPage = (data = {}) => vm.$u.http.post('/web/integral/findIntegralRecordPage', {...data,tokenType:1}); //缁忛攢鍟� - 鑾峰彇缁忛攢鍟嗙殑绉垎璁板綍
+ let myCustomer = (data = {}) => vm.$u.http.post('/web/shop/myCustomer', {...data,tokenType:1}); //缁忛攢鍟� - 鎴戠殑瀹㈡埛淇℃伅
@@ -57,7 +59,9 @@
saleReport,
shopOrderPage,
getIntegralData,
- getPlatformAboutUs
+ getPlatformAboutUs,
+ findIntegralRecordPage,
+ myCustomer
};
}
diff --git a/mini-program/utils/http.interceptor.js b/mini-program/utils/http.interceptor.js
index e873642..5937e68 100644
--- a/mini-program/utils/http.interceptor.js
+++ b/mini-program/utils/http.interceptor.js
@@ -46,6 +46,7 @@
vm.$store.commit('setToken', res.data.data.token)
vm.$store.commit('setUserInfo', res.data.data.member)
vm.$store.commit('setOpenId', res.data.data.openid)
+ // 宸茬粡鍒锋柊浜唗oken锛屽皢鎵�鏈夐槦鍒椾腑鐨勮姹傝繘琛岄噸璇�
requests.forEach(item => item(res.data.data))
requests = []
}
diff --git a/mini-program/utils/utils.js b/mini-program/utils/utils.js
index feff5e3..4ed1efe 100644
--- a/mini-program/utils/utils.js
+++ b/mini-program/utils/utils.js
@@ -19,4 +19,4 @@
} else {
return date
}
-}
\ No newline at end of file
+}
--
Gitblit v1.9.3