Commit c38505d0 authored by home's avatar home

zxh

parent 968f7c06
...@@ -131,7 +131,8 @@ ...@@ -131,7 +131,8 @@
defaultinfo:{},//修改的时候的默认初始数据 defaultinfo:{},//修改的时候的默认初始数据
listchind:[ listchind:[
{name:"是否新产品",value:"is_new",checked:false}, {name:"是否新产品",value:"is_new",checked:false},
{name:"是否热卖产品",value:"is_hot",checked:false}, {name:"是否热卖产品",value:"is_hot",checked:false},
{name:"是否是秒杀产品",value:"is_seckill",checked:false},
], ],
selchildList:[], selchildList:[],
cate_name:"", cate_name:"",
...@@ -266,6 +267,12 @@ ...@@ -266,6 +267,12 @@
can.is_hot = 1; can.is_hot = 1;
}else{ }else{
can.is_hot = 0; can.is_hot = 0;
}
if(this.selchildList.includes("is_hot")){
can.is_seckill = 1;
}else{
can.is_seckill = 0;
} }
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
<view class="xiaol">销量:{{item.sold_num}}</view> <view class="xiaol">销量:{{item.sold_num}}</view>
</view> </view>
<view class="btn"> <view class="btn">
<view class="btn_01" @tap="jump_edit(item)" >编辑</view> <view class="btn_01" @tap="jump_edit(item)">编辑</view>
<view class="btn_01" @tap="pullfun(item,index)" v-if="current==0" >下架</view> <view class="btn_01" @tap="pullfun(item,index)" v-if="current==0" >下架</view>
<view class="btn_01" @tap="pushfun(item,index)" v-if="current==1" >上架</view> <view class="btn_01" @tap="pushfun(item,index)" v-if="current==1" >上架</view>
<view class="btn_01" @tap="delfun(item,index)" >删除</view> <view class="btn_01" @tap="delfun(item,index)" >删除</view>
...@@ -35,7 +36,7 @@ ...@@ -35,7 +36,7 @@
</block> </block>
<view class="tjsp"> <view class="tjsp">
<navigator url="/pages/edit/product/addshop"> <navigator :url="'/pages/edit/product/addshop?activity_type='+this.activity_type" >
<view class="flex flex-direction"> <view class="flex flex-direction">
<button class="cu-btn bg-red margin-tb-sm lg">添加商品</button> <button class="cu-btn bg-red margin-tb-sm lg">添加商品</button>
</view> </view>
...@@ -72,14 +73,16 @@ ...@@ -72,14 +73,16 @@
isshowall:true, isshowall:true,
isselect:"2", isselect:"2",
sendindex:"", sendindex:"",
money_type:"" money_type:"",
activity_type:0
} }
}, },
onLoad(opdata) { onLoad(opdata) {
console.info(opdata) console.info(opdata)
this.money_type=opdata.money_type; this.money_type=opdata.money_type;
this.activity_type = opdata.activity_type//秒杀资格判断
if(opdata.isselect==1){ if(opdata.isselect==1){
this.isselect = 1; this.isselect = 1;
this.sendindex = opdata.sendindex;//插入索引 this.sendindex = opdata.sendindex;//插入索引
...@@ -98,8 +101,10 @@ ...@@ -98,8 +101,10 @@
onShow() { onShow() {
this.page =0; this.page =0;
this.goodsListdata = []; this.goodsListdata = [];
this.isshowall = true; this.isshowall = true;
this.getgoodsListfun();
this.getgoodsListfun();
}, },
computed:{ computed:{
staticUrl(){ staticUrl(){
...@@ -121,6 +126,8 @@ ...@@ -121,6 +126,8 @@
page:this.page, page:this.page,
}); });
if(res.code==0){ if(res.code==0){
console.log(res);
if(res.data.length!=0){ if(res.data.length!=0){
this.goodsListdata = [...this.goodsListdata,...res.data]; this.goodsListdata = [...this.goodsListdata,...res.data];
...@@ -268,14 +275,17 @@ ...@@ -268,14 +275,17 @@
// } // }
// } // }
// }) // })
}, },
//编辑产品 //编辑产品
jump_edit(item) { jump_edit(item) {
uni.navigateTo({ uni.navigateTo({
//url: '/pages/edit/product/product?id=' + id //url: '/pages/edit/product/product?id=' + id
url:"/pages/edit/product/addshop?id="+item.goods_id+'&money_type='+this.money_type, url:"/pages/edit/product/addshop?id="+item.goods_id+'&money_type='+this.money_type+'&activity_type='+this.activity_type,
}) })
}, },
//tab切换事件 //tab切换事件
onClickItem(index) { onClickItem(index) {
if (this.current !== index) { if (this.current !== index) {
......
...@@ -140,19 +140,60 @@ ...@@ -140,19 +140,60 @@
<view class="title">标识:</view> <view class="title">标识:</view>
<!-- 表特和类目 --> <!-- 表特和类目 -->
<checkbox-group @change="checkboxChange"> <checkbox-group @change="checkboxChange">
<view class="chindlost ali-c flex flex-wrap"> <view class="chindlost ali-c flex flex-wrap" >
<label class="lableitem flex ali-c" v-for="(item,index) in listchind" :key="index">
<view> <label class="lableitem flex ali-c" v-for="(item,index) in listchind" :key="index">
<checkbox color="#FF6900" :value="item.value" :checked="item.checked" /> <view>
</view> <checkbox color="#FF6900" :value="item.value" :checked="item.checked" />
<view class="titles">{{item.name}}</view> </view>
</label> <view class="titles">{{item.name}}</view>
</view> </label>
<view v-if="activity_type==1">
<label class="lableitem flex ali-c" v-for="item of listissetkill" :key="index">
<view>
<checkbox color="#FF6900" :value="item.value" :checked="item.checked" />
</view>
<view class="titles">{{item.name}}</view>
</label>
</view>
<!-- <view v-for="(item,index) in seckilltimelist">
<label class="lableitem flex ali-c">
<view>
<checkbox color="#FF6900" value="is_seckill" :checked="false" />
</view>
<view class="titles">{{item.title}}</view>
</label>
</view> -->
</view>
</checkbox-group> </checkbox-group>
</view>
<!-- 单选列表 -->
<view class="checkboxs" v-if="seckilltimelist.length !=0 ">
<view class="title">选择秒杀时段:</view>
<!-- scroll-view 与 picker-view 达成效果一致-->
<!-- <scroll-view scroll-y="true" >
<view class="chindlost ali-c flex flex-wrap" style="height: 200upx;margin-top: 40upx;">
<radio-group @change="radioChange">
<label class="lableitem flex ali-c" v-for="(item,index) in seckilltimelist" :key="index">
<view>
<radio :value="item.activity_id+''" />
</view>
<view class="titles">{{item.title}}</view>
</label>
</radio-group>
</view>
</scroll-view> -->
<picker-view indicator-style="height: 50px;" style="width: 100%; height: 200px;" @change="radioChange">
<picker-view-column>
<view v-for="(item,index) in seckilltimelist" :key="index" style="line-height: 50px; text-align: center;">{{item.title}}</view>
</picker-view-column>
</picker-view>
</view> </view>
<!-- 多选end --> <!-- 多选end -->
<view class="submits active" @tap="geteditOk">发布商品</view> <view class="submits active" @tap="geteditOk">发布商品</view>
<!-- create_goods --> <!-- create_goods -->
...@@ -167,7 +208,9 @@ ...@@ -167,7 +208,9 @@
import {getGoodsCate,addEditGoods,goodsDetails} from "@/utils/api/api.js"; import {getGoodsCate,addEditGoods,goodsDetails} from "@/utils/api/api.js";
import jinedit from "@/components/jinedit/jinedit.vue"; import jinedit from "@/components/jinedit/jinedit.vue";
import {getActivityList} from '@/utils/api/merchant.js';
export default { export default {
components:{ components:{
...@@ -202,11 +245,18 @@ ...@@ -202,11 +245,18 @@
formData: { formData: {
"imgtype": "comment" "imgtype": "comment"
}, },
indexsss:0, indexsss:0,
listchind:[ listchind:[
{name:"是否新产品",value:"is_new",checked:false}, {name:"是否新产品",value:"is_new",checked:false},
{name:"是否热卖产品",value:"is_hot",checked:false}, {name:"是否热卖产品",value:"is_hot",checked:false},
], // {name:"是否秒杀产品",value:"is_seckill",checked:false,status:1}, /* */
],
seckilltimelist:[], //秒杀时间列表
listissetkill:[{name:"是否秒杀产品",value:"is_seckill",checked:false}],
activity_type:0,
index:0, index:0,
idx:0, idx:0,
idj:0, idj:0,
...@@ -232,10 +282,14 @@ ...@@ -232,10 +282,14 @@
photos:"",//更多详情图 photos:"",//更多详情图
details:'',///商品详情(编辑器插件) details:'',///商品详情(编辑器插件)
is_new:"0",//0 1 是否新产品 is_new:"0",//0 1 是否新产品
is_hot:"0",//0 1 是否热卖产品 is_hot:"0",//0 1 是否热卖产品
action:"add",//方式(添加:add,修改:edit)
money:'' is_seckill:"0",//0 1 是否秒杀产品
activity_id:'0',//秒杀activity_id
activity_list:'49,',//秒杀列表
action:"add",//方式(添加:add,修改:edit)
money:''
}, },
goodsCate:[], goodsCate:[],
shopCate:[], shopCate:[],
...@@ -246,10 +300,13 @@ ...@@ -246,10 +300,13 @@
c_photosTwo:[],//更多图里面的数据 c_photosTwo:[],//更多图里面的数据
c_pics: [],//主图的数据 c_pics: [],//主图的数据
c_picsTwo:[],//更多详情图 c_picsTwo:[],//更多详情图
issubmit:true,//重复提交开关 issubmit:true,//重复提交开关
selchildList:[],//勾选列表选中的值 selchildList:[],//勾选列表选中的值
isjiumodelshop:{},//修改信息的时候 默认的信息 isjiumodelshop:{},//修改信息的时候 默认的信息
}; };
}, },
computed: { computed: {
...@@ -267,8 +324,10 @@ ...@@ -267,8 +324,10 @@
}, },
onLoad(opdata) { onLoad(opdata) {
console.info(opdata) console.info(opdata,2222222)
this.money_type=opdata.money_type
this.money_type=opdata.money_type
this.activity_type = opdata.activity_type
if(opdata.id!="" && opdata.id!=undefined){ if(opdata.id!="" && opdata.id!=undefined){
this.canform.goods_id = opdata.id;//修改的商品id this.canform.goods_id = opdata.id;//修改的商品id
this.canform.action = "edit"; this.canform.action = "edit";
...@@ -298,14 +357,28 @@ ...@@ -298,14 +357,28 @@
}, },
pickertow(){ pickertow(){
this.$refs.picker1.show() // 显示 this.$refs.picker1.show() // 显示
},
// 秒杀列表
async getActivityListfun(){
let res = await getActivityList({
// audit:1,
})
if(res.code==0){
console.log(res,3333)
this.seckilltimelist = res.data.head
// this.canform.activity_id = res.data.activity_id
}
}, },
//获取原来的商品详情信息 //获取原来的商品详情信息
async goodsDetailsfun(){ async goodsDetailsfun(){
let res = await goodsDetails({ let res = await goodsDetails({
goods_id:this.canform.goods_id, goods_id:this.canform.goods_id,
}); });
if(res.code==0){ if(res.code==0){
this.isjiumodelshop = res.data;//赋值
console.log(res)
this.isjiumodelshop = res.data;//赋值
this.canform.title = res.data.title; this.canform.title = res.data.title;
this.canform.intro = res.data.intro; this.canform.intro = res.data.intro;
...@@ -346,7 +419,6 @@ ...@@ -346,7 +419,6 @@
data:"", data:"",
msg:"success", msg:"success",
time:"1587021687", time:"1587021687",
}; };
obj.data = item.photo; obj.data = item.photo;
this.c_photosTwo.push(item.photo);//默认值 this.c_photosTwo.push(item.photo);//默认值
...@@ -363,7 +435,14 @@ ...@@ -363,7 +435,14 @@
let listchind= [ let listchind= [
{name:"是否新产品",value:"is_new",checked:res.data.is_new==1?true:false}, {name:"是否新产品",value:"is_new",checked:res.data.is_new==1?true:false},
{name:"是否热卖产品",value:"is_hot",checked:res.data.is_hot==1?true:false}, {name:"是否热卖产品",value:"is_hot",checked:res.data.is_hot==1?true:false},
]; ];
// console.log(res.activity_list=="49,",res.data.activity_list);
let listissetkill =[{name:"是否秒杀产品",value:"is_seckill",checked:res.data.activity_list=="49,"?true:false}]
this.listissetkill = listissetkill;
this.listchind = listchind; this.listchind = listchind;
if(res.data.is_new==1){ if(res.data.is_new==1){
...@@ -371,9 +450,7 @@ ...@@ -371,9 +450,7 @@
} }
if(res.data.is_hot==1){ if(res.data.is_hot==1){
this.selchildList.push("is_hot"); this.selchildList.push("is_hot");
} }
}else{ }else{
this.$api.msg(res.msg); this.$api.msg(res.msg);
...@@ -447,6 +524,8 @@ ...@@ -447,6 +524,8 @@
} }
let selchildList = this.selchildList; let selchildList = this.selchildList;
console.log(selchildList)
selchildList.forEach((item,index)=>{//勾选的两个 selchildList.forEach((item,index)=>{//勾选的两个
if(item=="is_new"){ if(item=="is_new"){
...@@ -454,8 +533,10 @@ ...@@ -454,8 +533,10 @@
} }
if(item=="is_hot"){ if(item=="is_hot"){
this.canform.is_hot= "1"; this.canform.is_hot= "1";
} }
// if(item=="is_seckill"){
// this.canform.is_seckill= "1";
// }
}) })
// console.info(this.canform,"canform"); // console.info(this.canform,"canform");
...@@ -463,12 +544,14 @@ ...@@ -463,12 +544,14 @@
//添加 //添加
console.log(this.canform.mall_price) console.log(this.canform.mall_price)
console.log(this.canform.price) console.log(this.canform.price)
if(parseFloat(this.canform.price)<parseFloat(this.canform.mall_price)){ if(parseFloat(this.canform.price)<parseFloat(this.canform.mall_price)){
this.$api.msg('商城价格不能大于市场价格'); this.$api.msg('商城价格不能大于市场价格');
this.issubmit=true; this.issubmit=true;
return; return;
} }
let res = await addEditGoods(this.canform) let res = await addEditGoods(this.canform)
...@@ -494,12 +577,33 @@ ...@@ -494,12 +577,33 @@
this.issubmit=true; this.issubmit=true;
} }
}, },
//多选 勾选 列表 //多选 勾选 列表
checkboxChange(e){ checkboxChange(e){
// console.log(e); console.log(e,111111111);
// console.log()
if(e.detail.value.indexOf('is_seckill')!=-1){
this.getActivityListfun();
}
this.selchildList = e.detail.value; this.selchildList = e.detail.value;
}, },
//单选框
radioChange(e){
// console.log(e)
// console.log(this.seckilltimelist[e.detail.value[0]].activity_id)
this.activity_id = this.seckilltimelist[e.detail.value[0]].activity_id;
// this.activity_id = e.detail.value;
// let listindex = e.detail.value
// console.log(this.activity_id,111111)
// console.log( e.detail.value,111111)
},
changepicker(e){
console.log(e)
},
// 改变下拉选项 一级的 // 改变下拉选项 一级的
// bindPickerChange (event) { // bindPickerChange (event) {
// console.info(event.detail.value); // console.info(event.detail.value);
......
...@@ -235,7 +235,8 @@ ...@@ -235,7 +235,8 @@
countdata: {}, countdata: {},
shop_type: "", //店铺类型 ele goods shop_type: "", //店铺类型 ele goods
is_luck_draw:"", is_luck_draw:"",
money_type:"" money_type:"",
activity_type:0
} }
}, },
components: { components: {
...@@ -284,7 +285,7 @@ ...@@ -284,7 +285,7 @@
methods: { methods: {
jump(){ jump(){
uni.navigateTo({ uni.navigateTo({
url:'/pages/edit/pro_manage/pro_manage?money_type='+this.money_type url:'/pages/edit/pro_manage/pro_manage?money_type='+this.money_type + '&'+'activity_type='+this.activity_type
}) })
}, },
...@@ -365,7 +366,9 @@ ...@@ -365,7 +366,9 @@
async storeIndexfun() { async storeIndexfun() {
let res = await storeIndex({ let res = await storeIndex({
}); });
console.log(res);
console.log(res.data.shop_info.activity_type)
uni.stopPullDownRefresh(); //结束下拉刷新 uni.stopPullDownRefresh(); //结束下拉刷新
console.log(res.data.shop_info.shop_id) console.log(res.data.shop_info.shop_id)
if (res.code == 0) { if (res.code == 0) {
...@@ -375,7 +378,8 @@ ...@@ -375,7 +378,8 @@
this.shop_id = res.data.shop_info.shop_id; this.shop_id = res.data.shop_info.shop_id;
this.is_luck_draw=res.data.shop_info.is_luck_draw this.is_luck_draw=res.data.shop_info.is_luck_draw
this.money_type=res.data.shop_info.money_type this.money_type=res.data.shop_info.money_type
this.activity_type = res.data.shop_info.activity_type //判断是否有秒杀资格
} else { } else {
this.$api.msg(res.msg); this.$api.msg(res.msg);
......
...@@ -22,7 +22,9 @@ ...@@ -22,7 +22,9 @@
<text class="title">规格模型:</text> <text class="title">规格模型:</text>
<view class="modlename">{{goodsSpec_goodsType[Typeindex].name?goodsSpec_goodsType[Typeindex].name:""}}</view> <view class="modlename">{{goodsSpec_goodsType[Typeindex].name?goodsSpec_goodsType[Typeindex].name:""}}</view>
<image class="dopicon" src="/static/news/dopicon.png" mode=""></image> <image class="dopicon" src="/static/news/dopicon.png" mode=""></image>
</view> </view>
<lb-picker ref="picker" :list="goodsSpec_goodsType" :value='Typeindex' range-key="label" :props="myProps" @confirm='confirm'></lb-picker> <lb-picker ref="picker" :list="goodsSpec_goodsType" :value='Typeindex' range-key="label" :props="myProps" @confirm='confirm'></lb-picker>
...@@ -37,7 +39,8 @@ ...@@ -37,7 +39,8 @@
<view class="specsShop_list"> <view class="specsShop_list">
<view class="specsShop_list_item" v-for="(item,index) in endobjdata" :key="index"> <view class="specsShop_list_item" v-for="(item,index) in endobjdata" :key="index">
<view class="itemnames">{{item.key_name}}</view> <view class="itemnames">{{item.key_name}}</view>
<view class="cleelable flex ali-c"> <view class="cleelable flex ali-c">
...@@ -45,13 +48,22 @@ ...@@ -45,13 +48,22 @@
<view class="inputbox flex1"> <view class="inputbox flex1">
<input class="input" type="text" value="" v-model="item.price" placeholder="请输入售价" ></input> <input class="input" type="text" value="" v-model="item.price" placeholder="请输入售价" ></input>
</view> </view>
</view> </view>
<view class="cleelable flex ali-c">
<view class="names"><text class="bitian">*</text> 秒杀价</view>
<view class="inputbox flex1">
<input class="input" type="text" value="" v-model="item.seckill_price" placeholder="请输入售价" ></input>
</view>
</view>
<view class="cleelable flex ali-c"> <view class="cleelable flex ali-c">
<view class="names"><text class="bitian">*</text> 库存</view> <view class="names"><text class="bitian">*</text> 库存</view>
<view class="inputbox flex1"> <view class="inputbox flex1">
<input class="input" type="text" v-model="item.store_count" value="" placeholder="请输入库存" ></input> <input class="input" type="text" v-model="item.store_count" value="" placeholder="请输入库存" ></input>
</view> </view>
</view> </view>
<!-- <QSInput :name="name" titleColor="#000000" variableName="shoptitle" required layout="row" title="库存" v-model="form.shoptitle"></QSInput> --> <!-- <QSInput :name="name" titleColor="#000000" variableName="shoptitle" required layout="row" title="库存" v-model="form.shoptitle"></QSInput> -->
<!-- <QSInput :name="name" titleColor="#000000" variableName="shoptitle" required layout="row" title="售价" v-model="form.shoptitle"></QSInput> --> <!-- <QSInput :name="name" titleColor="#000000" variableName="shoptitle" required layout="row" title="售价" v-model="form.shoptitle"></QSInput> -->
<!-- <QSPics :name="name" variableName="pics" title="商品图片" v-model="form.pics"></QSPics> --> <!-- <QSPics :name="name" variableName="pics" title="商品图片" v-model="form.pics"></QSPics> -->
...@@ -82,7 +94,9 @@ ...@@ -82,7 +94,9 @@
<script> <script>
import {goodsSpec,ajaxGetSpecSelect,addEditProductSpec} from "@/utils/api/api.js"; import {goodsSpec,ajaxGetSpecSelect,addEditProductSpec} from "@/utils/api/api.js";
import yiCheckbox from "@/components/yiCheckbox/yiCheckbox.vue"; import yiCheckbox from "@/components/yiCheckbox/yiCheckbox.vue";
import config from "@/utils/config.js"; import config from "@/utils/config.js";
import {getActivityList} from '@/utils/api/merchant.js';
/** /**
* 查询商品的规格 商品规格详情 goodsSpec * 查询商品的规格 商品规格详情 goodsSpec
* *
...@@ -100,7 +114,8 @@ ...@@ -100,7 +114,8 @@
}, },
name:"shops", name:"shops",
form:{ form:{
pics: [{name: '测试'}], pics: [{name: '测试'}],
shoptitle:"", shoptitle:"",
...@@ -144,12 +159,16 @@ ...@@ -144,12 +159,16 @@
return this.$store.state.staticUrl; return this.$store.state.staticUrl;
} }
}, },
onLoad(opdata) { onLoad(opdata) {
console.log(opdata)
this.goods_id = opdata.id; this.goods_id = opdata.id;
this.goodsSpecfun();//商品规格详情 this.goodsSpecfun();//商品规格详情
}, },
methods:{ methods:{
confirm(e){ confirm(e){
console.log(e) console.log(e)
// this.parent_name=e.item.value; // this.parent_name=e.item.value;
...@@ -158,10 +177,13 @@ ...@@ -158,10 +177,13 @@
this.type_id =e.item.id; this.type_id =e.item.id;
this.Typeindex = e.index; this.Typeindex = e.index;
this.ajaxGetSpecSelectfun();//获取选中的分类下面的规格 this.ajaxGetSpecSelectfun();//获取选中的分类下面的规格
}, },
//分类选择触发后 //分类选择触发后
bindPickerChange(e){ bindPickerChange(e){
this.$refs.picker.show() // 显示
this.$refs.picker.show() // 显示
}, },
...@@ -206,45 +228,59 @@ ...@@ -206,45 +228,59 @@
// 库存,图片,售价 添加规定的方法 最终提交的方法 // 库存,图片,售价 添加规定的方法 最终提交的方法
addEditProductSpecfun(){ addEditProductSpecfun(){
// addEditProductSpec // addEditProductSpec
let isbool = false; let isbool = false;
isbool = this.endobjdata.every((item,index)=>{ isbool = this.endobjdata.every((item,index)=>{
return item.price!="" && item.price!=""; return item.price!="" && item.price!="";
}) })
if(!isbool){ if(!isbool){
this.$api.msg("规格填写有误"); this.$api.msg("规格填写有误");
return false; return false;
} }
if(this.endobjdata.length==0){ if(this.endobjdata.length==0){
this.$api.msg("你必须填写规格才能提交"); this.$api.msg("你必须填写规格才能提交");
return false; return false;
} }
console.log(111111111111111111111111111111111111111111);
console.info("endobjdata",this.endobjdata,this.endobjdata);
// return false;
console.log(this.goods_id)
console.info("endobjdata",this.endobjdata);
// return false;
addEditProductSpec({ addEditProductSpec({
goods_id:this.goods_id,//商品id goods_id:this.goods_id,//商品id
type_id:this.type_id,//模型id type_id:this.type_id,//模型id
item:this.endobjdata, item:this.endobjdata,
}).then((res)=>{ }).then((res)=>{
if(res.code==0){ if(res.code==0){
console.log(res,"ress")
this.$api.msg(res.data); this.$api.msg(res.data);
setTimeout(()=>{ setTimeout(()=>{
uni.navigateBack({ uni.navigateBack({
}) })
},1000) },1000)
}else{ }else{
this.$api.msg(res.data); this.$api.msg(res.data);
} }
}) })
}, },
//商品规格详情 第一步 获取 一级 //商品规格详情 第一步 获取 一级
async goodsSpecfun(){ async goodsSpecfun(){
let res = await goodsSpec({ let res = await goodsSpec({
goods_id:this.goods_id goods_id:this.goods_id
}); });
console.log(res,"goodsSpec")
if(res.code==0){ if(res.code==0){
this. goodsSpec_goodsType = res.data.goodsType; this. goodsSpec_goodsType = res.data.goodsType;
this. goodsSpec_info = res.data.info; this. goodsSpec_info = res.data.info;
...@@ -268,7 +304,10 @@ ...@@ -268,7 +304,10 @@
let res = await ajaxGetSpecSelect({ let res = await ajaxGetSpecSelect({
goods_id:this.goods_id,//商品id goods_id:this.goods_id,//商品id
type_id:this.type_id, type_id:this.type_id,
}); });
console.log(res,"ajaxGetSpecSelectfun")
if(res.code==0){ if(res.code==0){
//items_ids 商品规格key,将规格id遍历 //items_ids 商品规格key,将规格id遍历
// specList 规格详情列表 // specList 规格详情列表
...@@ -393,7 +432,8 @@ ...@@ -393,7 +432,8 @@
changeupdata(e){ changeupdata(e){
// console.info("数据改变后",e); // console.info("数据改变后",e);
}, },
//初始化数据呀 //初始化数据呀
initdatalist(){ initdatalist(){
var arr1 = [1,2,3]; var arr1 = [1,2,3];
...@@ -410,15 +450,22 @@ ...@@ -410,15 +450,22 @@
}, },
inititemdata(){ inititemdata(){
} }
},
},
watch:{ watch:{
form(e,c){ form(e,c){
console.info(e,c,"watch"); console.info(e,c,"watch");
} }
} },
} }
</script> </script>
......
...@@ -28,4 +28,10 @@ import request from "./../request.js";//这里用的是two ...@@ -28,4 +28,10 @@ import request from "./../request.js";//这里用的是two
// 订单号 // 订单号
export function showsend(data) { export function showsend(data) {
return request.post("Turntable/send", data, { noAuth: true}); return request.post("Turntable/send", data, { noAuth: true});
} }
\ No newline at end of file
// 秒杀状态列表
export function getActivityList(){
return request.post("store/getActivityList", {}, { noAuth: true});
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment