From f2513ef13ac41901f33ff0b943461a83584e2a05 Mon Sep 17 00:00:00 2001
From: wwz <1144797966@qq.com>
Date: Thu, 13 Feb 2025 16:49:13 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5,=E6=88=91=E7=9A=84=20=20?=
=?UTF-8?q?=E5=86=99=E6=89=AB=E7=A0=81=E7=82=B9=E9=A4=90=E4=B9=8B=E5=89=8D?=
=?UTF-8?q?=E6=8F=90=E4=BA=A41.0.0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 82 ++-
common/api/api.js | 20 +
common/api/index/coupons.js | 27 +
common/api/index/index.js | 46 ++
common/api/index/tothestore.js | 18 +
common/api/product/product.js | 11 +
common/api/request.js | 115 +++
common/js/api.js | 85 ++-
common/js/api/queueUp.js | 34 -
.../{CustomNavbars.vue => CustomNavbar.vue} | 32 +-
framework/8-cache.js | 179 +++--
framework/apis.js | 66 --
main.js | 27 +-
pages.json | 67 +-
pages/index/components/AreaSelect.vue | 165 +++++
pages/index/components/advertisement.vue | 58 +-
pages/index/components/cityData.js | 53 ++
pages/index/components/diamond.vue | 31 +-
pages/index/components/grouping.vue | 77 ++
pages/index/coupons/index.vue | 655 +++++++++++++++++
pages/index/drinks.vue | 673 +++++++++++++++++
pages/index/freedaily.vue | 377 ++++++++++
pages/index/index.vue | 186 ++---
pages/index/indexs.vue | 154 ++--
pages/index/text.vue | 37 +-
pages/index/tothestore.vue | 335 +++++++++
pages/product/index.vue | 47 ++
pages/user/address/edit.vue | 321 ++++++++
pages/user/address/index.vue | 244 ++++++
pages/user/coupon.vue | 659 +++++++++++++++++
pages/user/my_info.vue | 453 ++++++++++++
pages/user/repairpassword.vue | 254 +++++++
pages/user/repairpasswordtwo.vue | 223 ++++++
pages/user/shop/confirm.vue | 692 ++++++++++++++++++
pages/user/shop/detail.vue | 341 +++++++++
pages/user/shop/index.vue | 418 +++++++++++
pages/user/shop/shopinfo.vue | 560 ++++++++++++++
pages/user/user.vue | 276 +++++++
static/tabbar/1-1.png | Bin 0 -> 1099 bytes
static/tabbar/1.png | Bin 0 -> 710 bytes
static/tabbar/2-1.png | Bin 0 -> 827 bytes
static/tabbar/2.png | Bin 0 -> 660 bytes
static/tabbar/3-1.png | Bin 0 -> 1033 bytes
static/tabbar/3.png | Bin 0 -> 776 bytes
static/tabbar/4-1.png | Bin 0 -> 1535 bytes
static/tabbar/4.png | Bin 0 -> 942 bytes
stores/navbarStore.js | 85 ++-
stores/share.js | 88 +++
48 files changed, 7757 insertions(+), 514 deletions(-)
create mode 100644 common/api/api.js
create mode 100644 common/api/index/coupons.js
create mode 100644 common/api/index/index.js
create mode 100644 common/api/index/tothestore.js
create mode 100644 common/api/product/product.js
create mode 100644 common/api/request.js
delete mode 100644 common/js/api/queueUp.js
rename components/{CustomNavbars.vue => CustomNavbar.vue} (81%)
delete mode 100644 framework/apis.js
create mode 100644 pages/index/components/AreaSelect.vue
create mode 100644 pages/index/components/cityData.js
create mode 100644 pages/index/components/grouping.vue
create mode 100644 pages/index/coupons/index.vue
create mode 100644 pages/index/drinks.vue
create mode 100644 pages/index/freedaily.vue
create mode 100644 pages/index/tothestore.vue
create mode 100644 pages/product/index.vue
create mode 100644 pages/user/address/edit.vue
create mode 100644 pages/user/address/index.vue
create mode 100644 pages/user/coupon.vue
create mode 100644 pages/user/my_info.vue
create mode 100644 pages/user/repairpassword.vue
create mode 100644 pages/user/repairpasswordtwo.vue
create mode 100644 pages/user/shop/confirm.vue
create mode 100644 pages/user/shop/detail.vue
create mode 100644 pages/user/shop/index.vue
create mode 100644 pages/user/shop/shopinfo.vue
create mode 100644 pages/user/user.vue
create mode 100644 static/tabbar/1-1.png
create mode 100644 static/tabbar/1.png
create mode 100644 static/tabbar/2-1.png
create mode 100644 static/tabbar/2.png
create mode 100644 static/tabbar/3-1.png
create mode 100644 static/tabbar/3.png
create mode 100644 static/tabbar/4-1.png
create mode 100644 static/tabbar/4.png
create mode 100644 stores/share.js
diff --git a/App.vue b/App.vue
index 06bc6d5..14cb274 100644
--- a/App.vue
+++ b/App.vue
@@ -1,15 +1,79 @@
-
\ No newline at end of file
diff --git a/pages/index/components/advertisement.vue b/pages/index/components/advertisement.vue
index 5210af0..0a7269a 100644
--- a/pages/index/components/advertisement.vue
+++ b/pages/index/components/advertisement.vue
@@ -32,7 +32,10 @@
\ No newline at end of file
diff --git a/pages/index/coupons/index.vue b/pages/index/coupons/index.vue
new file mode 100644
index 0000000..3c31449
--- /dev/null
+++ b/pages/index/coupons/index.vue
@@ -0,0 +1,655 @@
+
+
+
+
+
+ 可使用红包
+ {{viewlist.totalnumber}}张
+
+
+
+
+ ¥
+ {{item.couponsAmount || 0}}
+
+
+ 优惠券(元)
+
+
+
+
+ 无门槛使用
+
+
+ 通用红包券
+
+
+ 有效期至:{{$u.timeFormat(item.endTime, 'yyyy/mm/dd') || '0'}}
+
+
+
+ {{item.status == 0 ? '去使用':'无法使用'}}
+
+
+ {{item.status == 0 ? '兑换积分':'已过期'}}
+
+
+
+
+
+
+ 查看更多
+
+
+
+
+
+ 可购买红包
+ (根据您的订单金额推荐更适合您的优惠力度)
+
+
+
+
+ 购买省钱包,本单立减
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+ 通用红包
+
+
+
+ ¥
+
+
+ {{item1.couponsAmount}}
+
+
+ 无门槛
+
+
+
+
+ 有效期:{{$u.timeFormat(item1.updateTime, 'yyyy/mm/dd') || '0'}}
+
+
+
+
+
+
+
+ ¥{{item1.couponsPrice}}/张
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/index/drinks.vue b/pages/index/drinks.vue
new file mode 100644
index 0000000..80a8b20
--- /dev/null
+++ b/pages/index/drinks.vue
@@ -0,0 +1,673 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.shopName}}
+
+
+ {{item.distances}}
+
+
+
+
+
+ {{s.name}}
+
+
+
+
+
+
+
+
+
+ {{item.productName.length>7?item.productName.substring(0,7)+'...':item.productName}}
+ 已抢{{item.realSalesNumber}}份
+
+
+
+
+ {{c.name}}
+
+
+
+
+ 马上抢
+
+
+
+ 到手
+ ¥{{item.salePrice}}
+
+
+ {{item.discount || ''}}折
+
+
+ ¥{{item.originPrice}}
+
+
+
+ 共省{{item.save}}元
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/index/freedaily.vue b/pages/index/freedaily.vue
new file mode 100644
index 0000000..2cffa2c
--- /dev/null
+++ b/pages/index/freedaily.vue
@@ -0,0 +1,377 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.userName}}* 免单{{item.orderAmount}}元订单号:{{item.orderNo}}
+
+
+
+
+
+
+
+
+
+ 订单数:{{total}}
+
+
+
+
+
+ 免单状态
+
+
+ 订单号
+
+
+ 金额
+
+
+
+
+
+ {{item.isRefund == true ? '已免单':'待免单'}}
+
+
+ {{item.orderNo}}
+
+
+ {{item.orderAmount}}元
+
+
+
+
+
+
+
+
+ 注:每笔订单完成后30天内均有机会获得免单
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 2bdd403..6cfdfcd 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -5,7 +5,8 @@
-
+
+
@@ -22,16 +23,20 @@
-
+ :class="!item.isChild && viewHistoryindex == index ? 'fourcontent_itemactev':''">
{{item.name}}
-
+
+
+
+
+
@@ -129,10 +134,9 @@
-
-
+
@@ -141,7 +145,10 @@
ref,
computed,
onMounted,
- reactive
+ reactive,
+ onBeforeUnmount,
+ watch,
+ getCurrentInstance
} from "vue";
import {
onLoad,
@@ -150,21 +157,27 @@
onReachBottom,
onPageScroll
} from '@dcloudio/uni-app'
+ // 获取全局属性
+ const {
+ proxy
+ } = getCurrentInstance();
import swipers from './components/swiper.vue' //引入轮播
import advertisement from './components/advertisement.vue' //广告
import diamond from './components/diamond.vue' //金刚区
import todaylist from './components/todaylist.vue' //今日上线
- // import popupad from '@/components/popupad.vue'
- // import productlist from './components/productlist.vue'
- // import category from '@/components/qiyue-category/qiyue-category.vue';
- // import indexs from './indexs.vue';
+ import indexs from './indexs.vue';
+ import AreaSelect from './components/AreaSelect.vue'; //城市联动
+ import grouping from './components/grouping.vue'; //其他
import Nav from '@/components/indexnav.vue'; //导航栏
- import API from "@/common/js/api.js"
+ import {
+ APIhomehomePageUp,
+ APIhome,
+ APIshopUserInfo
+ } from "@/common/api/index/index.js"
import {
useNavbarStore
} from '@/stores/navbarStore';
const store = useNavbarStore();
-
// 动态更新导航栏配置
store.updateNavbarConfig({
showBack: true, //左边返回键
@@ -178,8 +191,8 @@
const showindex = ref('index')
//计算广告图片的重合尺寸是位移
const getStyle = (e) => {
- if (e > hometoplist.bannerVO.counponsInfo.length / 2) {
- var right = hometoplist.bannerVO.counponsInfo.length - e
+ if (e > hometoplist.bannervo.counponsInfo.length / 2) {
+ var right = hometoplist.bannervo.counponsInfo.length - e
return {
transform: 'scale(' + (1) + ') translate(-' + (right * 20) + '%,0px)',
zIndex: 9999 - right,
@@ -193,20 +206,22 @@
}
}
}
- const advertisementStyle = ref([{
- transform: 'scale(' + (1) + ') translate(-' + (0 * 20) + '%,0px)',
- zIndex: 9999,
- opacity: 1
- }])
+ const advertisementStyle = ref([])
+ const refbannervo = ref(null);
//数据
- const hometoplist = reactive({})
+ const hometoplist = reactive({
+ bannervo: {
+ counponsInfo: [],
+ coupons: ''
+ }
+ })
// 首页上面数据
const hometop = async () => {
try {
- let res = await API.homehomePageUp()
+ let res = await APIhomehomePageUp()
Object.assign(hometoplist, res.data)
- if (hometoplist.bannerVO.counponsInfo) {
- hometoplist.bannerVO.counponsInfo.forEach((item, index) => {
+ if (hometoplist.bannervo.counponsInfo) {
+ hometoplist.bannervo.counponsInfo.forEach((item, index) => {
advertisementStyle.value.push(getStyle(index))
})
}
@@ -232,7 +247,7 @@
const homelist = ref([]) //接收数据
const onLoadhome = async () => {
try {
- let res = await API.home(formhomelist)
+ let res = await APIhome(formhomelist)
var dates = new Date().getTime();
res.data.list.forEach((item, index) => {
var leftTime = item.endTime - dates; //计算两日期之间相差的毫秒数
@@ -288,16 +303,21 @@
})
onLoadhome()
}
- const updateCity = async (data) => {
- console.log(data)
- // this.list[data].end_times = 0;
- }
+ // 弹出层处理
+ const showproductlist = ref(false);
+ // 定义方法
+ const openproductlist = (e) => {
+ hometoplist.menu[viewHistoryindex.value].name = e //下标更改name
+ showproductlist.value = !showproductlist.value
+ }
// 存储每个元素距离顶部的距离
const elementTop = ref(0);
// 存储是否吸顶的状态
const isSticky = ref(true);
+ //下标
+ const viewHistoryindex = ref(null)
// 点击滑动元素
const viewHistory = async (item, index) => {
if (isSticky) {
@@ -306,7 +326,12 @@
duration: 300
});
}
-
+ // 是否有弹出层
+ if (item.isChild) {
+ showproductlist.value = showproductlist.value ? viewHistoryindex.value == index ? false : true : !
+ showproductlist.value
+ }
+ viewHistoryindex.value = index
}
// 滑动
onPageScroll((res) => {
@@ -315,86 +340,71 @@
});
onShow(() => {})
onMounted(async () => {
- // 获取初始定位高度
- setTimeout(() => {
- const query = uni.createSelectorQuery().select('#fourcontent');
- query.boundingClientRect((rect) => {
- console.log(rect.top, 111)
- elementTop.value = rect.top - store.height
- }).exec();
- }, 500)
- // 查询是否有无内存
+ await proxy.$onLaunched;
+ console.log(uni.cache.get('shopId'))
if (uni.cache.get('shopId') && uni.cache.get('token')) {
showindex.value = 'shopIndex'
- uni.cache.set('types', 'index');
- let res = await API.shopUserInfo({
+ let res = await APIshopUserInfo({
"shopId": uni.cache.get('shopId'),
- "userId": uni.cache.get('userInfo').id,
+ "userId": uni.getStorageSync('userInfo').id,
})
if (res.code == 0) {
- shopUserInfo = res.data
- // uni.cache.set('shopUserInfo', this.shopUserInfo)
+ //商家信息
+ uni.cache.set('shopUserInfo', res.data)
}
- if (uni.cache.get('forceUpdate') == 1) {
- // this.forceUpdate = !this.forceUpdate;
- }
- // this.getShopExtend()
} else {
- uni.getLocation({
- type: 'wgs84',
- success: async (res) => {
- // console.log(res)
- let successres = await API.geocodelocation({
- lng: res.longitude,
- lat: res.latitude,
- })
- if (successres.code == 0) {
- let datastorage = {
- country: successres.data.addressComponent.country, // "中国"
- province: successres.data.addressComponent
- .province, //province: "陕西省"
- address: successres.data.addressComponent.city, //district: "西安市"
- district: successres.data.addressComponent
- .district, //district: "未央区"
- lng: res.longitude,
- lat: res.latitude,
- }
- uni.cache.set('getLocationstorage', datastorage);
- }
- },
- fail: async (err) => {
- showindex.value = 'index'
- }
- });
+ hometop()
+ init_fn()
+ showindex.value = 'index'
+ // 获取初始定位高度
+ setTimeout(() => {
+ const query = uni.createSelectorQuery().select('#fourcontent');
+ query.boundingClientRect((rect) => {
+ elementTop.value = rect.top - store.height
+ }).exec();
+ }, 500)
}
- hometop()
- init_fn()
-
-
});
+
onReachBottom(() => {
onLoadhome()
})
- onLoad(() => {
- })
+ // 页面离开时清除定时器
+ // onBeforeUnmount(() => {
+ // if (refbannervo.value) {
+ // refbannervo.value.clearTimer();
+ // }
+ // });
-
\ No newline at end of file
diff --git a/pages/index/tothestore.vue b/pages/index/tothestore.vue
new file mode 100644
index 0000000..3360fe3
--- /dev/null
+++ b/pages/index/tothestore.vue
@@ -0,0 +1,335 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 热销TOP{{index}}
+
+
+ {{item.shopName}}
+
+
+
+
+
+ {{item.address.length>7?item.address.substring(0,7)+'...':item.address}}
+
+
+ {{item.distances}}
+
+
+
+
+
+ 马上预约
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/product/index.vue b/pages/product/index.vue
new file mode 100644
index 0000000..c0921fa
--- /dev/null
+++ b/pages/product/index.vue
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/address/edit.vue b/pages/user/address/edit.vue
new file mode 100644
index 0000000..a4bad07
--- /dev/null
+++ b/pages/user/address/edit.vue
@@ -0,0 +1,321 @@
+
+
+
+
+
+ 联系人
+
+
+
+
+
+
+
+ 联系电话
+
+
+
+
+
+
+
+
+ 所在地区
+
+
+
+
+
+
+
+
+
+
+ 详细地址
+
+
+
+
+
+
+
+
+ 设为默认地址
+
+
+
+
+ 保存
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/address/index.vue b/pages/user/address/index.vue
new file mode 100644
index 0000000..b30cfc4
--- /dev/null
+++ b/pages/user/address/index.vue
@@ -0,0 +1,244 @@
+
+
+
+
+
+ {{item.name}}
+
+
+ {{item.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')}}
+
+
+
+ {{item.province}}{{item.area}}{{item.city}}{{item.address}}
+
+
+
+
+
+
+
+ 默认地址
+
+
+ 编辑
+ 删除
+
+
+
+
+
+ 添加地址
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/coupon.vue b/pages/user/coupon.vue
new file mode 100644
index 0000000..b91d16d
--- /dev/null
+++ b/pages/user/coupon.vue
@@ -0,0 +1,659 @@
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.num || 0}}
+ 张
+
+
+ ¥
+ {{item.discountAmount || 0}}
+
+
+
+
+ {{ item.type == 2 ? item.name : '优惠券(元)'}}
+
+
+
+
+
+
+
+ {{ item.shopName }}
+
+ 无门槛使用
+
+
+ {{ item.type == 2 ? '会员商品券' : item.name}}
+
+ {{status == 1 ? '去使用':'已使用'}}
+
+
+
+ 有效期至:{{$u.timeFormat(item.endTime, 'yyyy/mm/dd') || '0'}}
+
+
+
+
+
+
+
+
+
+
+ 暂不使用券
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/my_info.vue b/pages/user/my_info.vue
new file mode 100644
index 0000000..112123e
--- /dev/null
+++ b/pages/user/my_info.vue
@@ -0,0 +1,453 @@
+
+
+
+
+
+
+ 头像
+
+
+
+
+
+
+
+
+
+
+
+
+ 昵称
+
+
+
+
+
+ 账号
+
+
+
+
+
+ 性别
+
+ {{sexText}}
+
+
+
+
+
+ 生日
+
+ {{ birthDay || '生日一旦填写不能修改'}}
+
+
+
+
+
+
+
+
+ 绑定微信
+
+ 已绑定
+
+
+
+
+
+ 保存
+
+
+
+
+
+
diff --git a/pages/user/repairpassword.vue b/pages/user/repairpassword.vue
new file mode 100644
index 0000000..18c4187
--- /dev/null
+++ b/pages/user/repairpassword.vue
@@ -0,0 +1,254 @@
+
+
+ 安全密码用于商户推广提现/订单退款,确保资金安全
+
+
+ 手机号码
+
+
+
+ 密码
+
+
+
+ 确认密码
+
+
+
+ 验证码
+
+
+ {{ Recapture }}
+
+ {{ second }}s重新发送
+
+
+
+
+
+ 确定
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/repairpasswordtwo.vue b/pages/user/repairpasswordtwo.vue
new file mode 100644
index 0000000..aa857be
--- /dev/null
+++ b/pages/user/repairpasswordtwo.vue
@@ -0,0 +1,223 @@
+
+
+
+
+ {{form.password.length == 6?'请再次确认支付密码':"请设置新密码,用于支付验证"}}
+
+
+
+ {{consumeFee.slice(0,1)}}
+
+
+ {{consumeFee.slice(1,2)}}
+
+
+ {{consumeFee.slice(2,3)}}
+
+
+ {{consumeFee.slice(3,4)}}
+
+
+ {{consumeFee.slice(4,5)}}
+
+
+ {{consumeFee.slice(5,6)}}
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/shop/confirm.vue b/pages/user/shop/confirm.vue
new file mode 100644
index 0000000..2f3c94b
--- /dev/null
+++ b/pages/user/shop/confirm.vue
@@ -0,0 +1,692 @@
+
+
+
+
+
+ 商品信息
+
+
+
+
+
+
+
+
+ {{item.title || '无'}}
+
+
+ {{item.spec || '无'}}
+
+
+
+
+
+ {{item.price || '无'}}
+
+
+ ×{{item.number || '无'}}
+
+
+
+
+
+
+
+
+
+ 确认地址
+
+
+
+
+
+ {{elist.address.address}}
+
+
+ {{elist.address.province}}-{{elist.address.city}}-{{elist.address.area}}-{{elist.address.address}}
+
+
+ {{elist.address.name}}{{elist.address.mobile}}
+
+
+
+
+ 去添加地址
+
+
+
+
+
+
+
+ 运费
+
+
+ ¥{{elist.freight}}
+
+
+
+
+ 合计
+
+
+ ¥{{elist.price.total_price}}
+
+
+
+
+
+
+
+ 支付方式
+
+
+
+
+
+
+ 微信支付
+
+
+
+
+
+
+
+
+
+
+
+ 余额支付
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 实付金额:
+
+
+ ¥{{elist.price.price}}
+
+
+
+ 立即付款
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/shop/detail.vue b/pages/user/shop/detail.vue
new file mode 100644
index 0000000..8374a9f
--- /dev/null
+++ b/pages/user/shop/detail.vue
@@ -0,0 +1,341 @@
+
+
+
+
+
+
+
+
+
+ 积分商城
+
+
+
+
+
+
+
+
+
+
+
+ 当前积分
+
+
+
+
+ 5830
+
+
+
+
+ 积分明细
+
+
+
+
+ 收入
+ /
+ 支出
+
+
+
+
+ 交易积分-线下收款
+ 2023-01-11 17:33:09
+
+ +0.02
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/shop/index.vue b/pages/user/shop/index.vue
new file mode 100644
index 0000000..22e5f99
--- /dev/null
+++ b/pages/user/shop/index.vue
@@ -0,0 +1,418 @@
+
+
+
+
+
+
+
+
+
+ 积分商城
+
+
+
+
+
+
+
+
+
+
+
+
+ 当前积分
+
+
+
+ 5830
+
+
+
+ 积分明细
+
+
+
+
+
+
+ 搜索
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+ 澳洲高级洗发水
+
+
+
+
+ 30积分
+
+
+
+
+ 市场价¥100.00
+
+
+ 已兑换0390件
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/shop/shopinfo.vue b/pages/user/shop/shopinfo.vue
new file mode 100644
index 0000000..c84bfb5
--- /dev/null
+++ b/pages/user/shop/shopinfo.vue
@@ -0,0 +1,560 @@
+
+
+
+
+
+ 111
+
+
+
+
+ 当前积分
+
+
+
+
+
+
+ 商品详情
+
+
+
+
+
+
+
+
+
+
+
+ 首页
+
+
+
+ 客服
+
+
+
+
+ 立即购买
+
+
+
+
+
+
+
+
+
+
+ 贝尔纳干红葡萄酒
+
+
+
+ 当前积分
+
+
+
+
+
+
+
+
+
+
+ {{item.spec_name}}
+
+
+
+
+ {{item1.name}}
+
+
+
+
+
+
+ 购买数量
+
+
+
+
+
+
+
+ 合计
+
+
+ ¥100
+
+
+
+ 确定
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/user.vue b/pages/user/user.vue
new file mode 100644
index 0000000..4a66e6d
--- /dev/null
+++ b/pages/user/user.vue
@@ -0,0 +1,276 @@
+
+
+
+
+
+
+
+ {{userInfo.nickName || '无'}}
+
+
+
+
+ 免费入会
+
+
+
+
+
+ 我的资产
+
+
+
+ {{item.name}}
+ {{item.num || '**'}}
+
+
+
+
+
+ 我的功能
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/static/tabbar/1-1.png b/static/tabbar/1-1.png
new file mode 100644
index 0000000000000000000000000000000000000000..f956a5ef33234f14fcb35424252149c0cd8859bf
GIT binary patch
literal 1099
zcmV-R1ho5!P)gh6*L+XEsoe|B{WtV&sdPyfR#4pAkmoE05){o(MdD`w6eOZj2$F4U~|5Y
zog;Vb?6S8zvwyrVdAVC|xY_sZ_ujsl**PMCKp+qZ1OkD;jY0~~X_{?crvZcNVs%$A$HquHWuJjAGSue$aJd`fBfl>%$`jkV9Y%kStGBqUnst?40z^I|y
z4?rM@1fjN7S;&j}l2m0B5;5DdkS6s-ROMXQ*`Y#6_0<%KsZ?JCRj#TK?@N{amN=to
z=H$BW!`b^pD;yl7Bk3G6T^Z(D=MK@~A<@^L`X+4m$eFYJV?&80HJmECJ{WS;hw>#W
zKp6y8qAb#70Jbp|=BHwykA7El1VVk=pR+|^r(VT*P&;PI_E}#4Z_J8CN9)2yGQew~5=xn6P8-bdA(hV}S1q0~(2u2TVZUB!ngnc%e
zV^`IVDG~u}$6e4eJVG>mlV~DCyQ(&swABsYk_Nj@7j5)iqiDaTlohMlzKE5a6Ih8W
z8cI1-rRUEtn9PY@WMcF9lzLyvPF6fBqG4;~Y!+{kKp+qZ1OkCTU=aTW7y#ae7vbDl
RC^P^7002ovPDHLkV1gWL0;B){
literal 0
HcmV?d00001
diff --git a/static/tabbar/1.png b/static/tabbar/1.png
new file mode 100644
index 0000000000000000000000000000000000000000..335b7425ee630fdd9aa8f659ceeed02e1620282b
GIT binary patch
literal 710
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
D7u(%2
literal 0
HcmV?d00001
diff --git a/static/tabbar/3.png b/static/tabbar/3.png
new file mode 100644
index 0000000000000000000000000000000000000000..1f0b10a416a959c750a80775a5afabe5dcbf019a
GIT binary patch
literal 776
zcmV+j1NZ!iP)cCSU}zLD+z7&=Sd!EaZR<_St9tUpgs@6r20N_T9x;2nd1_(I-(q
z`2T}Sm(pbv
zK7SZCX!{%Pvho=V3xkCP5FtQRqk~S`57!VUq;%EzoNI^^3qaGd*x@10gY7N*at;k~
z4PX<>XD$$30X!_kHGowLxwG#a*(JckL7eZ3bph~D5PboR7GkA1+>8BXu_b_`gUlpK
zh@-~Q!V|zE#?iO8!NQ@#l~~>u=c@3_;z``%I2FKXA?_W5lmMe%owtHq0_f|Huc$*D
zTaa}CfGpxfQ;wTwe&t)O{Lf>qjQ1F{ixVwXFcfTRS-wg9mN
zk{TfEDvl0h2!QNMVTD{gI^k&7K84TN(B!~pY$I_XKmGaxw3f0ZCO1L7r|Mgov=091!I
zPH1wp*x;-%lRBAYl%F$PSO$^)NdgcAK@bE%5X4vi0t^7R6cS&c8VE!H0000?YMHGIAi-g_8#6%j|-)J8ySpcJ}UecRp!!$y&QR^X>QM&Ch#7Cp5MsUeQrs=Pc2=Gm=180HIquM4R7g
zt8#7JNQC+J(uOHe-RdII%0>C_q5wr+yCGQmJX4(*8qK;eZxT*jd&70#-U|f+W-(vp^v%Xz~5(DlljoJg-DiZZ(&^1{J
znlO0pN21KByzr&B%eguNBL5V9&Y)G6}eW_?8sj9%11!HORHY84~UQh=x?VPqDF=5Kn?Rt>Nw6o=e#HyQe
zMmvp3RNi2+FI;A%w6kSGVo+BVX0$gjA+bpw+Pr9!IMc3~65IJn^e})Y(Ua&&tUQVP
z@e5IaWnI9ucRv@29_Az_;!!L^e9NoEJ9@mNk*EwaLx^uJf`egRSXbpX@Oz72_qGzIL*R^6mi(mA$mNK|HWBF&-7*!i9{AoOGKwmm_6s?F56vQ5aqyDiIDJS{Gvvp
zjh309;TzZU5s3R$!R(A#rm7I_Qhg)J2!_`Q^8AHjsb=`%j~^4wy{hZ-pxIhT~|rrgNL4p1U*q^xetHsp+*u2Y9EK6ohA
zp=;JK)$?<*D^SEq=LUk2zPM~g;M!%jOF$;-S31uy34H%al=BqZHUt?aUKT`xbZi9u
ze&5Za2KI?>U6t{LI(_P4ua3S@wFZ&pk!{R5!VJlDG|JmQKI2$+j1s?}B1$+%l$y<+
zxXU~io3u1#Vz`TpDl`n`sY3sFR;5rI6o34fd`I5*q@<=9CzSi#zU1_7D7k%++y^S}
z3lq^iLSX1Xy->dt0mVdStxJ$16dD_<4}PkJpDv=3Se!!iq+dYH(^@mC39Oc`7rn+)1APOxco?$jyLC
lce=5MhlhuUhg1A3zyQbAbANNcXioqD002ovPDHLkV1jl&;gbLW
literal 0
HcmV?d00001
diff --git a/static/tabbar/4.png b/static/tabbar/4.png
new file mode 100644
index 0000000000000000000000000000000000000000..9a197fe7bea04e941de8f2762eee2a3cb33725f0
GIT binary patch
literal 942
zcmV;f15x~mP)7jJuLQQa*^pe`J+Xaz)-TV2lqXt(1!*H+c-iouqV9{vt@H#^))L
zH<)IPM4U-#gG(UtVkGl`Xtr<4w0v<@pRMM9x%w;u#{Dhj*H--Iu)v$6mh?(fssL@t
z)c0yNj?43IDwstL;bCGW!pn1Y9U|7K+c{|6d4b5u)pMq_vx_N;9~}r3D@>R>SVkAP
zKLsbSk9?9-FS%cHj#C82=66JFL{9m@D$>AL#pENq7)=Afg1WWMVhaSi5Q*-FN{cyc
zg~0Dbn$}WaJ(OEAk&0~-l_j&`OPaA@+s0z+%GP$oD+Nl>Uw`UE{GhLYtg*FFu(TjB
zwXrsAXHxqKo*TA3HN?QWw{vD`;%r#&EQL8?3>vvM>ehRjGiZnDY$HVtxeMV-@8%;x
z32A+mA)xF5y-!y5WEm*e{Oz(65-*N?Op>VENVhv7v32BQ66k4A#4sfoAZgH^;GE_@
zSt9co*PW4gb>ziJV#Wy0y!epV?u@W@E{OyW5Q#)0k(fM*cb~K;QRI%ic#%l(B%I9e8M{9%Jag1lrG*=fq
z-lhD+PJ_AtlfkOGpHq*r$W2+Bx{ClJ1;Z;4=PRwtdGV0d1BE5n_{uFX38>h@)dP=(
zL)Wns%&+i!TyP$mL4nn=90JW+7x{*^055D_znVvDm%$hP82O~T3O0B4zm?0J=QIXw
z8`>PaE|D5hZ6A<-q$*S7H%j%+fJ9Q|JjxlW$cQ+DGdnl|p6>uyXS5C{YUD82+30Oe@Bpk1kG
QbpQYW07*qoM6N<$f ({
- showBack: true,
- rightText: '',
- showSearch: false,
- title: '',
- isTransparent: false,
- height: 0,
- hasPlaceholder: true,
+ state: () => ({
+ showBack: true,
+ rightText: '',
+ showSearch: false,
+ title: '',
+ isTransparent: false,
+ height: 0,
+ hasPlaceholder: true,
scrollTop: 0 //滚动高度
- }),
- actions: {
- updateNavbarConfig(config) {
- Object.assign(this, config);
- },
- initNavbarHeight() {
- uni.getSystemInfo({
- success: (res) => {
- const statusBarHeight = res.statusBarHeight;
- let navBarHeight;
+ }),
+ actions: {
+ updateNavbarConfig(config) {
+ Object.assign(this, config);
+ },
+ initNavbarHeight() {
+ uni.getSystemInfo({
+ success: (res) => {
+ const statusBarHeight = res.statusBarHeight;
+ let navBarHeight;
- // 微信小程序的特殊处理
- if (res.platform === 'weapp') {
- const menuButtonInfo = uni.getMenuButtonBoundingClientRect();
- const topGap = menuButtonInfo.top - statusBarHeight;
- const bottomGap = statusBarHeight + menuButtonInfo.height + topGap * 2 - (menuButtonInfo.top + menuButtonInfo.height);
- navBarHeight = menuButtonInfo.height + topGap + bottomGap;
- } else if (uni.getSystemInfoSync().platform === 'ios') {
- navBarHeight = 44;
- } else {
- navBarHeight = 48;
- }
+ // 微信小程序的特殊处理
+ if (res.platform === 'weapp') {
+ const menuButtonInfo = uni.getMenuButtonBoundingClientRect();
+ const topGap = menuButtonInfo.top - statusBarHeight;
+ const bottomGap = statusBarHeight + menuButtonInfo.height + topGap * 2 - (
+ menuButtonInfo.top + menuButtonInfo.height);
+ navBarHeight = menuButtonInfo.height + topGap + bottomGap;
+ } else if (uni.getSystemInfoSync().platform === 'ios') {
+ navBarHeight = 44;
+ } else {
+ navBarHeight = 48;
+ }
- this.height = statusBarHeight + navBarHeight;
- },
- fail: (err) => {
- console.error('获取系统信息失败:', err);
- this.height = 64; // 失败时设置一个默认高度
- }
- });
- }
- }
+ this.height = statusBarHeight + navBarHeight;
+ },
+ fail: (err) => {
+ console.error('获取系统信息失败:', err);
+ this.height = 64; // 失败时设置一个默认高度
+ }
+ });
+ }
+ }
});
\ No newline at end of file
diff --git a/stores/share.js b/stores/share.js
new file mode 100644
index 0000000..4446941
--- /dev/null
+++ b/stores/share.js
@@ -0,0 +1,88 @@
+import {
+ defineStore
+} from 'pinia';
+import {
+ ref
+} from 'vue';
+import {
+ APIcustomlogin
+} from '@/common/api/api.js'
+
+export const Storelogin = defineStore('login', {
+ state: () => ({
+ token: '',
+ miniAppOpenId: '',
+ userInfo: ''
+ }),
+ actions: {
+ actionslogin() {
+ return new Promise((resolve, reject) => {
+ // #ifdef MP-WEIXIN
+ uni.login({
+ provider: 'weixin',
+ success: (data) => {
+ // 微信小程序环境
+ uni.getUserInfo({
+ provider: 'weixin',
+ success: async (infoRes) => {
+ let res = await APIcustomlogin({
+ code: data.code, //临时登录凭证
+ rawData: infoRes.rawData,
+ source: 'wechat'
+ })
+ if (res.code == 0) {
+ this.token = res.data.token
+ this.miniAppOpenId = res.data.userInfo
+ .miniAppOpenId
+ this.userInfo = res.data.userInfo
+ uni.cache.set('token', res.data.token);
+ uni.cache.set('miniAppOpenId', res.data
+ .userInfo
+ .miniAppOpenId)
+ uni.cache.set('userInfo', res.data
+ .userInfo);
+ }
+ resolve(true);
+ },
+ fail: (err) => {
+ reject(false);
+ }
+ });
+ }
+ });
+ // #endif
+ // #ifdef MP-ALIPAY
+ my.getAuthCode({
+ scopes: 'auth_base',
+ success: async (data) => {
+ console.log(data)
+ // 支付宝小程序环境
+ // my.getAuthUserInfo({
+ // success: async (infoRes) => {
+ let res = await APIcustomlogin({
+ code: data.authCode, //临时登录凭证
+ // rawData: JSON.stringify(infoRes),
+ source: 'alipay'
+ })
+ if (res.code == 0) {
+ this.token = res.data.token
+ this.miniAppOpenId = res.data.userInfo.miniAppOpenId
+ this.userInfo = res.data.userInfo
+ uni.cache.set('token', res.data.token);
+ uni.cache.set('miniAppOpenId', res.data.userInfo
+ .miniAppOpenId)
+ uni.cache.set('userInfo', res.data.userInfo);
+ resolve(true);
+ }
+ },
+ fail: (err) => {
+ reject(false);
+ }
+ });
+ }
+ });
+ // #endif
+ }).catch((e) => {});
+}
+}
+});
\ No newline at end of file