Compare commits

...

12 Commits

Author SHA1 Message Date
jiazhipeng bf418395ab 个人中心改版 7 days ago
jiazhipeng fc05666478 Merge branch 'master' into dev_delivery 7 days ago
jiazhipeng 4cd8efa40f 1 7 days ago
jiazhipeng 889c212252 1 7 days ago
jiazhipeng 8729499e89 Merge branch 'master' into dev_delivery 7 days ago
jiazhipeng d60d333944 专题页调整 7 days ago
jiazhipeng 0d6b1dac36 个人中心改版 7 days ago
jiazhipeng 76df918a8a 个人中心改版 1 week ago
jiazhipeng 2f08c5ef2e 1 1 week ago
jiazhipeng 5621718fb3 Merge branch 'master' into dev_delivery 2 weeks ago
jiazhipeng 5b642210e5 开屏广告 2 weeks ago
jiazhipeng 2dbbaca11b fix 3 weeks ago
  1. 2
      App.vue
  2. 2
      mixins/myMixins.js
  3. 16
      pages.json
  4. 60
      pages/index/index.vue
  5. 112
      pages/index/startIndex.vue
  6. 54
      pages/login/login.vue
  7. 190
      pages/login/phoneLogin.vue
  8. 666
      pages/user/user.vue
  9. 7
      static/js/CommonFunction.js
  10. 4
      store/modules/user.js
  11. 6
      subPackages/activity/agriculturalProd.vue
  12. 41
      subPackages/activity/prizeInQun.vue
  13. 2
      subPackages/order/cartOrder.vue
  14. 6
      subPackages/user/commentList.vue
  15. 9
      subPackages/webPage/webPage.vue

2
App.vue

@ -5,6 +5,7 @@
console.log('App Launch')
// 1
// #ifdef MP-WEIXIN
uni.setStorageSync('SHFlag', false)
this.Post({id:2388},'/api/multimedia/detail').then(res => {
if (res && res.data) {
@ -16,6 +17,7 @@
uni.setStorageSync('SHFlag', false)
}
});
// #endif
},
onShow: function() {
console.log('App Show')

2
mixins/myMixins.js

@ -11,12 +11,14 @@ export const myMixins ={
if(option && option.wechat_qrcode){
uni.setStorageSync('wechat_qrcode',option.wechat_qrcode)
}
// #ifdef MP-WEIXIN
// 分享
uni.showShareMenu({
withShareTicket: true,
//设置下方的Menus菜单,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
menus: ["shareAppMessage", "shareTimeline"]
})
// #endif
},
// 分享到朋友圈
onShareTimeline() {

16
pages.json

@ -38,6 +38,16 @@
"navigationBarTitleText": "登录"
}
}
// #ifdef H5
,
{
"path": "pages/login/phoneLogin",
"style": {
"navigationBarTitleText": "登录"
}
}
// #endif
],
"subPackages": [{
"root": "subPackages",
@ -380,6 +390,12 @@
"navigationBarTitleText" : "绿色有机标准认证"
}
},
{
"path": "activity/prizeInQun",
"style": {
"navigationBarTitleText" : "进群抽奖"
}
},
{
"path": "user/comment",
"style": {

60
pages/index/index.vue

@ -86,6 +86,18 @@
</view>
</view>
<uni-popup ref="alertAdv" type="center">
<view class="alertAdv">
<swiper class="alertAdv-banner" :circular="true" :interval="6000" style="margin-top: 27rpx;"
:duration="800" :indicator-dots="false" :autoplay="true" v-if="alertAdv && alertAdv.length > 0">
<swiper-item class="alertAdv-item" v-for="(item, index) in alertAdv" :key="index" @click.stop="gotoBannerDetail(item)">
<image class="alertAdv-img" :src="showImg(item.head_img)" mode="widthFix" lazy-load="true"></image>
</swiper-item>
</swiper>
</view>
</uni-popup>
</view>
</template>
@ -128,6 +140,7 @@
SHFlag: true,
alertAdv: [],
}
},
onLoad() {
@ -144,11 +157,13 @@
this.initRectInfo()
this.sendRequest()
this.getHeadImg(2378).then(res => {this.CKMap = res})
this.getAlertAdv()
},
methods: {
initSHFlag () {
let _this = this
//
// #ifdef MP-WEIXIN
try {
_this.SHFlag = uni.getStorageSync('SHFlag')?true: false
} catch (e) {
@ -163,6 +178,11 @@
}
console.log(_this.SHFlag)
},500)
// #endif
// #ifdef H5
_this.SHFlag = false
// #endif
},
initRectInfo () {
@ -247,13 +267,13 @@
}
//
this.navList = res.data.nav_menu
this.navList = res.data.nav_menu || []
// 广
this.recommendNav = res.data.recommend_data
this.recommendNav = res.data.recommend_data || []
//
this.moduleList = res.data.func_data
this.moduleList = res.data.func_data || []
})
// banner
@ -262,7 +282,7 @@
position: 0,
},"/api/adv/getAdv").then(res => {
if (res) {
this.topBanner = res.data
this.topBanner = res.data || []
}
});
@ -272,7 +292,7 @@
position: 1,
},"/api/adv/getAdv").then(res => {
if (res) {
this.smallBanner = res.data
this.smallBanner = res.data || []
}
});
@ -311,6 +331,18 @@
},
getAlertAdv () {
this.Post({position: 3,type_id: 3},"/api/adv/getAdv",).then(res => {
if (res.data.length > 0) {
this.alertAdv = res.data || []
if (this.alertAdv.length>0) {
this.$refs.alertAdv.open()
}
}
})
},
},
onReachBottom() {
setTimeout(() => {
@ -505,4 +537,22 @@
}
}
}
.alertAdv-banner{
width: 700rpx;
height: 1000rpx;
margin: 0 auto;
.alertAdv-item{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.alertAdv-img{
width: 100%;
height: auto;
}
}
</style>

112
pages/index/startIndex.vue

@ -0,0 +1,112 @@
<template>
<view class="bg" @click="goIndex()">
<image :src="showImg(screenPng)"></image>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
topBanner: [],
screenPng: null,
}
},
onLoad() {
this.getAlertAdv()
},
onUnload() {
//
},
onReady() {
},
methods: {
// 广
gotoBannerDetail(item) {
if (this.SHFlag) { return }
// 1 2 3 4
switch (item.jump_type){
case 1:
this.gotoDetailByType(item.product_model)
break;
case 2:
this.gotoPath(item.front_model.inside)
break;
case 3:
this.gotoWebUrl(item.tdata.url)
break;
case 4:
// #ifdef MP-WEIXIN
uni.navigateToMiniProgram({
shortLink: item.tdata.url
})
// #endif
break;
default:
break;
}
},
getAlertAdv () {
this.Post({position: 2,type_id: 3},"/api/adv/getAdv",).then(res => {
if (res.data.length > 0) {
this.topBanner = res.data || []
if (this.topBanner.length<=0) {
uni.switchTab({
url:"/pages/index/index"
})
} else {
let num = Math.floor(Math.random() * length);
this.screenPng =this.topBanner[num].head_img
}
}
})
},
goIndex () {
uni.switchTab({
url:"/pages/index/index"
})
},
},
}
</script>
<style lang="scss" scoped>
.bg {
width: 100%;
height: 100vh;
}
image {
display: block;
}
</style>

