修改页面
This commit is contained in:
parent
56cfb89387
commit
fefdb4c33e
8
App.vue
8
App.vue
@ -52,10 +52,16 @@
|
||||
},
|
||||
async bindCode(options, code) {
|
||||
if (!options.query) return
|
||||
if (options.query.path == 'goods_details') return
|
||||
// if (options.query.path == 'goods_details') return
|
||||
let invite_code = options.query.invite_code || strToParams(decodeURIComponent(options.query.scene))
|
||||
.invite_code
|
||||
let source = options.query.source || ''
|
||||
|
||||
if (invite_code) {
|
||||
if (uni.getLaunchOptionsSync().scene == 1154 && source == 'pyq') {
|
||||
//朋友圈单页不走登录
|
||||
return
|
||||
}
|
||||
uni.setStorageSync('invite_code', invite_code)
|
||||
const {
|
||||
data,
|
||||
|
||||
@ -211,6 +211,10 @@ export function searchGoods(params) {
|
||||
return request.get('goods/searchByName', {params});
|
||||
}
|
||||
|
||||
export function getYearList(params) {
|
||||
return request.get('goods/yearList', {params});
|
||||
}
|
||||
|
||||
export function getHotList(params) {
|
||||
return request.get('goods/hotList', {params});
|
||||
}
|
||||
|
||||
@ -44,17 +44,6 @@
|
||||
<u-field label="联系电话" v-model="form.empowerPhone" label-width="160" placeholder="请输入联系电话" :border-bottom="false" required />
|
||||
</view>
|
||||
|
||||
<view class="apply-form-item">
|
||||
<u-field label="自拍照" label-width="160" placeholder="请上传自拍照" :border-bottom="false"
|
||||
required disabled />
|
||||
<view class="apply-form-upload" @click="uploadHandSelf" v-if="form.selfPhoto">
|
||||
<u-image :showLoading="true" :src="form.selfPhoto" width="200rpx" height="200rpx"></u-image>
|
||||
</view>
|
||||
<view class="apply-form-upload" @click="uploadHandSelf" v-else>
|
||||
<u-image :showLoading="true" :src="aliOSS + 'uniapp/upload.png'" width="200rpx" height="200rpx"></u-image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="apply-form-item">
|
||||
<u-field label="人像面" label-width="160" placeholder="请上传身份证人像面" :border-bottom="false"
|
||||
required disabled />
|
||||
@ -76,6 +65,16 @@
|
||||
<u-image :showLoading="true" :src="aliOSS + 'uniapp/guohui.png'" :width="width" :height="height"></u-image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="apply-form-item">
|
||||
<u-field label="自拍照" label-width="160" placeholder="请上传自拍照" :border-bottom="false" disabled />
|
||||
<view class="apply-form-upload" @click="uploadHandSelf" v-if="form.selfPhoto">
|
||||
<u-image :showLoading="true" :src="form.selfPhoto" width="200rpx" height="200rpx"></u-image>
|
||||
</view>
|
||||
<view class="apply-form-upload" @click="uploadHandSelf" v-else>
|
||||
<u-image :showLoading="true" :src="aliOSS + 'uniapp/upload.png'" width="200rpx" height="200rpx"></u-image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="apply-form-item">
|
||||
<u-field label="商家图标" label-width="160" placeholder="请上传商家图标" :border-bottom="false" disabled />
|
||||
@ -119,11 +118,7 @@
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="apply-form-item" v-if="form.bankType == 1">
|
||||
<u-field label="大额行号" v-model="form.largeNumber" label-width="160" :border-bottom="false" placeholder="请输入大额行号" required />
|
||||
</view>
|
||||
|
||||
|
||||
<view class="apply-form-item" v-if="form.bankType == 2">
|
||||
<u-field label="户名" v-model="form.bank_user_name" label-width="160" :border-bottom="false" placeholder="请输入户名" required />
|
||||
</view>
|
||||
@ -135,6 +130,10 @@
|
||||
<view class="apply-form-item">
|
||||
<u-field label="银行卡号" v-model="form.bankCard" label-width="160" :border-bottom="false" placeholder="请输入银行卡号" required />
|
||||
</view>
|
||||
|
||||
<view class="apply-form-item" v-if="form.bankType == 1">
|
||||
<u-field label="大额行号" v-model="form.largeNumber" label-width="160" :border-bottom="false" placeholder="请输入大额行号" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item">
|
||||
@ -431,9 +430,9 @@
|
||||
title: '请填写联系电话'
|
||||
})
|
||||
|
||||
if (!selfPhoto) return this.$toast({
|
||||
title: '请上传自拍照'
|
||||
})
|
||||
// if (!selfPhoto) return this.$toast({
|
||||
// title: '请上传自拍照'
|
||||
// })
|
||||
|
||||
if (!idFront) return this.$toast({
|
||||
title: '请上传身份证人像面'
|
||||
@ -455,9 +454,9 @@
|
||||
// title: '请填写社会信用代码'
|
||||
// })
|
||||
|
||||
if (bankType == 1 && !largeNumber) return this.$toast({
|
||||
title: '请输入大额卡号'
|
||||
})
|
||||
// if (bankType == 1 && !largeNumber) return this.$toast({
|
||||
// title: '请输入大额卡号'
|
||||
// })
|
||||
|
||||
if (bankType != 1 && !bank_user_name) return this.$toast({
|
||||
title: '请输入户名'
|
||||
|
||||
@ -493,7 +493,7 @@
|
||||
this.payMoney = this.money
|
||||
|
||||
if (result === 'success') {
|
||||
if (data.acc_cust_id > 0) {
|
||||
if (data && data.acc_cust_id && data.acc_cust_id > 0) {
|
||||
checkOrder({
|
||||
post: data
|
||||
})
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
</view>
|
||||
<view class="rule-txt flex line-1" v-if="config && config.service">
|
||||
<view class="txt-gray m-r-10">服务</view>
|
||||
<view class="item m-r-10" v-for="(item, index) in config.service">{{item}}</view>
|
||||
<view class="item m-r-10" v-for="(item, index) in config.service" :key="index">{{item}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -61,7 +61,10 @@
|
||||
</view>
|
||||
|
||||
<view class="flex-1 m-l-20 m-r-10">
|
||||
<view class="line-2">{{item.name}}</view>
|
||||
<view class="line-2">
|
||||
<text v-if="item.presale == 1" class="$u-type-error">【预售】</text>
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="primary mt10" v-if="p_id > 0">
|
||||
<view v-if="price_type == 0">
|
||||
<view v-if="item.purchase_price > 0">
|
||||
|
||||
@ -11,7 +11,10 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-info">
|
||||
<view class="goods-name line-2">{{item.name}}</view>
|
||||
<view class="goods-name line-2">
|
||||
<text v-if="item.presale == 1" class="$u-type-error">【预售】</text>
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="price mt10 row">
|
||||
<text class="xs lighter m-r-10">零售价: </text>
|
||||
<price-format :color="colorConfig.primary" class="m-r-10" :first-size="34" :second-size="26"
|
||||
@ -45,7 +48,10 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-info">
|
||||
<view class="goods-name line-2" :class="{'store-tag': item.shop_type == 1}">{{item.name}}</view>
|
||||
<view class="goods-name line-2" :class="{'store-tag': item.shop_type == 1}">
|
||||
<text v-if="item.presale == 1" class="$u-type-error">【预售】</text>
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="price mt10 row flex">
|
||||
<text class="xs lighter m-r-10" v-if="p_id > 0">零售价: </text>
|
||||
<price-format :color="colorConfig.primary" class="m-r-10" :first-size="34" :second-size="26"
|
||||
@ -85,7 +91,9 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-info m-l-20 flex-1">
|
||||
<view class="goods-name line-2 m-b-10" :class="{'store-tag': item.shop_type == 1}">{{item.name}}
|
||||
<view class="goods-name line-2 m-b-10" :class="{'store-tag': item.shop_type == 1}">
|
||||
<text v-if="item.presale == 1" class="$u-type-error">【预售】</text>
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="flex row-between m-t-10">
|
||||
<view class="price m-t-10 flex">
|
||||
@ -126,7 +134,10 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-info">
|
||||
<view class="goods-name line-1 sm">{{item.name}}</view>
|
||||
<view class="goods-name line-1 sm">
|
||||
<text v-if="item.presale == 1" class="$u-type-error">【预售】</text>
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="price m-t-10 row flex">
|
||||
<text class="xs lighter m-r-10" v-if="p_id > 0">零售价: </text>
|
||||
<price-format :color="colorConfig.primary" class="m-r-10" :first-size="28" :second-size="22"
|
||||
@ -166,7 +177,10 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-info flex-1 m-l-20 flex-1">
|
||||
<view class="goods-name line-2">{{item.name}}</view>
|
||||
<view class="goods-name line-2">
|
||||
<text v-if="item.presale == 1" class="$u-type-error">【预售】</text>
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="price mt10 row" v-if="p_id > 0">
|
||||
<price-type :price-type="priceType" :purchase-price="item.purchase_price"
|
||||
:issuing-price="item.issuing_price"
|
||||
@ -214,7 +228,10 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-info m-l-20 flex-1">
|
||||
<view class="goods-name line-2 m-b-10">{{item.name}}</view>
|
||||
<view class="goods-name line-2 m-b-10">
|
||||
<text v-if="item.presale == 1" class="$u-type-error">【预售】</text>
|
||||
{{item.name}}
|
||||
</view>
|
||||
<!-- <text class="sale br60 xxs">已有{{item.sales_total}}人购买</text> -->
|
||||
|
||||
<view class="row-between flex m-t-10">
|
||||
@ -264,7 +281,10 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-info m-l-20 flex-1">
|
||||
<view class="goods-name line-2 m-b-10">{{item.name}}</view>
|
||||
<view class="goods-name line-2 m-b-10">
|
||||
<text v-if="item.presale == 1" class="$u-type-error">【预售】</text>
|
||||
{{item.name}}
|
||||
</view>
|
||||
<text class="views br60 xxs">{{item.views}}浏览量</text>
|
||||
<view class="row-between flex m-t-10">
|
||||
<view>
|
||||
|
||||
@ -35,24 +35,27 @@
|
||||
|
||||
<view class="container flex m-t-20">
|
||||
<view class="section hot-sale">
|
||||
<router-link to="/pages/active_list/active_list?type=hot">
|
||||
<view class="header row-center">
|
||||
<u-image :src="aliOSS + 'uniapp/rxbd.png'" width="160" height="80" mode="aspectFit"></u-image>
|
||||
<router-link to="/pages/active_list/active_list?type=year">
|
||||
<view class="header row-center bold xxl">
|
||||
年货超值购
|
||||
</view>
|
||||
</router-link>
|
||||
<view class="content">
|
||||
<swiper class="swiper" :autoplay="true" :interval="3000" style="height: 500rpx;">
|
||||
<swiper-item v-for="(item, index) in hotListGoods" :key="index">
|
||||
<swiper-item v-for="(item, index) in yearGoods.lists" :key="index">
|
||||
<router-link :to="{path: '/pages/goods_details/goods_details', query: {id: item.goods_id || item.id}}">
|
||||
<view style="border-radius: 20rpx;">
|
||||
<view class="paixu-block">
|
||||
<u-image mode="aspectFill" width="100%" height="360rpx"
|
||||
border-radius="20" :src="item.image">
|
||||
</u-image>
|
||||
<image v-if="index < 3" class="paixu" :src="aliOSS + 'uniapp/No.' + index + '.png'"></image>
|
||||
<!-- <image v-if="index < 3" class="paixu" :src="aliOSS + 'uniapp/No.' + index + '.png'"></image> -->
|
||||
</view>
|
||||
|
||||
<view class="line-2 p-t-20">{{item.name}}</view>
|
||||
<view class="line-2 p-t-20">
|
||||
<text v-if="item.presale == 1" class="$u-type-error">【预售】</text>
|
||||
{{item.name}}
|
||||
</view>
|
||||
<price-format :color="colorConfig.primary" class="m-r-10" :first-size="34" :second-size="26"
|
||||
:subscript-size="26" :price="item.activity_price || item.min_price"
|
||||
:weight="500"></price-format>
|
||||
@ -187,6 +190,9 @@
|
||||
hotListGoods() {
|
||||
return this.homeData.hot_list || []
|
||||
},
|
||||
yearGoods() {
|
||||
return this.homeData.year_goods || []
|
||||
},
|
||||
newGoods() {
|
||||
return this.homeData.news || []
|
||||
},
|
||||
|
||||
@ -17,10 +17,9 @@ const IS_H5 = false
|
||||
/** S API BaseURL **/
|
||||
const baseURLMap = {
|
||||
// 开发环境
|
||||
development: 'https://dlh.stnav.com',
|
||||
development: 'https://dlh.hainings.com',
|
||||
// 生产环境
|
||||
production: IS_H5 ? location.origin : 'https://dlh.hainings.com',
|
||||
//app https://dlh.zjeloong.com
|
||||
}
|
||||
|
||||
const baseURL = SWITCH_DEVELOPMENT ? baseURLMap['development'] : baseURLMap[process.env.NODE_ENV]
|
||||
|
||||
20
pages.json
20
pages.json
@ -239,16 +239,16 @@
|
||||
"subPackages": [{
|
||||
"root": "bundle",
|
||||
"pages": [
|
||||
{
|
||||
"path": "pages/community/community",
|
||||
"meta": {
|
||||
"auth": false,
|
||||
"keepScroll": true
|
||||
},
|
||||
"style": {
|
||||
"navigationBarTitleText": "种草"
|
||||
}
|
||||
},
|
||||
// {
|
||||
// "path": "pages/community/community",
|
||||
// "meta": {
|
||||
// "auth": false,
|
||||
// "keepScroll": true
|
||||
// },
|
||||
// "style": {
|
||||
// "navigationBarTitleText": "种草"
|
||||
// }
|
||||
// },
|
||||
{
|
||||
"path": "pages/shop_street/shop_street",
|
||||
"name": "shop_street",
|
||||
|
||||
@ -11,9 +11,13 @@
|
||||
</view>
|
||||
<view class="main">
|
||||
<view class="list-title flex row-center">
|
||||
<u-divider v-if="type == 'year'" :color="colorConfig.normal" bg-color="transparent" :font-size="38">年货超值购</u-divider>
|
||||
<u-divider v-if="type == 'hot'" :color="colorConfig.normal" bg-color="transparent" :font-size="38">热销榜单</u-divider>
|
||||
<u-divider v-if="type == 'new'" :color="colorConfig.normal" bg-color="transparent" :font-size="38">新品推荐</u-divider>
|
||||
</view>
|
||||
<view>
|
||||
<goods-list v-if="type == 'year'" :list="goodsList" type="double" :price-type="price_type"></goods-list>
|
||||
</view>
|
||||
<view class="hot">
|
||||
<goods-list v-if="type == 'hot'" :show-order="true" :list="goodsList" type="double" :price-type="price_type"></goods-list>
|
||||
</view>
|
||||
@ -27,6 +31,7 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
getYearList,
|
||||
getHotList,
|
||||
getGoodsList,
|
||||
getNewGoods
|
||||
@ -50,7 +55,12 @@
|
||||
},
|
||||
onLoad() {
|
||||
this.type = this.$Route.query.type
|
||||
console.log('type=', this.type)
|
||||
switch(this.type) {
|
||||
case 'year': uni.setNavigationBarTitle({
|
||||
title: '年货超值购'
|
||||
})
|
||||
break;
|
||||
case 'hot': uni.setNavigationBarTitle({
|
||||
title: '热销榜单'
|
||||
})
|
||||
@ -71,6 +81,24 @@
|
||||
p_id: this.$store.getters.hasPid,
|
||||
set: this.$store.getters.hasSetId
|
||||
}
|
||||
|
||||
if (this.type == 'year') {
|
||||
getYearList(params).then(res => {
|
||||
if (res.code == 1) {
|
||||
this.price_type = 0;
|
||||
let curPageData = res.data.lists;
|
||||
let curPageLen = curPageData.length;
|
||||
let hasNext = !!res.data.more;
|
||||
if (page.num == 1) {
|
||||
this.goodsList = [];
|
||||
}
|
||||
this.goodsList = this.goodsList.concat(curPageData);
|
||||
this.mescroll.endSuccess(curPageLen, hasNext);
|
||||
}
|
||||
}).catch(err => {
|
||||
this.mescroll.endErr()
|
||||
})
|
||||
}
|
||||
|
||||
if (this.type == 'hot') {
|
||||
getHotList(params).then(res => {
|
||||
|
||||
@ -155,7 +155,10 @@
|
||||
:subscript-size="26" :price="goodsDetail.wholesale_price" :weight="500"></price-format>
|
||||
</view> -->
|
||||
<view class="flex">
|
||||
<view class="name lg bold">{{ goodsDetail.name }}</view>
|
||||
<view class="name lg bold">
|
||||
<text v-if="goodsDetail.presale == 1" class="new-goods">【预售】</text>
|
||||
{{ goodsDetail.name }}
|
||||
</view>
|
||||
<image class="icon-share" :src="aliOSS + 'uniapp/icon_share.png'" @tap="showShareBtn = true"
|
||||
v-if="goodsType == 1"></image>
|
||||
</view>
|
||||
@ -225,6 +228,11 @@
|
||||
<view>
|
||||
<get-coupon :wrap-style="{'margin-top': '20rpx'}" :goods-id="goodsDetail.id"></get-coupon>
|
||||
</view>
|
||||
|
||||
<view v-if="goodsDetail.presale && goodsDetail.presale_mask" class="spec flex bg-white m-t-20" @tap="showSpecFun(0)">
|
||||
<text class="bold">预售说明</text>:{{goodsDetail.presale_mask}}
|
||||
</view>
|
||||
|
||||
<view v-if="!goodsType" class="spec flex bg-white m-t-20" @tap="showSpecFun(0)">
|
||||
<view class="text muted">已选</view>
|
||||
<view class="line-1 m-r-20 flex-1">{{ checkedGoods.spec_value_str || '默认' }}</view>
|
||||
@ -561,7 +569,10 @@
|
||||
this.topArr[2] = res.top - this.navHeight
|
||||
})
|
||||
},
|
||||
async getLoginCode() {
|
||||
async getLoginCode() {
|
||||
if (uni.getLaunchOptionsSync().scene == 1154) {
|
||||
return true
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.login({
|
||||
provider: "weixin",
|
||||
@ -820,7 +831,7 @@
|
||||
});
|
||||
},
|
||||
|
||||
share() {
|
||||
share(type) {
|
||||
const {
|
||||
goodsDetail,
|
||||
inviteCode,
|
||||
@ -831,8 +842,14 @@
|
||||
set
|
||||
} = this;
|
||||
|
||||
let url =
|
||||
`/pages/goods_details/goods_details?id=${id}&invite_code=${inviteCode}&path=goods_details&activity_sn=${activity_sn}`
|
||||
// let url = ''
|
||||
let url = `id=${id}&invite_code=${inviteCode}&path=goods_details&activity_sn=${activity_sn}`;
|
||||
// if (type == 1) {
|
||||
// url = `/pages/goods_details/goods_details?${params}`
|
||||
// } else if(type == 2) {
|
||||
// url = params
|
||||
// }
|
||||
|
||||
|
||||
if (p_id) {
|
||||
url += `&p_id=${p_id}`
|
||||
@ -848,20 +865,29 @@
|
||||
url += `&set=${set}`
|
||||
}
|
||||
|
||||
return {
|
||||
title: team.share_title || goodsDetail.name,
|
||||
imageUrl: goodsDetail.image,
|
||||
path: url
|
||||
};
|
||||
if (type == 1) {
|
||||
return {
|
||||
title: team.share_title || goodsDetail.name,
|
||||
imageUrl: goodsDetail.image,
|
||||
path: `/pages/goods_details/goods_details?${url}`
|
||||
}
|
||||
} else if (type == 2) {
|
||||
return {
|
||||
title: team.share_title || goodsDetail.name,
|
||||
imageUrl: goodsDetail.image,
|
||||
query: url + '&source=pyq'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
async onShareAppMessage() {
|
||||
return this.share()
|
||||
return this.share(1)
|
||||
},
|
||||
|
||||
onShareTimeline() {
|
||||
return this.share()
|
||||
return this.share(2)
|
||||
},
|
||||
|
||||
computed: {
|
||||
@ -1208,4 +1234,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.new-goods {
|
||||
color: #ff2c3c;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
@ -219,7 +219,8 @@
|
||||
if (result === 'success' && this.shopId == 17 && this.payway != 3) {
|
||||
checkReturn({
|
||||
alog_id: data.alog_id,
|
||||
type: 1
|
||||
type: 1,
|
||||
shop_id: this.shopId
|
||||
})
|
||||
}
|
||||
// 页面出栈
|
||||
|
||||
Loading…
Reference in New Issue
Block a user