diff --git a/README.md b/README.md
index b3b77f4..5119e77 100644
--- a/README.md
+++ b/README.md
@@ -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完成
\ No newline at end of file
+15. 05-08完成
\ No newline at end of file
diff --git a/api/index.js b/api/index.js
index 0f4bd39..2713ed2 100644
--- a/api/index.js
+++ b/api/index.js
@@ -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'
diff --git a/components/callCenter/index.vue b/components/callCenter/index.vue
index 1df5e3b..77f2e60 100644
--- a/components/callCenter/index.vue
+++ b/components/callCenter/index.vue
@@ -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
diff --git a/components/common.js b/components/common.js
index e645d01..583391d 100644
--- a/components/common.js
+++ b/components/common.js
@@ -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) {
diff --git a/components/img.js b/components/img.js
index 028f43c..b75b416 100644
--- a/components/img.js
+++ b/components/img.js
@@ -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:'澳门'}
diff --git a/components/ktt/comment.vue b/components/ktt/comment.vue
index 7bfdd88..265918c 100644
--- a/components/ktt/comment.vue
+++ b/components/ktt/comment.vue
@@ -8,7 +8,7 @@
-
+
@@ -23,6 +23,10 @@
+
+ 屏蔽
+ 举报
+
— 没有更多了 —
@@ -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;
+ }
}
}
}
diff --git a/components/newVip/index.vue b/components/newVip/index.vue
index 77ac59d..f683375 100644
--- a/components/newVip/index.vue
+++ b/components/newVip/index.vue
@@ -22,7 +22,8 @@
- 领取
+
+ 好的
diff --git a/components/order/chooseAddr.vue b/components/order/chooseAddr.vue
index 6ebf16b..bc595fd 100644
--- a/components/order/chooseAddr.vue
+++ b/components/order/chooseAddr.vue
@@ -14,7 +14,7 @@
-
+
diff --git a/components/sku/ChooseSku.vue b/components/sku/ChooseSku.vue
index 6047160..d26de7d 100644
--- a/components/sku/ChooseSku.vue
+++ b/components/sku/ChooseSku.vue
@@ -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,
diff --git a/components/sku/multiple.vue b/components/sku/multiple.vue
index d997d4e..c7b39dd 100644
--- a/components/sku/multiple.vue
+++ b/components/sku/multiple.vue
@@ -210,7 +210,6 @@
action: false,
topNum: 0,
specsNum: 0,
- isSale: uni.getStorageSync('role') == 1,
canClick: true,
remindStock: false
})
diff --git a/manifest.json b/manifest.json
index 5cb4cba..6ed0507 100644
--- a/manifest.json
+++ b/manifest.json
@@ -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
},
diff --git a/pages.json b/pages.json
index 71b7047..d295df5 100644
--- a/pages.json
+++ b/pages.json
@@ -543,6 +543,12 @@
"style": {
"navigationBarTitleText": "会员介绍"
}
+ },
+ {
+ "path": "mine/sheng",
+ "style": {
+ "navigationBarTitleText": "省钱账单"
+ }
}
]
}
diff --git a/pages/groups/comment.vue b/pages/groups/comment.vue
index 4f5a386..700fc71 100644
--- a/pages/groups/comment.vue
+++ b/pages/groups/comment.vue
@@ -18,96 +18,110 @@
-
-
-
-
- {{goodCommentRate}}
- 好评率
+
+
+
+
+
+
+ {{goodCommentRate}}
+ 好评率
+
+
+
+
-
-
+
+ {{item.name}} {{item.count}}
-
- {{item.name}} {{item.count}}
+
+
+
+
+
+
+
+
+
+
+ {{parseName(item.user.nickname)}}
+ 已购{{item.report && item.report.total_trade_count}}次
+
+ {{item.date.replace(/-/g, '/')}}发布于{{provTxt[item.order.province_id]}}
+
+
+
+
+
+
+
+
+
+ | {{it.name}}
+
+
+
+
+
+ {{item.item.goods_name}}
+ 【{{item.item.sku_name}}】
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 店家回复
+ {{item.reply}}
+
+
+
+
+ {{getDayDiff(itm.created_at.substr(0, 10), item.created_at.substr(0, 10))}}追评
+ {{itm.created_at.substr(0, 16)}}
+
+
+
+
+
+
+
+
+
+
+
+
+ 店家回复
+ {{itm.reply}}
+
+
+
+
+
+ 屏蔽
+ 举报
+
+
+ - 到底啦 -
+ 加载中...
+
+
+
-
-
-
-
-
-
- {{item.user.nickname}}
- 已购{{item.report && item.report.total_trade_count}}次
-
- {{item.date.replace(/-/g, '/')}}发布于{{provTxt[item.order.province_id]}}
-
-
-
-
-
-
-
-
-
-
- {{item.item.goods_name}}
- 【{{item.item.sku_name}}】
-
-
- | {{it.name}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 店家回复
- {{item.reply}}
-
-
-
-
- {{getDayDiff(itm.created_at.substr(0, 10), item.created_at.substr(0, 10))}}追评
- {{itm.created_at.substr(0, 16)}}
-
-
-
-
-
-
-
-
-
-
-
-
- 店家回复
- {{itm.reply}}
-
-
-
-
- - 到底啦 -
-
-
-
-
-
@@ -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;
diff --git a/pages/groups/index.vue b/pages/groups/index.vue
index bc7fd5a..7572b03 100644
--- a/pages/groups/index.vue
+++ b/pages/groups/index.vue
@@ -162,7 +162,7 @@
{{item.description}}
-
+
@@ -387,13 +387,13 @@
-
+
-
+
@@ -401,18 +401,18 @@
-
+
-
+
-
+
基础信息
商品名称{{itm.spmc}}
@@ -432,7 +432,7 @@
-
+
温馨提示
@@ -714,7 +714,7 @@
客服
-
+
{{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) => {
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 12ca4c8..ddddd59 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -42,9 +42,10 @@
-
+
-
+
@@ -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%;
}
}
}
diff --git a/pages/mine/groupBuy/customized.vue b/pages/mine/groupBuy/customized.vue
index fcd4832..11e5af3 100644
--- a/pages/mine/groupBuy/customized.vue
+++ b/pages/mine/groupBuy/customized.vue
@@ -6,7 +6,7 @@
-
+
diff --git a/pages/mine/msg/complaint.vue b/pages/mine/msg/complaint.vue
index 594e5d0..7f09ab8 100644
--- a/pages/mine/msg/complaint.vue
+++ b/pages/mine/msg/complaint.vue
@@ -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) {
diff --git a/pages/mine/other/grass.vue b/pages/mine/other/grass.vue
index cf1bbe1..bf3ee4a 100644
--- a/pages/mine/other/grass.vue
+++ b/pages/mine/other/grass.vue
@@ -30,10 +30,10 @@
-
+
-
+
@@ -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() {
diff --git a/pages/mine/other/grassShare.vue b/pages/mine/other/grassShare.vue
index 7a9f4c6..64360c7 100644
--- a/pages/mine/other/grassShare.vue
+++ b/pages/mine/other/grassShare.vue
@@ -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() {
diff --git a/pages/saleTop/hot.vue b/pages/saleTop/hot.vue
index 4eaf07d..bdcdd2c 100644
--- a/pages/saleTop/hot.vue
+++ b/pages/saleTop/hot.vue
@@ -3,6 +3,11 @@
根据店铺销量计算,每小时更新
+
+ 日榜单
+ 月榜单
+
+
@@ -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;
+ }
+ }
+ }
diff --git a/pages/success/index.vue b/pages/success/index.vue
index e6ee3ee..0c1a418 100644
--- a/pages/success/index.vue
+++ b/pages/success/index.vue
@@ -14,9 +14,12 @@
支付方式
支付宝支付
-
- 支付金额
- ¥{{item.total_price}}
+
+
+ 支付金额
+ ¥{{item.total_price}}
+
+ 会员本单为您节省{{vipSave}}元
支付状态
@@ -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 {
diff --git a/pages/user/index.vue b/pages/user/index.vue
index 87c5e00..b185dc8 100644
--- a/pages/user/index.vue
+++ b/pages/user/index.vue
@@ -29,14 +29,13 @@
{{vip_name}}会员
-
- 剩余{{days}}天
-
-
-
+
+ 累计节省{{save_money}}元>
- 会员有效期至:{{userNum.vip_end_time}}
+ 会员有效期至:{{userNum.vip_end_time.slice(0, 10)}}
+ 填写我的生日
+
会员详情
@@ -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)
}
}
@@ -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;
+ }
}
}
}
diff --git a/pages/user/info.vue b/pages/user/info.vue
index 09a718b..5c2c7fa 100644
--- a/pages/user/info.vue
+++ b/pages/user/info.vue
@@ -18,9 +18,9 @@
生日
-
+
{{info.birthday}}
-
+
@@ -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
})
}
diff --git a/pages/user/login.vue b/pages/user/login.vue
index a604161..ef81b3f 100644
--- a/pages/user/login.vue
+++ b/pages/user/login.vue
@@ -72,7 +72,7 @@
账号密码登录
-
+
微信登录
@@ -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({
diff --git a/pages/vip/intro/index.vue b/pages/vip/intro/index.vue
index 2c07c7d..0adb71c 100644
--- a/pages/vip/intro/index.vue
+++ b/pages/vip/intro/index.vue
@@ -1,6 +1,9 @@
-
-
+
+
+
+
+ {{is_vip ? '续费' : '开通会员'}}
@@ -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;
+ }
}
diff --git a/pages/vip/mine/index.vue b/pages/vip/mine/index.vue
index 52d7580..9fe1a51 100644
--- a/pages/vip/mine/index.vue
+++ b/pages/vip/mine/index.vue
@@ -169,7 +169,9 @@
}
this.userBind(parmas)
await _this.getShareUrl()
- await _this.getUserVip()
+ },
+ onShow() {
+ this.getUserVip()
}
}
diff --git a/pages/vip/mine/sheng.vue b/pages/vip/mine/sheng.vue
new file mode 100644
index 0000000..18ed095
--- /dev/null
+++ b/pages/vip/mine/sheng.vue
@@ -0,0 +1,276 @@
+
+
+
+
+
+
+
+ 会员优惠劵
+ 入会礼+月季劵+其他会员卷
+
+ 已省¥{{sumData.coupon_saved_money || '0.00'}}
+
+
+
+
+
+
+ 会员价
+ 享受会员价
+
+ 已省¥{{sumData.vip_price_saved_money || '0.00'}}
+
+
+
+
+
+ 省钱明细
+
+
+ {{parseDate(item.date)}}
+
+
+
+
+
+
+ {{it.goods_name}}
+ {{it.sku_name}}
+
+
+
+ {{itm.created_at}}
+ 已省¥{{itm.total_saved_money}}
+
+
+
+
+
+ — 没有更多了 —
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/vip/pay/index.vue b/pages/vip/pay/index.vue
index c30dd54..cf76535 100644
--- a/pages/vip/pay/index.vue
+++ b/pages/vip/pay/index.vue
@@ -17,8 +17,8 @@
支付方式
- 微信支付
-
+ 支付宝
+
@@ -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()
}
}
diff --git a/static/image/presale.png b/static/image/presale.png
deleted file mode 100644
index 54afdd4..0000000
Binary files a/static/image/presale.png and /dev/null differ
diff --git a/static/image/soldout.png b/static/image/soldout.png
deleted file mode 100644
index 75f9102..0000000
Binary files a/static/image/soldout.png and /dev/null differ
diff --git a/static/image/vip_advert.png b/static/image/vip_advert.png
deleted file mode 100644
index 62fa4fd..0000000
Binary files a/static/image/vip_advert.png and /dev/null differ