Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a9248bc1f6 |
@ -13,4 +13,4 @@
|
||||
12. [Android平台隐私与政策提示框](https://uniapp.dcloud.net.cn/tutorial/app-privacy-android.html)
|
||||
13. 在ios中,子组件内的dom元素,有时click事件不生效,需要将dom的宽高设置大一下
|
||||
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://192.168.31.70:82' // 本地1
|
||||
// const url = 'http://192.168.30.6:8092' // 本地2
|
||||
const appId = 'wx73163c7bace1750b'
|
||||
const protoId = 'gh_ca74730c9f77'
|
||||
const appId = 'wxfc3c7f3778e3036a'
|
||||
const protoId = 'gh_a2bdca31e535'
|
||||
const webUrl = 'http://uniapp.dcloud.io'
|
||||
const name = '妙选商城'
|
||||
const version = '1.0.3'
|
||||
|
||||
@ -81,7 +81,7 @@ import { func } from '../../uni_modules/uview-plus/libs/function/test'
|
||||
|
||||
const toMiniProgram = () => {
|
||||
data.sweixin.launchMiniProgram({
|
||||
id: 'gh_ca74730c9f77',
|
||||
id: 'gh_a2bdca31e535',
|
||||
path: 'pages/user/index?type=kefu'
|
||||
})
|
||||
data.showService = false
|
||||
|
||||
@ -37,6 +37,7 @@ export function login() {
|
||||
uni.setStorageSync('sessionKey', val.data.session_key)
|
||||
uni.setStorageSync('saveTime', Date.now()) // 存储时间
|
||||
uni.setStorageSync('expires_in', val.data.expires_in * 1000) // 失效时间
|
||||
uni.setStorageSync('is_crop_user', val.data.crop_user)
|
||||
}
|
||||
resolve(val.data)
|
||||
}
|
||||
@ -122,8 +123,7 @@ export async function userBind(params) {
|
||||
company_id = params.company_id || '',
|
||||
scene = params.scene
|
||||
let has_sale = uni.getStorageSync('has_sale')
|
||||
let index = getCurrentPages().length - 1
|
||||
let link = getCurrentPages()[index].route
|
||||
let link = '/pages/index/index'
|
||||
if (from > 0 || company_id || !has_sale) {
|
||||
await post('/api/v1/user/bind', {from, s, u, group_id, scene, company_id, link}).then((res) => {
|
||||
uni.setStorageSync('has_sale', true)
|
||||
@ -1030,7 +1030,7 @@ export const toMiniProgram = (path) => {
|
||||
}
|
||||
sweixin = shares['weixin']
|
||||
sweixin.launchMiniProgram({
|
||||
id: 'gh_ca74730c9f77',
|
||||
id: 'gh_a2bdca31e535',
|
||||
path: path
|
||||
})
|
||||
}, function(e) {
|
||||
|
||||
@ -1,2 +1,4 @@
|
||||
// 雪碧图
|
||||
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>
|
||||
<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">
|
||||
<image :src="item.user.avatar"></image>
|
||||
<view class="box">
|
||||
@ -23,6 +23,10 @@
|
||||
<image :src="it.url" v-if="it.type === 1" @click="viewImg(it, item.material)" mode="aspectFill"></image>
|
||||
</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 class="noMore" v-if="list.length && page >= lastPage && !loading">— 没有更多了 —</view>
|
||||
@ -102,6 +106,17 @@
|
||||
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) => {
|
||||
if (newProps.show) {
|
||||
data.show = true
|
||||
@ -119,7 +134,9 @@
|
||||
getInfo,
|
||||
close,
|
||||
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 class="btn" @click="getHandle()">领取</view>
|
||||
<!-- <view class="btn" @click="getHandle()">领取</view> -->
|
||||
<view class="btn" @click="close()">好的</view>
|
||||
</view>
|
||||
</view>
|
||||
</up-overlay>
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<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>
|
||||
|
||||
|
||||
@ -273,7 +273,6 @@
|
||||
bgColor: Style[uni.getStorageSync('theme_index') * 1].bgColor,
|
||||
sourceId: 0,
|
||||
sourceType: '',
|
||||
isSale: uni.getStorageSync('role') == 1,
|
||||
canClick: true,
|
||||
remind_stock: false,
|
||||
showPreview: false,
|
||||
|
||||
@ -210,7 +210,6 @@
|
||||
action: false,
|
||||
topNum: 0,
|
||||
specsNum: 0,
|
||||
isSale: uni.getStorageSync('role') == 1,
|
||||
canClick: true,
|
||||
remindStock: false
|
||||
})
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
"name" : "妙选商城",
|
||||
"appid" : "__UNI__743F2C0",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.7",
|
||||
"versionCode" : 107,
|
||||
"versionName" : "1.1.1",
|
||||
"versionCode" : 111,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
@ -48,7 +48,7 @@
|
||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
||||
"minSdkVersion" : 21,
|
||||
"targetSdkVersion" : 30,
|
||||
"schemes" : "miaoxuan"
|
||||
"schemes" : "xiaoman"
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
@ -58,6 +58,12 @@
|
||||
"entitlements" : {
|
||||
"com.apple.developer.associated-domains" : [ "guan.chutang66.com" ]
|
||||
}
|
||||
},
|
||||
"privacyDescription" : {
|
||||
"NSPhotoLibraryUsageDescription" : "获取您的相册用于更新头像",
|
||||
"NSPhotoLibraryAddUsageDescription" : "保存海报到您的相册",
|
||||
"NSCameraUsageDescription" : "拍摄照片以更新头像",
|
||||
"NSLocalNetworkUsageDescription" : "使用您的网络以正常访问APP"
|
||||
}
|
||||
},
|
||||
/* SDK配置 */
|
||||
@ -133,7 +139,7 @@
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx73163c7bace1750b",
|
||||
"appid" : "wxfc3c7f3778e3036a",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
|
||||
@ -543,6 +543,12 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员介绍"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "mine/sheng",
|
||||
"style": {
|
||||
"navigationBarTitleText": "省钱账单"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -18,96 +18,110 @@
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" @scrolltolower="scorllBottom" style="height: calc(100vh - 90rpx);" lower-threshold="200">
|
||||
<view class="oneBox">
|
||||
<view class="cont">
|
||||
<view class="top">
|
||||
<view class="rateBox">
|
||||
<view class="rate">{{goodCommentRate}}</view>
|
||||
<text>好评率</text>
|
||||
|
||||
<view class="contBox">
|
||||
<view class="oneBox">
|
||||
<view class="cont">
|
||||
<view class="top">
|
||||
<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 class="star">
|
||||
<up-rate v-model="rateValue" :count="5" allowHalf readonly :size="25" activeColor="#ffd21e" inactiveColor="#eee" />
|
||||
<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 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 class="listBox">
|
||||
<view class="item" v-for="(item, index) in infoList" :key="item.id">
|
||||
<view class="cont">
|
||||
<view class="userInfo">
|
||||
<image :src="item.user.avatar"></image>
|
||||
<view class="box">
|
||||
<view class="user">
|
||||
<view class="right">
|
||||
<view class="name">{{parseName(item.user.nickname)}}</view>
|
||||
<span class="border" v-if="!from">已购{{item.report && item.report.total_trade_count}}次</span>
|
||||
</view>
|
||||
<view class="time" v-if="!from">{{item.date.replace(/-/g, '/')}}发布于{{provTxt[item.order.province_id]}}</view>
|
||||
</view>
|
||||
<view class="starBox">
|
||||
<view class="rate">
|
||||
<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-else name="star-fill" color="#ccc" :size="18" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="tags" v-if="item.tags.length">
|
||||
<text v-for="(it, i) in item.tags" :key="it.id"><template v-if="i != 0"> | </template>{{it.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="item.item" class="sku_name">{{item.item.goods_name}}
|
||||
<template v-if="item.item.sku_name">【{{item.item.sku_name}}】</template>
|
||||
</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 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="listBox">
|
||||
<view class="item" v-for="item in infoList" :key="item.id">
|
||||
<view class="userInfo">
|
||||
<image :src="item.user.avatar"></image>
|
||||
<view class="box">
|
||||
<view class="right">
|
||||
<view class="name">{{item.user.nickname}}</view>
|
||||
<span class="border" v-if="!from">已购{{item.report && item.report.total_trade_count}}次</span>
|
||||
</view>
|
||||
<view class="time" v-if="!from">{{item.date.replace(/-/g, '/')}}发布于{{provTxt[item.order.province_id]}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="starBox">
|
||||
<view class="rate">
|
||||
<view class="star" v-for="i in 5">
|
||||
<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" />
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.item" class="sku_name">{{item.item.goods_name}}
|
||||
<template v-if="item.item.sku_name">【{{item.item.sku_name}}】</template>
|
||||
</view>
|
||||
<view class="tags" v-if="item.tags.length">
|
||||
<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 class="replyBox itm" v-if="itm.reply">
|
||||
<view>店家回复</view>
|
||||
<view class="text">{{itm.reply}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</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>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
@ -123,9 +137,9 @@
|
||||
import { get } from '@/api/request.js'
|
||||
import { Style } from '@/utils/list.js'
|
||||
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 { provTxt } from '@/components/scene.js'
|
||||
import { provTxt } from '@/components/img.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -217,7 +231,11 @@
|
||||
}
|
||||
|
||||
// 复制评论
|
||||
const copyComment = (text) => {
|
||||
const copyComment = async (text) => {
|
||||
if(await judgePrivacy()) {
|
||||
data.showPrivacy = true
|
||||
return false
|
||||
}
|
||||
uni.setClipboardData({
|
||||
data: String(text),
|
||||
success: function () {
|
||||
@ -279,6 +297,22 @@
|
||||
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 {
|
||||
getDayDiff,
|
||||
provTxt,
|
||||
@ -290,7 +324,10 @@
|
||||
changeTab,
|
||||
changeTag,
|
||||
getTags,
|
||||
toFilter
|
||||
toFilter,
|
||||
parseName,
|
||||
toTousu,
|
||||
toPingbi
|
||||
}
|
||||
},
|
||||
async onLoad(options) {
|
||||
@ -355,12 +392,23 @@
|
||||
position: relative;
|
||||
.icon{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
.iconfont{
|
||||
font-size: 18px;
|
||||
padding-top: 3px;
|
||||
.heng{
|
||||
width: 28rpx;
|
||||
height: 2px;
|
||||
background-color: #444;
|
||||
margin-bottom: 3px;
|
||||
&.er{
|
||||
width: 24rpx;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
&.san{
|
||||
width: 20rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.box{
|
||||
@ -397,12 +445,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.oneBox{
|
||||
.contBox{
|
||||
padding: 24rpx;
|
||||
}
|
||||
.oneBox{
|
||||
border-bottom: 1rpx solid #e8e8e8;
|
||||
.cont{
|
||||
background-color: #fff;
|
||||
padding: 24rpx 24rpx 8rpx;
|
||||
border-radius: 10rpx;
|
||||
border-radius: 10rpx 10rpx 0 0;
|
||||
}
|
||||
.top{
|
||||
display: flex;
|
||||
@ -445,13 +496,18 @@
|
||||
}
|
||||
}
|
||||
.listBox{
|
||||
padding: 0 24rpx 24rpx;
|
||||
// padding: 0 24rpx 24rpx;
|
||||
.item{
|
||||
padding: 20rpx;
|
||||
margin-bottom: 24rpx;
|
||||
border-bottom: 1rpx solid #F5F5F5;
|
||||
background-color: #fff;
|
||||
.cont{
|
||||
padding: 0 0 20rpx;
|
||||
border-bottom: 1rpx solid #f7f2f2;
|
||||
}
|
||||
.userInfo{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
image{
|
||||
width: 70rpx;
|
||||
@ -460,14 +516,18 @@
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
.box{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
.user{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.right{
|
||||
font-size: 22rpx;
|
||||
color: #98989f;
|
||||
width: calc(100% - 150rpx);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.name{
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
@ -476,11 +536,10 @@
|
||||
display: inline-block;
|
||||
}
|
||||
.border{
|
||||
height: 32rpx;
|
||||
background: rgba(255, 255, 255, 0.39);
|
||||
border: 1px solid v-bind('Color');
|
||||
color: v-bind('Color');
|
||||
padding: 0 10rpx;
|
||||
padding: 1px 10rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: normal;
|
||||
@ -493,10 +552,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.sku_name{
|
||||
color: #999;
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.starBox{
|
||||
background-color: #F9F9F9;
|
||||
padding: 16rpx 20rpx 20rpx;
|
||||
border-radius: 8rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 6rpx;
|
||||
.rate{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -504,16 +568,10 @@
|
||||
margin-right: 3px;
|
||||
}
|
||||
}
|
||||
.sku_name{
|
||||
color: #999;
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
width: 100%;
|
||||
}
|
||||
.tags{
|
||||
margin-top: 16rpx;
|
||||
color: #555;
|
||||
font-size: 24rpx;
|
||||
margin-left: 10rpx;
|
||||
color: #666;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@ -538,6 +596,7 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
vertical-align: bottom;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.play{
|
||||
position: absolute;
|
||||
@ -549,6 +608,7 @@
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 8rpx;
|
||||
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 {
|
||||
text-align: center;
|
||||
|
||||
@ -162,7 +162,7 @@
|
||||
<text class="description" :class="fontSize == 'small' ? '' : 'large'" user-select v-if="item.description">{{item.description}}</text>
|
||||
<template v-if="item.group_goods.length">
|
||||
<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 class="item" @click="jumpFloor" v-if="item.types.length < 5" :class="vip_on == 1 && !is_vip ? '' : 'martop'">
|
||||
<view class="left">
|
||||
@ -387,13 +387,13 @@
|
||||
<view class="edition good-detail" id="goodDetail">
|
||||
<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">
|
||||
<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>
|
||||
</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 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>
|
||||
@ -401,18 +401,18 @@
|
||||
</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">
|
||||
<up-icon name="play-right-fill" size="42" color="#fff" @click="viewVideo(itm.video_convert || itm.video[0], $event)" />
|
||||
</view>
|
||||
<image :src="itm.video_img" mode="widthFix" style="width:100%"></image>
|
||||
</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>
|
||||
</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>
|
||||
<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 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="txt">
|
||||
<rich-text :nodes="parseText(itm.text)" :user-select="true"></rich-text>
|
||||
@ -714,7 +714,7 @@
|
||||
<view class="goods-btn-icon" @click.stop="openService()">
|
||||
<up-icon name="kefu-ermai" size="22" />
|
||||
<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>
|
||||
<view class="txt">{{item.add_cs_tips}}</view>
|
||||
<view class="cross flex" @click.stop="item.add_cs_tips = ''">
|
||||
@ -2711,7 +2711,7 @@
|
||||
this.is_vip = uni.getStorageSync('is_vip') || false
|
||||
this.img_preview_suffix = uni.getStorageSync('img_preview_suffix') || ''
|
||||
this.show_explain_video = uni.getStorageSync('show_explain_video')
|
||||
this.group_id = options.id
|
||||
this.group_id = options.id * 1
|
||||
const _this = this
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
|
||||
@ -42,9 +42,10 @@
|
||||
<view v-if="active == 0">
|
||||
<view class="skeleton" v-if="loading2" style="width: 100%;height: 285rpx;"></view>
|
||||
<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">
|
||||
<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>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
@ -366,7 +367,7 @@
|
||||
import groupClassify from '@/components/homeList/groupClassify.vue'
|
||||
import allGroup from '@/components/homeList/allGroup.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 giftsVip from '@/components/giftsVip/index.vue'
|
||||
import { Style } from '@/utils/list.js'
|
||||
@ -425,7 +426,8 @@ import { func } from '../../uni_modules/uview-plus/libs/function/test'
|
||||
scrollLeft: 0,
|
||||
curIndex: 0,
|
||||
today: '',
|
||||
dateList: []
|
||||
dateList: [],
|
||||
swiperH: 150
|
||||
})
|
||||
const groupList = 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 {
|
||||
userBind,
|
||||
getOldDay,
|
||||
remmendList,
|
||||
whetherLogin,
|
||||
@ -849,7 +860,8 @@ import { func } from '../../uni_modules/uview-plus/libs/function/test'
|
||||
getRankList,
|
||||
getTypeDateList,
|
||||
toGoods,
|
||||
onNetworkStatusChange
|
||||
onNetworkStatusChange,
|
||||
computeHeight
|
||||
}
|
||||
},
|
||||
|
||||
@ -870,12 +882,20 @@ import { func } from '../../uni_modules/uview-plus/libs/function/test'
|
||||
await this.getRankList()
|
||||
await this.getTypeDateList()
|
||||
|
||||
// if(whetherLogin()) {
|
||||
// this.getNum()
|
||||
// // 判断是否有新人优惠券
|
||||
// this.judgeHasNewVip()
|
||||
// this.getGiftsInfo()
|
||||
// }
|
||||
if(whetherLogin()) {
|
||||
this.getNum()
|
||||
// 判断是否有新人优惠券
|
||||
this.judgeHasNewVip()
|
||||
this.getGiftsInfo()
|
||||
var parmas = {
|
||||
from: 0,
|
||||
s: 0,
|
||||
u: 0,
|
||||
scene: '',
|
||||
company_id: ''
|
||||
}
|
||||
this.userBind(parmas)
|
||||
}
|
||||
|
||||
this.isShowArrow()
|
||||
this.getZongHe()
|
||||
@ -1046,17 +1066,15 @@ import { func } from '../../uni_modules/uview-plus/libs/function/test'
|
||||
animation: fade 2s infinite;
|
||||
}
|
||||
.whole{
|
||||
background-color: $uni-bg-color;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.home {
|
||||
padding-bottom: calc(110rpx + env(safe-area-inset-bottom));
|
||||
.home-top {
|
||||
.home-top-swiper {
|
||||
width: 100%;
|
||||
height: 285rpx;
|
||||
.item_img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<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>
|
||||
<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 class="shield flex">
|
||||
<img src="https://ct-upimg.yx090.com/ju8hn6/shop/image/2025/03/19/MRObpJsCXIJM7f3JyDNPDeTO5uz0x6uPEnvLW0sW.png" class="img" />
|
||||
|
||||
@ -267,6 +267,7 @@
|
||||
async onLoad(options) {
|
||||
this.order_id = (options.order_id || 0) * 1
|
||||
this.type = (options.type || 0) * 1
|
||||
this.desc = options.desc || ''
|
||||
// await this.$onLaunched
|
||||
this.getPhone()
|
||||
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>
|
||||
</view>
|
||||
<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 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 class="box">
|
||||
@ -137,7 +137,6 @@
|
||||
// await this.$onLaunched
|
||||
this.fetchList()
|
||||
this.Color = uni.getStorageSync('theme_color')
|
||||
this.role = uni.getStorageSync('role')
|
||||
this.priceColor = Style[uni.getStorageSync('theme_index') * 1].priceColor
|
||||
},
|
||||
onReachBottom() {
|
||||
|
||||
@ -161,7 +161,6 @@
|
||||
await this.getShareInfo()
|
||||
this.fetchList()
|
||||
this.Color = uni.getStorageSync('theme_color')
|
||||
this.role = uni.getStorageSync('role')
|
||||
this.priceColor = Style[uni.getStorageSync('theme_index') * 1].priceColor
|
||||
},
|
||||
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>
|
||||
<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="item" v-for="(item, index) in goodsList" :key="item.id">
|
||||
<view class="left" @click="toGroups(item.id)">
|
||||
@ -48,20 +53,22 @@
|
||||
goodsList: [],
|
||||
loading: false,
|
||||
showTop: false,
|
||||
Color: ''
|
||||
Color: '',
|
||||
curTab: 'day'
|
||||
})
|
||||
|
||||
function getFetchList() {
|
||||
function getFetchList(val = 0) {
|
||||
uni.showLoading({
|
||||
mask: true,
|
||||
title: '加载中'
|
||||
})
|
||||
get('/api/app/top', {
|
||||
get('/api/v1/top', {
|
||||
page: data.page,
|
||||
pageSize: 20
|
||||
pageSize: 20,
|
||||
date_type: data.curTab
|
||||
}).then((res) => {
|
||||
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()
|
||||
})
|
||||
}
|
||||
@ -79,17 +86,26 @@
|
||||
})
|
||||
}
|
||||
|
||||
function changeTab(val) {
|
||||
if(data.curTab != val) {
|
||||
data.curTab = val
|
||||
data.page = 1
|
||||
getFetchList(0)
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(data),
|
||||
getFetchList,
|
||||
hanletop,
|
||||
toGroups
|
||||
toGroups,
|
||||
changeTab
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.page < this.last_page) {
|
||||
this.page ++
|
||||
this.getFetchList()
|
||||
this.getFetchList(1)
|
||||
}
|
||||
},
|
||||
onPageScroll(e) {
|
||||
@ -222,4 +238,45 @@
|
||||
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.2);
|
||||
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>
|
||||
|
||||
@ -14,9 +14,12 @@
|
||||
<text>支付方式</text>
|
||||
<text class="text">支付宝支付</text>
|
||||
</view>
|
||||
<view class="pay-info-text">
|
||||
<text>支付金额</text>
|
||||
<text class="text">¥{{item.total_price}}</text>
|
||||
<view class="row">
|
||||
<view class="pay-info-text">
|
||||
<text>支付金额</text>
|
||||
<text class="text">¥{{item.total_price}}</text>
|
||||
</view>
|
||||
<view class="vip_desc" v-if="vipSave * 100 > 0">会员本单为您节省{{vipSave}}元</view>
|
||||
</view>
|
||||
<view class="pay-info-text">
|
||||
<text>支付状态</text>
|
||||
@ -107,7 +110,9 @@
|
||||
lastPage: 0,
|
||||
hotList: [],
|
||||
scoreShareInfo: {},
|
||||
showCase: false
|
||||
showCase: false,
|
||||
showDing: false,
|
||||
vipSave: 0
|
||||
})
|
||||
|
||||
async function getInfo() {
|
||||
@ -119,9 +124,13 @@
|
||||
}
|
||||
data.item = res.data
|
||||
let price = 0
|
||||
let am = 0
|
||||
if (data.type == 1) {
|
||||
let oeder = res.data.orders
|
||||
oeder.forEach((i) => {
|
||||
if(i.orderVipSaved && i.orderVipSaved.total_saved_money * 100 > 0) {
|
||||
am += i.orderVipSaved.total_saved_money * 100
|
||||
}
|
||||
i.items.forEach((j) => {
|
||||
if (j.price * 1 > price) {
|
||||
price = j.price
|
||||
@ -130,6 +139,9 @@
|
||||
})
|
||||
})
|
||||
} 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
|
||||
list.forEach((j) => {
|
||||
if (j.price > price) {
|
||||
@ -138,7 +150,7 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
console.log(data.goods)
|
||||
data.vipSave = (am / 100).toFixed(2)
|
||||
}
|
||||
|
||||
function toOrder() {
|
||||
@ -354,9 +366,8 @@
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 90rpx;
|
||||
font-size: 30rpx;
|
||||
|
||||
padding: 24rpx 0;
|
||||
.text {
|
||||
font-size: 26rpx;
|
||||
color: #555555;
|
||||
@ -365,6 +376,20 @@
|
||||
&-text:not(:last-child) {
|
||||
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 {
|
||||
|
||||
@ -29,14 +29,13 @@
|
||||
<view class="right">
|
||||
<view class="top">
|
||||
<text class="name">{{vip_name}}会员</text>
|
||||
<view class="day">
|
||||
<text>剩余{{days}}天</text>
|
||||
<view class="progress">
|
||||
<view class="percentage" :style="{'width': + progress + '%'}"></view>
|
||||
</view>
|
||||
<view class="day" @click="toPage('/pages/vip/mine/sheng')" v-if="save_money * 100 > 0">
|
||||
<text>累计节省{{save_money}}元></text>
|
||||
</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>
|
||||
<text class="btn" @click="toVip">会员详情</text>
|
||||
@ -167,6 +166,7 @@ export default {
|
||||
components: { tabbar, cfCloud },
|
||||
setup() {
|
||||
const data = reactive({
|
||||
showBirth: false,
|
||||
Color: '',
|
||||
priceColor: '',
|
||||
tagColor: '',
|
||||
@ -193,7 +193,8 @@ export default {
|
||||
score_on: 0,
|
||||
statusBarHeight: 0,
|
||||
showSet: false,
|
||||
isIOS: false
|
||||
isIOS: false,
|
||||
save_money: 0
|
||||
})
|
||||
|
||||
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 {
|
||||
...toRefs(data),
|
||||
...toRefs(user),
|
||||
@ -262,14 +276,13 @@ export default {
|
||||
getUserNum,
|
||||
toVip,
|
||||
getStoreInfo,
|
||||
getUserInfo
|
||||
getUserInfo,
|
||||
getDetail
|
||||
}
|
||||
},
|
||||
async onLoad(options) {
|
||||
// await this.$onLaunched
|
||||
if (plus.os.name === 'iOS') {
|
||||
this.isIOS = true
|
||||
}
|
||||
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
this.statusBarHeight = res.statusBarHeight
|
||||
@ -293,6 +306,9 @@ export default {
|
||||
this.Color = uni.getStorageSync('theme_color')
|
||||
this.priceColor = Style[uni.getStorageSync('theme_index') * 1].priceColor
|
||||
this.tagColor = Style[uni.getStorageSync('theme_index') * 1].tagColor
|
||||
setTimeout(() => {
|
||||
this.getDetail()
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -400,12 +416,13 @@ export default {
|
||||
font-size: 28rpx;
|
||||
.btn {
|
||||
color: #fff;
|
||||
width: 160rpx;
|
||||
width: 140rpx;
|
||||
height: 56rpx;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
background: #333333;
|
||||
background: #333;
|
||||
border-radius: 28rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
.item1 {
|
||||
@ -440,43 +457,37 @@ export default {
|
||||
}
|
||||
.right {
|
||||
flex: 1;
|
||||
.top {
|
||||
.top{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.name {
|
||||
.name{
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #553504;
|
||||
}
|
||||
.day {
|
||||
font-size: 24rpx;
|
||||
color: #555;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
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;
|
||||
}
|
||||
.day{
|
||||
color: #644417;
|
||||
margin-left: 20rpx;
|
||||
text{
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
.time {
|
||||
font-size: 22rpx;
|
||||
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">
|
||||
<text>生日</text>
|
||||
<view class="right" @click="openTime()">
|
||||
<view class="right" @click="can_uplate ? openTime() : ''">
|
||||
<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>
|
||||
|
||||
@ -74,7 +74,8 @@ import { func } from '../../uni_modules/uview-plus/libs/function/test'
|
||||
currentDate: '',
|
||||
is_default_avatar: uni.getStorageSync('is_default_avatar'),
|
||||
Color: uni.getStorageSync('theme_color'),
|
||||
minDate: new Date('1900-01-01').getTime()
|
||||
minDate: new Date('1900-01-01').getTime(),
|
||||
can_uplate: false
|
||||
})
|
||||
|
||||
function getInfo() {
|
||||
@ -82,6 +83,7 @@ import { func } from '../../uni_modules/uview-plus/libs/function/test'
|
||||
data.info = res.data
|
||||
data.nickName = res.data.nickname
|
||||
data.avatarUrl = res.data.avatar
|
||||
data.can_uplate = res.data.birthday ? false : true
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@
|
||||
<text>账号密码登录</text>
|
||||
</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>微信登录</text>
|
||||
</view>
|
||||
@ -106,7 +106,8 @@
|
||||
veri_code: '',
|
||||
tips: '',
|
||||
loading: false,
|
||||
password: ''
|
||||
password: '',
|
||||
existWx: true
|
||||
})
|
||||
|
||||
// 小程序登陆
|
||||
@ -121,7 +122,7 @@
|
||||
shares[t.id] = t
|
||||
}
|
||||
shares['weixin'].launchMiniProgram({
|
||||
id: 'gh_ca74730c9f77',
|
||||
id: 'gh_a2bdca31e535',
|
||||
type: 0, // 0 正式版, 1 测试版, 2 体验版
|
||||
path: 'pages/index/interim?from=app'
|
||||
})
|
||||
@ -372,6 +373,17 @@
|
||||
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 {
|
||||
uCodeRef,
|
||||
...toRefs(data),
|
||||
@ -384,14 +396,17 @@
|
||||
getCode,
|
||||
codeChange,
|
||||
unionidLogin,
|
||||
pwdLogin
|
||||
pwdLogin,
|
||||
checkApp
|
||||
}
|
||||
},
|
||||
async onLoad(options) {
|
||||
// await this.$onLaunched
|
||||
if (plus.os.name === 'iOS') {
|
||||
this.showOther = true
|
||||
this.checkApp()
|
||||
}
|
||||
|
||||
let login_type = uni.getStorageSync('login_type')
|
||||
if(login_type == 'mobile') { // 已经手机号登陆,未授权微信
|
||||
uni.redirectTo({
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<view class="whole" @click="toVipPage">
|
||||
<image v-for="item in imgList" :src="item" mode="widthFix" class="img"></image>
|
||||
<view class="whole">
|
||||
<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>
|
||||
</template>
|
||||
|
||||
@ -8,10 +11,15 @@
|
||||
import { ref, reactive, toRefs } from 'vue'
|
||||
import { get, post } from '@/api/request.js'
|
||||
import { whetherLogin } from '@/components/common.js'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const data = reactive({
|
||||
imgList: []
|
||||
imgList: [],
|
||||
is_vip: uni.getStorageSync('is_vip'),
|
||||
color1: '',
|
||||
color2: '',
|
||||
vip_on: 0
|
||||
})
|
||||
|
||||
// 会员信息
|
||||
@ -25,9 +33,11 @@
|
||||
}
|
||||
return
|
||||
}
|
||||
data.share_image = res.data.vip_detail_share_image
|
||||
data.share_title = res.data.vip_detail_share_title
|
||||
uni.setStorageSync('vip_on', res.data.vip_on)
|
||||
data.vip_on = res.data.vip_on
|
||||
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 {
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
.img{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
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>
|
||||
|
||||
@ -169,7 +169,9 @@
|
||||
}
|
||||
this.userBind(parmas)
|
||||
await _this.getShareUrl()
|
||||
await _this.getUserVip()
|
||||
},
|
||||
onShow() {
|
||||
this.getUserVip()
|
||||
}
|
||||
}
|
||||
</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="title">支付方式</view>
|
||||
<view class="bottom">
|
||||
<text>微信支付</text>
|
||||
<up-icon name="checkmark-circle-fill" color="#07c160" size="24" />
|
||||
<text>支付宝</text>
|
||||
<up-icon name="checkmark-circle-fill" color="#00A0EA" size="24" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="vip-pay">
|
||||
@ -45,7 +45,8 @@
|
||||
vip_type: '',
|
||||
user: {},
|
||||
is_authorized: uni.getStorageSync('is_authorized'),
|
||||
canBuy: true
|
||||
canBuy: true,
|
||||
pay_id: ''
|
||||
})
|
||||
|
||||
// 会员详情
|
||||
@ -79,8 +80,16 @@
|
||||
return
|
||||
}
|
||||
data.canBuy = false
|
||||
post('/api/v1/user/vip', { total_price: price.value, num: data.num }).then((res) => {
|
||||
wxPay(res.data)
|
||||
post('/api/v1/user/vip', { total_price: price.value, num: data.num, pay_style: 'app_pay', pay_type: 2 }).then((res) => {
|
||||
// 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(() => {
|
||||
data.canBuy = true
|
||||
}, 1000)
|
||||
@ -97,6 +106,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 {
|
||||
...toRefs(data),
|
||||
@ -106,12 +134,17 @@
|
||||
price,
|
||||
toPay,
|
||||
getUserVip,
|
||||
getPhoneNumber
|
||||
getPhoneNumber,
|
||||
isPayOrder
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getVipInfo()
|
||||
this.getUserVip()
|
||||
},
|
||||
onShow() {
|
||||
// 在此判断订单是否已经支付成功
|
||||
this.isPayOrder()
|
||||
}
|
||||
}
|
||||
</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