54
pages/login/login.vue

@ -1,20 +1,21 @@
<template>
<view style="padding-top: 88rpx;">
<view style="padding: 113rpx 58rpx 0;">
<view class="login-tip">时味苏州 申请获得</view>
<view class="login-tip2">以下权限</view>
<view class="login-tip-box">
<text>获得你的公开信息昵称头像地区及性别</text>
</view>
<view class="btn-box">
<button bindtap="cancel" type="default" @click="redirectIndex">取消</button>
<button type="primary" @click="getUserInfo">同意</button>
</view>
<view class="flex-center article-box">
<view class="article-box">
<radio-group @change="toggleAgreement">
<radio value="1" :checked="isAgreed" style="transform:scale(0.7)"></radio>
</radio-group>
<view>同意<text @click="gotoInfo(9)">用户服务协议</text><text @click="gotoInfo(12)">隐私政策</text></view>
</view>
<view class="btn-box">
<button bindtap="cancel" type="default" @click="redirectIndex">取消</button>
<button type="primary" @click="getUserInfo">同意</button>
</view>
<uni-popup ref="popup" type="bottom" background-color="#fff">
<button type="default" open-type="getPhoneNumber" @getphonenumber="handlePhoneNumber" style="width: 100%;height: 12vh;line-height: 12vh;">点击授权手机号</button>
</uni-popup>
@ -31,12 +32,18 @@ export default {
};
},
onLoad(options) {
// #ifdef H5
window.location.replace("/pages/login/phoneLogin")
// #endif
// #ifdef MP-WEIXIN
//
if (options.needAuth === '1') {
setTimeout(() => {
this.$refs.popup.open('bottom');
}, 400);
}
// #endif
},
methods: {
//
@ -158,25 +165,25 @@ export default {
<style>
.login-tip {
font-size: 28rpx;
margin: 0 60rpx;
margin-top: 40rpx;
font-weight: 400;
font-size: 29rpx;
color: #020202;
}
.login-tip2 {
font-size: 44rpx;
margin: 0rpx 60rpx;
margin-top: 20rpx;
font-weight: 400;
font-size: 48rpx;
color: #000000;
}
.login-tip-box {
display: flex;
align-items: flex-start;
margin: 0 60rpx;
font-size: 28rpx;
font-weight: 400;
font-size: 29rpx;
color: #000000;
margin-top: 40rpx;
line-height: 40rpx;
}
.login-tip-box .icon-gou1 {
@ -190,22 +197,21 @@ export default {
display: flex;
position: absolute;
bottom: 100rpx;
left: 0;
right: 0;
left: 22rpx;
right: 22rpx;
}
.btn-box button {
width: 400rpx;
width: 347rpx;
}
.article-box {
position: absolute;
left: 0;
right: 0;
justify-content: center;
font-size: 24rpx;
color: #1aad19;
bottom: 40rpx;
font-weight: 400;
font-size: 27rpx;
color: #00B200;
margin-top: 30rpx;
display: flex;
align-items: center;
}
.article-box .iconfont {

190
pages/login/phoneLogin.vue

@ -0,0 +1,190 @@
<template>
<view style="padding-top: 88rpx;">
<view class="login-tip">时味苏州PHoneLogin 申请获得</view>
<view class="login-tip2">以下权限</view>
<view class="login-tip-box">
<text>获得你的公开信息昵称头像地区及性别</text>
</view>
<view class="btn-box">
<button bindtap="cancel" type="default" @click="redirectIndex">取消</button>
<button type="primary" @click="getUserInfo">同意</button>
</view>
<view class="flex-center article-box">
<radio-group @change="toggleAgreement">
<radio value="1" :checked="isAgreed" style="transform:scale(0.7)"></radio>
</radio-group>
<view>同意<text @click="gotoInfo(9)">用户服务协议</text><text @click="gotoInfo(12)">隐私政策</text></view>
</view>
<uni-popup ref="popup" type="bottom" background-color="#fff">
<button type="default" open-type="getPhoneNumber" @getphonenumber="handlePhoneNumber" style="width: 100%;height: 12vh;line-height: 12vh;">点击授权手机号</button>
</uni-popup>
</view>
</template>
<script>
export default {
name: "login",
data() {
return {
isAgreed: false,
openid: ''
};
},
onLoad(options) {
},
methods: {
//
handlePhoneNumber(e) {
if (e.detail.errMsg === "getPhoneNumber:ok") { //
this.$refs.popup.close();
this.Post({
code: e.detail.code,
encryptedData: e.detail.encryptedData,
iv: e.detail.iv,
openid: this.openid
}, '/api/uservice/user/bindPhoneNumber')
.then(res => {
this.$store.commit('changeUserInfo', res.data);
this.navigateBasedOnPath();
})
.catch(error => {
console.error('绑定手机号失败:', error);
uni.showToast({
title: '绑定手机号失败,请稍后重试',
icon: 'none'
});
});
} else {
console.error('获取手机号失败:', e.detail.errMsg);
uni.showToast({
title: '获取手机号失败,请稍后重试',
icon: 'none'
});
}
},
//
gotoInfo(id) {
uni.navigateTo({
url: '/subPackages/user/privacyInfo?id=' + id
});
},
//
toggleAgreement() {
this.isAgreed = !this.isAgreed;
},
//
redirectIndex() {
uni.switchTab({
url: '/pages/index/index',
});
},
//
getUserInfo() {
if (!this.isAgreed) {
uni.showToast({
title: '请先勾选同意《用户服务协议》、《隐私政策》',
icon: 'none'
});
return;
}
let data = {
avatar: "https://jdsz.obs.cn-east-3.myhuaweicloud.com:443/backend/upload/202509281759047643d42d0a25de93f030757727b6a74a999c2f5f0426.png",
birthday: "2020-02-05",
createtime: 1760087570,
email: "",
expires_in: 2592000,
expiretime: 1762679570,
from_source: "WECHAT",
fullname: "",
gender: 1,
id: 6069705,
id_number: "",
isBindMobile: 1,
is_enterprise: 2,
mobile: "19941952818",
name_verification: "UNCERTFIED",
nickname: "abc",
score: 106,
token: "c04a0d8e-b2dd-4a47-a2e8-0a7652520bad",
user_id: 6069705,
username: "",
uuid: "3c6f7d59-5c27-42ad-902b-89043fc4b4f8",
}
this.$store.commit('changeUserInfo', data);
},
//
navigateBasedOnPath() {
if (this.$store.state.user.toPath.includes('user/user')) {
uni.switchTab({
url: this.$store.state.user.toPath
});
} else {
uni.navigateBack({});
}
}
},
};
</script>
<style>
.login-tip {
font-size: 28rpx;
margin: 0 60rpx;
margin-top: 40rpx;
}
.login-tip2 {
font-size: 44rpx;
margin: 0rpx 60rpx;
margin-top: 20rpx;
font-weight: 400;
}
.login-tip-box {
display: flex;
align-items: flex-start;
margin: 0 60rpx;
font-size: 28rpx;
margin-top: 40rpx;
line-height: 40rpx;
}
.login-tip-box .icon-gou1 {
line-height: 80rpx;
margin-top: -20rpx;
margin-right: 30rpx;
color: #666;
}
.btn-box {
display: flex;
position: absolute;
bottom: 100rpx;
left: 0;
right: 0;
}
.btn-box button {
width: 400rpx;
}
.article-box {
position: absolute;
left: 0;
right: 0;
justify-content: center;
font-size: 24rpx;
color: #1aad19;
bottom: 40rpx;
}
.article-box .iconfont {
margin-right: 10rpx;
font-size: 26rpx;
}
.article-box text {
border-bottom: 1px solid;
}
</style>

666
pages/user/user.vue

@ -1,41 +1,50 @@
<template>
<view class="bg bg-padding">
<view class="top-image">
<view>Hi欢迎来时味苏州</view>
<view style="font-weight: 400;font-size: 27rpx;color: rgba(255,255,255,0.64);margin-top: 10rpx;">不时不食 鲜逢其时</view>
</view>
<view class="main-content">
<view class="topBox" >
<!-- <image src="https://static.ticket.sz-trip.com/shiweisuzhou/images/user/topIcon.png" class="topIcon"></image> -->
<view class="flex-between w-full" style="padding-right: 13rpx;" @click="gotoProfile">
<view class="flex-center" style="position: relative;">
<view class="avatar-box">
<view class="avatar-box" @click="gotoProfile">
<image :src="showImg(userInfo.avatar)" mode="aspectFill" class="headImg" v-if="userInfo.avatar"></image>
<image src="https://static.ticket.sz-trip.com/yandu/images/user/grxx.png" mode="aspectFill"
class="headImg" v-else></image>
<view class="username w-full" style="display: flex;align-items: center;" v-if="userInfo.nickname">
<view class="text-overflow" style="max-width: 300rpx;padding-right: 12rpx;">{{userInfo.nickname}}</view>
<image class="flex-shrink-0" style="width: 24rpx;height: 24rpx;" src="https://static.ticket.sz-trip.com/uploads/20251011/5b8d4b5d6e0aefe9deddbc4ca8799264.png"></image>
</view>
<view class="username" v-if="userInfo.nickname">{{userInfo.nickname}}</view>
<view class="username" v-else>请登录/注册 ></view>
</view>
<view class="top-right" v-if="userInfo.nickname">
个人信息 <image src="https://static.ticket.sz-trip.com/tongli/images/user/rightIcon1.png" mode=""></image>
<view class="flex-column-center" @click="gotoPath('/subPackages/user/coupon')">
<view class="title">优惠券</view>
<view class="num">{{couponNum}}</view>
</view>
<view style="height: 35rpx;width: 2rpx;background:#E3E3E3;"></view>
<view class="flex-column-center" @click="gotoPath('/subPackages/pointsMall/index')">
<view class="title">积分</view>
<view class="num">{{userInfo.score||0}}</view>
</view>
<view class="orderBox">
<view class="points-box">
<image src="https://static.ticket.sz-trip.com/uploads/20250917/e0bd2f24b25ad41d78524d567797408f.png"></image>
<view class="flex-1 w-1rpx">可用积分<text class="points-num">{{userInfo.score||0}}</text></view>
<view class="points-btn" @click="gotoPath('/subPackages/pointsMall/index')">兑换商品</view>
</view>
<view class="my-order">
<view class="orderBox">
<navigator :url="'/subPackages/order/trades'" class="moreBox flex-between">
我的订单
<span class="flex-between">
全部订单
<image src="https://static.ticket.sz-trip.com/tongli/images/user/rightIcon1.png" mode=""></image>
<image src="https://static.ticket.sz-trip.com/uploads/20251011/b0d85d510903fdd7f18c29b4ba375bf6.png" mode=""></image>
</span>
</navigator>
<view class="flex-around" style="margin-top: 20rpx;flex-wrap: wrap;justify-content: flex-start;">
<view style="margin-top: 30rpx;display: flex;flex-wrap: wrap;">
<view class="orderItem" v-for="(item,index) in orderList" :key="index" @click="goTrades(item)">
<img :src="item.src" alt="">
<view>{{item.title}}</view>
<view class="count" v-if="item.needCount&&item.count>0">{{item.count}}</view>
</view>
</view>
<!-- 待付款轮播 -->
@ -54,54 +63,45 @@
</swiper-item>
</swiper> -->
</view>
</view>
</view>
<view class="cygj">
<view v-for="(item,index) in cyList" :key="index"
@click="gotoUrl(item,index)" v-if="item.isShow">
<!-- <button id="contact" class="cyItem flex-between" open-type="contact" bindcontact="handleContact" session-from="sessionFrom" v-if="index == 2">
<view class="flex-center">
<img src="https://static.ticket.sz-trip.com/shiweisuzhou/images/user/lxkf.png" class="headIcon">
联系我们
</view>
<img src="https://static.ticket.sz-trip.com/dongtai/images/user/rightIcon-gray.png" class="rightIcon">
</button> -->
<view class="cyItem flex-between">
<view class="flex-center">
<view class="moreBox">我的服务</view>
<view style="display:flex;align-items:center;flex-wrap:wrap">
<view :class="['cyItem',item.customClass]" v-for="(item,index) in cyList.filter(x=>x.isShow)" :key="index"
@click="gotoUrl(item,index)">
<img :src="item.src" class="headIcon">
{{item.title}}
</view>
<img src="https://static.ticket.sz-trip.com/yandu/images/user/rightIcon-gray.png" class="rightIcon">
<view>{{item.title}}</view>
</view>
</view>
</view>
<!-- 用户推荐 -->
<view class="recommend-box" v-if="hotList.length>0">
<image src="https://static.ticket.sz-trip.com/uploads/20250917/83982f331fb3ee8b084c313645dcabe1.png" mode="aspectFill" class="rmtj-img" ></image>
<view class="new-hot-box hot-box" >
<view class="recommend-box" >
<view class="type-container flex-center">
<view :class="['type-item',typeIndex==0?'active':'']" @click="changeTypeIndex(0)">为您推荐</view>
<!-- <view :class="['type-item',typeIndex==1?'active':'']" @click="changeTypeIndex(1)">我的常买</view> -->
</view>
<view class="new-hot-box hot-box" v-if="hotList.length>0">
<image class="hot-adv" v-if="hotAdv" :src="hotAdv.head_img" mode="aspectFill" @click.stop="gotoBannerDetail(hotAdv)"></image>
<view v-for="(item,index) in hotList" :key="index" class="hot-item" @click="gotoDetailByType(item)">
<image :src="item.headimg" mode="aspectFill"></image>
<view class="hot-content">
<view class="title text-overflowRows">{{item.title}}</view>
<view class="flex-between">
<view class="price">{{item.price / 100}}</view>
<view class="btn-buy">
<image src="https://static.ticket.sz-trip.com/uploads/20251011/c8e4e3c91033663610e0c1e0e4823daa.png"></image>
</view>
</view>
</view>
</view>
<!-- 旅游咨询弹框 -->
<uni-popup ref="popup" type="center">
<view class="consult-popup">
即将拨打客服电话
<view class="consult-subtitle">服务时间周一至周五<br>8:30-11:3014:30-18:00</view>
<view class="consult-btns">
<view @click="$refs.popup.close()">取消</view>
<view @click="clickPhone('0515-69186109')">确定</view>
</view>
</view>
</view>
<!-- 图片 -->
<uni-popup ref="popup" type="center">
<image class="consult-popup" :src="popshowImg" :show-menu-by-longpress="true"></image>
</uni-popup>
<uni-popup ref="kfpopup" type="bottom" :safe-area="false">
@ -156,90 +156,111 @@
},
data() {
return {
couponNum: 0,
dfkList: [],
differTimeList: [],
nowDateTime: '', //
userInfo: {},
orderList: [{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/dfki.png',
src: 'https://static.ticket.sz-trip.com/uploads/20251011/785234bf4df1fac233ee020627cdc262.png',
title: '待付款',
status: 'WAIT_PAYMENT'
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/dfh.png',
src: 'https://static.ticket.sz-trip.com/uploads/20251011/806d65eb846e60a98352ba09d8660ce7.png',
title: '待发货',
status: 'WAIT_POST'
status: 'WAIT_POST',
count: 0,
needCount: true
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/dcx.png',
src: 'https://static.ticket.sz-trip.com/uploads/20251011/f3ea0d6a80ae0e10be1b974ad10955fb.png',
title: '待使用/出行',
status: 'WAIT_USE'
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/dsh.png',
src: 'https://static.ticket.sz-trip.com/uploads/20251011/4c0812afada05c7005c213a9f012955e.png',
title: '待收货',
status: 'WAIT_DELIVERY'
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/tksh.png',
src: 'https://static.ticket.sz-trip.com/uploads/20251011/7a0bc28efe4ef85d3c2ed98277afcd00.png',
title: '退款/售后',
status: 'NEED_REFUND'
},
],
cyList: [
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/yhq.png',
src: 'https://static.ticket.sz-trip.com/uploads/20251011/aa4ad71297f5b96b0f14696143a38ea1.png',
title: '优惠券',
path: '/subPackages/user/coupon',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/cxr.png',
src: 'https://static.ticket.sz-trip.com/uploads/20251011/19fff40782bc7d9a9c78ed5c394dc030.png',
title: '出行人',
path: '/subPackages/user/travelerList?showType=0',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/lxkf.png',
title: '联系我们',
path: '',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/shdz.png',
src: 'https://static.ticket.sz-trip.com/uploads/20251011/c9c81700bc66a8d4dc26757aa6737dfa.png',
title: '收货地址',
path: '/subPackages/user/travelerList?showType=1',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/shhx.png',
src: 'https://static.ticket.sz-trip.com/uploads/20251011/c7e34c9011fc80966520b2c06a4faaf5.png',
title: '商户核销',
path: '',
isShow: true,
webUrl: "https://supplier-h5.sutenong.com",
},
// {
// src: 'https://static.ticket.sz-trip.com/uploads/20250922/0bfef414c1349797436a78663aac75a3.png',
// title: '',
// path: '/subPackages/rewards/index',
// isShow: true,
// },
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/yhxy.png',
src: 'https://static.ticket.sz-trip.com/uploads/20251011/5d884b6d3abf2d38fdffa928795184a7.png',
title: '积分商城',
path: '/subPackages/pointsMall/index',
isShow: true,
},
{
src: 'https://static.ticket.sz-trip.com/uploads/20251011/8020e99149c493a838c2b136560509ec.png',
title: '联系客服',
path: '',
isShow: true,
isKeFU: true,
},
{
src: 'https://static.ticket.sz-trip.com/uploads/20251011/bcd540021d5ee3bc4051b9116299c9df.png',
title: '公众号',
path: '',
isShow: true,
GZHImg: "https://static.ticket.sz-trip.com/uploads/20251011/40183cb1d655217642c34da3baea4e28.jpg"
},
{
src: 'https://static.ticket.sz-trip.com/uploads/20251011/a1c19ffa332ff9a5de9fcc983874baea.png',
title: '进群抽奖',
path: '/subPackages/activity/prizeInQun',
isShow: true,
customClass: "prize",
},
{
src: 'https://static.ticket.sz-trip.com/uploads/20251011/c6c29ace07206eec5418fb51068fa4ca.png',
title: '用户协议',
path: '/subPackages/user/privacyInfo?id=9',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/yszc.png',
src: 'https://static.ticket.sz-trip.com/uploads/20251011/b22eac8abd4639fa166195f91c78c6e6.png',
title: '隐私管理',
path: '/subPackages/user/privacyInfo?id=12',
isShow: true
}
],
popshowImg: "",
hotList: [],
hotAdv: null,
finished: false,
typeIndex: 0,
}
},
onReady () {
@ -247,24 +268,19 @@
},
onShow() {
// token
// this.Post({
// token: ''
// },'/api/uservice/user/getMyInfo').then(res => {
// this.$store.commit('changeUserInfo', res.data);
// })
this.Post({}, "/api/uservice/user/getMyInfo").then(res => {
this.Post({noShowLoading: true}, "/api/uservice/user/getMyInfo").then(res => {
if (res.data) {
let info = res.data;
info.token = JSON.parse(uni.getStorageSync('userInfo')).token || this.$store.state.user.userInfo.token
this.$store.commit('changeUserInfo', info)
this.userInfo = info
uni.setStorageSync('isFlag', true)
this.getCouponNum()
this.getDFH()
}
console.log(this.userInfo)
})
// this.dfkList = []
// this.nowDateTime = parseInt(new Date().getTime() / 1000)
// this.Post({}, "/api/user/userInfo").then((res) => {
@ -348,6 +364,21 @@
}
})
},
//
getDFH() {
let params = {
offset: 0,
limit: 1,
state: 'WAIT_POST',
noShowLoading: true,
}
this.Post(params, '/api/order/list').then(res => {
if (res) {
this.orderList[1].count = res.data.total || 0
}
})
},
goToOrderDetail(item) {
uni.navigateTo({
url: '/subPackages/order/detail?id=' + item.order_id
@ -384,19 +415,30 @@
// this.$refs.popup.open('center')
// },
gotoUrl(item, index) {
if (index == 2) {
this.$refs.kfpopup.open()
return;
}
if (index == 4) {
if (item.path) {
uni.navigateTo({
url:'/subPackages/webPage/webPage?url='+item.webUrl
url: item.path
})
return
}
if (item.webUrl) {
uni.navigateTo({
url: item.path
url:'/subPackages/webPage/webPage?url='+item.webUrl
})
return
}
if (item.isKeFU) {
this.$refs.kfpopup.open()
return;
}
if (item.GZHImg) {
this.popshowImg = item.GZHImg;
this.$refs.popup.open()
return
}
this.qidai()
},
qidai() {
uni.showToast({
@ -430,18 +472,86 @@
// });
},
getCouponNum () {
this.Post({
status: 1,
offset: 0,
limit: 100,
noShowLoading: true,
}, "/api/coupon/get_user_list").then((res) => {
if (res) {
this.couponNum = res.data.length
}
});
},
changeTypeIndex (typeIndex) {
if (typeIndex != this.typeIndex) {
this.typeIndex = typeIndex
this.hotList = []
this.hotAdv = null
this.finished = false
// todo
}
},
getHotList() {
this.Post({
tag_id: this.envPropObj.use_recommend_tag_id,
// tag_id: 648,
offset: this.hotList.length,
limit: 4,
limit: 5,
order: "sales_number"
},'/api/product/get_product_by_tag').then(res => {
this.hotList = res.data.list || []
},'/api/product/get_product_by_type').then(res => {
this.hotList = [...this.hotList, ...res.data.list]
if(res.data.list.length < 5) this.finished = true
})
// 广
if (!this.hotAdv) {
this.Post({
type_id: 5,
position: 6,
},"/api/adv/getAdv").then(res => {
if (res) {
if (Array.isArray(res.data) && res.data.length>0)
this.hotAdv = res.data[0]
}
});
}
},
// 广
gotoBannerDetail(item) {
// 1 2 3 4
switch (item.jump_type){
case 1:
this.gotoDetailByType(item.product_model)
break;
case 2:
this.gotoPath(item.front_model.inside)
break;
case 3:
this.gotoWebUrl(item.tdata.url)
break;
case 4:
// #ifdef MP-WEIXIN
uni.navigateToMiniProgram({
shortLink: item.tdata.url
})
// #endif
break;
default:
break;
}
},
},
onReachBottom() {
setTimeout(() => {
if(!this.finished) this.getHotList()
},1000)
},
}
</script>
@ -457,43 +567,82 @@
.bg {
min-height: 100vh;
overflow-x: hidden;
background-color: #EDF5DC;
}
.topBox {
width: 750rpx;
height: fit-content;
box-sizing: border-box;
background-image: url('https://static.ticket.sz-trip.com/uploads/20250917/ac38f61a85632aa2d946c08a9e76e109.png');
.top-image{
width: 100%;
height: 453.43rpx;
background-image: url("https://static.ticket.sz-trip.com/uploads/20251011/a1f6b25761ddebba529d822db1d54497.png");
background-size: 100% 100%;
padding: 210rpx 26.5rpx 0rpx 26.5rpx;
padding-top: 215rpx;
padding-right: 26rpx;
font-weight: 500;
font-size: 43rpx;
color: #FFFFFF;
text-align: right;
}
.main-content{
width: 750rpx;
background: linear-gradient( 180deg, #FFFFFF 0%, #F1F2F4 100%);
border-radius: 43rpx 43rpx 0rpx 0rpx;
position: relative;
.topIcon {
width: 734.67rpx;
height: 538rpx;
position: absolute;
top: 0;
right: 0;
margin-top: -50rpx;
padding: 38rpx 27rpx;
}
.topBox {
width: 100%;
box-sizing: border-box;
display: flex;
align-items: center;
position: relative;
overflow: visible;
.avatar-box {
width: 120rpx;
height: 120rpx;
height: 80rpx;
position: relative;
display: flex;
flex-direction: column;
width: 100rpx;
flex: 1;
margin-left: 28rpx;
padding-top: 30rpx;
.headImg{
width: 133rpx;
height: 133rpx;
border: 4rpx solid #FFFFFF;
border-radius: 50%;
overflow: hidden;
background: #FFFFFF;
flex-shrink: 0;
position: absolute;
left: 0;
top: -115rpx;
}
.headImg {
width: 100%;
height: 100%;
}
.flex-column-center{
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
height: 80rpx;
flex-shrink: 0;
min-width: 150rpx;
.title{
font-weight: 400;
font-size: 24rpx;
color: #535355;
}
.num{
font-family: DIN Condensed, DIN Condensed;
font-weight: bold;
font-size: 37rpx;
color: #6A8C29;
}
}
.username {
margin-left: 20rpx;
font-size: 40rpx;
color: #000000;
font-weight: 500;
font-size: 32rpx;
color: #1C1C1C;
}
.top-right {
@ -509,168 +658,109 @@
}
}
.points-box{
width: 100%;
height: 133rpx;
background: linear-gradient(90deg, #FCE2C1, #F0BD90);
border-radius: 20rpx;
padding: 18rpx 26rpx 72rpx;
font-weight: 500;
font-size: 25rpx;
color: #6E3D1D;
display: flex;
align-items: center;
image{
width: 24.67rpx;
height: 26.67rpx;
flex-shrink: 0;
}
.flex-1{
padding: 0 12rpx;
margin-top: -8rpx;
display: flex;
align-items: baseline;
}
.points-num{
font-weight: 500;
font-size: 32rpx;
color: #000000;
}
.points-btn{
width: 133rpx;
height: 43rpx;
background: #FCE2C1;
border-radius: 21rpx;
font-weight: 500;
font-size: 25rpx;
color: #6E3D1D;
text-align: center;
line-height: 43rpx;
}
}
.my-order{
width: 100%;
background: #FFFFFF;
border-radius: 20rpx;
margin-top: -53rpx;
height: 266rpx;
}
.orderBox {
width: 100%;
// background: #FFFFFF;
// box-shadow: 0rpx 0rpx 23rpx 0rpx rgba(80, 80, 80, 0.12);
width: 697rpx;
border-radius: 13rpx;
margin: 30rpx auto 0;
background: #F9FFF4;
border-radius: 21rpx 21rpx 21rpx 21rpx;
border: 1rpx solid #DAF7A2;
position: relative;
padding: 26rpx 0;
.moreBox {
height: 84rpx;
padding:0 29rpx;
margin: auto;
font-size: 31rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
padding: 0 13rpx 0 26rpx;
span {
font-weight: 500;
font-size: 25rpx;
color: #100E0E;
font-size: 32rpx;
color: #1C1C1C;
align-items: baseline;
span {
font-weight: 400;
font-size: 24rpx;
color: #8D8D8D;
box-sizing: border-box;
image {
width: 11.33rpx;
width: 20rpx;
height: 20rpx;
margin-left: 18rpx;
margin-left: 8rpx;
}
}
}
.orderItem {
font-weight: 400;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
color: #535355;
width: 20%;
text-align: center;
position: relative;
img {
width: 62rpx;
height: 62rpx;
margin-bottom: 20rpx;
}
}
.orderItem:nth-child(n+6) {
margin-top: 28rpx;
}
}
.lxwm {
width: 696rpx;
height: 447rpx;
background: #FFFFFF;
box-shadow: 0px 4rpx 12rpx 0px rgba(150, 149, 149, 0.3);
border-radius: 20rpx;
margin: auto;
padding: 27rpx 19rpx 0 19rpx;
font-size: 31rpx;
font-family: PingFang SC;
width: 48rpx;
height: 48rpx;
margin-bottom: 12rpx;
}
.count{
width: 24rpx;
height: 24rpx;
background: #EA2A2A;
border-radius: 50%;
position: absolute;
top: -6rpx;
right: 40rpx;
font-weight: bold;
color: #000000;
.midBox {
padding: 26rpx 43rpx 21rpx 44rpx;
box-sizing: border-box;
font-size: 21rpx;
color: #FFFFFF;
text-align: center;
line-height: 24rpx;
img {
width: 265rpx;
height: 252rpx;
border-radius: 15rpx;
}
}
.botBox {
padding: 0 30rpx 0 51rpx;
font-size: 27rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
.orderItem:nth-child(n+6) {
margin-top: 28rpx;
}
}
.cygj {
width: 697rpx;
background: #FFFFFF;
border-radius: 20rpx;
margin: 30rpx auto 0;
padding: 0 27rpx;
font-size: 28rpx;
font-family: PingFang SC;
border-radius: 21rpx 21rpx 21rpx 21rpx;
margin: 20rpx auto 0;
padding: 27rpx 0;
font-weight: 500;
color: #000000;
font-size: 32rpx;
color: #1C1C1C;
.moreBox{
padding:0 29rpx;
font-weight: 500;
font-size: 32rpx;
color: #1C1C1C;
margin-bottom: 28rpx;
}
.cyItem {
height: 106rpx;
width:25%;
display: flex;
align-items: center;
border-bottom: 1rpx solid #D8D8D8;
flex-direction:column;
font-weight: 400;
font-size: 24rpx;
color: #535355;
margin-bottom:28rpx;
.headIcon {
width: 42rpx;
height: 42rpx;
margin-right: 15rpx;
width: 48rpx;
height: 48rpx;
margin-bottom:10rpx;
}
.rightIcon {
width: 20rpx;
height: 20rpx;
}
}
.cyItem:last-child {
border: none;
.prize.cyItem{
color: #F47736;
}
}
@ -784,39 +874,9 @@
}
.consult-popup {
width: 487rpx;
height: 367rpx;
background: #F0F0F0;
border-radius: 20rpx;
padding: 65rpx 0 23rpx;
font-weight: bold;
font-size: 32rpx;
color: #000000;
text-align: center;
.consult-subtitle {
font-weight: 500;
font-size: 27rpx;
color: #333333;
margin-top: 43rpx;
}
.consult-btns {
display: flex;
margin-top: 75rpx;
view {
width: 50%;
font-weight: bold;
font-size: 32rpx;
color: #71B580;
line-height: 54rpx;
}
view:first-child {
border-right: 1rpx solid #D8D8D8;
color: #000000;
}
}
width: 480rpx;
height: 480rpx;
border-radius: 25rpx;
}
/* 弹窗内容容器 */
@ -906,7 +966,7 @@
.recommend-box{
width: 100%;
padding: 66rpx 26.5rpx 0;
padding: 30rpx 0 0;
.rmtj-img{
width: 222rpx;
height: 31.33rpx;
@ -914,7 +974,7 @@
margin: 0 auto;
}
.hot-box {
margin-top: 40rpx;
margin-top: 20rpx;
display: flex;
justify-content: space-between;
&.new-hot-box{
@ -956,22 +1016,68 @@
.price {
font-weight: 500;
font-size: 33rpx;
color: #C3282E;
margin-top: 15rpx;
&:before{
content:"¥";
font-size: 29rpx;
color: #FA0005;
&::before{
content: "¥";
color: 24rpx;
}
&:after{
content:"起";
font-size: 29rpx;
color: #999999;
}
}
.btn-buy{
width: 53rpx;
height: 53rpx;
background: #97AF65;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
image{
width: 32rpx;
height: 32rpx;
}
}
}
}
}
.type-container{
width: 100%;
height: 60rpx;
font-weight: 400;
font-size: 26rpx;
color: #888888;
.type-item{
position: relative;
margin: 0 auto;
background-image: url("https://static.ticket.sz-trip.com/uploads/20251014/8023de50445d70ca73d64eb618e21af9.png");
background-size: 100% 100%;
width: 239.33rpx;
height: 52rpx;
font-weight: 500;
font-size: 29rpx;
color: #212A0D;
text-align: center;
line-height: 52rpx;
}
// .type-item.active{
// font-weight: 500;
// font-size: 30rpx;
// color: #739826;
// }
// .type-item.active::after{
// content: '1';
// width: 20rpx;
// height: 5.33rpx;
// border-radius: 6rpx;
// background: linear-gradient(to right, #719723, #97AF65);
// position: absolute;
// bottom: -10rpx;
// left: calc(50% - 10rpx);
// display: block;
// font-size: 0;
// }
}
</style>

7
static/js/CommonFunction.js

@ -33,6 +33,9 @@ Vue.prototype.formateRichText = str => {
str = str.replace(reg, 'div');
reg = new RegExp("↵", "g");
str = str.replace(reg, '<br />');
str = `<div style="font-size:0">` + str + `</div>`
return str;
}
@ -256,6 +259,10 @@ Vue.prototype.getMaxCoupon = async function (param) {
// H5小程序跳转外部链接
Vue.prototype.gotoWebUrl = url => {
uni.navigateTo({
url: '/subPackages/webPage/webPage?url=' + encodeURIComponent(url)
})
// #ifdef MP-WEIXIN
uni.navigateTo({
url: '/subPackages/webPage/webPage?url=' + encodeURIComponent(url)

4
store/modules/user.js

@ -55,7 +55,9 @@ export default {
// #endif
// #ifdef H5
uni.navigateTo({
url: '/pages/login/phoneLogin'
})
// #endif
},
//订单数据

6
subPackages/activity/agriculturalProd.vue

@ -13,10 +13,10 @@
</view>
</view>
<image class="adv-image" mode="aspectFill" @click="gotoPath('/subPackages/activity/agriculturalProdNH')"
<!-- <image class="adv-image" mode="aspectFill" @click="gotoPath('/subPackages/activity/agriculturalProdNH')"
src="https://static.ticket.sz-trip.com/uploads/20250902/fbb790d1c51d067d30cef50b34f06286.png"></image>
<image class="title-image" style="margin-bottom: 30rpx;" src="https://static.ticket.sz-trip.com/uploads/20250821/e45546af63bafab92ac2e8783d7b079c.png"></image>
-->
<image class="title-image" style="margin:57rpx auto 30rpx;" src="https://static.ticket.sz-trip.com/uploads/20250821/e45546af63bafab92ac2e8783d7b079c.png"></image>
<view class="row-product" v-for="(item,index) in list.slice(0,viewNum)"
:key="index" @click="gotoDetailByType(item)">

41
subPackages/activity/prizeInQun.vue

@ -0,0 +1,41 @@
<template>
<view class="bg">
<image v-if="headImg" :src="showImg(headImg)" class="topImg" mode="widthFix"
:show-menu-by-longpress="true"></image>
</view>
</template>
<script>
export default {
data() {
return {
headImg: null,
}
},
onLoad(option) {
this.getHeadImg(2400)
},
methods: {
getHeadImg (id) {
this.Post({id},'/api/multimedia/detail').then(res => {
this.headImg = res.data.head_img
uni.setNavigationBarTitle({
title:res.data.title
})
});
},
},
}
</script>
<style lang="scss" scoped>
.bg {
width: 750rpx;
min-height: 100vh;
}
.topImg {
width: 100%;
}
</style>

2
subPackages/order/cartOrder.vue

@ -91,7 +91,7 @@
<view class="other-info">
<view class="flex-between">
<view>运费:</view>
<view>{{item.post}}</view>
<view>{{item.post/100}}</view>
</view>
<!-- <view class="flex-between" style="align-items: flex-start;">
<view class="flex-shrink-0">收货人信息:</view>

6
subPackages/user/commentList.vue

@ -29,6 +29,10 @@
</view>
</view>
<view class="no-data-zhanwei" v-if="reviews.length<=0">
<image src="https://static.ticket.sz-trip.com/uploads/20250618/0c2a469b4216f8cd570822b642d0a0fe.png"></image>
<view style="padding:50rpx 0 67rpx">暂无数据</view>
</view>
</view>
</template>
@ -135,7 +139,7 @@
margin-right: 20rpx;
margin-bottom: 20rpx;
}
.imgs:nth-of-type(3) {
.imgs:nth-of-type(3n) {
margin-right: 0;
}
}

9
subPackages/webPage/webPage.vue

@ -10,9 +10,18 @@
}
},
onLoad(option) {
// #ifdef H5
if (option.url) {
let url = decodeURIComponent(option.url)
window.location.replace(url)
}
// #endif
// #ifdef MP-WEIXIN
if (option.url) {
this.url = decodeURIComponent(option.url)
}
// #endif
}
}
</script>

Loading…
Cancel
Save