|
|
@@ -1,11 +1,11 @@
|
|
|
|
|
|
<template>
|
|
|
<view class="content">
|
|
|
- <image class="logo" src="/static/bed3.png"></image>
|
|
|
+ <image class="logo" :src="detailObj.picture"></image>
|
|
|
<view class="detail-title">
|
|
|
<text style="margin-left: 5%;
|
|
|
- margin-right: 3%;">甜蜜瑞士系列床垫 卧室独立袋弹簧 护脊静音软硬适中双面使用床垫</text>
|
|
|
- <text class="price-style">¥11999</text>
|
|
|
+ margin-right: 3%;">{{detailObj.desc}}</text>
|
|
|
+ <text class="price-style">¥{{detailObj.money}}</text>
|
|
|
</view>
|
|
|
|
|
|
<view class="share-box">
|
|
|
@@ -23,36 +23,57 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="product-title">产品详情</view>
|
|
|
-
|
|
|
- <image class="logo-footer" src="/static/detail-bg2.png"></image>
|
|
|
+ <view>
|
|
|
+ <u-parse :content="detailObj.content"></u-parse>
|
|
|
+ </view>
|
|
|
+ <!-- <image class="logo-footer" src="/static/detail-bg2.png"></image> -->
|
|
|
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ var md5 = require("../../../common/md5.js");
|
|
|
+ import uParse from '@/components/gaoyia-parse/parse.vue'
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ uParse,
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
- title: 'Hello'
|
|
|
+ title: 'Hello',
|
|
|
+ detailObj:{},
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
- console.log(option)
|
|
|
+ this.getDetailInfo(option.detailId)
|
|
|
},
|
|
|
onShareAppMessage() {
|
|
|
- console.log(111);
|
|
|
return {
|
|
|
title: '分销小助手',
|
|
|
- path:'/pages/index/index?inviteId=' + '111'
|
|
|
+ path:'/pages/index/index?inviteId=' + getApp().globalData.user_id
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- goDetail(){
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/index/detailPage/index',
|
|
|
- success: res => {},
|
|
|
- fail: () => {},
|
|
|
- complete: () => {}
|
|
|
+ getDetailInfo(dId){
|
|
|
+ let that = this;
|
|
|
+ uni.request({
|
|
|
+ url: getApp().globalData.shareUrl, //需要设置为全局
|
|
|
+ method: 'POST',
|
|
|
+ header: {
|
|
|
+ 'content-type': 'application/x-www-form-urlencoded'
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ method: 'getProductsInfo',
|
|
|
+ timestamp: getApp().globalData.globalTimestamp, //Date.now()
|
|
|
+ id: dId,
|
|
|
+ sign: md5('getProductsInfo' + getApp().globalData.globalTimestamp)
|
|
|
+ },
|
|
|
+ success: res => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ that.detailObj = res.data.msg
|
|
|
+ console.log(res.data.msg)
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
copyCode(){
|