Commit f4ecc897 authored by zhangjianguo's avatar zhangjianguo

组件位置的挪动

parent 3ca1cc97
......@@ -51,7 +51,8 @@
</template>
<script>
import pickerAddress from '@/components/liudx-pickerAddress/index.vue'
import pickerAddress from './liudx-pickerAddress/index.vue'
export default {
components: {
......@@ -146,7 +147,7 @@
);
},
addresspick(obj) {
console.log(obj)
this.msg.Province = obj.province.ID;
this.msg.City = obj.city.ID;
......
......@@ -45,17 +45,17 @@
<view class="contentBox">
<view class="cBox_item" v-for="(cx, ci) in g" :key="ci" >
<view class="good-img" @click="clickHandler(cx.Id)">
<view class="good-img" @click="clickHandler(cx.GoodsId)">
<image :src="cx.GoodsImgPath" style="width: 100%; height: 100%;" />
<!-- 如果此商品售完 -->
<!-- <image src="../../../static/images/icon/plugins-out.png" v-if="item.goods_num==0"
style="width: 100%; height: 100%;position: absolute;left:0;top:0;background: #000;opacity: 0.6;" /> -->
</view>
<view class="good-info">
<Text class='good-name' @click="clickHandler(cx.Id)">{{cx.GoodsName}}</Text>
<Text class='good-name' @click="clickHandler(cx.GoodsId)">{{cx.GoodsName}}</Text>
<view style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<Text :style="{'color':mainColor}">¥{{cx.Price}}</Text>
<u-icon name="ellipsis" color="#c8c9cc" size="40" @click.stop='operation(cx,index,ci)'></u-icon>
<u-icon name="ellipsis" color="#c8c9cc" size="40" @click.stop='operation(cx.GoodsId,cx.Id,ci)'></u-icon>
</view>
</view>
</view>
......@@ -130,7 +130,7 @@
<script>
import auth from "../../../components/auth/index.vue";
import wPicker from "@/components/w-picker/w-picker.vue"
import wPicker from "../w-picker/w-picker.vue"
export default {
data() {
......@@ -157,7 +157,8 @@
page_count:1,
isover: false,
Popup:false,
goodId:'',
GoodsId:'',
detailId:'',
showModal:false,
index:0,
ci:0,
......@@ -270,11 +271,11 @@
billsummary(){
console.log('跳转菜单总结')
},
operation(e,index,ci){
operation(e,dId,index){
this.goodId = e;
this.GoodsId = e;
this.detailId = dId
this.index = index;
this.ci = ci;
this.Popup= true
},
......@@ -314,57 +315,58 @@
goshoping(){
uni.redirectTo({ url: "/pages/index/index" });
},
clickHandler(id) {
clickHandler(GoodsId) {
uni.navigateTo({
url: '/pages/goods/goods?GoodsId='+id,
url: '/pages/goods/goods?GoodsId='+GoodsId,
});
},
Collection(){
let h=this.apiheader()
this.Popup= false;
this.request(
{
url: "",
data: {
r: "api/user/favorite-add",
goods_id: this.goodId.goods_id,
},
header:h
},
(res) => {
this.$refs.uToast.show({title: res.msg,})
}
this.request2(
{
url: '/api/AppletUser/SetUserCollectionInfo',
data: {
GoodsId:this.GoodsId
}
},
res => {
uni.showToast({
title: res.message,
icon: "none"
});
}
);
},
Pdelete(){
this.showModal = true;
},
confirm(){
this.showModal = false
this.Popup= false;
let h = this.apiheader();
// h['content-type']='application/x-www-form-urlencoded'
this.request(
{
url: "",
// method: "POST",
header: h,
data: {
r: "api/footprint/footprint-del",
id: this.goodId.id
}
},
res => {
this.g[this.index].goods.splice(this.ci,1)
this.$refs.uToast.show({title: res.msg,})
}
uni.showLoading({
title: '删除中'
})
this.request2(
{
url: '/api/AppletUser/DelUserFootMarkInfo',
data: {
FootMarkId:this.detailId
}
},
res => {
uni.hideLoading();
this.g.splice(this.index,1)
uni.showToast({
title: res.message,
icon: "none"
});
}
);
}
}
......
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