提交代码
This commit is contained in:
parent
172f9c0c38
commit
14bbfdfbe7
|
|
@ -28,7 +28,8 @@
|
|||
<view style="height:60rpx;">
|
||||
|
||||
</view>
|
||||
<view style=" display: flex; align-items: center; justify-content: center; position: relative; margin-top: 50rpx;">
|
||||
<view
|
||||
style=" display: flex; align-items: center; justify-content: center; position: relative; margin-top: 50rpx;">
|
||||
<image @click="fenxiang()" :src="$img1('image/pop/btn.png')"
|
||||
style="width: 528.47rpx; height:101rpx; position: absolute;">
|
||||
</image>
|
||||
|
|
@ -56,6 +57,7 @@
|
|||
// #endif
|
||||
var bj = this.$img1('image/pop/di.png');
|
||||
return {
|
||||
isOpen: false,
|
||||
isH5,
|
||||
ruleData: null,
|
||||
todayHide: false,
|
||||
|
|
@ -65,9 +67,8 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
async onShareAppMessage(e) {
|
||||
onShareAppMessage(e) {
|
||||
var item = this.getData();
|
||||
|
||||
return item;
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -77,6 +78,13 @@
|
|||
methods: {
|
||||
close() {
|
||||
this.$refs._coupon_pop.close()
|
||||
this.isOpen = false;
|
||||
},
|
||||
getfengxiaodata() {
|
||||
if (this.isOpen) {
|
||||
return this.getData();
|
||||
}
|
||||
return null;
|
||||
},
|
||||
getData() {
|
||||
const userInfo = uni.getStorageSync('userinfo')
|
||||
|
|
@ -88,6 +96,7 @@
|
|||
ou_coupon_id: this.ruleData.id
|
||||
})
|
||||
}
|
||||
console.log(data);
|
||||
return data;
|
||||
},
|
||||
fenxiang() {
|
||||
|
|
@ -100,7 +109,8 @@
|
|||
},
|
||||
open(opt) {
|
||||
this.ruleData = opt
|
||||
this.$refs._coupon_pop.open()
|
||||
this.$refs._coupon_pop.open();
|
||||
this.isOpen = true;
|
||||
},
|
||||
|
||||
|
||||
|
|
|
|||
20
main.js
20
main.js
|
|
@ -14,11 +14,14 @@ Vue.prototype.gotoPage = gotopage
|
|||
import common from '@/common/common.js'
|
||||
Vue.prototype.$noMultipleClicks = common.noMultipleClicks
|
||||
Vue.prototype.$c = common;
|
||||
// var loginPage="http://api.zpc-xy.com/login.html";
|
||||
//var loginPage = "http://api.zpc-xy.com/login.html";
|
||||
// var loginPage="http://api.zpc-xy.com/login.html";
|
||||
var loginPage="https://xinglanmh.shequtuangou.vip/login.html";
|
||||
Vue.prototype.$loginPage = loginPage;
|
||||
Vue.prototype.$wxloginPage =`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx0e33d80d35e4a3b1&redirect_uri=${escape(loginPage)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`;
|
||||
Vue.prototype.$wxloginPage =
|
||||
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx0e33d80d35e4a3b1&redirect_uri=${escape(loginPage)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`;
|
||||
//ttps://open.weixin.qq.com/connect/qrconnect?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect
|
||||
// https://open.weixin.qq.com/connect/oauth2/authorize? =wx520c15f417810387&redirect_uri=https%3A%2F%2Fchong.qq.com%2Fphp%2Findex.php%3Fd%3D%26c%3DwxAdapter%26m%3DmobileDeal%26showwxpaytitle%3D1%26vb2ctag%3D4_2030_5_1194_60&response_type=code&scope=snsapi_base&state=123#wechat_redirect
|
||||
Vue.prototype.req = function(param, backpage, backtype) {
|
||||
uni.getNetworkType({
|
||||
success: function(res) {
|
||||
|
|
@ -179,10 +182,10 @@ Vue.prototype.req = function(param, backpage, backtype) {
|
|||
|
||||
// #ifdef H5
|
||||
function loadScript(url) {
|
||||
var script = document.createElement('script');
|
||||
script.type = 'text/javascript';
|
||||
script.src = url;
|
||||
document.head.appendChild(script);
|
||||
var script = document.createElement('script');
|
||||
script.type = 'text/javascript';
|
||||
script.src = url;
|
||||
document.head.appendChild(script);
|
||||
}
|
||||
|
||||
loadScript('https://res.wx.qq.com/open/js/jweixin-1.6.0.js');
|
||||
|
|
@ -210,7 +213,7 @@ Vue.prototype.onBridgeReady = function(data) {
|
|||
}
|
||||
// 测试
|
||||
// const baseUrl = ''
|
||||
// const baseUrl = 'https://api.zpc-xy.com/'
|
||||
//const baseUrl = 'https://api.zpc-xy.com/'
|
||||
|
||||
// 正式
|
||||
const baseUrl = 'https://xinglanmh.shequtuangou.vip'
|
||||
|
|
@ -231,5 +234,4 @@ App.mpType = 'app'
|
|||
const app = new Vue({
|
||||
...App
|
||||
})
|
||||
app.$mount()
|
||||
|
||||
app.$mount()
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name" : "枫岚云赏OL",
|
||||
"appid" : "__UNI__0A3F586",
|
||||
"name" : "枫岚云赏",
|
||||
"appid" : "__UNI__46B4383",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.1",
|
||||
"versionCode" : 101,
|
||||
|
|
@ -127,7 +127,7 @@
|
|||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx22273e57f5fa8e36",
|
||||
"appid" : "wx5b7faeac7141bd79",
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"es6" : false,
|
||||
|
|
|
|||
|
|
@ -516,6 +516,13 @@
|
|||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
if(this.$refs["couponPop"]!=null){
|
||||
var co= this.$refs["couponPop"].getfengxiaodata();
|
||||
if(co!=null){
|
||||
console.log(co);
|
||||
return co;
|
||||
}
|
||||
}
|
||||
return {
|
||||
title: `枫岚云赏${this.pageData.goods.title}系列`,
|
||||
imageUrl: this.pageData.goods.imgurl_detail,
|
||||
|
|
|
|||
|
|
@ -95,7 +95,8 @@
|
|||
<image class="pic-img" :src="item.imgurl" mode="aspectFit"></image>
|
||||
<view class="type-tag center"
|
||||
:style="{background: item.shang_info?item.shang_info.color:'#FFFFFF'}">
|
||||
{{ item.shang_info?item.shang_info.title:'' }}</view>
|
||||
{{ item.shang_info?item.shang_info.title:'' }}
|
||||
</view>
|
||||
<view class="num center bgfff">{{ item.surplus_stock }}/{{ item.stock }}</view>
|
||||
<view v-if="item.goods_type == 2" class="yu-tag ziti">预售</view>
|
||||
<view v-if="item.surplus_stock <= 0" class="shadow center">
|
||||
|
|
@ -145,7 +146,8 @@
|
|||
</view>
|
||||
<view class="column align-end">
|
||||
<view :style="{background: item.shang_color}" class="prize-shang center">
|
||||
{{item.shang_title}}</view>
|
||||
{{item.shang_title}}
|
||||
</view>
|
||||
<view class="flex mt10">
|
||||
<view class="title hang1">
|
||||
{{ item.goodslist_title }}
|
||||
|
|
@ -181,19 +183,19 @@
|
|||
</view>
|
||||
|
||||
<template v-else>
|
||||
<view class="btn common_bg column center"
|
||||
<view class="btn common_bg column center" v-if="getBtnXianShi(1)"
|
||||
:style="{ backgroundImage: `url(${$img1('common/chouBtn1.png')})`}" @click="confirmSubmit([0, 1])">
|
||||
<!-- <view>冲一发</view> -->
|
||||
</view>
|
||||
<view class="btn common_bg column center"
|
||||
<view class="btn common_bg column center" v-if="getBtnXianShi(3)"
|
||||
:style="{backgroundImage: `url(${$img1('common/chouBtn3.png')})`}" @click="confirmSubmit([0, 3])">
|
||||
<!-- <view>冲三发</view> -->
|
||||
</view>
|
||||
<view class="btn common_bg column center"
|
||||
<view class="btn common_bg column center" v-if="getBtnXianShi(5)"
|
||||
:style="{backgroundImage: `url(${$img1('common/chouBtn5.png')})`}" @click="confirmSubmit([0, 5])">
|
||||
<!-- <view>冲五发</view> -->
|
||||
</view>
|
||||
<view class="btn common_bg column center" v-if="pageData.goods.type != 5"
|
||||
<view class="btn common_bg column center" v-if="pageData.goods.type != 5&&getBtnXianShi(0)"
|
||||
:style="{backgroundImage: `url(${$img1('common/chouBtnAll.png')})`}"
|
||||
@click="confirmSubmit([0, pageData.goods.goodslist_surplus_stock])">
|
||||
<!-- <view>全收</view> -->
|
||||
|
|
@ -330,7 +332,7 @@
|
|||
</template>
|
||||
</view>
|
||||
|
||||
<view class="pay-title ziti">请选择抵扣方式</view>
|
||||
<view v-if="!(pageData.goods.type == 6 && !getBtnXianShi(0))" class="pay-title ziti">请选择抵扣方式</view>
|
||||
|
||||
<view v-if="pageData.goods.type == 5" class="pay-type">
|
||||
<view class="icon">
|
||||
|
|
@ -347,6 +349,9 @@
|
|||
<image v-else :src="$img1('common/check.png')" lazy-load></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="pageData.goods.type == 6 && !getBtnXianShi(0)">
|
||||
|
||||
</view>
|
||||
|
||||
<template v-else>
|
||||
<view class="pay-type" @click="changePay('useIntegral')">
|
||||
|
|
@ -525,8 +530,17 @@
|
|||
previewData: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
onShareAppMessage() {
|
||||
if(this.$refs["couponPop"]!=null){
|
||||
var co= this.$refs["couponPop"].getfengxiaodata();
|
||||
if(co!=null){
|
||||
console.log(co);
|
||||
return co;
|
||||
}
|
||||
}
|
||||
return {
|
||||
title: `枫岚云赏${this.pageData.goods.title}系列 第${this.pageData.goods.num}套`,
|
||||
imageUrl: this.pageData.goods.imgurl_detail,
|
||||
|
|
@ -681,7 +695,10 @@
|
|||
return
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.getBtnXianShi(0)) {
|
||||
this.useMoney = false;
|
||||
this.useIntegral = false;
|
||||
}
|
||||
this.buyNum = num
|
||||
|
||||
let data = {
|
||||
|
|
@ -720,10 +737,11 @@
|
|||
this.close('buyPop')
|
||||
|
||||
if (res.data.status == 1) {
|
||||
|
||||
const status = await this.$c.wxMpPay({
|
||||
data: res.data.res
|
||||
})
|
||||
|
||||
|
||||
if (status == 'success') {
|
||||
this.getPrize(res.data.order_num)
|
||||
this.doRefresh()
|
||||
|
|
@ -887,13 +905,37 @@
|
|||
}
|
||||
|
||||
this.pageData = res.data
|
||||
console.log(this.pageData);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getBtnXianShi(type) {
|
||||
if (this.pageData == null || this.pageData['xuangou'] == null) {
|
||||
// this.pageData
|
||||
return true;
|
||||
}
|
||||
let xuangou = this.pageData['xuangou'];
|
||||
if (xuangou.quanju_xiangou == 0) {
|
||||
return true;
|
||||
}
|
||||
if (type == 0) {
|
||||
return false;
|
||||
}
|
||||
if (type == 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
let yuxia = xuangou.quanju_xiangou - xuangou.user_xiangou_count;
|
||||
console.log(yuxia);
|
||||
if (yuxia >= type) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
close(e) {
|
||||
this.$refs[e].close()
|
||||
|
||||
if (e == "resPop") {
|
||||
if (this.prizeData['user_coupon'] != null) {
|
||||
this.$refs["couponPop"].open(this.prizeData['user_coupon']);
|
||||
|
|
|
|||
|
|
@ -605,6 +605,15 @@
|
|||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
|
||||
if(this.$refs["couponPop"]!=null){
|
||||
var co= this.$refs["couponPop"].getfengxiaodata();
|
||||
if(co!=null){
|
||||
console.log(co);
|
||||
return co;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
title: `枫岚云赏${this.pageData.goods.title}系列`,
|
||||
imageUrl: this.pageData.goods.imgurl_detail,
|
||||
|
|
|
|||
|
|
@ -175,10 +175,7 @@
|
|||
data() {
|
||||
return {
|
||||
z_imgPath: this.$z_img2 + 'shouye/',
|
||||
tabList: [{
|
||||
id: 2,
|
||||
title: '无限赏'
|
||||
},
|
||||
tabList: [
|
||||
// {
|
||||
// id: 10,
|
||||
// title: '卡牌赏'
|
||||
|
|
@ -202,7 +199,10 @@
|
|||
{
|
||||
id: 8,
|
||||
title: '领主赏',
|
||||
},
|
||||
},{
|
||||
id: 2,
|
||||
title: '小岚赏'
|
||||
}
|
||||
// {
|
||||
// id: 3,
|
||||
// title: '擂台赏'
|
||||
|
|
@ -869,7 +869,7 @@
|
|||
width: 80rpx;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
top: -10rpx;
|
||||
top: -1rpx;
|
||||
left: 10rpx;
|
||||
}
|
||||
|
||||
|
|
@ -941,13 +941,12 @@
|
|||
.list_1>image {
|
||||
// width: 290rpx;
|
||||
// height: 290rpx;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
width: 90%;
|
||||
height: 88%;
|
||||
}
|
||||
|
||||
.list_2 {
|
||||
padding: 20rpx 20rpx 0;
|
||||
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user