fanfan 11 months ago
commit 06ab086b9b
  1. 5
      api/goods/index.js
  2. 5
      pages.json
  3. 2
      pages/activity/presale.vue
  4. 31
      pages/activity/presaleRule.vue
  5. 8
      pages/activity/seckill.vue
  6. 224
      pages/goods/detail.vue
  7. 11
      pages/index/index.vue
  8. 7
      pages/invite/index.vue
  9. 48
      pages/invite/rule.vue
  10. 7
      pages/login/components/mp-weixin-mobile.vue
  11. 22
      pages/login/index.vue
  12. 6
      pages/news/recycling/orderDetail.vue
  13. 1000
      pages/news/recycling/orderList.vue
  14. 61
      pages/news1/jinqun.vue
  15. 20
      pages/user/index.vue

@ -14,6 +14,11 @@ const api = {
presale:'goods/presale'
}
// 商品价格修改
export const editGoodsPrice = (param, option) => {
return request.get('StoreKeeper/editGoodsPrice', param, option)
}
// 商品浏览记录
export const browseHistoryList = (param, option) => {
return request.get('goods/browseLog', param, option)

@ -99,6 +99,11 @@
"style": {
"navigationBarTitleText": "邀请记录"
}
},{
"path": "pages/invite/rule",
"style": {
"navigationBarTitleText": "邀请规则"
}
},
{
"path": "pages/custom/index",

@ -58,7 +58,7 @@
methods: {
goPre(item) {
uni.navigateTo({
url: '/pages/goods/detail?goodsId=' + item.goods_id + '&isPre=' + true+'&pre_id='+this.info.id
url: '/pages/goods/detail?goodsId=' + item.goods_id + '&isPre=' + true+'&pre_id='+this.info.id+'&isBuy='+this.info.end_time
})
},
openPage() {

@ -1,13 +1,11 @@
<template>
<view class="presale">
<view class="p">
<image :src="content"></image>
</view>
<view class="p" v-html="content"></view>
</view>
</template>
<script>
import * as Api from '@/api/activity'
import * as Api from '@/api/help'
export default {
data() {
return {
@ -27,11 +25,15 @@
//
getCarouselList(type) {
const app = this;
Api.getImage({
type: type
Api.getAgreement({
type: type==5?'presale_rule':"rank_rule"
})
.then(result => {
this.content = result.data.imgurl[0]
let content = result.data.detail.content;
if(content){
content = content.replace(/style=""/g,'').replace(/<img src=/g,'<img style="width: 100%; display:block" src=')
}
this.content = content
})
.finally(() => app.isLoading = false)
},
@ -41,21 +43,10 @@
<style lang="scss" scoped>
.presale {
height: 100vh;
background-color: #fff;
padding: 0 40rpx;
overflow-y: auto;
.title {
padding: 40rpx 0;
font-size: 32rpx;
font-weight: 500;
color: #000000;
}
padding: 40rpx;
.p {
font-size: 26rpx;
line-height: 46rpx;
line-height: 50rpx;
color: #212121;
}
}

@ -25,7 +25,7 @@
<view class="over" v-if="tabbar.length">
<view class="info">
距秒杀<text
class="m-r-10">{{ tabbar[curTabIndex].status == ActiveStatusEnum.STATE_BEGIN.value ? '结束' : '开始' }}</text>还剩
class="m-r-10">{{ tabbar[curTabIndex].status == ActiveStatusEnum.STATE_BEGIN.value ? '结束' : '开始' }}</text>还剩
<count-down style='display: inline-block;' :date="tabbar[curTabIndex].count_down_time"
separator="colon" theme="custom" />
</view>
@ -167,7 +167,7 @@
})
}
app.curTabIndex = 0
if (!app.goodsList.data.length) {
if (!app.goodsList.length) {
app.mescroll.showEmpty()
}
resolve()
@ -244,11 +244,13 @@
//
handleTargetGoods(sharpGoodsId) {
let count_down_time = new Date(this.tabbar[this.curTabIndex].count_down_time.replace(/-/g, '/')).getTime()-new Date().getTime()
uni.navigateTo({
url: '/pages/goods/detail?goodsId=' + sharpGoodsId
url: '/pages/goods/detail?goodsId=' + sharpGoodsId+"&isSeckill="+true+'&isBuy='+count_down_time+'&seckillText='+(this.tabbar[this.curTabIndex].status == this.ActiveStatusEnum.STATE_BEGIN.value ? '结束' : '开始' )
})
},
//
setWxofficialShareData() {
this.updateShareCardData({

@ -72,8 +72,8 @@
<image :src="$picUrl+'/static/detail/copy.png'"></image>
</view>
<view class="operaImg">
<image :src="$picUrl+'/static/detail/jiangjia.png'" class="tips"></image>
<image :src="$picUrl+'/static/detail/tip.png'" class="tips"></image>
<image :src="$picUrl+'/static/detail/miaosha.png'" v-if="isSeckill" class="tips"></image>
<image :src="$picUrl+'/static/detail/tip.png'" @click="toJDdetal(goods.goods_id)" class="tips"></image>
<image :src="$picUrl+'/static/detail/ys.png'" class="tips"></image>
</view>
</view>
@ -200,32 +200,77 @@
</view>
</view>
<view class="fooRight">
<view class="fooRight" v-if="isLogin && userInfo.user_type == 40">
<template v-if="goods.status == 20">
<view class="btn-bg">
已下架
</view>
</template>
<template v-else>
<template v-if="goods.skuList && goods.skuList.length > 0 && goods.skuList[0].stock_num == 0">
<view class="btn-bg" style="background-color: #FF1D1D;" @click="openPirce()">
修改价格
</view>
</template>
</view>
<view class="fooRight" v-else>
<template v-if="goods.status == 20">
<view class="btn-bg">
暂无库存
已下架
</view>
</template>
<template v-else>
<view class="addCar" v-if="!isPre" @click="choseSku(2)">
加入购物车
</view>
<view class="buyNow" v-if="!isPre" @click="choseSku(3)">
立即购买
</view>
<view class="buyNow" @click="onReservation()" v-if="isPre">
立即预约
</view>
<template v-if="goods.skuList && goods.skuList.length > 0 && goods.skuList[0].stock_num == 0">
<view class="btn-bg">
暂无库存
</view>
</template>
<template v-else>
<template v-if="!isPre">
<template v-if="isSeckill">
<template v-if="isBuy">
<template v-if="seckillText=='距离'">
<view class="addCar" @click="choseSku(2)">
加入购物车
</view>
<view class="buyNow" @click="choseSku(3)">
立即购买
</view>
</template>
<template v-else>
<view class="btn-bg">
未到时间
</view>
</template>
</template>
<template v-else>
<view class="btn-bg">
已下架
</view>
</template>
</template>
<template v-else>
<view class="addCar" @click="choseSku(2)">
加入购物车
</view>
<view class="buyNow" @click="choseSku(3)">
立即购买
</view>
</template>
</template>
<template v-if="isPre">
<view class="buyNow" @click="onReservation()" v-if="isBuy > 0">
立即预约
</view>
<view class="btn-bg" v-else>
已失效
</view>
</template>
</template>
</template>
</template>
</view>
</view>
</view>
<view class="dia" v-if="openDialog">
<view class="preSuc" v-if="shareType=='pre'">
@ -238,8 +283,59 @@
<view class="iKnow" @click="onKonw">
查看预约记录
</view>
</view>
<view class="setMs" v-if="shareType=='setPrice'">
<view class="msprice">
设置商品价格
</view>
<view class="msLine">
<u-line class="u-line"></u-line>
</view>
<view class="msp">
<text>原价格:</text>
<input type="text" disabled v-model="goods.goods_price_min" class="inp" />
</view>
<view class="msp">
<text>商品价格:</text>
<input type="text" v-model="max_price" placeholder="商品价格" class="inp" />
</view>
<view class="msp">
<text>划线价格:</text>
<input type="text" v-model="markup_rate" placeholder="划线价格" class="inp" />
</view>
<!-- <view class="qj">
<text class="msQj">秒杀区间:</text>
<view class="date">
<view class="beginTime timeCommn">
开始时间
</view>
-
<view class="timeCommn endTime">
结束时间
</view>
</view>
</view> -->
<!-- <view class="msLimit">
<text>秒杀限购:</text>
<switch @change="switch1Change" />
</view>
<view class="peoLimit">
<text>每人限购</text>
<view class="num">
1
</view>
<text></text>
</view> -->
<view class="operaBtn">
<view class="cancel btnComm" @click="shareCancel()">
取消
</view>
<view class="sureBtn btnComm" @click="toUnpdatePrice()">
确定
</view>
</view>
</view>
<view class="setMs" v-if="shareType=='setPrice'">
<!-- <view class="setMs" v-if="shareType=='setPrice'">
<view class="msprice">
设置秒杀价格
</view>
@ -281,7 +377,7 @@
确定
</view>
</view>
</view>
</view> -->
<!-- -->
<view class="shareWechat" v-if="shareType=='share'">
<view class="shareGoods">
@ -348,6 +444,8 @@
},
data() {
return {
max_price: "",
markup_rate: "",
showGoodsPosterPopup: false,
cityInfo: {},
currenIndex: 0,
@ -361,8 +459,11 @@
skuMode: 1,
diaShow: false,
searchValue: '',
isPre: false,
pre_id: '',
isPre: false, //
pre_id: '', //id
isBuy: "",//
isSeckill: false,//
seckillText: "",//
setPrice: false,
openDialog: false,
goodsId: '',
@ -384,7 +485,11 @@
console.log(options,"oo")
this.isPre = options.isPre?options.isPre:null
this.goodsId = options.goodsId?options.goodsId:null
this.pre_id = options.pre_id?options.pre_id:null;
this.pre_id = options.pre_id?options.pre_id:null;
this.isSeckill = options.isSeckill?options.isSeckill:null;
this.isBuy = options.isBuy?decodeURIComponent(options.isBuy):null;
this.seckillText = options.seckillText?decodeURIComponent(options.seckillText):null;
console.log(this.isBuy)
this.getSuggestGoods()
this.getServeList()
this.getGoodsDetail()
@ -408,6 +513,57 @@
}
},
methods: {
//
async toUnpdatePrice(){
const that = this;
if(!that.max_price){
uni.showToast({
icon: "none",
title: "商品价格不能为空!"
})
return ;
}
if(!that.markup_rate){
uni.showToast({
icon: "none",
title: "划线价格不能为空!"
})
return ;
}
let params={
id: that.goods.goods_id,
goods_price: that.max_price,
line_price: that.markup_rate,
cat_id: that.goods.category.category_id
}
GoodsApi.editGoodsPrice(params).then(res => {
if (res.status == 200) {
that.shareCancel();
that.$toast("修改成功");
setTimeout(()=>{
that.getGoodsDetail();
},1000)
}
})
.catch()
},
//
toJDdetal(sku) {
wx.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74',
path: '/pages/item/detail/detail?sku='+sku,
envVersion: 'release',
success(res) {
//
console.log(res);
}
})
},
//
openPirce() {
this.openDialog = true;
this.shareType= 'setPrice'
},
//
previewImage(i){
uni.previewImage({
@ -427,7 +583,8 @@
shareImg(){
this.openDialog =true
this.shareType= 'share'
},
},
//
preNow(){
const that = this
let params={
@ -712,23 +869,6 @@
this.openDialog = false
this.showGoodsPosterPopup = true;
}
//
// //
// getGoodsDetail() {
// const app = this
// return new Promise((resolve, reject) => {
// GoodsApi.poster({
// goodsId: app.goodsId,
// channel: ""
// })
// .then(result => {
// app.imageUrl = result.data.imageUrl
// resolve(result)
// })
// .catch(reject)
// })
// },
// },
},
},
/**
@ -1365,7 +1505,7 @@
}
.buyNow {
width: 212rpx;
flex: 1;
height: 78rpx;
background: linear-gradient(102deg, #FE5E06 0%, #F3221A 100%);
border-radius: 42rpx 42rpx 42rpx 42rpx;
@ -1453,7 +1593,7 @@
.setMs {
width: 656rpx;
height: 690rpx;
height: 590rpx;
background: #FFFFFF;
border-radius: 12rpx 12rpx 12rpx 12rpx;
opacity: 1;

@ -140,7 +140,7 @@
</view>
</view>
<view class="goods-list">
<view class="list" v-for="(item, index) in seckillList" :key="index" @click="goJump('/pages/goods/detail?goodsId=' + item.goods_id)">
<view class="list" v-for="(item, index) in seckillList" :key="index" @click="handleTargetGoods(item.goods_id)">
<view class="pictrue">
<image :src="item.goods_image"></image>
</view>
@ -486,12 +486,20 @@
serveList: [],
couList: [],
timeData: {},
tabbar: [],
curTabIndex: 0
}
},
methods:{
onChangeSeckillCutDownTime(e){
this.timeData = e
},
//
handleTargetGoods(sharpGoodsId) {
uni.navigateTo({
url: '/pages/goods/detail?goodsId=' + sharpGoodsId+"&isSeckill="+true+'&isBuy='+this.seckillCutDownTime+'&seckillText='+(this.tabbar[this.curTabIndex].status == 10 ? '结束' : '开始' )
})
},
//
toChat() {
if(!uni.getStorageSync("AccessToken")){
@ -636,6 +644,7 @@
this.seckillList = []
limit.data().then(result => {
let seckillList = [];
this.tabbar = result.data.tabbar
if(result.data.tabbar && result.data.tabbar.length > 0){
let count_down_time = result.data.tabbar[0].count_down_time.replace(/-/g, '/');
this.seckillCutDownTime = Math.ceil((new Date(count_down_time).getTime() - new Date().getTime()));

@ -6,7 +6,7 @@
<view class="invite-hd">
<image :src="$picUrl+'/static/news/invite-bg.png'"></image>
<view class="btn"></view>
<view class="rule"></view>
<view class="rule" @click="openPage(4)"></view>
</view>
<view class="invite-bd">
<view class="invite-bd-a">
@ -194,6 +194,11 @@
}else if(index == 3){
this.isPopup = true;
this.InviteUserPoster();
}else if(index == 4){
uni.navigateTo({
url: "/pages/invite/rule"
})
}
},
}

@ -0,0 +1,48 @@
<template>
<view class="presale">
<view class="p" v-html="content"></view>
</view>
</template>
<script>
import * as Api from '@/api/help'
export default {
data() {
return {
content: ''
}
},
onLoad(op) {
this.getCarouselList()
},
onShow() {},
methods: {
//
getCarouselList(type) {
const app = this;
Api.getAgreement({
type: 'invite_rule'
})
.then(result => {
let content = result.data.detail.content;
if(content){
content = content.replace(/style=""/g,'').replace(/<img src=/g,'<img style="width: 100%; display:block" src=')
}
this.content = content
})
.finally(() => app.isLoading = false)
},
}
}
</script>
<style lang="scss" scoped>
.presale {
padding: 40rpx;
.p {
font-size: 26rpx;
line-height: 50rpx;
color: #212121;
}
}
</style>

@ -3,8 +3,7 @@
<view class="wechat-auth">
<button class="btn-normal" open-type="getPhoneNumber" @getphonenumber="handelMpWeixinMobileLogin($event)">
<view class="wechat-auth-container">
<image class="icon" src="../../../static/channel/wechat.png"></image>
<text class="title">微信手机号一键登录</text>
<text class="title">手机号快捷登录</text>
</view>
</button>
</view>
@ -20,7 +19,7 @@
export default {
props: {
// id
share_user_id: {
refereeId: {
type: String
},
},
@ -65,7 +64,7 @@
code: app.code,
encryptedData: detail.encryptedData,
iv: detail.iv,
share_user_id: this.share_user_id,
refereeId: this.refereeId,
isParty: app.isParty,
partyData: app.userInfo,
refereeId: store.getters.refereeId

@ -14,13 +14,16 @@
<text @click="getCode" v-if="!showCountDown">获取验证码</text>
<text v-if="showCountDown">{{countdown}}</text>
</view>
<view class="c">
查看并同意<text @click="toTextPage(1)">用户服务协议</text><text @click="toTextPage(2)">隐私政策</text>
<view class="c" style="display: flex;align-items: center;">
<u-checkbox active-color="#FF343C" v-model="isCheckout" style="margin-right: -20rpx;"></u-checkbox>同意<text @click="toTextPage(1)">《用户服务协议》</text>和<text @click="toTextPage(2)">隐私政策</text>
</view>
</view>
<view class="login-fd login-fd-on" @click="login">登录</view>
<view class="">
<mpWeiXinMobile :share_user_id="share_user_id"></mpWeiXinMobile>
<view class="" v-if="isCheckout">
<mpWeiXinMobile :refereeId="refereeId"></mpWeiXinMobile>
</view>
<view class="" v-else style="font-size: 28rpx;color: #666;text-align: center;margin-top: 50rpx;" @click="login">
手机号快捷登录
</view>
</view>
</template>
@ -40,6 +43,7 @@
},
data() {
return {
isCheckout: false,
showCountDown: false,
currentIndex: 0,
background: {
@ -51,11 +55,11 @@
countdown: 60,
countDownFun: null,
code: '',
share_user_id: ""
refereeId: ""
}
},
onLoad(o) {
this.share_user_id = o.share_user_id
this.refereeId = o.refereeId
},
methods: {
toTextPage(n) {
@ -110,6 +114,10 @@
})
},
login() {
if(this.isCheckout == false){
this.$toast('请勾选用户协议')
return ;
}
//
if (!this.validatePhoneNumber(this.phoneNum)) {
this.$toast('请输入正确的手机号')
@ -123,7 +131,7 @@
store.dispatch('Login', {
smsCode: that.semCode,
mobile: that.phoneNum,
share_user_id: this.share_user_id,
refereeId: this.refereeId,
isParty: false,
partyData: {},
refereeId: false

@ -123,13 +123,11 @@
isShow: false,
currentIndex: 0,
background: {
background: `url(${this.$picUrl}/static/news/refund-bg.png) center -10px no-repeat`,
// background: 'url('+ img+') center -10px no-repeat',
background: `url(${this.$picUrl}/static/news/refund-bg.png) center top no-repeat`,
backgroundSize: '100%',
},
background1: {
background: `url(${this.$picUrl}/static/news/login-bg.png) center -10px no-repeat`,
// background: 'url('+ img1+') center -10px no-repeat',
background: `url(${this.$picUrl}/static/news/login-bg.png) center top no-repeat`,
backgroundSize: '100%',
},
info: {},

File diff suppressed because it is too large Load Diff

@ -13,10 +13,11 @@
京东电器官方福利群
</view>
<view class="qcode">
<image :src="cityInfo.wechat"></image>
</view>
<view class="submitBtn">
立即进群>
<button open-type="share"></button>
</view>
<view class="fuli">
<view class="fuliTitle">
@ -45,24 +46,50 @@
export default {
data() {
return {
cityInfo: {}
}
},
onReady() {
this.cityInfo = uni.getStorageSync("cityInfo")
},
/**
* 分享当前页面
*/
onShareAppMessage() {
return {
title: "进社群领取更多福利",
imageUrl: this.cityInfo.we
}
},
/**
* 分享到朋友圈
* 本接口为 Beta 版本暂只在 Android 平台支持详见分享到朋友圈 (Beta)
* https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share-timeline.html
*/
onShareTimeline() {
const app = this
//
const params = app.$getShareUrlParams({
goodsId: app.goodsId,
})
return {
title: app.goods.goods_name,
path: `/pages/goods/detail?${params}`
}
}
}
</script>
<style lang="scss" scoped>
page{
min-height:100%;
background: url(https://www.royaum.com.cn/static/news1/jbg.png);
background-repeat: no-repeat;
background-size: cover;
width: 100%;
padding-bottom: 100upx;
}
.jinqun{
height:100%;
position: relative;
background: url(https://www.royaum.com.cn/static/jinqun-bg.png);
background-repeat: no-repeat;
background-size: cover;
min-height: 100vh;
.flag{
position: absolute;
top:0;
@ -111,6 +138,10 @@ page{
height:400upx;
margin:40upx auto;
border:1px solid red;
image{
width: 100%;
height: 100%;
}
}
.submitBtn{
width: 340upx;
@ -125,6 +156,16 @@ page{
line-height: 90upx;
text-align: center;
margin:0 auto;
position: relative;
button{
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
opacity: 0;
}
}
.fuli{
margin: 60upx;

@ -213,12 +213,20 @@
<u-icon style="margin-left: 5rpx; color: #909090; margin-top: -5rpx;" name="arrow-right"></u-icon>
</view>
<view class="grounding goodsOrder">
<view class="image-text_21" @click="toFuwu(1)">
<image :src="$picUrl+'/static/user/untake.png'" class="label_11"></image>
<view class="text-group_21">
<text class="text_71"
v-if="orderTodoInfo.service_order.payment_number">{{orderTodoInfo.service_order.payment_number}}</text>
<text class="text_81">待支付</text>
</view>
</view>
<view class="image-text_21" @click="toFuwu(3)">
<image :src="$picUrl+'/static/user/unpay.png'" class="label_11"></image>
<view class="text-group_21">
<text class="text_71"
v-if="orderTodoInfo.service_order.confirm_number">{{orderTodoInfo.service_order.confirm_number}}</text>
<text class="text_81">待确认</text>
<text class="text_81">服务</text>
</view>
</view>
<view class="image-text_21" @click="toFuwu(2)">
@ -226,15 +234,7 @@
<view class="text-group_21">
<text class="text_71"
v-if="orderTodoInfo.service_order.service_number">{{orderTodoInfo.service_order.service_number}}</text>
<text class="text_81">待服务</text>
</view>
</view>
<view class="image-text_21" @click="toFuwu(1)">
<image :src="$picUrl+'/static/user/untake.png'" class="label_11"></image>
<view class="text-group_21">
<text class="text_71"
v-if="orderTodoInfo.service_order.payment_number">{{orderTodoInfo.service_order.payment_number}}</text>
<text class="text_81">待支付</text>
<text class="text_81">待派单</text>
</view>
</view>
<view class="image-text_21" @click="toFuwu(4)">

Loading…
Cancel
Save