|
|
@@ -34,20 +34,18 @@
|
|
|
{{ value }}
|
|
|
</p>
|
|
|
</view>
|
|
|
- <view class="term-value-group" v-else>
|
|
|
- <div class="flex_i">
|
|
|
- <div class="">
|
|
|
+ <view class="term-value-group" v-else style="flex-direction:row;align-items: center;padding-left: 20rpx;">
|
|
|
+ <div class="flex_i">
|
|
|
{{ item.value[0] }}
|
|
|
</div>
|
|
|
- <div class="copy" @click="copy(item.value[0])">复制</div>
|
|
|
- </p>
|
|
|
+ <div class="copy" @click="copy(item.value[0])" style="color: #02a7f0;margin-left: 15rpx;">复制</div>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-else-if="active === 1" class="proInfo">
|
|
|
<view class="products">
|
|
|
- <view class="product" @click="toDetail(id)" v-for="(item,idx) in productList" :key="idx">
|
|
|
+ <view class="product" @click="toDetail(item.id)" v-for="(item,idx) in productList" :key="idx">
|
|
|
<view class="img">
|
|
|
<image :src="'https://kiq.xazhima.com' + item.pic_url"></image>
|
|
|
</view>
|
|
|
@@ -59,6 +57,7 @@
|
|
|
<footer-share
|
|
|
style="width: 100%"
|
|
|
:isCollection="true"
|
|
|
+ :isCollectedIcon="infoObj.if_collect"
|
|
|
@collectionPages="collectionPage"
|
|
|
@sharePages="sharePage"
|
|
|
></footer-share>
|
|
|
@@ -79,6 +78,7 @@ export default {
|
|
|
model: {},
|
|
|
productList: [],
|
|
|
isShow: false,
|
|
|
+ infoObj:{},
|
|
|
};
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
@@ -87,19 +87,6 @@ export default {
|
|
|
this.getProductInfo(id);
|
|
|
},
|
|
|
methods: {
|
|
|
- collectionPage() {
|
|
|
- console.log("已收藏");
|
|
|
- },
|
|
|
- sharePage() {
|
|
|
- console.log("分享");
|
|
|
- uni.showShareMenu({
|
|
|
- title: "园区XXX",
|
|
|
- path: "pages/park/park_detail",
|
|
|
- success(res) {
|
|
|
- console.log(res);
|
|
|
- },
|
|
|
- });
|
|
|
- },
|
|
|
change(idx) {
|
|
|
this.active = idx;
|
|
|
},
|
|
|
@@ -133,6 +120,7 @@ export default {
|
|
|
data: { id },
|
|
|
success: (res) => {
|
|
|
if (res.data.code === 200) {
|
|
|
+ this.infoObj = res.data.data;
|
|
|
let {
|
|
|
name,
|
|
|
pic_url,
|
|
|
@@ -252,6 +240,109 @@ export default {
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
+ goAuthPage(){
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'../auth/index'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ collectionPage() {
|
|
|
+ if(!getApp().globalData.user_phone){
|
|
|
+ this.goAuthPage();
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let md5Sign = md5(
|
|
|
+ "method=" +
|
|
|
+ "user" +
|
|
|
+ "×tamp=" +
|
|
|
+ getApp().globalData.globalTimestamp +
|
|
|
+ "&secret=" +
|
|
|
+ getApp().globalData.secret
|
|
|
+ );
|
|
|
+ let url =
|
|
|
+ getApp().globalData.shareUrl +
|
|
|
+ "api/api.php" +
|
|
|
+ "?method=user&source=company&action=collect_add×tamp=" +
|
|
|
+ getApp().globalData.globalTimestamp +
|
|
|
+ "&sign=" +
|
|
|
+ md5Sign;
|
|
|
+ uni.request({
|
|
|
+ url: url,
|
|
|
+ method: "POST",
|
|
|
+ header: {
|
|
|
+ "content-type": "application/x-www-form-urlencoded",
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ openId: getApp().globalData.open_id,
|
|
|
+ source: "company",
|
|
|
+ source_name: "企业",
|
|
|
+ source_id: this.infoObj.id,
|
|
|
+ source_title: this.infoObj.name,
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ res.data.data
|
|
|
+ ? (this.infoObj.if_collect = true)
|
|
|
+ : (this.infoObj.if_collect = false);
|
|
|
+ this.$forceUpdate();
|
|
|
+ uni.showToast({
|
|
|
+ duration: 3000,
|
|
|
+ title: res.data.msg,
|
|
|
+ icon: "none",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ console.log("连接失败");
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ shareRequest() {
|
|
|
+ let md5Sign = md5(
|
|
|
+ "method=" +
|
|
|
+ "user" +
|
|
|
+ "×tamp=" +
|
|
|
+ getApp().globalData.globalTimestamp +
|
|
|
+ "&secret=" +
|
|
|
+ getApp().globalData.secret
|
|
|
+ );
|
|
|
+ let url =
|
|
|
+ getApp().globalData.shareUrl +
|
|
|
+ "api/api.php" +
|
|
|
+ "?method=user&source=company&action=repost×tamp=" +
|
|
|
+ getApp().globalData.globalTimestamp +
|
|
|
+ "&sign=" +
|
|
|
+ md5Sign;
|
|
|
+ uni.request({
|
|
|
+ url: url,
|
|
|
+ method: "POST",
|
|
|
+ header: {
|
|
|
+ "content-type": "application/x-www-form-urlencoded",
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ openId: getApp().globalData.open_id,
|
|
|
+ source_id: this.infoObj.id,
|
|
|
+ source: "company",
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ console.log(res);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ console.log("连接失败");
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ sharePage() {
|
|
|
+ let that = this;
|
|
|
+ uni.showShareMenu({
|
|
|
+ title: that.infoObj.title,
|
|
|
+ path: "pages/enterprise/enterprise_detail?id=" + that.infoObj.id,
|
|
|
+ success(res) {
|
|
|
+ that.shareRequest();
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
copy(data) {
|
|
|
uni.setClipboardData({
|
|
|
data,
|
|
|
@@ -344,7 +435,7 @@ export default {
|
|
|
height: 200rpx;
|
|
|
image {
|
|
|
width: 200rpx;
|
|
|
- height: 200rpx;
|
|
|
+ height: 160rpx;
|
|
|
}
|
|
|
}
|
|
|
}
|