Commit 8016a70e authored by zhangjianguo's avatar zhangjianguo

Merge branch 'master' of http://gitlab.oytour.com/viitto/mallapp

parents f92a566c a6040332
......@@ -104,7 +104,7 @@ export default {
font-family: "oswald";
src: url("https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/smallapp/Oswald-Regular.ttf");
}
*{
html,body{
font-family: "oswald" !important;
}
swiper{
......
......@@ -147,6 +147,20 @@ export default {
g: {},
skuObj: null,
notStockGood: [],
forms:{
list: [
{
mch_id: 0,
goods_list: [],
distance: 0,
remark: "",
order_form: [],
use_integral: 0,
user_coupon_id: 0,
},
],
address_id: 0,
}
};
},
mounted() {
......@@ -224,7 +238,6 @@ export default {
},
buy() {
if (this.skuObj && this.skuObj.id) {
let goods = [];
let g = {
id: this.skuObj.goods_id,
num: this.gc,
......@@ -238,12 +251,11 @@ export default {
attr_group_id: x.attr_group_id,
});
});
goods.push(g);
console.log(goods);
this.forms.list[0].goods_list.push(g)
this.forms.list[0].mch_id=this.g.mch_id
uni.navigateTo({
url:
"/pages/order-submit/order-submit?goods=" +
encodeURIComponent(JSON.stringify(goods)),
"/pages/order-submit/order-submit?formData=" + encodeURIComponent(JSON.stringify(this.forms)),
complete(res) {
console.log(res);
},
......
......@@ -10,41 +10,49 @@
style="width: 100%; height: 100%;"
/>
</view>
<view class="good-name">{{ cx.name }}</view>
<view class="good-name" v-if="setting.is_show_goods_name=='1'">{{ cx.name }}</view>
<view class="good-info">
<view class="price" :style="{ color: mainColor }">{{
cx.price_content
}}</view>
<view class="sell">{{ cx.sales }}</view>
<view class="cart" @click.stop="showSkuHandler(cx)">
<view class="sell" v-if="setting.is_show_sales_num=='1'">{{ cx.sales }}</view>
<view v-if="setting.is_show_cart=='1'" class="cart" @click.stop="showSkuHandler(cx)">
<u-icon name="cart-o" size="40" :color="mainColor" />
</view>
</view>
</view>
</u-col>
</u-row>
<good-sku v-if="showSku" :option-type="2" borderRadius="20" v-model="showSku" :good="sku"></good-sku>
<good-sku
v-if="showSku"
:option-type="2"
borderRadius="20"
v-model="showSku"
:good="sku"
></good-sku>
</view>
</template>
<script>
import goodSku from '../goods/goodsku'
import goodSku from "../goods/goodsku";
export default {
components:{
goodSku
components: {
goodSku,
},
props: ["list"],
data() {
return {
g: [],
showSku:false,
sku:{},
mainColor:""
showSku: false,
sku: {},
mainColor: "",
setting:{}
};
},
mounted() {
this.g = this.list;
this.mainColor = this.$uiConfig.mainColor;
this.initConfig()
},
watch: {
list: {
......@@ -52,19 +60,22 @@ export default {
immediate: true,
handler: function (newVal, oldVal) {
this.g = newVal;
}
},
},
},
methods: {
initConfig() {
this.setting = uni.getStorageSync("basedata").mall.setting
},
clickHandler(url) {
uni.navigateTo({
url: url,
});
},
showSkuHandler(g){
this.sku=g
this.showSku=true
}
showSkuHandler(g) {
this.sku = g;
this.showSku = true;
},
},
};
</script>
......
......@@ -3,8 +3,15 @@
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [{
"path": "pages/order/index/index"
},
{
"path": "pages/index/index"
},
{
"path": "pages/order-submit/order-submit"
},
{
"path": "pages/search/search"
},
......@@ -46,10 +53,6 @@
},
{
"path": "pages/order/index"
},
{
"path": "pages/order/index/index"
}
],
"globalStyle": {
......
This diff is collapsed.
......@@ -11,6 +11,7 @@
:border-radius="0"
@click="previewImage"
></u-swiper>
<!-- TODO 分销价格未做 is_share_price -->
</view>
<view class="g-info">
<view class="g-name u-skeleton-rect">{{ g.name }}</view>
......@@ -24,9 +25,11 @@
: g.price_min + "-" + g.price_max
}}</text>
</view>
<!-- TODO is_common_user_member_price 普通用户会员价 -->
<!-- TODO is_member_user_member_price 会员用户会员价 -->
<view class="sell u-skeleton-rect">
<text class="oprice">{{ g.original_price }}</text>
<text>已售出{{ g.sales }}{{ g.unit }}</text>
<text class="oprice" v-if="setting.is_underline_price=='1'">{{ g.original_price }}</text>
<text v-if="setting.is_sales=='1'">已售出{{ g.sales }}{{ g.unit }}</text>
</view>
</view>
<view class="right u-skeleton-rect">
......@@ -91,7 +94,7 @@
</view>
</view>
<view class="sku-box u-skeleton-rect">
<view class="sku-box u-skeleton-rect" v-if="setting.is_express=='1'">
<view class="label">快递</view>
<view class="content">
{{ g.express == "" ? "免运费" : g.express }}
......@@ -120,7 +123,7 @@
<view
class="sku-box u-skeleton-rect"
v-if="comments.comments.length == 0"
v-if="comments.comments.length == 0 && setting.is_comment=='1'"
>
<view class="label">暂无评论信息</view>
</view>
......@@ -168,7 +171,8 @@
</view>
<u-skeleton
:loading="loading"
v-if="loading"
:loading="true"
:animation="true"
bgColor="#FFF"
></u-skeleton>
......@@ -211,7 +215,7 @@ export default {
data() {
return {
id: 0,
loading: false,
loading: true,
g: {},
imgs: [],
mc: "",
......@@ -226,6 +230,7 @@ export default {
currentSku: {},
isExsitGoods: true,
pageTitle: "商品详情",
setting:{}
};
},
components: {
......@@ -240,6 +245,7 @@ export default {
this.mc = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
this.initPage();
this.setting = uni.getStorageSync("basedata").mall.setting
},
methods: {
initPage() {
......
......@@ -267,7 +267,7 @@ export default {
if (option.goods) {
this.formData.list[0].goods_list = JSON.parse(decodeURIComponent(option.goods));
} else if (option.formData) {
this.formData = JSON.parse(option.formData);
this.formData = JSON.parse(decodeURIComponent(option.formData));
} else {
uni.redirectTo({
url: '/pages/index/index'
......
This diff is collapsed.
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