yyw提交
This commit is contained in:
parent
7c2e14772a
commit
a9248bc1f6
@ -13,4 +13,4 @@
|
|||||||
12. [Android平台隐私与政策提示框](https://uniapp.dcloud.net.cn/tutorial/app-privacy-android.html)
|
12. [Android平台隐私与政策提示框](https://uniapp.dcloud.net.cn/tutorial/app-privacy-android.html)
|
||||||
13. 在ios中,子组件内的dom元素,有时click事件不生效,需要将dom的宽高设置大一下
|
13. 在ios中,子组件内的dom元素,有时click事件不生效,需要将dom的宽高设置大一下
|
||||||
14. 2024-11-16后的销售页面未更新
|
14. 2024-11-16后的销售页面未更新
|
||||||
15. 04-14完成
|
15. 05-08完成
|
||||||
@ -3,8 +3,8 @@ const url = 'https://shop.chutang66.com' // 正式
|
|||||||
// const url = 'http://warehouse.dev.chutang66.com' // 测试
|
// const url = 'http://warehouse.dev.chutang66.com' // 测试
|
||||||
// const url = 'http://192.168.31.70:82' // 本地1
|
// const url = 'http://192.168.31.70:82' // 本地1
|
||||||
// const url = 'http://192.168.30.6:8092' // 本地2
|
// const url = 'http://192.168.30.6:8092' // 本地2
|
||||||
const appId = 'wx73163c7bace1750b'
|
const appId = 'wxfc3c7f3778e3036a'
|
||||||
const protoId = 'gh_ca74730c9f77'
|
const protoId = 'gh_a2bdca31e535'
|
||||||
const webUrl = 'http://uniapp.dcloud.io'
|
const webUrl = 'http://uniapp.dcloud.io'
|
||||||
const name = '妙选商城'
|
const name = '妙选商城'
|
||||||
const version = '1.0.3'
|
const version = '1.0.3'
|
||||||
|
|||||||
@ -81,7 +81,7 @@ import { func } from '../../uni_modules/uview-plus/libs/function/test'
|
|||||||
|
|
||||||
const toMiniProgram = () => {
|
const toMiniProgram = () => {
|
||||||
data.sweixin.launchMiniProgram({
|
data.sweixin.launchMiniProgram({
|
||||||
id: 'gh_ca74730c9f77',
|
id: 'gh_a2bdca31e535',
|
||||||
path: 'pages/user/index?type=kefu'
|
path: 'pages/user/index?type=kefu'
|
||||||
})
|
})
|
||||||
data.showService = false
|
data.showService = false
|
||||||
|
|||||||
@ -37,6 +37,7 @@ export function login() {
|
|||||||
uni.setStorageSync('sessionKey', val.data.session_key)
|
uni.setStorageSync('sessionKey', val.data.session_key)
|
||||||
uni.setStorageSync('saveTime', Date.now()) // 存储时间
|
uni.setStorageSync('saveTime', Date.now()) // 存储时间
|
||||||
uni.setStorageSync('expires_in', val.data.expires_in * 1000) // 失效时间
|
uni.setStorageSync('expires_in', val.data.expires_in * 1000) // 失效时间
|
||||||
|
uni.setStorageSync('is_crop_user', val.data.crop_user)
|
||||||
}
|
}
|
||||||
resolve(val.data)
|
resolve(val.data)
|
||||||
}
|
}
|
||||||
@ -122,8 +123,7 @@ export async function userBind(params) {
|
|||||||
company_id = params.company_id || '',
|
company_id = params.company_id || '',
|
||||||
scene = params.scene
|
scene = params.scene
|
||||||
let has_sale = uni.getStorageSync('has_sale')
|
let has_sale = uni.getStorageSync('has_sale')
|
||||||
let index = getCurrentPages().length - 1
|
let link = '/pages/index/index'
|
||||||
let link = getCurrentPages()[index].route
|
|
||||||
if (from > 0 || company_id || !has_sale) {
|
if (from > 0 || company_id || !has_sale) {
|
||||||
await post('/api/v1/user/bind', {from, s, u, group_id, scene, company_id, link}).then((res) => {
|
await post('/api/v1/user/bind', {from, s, u, group_id, scene, company_id, link}).then((res) => {
|
||||||
uni.setStorageSync('has_sale', true)
|
uni.setStorageSync('has_sale', true)
|
||||||
@ -1030,7 +1030,7 @@ export const toMiniProgram = (path) => {
|
|||||||
}
|
}
|
||||||
sweixin = shares['weixin']
|
sweixin = shares['weixin']
|
||||||
sweixin.launchMiniProgram({
|
sweixin.launchMiniProgram({
|
||||||
id: 'gh_ca74730c9f77',
|
id: 'gh_a2bdca31e535',
|
||||||
path: path
|
path: path
|
||||||
})
|
})
|
||||||
}, function(e) {
|
}, function(e) {
|
||||||
|
|||||||
@ -1,2 +1,4 @@
|
|||||||
// 雪碧图
|
// 雪碧图
|
||||||
export const sp2 = 'https://ct-upimg.yx090.com/g.ii090/images/sprite/11791720144991.jpg'
|
export const sp2 = 'https://ct-upimg.yx090.com/g.ii090/images/sprite/11791720144991.jpg'
|
||||||
|
|
||||||
|
export const provTxt = { 110000:'北京',120000:'天津',130000:'河北',140000:'山西',150000:'内蒙古',210000:'辽宁',220000:'吉林',230000:'黑龙江',310000:'上海',320000:'江苏',330000:'浙江',340000:'安徽',350000:'福建',360000:'江西',370000:'山东',410000:'河南',420000:'湖北',430000:'湖南',440000:'广东',450000:'广西',460000:'海南',500000:'重庆',510000:'四川',520000:'贵州',530000:'云南',540000:'西藏',610000:'陕西',620000:'甘肃',630000:'青海',640000:'宁夏',650000:'新疆',710000:'台湾',810000:'香港',820000:'澳门'}
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
<view class="close" @click="close()"><up-icon name="close" color="#666" /></view>
|
<view class="close" @click="close()"><up-icon name="close" color="#666" /></view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y="true" class="contentBox" @scrolltolower="scorllBottom">
|
<scroll-view scroll-y="true" class="contentBox" @scrolltolower="scorllBottom">
|
||||||
<view class="item" v-for="item in list" :key="item.id">
|
<view class="item" v-for="(item, index) in list" :key="item.id">
|
||||||
<view class="user" v-if="item.user">
|
<view class="user" v-if="item.user">
|
||||||
<image :src="item.user.avatar"></image>
|
<image :src="item.user.avatar"></image>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
@ -23,6 +23,10 @@
|
|||||||
<image :src="it.url" v-if="it.type === 1" @click="viewImg(it, item.material)" mode="aspectFill"></image>
|
<image :src="it.url" v-if="it.type === 1" @click="viewImg(it, item.material)" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="btm">
|
||||||
|
<view style="display: flex;margin-right: 10px;" @click="toPingbi(index)"><up-icon name="eye-off" color="#666" />屏蔽</view>
|
||||||
|
<view style="display: flex;" @click="toTousu(item)"><up-icon name="warning-fill" color="#666" />举报</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="noMore" v-if="list.length && page >= lastPage && !loading">— 没有更多了 —</view>
|
<view class="noMore" v-if="list.length && page >= lastPage && !loading">— 没有更多了 —</view>
|
||||||
@ -102,6 +106,17 @@
|
|||||||
context.emit('close')
|
context.emit('close')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toTousu(item) {
|
||||||
|
let text = '举报用户“' + item.user.nickname + '”' + '在团购ID“' + data.id + '”的评论'
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/mine/msg/complaint?type=2&desc=' + text
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function toPingbi(i) {
|
||||||
|
data.list.splice(i, 1)
|
||||||
|
}
|
||||||
|
|
||||||
watch(props, async (newProps) => {
|
watch(props, async (newProps) => {
|
||||||
if (newProps.show) {
|
if (newProps.show) {
|
||||||
data.show = true
|
data.show = true
|
||||||
@ -119,7 +134,9 @@
|
|||||||
getInfo,
|
getInfo,
|
||||||
close,
|
close,
|
||||||
scorllBottom,
|
scorllBottom,
|
||||||
viewImg
|
viewImg,
|
||||||
|
toPingbi,
|
||||||
|
toTousu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -215,6 +232,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.btm{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #666;
|
||||||
|
padding: 16rpx 24rpx;
|
||||||
|
background: #f6f6f6;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" @click="getHandle()">领取</view>
|
<!-- <view class="btn" @click="getHandle()">领取</view> -->
|
||||||
|
<view class="btn" @click="close()">好的</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</up-overlay>
|
</up-overlay>
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="addrList.length === 0">
|
<view v-if="addrList.length === 0">
|
||||||
<van-empty image="https://ct-upimg.yx090.com/g.ii090/images/sprite/empty/address.png" description="暂无地址信息" />
|
<up-empty mode="list" icon="https://ct-upimg.yx090.com/g.ii090/images/sprite/empty/address.png" text="暂无地址信息"></up-empty>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|||||||
@ -273,7 +273,6 @@
|
|||||||
bgColor: Style[uni.getStorageSync('theme_index') * 1].bgColor,
|
bgColor: Style[uni.getStorageSync('theme_index') * 1].bgColor,
|
||||||
sourceId: 0,
|
sourceId: 0,
|
||||||
sourceType: '',
|
sourceType: '',
|
||||||
isSale: uni.getStorageSync('role') == 1,
|
|
||||||
canClick: true,
|
canClick: true,
|
||||||
remind_stock: false,
|
remind_stock: false,
|
||||||
showPreview: false,
|
showPreview: false,
|
||||||
|
|||||||
@ -210,7 +210,6 @@
|
|||||||
action: false,
|
action: false,
|
||||||
topNum: 0,
|
topNum: 0,
|
||||||
specsNum: 0,
|
specsNum: 0,
|
||||||
isSale: uni.getStorageSync('role') == 1,
|
|
||||||
canClick: true,
|
canClick: true,
|
||||||
remindStock: false
|
remindStock: false
|
||||||
})
|
})
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
"name" : "妙选商城",
|
"name" : "妙选商城",
|
||||||
"appid" : "__UNI__743F2C0",
|
"appid" : "__UNI__743F2C0",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.7",
|
"versionName" : "1.1.1",
|
||||||
"versionCode" : 107,
|
"versionCode" : 111,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
@ -48,7 +48,7 @@
|
|||||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
||||||
"minSdkVersion" : 21,
|
"minSdkVersion" : 21,
|
||||||
"targetSdkVersion" : 30,
|
"targetSdkVersion" : 30,
|
||||||
"schemes" : "miaoxuan"
|
"schemes" : "xiaoman"
|
||||||
},
|
},
|
||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
"ios" : {
|
"ios" : {
|
||||||
@ -58,6 +58,12 @@
|
|||||||
"entitlements" : {
|
"entitlements" : {
|
||||||
"com.apple.developer.associated-domains" : [ "guan.chutang66.com" ]
|
"com.apple.developer.associated-domains" : [ "guan.chutang66.com" ]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"privacyDescription" : {
|
||||||
|
"NSPhotoLibraryUsageDescription" : "获取您的相册用于更新头像",
|
||||||
|
"NSPhotoLibraryAddUsageDescription" : "保存海报到您的相册",
|
||||||
|
"NSCameraUsageDescription" : "拍摄照片以更新头像",
|
||||||
|
"NSLocalNetworkUsageDescription" : "使用您的网络以正常访问APP"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
@ -133,7 +139,7 @@
|
|||||||
"quickapp" : {},
|
"quickapp" : {},
|
||||||
/* 小程序特有相关 */
|
/* 小程序特有相关 */
|
||||||
"mp-weixin" : {
|
"mp-weixin" : {
|
||||||
"appid" : "wx73163c7bace1750b",
|
"appid" : "wxfc3c7f3778e3036a",
|
||||||
"setting" : {
|
"setting" : {
|
||||||
"urlCheck" : false
|
"urlCheck" : false
|
||||||
},
|
},
|
||||||
|
|||||||
@ -543,6 +543,12 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "会员介绍"
|
"navigationBarTitleText": "会员介绍"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "mine/sheng",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "省钱账单"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,96 +18,110 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y="true" @scrolltolower="scorllBottom" style="height: calc(100vh - 90rpx);" lower-threshold="200">
|
<scroll-view scroll-y="true" @scrolltolower="scorllBottom" style="height: calc(100vh - 90rpx);" lower-threshold="200">
|
||||||
<view class="oneBox">
|
|
||||||
<view class="cont">
|
<view class="contBox">
|
||||||
<view class="top">
|
<view class="oneBox">
|
||||||
<view class="rateBox">
|
<view class="cont">
|
||||||
<view class="rate">{{goodCommentRate}}</view>
|
<view class="top">
|
||||||
<text>好评率</text>
|
<view class="rateBox">
|
||||||
|
<view class="rate">{{goodCommentRate}}</view>
|
||||||
|
<text>好评率</text>
|
||||||
|
</view>
|
||||||
|
<view class="star">
|
||||||
|
<up-rate v-model="rateValue" :count="5" allowHalf readonly :size="25" activeColor="#ffd21e" inactiveColor="#eee" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="star">
|
<view class="topBox">
|
||||||
<up-rate v-model="rateValue" :count="5" allowHalf readonly :size="25" activeColor="#ffd21e" inactiveColor="#eee" />
|
<view class="row" v-for="item in tagsList" :key="item.id" :class="tagIndex === item.id ? 'active' : ''" @click="changeTag(item.id)">{{item.name}} <text>{{item.count}}</text></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="topBox">
|
|
||||||
<view class="row" v-for="item in tagsList" :key="item.id" :class="tagIndex === item.id ? 'active' : ''" @click="changeTag(item.id)">{{item.name}} <text>{{item.count}}</text></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="listBox">
|
<view class="listBox">
|
||||||
<view class="item" v-for="item in infoList" :key="item.id">
|
<view class="item" v-for="(item, index) in infoList" :key="item.id">
|
||||||
<view class="userInfo">
|
<view class="cont">
|
||||||
<image :src="item.user.avatar"></image>
|
<view class="userInfo">
|
||||||
<view class="box">
|
<image :src="item.user.avatar"></image>
|
||||||
<view class="right">
|
<view class="box">
|
||||||
<view class="name">{{item.user.nickname}}</view>
|
<view class="user">
|
||||||
<span class="border" v-if="!from">已购{{item.report && item.report.total_trade_count}}次</span>
|
<view class="right">
|
||||||
</view>
|
<view class="name">{{parseName(item.user.nickname)}}</view>
|
||||||
<view class="time" v-if="!from">{{item.date.replace(/-/g, '/')}}发布于{{provTxt[item.order.province_id]}}</view>
|
<span class="border" v-if="!from">已购{{item.report && item.report.total_trade_count}}次</span>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="time" v-if="!from">{{item.date.replace(/-/g, '/')}}发布于{{provTxt[item.order.province_id]}}</view>
|
||||||
|
</view>
|
||||||
<view class="starBox">
|
<view class="starBox">
|
||||||
<view class="rate">
|
<view class="rate">
|
||||||
<view class="star" v-for="i in 5">
|
<view class="star" v-for="i in 5" :key="i">
|
||||||
<up-icon v-if="i <= Math.ceil(item.stars)" name="star-fill" color="#FFD81E" size="18" />
|
<up-icon v-if="i <= Math.ceil(item.stars)" name="star-fill" color="#FFD81E" size="18" />
|
||||||
<up-icon v-else name="star-fill" color="#ccc" :size="18" />
|
<up-icon v-else name="star-fill" color="#ccc" :size="18" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.item" class="sku_name">{{item.item.goods_name}}
|
<view class="tags" v-if="item.tags.length">
|
||||||
<template v-if="item.item.sku_name">【{{item.item.sku_name}}】</template>
|
<text v-for="(it, i) in item.tags" :key="it.id"><template v-if="i != 0"> | </template>{{it.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="tags" v-if="item.tags.length">
|
</view>
|
||||||
<text v-for="(it, i) in item.tags" :key="it.id"><template v-if="i != 0"> | </template>{{it.name}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="comment"><text @longpress="copyComment(item.comment)">{{item.comment}}</text></view>
|
|
||||||
<view class="box_zong" v-if="item.material.length">
|
|
||||||
<view class="box_imgs" v-for="(it, index) in item.material" :key="index">
|
|
||||||
<image :src="it.url" v-if="it.type === 1" @click="hanleImgs(it, item.material)" mode="aspectFill"></image>
|
|
||||||
<template v-else>
|
|
||||||
<image :src="it.img_video" mode="aspectFill"></image>
|
|
||||||
<view class="play" @click="hanleImgs(it)"><up-icon name="play-right-fill" color="#fff" size="40" /></view>
|
|
||||||
</template>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="replyBox" v-if="item.reply">
|
|
||||||
<view>店家回复</view>
|
|
||||||
<view class="text">{{item.reply}}</view>
|
|
||||||
</view>
|
|
||||||
<template v-if="item.add_comments && item.add_comments.length">
|
|
||||||
<view class="addBox" v-for="itm in item.add_comments" :key="itm.id">
|
|
||||||
<view class="tit">
|
|
||||||
<text>{{getDayDiff(itm.created_at.substr(0, 10), item.created_at.substr(0, 10))}}追评</text>
|
|
||||||
<text class="time">{{itm.created_at.substr(0, 16)}}</text>
|
|
||||||
</view>
|
|
||||||
<text class="comment" style="display: inline-block;margin-top: 10rpx;" @longpress="copyComment(itm.comment)">
|
|
||||||
{{itm.comment}}
|
|
||||||
</text>
|
|
||||||
<view class="box_zong" v-if="itm.material.length">
|
|
||||||
<view class="box_imgs" v-for="(it, index) in itm.material" :key="index">
|
|
||||||
<image :src="it.url" v-if="it.type === 1" @click="hanleImgs(it, itm.material)" mode="aspectFill"></image>
|
|
||||||
<template v-else>
|
|
||||||
<image :src="it.img_video" mode="aspectFill"></image>
|
|
||||||
<view class="play" @click="hanleImgs(it)"><up-icon name="play-right-fill" color="#fff" size="40" /></view>
|
|
||||||
</template>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="replyBox itm" v-if="itm.reply">
|
|
||||||
<view>店家回复</view>
|
<view v-if="item.item" class="sku_name">{{item.item.goods_name}}
|
||||||
<view class="text">{{itm.reply}}</view>
|
<template v-if="item.item.sku_name">【{{item.item.sku_name}}】</template>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
|
||||||
|
<view class="comment"><text @longpress="copyComment(item.comment)">{{item.comment}}</text></view>
|
||||||
|
<view class="box_zong" v-if="item.material.length">
|
||||||
|
<view class="box_imgs" v-for="(it, index) in item.material" :key="index">
|
||||||
|
<image :src="it.url" v-if="it.type === 1" @click="hanleImgs(it, item.material)" mode="aspectFill"></image>
|
||||||
|
<template v-else>
|
||||||
|
<image :src="it.img_video" mode="aspectFill"></image>
|
||||||
|
<view class="play" @click="hanleImgs(it)"><up-icon name="play-right-fill" color="#fff" size="40" /></view>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="replyBox" v-if="item.reply">
|
||||||
|
<view>店家回复</view>
|
||||||
|
<view class="text">{{item.reply}}</view>
|
||||||
|
</view>
|
||||||
|
<template v-if="item.add_comments && item.add_comments.length">
|
||||||
|
<view class="addBox" v-for="itm in item.add_comments" :key="itm.id">
|
||||||
|
<view class="tit">
|
||||||
|
<text>{{getDayDiff(itm.created_at.substr(0, 10), item.created_at.substr(0, 10))}}追评</text>
|
||||||
|
<text class="time">{{itm.created_at.substr(0, 16)}}</text>
|
||||||
|
</view>
|
||||||
|
<text class="comment" style="display: inline-block;margin-top: 10rpx;" @longpress="copyComment(itm.comment)">
|
||||||
|
{{itm.comment}}
|
||||||
|
</text>
|
||||||
|
<view class="box_zong" v-if="itm.material.length">
|
||||||
|
<view class="box_imgs" v-for="(it, index) in itm.material" :key="index">
|
||||||
|
<image :src="it.url" v-if="it.type === 1" @click="hanleImgs(it, itm.material)" mode="aspectFill"></image>
|
||||||
|
<template v-else>
|
||||||
|
<image :src="it.img_video" mode="aspectFill"></image>
|
||||||
|
<view class="play" @click="hanleImgs(it)"><up-icon name="play-right-fill" color="#fff" size="40" /></view>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="replyBox itm" v-if="itm.reply">
|
||||||
|
<view>店家回复</view>
|
||||||
|
<view class="text">{{itm.reply}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<view class="btm">
|
||||||
|
<view style="display: flex;margin-right: 10px;" @click="toPingbi(index)"><up-icon name="eye-off" color="#666" />屏蔽</view>
|
||||||
|
<view style="display: flex;" @click="toTousu(item)"><up-icon name="warning-fill" color="#666" />举报</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom" v-if="page >= lastPage && infoList.length && !loading">- 到底啦 -</view>
|
||||||
|
<view class="bottom" v-if="loading"><van-loading type="spinner" size="24px" vertical color="#999">加载中...</van-loading></view>
|
||||||
|
|
||||||
|
<view v-if="!infoList.length && !loading">
|
||||||
|
<up-empty icon="https://ct-upimg.yx090.com/g.ii090/images/sprite/empty/comment.png" mode="comment" text="暂无评价喔" />
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom" v-if="page >= lastPage && infoList.length && !loading">- 到底啦 -</view>
|
|
||||||
<view class="bottom" v-if="loading"><up-loading-icon text="加载中..." textSize="14"></up-loading-icon></view>
|
|
||||||
</view>
|
|
||||||
<view v-if="!infoList.length && !loading">
|
|
||||||
<up-empty icon="https://ct-upimg.yx090.com/g.ii090/images/sprite/empty/comment.png" mode="comment" text="暂无评价喔" />
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -123,9 +137,9 @@
|
|||||||
import { get } from '@/api/request.js'
|
import { get } from '@/api/request.js'
|
||||||
import { Style } from '@/utils/list.js'
|
import { Style } from '@/utils/list.js'
|
||||||
import privacyPopup from '@/components/privacyPopup/index.vue'
|
import privacyPopup from '@/components/privacyPopup/index.vue'
|
||||||
import { getDayDiff } from '@/components/common.js'
|
import { judgePrivacy, getDayDiff } from '@/components/common.js'
|
||||||
import videoDialog from '@/components/videoDialog/index.vue'
|
import videoDialog from '@/components/videoDialog/index.vue'
|
||||||
import { provTxt } from '@/components/scene.js'
|
import { provTxt } from '@/components/img.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -217,7 +231,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 复制评论
|
// 复制评论
|
||||||
const copyComment = (text) => {
|
const copyComment = async (text) => {
|
||||||
|
if(await judgePrivacy()) {
|
||||||
|
data.showPrivacy = true
|
||||||
|
return false
|
||||||
|
}
|
||||||
uni.setClipboardData({
|
uni.setClipboardData({
|
||||||
data: String(text),
|
data: String(text),
|
||||||
success: function () {
|
success: function () {
|
||||||
@ -279,6 +297,22 @@
|
|||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parseName(name) {
|
||||||
|
const regex = /^(.{2}).+(.{2})$/
|
||||||
|
return name.replace(regex, '$1**$2')
|
||||||
|
}
|
||||||
|
|
||||||
|
function toTousu(item) {
|
||||||
|
let text = '举报用户“' + item.user.nickname + '”' + '在团购ID“' + data.id + '”的评论'
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/mine/msg/complaint?type=2&desc=' + text
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function toPingbi(i) {
|
||||||
|
data.infoList.splice(i, 1)
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
getDayDiff,
|
getDayDiff,
|
||||||
provTxt,
|
provTxt,
|
||||||
@ -290,7 +324,10 @@
|
|||||||
changeTab,
|
changeTab,
|
||||||
changeTag,
|
changeTag,
|
||||||
getTags,
|
getTags,
|
||||||
toFilter
|
toFilter,
|
||||||
|
parseName,
|
||||||
|
toTousu,
|
||||||
|
toPingbi
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
@ -355,12 +392,23 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
.icon{
|
.icon{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
flex-direction: column;
|
||||||
justify-content: flex-end;
|
justify-content: center;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
width: 30px;
|
padding-top: 3px;
|
||||||
.iconfont{
|
.heng{
|
||||||
font-size: 18px;
|
width: 28rpx;
|
||||||
|
height: 2px;
|
||||||
|
background-color: #444;
|
||||||
|
margin-bottom: 3px;
|
||||||
|
&.er{
|
||||||
|
width: 24rpx;
|
||||||
|
margin-right: 4rpx;
|
||||||
|
}
|
||||||
|
&.san{
|
||||||
|
width: 20rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.box{
|
.box{
|
||||||
@ -397,12 +445,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.oneBox{
|
.contBox{
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
|
}
|
||||||
|
.oneBox{
|
||||||
|
border-bottom: 1rpx solid #e8e8e8;
|
||||||
.cont{
|
.cont{
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 24rpx 24rpx 8rpx;
|
padding: 24rpx 24rpx 8rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx 10rpx 0 0;
|
||||||
}
|
}
|
||||||
.top{
|
.top{
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -445,13 +496,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.listBox{
|
.listBox{
|
||||||
padding: 0 24rpx 24rpx;
|
// padding: 0 24rpx 24rpx;
|
||||||
.item{
|
.item{
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
margin-bottom: 24rpx;
|
border-bottom: 1rpx solid #F5F5F5;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
.cont{
|
||||||
|
padding: 0 0 20rpx;
|
||||||
|
border-bottom: 1rpx solid #f7f2f2;
|
||||||
|
}
|
||||||
.userInfo{
|
.userInfo{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
image{
|
image{
|
||||||
width: 70rpx;
|
width: 70rpx;
|
||||||
@ -460,14 +516,18 @@
|
|||||||
margin-right: 15rpx;
|
margin-right: 15rpx;
|
||||||
}
|
}
|
||||||
.box{
|
.box{
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
.user{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
.right{
|
.right{
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #98989f;
|
color: #98989f;
|
||||||
width: calc(100% - 150rpx);
|
width: calc(100% - 150rpx);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
.name{
|
.name{
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
@ -476,11 +536,10 @@
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
.border{
|
.border{
|
||||||
height: 32rpx;
|
|
||||||
background: rgba(255, 255, 255, 0.39);
|
background: rgba(255, 255, 255, 0.39);
|
||||||
border: 1px solid v-bind('Color');
|
border: 1px solid v-bind('Color');
|
||||||
color: v-bind('Color');
|
color: v-bind('Color');
|
||||||
padding: 0 10rpx;
|
padding: 1px 10rpx;
|
||||||
border-radius: 5rpx;
|
border-radius: 5rpx;
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
@ -493,10 +552,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.sku_name{
|
||||||
|
color: #999;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
.starBox{
|
.starBox{
|
||||||
background-color: #F9F9F9;
|
display: flex;
|
||||||
padding: 16rpx 20rpx 20rpx;
|
align-items: center;
|
||||||
border-radius: 8rpx;
|
margin-top: 6rpx;
|
||||||
.rate{
|
.rate{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -504,16 +568,10 @@
|
|||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.sku_name{
|
|
||||||
color: #999;
|
|
||||||
margin-top: 10rpx;
|
|
||||||
font-size: 24rpx;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.tags{
|
.tags{
|
||||||
margin-top: 16rpx;
|
margin-left: 10rpx;
|
||||||
color: #555;
|
color: #666;
|
||||||
font-size: 24rpx;
|
font-size: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -538,6 +596,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
|
border-radius: 8rpx;
|
||||||
}
|
}
|
||||||
.play{
|
.play{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -549,6 +608,7 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
border-radius: 8rpx;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -585,6 +645,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.btm{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #666;
|
||||||
|
padding: 16rpx 24rpx;
|
||||||
|
background: #f6f6f6;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.bottom {
|
.bottom {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@ -162,7 +162,7 @@
|
|||||||
<text class="description" :class="fontSize == 'small' ? '' : 'large'" user-select v-if="item.description">{{item.description}}</text>
|
<text class="description" :class="fontSize == 'small' ? '' : 'large'" user-select v-if="item.description">{{item.description}}</text>
|
||||||
<template v-if="item.group_goods.length">
|
<template v-if="item.group_goods.length">
|
||||||
<view class="vip_advert" v-if="vip_on == 1 && !is_vip" @tap="to_VipPage">
|
<view class="vip_advert" v-if="vip_on == 1 && !is_vip" @tap="to_VipPage">
|
||||||
<img src="../../static/image/vip_advert.png" alt="" class='vip_advert_img'>
|
<img src="https://ct-upimg.yx090.com/ju8hn6/shop/image/2025/05/26/bACLVRl4jIRw77jmz3Mg3Uz64sYk3sR3OR8Ms9l5.png" alt="" class='vip_advert_img'>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="jumpFloor" v-if="item.types.length < 5" :class="vip_on == 1 && !is_vip ? '' : 'martop'">
|
<view class="item" @click="jumpFloor" v-if="item.types.length < 5" :class="vip_on == 1 && !is_vip ? '' : 'martop'">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
@ -387,13 +387,13 @@
|
|||||||
<view class="edition good-detail" id="goodDetail">
|
<view class="edition good-detail" id="goodDetail">
|
||||||
<template v-for="itm in textModules" :key="itm.id">
|
<template v-for="itm in textModules" :key="itm.id">
|
||||||
|
|
||||||
<view class="edition_box" :class="item.pic_padding_type ? '' : 'verbtm'" v-if="itm.type == 1">
|
<view class="edition_box" :class="item.pic_padding_type ? '' : 'verbtm'" v-if="itm.type == 1 && (is_crop_user || (!is_crop_user && !itm.only_crop))">
|
||||||
<template v-for="(imgs, index) in itm.imgs" :key="index">
|
<template v-for="(imgs, index) in itm.imgs" :key="index">
|
||||||
<image :src="imgs + '?x-oss-process=image/format,webp'" :webp="true" mode="widthFix" style="width:100%;" @click="preViewImg(imgs, $event)" :lazy-load="true"></image>
|
<image :src="imgs + '?x-oss-process=image/format,webp'" :webp="true" mode="widthFix" style="width:100%;" @click="preViewImg(imgs, $event)" :lazy-load="true"></image>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="edition_box" v-if="itm.type == 2">
|
<view class="edition_box" v-if="itm.type == 2 && (is_crop_user || (!is_crop_user && !itm.only_crop))">
|
||||||
<view class="small_img">
|
<view class="small_img">
|
||||||
<view v-for="(it, index) in itm.img" :key="index" class="imgs">
|
<view v-for="(it, index) in itm.img" :key="index" class="imgs">
|
||||||
<image :src="it + '?x-oss-process=image/format,webp'" :webp="true" mode="aspectFill" @click="viewSmallImg(itm.img, it)"></image>
|
<image :src="it + '?x-oss-process=image/format,webp'" :webp="true" mode="aspectFill" @click="viewSmallImg(itm.img, it)"></image>
|
||||||
@ -401,18 +401,18 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="edition_box" v-if="itm.type == 3" @longpress="showSaveVideo(itm.video_convert || itm.video[0])">
|
<view class="edition_box" v-if="itm.type == 3 && (is_crop_user || (!is_crop_user && !itm.only_crop))" @longpress="showSaveVideo(itm.video_convert || itm.video[0])">
|
||||||
<view class="background flex">
|
<view class="background flex">
|
||||||
<up-icon name="play-right-fill" size="42" color="#fff" @click="viewVideo(itm.video_convert || itm.video[0], $event)" />
|
<up-icon name="play-right-fill" size="42" color="#fff" @click="viewVideo(itm.video_convert || itm.video[0], $event)" />
|
||||||
</view>
|
</view>
|
||||||
<image :src="itm.video_img" mode="widthFix" style="width:100%"></image>
|
<image :src="itm.video_img" mode="widthFix" style="width:100%"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="edition_box text1_box" :class="fontSize == 'small' ? '' : 'large'" v-if="itm.type == 4">
|
<view class="edition_box text1_box" :class="fontSize == 'small' ? '' : 'large'" v-if="itm.type == 4 && (is_crop_user || (!is_crop_user && !itm.only_crop))">
|
||||||
<rich-text :nodes="parseText(itm.text)" :user-select="true"></rich-text>
|
<rich-text :nodes="parseText(itm.text)" :user-select="true"></rich-text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="baseInfo" v-if="itm.type == 5" :class="fontSize == 'small' ? '' : 'large'">
|
<view class="baseInfo" v-if="itm.type == 5 && (is_crop_user || (!is_crop_user && !itm.only_crop))" :class="fontSize == 'small' ? '' : 'large'">
|
||||||
<view class="tit"><up-icon name="grid" size="22" :color="Color" /> 基础信息</view>
|
<view class="tit"><up-icon name="grid" size="22" :color="Color" /> 基础信息</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="row" v-if="itm.spmc"><view class="txt"><view class="span">商品名称</view></view><text>{{itm.spmc}}</text></view>
|
<view class="row" v-if="itm.spmc"><view class="txt"><view class="span">商品名称</view></view><text>{{itm.spmc}}</text></view>
|
||||||
@ -432,7 +432,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="lightBox" v-if="itm.type == 6 && itm.text" :class="fontSize == 'small' ? '' : 'large'">
|
<view class="lightBox" v-if="itm.type == 6 && itm.text && (is_crop_user || (!is_crop_user && !itm.only_crop))" :class="fontSize == 'small' ? '' : 'large'">
|
||||||
<view class="tit"><text class="iconfont icon-lighting"></text> 温馨提示</view>
|
<view class="tit"><text class="iconfont icon-lighting"></text> 温馨提示</view>
|
||||||
<view class="txt">
|
<view class="txt">
|
||||||
<rich-text :nodes="parseText(itm.text)" :user-select="true"></rich-text>
|
<rich-text :nodes="parseText(itm.text)" :user-select="true"></rich-text>
|
||||||
@ -714,7 +714,7 @@
|
|||||||
<view class="goods-btn-icon" @click.stop="openService()">
|
<view class="goods-btn-icon" @click.stop="openService()">
|
||||||
<up-icon name="kefu-ermai" size="22" />
|
<up-icon name="kefu-ermai" size="22" />
|
||||||
<view>客服</view>
|
<view>客服</view>
|
||||||
<view class="addtip" v-if="role == 0 && item.add_cs_tips">
|
<view class="addtip" v-if="item.add_cs_tips">
|
||||||
<image src="https://ct-upimg.yx090.com/ju8hn6/shop/image/2024/08/07/zbR6z0xICjDKjWEcGwTUHBKPTiQZ9dDLfU8eFmTy.png" mode="aspectFit" class="hand"></image>
|
<image src="https://ct-upimg.yx090.com/ju8hn6/shop/image/2024/08/07/zbR6z0xICjDKjWEcGwTUHBKPTiQZ9dDLfU8eFmTy.png" mode="aspectFit" class="hand"></image>
|
||||||
<view class="txt">{{item.add_cs_tips}}</view>
|
<view class="txt">{{item.add_cs_tips}}</view>
|
||||||
<view class="cross flex" @click.stop="item.add_cs_tips = ''">
|
<view class="cross flex" @click.stop="item.add_cs_tips = ''">
|
||||||
@ -2711,7 +2711,7 @@
|
|||||||
this.is_vip = uni.getStorageSync('is_vip') || false
|
this.is_vip = uni.getStorageSync('is_vip') || false
|
||||||
this.img_preview_suffix = uni.getStorageSync('img_preview_suffix') || ''
|
this.img_preview_suffix = uni.getStorageSync('img_preview_suffix') || ''
|
||||||
this.show_explain_video = uni.getStorageSync('show_explain_video')
|
this.show_explain_video = uni.getStorageSync('show_explain_video')
|
||||||
this.group_id = options.id
|
this.group_id = options.id * 1
|
||||||
const _this = this
|
const _this = this
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
|
|||||||
@ -42,9 +42,10 @@
|
|||||||
<view v-if="active == 0">
|
<view v-if="active == 0">
|
||||||
<view class="skeleton" v-if="loading2" style="width: 100%;height: 285rpx;"></view>
|
<view class="skeleton" v-if="loading2" style="width: 100%;height: 285rpx;"></view>
|
||||||
<view class="home-top" v-else>
|
<view class="home-top" v-else>
|
||||||
<swiper v-if="swiperList.length !== 0" class="home-top-swiper" :autoplay="true" :interval="5000" :duration="500" :indicator-dots="true" :circular="true">
|
<swiper v-if="swiperList.length !== 0" :style="{'height': swiperH + 'px'}" class="home-top-swiper" :autoplay="true" :interval="5000" :duration="500" :indicator-dots="true" :circular="true">
|
||||||
<swiper-item v-for="(item, index) in swiperList" :key="index">
|
<swiper-item v-for="(item, index) in swiperList" :key="index">
|
||||||
<image class="item_img" mode="aspectFill" :src="item.pic_url + '?x-oss-process=image/format,webp'" :webp="true" @click="onSwiperItem(item.link, item.id)">
|
<image class="item_img" mode="widthFix" :src="item.pic_url + '?x-oss-process=image/format,webp'"
|
||||||
|
:webp="true" @click="onSwiperItem(item.link, item.id)" @load="computeHeight">
|
||||||
</image>
|
</image>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
@ -366,7 +367,7 @@
|
|||||||
import groupClassify from '@/components/homeList/groupClassify.vue'
|
import groupClassify from '@/components/homeList/groupClassify.vue'
|
||||||
import allGroup from '@/components/homeList/allGroup.vue'
|
import allGroup from '@/components/homeList/allGroup.vue'
|
||||||
import videoList from '@/components/homeList/videoList.vue'
|
import videoList from '@/components/homeList/videoList.vue'
|
||||||
import { getShopInfo, showToast, uvRecord, whetherLogin, getOldDay } from '@/components/common.js'
|
import { getShopInfo, showToast, uvRecord, whetherLogin, getOldDay, userBind } from '@/components/common.js'
|
||||||
import newVip from '@/components/newVip/index.vue'
|
import newVip from '@/components/newVip/index.vue'
|
||||||
import giftsVip from '@/components/giftsVip/index.vue'
|
import giftsVip from '@/components/giftsVip/index.vue'
|
||||||
import { Style } from '@/utils/list.js'
|
import { Style } from '@/utils/list.js'
|
||||||
@ -425,7 +426,8 @@ import { func } from '../../uni_modules/uview-plus/libs/function/test'
|
|||||||
scrollLeft: 0,
|
scrollLeft: 0,
|
||||||
curIndex: 0,
|
curIndex: 0,
|
||||||
today: '',
|
today: '',
|
||||||
dateList: []
|
dateList: [],
|
||||||
|
swiperH: 150
|
||||||
})
|
})
|
||||||
const groupList = ref([]) // 分组
|
const groupList = ref([]) // 分组
|
||||||
const remmendList = ref([])
|
const remmendList = ref([])
|
||||||
@ -812,7 +814,16 @@ import { func } from '../../uni_modules/uview-plus/libs/function/test'
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function computeHeight(e) {
|
||||||
|
var winWid = wx.getSystemInfoSync().windowWidth
|
||||||
|
var imgh = e.detail.height
|
||||||
|
var imgw = e.detail.width
|
||||||
|
var swiperH = (winWid * imgh / imgw).toFixed(2)
|
||||||
|
data.swiperH = swiperH
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
userBind,
|
||||||
getOldDay,
|
getOldDay,
|
||||||
remmendList,
|
remmendList,
|
||||||
whetherLogin,
|
whetherLogin,
|
||||||
@ -849,7 +860,8 @@ import { func } from '../../uni_modules/uview-plus/libs/function/test'
|
|||||||
getRankList,
|
getRankList,
|
||||||
getTypeDateList,
|
getTypeDateList,
|
||||||
toGoods,
|
toGoods,
|
||||||
onNetworkStatusChange
|
onNetworkStatusChange,
|
||||||
|
computeHeight
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -870,12 +882,20 @@ import { func } from '../../uni_modules/uview-plus/libs/function/test'
|
|||||||
await this.getRankList()
|
await this.getRankList()
|
||||||
await this.getTypeDateList()
|
await this.getTypeDateList()
|
||||||
|
|
||||||
// if(whetherLogin()) {
|
if(whetherLogin()) {
|
||||||
// this.getNum()
|
this.getNum()
|
||||||
// // 判断是否有新人优惠券
|
// 判断是否有新人优惠券
|
||||||
// this.judgeHasNewVip()
|
this.judgeHasNewVip()
|
||||||
// this.getGiftsInfo()
|
this.getGiftsInfo()
|
||||||
// }
|
var parmas = {
|
||||||
|
from: 0,
|
||||||
|
s: 0,
|
||||||
|
u: 0,
|
||||||
|
scene: '',
|
||||||
|
company_id: ''
|
||||||
|
}
|
||||||
|
this.userBind(parmas)
|
||||||
|
}
|
||||||
|
|
||||||
this.isShowArrow()
|
this.isShowArrow()
|
||||||
this.getZongHe()
|
this.getZongHe()
|
||||||
@ -1046,17 +1066,15 @@ import { func } from '../../uni_modules/uview-plus/libs/function/test'
|
|||||||
animation: fade 2s infinite;
|
animation: fade 2s infinite;
|
||||||
}
|
}
|
||||||
.whole{
|
.whole{
|
||||||
background-color: $uni-bg-color;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
.home {
|
.home {
|
||||||
padding-bottom: calc(110rpx + env(safe-area-inset-bottom));
|
padding-bottom: calc(110rpx + env(safe-area-inset-bottom));
|
||||||
.home-top {
|
.home-top {
|
||||||
.home-top-swiper {
|
.home-top-swiper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 285rpx;
|
|
||||||
.item_img {
|
.item_img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<div class="imgbox" @click="toGroups(it.id)">
|
<div class="imgbox" @click="toGroups(it.id)">
|
||||||
<image :src="it.face_img + '?x-oss-process=image/format,webp'" :webp="true" mode="aspectFill" class="img"></image>
|
<image :src="it.face_img + '?x-oss-process=image/format,webp'" :webp="true" mode="aspectFill" class="img"></image>
|
||||||
<view class="out flex" v-if="it.sold_status === 0" @click="toGroups(it.id)">
|
<view class="out flex" v-if="it.sold_status === 0" @click="toGroups(it.id)">
|
||||||
<img src="../../../static/image/presale.png" class="out_img" />
|
<img src="https://ct-upimg.yx090.com/ju8hn6/shop/image/2024/08/21/QBhUheeYWSJ3OGM27fkAufJAlFSA8GBhWjpY5oNy.png" class="out_img" />
|
||||||
</view>
|
</view>
|
||||||
<view class="shield flex">
|
<view class="shield flex">
|
||||||
<img src="https://ct-upimg.yx090.com/ju8hn6/shop/image/2025/03/19/MRObpJsCXIJM7f3JyDNPDeTO5uz0x6uPEnvLW0sW.png" class="img" />
|
<img src="https://ct-upimg.yx090.com/ju8hn6/shop/image/2025/03/19/MRObpJsCXIJM7f3JyDNPDeTO5uz0x6uPEnvLW0sW.png" class="img" />
|
||||||
|
|||||||
@ -267,6 +267,7 @@
|
|||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
this.order_id = (options.order_id || 0) * 1
|
this.order_id = (options.order_id || 0) * 1
|
||||||
this.type = (options.type || 0) * 1
|
this.type = (options.type || 0) * 1
|
||||||
|
this.desc = options.desc || ''
|
||||||
// await this.$onLaunched
|
// await this.$onLaunched
|
||||||
this.getPhone()
|
this.getPhone()
|
||||||
if(this.type == 1) {
|
if(this.type == 1) {
|
||||||
|
|||||||
@ -30,10 +30,10 @@
|
|||||||
<image src="https://ct-upimg.yx090.com/ju8hn6/shop/image/2024/01/16/Cr6cRRhhqYNhScigxIyumyV9hXXMI3vKvsE1jgt0.png" class="out_img" mode="widthFix"></image>
|
<image src="https://ct-upimg.yx090.com/ju8hn6/shop/image/2024/01/16/Cr6cRRhhqYNhScigxIyumyV9hXXMI3vKvsE1jgt0.png" class="out_img" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="out flex" v-else-if="item.group_goods.sold_status === 0">
|
<view class="out flex" v-else-if="item.group_goods.sold_status === 0">
|
||||||
<image src="../../../static/image/presale.png" class="out_img" mode="widthFix"></image>
|
<image src="https://ct-upimg.yx090.com/ju8hn6/shop/image/2024/08/21/QBhUheeYWSJ3OGM27fkAufJAlFSA8GBhWjpY5oNy.png" class="out_img" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="out flex" v-else-if="item.group_goods.total_stock === 0">
|
<view class="out flex" v-else-if="item.group_goods.total_stock === 0">
|
||||||
<image src="../../../static/image/soldout.png" class="out_img" mode="widthFix"></image>
|
<image src="https://ct-upimg.yx090.com/ju8hn6/shop/image/2024/08/21/pMTv6QiZZEpSqkJmk7hMcbEzIuNzMyp7YVBbe42H.png" class="out_img" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
@ -137,7 +137,6 @@
|
|||||||
// await this.$onLaunched
|
// await this.$onLaunched
|
||||||
this.fetchList()
|
this.fetchList()
|
||||||
this.Color = uni.getStorageSync('theme_color')
|
this.Color = uni.getStorageSync('theme_color')
|
||||||
this.role = uni.getStorageSync('role')
|
|
||||||
this.priceColor = Style[uni.getStorageSync('theme_index') * 1].priceColor
|
this.priceColor = Style[uni.getStorageSync('theme_index') * 1].priceColor
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
|
|||||||
@ -161,7 +161,6 @@
|
|||||||
await this.getShareInfo()
|
await this.getShareInfo()
|
||||||
this.fetchList()
|
this.fetchList()
|
||||||
this.Color = uni.getStorageSync('theme_color')
|
this.Color = uni.getStorageSync('theme_color')
|
||||||
this.role = uni.getStorageSync('role')
|
|
||||||
this.priceColor = Style[uni.getStorageSync('theme_index') * 1].priceColor
|
this.priceColor = Style[uni.getStorageSync('theme_index') * 1].priceColor
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
|
|||||||
@ -3,6 +3,11 @@
|
|||||||
<view class="bg" style="background-image: url('https://ct-upimg.yx090.com/ju8hn6/shop/image/2022/09/28/18LCzYIb3qp8LyvlqCKdNs463Pi0z7LqYiKWrJJY.png');">
|
<view class="bg" style="background-image: url('https://ct-upimg.yx090.com/ju8hn6/shop/image/2022/09/28/18LCzYIb3qp8LyvlqCKdNs463Pi0z7LqYiKWrJJY.png');">
|
||||||
</view>
|
</view>
|
||||||
<view class="wenzi"><text>根据店铺销量计算,每小时更新</text></view>
|
<view class="wenzi"><text>根据店铺销量计算,每小时更新</text></view>
|
||||||
|
<view class="tabBox">
|
||||||
|
<view class="row" :class="curTab == 'day' ? 'on' : ''" @click="changeTab('day')">日榜单</view>
|
||||||
|
<view class="row" :class="curTab == 'month' ? 'on' : ''" @click="changeTab('month')">月榜单</view>
|
||||||
|
<view class="pie" :class="curTab == 'month' ? 'right' : ''"></view>
|
||||||
|
</view>
|
||||||
<view class="goodbox" v-if="goodsList.length !== 0">
|
<view class="goodbox" v-if="goodsList.length !== 0">
|
||||||
<view class="item" v-for="(item, index) in goodsList" :key="item.id">
|
<view class="item" v-for="(item, index) in goodsList" :key="item.id">
|
||||||
<view class="left" @click="toGroups(item.id)">
|
<view class="left" @click="toGroups(item.id)">
|
||||||
@ -48,20 +53,22 @@
|
|||||||
goodsList: [],
|
goodsList: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
showTop: false,
|
showTop: false,
|
||||||
Color: ''
|
Color: '',
|
||||||
|
curTab: 'day'
|
||||||
})
|
})
|
||||||
|
|
||||||
function getFetchList() {
|
function getFetchList(val = 0) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
mask: true,
|
mask: true,
|
||||||
title: '加载中'
|
title: '加载中'
|
||||||
})
|
})
|
||||||
get('/api/app/top', {
|
get('/api/v1/top', {
|
||||||
page: data.page,
|
page: data.page,
|
||||||
pageSize: 20
|
pageSize: 20,
|
||||||
|
date_type: data.curTab
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
data.last_page = res.meta.last_page
|
data.last_page = res.meta.last_page
|
||||||
data.goodsList = data.goodsList.concat(res.data)
|
data.goodsList = val == 0 ? res.data : data.goodsList.concat(res.data)
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -79,17 +86,26 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function changeTab(val) {
|
||||||
|
if(data.curTab != val) {
|
||||||
|
data.curTab = val
|
||||||
|
data.page = 1
|
||||||
|
getFetchList(0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(data),
|
...toRefs(data),
|
||||||
getFetchList,
|
getFetchList,
|
||||||
hanletop,
|
hanletop,
|
||||||
toGroups
|
toGroups,
|
||||||
|
changeTab
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (this.page < this.last_page) {
|
if (this.page < this.last_page) {
|
||||||
this.page ++
|
this.page ++
|
||||||
this.getFetchList()
|
this.getFetchList(1)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPageScroll(e) {
|
onPageScroll(e) {
|
||||||
@ -222,4 +238,45 @@
|
|||||||
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.2);
|
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.2);
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
.tabBox{
|
||||||
|
padding: 3px;
|
||||||
|
background-color: #fff;
|
||||||
|
display: flex;
|
||||||
|
width: fit-content;
|
||||||
|
border-radius: 30px;
|
||||||
|
height: 30px;
|
||||||
|
margin: 0 auto 20px;
|
||||||
|
position: relative;
|
||||||
|
.row{
|
||||||
|
width: 100px;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #333;
|
||||||
|
border-radius: 30px;
|
||||||
|
transition: all 0.3s;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
font-size: 28rpx;
|
||||||
|
&.on{
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.pie{
|
||||||
|
width: 100px;
|
||||||
|
height: 30px;
|
||||||
|
background-color: v-bind('Color');
|
||||||
|
pointer-events: none;
|
||||||
|
border-radius: 30px;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
transition: all 0.3s;
|
||||||
|
left: 3px;
|
||||||
|
top: 3px;
|
||||||
|
&.right{
|
||||||
|
left: 103px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -14,9 +14,12 @@
|
|||||||
<text>支付方式</text>
|
<text>支付方式</text>
|
||||||
<text class="text">支付宝支付</text>
|
<text class="text">支付宝支付</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="pay-info-text">
|
<view class="row">
|
||||||
<text>支付金额</text>
|
<view class="pay-info-text">
|
||||||
<text class="text">¥{{item.total_price}}</text>
|
<text>支付金额</text>
|
||||||
|
<text class="text">¥{{item.total_price}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="vip_desc" v-if="vipSave * 100 > 0">会员本单为您节省{{vipSave}}元</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pay-info-text">
|
<view class="pay-info-text">
|
||||||
<text>支付状态</text>
|
<text>支付状态</text>
|
||||||
@ -107,7 +110,9 @@
|
|||||||
lastPage: 0,
|
lastPage: 0,
|
||||||
hotList: [],
|
hotList: [],
|
||||||
scoreShareInfo: {},
|
scoreShareInfo: {},
|
||||||
showCase: false
|
showCase: false,
|
||||||
|
showDing: false,
|
||||||
|
vipSave: 0
|
||||||
})
|
})
|
||||||
|
|
||||||
async function getInfo() {
|
async function getInfo() {
|
||||||
@ -119,9 +124,13 @@
|
|||||||
}
|
}
|
||||||
data.item = res.data
|
data.item = res.data
|
||||||
let price = 0
|
let price = 0
|
||||||
|
let am = 0
|
||||||
if (data.type == 1) {
|
if (data.type == 1) {
|
||||||
let oeder = res.data.orders
|
let oeder = res.data.orders
|
||||||
oeder.forEach((i) => {
|
oeder.forEach((i) => {
|
||||||
|
if(i.orderVipSaved && i.orderVipSaved.total_saved_money * 100 > 0) {
|
||||||
|
am += i.orderVipSaved.total_saved_money * 100
|
||||||
|
}
|
||||||
i.items.forEach((j) => {
|
i.items.forEach((j) => {
|
||||||
if (j.price * 1 > price) {
|
if (j.price * 1 > price) {
|
||||||
price = j.price
|
price = j.price
|
||||||
@ -130,6 +139,9 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
if(res.data.orderVipSaved && res.data.orderVipSaved.total_saved_money * 100 > 0) {
|
||||||
|
am = res.data.orderVipSaved.total_saved_money * 100
|
||||||
|
}
|
||||||
let list = res.data.items
|
let list = res.data.items
|
||||||
list.forEach((j) => {
|
list.forEach((j) => {
|
||||||
if (j.price > price) {
|
if (j.price > price) {
|
||||||
@ -138,7 +150,7 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log(data.goods)
|
data.vipSave = (am / 100).toFixed(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
function toOrder() {
|
function toOrder() {
|
||||||
@ -354,9 +366,8 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 90rpx;
|
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
padding: 24rpx 0;
|
||||||
.text {
|
.text {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #555555;
|
color: #555555;
|
||||||
@ -365,6 +376,20 @@
|
|||||||
&-text:not(:last-child) {
|
&-text:not(:last-child) {
|
||||||
border-bottom: 2rpx solid #e5e5e5;
|
border-bottom: 2rpx solid #e5e5e5;
|
||||||
}
|
}
|
||||||
|
.row{
|
||||||
|
padding: 24rpx 0;
|
||||||
|
border-bottom: 2rpx solid #e5e5e5;
|
||||||
|
.pay-info-text{
|
||||||
|
border-bottom: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.vip_desc{
|
||||||
|
color: #FFA953;
|
||||||
|
text-align: right;
|
||||||
|
font-size: 26rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-btn {
|
&-btn {
|
||||||
|
|||||||
@ -29,14 +29,13 @@
|
|||||||
<view class="right">
|
<view class="right">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<text class="name">{{vip_name}}会员</text>
|
<text class="name">{{vip_name}}会员</text>
|
||||||
<view class="day">
|
<view class="day" @click="toPage('/pages/vip/mine/sheng')" v-if="save_money * 100 > 0">
|
||||||
<text>剩余{{days}}天</text>
|
<text>累计节省{{save_money}}元></text>
|
||||||
<view class="progress">
|
|
||||||
<view class="percentage" :style="{'width': + progress + '%'}"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="time">会员有效期至:{{userNum.vip_end_time}}</view>
|
<view class="time">会员有效期至:{{userNum.vip_end_time.slice(0, 10)}}
|
||||||
|
<view class="fill" v-if="showBirth" @click="toPage('/pages/mine/other/userinfo')">填写我的生日<up-icon name="arrow-right" color="#C18F3F" size="10" /></view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="btn" @click="toVip">会员详情</text>
|
<text class="btn" @click="toVip">会员详情</text>
|
||||||
@ -167,6 +166,7 @@ export default {
|
|||||||
components: { tabbar, cfCloud },
|
components: { tabbar, cfCloud },
|
||||||
setup() {
|
setup() {
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
|
showBirth: false,
|
||||||
Color: '',
|
Color: '',
|
||||||
priceColor: '',
|
priceColor: '',
|
||||||
tagColor: '',
|
tagColor: '',
|
||||||
@ -193,7 +193,8 @@ export default {
|
|||||||
score_on: 0,
|
score_on: 0,
|
||||||
statusBarHeight: 0,
|
statusBarHeight: 0,
|
||||||
showSet: false,
|
showSet: false,
|
||||||
isIOS: false
|
isIOS: false,
|
||||||
|
save_money: 0
|
||||||
})
|
})
|
||||||
|
|
||||||
const user = reactive({
|
const user = reactive({
|
||||||
@ -254,6 +255,19 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getDetail = () => {
|
||||||
|
if(data.vip_on == 1 && data.userNum.is_vip) {
|
||||||
|
get('/api/v1/user/detail').then((res) => {
|
||||||
|
data.save_money = res.data.total_saved_money
|
||||||
|
if(!res.data.birthday) {
|
||||||
|
data.showBirth = true
|
||||||
|
} else {
|
||||||
|
data.showBirth = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(data),
|
...toRefs(data),
|
||||||
...toRefs(user),
|
...toRefs(user),
|
||||||
@ -262,14 +276,13 @@ export default {
|
|||||||
getUserNum,
|
getUserNum,
|
||||||
toVip,
|
toVip,
|
||||||
getStoreInfo,
|
getStoreInfo,
|
||||||
getUserInfo
|
getUserInfo,
|
||||||
|
getDetail
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
// await this.$onLaunched
|
// await this.$onLaunched
|
||||||
if (plus.os.name === 'iOS') {
|
|
||||||
this.isIOS = true
|
|
||||||
}
|
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
this.statusBarHeight = res.statusBarHeight
|
this.statusBarHeight = res.statusBarHeight
|
||||||
@ -293,6 +306,9 @@ export default {
|
|||||||
this.Color = uni.getStorageSync('theme_color')
|
this.Color = uni.getStorageSync('theme_color')
|
||||||
this.priceColor = Style[uni.getStorageSync('theme_index') * 1].priceColor
|
this.priceColor = Style[uni.getStorageSync('theme_index') * 1].priceColor
|
||||||
this.tagColor = Style[uni.getStorageSync('theme_index') * 1].tagColor
|
this.tagColor = Style[uni.getStorageSync('theme_index') * 1].tagColor
|
||||||
|
setTimeout(() => {
|
||||||
|
this.getDetail()
|
||||||
|
}, 500)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -400,12 +416,13 @@ export default {
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
.btn {
|
.btn {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
width: 160rpx;
|
width: 140rpx;
|
||||||
height: 56rpx;
|
height: 56rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 56rpx;
|
line-height: 56rpx;
|
||||||
background: #333333;
|
background: #333;
|
||||||
border-radius: 28rpx;
|
border-radius: 28rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.item1 {
|
.item1 {
|
||||||
@ -440,43 +457,37 @@ export default {
|
|||||||
}
|
}
|
||||||
.right {
|
.right {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
.top {
|
.top{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.name {
|
.name{
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #553504;
|
color: #553504;
|
||||||
}
|
}
|
||||||
.day {
|
.day{
|
||||||
font-size: 24rpx;
|
color: #644417;
|
||||||
color: #555;
|
margin-left: 20rpx;
|
||||||
margin: 0 auto;
|
text{
|
||||||
text-align: center;
|
font-size: 24rpx;
|
||||||
position: relative;
|
font-weight: 600;
|
||||||
text {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
.progress {
|
|
||||||
height: 10rpx;
|
|
||||||
width: 200rpx;
|
|
||||||
background-color: #747682;
|
|
||||||
border-radius: 50rpx;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
overflow: hidden;
|
|
||||||
.percentage {
|
|
||||||
height: 100%;
|
|
||||||
background-color: #333333;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.time {
|
.time {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #555555;
|
color: #555555;
|
||||||
|
margin-top: 8rpx;
|
||||||
|
.fill{
|
||||||
|
border: 1rpx solid #C49445;
|
||||||
|
font-size: 22rpx;
|
||||||
|
line-height: 1;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 2px 3px;
|
||||||
|
color: #C18F3F;
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 8rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,9 +18,9 @@
|
|||||||
|
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<text>生日</text>
|
<text>生日</text>
|
||||||
<view class="right" @click="openTime()">
|
<view class="right" @click="can_uplate ? openTime() : ''">
|
||||||
<text>{{info.birthday}}</text>
|
<text>{{info.birthday}}</text>
|
||||||
<up-icon name="arrow-right" color="#999" size="14" />
|
<up-icon name="arrow-right" color="#999" size="14" v-if="can_uplate" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -74,7 +74,8 @@ import { func } from '../../uni_modules/uview-plus/libs/function/test'
|
|||||||
currentDate: '',
|
currentDate: '',
|
||||||
is_default_avatar: uni.getStorageSync('is_default_avatar'),
|
is_default_avatar: uni.getStorageSync('is_default_avatar'),
|
||||||
Color: uni.getStorageSync('theme_color'),
|
Color: uni.getStorageSync('theme_color'),
|
||||||
minDate: new Date('1900-01-01').getTime()
|
minDate: new Date('1900-01-01').getTime(),
|
||||||
|
can_uplate: false
|
||||||
})
|
})
|
||||||
|
|
||||||
function getInfo() {
|
function getInfo() {
|
||||||
@ -82,6 +83,7 @@ import { func } from '../../uni_modules/uview-plus/libs/function/test'
|
|||||||
data.info = res.data
|
data.info = res.data
|
||||||
data.nickName = res.data.nickname
|
data.nickName = res.data.nickname
|
||||||
data.avatarUrl = res.data.avatar
|
data.avatarUrl = res.data.avatar
|
||||||
|
data.can_uplate = res.data.birthday ? false : true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -72,7 +72,7 @@
|
|||||||
<text>账号密码登录</text>
|
<text>账号密码登录</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="icon" @click="first_method = 'wx'" v-if="first_method != 'wx'">
|
<view class="icon" @click="first_method = 'wx'" v-if="first_method != 'wx' && existWx">
|
||||||
<text class="iconfont icon-weixin"></text>
|
<text class="iconfont icon-weixin"></text>
|
||||||
<text>微信登录</text>
|
<text>微信登录</text>
|
||||||
</view>
|
</view>
|
||||||
@ -106,7 +106,8 @@
|
|||||||
veri_code: '',
|
veri_code: '',
|
||||||
tips: '',
|
tips: '',
|
||||||
loading: false,
|
loading: false,
|
||||||
password: ''
|
password: '',
|
||||||
|
existWx: true
|
||||||
})
|
})
|
||||||
|
|
||||||
// 小程序登陆
|
// 小程序登陆
|
||||||
@ -121,7 +122,7 @@
|
|||||||
shares[t.id] = t
|
shares[t.id] = t
|
||||||
}
|
}
|
||||||
shares['weixin'].launchMiniProgram({
|
shares['weixin'].launchMiniProgram({
|
||||||
id: 'gh_ca74730c9f77',
|
id: 'gh_a2bdca31e535',
|
||||||
type: 0, // 0 正式版, 1 测试版, 2 体验版
|
type: 0, // 0 正式版, 1 测试版, 2 体验版
|
||||||
path: 'pages/index/interim?from=app'
|
path: 'pages/index/interim?from=app'
|
||||||
})
|
})
|
||||||
@ -372,6 +373,17 @@
|
|||||||
data.tips = text
|
data.tips = text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkApp(){
|
||||||
|
if(plus.runtime.isApplicationExist({pname:'com.tencent.mm', action:'weixin://'})) {
|
||||||
|
console.log("安装了微信")
|
||||||
|
data.existWx = true
|
||||||
|
} else {
|
||||||
|
console.log("微信应用未安装")
|
||||||
|
data.first_method = 'iphone'
|
||||||
|
data.existWx = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
uCodeRef,
|
uCodeRef,
|
||||||
...toRefs(data),
|
...toRefs(data),
|
||||||
@ -384,14 +396,17 @@
|
|||||||
getCode,
|
getCode,
|
||||||
codeChange,
|
codeChange,
|
||||||
unionidLogin,
|
unionidLogin,
|
||||||
pwdLogin
|
pwdLogin,
|
||||||
|
checkApp
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onLoad(options) {
|
async onLoad(options) {
|
||||||
// await this.$onLaunched
|
// await this.$onLaunched
|
||||||
if (plus.os.name === 'iOS') {
|
if (plus.os.name === 'iOS') {
|
||||||
this.showOther = true
|
this.showOther = true
|
||||||
|
this.checkApp()
|
||||||
}
|
}
|
||||||
|
|
||||||
let login_type = uni.getStorageSync('login_type')
|
let login_type = uni.getStorageSync('login_type')
|
||||||
if(login_type == 'mobile') { // 已经手机号登陆,未授权微信
|
if(login_type == 'mobile') { // 已经手机号登陆,未授权微信
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="whole" @click="toVipPage">
|
<view class="whole">
|
||||||
<image v-for="item in imgList" :src="item" mode="widthFix" class="img"></image>
|
<view @click="toVipPage">
|
||||||
|
<image v-for="item in imgList" :src="item" mode="widthFix" class="img"></image>
|
||||||
|
</view>
|
||||||
|
<view class="btn" v-if="vip_on" @click="toVipPage">{{is_vip ? '续费' : '开通会员'}}</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -8,10 +11,15 @@
|
|||||||
import { ref, reactive, toRefs } from 'vue'
|
import { ref, reactive, toRefs } from 'vue'
|
||||||
import { get, post } from '@/api/request.js'
|
import { get, post } from '@/api/request.js'
|
||||||
import { whetherLogin } from '@/components/common.js'
|
import { whetherLogin } from '@/components/common.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
imgList: []
|
imgList: [],
|
||||||
|
is_vip: uni.getStorageSync('is_vip'),
|
||||||
|
color1: '',
|
||||||
|
color2: '',
|
||||||
|
vip_on: 0
|
||||||
})
|
})
|
||||||
|
|
||||||
// 会员信息
|
// 会员信息
|
||||||
@ -25,9 +33,11 @@
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
data.share_image = res.data.vip_detail_share_image
|
uni.setStorageSync('vip_on', res.data.vip_on)
|
||||||
data.share_title = res.data.vip_detail_share_title
|
data.vip_on = res.data.vip_on
|
||||||
data.imgList = res.data.vip_detail_image
|
data.imgList = res.data.vip_detail_image
|
||||||
|
data.color1 = res.data.extendInfo && res.data.extendInfo.vip_btn_color || '#F8EDCE'
|
||||||
|
data.color2 = res.data.extendInfo && res.data.extendInfo.vip_text_color || '#58341E'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,10 +67,27 @@
|
|||||||
.whole {
|
.whole {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
position: relative;
|
||||||
.img{
|
.img{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
}
|
}
|
||||||
|
.btn{
|
||||||
|
width: 90%;
|
||||||
|
height: 90rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-weight: 600;
|
||||||
|
color: v-bind('color2');
|
||||||
|
background-color: v-bind('color1');
|
||||||
|
position: fixed;
|
||||||
|
z-index: 10;
|
||||||
|
left: 5%;
|
||||||
|
bottom: 40rpx;
|
||||||
|
border-radius: 90rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -169,7 +169,9 @@
|
|||||||
}
|
}
|
||||||
this.userBind(parmas)
|
this.userBind(parmas)
|
||||||
await _this.getShareUrl()
|
await _this.getShareUrl()
|
||||||
await _this.getUserVip()
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getUserVip()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
276
pages/vip/mine/sheng.vue
Normal file
276
pages/vip/mine/sheng.vue
Normal file
@ -0,0 +1,276 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pageBox">
|
||||||
|
<view class="oneBox">
|
||||||
|
<view class="row flex1 row1">
|
||||||
|
<view class="icon flex"><up-icon name="coupon" size="32" color="#6A462A" /></view>
|
||||||
|
<view class="right flex1">
|
||||||
|
<view class="box">
|
||||||
|
<view class="tit">会员优惠劵</view>
|
||||||
|
<text>入会礼+月季劵+其他会员卷</text>
|
||||||
|
</view>
|
||||||
|
<view class="text">已省<text>¥{{sumData.coupon_saved_money || '0.00'}}</text></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="row flex1">
|
||||||
|
<view class="icon flex"><up-icon name="integral" size="32" color="#6A462A" /></view>
|
||||||
|
<view class="right flex1">
|
||||||
|
<view class="box">
|
||||||
|
<view class="tit">会员价</view>
|
||||||
|
<text>享受会员价</text>
|
||||||
|
</view>
|
||||||
|
<view class="text">已省<text>¥{{sumData.vip_price_saved_money || '0.00'}}</text></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="twoBox">
|
||||||
|
<view class="title">省钱明细</view>
|
||||||
|
<view class="item" v-for="(item, index) in infoList" :key="index">
|
||||||
|
<view class="date">
|
||||||
|
<text>{{parseDate(item.date)}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="contBox" v-for="itm in item.list" :key="itm.id">
|
||||||
|
<view class="row">
|
||||||
|
<view class="cont flex1" v-for="it in itm.order.items" :key="it.id">
|
||||||
|
<image :src="it.pic_url" mode="aspectFill"></image>
|
||||||
|
<view class="box">
|
||||||
|
<view class="tit">{{it.goods_name}}</view>
|
||||||
|
<text>{{it.sku_name}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="btm flex1">
|
||||||
|
<view class="time">{{itm.created_at}}</view>
|
||||||
|
<view class="text">已省<text>¥{{itm.total_saved_money}}</text></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="noMore" v-if="infoList.length && page >= lastPage && !loading">— 没有更多了 —</view>
|
||||||
|
|
||||||
|
<view v-if="loading" class="loadbox">
|
||||||
|
<up-loading-icon text="加载中..." textSize="14"></up-loading-icon>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-if="!loading && !infoList.length">
|
||||||
|
<up-empty mode="list" icon="https://ct-upimg.yx090.com/g.ii090/images/sprite/empty/list.png" text="暂无明细喔"></up-empty>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { ref, reactive, toRefs } from 'vue'
|
||||||
|
import { get, post } from '@/api/request.js'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
setup() {
|
||||||
|
const data = reactive({
|
||||||
|
page: 1,
|
||||||
|
lastPage: 0,
|
||||||
|
loading: true,
|
||||||
|
infoList: [],
|
||||||
|
sumData: {}
|
||||||
|
})
|
||||||
|
|
||||||
|
const getInfo = () => {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
|
data.loading = true
|
||||||
|
get(`/api/v1/user/vip/orderVipSavedMoneyRecord`).then((res) => {
|
||||||
|
res.data.forEach((item) => {
|
||||||
|
let length = data.infoList.length
|
||||||
|
if(length && data.infoList[length - 1].date == item.created_at.slice(0, 7)) {
|
||||||
|
data.infoList[length - 1].list.push(item)
|
||||||
|
} else {
|
||||||
|
let obj = {
|
||||||
|
date: item.created_at.slice(0, 7),
|
||||||
|
list: [item]
|
||||||
|
}
|
||||||
|
data.infoList.push(obj)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
data.lastPage = res.meta.last_page
|
||||||
|
data.sumData = res.sum
|
||||||
|
uni.hideLoading()
|
||||||
|
data.loading = false
|
||||||
|
}).catch(() => {
|
||||||
|
data.loading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseDate(val) {
|
||||||
|
let list = val.split('-')
|
||||||
|
return list[0] + '年' + list[1] + '月'
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
...toRefs(data),
|
||||||
|
getInfo,
|
||||||
|
parseDate
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async onLoad(options) {
|
||||||
|
this.getInfo()
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.page < this.lastPage) {
|
||||||
|
this.page++
|
||||||
|
this.getInfo()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.flex{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.flex1{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.pageBox{
|
||||||
|
width: 100%;
|
||||||
|
padding: 24rpx;
|
||||||
|
background: #F5F5F5;
|
||||||
|
min-height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.oneBox{
|
||||||
|
padding: 24rpx 24rpx 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 10px;
|
||||||
|
.btn{
|
||||||
|
color: #58341E;
|
||||||
|
background-color: #F9EDCE;
|
||||||
|
border-radius: 4px;
|
||||||
|
height: 80rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
.row{
|
||||||
|
padding: 20rpx 0;
|
||||||
|
&.row1{
|
||||||
|
border-bottom: 1rpx solid #f2f2f2;
|
||||||
|
}
|
||||||
|
.icon{
|
||||||
|
width: 110rpx;
|
||||||
|
height: 110rpx;
|
||||||
|
border-radius: 16px;
|
||||||
|
background-color: #F7DEB5;
|
||||||
|
}
|
||||||
|
.right{
|
||||||
|
width: calc(100% - 130rpx);
|
||||||
|
.box{
|
||||||
|
.tit{
|
||||||
|
color: #333;
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
text{
|
||||||
|
color: #999;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.text{
|
||||||
|
color: #58341E;
|
||||||
|
font-size: 28rpx;
|
||||||
|
text{
|
||||||
|
color: #464646;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.twoBox{
|
||||||
|
position: relative;
|
||||||
|
.title{
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 20rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #5A5A5A;
|
||||||
|
}
|
||||||
|
.item{
|
||||||
|
padding: 20rpx 0 0;
|
||||||
|
.date{
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #444;
|
||||||
|
text-align: right;
|
||||||
|
text{
|
||||||
|
background: linear-gradient(to right , #F5F5F5, #F7DFB7);
|
||||||
|
display: inline-block;
|
||||||
|
padding: 2px 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.contBox{
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
.row{
|
||||||
|
padding: 20rpx;
|
||||||
|
border-bottom: 1rpx solid #f2f2f2;
|
||||||
|
.cont{
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
image{
|
||||||
|
width: 120rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
border-radius: 6rpx;
|
||||||
|
}
|
||||||
|
.box{
|
||||||
|
width: calc(100% - 140rpx);
|
||||||
|
min-height: 120rpx;
|
||||||
|
.tit{
|
||||||
|
color: #222;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
text{
|
||||||
|
color: #A8A8A8;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btm{
|
||||||
|
font-size: 28rpx;
|
||||||
|
.time{
|
||||||
|
color: #999;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
.text{
|
||||||
|
color: #909090;
|
||||||
|
|
||||||
|
text{
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.noMore{
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
|
margin: auto;
|
||||||
|
padding: 30rpx 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.loadbox {
|
||||||
|
padding: 30rpx 0;
|
||||||
|
text-align: center;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -17,8 +17,8 @@
|
|||||||
<view class="vip-box">
|
<view class="vip-box">
|
||||||
<view class="title">支付方式</view>
|
<view class="title">支付方式</view>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<text>微信支付</text>
|
<text>支付宝</text>
|
||||||
<up-icon name="checkmark-circle-fill" color="#07c160" size="24" />
|
<up-icon name="checkmark-circle-fill" color="#00A0EA" size="24" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="vip-pay">
|
<view class="vip-pay">
|
||||||
@ -45,7 +45,8 @@
|
|||||||
vip_type: '',
|
vip_type: '',
|
||||||
user: {},
|
user: {},
|
||||||
is_authorized: uni.getStorageSync('is_authorized'),
|
is_authorized: uni.getStorageSync('is_authorized'),
|
||||||
canBuy: true
|
canBuy: true,
|
||||||
|
pay_id: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
// 会员详情
|
// 会员详情
|
||||||
@ -79,8 +80,16 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
data.canBuy = false
|
data.canBuy = false
|
||||||
post('/api/v1/user/vip', { total_price: price.value, num: data.num }).then((res) => {
|
post('/api/v1/user/vip', { total_price: price.value, num: data.num, pay_style: 'app_pay', pay_type: 2 }).then((res) => {
|
||||||
wxPay(res.data)
|
// wxPay(res.data)
|
||||||
|
data.pay_id = res.data.pay_id
|
||||||
|
// 跳转支付宝小程序
|
||||||
|
let alipayUrl = res.data.jump_mini_path
|
||||||
|
// let alipayUrl = res.data.jump_mini_path + '&returnSchema=miaoxuan://'
|
||||||
|
if (uni.getSystemInfoSync().platform == "ios") {
|
||||||
|
alipayUrl = res.data.jump_mini_path.replace('alipays', 'alipay')
|
||||||
|
}
|
||||||
|
plus.runtime.openURL(alipayUrl)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
data.canBuy = true
|
data.canBuy = true
|
||||||
}, 1000)
|
}, 1000)
|
||||||
@ -98,6 +107,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isPayOrder() {
|
||||||
|
if(data.pay_id) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
|
get(`/api/v1/pay/check/${data.pay_id}`).then((res) => {
|
||||||
|
uni.hideLoading()
|
||||||
|
if(res.data.status) {
|
||||||
|
showToast('支付成功', 'success')
|
||||||
|
uni.setStorageSync('is_vip', true)
|
||||||
|
uni.navigateBack({delta:1})
|
||||||
|
} else {
|
||||||
|
showToast('支付失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...toRefs(data),
|
...toRefs(data),
|
||||||
changeNum,
|
changeNum,
|
||||||
@ -106,12 +134,17 @@
|
|||||||
price,
|
price,
|
||||||
toPay,
|
toPay,
|
||||||
getUserVip,
|
getUserVip,
|
||||||
getPhoneNumber
|
getPhoneNumber,
|
||||||
|
isPayOrder
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getVipInfo()
|
this.getVipInfo()
|
||||||
this.getUserVip()
|
this.getUserVip()
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
// 在此判断订单是否已经支付成功
|
||||||
|
this.isPayOrder()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.7 KiB |
Loading…
x
Reference in New Issue
Block a user