Commit f4ecc897 authored by zhangjianguo's avatar zhangjianguo

组件位置的挪动

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